MyraMath
Classes
triu.h File Reference

Returns the upper triangle of a dense Matrix. 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::Matrix< Number >
 Tabulates an IxJ matrix. Allows random access, has column major layout to be compatible with BLAS/LAPACK. More...
 
class  myra::CMatrixRange< Number >
 Represents a const MatrixRange. More...
 

Functions

Matrix< NumberS > myra::triu (const CMatrixRange< NumberS > &A)
 Returns the upper triangle of a dense CMatrixRange.
 
Matrix< NumberD > myra::triu (const CMatrixRange< NumberD > &A)
 Returns the upper triangle of a dense CMatrixRange.
 
Matrix< NumberC > myra::triu (const CMatrixRange< NumberC > &A)
 Returns the upper triangle of a dense CMatrixRange.
 
Matrix< NumberZ > myra::triu (const CMatrixRange< NumberZ > &A)
 Returns the upper triangle of a dense CMatrixRange.
 

Detailed Description

Returns the upper triangle of a dense Matrix.

Examples:

   [1 2 3]      [1 2 3]

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

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

    [1 2]       [1 2]

triu ( [3 4] ) -> [0 4] [5 6]

Note that triu() crops excess rows.