Zoltan2
Public Member Functions | Protected Attributes
Zoltan2::OrderingSolution< gid_t, lno_t > Class Template Reference

The class containing ordering solutions. More...

#include <Zoltan2_OrderingSolution.hpp>

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

List of all members.

Public Member Functions

 OrderingSolution (size_t perm_size)
 Constructor allocates memory for the solution.
bool havePerm ()
 Do we have the direct permutation?
void setHavePerm (bool status)
 Set havePerm (intended for ordering algorithms only)
bool haveInverse ()
 Do we have the inverse permutation?
void setHaveInverse (bool status)
 Set haveInverse (intended for ordering algorithms only)
void computePerm ()
 Compute direct permutation from inverse.
void computeInverse ()
 Compute inverse permutation.
size_t getPermutationSize ()
 Get (local) size of permutation.
ArrayRCP< gid_t > & getGidsRCP ()
 Get (local) permuted GIDs by RCP.
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.
ArrayRCP< gid_t > & getGidsRCPConst () const
 Get (local) permuted GIDs by const RCP.
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.
gid_tgetGids ()
 Get pointer to (local) GIDs.
lno_tgetPermutation (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.

Protected Attributes

size_t perm_size_
ArrayRCP< gid_tgids_
bool havePerm_
bool haveInverse_
ArrayRCP< lno_tperm_
ArrayRCP< lno_tinvperm_

Detailed Description

template<typename gid_t, typename lno_t>
class Zoltan2::OrderingSolution< gid_t, lno_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 gid_t , typename lno_t >
Zoltan2::OrderingSolution< gid_t, lno_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 gid_t , typename lno_t >
bool Zoltan2::OrderingSolution< gid_t, lno_t >::havePerm ( ) [inline]

Do we have the direct permutation?

Definition at line 92 of file Zoltan2_OrderingSolution.hpp.

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

Set havePerm (intended for ordering algorithms only)

Definition at line 99 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
bool Zoltan2::OrderingSolution< gid_t, lno_t >::haveInverse ( ) [inline]

Do we have the inverse permutation?

Definition at line 107 of file Zoltan2_OrderingSolution.hpp.

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

Set haveInverse (intended for ordering algorithms only)

Definition at line 114 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
void Zoltan2::OrderingSolution< gid_t, lno_t >::computePerm ( ) [inline]

Compute direct permutation from inverse.

Definition at line 121 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
void Zoltan2::OrderingSolution< gid_t, lno_t >::computeInverse ( ) [inline]

Compute inverse permutation.

Definition at line 137 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
size_t Zoltan2::OrderingSolution< gid_t, lno_t >::getPermutationSize ( ) [inline]

Get (local) size of permutation.

Definition at line 159 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
ArrayRCP<gid_t>& Zoltan2::OrderingSolution< gid_t, lno_t >::getGidsRCP ( ) [inline]

Get (local) permuted GIDs by RCP.

Definition at line 163 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
ArrayRCP<lno_t>& Zoltan2::OrderingSolution< gid_t, lno_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 gid_t , typename lno_t >
ArrayRCP<gid_t>& Zoltan2::OrderingSolution< gid_t, lno_t >::getGidsRCPConst ( ) const [inline]

Get (local) permuted GIDs by const RCP.

Definition at line 180 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
ArrayRCP<lno_t>& Zoltan2::OrderingSolution< gid_t, lno_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 gid_t , typename lno_t >
gid_t* Zoltan2::OrderingSolution< gid_t, lno_t >::getGids ( ) [inline]

Get pointer to (local) GIDs.

Definition at line 200 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
lno_t* Zoltan2::OrderingSolution< gid_t, lno_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 gid_t , typename lno_t >
size_t Zoltan2::OrderingSolution< gid_t, lno_t >::perm_size_ [protected]

Definition at line 221 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
ArrayRCP<gid_t> Zoltan2::OrderingSolution< gid_t, lno_t >::gids_ [protected]

Definition at line 222 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
bool Zoltan2::OrderingSolution< gid_t, lno_t >::havePerm_ [protected]

Definition at line 224 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
bool Zoltan2::OrderingSolution< gid_t, lno_t >::haveInverse_ [protected]

Definition at line 225 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
ArrayRCP<lno_t> Zoltan2::OrderingSolution< gid_t, lno_t >::perm_ [protected]

Definition at line 226 of file Zoltan2_OrderingSolution.hpp.

template<typename gid_t , typename lno_t >
ArrayRCP<lno_t> Zoltan2::OrderingSolution< gid_t, lno_t >::invperm_ [protected]

Definition at line 227 of file Zoltan2_OrderingSolution.hpp.


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