本文整理汇总了C++中DMat::print方法的典型用法代码示例。如果您正苦于以下问题:C++ DMat::print方法的具体用法?C++ DMat::print怎么用?C++ DMat::print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DMat
的用法示例。
在下文中一共展示了DMat::print方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: chol
//---------------------------------------------------------
DMat& chol(DMat& A, bool in_place)
//---------------------------------------------------------
{
// Given symmetric positive-definite matrix A,
// return its Cholesky-factorization for use
// later in solving (multiple) linear systems.
int M=A.num_rows(), LDA=A.num_rows(), info=0;
char uplo = 'U';
if (in_place)
{
// factorize arg
POTRF (uplo, M, A.data(), LDA, info);
if (info) { umERROR("chol(A)", "dpotrf reports: info = %d", info); }
A.zero_below_diag();
A.set_factmode(FACT_CHOL); // indicate factored state
return A;
}
else
{
// factorize copy of arg
DMat* tmp = new DMat(A, OBJ_temp, "chol(A)");
POTRF (uplo, M, tmp->data(), LDA, info);
if (info) { umERROR("chol(A)", "dpotrf reports: info = %d", info); }
tmp->zero_below_diag();
tmp->set_factmode(FACT_CHOL); // indicate factored state
#if (0)
// compare with Matlab
tmp->print(g_MSGFile, "chol", "lf", 4, 8);
#endif
return (*tmp);
}
}
示例2: dumpDMat
// Numerical {DMat,IMat} and {DVec,IVec}
void dumpDMat(const DMat& M, const char* s) { M.print(g_MSGFile, s, "lf", 4, 8, 51,0,50); }
示例3: dumpDM
// simple {DM,IM} and {DV,IV} arrays
void dumpDM(const DM& A, const char* s) {
DMat M; M.load(A.num_rows(),A.num_cols(), A.data());
M.print(g_MSGFile, s, "lf", 4, 8, 51,0,50);
}
示例4: dumpDMat2
// bump up details
void dumpDMat2(const DMat& M, const char* s) {
M.print(g_MSGFile, s, "E", 2, 10, 101,0,100);
}