本文整理汇总了C++中SiconosMatrix::isPLUInversed方法的典型用法代码示例。如果您正苦于以下问题:C++ SiconosMatrix::isPLUInversed方法的具体用法?C++ SiconosMatrix::isPLUInversed怎么用?C++ SiconosMatrix::isPLUInversed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiconosMatrix
的用法示例。
在下文中一共展示了SiconosMatrix::isPLUInversed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
SimpleMatrix::SimpleMatrix(const SiconosMatrix &m): SiconosMatrix(m.getNum()), _isPLUFactorized(), _isQRFactorized(false), _isPLUInversed(false)
{
// num is set in SiconosMatrix constructor with m.getNum() ... must be changed if m is Block
unsigned int numM = m.getNum();
_isPLUFactorized= m.isPLUFactorized();
_isPLUInversed= m.isPLUInversed();
if (m.ipiv())
_ipiv.reset(new VInt(*(m.ipiv())));
if (numM == 0) // ie if m is Block, this matrix is set to a dense.
{
const BlockMatrix& mB = static_cast<const BlockMatrix&>(m);
num = 1;
// get number of blocks in a row/col of m.
mat.Dense = new DenseMat(m.size(0), m.size(1));
ConstBlocksIterator1 it;
ConstBlocksIterator2 it2;
unsigned int posRow = 0;
unsigned int posCol = 0;
for (it = mB._mat->begin1(); it != mB._mat->end1(); ++it)
{
for (it2 = it.begin(); it2 != it.end(); ++it2)
{
setBlock(posRow, posCol, **it2);
posCol += (*it2)->size(1);
}
posRow += (*it)->size(0);
posCol = 0;
}
}
else if (num == 1)
{
mat.Dense = new DenseMat(m.size(0), m.size(1));
noalias(*mat.Dense) = (*m.dense());
}
else if (num == 2)
mat.Triang = new TriangMat(*m.triang());
else if (num == 3)
mat.Sym = new SymMat(*m.sym());
else if (num == 4)
mat.Sparse = new SparseMat(*m.sparse());
else if (num == 5)
mat.Banded = new BandedMat(*m.banded());
else if (num == 6)
mat.Zero = new ZeroMat(m.size(0), m.size(1));
else // if(num == 7)
mat.Identity = new IdentityMat(m.size(0), m.size(1));
}