Ocean
Ocean::SparseMatrixT< T >::Entry Class Reference

This class implements a triple object for matrix entries. More...

Public Member Functions

 Entry ()
 Creates an invalid entry object. More...
 
 Entry (const size_t row, const size_t column, const T value)
 Creates a new entry object. More...
 
size_t row () const
 Returns the row of this entry. More...
 
size_t column () const
 Returns the column of this entry. More...
 
value () const
 Returns the value of this entry. More...
 
bool isValid () const
 Returns whether this entry is valid. More...
 
bool operator< (const Entry &second) const
 Compares two entries and returns whether this entry is 'lesser' than the second entry. More...
 

Static Public Member Functions

static bool hasOneEntry (const size_t rows, const size_t columns, const Entries &entries)
 Checks whether a set of given entries have at least one entry in each row and in each column of a matrix with defined dimension. More...
 

Protected Attributes

size_t entryRow
 The row of this entry. More...
 
size_t entryColumn
 The column of this entry. More...
 
entryValue
 The value of this entry. More...
 

Detailed Description

template<typename T>
class Ocean::SparseMatrixT< T >::Entry

This class implements a triple object for matrix entries.

Constructor & Destructor Documentation

◆ Entry() [1/2]

template<typename T >
Ocean::SparseMatrixT< T >::Entry::Entry
inline

Creates an invalid entry object.

◆ Entry() [2/2]

template<typename T >
Ocean::SparseMatrixT< T >::Entry::Entry ( const size_t  row,
const size_t  column,
const T  value 
)
inline

Creates a new entry object.

Parameters
rowThe row of the entry
columnThe column of the entry
valueThe value of the entry

Member Function Documentation

◆ column()

template<typename T >
size_t Ocean::SparseMatrixT< T >::Entry::column
inline

Returns the column of this entry.

Returns
The column

◆ hasOneEntry()

template<typename T >
static bool Ocean::SparseMatrixT< T >::Entry::hasOneEntry ( const size_t  rows,
const size_t  columns,
const Entries entries 
)
static

Checks whether a set of given entries have at least one entry in each row and in each column of a matrix with defined dimension.

Parameters
rowsThe number of rows of the matrix, with range [1, infinity)
columnsThe number of columns of the matrix, with range [1, infinity)
entriesThe entries to check
Returns
True, if so

◆ isValid()

template<typename T >
bool Ocean::SparseMatrixT< T >::Entry::isValid
inline

Returns whether this entry is valid.

Returns
True, if so

◆ operator<()

template<typename T >
bool Ocean::SparseMatrixT< T >::Entry::operator< ( const Entry second) const
inline

Compares two entries and returns whether this entry is 'lesser' than the second entry.

Beware: The result is composed only on the coordinate of this entry, not on the value (thus, two entries with same coordinate but different value count as identical).

Parameters
secondThe second entry to compare
Returns
True, if so

◆ row()

template<typename T >
size_t Ocean::SparseMatrixT< T >::Entry::row
inline

Returns the row of this entry.

Returns
The row

◆ value()

template<typename T >
T Ocean::SparseMatrixT< T >::Entry::value
inline

Returns the value of this entry.

Returns
The value

Field Documentation

◆ entryColumn

template<typename T >
size_t Ocean::SparseMatrixT< T >::Entry::entryColumn
protected

The column of this entry.

◆ entryRow

template<typename T >
size_t Ocean::SparseMatrixT< T >::Entry::entryRow
protected

The row of this entry.

◆ entryValue

template<typename T >
T Ocean::SparseMatrixT< T >::Entry::entryValue
protected

The value of this entry.


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