MyraMath
Classes | Functions
tril.h File Reference

Returns the lower triangle of a SparseMatrix. More...

#include <myramath/MYRAMATH_EXPORT.h>
#include <myramath/utility/Number.h>
Include dependency graph for tril.h:

Go to the source code of this file.

Classes

class  myra::SparseMatrix< Number >
 Stores an IxJ matrix A in compressed sparse column format. More...
 
class  myra::CSparseMatrixRange< Number >
 Represents a const SparseMatrixRange. More...
 

Functions

Pattern myra::tril (const PatternRange &P)
 Returns the lower triangle of a Pattern.
 
SparseMatrix< NumberS > myra::tril (const CSparseMatrixRange< NumberS > &A)
 Returns the lower triangle of a SparseMatrixRange.
 
SparseMatrix< NumberD > myra::tril (const CSparseMatrixRange< NumberD > &A)
 Returns the lower triangle of a SparseMatrixRange.
 
SparseMatrix< NumberC > myra::tril (const CSparseMatrixRange< NumberC > &A)
 Returns the lower triangle of a SparseMatrixRange.
 
SparseMatrix< NumberZ > myra::tril (const CSparseMatrixRange< NumberZ > &A)
 Returns the lower triangle of a SparseMatrixRange.
 

Detailed Description

Returns the lower triangle of a SparseMatrix.

Examples:

   [1 2 3]      [1 z z]

tril ( [4 5 6] ) -> [4 5 z] [z 8 9] [z 8 9]

tril ( [1 2 3] ) -> [1 z] [4 z 6] [4 z]

[1 2] [1 z] tril ( [3 z] ) -> [3 z] [5 6] [5 6]

Here z indicates a structural zero. Note tril() crops excess columns.