Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Attributes | List of all members
Zoltan2::OrderingSolution< index_t > Class Template Reference

The class containing ordering solutions. More...

#include <Zoltan2_OrderingSolution.hpp>

Inheritance diagram for Zoltan2::OrderingSolution< index_t >:
Inheritance graph
[legend]
Collaboration diagram for Zoltan2::OrderingSolution< index_t >:
Collaboration graph
[legend]

Public Member Functions

 OrderingSolution (index_t perm_size)
 Constructor allocates memory for the solution. More...
 
bool havePerm () const
 Do we have the direct permutation? More...
 
void setHavePerm (bool status)
 Set havePerm (intended for ordering algorithms only) More...
 
bool haveInverse () const
 Do we have the inverse permutation? More...
 
void setHaveInverse (bool status)
 Set haveInverse (intended for ordering algorithms only) More...
 
void setHaveSeparator (bool status)
 set all separator flags. More...
 
bool haveSeparatorRange () const
 Do we have the separator range? More...
 
void setHaveSeparatorRange (bool status)
 Set haveSeparatorRange (intended for ordering algorithms only) More...
 
bool haveSeparatorTree () const
 Do we have the separator tree? More...
 
bool haveSeparators () const
 Do we have the separators? More...
 
void setHaveSeparatorTree (bool status)
 Set haveSeparatorTree (intended for ordering algorithms only) More...
 
void computePerm ()
 Compute direct permutation from inverse. More...
 
void computeInverse ()
 Compute inverse permutation. More...
 
void setNumSeparatorBlocks (index_t nblks)
 Set number of separator column blocks. More...
 
size_t getPermutationSize () const
 Get (local) size of permutation. More...
 
index_t getNumSeparatorBlocks () const
 Get number of separator column blocks. More...
 
const ArrayRCP< index_t > & getPermutationRCP (bool inverse=false) const
 Get (local) permuted GIDs by RCP. More...
 
bool getVertexSeparator (index_t &numBlocks, index_t *range, index_t *tree) const
 return vertex separator variables by reference. More...
 
const ArrayRCP< index_t > & getSeparatorRangeRCP () const
 Get (local) separator range by RCP. More...
 
const ArrayRCP< index_t > & getSeparatorTreeRCP () const
 Get (local) separator tree by RCP. More...
 
ArrayRCP< index_t > & getPermutationRCPConst (bool inverse=false) const
 Get (local) permuted GIDs by const RCP. More...
 
ArrayRCP< index_t > & getSeparatorRangeRCPConst () const
 Get separator range by const RCP. More...
 
ArrayRCP< index_t > & getSeparatorTreeRCPConst () const
 Get separator tree by const RCP. More...
 
index_t * getPermutationView (bool inverse=false) const
 Get pointer to 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...
 
index_t * getSeparatorRangeView () const
 Get pointer to separator range. More...
 
index_t * getSeparatorTreeView () const
 Get pointer to separator tree. More...
 
index_t & NumSeparatorBlocks ()
 Get reference to separator column block. More...
 
int validatePerm ()
 returns 0 if permutation is valid, negative if invalid. More...
 
- Public Member Functions inherited from Zoltan2::Solution
virtual ~Solution ()
 

Protected Attributes

size_t perm_size_
 
bool havePerm_
 
bool haveInverse_
 
bool haveSeparatorRange_
 
bool haveSeparatorTree_
 
ArrayRCP< index_t > perm_
 
ArrayRCP< index_t > invperm_
 
ArrayRCP< index_t > separatorRange_
 
ArrayRCP< index_t > separatorTree_
 
index_t separatorColBlocks_
 

Detailed Description

template<typename index_t>
class Zoltan2::OrderingSolution< index_t >

The class containing ordering solutions.

Template parameters:
\li \c index_t    index type index_t will be lno_t (local) or gno_t (global)

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 34 of file Zoltan2_OrderingSolution.hpp.

Constructor & Destructor Documentation

template<typename index_t>
Zoltan2::OrderingSolution< index_t >::OrderingSolution ( index_t  perm_size)
inline

Constructor allocates memory for the solution.

Definition at line 40 of file Zoltan2_OrderingSolution.hpp.

Member Function Documentation

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::havePerm ( ) const
inline

Do we have the direct permutation?

Definition at line 57 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::setHavePerm ( bool  status)
inline

Set havePerm (intended for ordering algorithms only)

Definition at line 64 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::haveInverse ( ) const
inline

Do we have the inverse permutation?

Definition at line 72 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::setHaveInverse ( bool  status)
inline

Set haveInverse (intended for ordering algorithms only)

Definition at line 79 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::setHaveSeparator ( bool  status)
inline

set all separator flags.

Definition at line 86 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::haveSeparatorRange ( ) const
inline

Do we have the separator range?

Definition at line 94 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::setHaveSeparatorRange ( bool  status)
inline

Set haveSeparatorRange (intended for ordering algorithms only)

Definition at line 101 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::haveSeparatorTree ( ) const
inline

Do we have the separator tree?

Definition at line 108 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::haveSeparators ( ) const
inline

Do we have the separators?

Definition at line 115 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::setHaveSeparatorTree ( bool  status)
inline

Set haveSeparatorTree (intended for ordering algorithms only)

Definition at line 122 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::computePerm ( )
inline

Compute direct permutation from inverse.

Definition at line 129 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::computeInverse ( )
inline

Compute inverse permutation.

Definition at line 145 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
void Zoltan2::OrderingSolution< index_t >::setNumSeparatorBlocks ( index_t  nblks)
inline

Set number of separator column blocks.

Definition at line 161 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
size_t Zoltan2::OrderingSolution< index_t >::getPermutationSize ( ) const
inline

Get (local) size of permutation.

Definition at line 170 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
index_t Zoltan2::OrderingSolution< index_t >::getNumSeparatorBlocks ( ) const
inline

Get number of separator column blocks.

Definition at line 174 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
const ArrayRCP<index_t>& Zoltan2::OrderingSolution< index_t >::getPermutationRCP ( bool  inverse = false) const
inline

Get (local) permuted GIDs by RCP.

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 185 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::getVertexSeparator ( index_t &  numBlocks,
index_t *  range,
index_t *  tree 
) const
inline

return vertex separator variables by reference.

Definition at line 195 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
const ArrayRCP<index_t>& Zoltan2::OrderingSolution< index_t >::getSeparatorRangeRCP ( ) const
inline

Get (local) separator range by RCP.

Definition at line 211 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
const ArrayRCP<index_t>& Zoltan2::OrderingSolution< index_t >::getSeparatorTreeRCP ( ) const
inline

Get (local) separator tree by RCP.

Definition at line 218 of file Zoltan2_OrderingSolution.hpp.

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

Get (local) permuted GIDs by const RCP.

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 235 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
ArrayRCP<index_t>& Zoltan2::OrderingSolution< index_t >::getSeparatorRangeRCPConst ( ) const
inline

Get separator range by const RCP.

Definition at line 245 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
ArrayRCP<index_t>& Zoltan2::OrderingSolution< index_t >::getSeparatorTreeRCPConst ( ) const
inline

Get separator tree by const RCP.

Definition at line 252 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
index_t* Zoltan2::OrderingSolution< index_t >::getPermutationView ( bool  inverse = false) const
inline

Get pointer to 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 263 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
index_t* Zoltan2::OrderingSolution< index_t >::getSeparatorRangeView ( ) const
inline

Get pointer to separator range.

Definition at line 277 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
index_t* Zoltan2::OrderingSolution< index_t >::getSeparatorTreeView ( ) const
inline

Get pointer to separator tree.

Definition at line 287 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
index_t& Zoltan2::OrderingSolution< index_t >::NumSeparatorBlocks ( )
inline

Get reference to separator column block.

Definition at line 297 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
int Zoltan2::OrderingSolution< index_t >::validatePerm ( )
inline

returns 0 if permutation is valid, negative if invalid.

Definition at line 304 of file Zoltan2_OrderingSolution.hpp.

Member Data Documentation

template<typename index_t>
size_t Zoltan2::OrderingSolution< index_t >::perm_size_
protected

Definition at line 337 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::havePerm_
protected

Definition at line 338 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::haveInverse_
protected

Definition at line 339 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::haveSeparatorRange_
protected

Definition at line 340 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
bool Zoltan2::OrderingSolution< index_t >::haveSeparatorTree_
protected

Definition at line 341 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
ArrayRCP<index_t> Zoltan2::OrderingSolution< index_t >::perm_
protected

Definition at line 342 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
ArrayRCP<index_t> Zoltan2::OrderingSolution< index_t >::invperm_
protected

Definition at line 343 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
ArrayRCP<index_t> Zoltan2::OrderingSolution< index_t >::separatorRange_
protected

Definition at line 344 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
ArrayRCP<index_t> Zoltan2::OrderingSolution< index_t >::separatorTree_
protected

Definition at line 345 of file Zoltan2_OrderingSolution.hpp.

template<typename index_t>
index_t Zoltan2::OrderingSolution< index_t >::separatorColBlocks_
protected

Definition at line 346 of file Zoltan2_OrderingSolution.hpp.


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