Chemical Data Processing Library C++ API - Version 1.4.0
Static Public Member Functions | List of all members
CDPL::Math::UnitUpper Struct Reference

Tag selecting the unit-upper-triangular view (zero below the diagonal, one on the diagonal) for Math::TriangularAdapter. More...

#include <MatrixAdapter.hpp>

Static Public Member Functions

template<typename M >
static M::ConstReference get (const M &m, typename M::SizeType i, typename M::SizeType j)
 Returns element (i, j) of m under the unit-upper-triangular policy (one on the diagonal, zero below). More...
 

Detailed Description

Tag selecting the unit-upper-triangular view (zero below the diagonal, one on the diagonal) for Math::TriangularAdapter.

Member Function Documentation

◆ get()

template<typename M >
static M::ConstReference CDPL::Math::UnitUpper::get ( const M &  m,
typename M::SizeType  i,
typename M::SizeType  j 
)
inlinestatic

Returns element (i, j) of m under the unit-upper-triangular policy (one on the diagonal, zero below).

Template Parameters
MThe Math::TriangularAdapter instantiation.
Parameters
mThe adapter providing access to the underlying matrix and the zero/one fill values.
iThe zero-based row index.
jThe zero-based column index.
Returns
The one fill value if \( i = j \), the matrix element if \( i < j \), and the zero fill value otherwise.

The documentation for this struct was generated from the following file: