Fix sparse triangular view iterator
This commit is contained in:
		
							parent
							
								
									6d829e766f
								
							
						
					
					
						commit
						e8515f78ac
					
				| @ -152,8 +152,8 @@ public: | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
| //       inline Index row() const { return (ArgType::Flags&RowMajorBit ? Base::outer() : this->index()); }
 | ||||
| //       inline Index col() const { return (ArgType::Flags&RowMajorBit ? this->index() : Base::outer()); }
 | ||||
|       inline Index row() const { return (ArgType::Flags&RowMajorBit ? Base::outer() : this->index()); } | ||||
|       inline Index col() const { return (ArgType::Flags&RowMajorBit ? this->index() : Base::outer()); } | ||||
|       inline StorageIndex index() const | ||||
|       { | ||||
|         if(HasUnitDiag && m_returnOne)  return internal::convert_index<StorageIndex>(Base::outer()); | ||||
|  | ||||
| @ -746,6 +746,11 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re | ||||
|     // check sparse-triangular to dense
 | ||||
|     refMat3 = m2.template triangularView<StrictlyUpper>(); | ||||
|     VERIFY_IS_APPROX(refMat3, DenseMatrix(refMat2.template triangularView<StrictlyUpper>())); | ||||
| 
 | ||||
|     // check sparse triangular view iteration-based evaluation
 | ||||
|     m2.setZero(); | ||||
|     VERIFY_IS_CWISE_EQUAL(m2.template triangularView<UnitLower>().toDense(), DenseMatrix::Identity(rows, cols)); | ||||
|     VERIFY_IS_CWISE_EQUAL(m2.template triangularView<UnitUpper>().toDense(), DenseMatrix::Identity(rows, cols)); | ||||
|   } | ||||
|    | ||||
|   // test selfadjointView
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Charles Schlosser
						Charles Schlosser