科学网

 找回密码
  注册
编译showmesh.c
魏华祎 2010-12-10 11:23
http://www-dinma.univ.trieste.it/nirftc/research/easymesh/showmesh.html cc -o ShowMesh -O3 showmesh.c -lX11
个人分类: C++|4525 次阅读|没有评论
GCC 4.4 related build problems: missing #include
魏华祎 2010-12-10 08:19
在编译Deal.II 6.0.0, 遇到如下问题: source/parsed_function.cc:86: error: sscanf was not declared in this scope google 一下原因,原来是编译器的原因。 解决办法: 在parsed_function.h中加入 #include cstdio,then every thing is OK. The followi ...
个人分类: C++|4967 次阅读|没有评论
boost::ublas中的稀疏矩阵
魏华祎 2010-11-11 10:43
1, boost::ublas 中稀疏矩阵中随着元素插入过程,m.value_data()的变化。 #include boost/numeric/ublas/matrix_sparse.hpp #include boost/numeric/ublas/storage.hpp namespace ublas = boost::numeric::ublas; void show_array(const ublas::unbounded_arraydouble a) { for(size_t i=0; i ...
个人分类: C++|7514 次阅读|没有评论
Trait Class
魏华祎 2010-9-7 15:12
trait class 该怎么翻译呢? 转载:http://www.oonumerics.org/blitz/traits.html Using C++ Trait Classes for Scientific Computing Todd Veldhuizen, 3/30/96 Trait classes solve a number of problems which arise in the design of C++ template libraries for scientific computing. They provi ...
个人分类: C++|4284 次阅读|没有评论
typename and typedef
魏华祎 2010-9-6 09:44
typedef 用来定义一个类型的别名。 Things to remeber 在声明 template parameters(模板参数)时,class 和 typename 是可互换的 用 typename 去标识 nested dependent type names(嵌套依赖类型名),在 base class lists(基类列表)中或在一个 member initialization list(成员初始化列表)中作为一个 base c ...
个人分类: C++|2192 次阅读|没有评论
functor 仿函数
魏华祎 2009-8-9 15:45
所谓的仿函数(functor),是通过重载()运算符模拟函数形为的类。   因此,这里需要明确两点:   1 仿函数不是函数,它是个类;   2 仿函数重载了()运算符,使得它的对你可以像函数那样子调用(代码的形式好像是在调用 函数)。 reference: http://hi.baidu.com/laodun/ ...
个人分类: C++|2768 次阅读|没有评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-27 19:17

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部