Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType > Class Template Reference

Adds entries with optional symmetry to a sparse graph. More...

#include <Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp>

Public Types

typedef AdderType::index_type index_type
 The type of indices of the sparse graph. More...
 

Public Member Functions

 SymmetrizingGraphAdder (const Teuchos::RCP< AdderType > &adder, const std::string &symmType)
 Constructor. More...
 
void operator() (const index_type i, const index_type j)
 Add entry (i,j), and optionally symmetrize. More...
 
Teuchos::RCP< AdderType > getAdder () const
 Persisting non-const view of the underlying adder object. More...
 

Private Attributes

Teuchos::RCP< AdderType > adder_
 The wrapped AdderType instance. More...
 
bool symmetrize_
 Whether to do symmetrization at all. More...
 
bool skew_
 Whether to negate when symmetrizing. More...
 

Detailed Description

template<class AdderType>
class Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >

Adds entries with optional symmetry to a sparse graph.

Author
Alicia Klinvex This class wraps any existing class (AdderType) with the interface shown below. Given the Matrix Market symmetry type, this class' corresponding operator() may invoke AdderType's operator() twice, in order to add entry (j,i) if entry (i,j) is to be added.
Template Parameters
AdderTypeA class with at least the following interface:
class AdderType {
public:
typedef ... index_type; // Ellipsis represents the actual type
typedef ... value_type; // Ellipsis represents the actual type
void operator() (const index_type, const index_type, const value_type&);
};

Definition at line 95 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.

Member Typedef Documentation

template<class AdderType >
typedef AdderType::index_type Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >::index_type

The type of indices of the sparse graph.

Definition at line 98 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.

Constructor & Destructor Documentation

template<class AdderType >
Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >::SymmetrizingGraphAdder ( const Teuchos::RCP< AdderType > &  adder,
const std::string &  symmType 
)
inline

Constructor.

Parameters
adder[in/out] The wrapped AdderType instance
symmType[in] Canonical Matrix Market string representing the symmetry storage type of the matrix data.

Definition at line 106 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.

Member Function Documentation

template<class AdderType >
void Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >::operator() ( const index_type  i,
const index_type  j 
)
inline

Add entry (i,j), and optionally symmetrize.

Definition at line 115 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.

template<class AdderType >
Teuchos::RCP<AdderType> Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >::getAdder ( ) const
inline

Persisting non-const view of the underlying adder object.

This violates encapsulation, so please be careful with this.

Definition at line 137 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.

Member Data Documentation

template<class AdderType >
Teuchos::RCP<AdderType> Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >::adder_
private

The wrapped AdderType instance.

Definition at line 143 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.

template<class AdderType >
bool Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >::symmetrize_
private

Whether to do symmetrization at all.

Definition at line 145 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.

template<class AdderType >
bool Teuchos::MatrixMarket::SymmetrizingGraphAdder< AdderType >::skew_
private

Whether to negate when symmetrizing.

Definition at line 147 of file Teuchos_MatrixMarket_SymmetrizingGraphAdder.hpp.


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