triplet< T > Class Template Reference

Verbose description of a matrix element. More...

#include <triplet.hh>

Collaboration diagram for triplet< T >:
Collaboration graph

List of all members.

Public Member Functions

 triplet ()
 Default constructor.
 triplet (int r, int c, T v)
 Full constructor.
bool operator< (const triplet &t) const
 Lexicographical comparison of triplets.

Public Attributes

int row
 The row index inside the matrix.
int col
 The column index inside the matrix.
 The value of the matrix element at the specified position.

Detailed Description

template<class T>
class triplet< T >

Verbose description of a matrix element.

A triplet consists of row and column indices in a matrix together with the value of the corresponding matrix cell. As the full position information is part of the object, a triplet can describe a matrix element all by itself, and an unordered collection of triplets with unique addresses can describe all nonzero entries of a matrix.

See also:

Definition at line 42 of file triplet.hh.

Constructor & Destructor Documentation

template<class T>
triplet< T >::triplet ( int  r,
int  c,
) [inline]

Full constructor.

r the row index.
c the column index.
v the value.

Definition at line 72 of file triplet.hh.

Member Function Documentation

template<class T>
bool triplet< T >::operator< ( const triplet< T > &  t  )  const [inline]

Lexicographical comparison of triplets.

t the second triplet with which this one is to be compared.
whether this triplet is lexicographically less than t.

Definition at line 81 of file triplet.hh.

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

Generated on Fri Aug 21 08:15:08 2009 for mqn2mps by  doxygen 1.6.0