MyraMath
Classes | Functions
triu.h File Reference

Returns the upper triangle of a SparseMatrixRange. More...

#include <myramath/MYRAMATH_EXPORT.h>
#include <myramath/utility/Number.h>
Include dependency graph for triu.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::triu (const PatternRange &A)
 Returns the upper triangle of a Pattern.
 
SparseMatrix< NumberS > myra::triu (const CSparseMatrixRange< NumberS > &A)
 Returns the upper triangle of a SparseMatrixRange.
 
SparseMatrix< NumberD > myra::triu (const CSparseMatrixRange< NumberD > &A)
 Returns the upper triangle of a SparseMatrixRange.
 
SparseMatrix< NumberC > myra::triu (const CSparseMatrixRange< NumberC > &A)
 Returns the upper triangle of a SparseMatrixRange.
 
SparseMatrix< NumberZ > myra::triu (const CSparseMatrixRange< NumberZ > &A)
 Returns the upper triangle of a SparseMatrixRange.
 

Detailed Description

Returns the upper triangle of a SparseMatrixRange.

Examples:

   [1 2 z]      [1 2 z]

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

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

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

Here z indicates a structural zero. Note that triu() crops excess rows.