我正在尝试使用以下代码用犰狳解决稀疏线性系统:
arma::superlu_opts opts;
opts.allow_ugly = true; // Error here
bool success = spsolve(*psiV,M_,B,"superlu",opts);
根据文档,这是要使用特定参数解决的正确代码:(http://arma.sourceforge.net/docs.html#spsolve)
// Implementation in documentation
superlu_opts opts;
opts.allow_ugly = true;
opts.equilibrate = true;
spsolve(x, A, b, "superlu", opts);
我的问题出现在要选择的创建中,我得到:
error: ‘struct arma::superlu_opts’ has no member named ‘allow_ugly’
浏览armadillo / superlu的文件,我发现:
struct superlu_opts : public spsolve_opts_base
{
typedef enum {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD} permutation_type;
typedef enum {REF_NONE, REF_SINGLE, REF_DOUBLE, REF_EXTRA} refine_type;
bool equilibrate;
bool symmetric;
double pivot_thresh;
permutation_type permutation;
refine_type refine;
inline superlu_opts(): spsolve_opts_base(1)
{
equilibrate = false;
symmetric = false;
pivot_thresh = 1.0;
permutation = COLAMD;
refine = REF_DOUBLE;
}
};
这确认我可能没有正确版本的superlu。
有人知道如何解决此问题吗?
我正在使用cmake作为编译器。