mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-11 15:29:03 +08:00
fix bug #223: SparseMatrix::Flags no longer encode triangularness information
This commit is contained in:
parent
59576014a9
commit
dd504d6aae
@ -180,9 +180,7 @@ class RandomSetter
|
|||||||
enum {
|
enum {
|
||||||
SwapStorage = 1 - MapTraits<ScalarWrapper>::IsSorted,
|
SwapStorage = 1 - MapTraits<ScalarWrapper>::IsSorted,
|
||||||
TargetRowMajor = (SparseMatrixType::Flags & RowMajorBit) ? 1 : 0,
|
TargetRowMajor = (SparseMatrixType::Flags & RowMajorBit) ? 1 : 0,
|
||||||
SetterRowMajor = SwapStorage ? 1-TargetRowMajor : TargetRowMajor,
|
SetterRowMajor = SwapStorage ? 1-TargetRowMajor : TargetRowMajor
|
||||||
IsUpper = SparseMatrixType::Flags & Upper,
|
|
||||||
IsLower = SparseMatrixType::Flags & Lower
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -307,8 +305,6 @@ class RandomSetter
|
|||||||
/** \returns a reference to the coefficient at given coordinates \a row, \a col */
|
/** \returns a reference to the coefficient at given coordinates \a row, \a col */
|
||||||
Scalar& operator() (Index row, Index col)
|
Scalar& operator() (Index row, Index col)
|
||||||
{
|
{
|
||||||
eigen_assert(((!IsUpper) || (row<=col)) && "Invalid access to an upper triangular matrix");
|
|
||||||
eigen_assert(((!IsLower) || (col<=row)) && "Invalid access to an upper triangular matrix");
|
|
||||||
const Index outer = SetterRowMajor ? row : col;
|
const Index outer = SetterRowMajor ? row : col;
|
||||||
const Index inner = SetterRowMajor ? col : row;
|
const Index inner = SetterRowMajor ? col : row;
|
||||||
const Index outerMajor = outer >> OuterPacketBits; // index of the packet/map
|
const Index outerMajor = outer >> OuterPacketBits; // index of the packet/map
|
||||||
|
Loading…
x
Reference in New Issue
Block a user