Eigen::Triplet< Scalar, StorageIndex > Class Template Reference

A small structure to hold a non zero as a triplet (i,j,value). More...

Public Member Functions

const StorageIndex & col () const
 
const StorageIndex & row () const
 
 Triplet ()
 
 Triplet (const StorageIndex &i, const StorageIndex &j, const Scalar &v=Scalar(0))
 
const Scalar & value () const
 

Protected Attributes

StorageIndex m_col
 
StorageIndex m_row
 
Scalar m_value
 

Detailed Description

template<typename Scalar, typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
class Eigen::Triplet< Scalar, StorageIndex >

A small structure to hold a non zero as a triplet (i,j,value).

See also
SparseMatrix::setFromTriplets()

Definition at line 162 of file SparseUtil.h.

Constructor & Destructor Documentation

◆ Triplet() [1/2]

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
Eigen::Triplet< Scalar, StorageIndex >::Triplet ( )
inline

Definition at line 165 of file SparseUtil.h.

165 : m_row(0), m_col(0), m_value(0) {}
StorageIndex m_row
Definition: SparseUtil.h:180
StorageIndex m_col
Definition: SparseUtil.h:180
Scalar m_value
Definition: SparseUtil.h:181

◆ Triplet() [2/2]

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
Eigen::Triplet< Scalar, StorageIndex >::Triplet ( const StorageIndex &  i,
const StorageIndex &  j,
const Scalar &  v = Scalar(0) 
)
inline

Definition at line 167 of file SparseUtil.h.

168  : m_row(i), m_col(j), m_value(v)
169  {}
Array< int, Dynamic, 1 > v
std::ptrdiff_t j

Member Function Documentation

◆ col()

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
const StorageIndex& Eigen::Triplet< Scalar, StorageIndex >::col ( ) const
inline
Returns
the column index of the element

Definition at line 175 of file SparseUtil.h.

175 { return m_col; }

◆ row()

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
const StorageIndex& Eigen::Triplet< Scalar, StorageIndex >::row ( ) const
inline
Returns
the row index of the element

Definition at line 172 of file SparseUtil.h.

172 { return m_row; }

◆ value()

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
const Scalar& Eigen::Triplet< Scalar, StorageIndex >::value ( ) const
inline
Returns
the value of the element

Definition at line 178 of file SparseUtil.h.

178 { return m_value; }

Member Data Documentation

◆ m_col

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
StorageIndex Eigen::Triplet< Scalar, StorageIndex >::m_col
protected

Definition at line 180 of file SparseUtil.h.

◆ m_row

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
StorageIndex Eigen::Triplet< Scalar, StorageIndex >::m_row
protected

Definition at line 180 of file SparseUtil.h.

◆ m_value

template<typename Scalar , typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
Scalar Eigen::Triplet< Scalar, StorageIndex >::m_value
protected

Definition at line 181 of file SparseUtil.h.


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