DiSMEC++
dismec::FastSparseRowIter Class Reference

This is an almost verbatim copy of the SparseFeatures::InnerIterator provided by Eigen. More...

#include <fast_sparse_row_iter.h>

Public Types

using Scalar = SparseFeatures::Scalar
 
using Index = SparseFeatures::Index
 
using StorageIndex = SparseFeatures::StorageIndex
 

Public Member Functions

 FastSparseRowIter (const SparseFeatures &mat, Index row)
 
FastSparseRowIteroperator++ ()
 
const Scalarvalue () const
 
ScalarvalueRef ()
 
int index () const
 
int outer () const
 
int row () const
 
int col () const
 
 operator bool () const
 

Protected Attributes

const Scalarm_values
 
const StorageIndexm_indices
 
const Index m_outer
 
Index m_id
 
Index m_end
 

Detailed Description

This is an almost verbatim copy of the SparseFeatures::InnerIterator provided by Eigen.

The only difference is that we do not check whether the matrix is compressed in the constructor, since we already know this. This improves performance slightly.

Definition at line 19 of file fast_sparse_row_iter.h.

Member Typedef Documentation

◆ Index

using dismec::FastSparseRowIter::Index = SparseFeatures::Index

Definition at line 23 of file fast_sparse_row_iter.h.

◆ Scalar

using dismec::FastSparseRowIter::Scalar = SparseFeatures::Scalar

Definition at line 22 of file fast_sparse_row_iter.h.

◆ StorageIndex

using dismec::FastSparseRowIter::StorageIndex = SparseFeatures::StorageIndex

Definition at line 24 of file fast_sparse_row_iter.h.

Constructor & Destructor Documentation

◆ FastSparseRowIter()

dismec::FastSparseRowIter::FastSparseRowIter ( const SparseFeatures mat,
Index  row 
)
inline

Definition at line 25 of file fast_sparse_row_iter.h.

References m_end, m_id, and row().

Member Function Documentation

◆ col()

int dismec::FastSparseRowIter::col ( ) const
inline

Definition at line 40 of file fast_sparse_row_iter.h.

References index().

◆ index()

int dismec::FastSparseRowIter::index ( ) const
inline

Definition at line 37 of file fast_sparse_row_iter.h.

References m_id, and m_indices.

Referenced by col().

◆ operator bool()

dismec::FastSparseRowIter::operator bool ( ) const
inlineexplicit

Definition at line 42 of file fast_sparse_row_iter.h.

References m_end, and m_id.

◆ operator++()

FastSparseRowIter& dismec::FastSparseRowIter::operator++ ( )
inline

Definition at line 32 of file fast_sparse_row_iter.h.

References m_id.

◆ outer()

int dismec::FastSparseRowIter::outer ( ) const
inline

Definition at line 38 of file fast_sparse_row_iter.h.

References m_outer.

◆ row()

int dismec::FastSparseRowIter::row ( ) const
inline

Definition at line 39 of file fast_sparse_row_iter.h.

References m_outer.

Referenced by FastSparseRowIter().

◆ value()

const Scalar& dismec::FastSparseRowIter::value ( ) const
inline

Definition at line 34 of file fast_sparse_row_iter.h.

References m_id, and m_values.

◆ valueRef()

Scalar& dismec::FastSparseRowIter::valueRef ( )
inline

Definition at line 35 of file fast_sparse_row_iter.h.

References m_id, and m_values.

Member Data Documentation

◆ m_end

Index dismec::FastSparseRowIter::m_end
protected

Definition at line 49 of file fast_sparse_row_iter.h.

Referenced by FastSparseRowIter(), and operator bool().

◆ m_id

Index dismec::FastSparseRowIter::m_id
protected

◆ m_indices

const StorageIndex* dismec::FastSparseRowIter::m_indices
protected

Definition at line 46 of file fast_sparse_row_iter.h.

Referenced by index().

◆ m_outer

const Index dismec::FastSparseRowIter::m_outer
protected

Definition at line 47 of file fast_sparse_row_iter.h.

Referenced by outer(), and row().

◆ m_values

const Scalar* dismec::FastSparseRowIter::m_values
protected

Definition at line 45 of file fast_sparse_row_iter.h.

Referenced by value(), and valueRef().


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