Tpetra parallel linear algebra  Version of the Day
Public Member Functions | Public Attributes | List of all members
Tpetra::Details::CrsIJV< Ordinal, Scalar > Struct Template Reference

Struct representing a sparse matrix entry as an i,j,v triplet. More...

#include <Tpetra_CrsMatrix_def.hpp>

Public Member Functions

 CrsIJV ()
 Default constructor. More...
 
 CrsIJV (Ordinal row, Ordinal col, const Scalar &val)
 Standard constructor. More...
 
bool operator< (const CrsIJV< Ordinal, Scalar > &rhs) const
 Comparison operator. More...
 

Public Attributes

Ordinal i
 (Global) row index More...
 
Ordinal j
 (Global) column index More...
 
Scalar v
 Value of matrix entry. More...
 

Detailed Description

template<class Ordinal, class Scalar>
struct Tpetra::Details::CrsIJV< Ordinal, Scalar >

Struct representing a sparse matrix entry as an i,j,v triplet.

Template Parameters
OrdinalSame as the GlobalOrdinal template parameter of CrsMatrix.
ScalarSame as the Scalar template parameter of CrsMatrix.
Warning
This is an implementation detail of CrsMatrix. Users must not rely on this class. It may disappear or its interface may change at any time.

CrsMatrix uses this struct to communicate nonlocal sparse matrix entries in its globalAssemble() method.

Definition at line 104 of file Tpetra_CrsMatrix_def.hpp.

Constructor & Destructor Documentation

template<class Ordinal , class Scalar >
Tpetra::Details::CrsIJV< Ordinal, Scalar >::CrsIJV ( )
inline

Default constructor.

This constructor sets the row and column indices to Teuchos::OrdinalTraits<Ordinal>::invalid(), as a clear sign that they were not initialized.

Definition at line 110 of file Tpetra_CrsMatrix_def.hpp.

template<class Ordinal , class Scalar >
Tpetra::Details::CrsIJV< Ordinal, Scalar >::CrsIJV ( Ordinal  row,
Ordinal  col,
const Scalar &  val 
)
inline

Standard constructor.

Parameters
row[in] (Global) row index
col[in] (Global) column index
val[in] Value of matrix entry

Definition at line 121 of file Tpetra_CrsMatrix_def.hpp.

Member Function Documentation

template<class Ordinal , class Scalar >
bool Tpetra::Details::CrsIJV< Ordinal, Scalar >::operator< ( const CrsIJV< Ordinal, Scalar > &  rhs) const
inline

Comparison operator.

Comparison operator for sparse matrix entries stored as (i,j,v) triples. Defining this lets Tpetra::CrsMatrix use std::sort to sort CrsIJV instances.

Definition at line 130 of file Tpetra_CrsMatrix_def.hpp.

Member Data Documentation

template<class Ordinal , class Scalar >
Ordinal Tpetra::Details::CrsIJV< Ordinal, Scalar >::i

(Global) row index

Definition at line 141 of file Tpetra_CrsMatrix_def.hpp.

template<class Ordinal , class Scalar >
Ordinal Tpetra::Details::CrsIJV< Ordinal, Scalar >::j

(Global) column index

Definition at line 142 of file Tpetra_CrsMatrix_def.hpp.

template<class Ordinal , class Scalar >
Scalar Tpetra::Details::CrsIJV< Ordinal, Scalar >::v

Value of matrix entry.

Definition at line 143 of file Tpetra_CrsMatrix_def.hpp.


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