Zoltan2
Public Member Functions | Protected Attributes | List of all members
Zoltan2::OrderingSolution< lno_t, gno_t > Class Template Reference

The class containing ordering solutions. More...

#include <Zoltan2_OrderingSolution.hpp>

Inheritance diagram for Zoltan2::OrderingSolution< lno_t, gno_t >:
Inheritance graph
[legend]
Collaboration diagram for Zoltan2::OrderingSolution< lno_t, gno_t >:
Collaboration graph
[legend]

Public Member Functions

 OrderingSolution (size_t perm_size)
 Constructor allocates memory for the solution. More...
 
bool havePerm ()
 Do we have the direct permutation? More...
 
void setHavePerm (bool status)
 Set havePerm (intended for ordering algorithms only) More...
 
bool haveInverse ()
 Do we have the inverse permutation? More...
 
void setHaveInverse (bool status)
 Set haveInverse (intended for ordering algorithms only) More...
 
void computePerm ()
 Compute direct permutation from inverse. More...
 
void computeInverse ()
 Compute inverse permutation. More...
 
size_t getPermutationSize ()
 Get (local) size of permutation. More...
 
ArrayRCP< gno_t > & getGidsRCP ()
 Get (local) permuted GIDs by RCP. More...
 
ArrayRCP< lno_t > & getPermutationRCP (bool inverse=false)
 Get (local) permutation by RCP. If inverse = true, return inverse permutation. By default, perm[i] is where new index i can be found in the old ordering. When inverse==true, perm[i] is where old index i can be found in the new ordering. More...
 
ArrayRCP< gno_t > & getGidsRCPConst () const
 Get (local) permuted GIDs by const RCP. More...
 
ArrayRCP< lno_t > & getPermutationRCPConst (bool inverse=false) const
 Get (local) permutation by const RCP. If inverse = true, return inverse permutation. By default, perm[i] is where new index i can be found in the old ordering. When inverse==true, perm[i] is where old index i can be found in the new ordering. More...
 
gno_t * getGids ()
 Get pointer to (local) GIDs. More...
 
lno_t * getPermutation (bool inverse=false)
 Get pointer to (local) permutation. If inverse = true, return inverse permutation. By default, perm[i] is where new index i can be found in the old ordering. When inverse==true, perm[i] is where old index i can be found in the new ordering. More...
 

Protected Attributes

size_t perm_size_
 
ArrayRCP< gno_t > gids_
 
bool havePerm_
 
bool haveInverse_
 
ArrayRCP< lno_t > perm_
 
ArrayRCP< lno_t > invperm_
 

Detailed Description

template<typename lno_t, typename gno_t>
class Zoltan2::OrderingSolution< lno_t, gno_t >

The class containing ordering solutions.

Template parameters:

The ordering solution always contains the permutation and the inverse permutation. These should be accessed through the accessor methods defined in this class, such as getPermutation(). Some ordering algorithms may compute and store other information. Currently, only serial ordering of the local data is supported.

In Zoltan2, perm[i]=j means index i in the reordered vector/matrix corresponds to index j in the old ordering. In Matlab notation, A(perm,perm) is the reordered matrix. This is consistent with SuiteSparse (AMD) and several other ordering packages. Unfortunately, this notation may conflict with a few other packages (such as Ifpack2).

Definition at line 71 of file Zoltan2_OrderingSolution.hpp.

Constructor & Destructor Documentation

template<typename lno_t , typename gno_t >
Zoltan2::OrderingSolution< lno_t, gno_t >::OrderingSolution ( size_t  perm_size)
inline

Constructor allocates memory for the solution.

Definition at line 77 of file Zoltan2_OrderingSolution.hpp.

Member Function Documentation

template<typename lno_t , typename gno_t >
bool Zoltan2::OrderingSolution< lno_t, gno_t >::havePerm ( )
inline

Do we have the direct permutation?

Definition at line 92 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
void Zoltan2::OrderingSolution< lno_t, gno_t >::setHavePerm ( bool  status)
inline

Set havePerm (intended for ordering algorithms only)

Definition at line 99 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
bool Zoltan2::OrderingSolution< lno_t, gno_t >::haveInverse ( )
inline

Do we have the inverse permutation?

Definition at line 107 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
void Zoltan2::OrderingSolution< lno_t, gno_t >::setHaveInverse ( bool  status)
inline

Set haveInverse (intended for ordering algorithms only)

Definition at line 114 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
void Zoltan2::OrderingSolution< lno_t, gno_t >::computePerm ( )
inline

Compute direct permutation from inverse.

Definition at line 121 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
void Zoltan2::OrderingSolution< lno_t, gno_t >::computeInverse ( )
inline

Compute inverse permutation.

Definition at line 137 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
size_t Zoltan2::OrderingSolution< lno_t, gno_t >::getPermutationSize ( )
inline

Get (local) size of permutation.

Definition at line 159 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
ArrayRCP<gno_t>& Zoltan2::OrderingSolution< lno_t, gno_t >::getGidsRCP ( )
inline

Get (local) permuted GIDs by RCP.

Definition at line 163 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
ArrayRCP<lno_t>& Zoltan2::OrderingSolution< lno_t, gno_t >::getPermutationRCP ( bool  inverse = false)
inline

Get (local) permutation by RCP. If inverse = true, return inverse permutation. By default, perm[i] is where new index i can be found in the old ordering. When inverse==true, perm[i] is where old index i can be found in the new ordering.

Definition at line 170 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
ArrayRCP<gno_t>& Zoltan2::OrderingSolution< lno_t, gno_t >::getGidsRCPConst ( ) const
inline

Get (local) permuted GIDs by const RCP.

Definition at line 180 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
ArrayRCP<lno_t>& Zoltan2::OrderingSolution< lno_t, gno_t >::getPermutationRCPConst ( bool  inverse = false) const
inline

Get (local) permutation by const RCP. If inverse = true, return inverse permutation. By default, perm[i] is where new index i can be found in the old ordering. When inverse==true, perm[i] is where old index i can be found in the new ordering.

Definition at line 190 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
gno_t* Zoltan2::OrderingSolution< lno_t, gno_t >::getGids ( )
inline

Get pointer to (local) GIDs.

Definition at line 200 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
lno_t* Zoltan2::OrderingSolution< lno_t, gno_t >::getPermutation ( bool  inverse = false)
inline

Get pointer to (local) permutation. If inverse = true, return inverse permutation. By default, perm[i] is where new index i can be found in the old ordering. When inverse==true, perm[i] is where old index i can be found in the new ordering.

Definition at line 210 of file Zoltan2_OrderingSolution.hpp.

Member Data Documentation

template<typename lno_t , typename gno_t >
size_t Zoltan2::OrderingSolution< lno_t, gno_t >::perm_size_
protected

Definition at line 221 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
ArrayRCP<gno_t> Zoltan2::OrderingSolution< lno_t, gno_t >::gids_
protected

Definition at line 222 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
bool Zoltan2::OrderingSolution< lno_t, gno_t >::havePerm_
protected

Definition at line 224 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
bool Zoltan2::OrderingSolution< lno_t, gno_t >::haveInverse_
protected

Definition at line 225 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
ArrayRCP<lno_t> Zoltan2::OrderingSolution< lno_t, gno_t >::perm_
protected

Definition at line 226 of file Zoltan2_OrderingSolution.hpp.

template<typename lno_t , typename gno_t >
ArrayRCP<lno_t> Zoltan2::OrderingSolution< lno_t, gno_t >::invperm_
protected

Definition at line 227 of file Zoltan2_OrderingSolution.hpp.


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