FEI Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
snl_fei::RaggedTable< MAP_TYPE, SET_TYPE > Class Template Reference

#include <snl_fei_RaggedTable.hpp>

Inheritance diagram for snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >:
Inheritance graph
[legend]

Public Types

typedef MAP_TYPE map_type
 
typedef SET_TYPE row_type
 
typedef MAP_TYPE::iterator iterator
 

Public Member Functions

 RaggedTable (int firstKey, int lastKey)
 
 RaggedTable (const RaggedTable< MAP_TYPE, SET_TYPE > &src)
 
void addDiagonals (int numIndices, const int *indices)
 
void addIndices (int row, int numIndices, const int *indices)
 
void addIndices (int numRows, const int *rows, int numIndices, const int *indices)
 
MAP_TYPE & getMap ()
 
const MAP_TYPE & getMap () const
 
SET_TYPE * getRow (int row)
 
iterator begin ()
 
iterator end ()
 
bool equal (const RaggedTable< MAP_TYPE, SET_TYPE > &rhs, bool quiet=true) const
 
- Public Member Functions inherited from fei::IndexTable
 IndexTable ()
 
virtual ~IndexTable ()
 
virtual void addDiagonals (int numIndices, const int *indices)=0
 
virtual void addIndices (int row, int numIndices, const int *indices)=0
 
virtual void addIndices (int numRows, const int *rows, int numIndices, const int *indices)=0
 

Detailed Description

template<typename MAP_TYPE, typename SET_TYPE>
class snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >

Data-structure that accumulates row-column indices into a ragged table, useful for building a matrix-graph and other concepts where keys are mapped to lists of values. This class can use various maps as the underlying data-holders. Useful because specialized maps and sets are defined in fei to take advantage of data that contains significant chunks of contiguous indices.

Definition at line 29 of file snl_fei_RaggedTable.hpp.

Member Typedef Documentation

◆ map_type

template<typename MAP_TYPE , typename SET_TYPE >
typedef MAP_TYPE snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::map_type

alias for MAP_TYPE

Definition at line 41 of file snl_fei_RaggedTable.hpp.

◆ row_type

template<typename MAP_TYPE , typename SET_TYPE >
typedef SET_TYPE snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::row_type

alias for SET_TYPE

Definition at line 44 of file snl_fei_RaggedTable.hpp.

◆ iterator

template<typename MAP_TYPE , typename SET_TYPE >
typedef MAP_TYPE::iterator snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::iterator

let 'iterator' be an alias for MAP_TYPE's iterator

Definition at line 72 of file snl_fei_RaggedTable.hpp.

Constructor & Destructor Documentation

◆ RaggedTable() [1/2]

template<typename MAP_TYPE , typename SET_TYPE >
snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::RaggedTable ( int  firstKey,
int  lastKey 
)
inline

Constructor

Definition at line 90 of file snl_fei_RaggedTable.hpp.

◆ RaggedTable() [2/2]

template<typename MAP_TYPE , typename SET_TYPE >
snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::RaggedTable ( const RaggedTable< MAP_TYPE, SET_TYPE > &  src)
inline

Copy constructor

Definition at line 99 of file snl_fei_RaggedTable.hpp.

Member Function Documentation

◆ addDiagonals()

template<typename MAP_TYPE , typename SET_TYPE >
void snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::addDiagonals ( int  numIndices,
const int *  indices 
)
inlinevirtual

add entries to the diagonal of the table

Implements fei::IndexTable.

Definition at line 218 of file snl_fei_RaggedTable.hpp.

◆ addIndices() [1/2]

template<typename MAP_TYPE , typename SET_TYPE >
void snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::addIndices ( int  row,
int  numIndices,
const int *  indices 
)
inlinevirtual

add a list of indices to a specified row

Implements fei::IndexTable.

Definition at line 117 of file snl_fei_RaggedTable.hpp.

◆ addIndices() [2/2]

template<typename MAP_TYPE , typename SET_TYPE >
void snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::addIndices ( int  numRows,
const int *  rows,
int  numIndices,
const int *  indices 
)
inlinevirtual

add a list of indices to several specified rows

Implements fei::IndexTable.

Definition at line 147 of file snl_fei_RaggedTable.hpp.

◆ getMap() [1/2]

template<typename MAP_TYPE , typename SET_TYPE >
MAP_TYPE & snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::getMap
inline

obtain internal map attribute

Definition at line 183 of file snl_fei_RaggedTable.hpp.

◆ getMap() [2/2]

template<typename MAP_TYPE , typename SET_TYPE >
const MAP_TYPE & snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::getMap
inline

obtain internal map attribute

Definition at line 189 of file snl_fei_RaggedTable.hpp.

◆ getRow()

template<typename MAP_TYPE , typename SET_TYPE >
RaggedTable< MAP_TYPE, SET_TYPE >::row_type * snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::getRow ( int  row)
inline

obtain specified row from internal map attribute

Definition at line 196 of file snl_fei_RaggedTable.hpp.

◆ begin()

template<typename MAP_TYPE , typename SET_TYPE >
RaggedTable< MAP_TYPE, SET_TYPE >::iterator snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::begin
inline

'first' row of table

Definition at line 205 of file snl_fei_RaggedTable.hpp.

◆ end()

template<typename MAP_TYPE , typename SET_TYPE >
RaggedTable< MAP_TYPE, SET_TYPE >::iterator snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::end
inline

just past the 'last' row of the table

Definition at line 212 of file snl_fei_RaggedTable.hpp.

◆ equal()

template<typename MAP_TYPE , typename SET_TYPE >
bool snl_fei::RaggedTable< MAP_TYPE, SET_TYPE >::equal ( const RaggedTable< MAP_TYPE, SET_TYPE > &  rhs,
bool  quiet = true 
) const

Test for equality of two RaggedTable objects.

Definition at line 228 of file snl_fei_RaggedTable.hpp.


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