本文整理汇总了C++中Epetra_SerialDenseMatrix::CV方法的典型用法代码示例。如果您正苦于以下问题:C++ Epetra_SerialDenseMatrix::CV方法的具体用法?C++ Epetra_SerialDenseMatrix::CV怎么用?C++ Epetra_SerialDenseMatrix::CV使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Epetra_SerialDenseMatrix
的用法示例。
在下文中一共展示了Epetra_SerialDenseMatrix::CV方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: identicalSignatures
//=========================================================================
// checks the signatures of two matrices
bool identicalSignatures(Epetra_SerialDenseMatrix& a, Epetra_SerialDenseMatrix& b, bool testLDA) {
if((a.M() != b.M() )|| // check properties first
(a.N() != b.N() )||
(a.CV() != b.CV() ))
return(false);
if(testLDA == true) // if we are coming from op= c->c #2 (have enough space)
if(a.LDA() != b.LDA()) // then we don't check LDA (but we do check it in the test function)
return(false);
if(a.CV() == View) { // if we're still here, we need to check the data
if(a.A() != b.A()) // for a view, this just means checking the pointers
return(false); // for a copy, this means checking each element
}
else { // CV == Copy
const int m = a.M();
const int n = a.N();
for(int i = 0; i < m; i++)
for(int j = 0; j < n; j++) {
if(a(i,j) != b(i,j))
return(false);
}
}
return(true); // if we're still here, signatures are identical
}