EpetraExt Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | List of all members
EpetraExt::Perm_traits< T > Struct Template Reference

Define some traits to make it easier to deal with template-parameters which are objects to be permuted. More...

#include <EpetraExt_Permutation_impl.h>

Static Public Member Functions

static const char * typeName ()
 return a std::string name for the object type More...
 
static T * clone (T *example, Epetra_DataAccess CV, const Epetra_BlockMap &map, int int_argument)
 clone function accepts an example of the object being cloned, and enough constructor arguments to be able to create any of these: CrsMatrix, CrsGraph, Vector, MultiVector. More...
 
static void replaceMap (T *obj, const Epetra_BlockMap &map)
 replace the object's row-map (or if it's not a matrix, replace its only map) More...
 
template<typename int_type >
static T * produceColumnPermutation (TPermutation< T, int_type > *perm, T *srcObj)
 return new object, which is a column-permutation of srcObj More...
 

Detailed Description

template<class T>
struct EpetraExt::Perm_traits< T >

Define some traits to make it easier to deal with template-parameters which are objects to be permuted.

Given a template parameter, we'll want to have the following operations available:

First the default definition, which catches all types "T", followed by some specializations for anticipated types. Any type other than the types specifically anticipated will be handled by this default definition, allowing the Permutation class to abort or return NULL where appropriate.

We define these trait structs in this file rather than in a separate file in an attempt to avoid some template-instantiation complications...

Definition at line 83 of file EpetraExt_Permutation_impl.h.

Member Function Documentation

template<class T >
static const char* EpetraExt::Perm_traits< T >::typeName ( )
inlinestatic

return a std::string name for the object type

Definition at line 85 of file EpetraExt_Permutation_impl.h.

template<class T >
static T* EpetraExt::Perm_traits< T >::clone ( T *  example,
Epetra_DataAccess  CV,
const Epetra_BlockMap map,
int  int_argument 
)
inlinestatic

clone function accepts an example of the object being cloned, and enough constructor arguments to be able to create any of these: CrsMatrix, CrsGraph, Vector, MultiVector.

And probably more later...

Why is an example object needed? For instance, if a MultiVector is created, we may want to know how many vectors it should contain...

Definition at line 95 of file EpetraExt_Permutation_impl.h.

template<class T >
static void EpetraExt::Perm_traits< T >::replaceMap ( T *  obj,
const Epetra_BlockMap map 
)
inlinestatic

replace the object's row-map (or if it's not a matrix, replace its only map)

Definition at line 104 of file EpetraExt_Permutation_impl.h.

template<class T >
template<typename int_type >
static T* EpetraExt::Perm_traits< T >::produceColumnPermutation ( TPermutation< T, int_type > *  perm,
T *  srcObj 
)
inlinestatic

return new object, which is a column-permutation of srcObj

Definition at line 110 of file EpetraExt_Permutation_impl.h.


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