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 () 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 seperator range? More...
 
void setHaveSeparatorRange (bool status)
 Set haveSeparatorRange (intended for ordering algorithms only) More...
 
bool haveSeparatorTree () const
 Do we have the seperator tree? More...
 
bool haveSeparators () const
 Do we have the seperators? 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 (lno_t nblks)
 Set number of separator column blocks. More...
 
size_t getPermutationSize () const
 Get (local) size of permutation. More...
 
lno_t getNumSeparatorBlocks () const
 Get number of separator column blocks. More...
 
const ArrayRCP< lno_t > & getPermutationRCP (bool inverse=false) const
 Get (local) permuted GIDs by RCP. More...
 
bool getVertexSeparator (lno_t &numBlocks, lno_t *range, lno_t *tree) const
 return vertex separator variables by reference. More...
 
const ArrayRCP< lno_t > & getSeparatorRangeRCP () const
 Get (local) seperator range by RCP. More...
 
const ArrayRCP< lno_t > & getSeparatorTreeRCP () const
 Get (local) seperator tree by RCP. More...
 
ArrayRCP< lno_t > & getPermutationRCPConst (bool inverse=false) const
 Get (local) permuted GIDs by const RCP. More...
 
ArrayRCP< lno_t > & getSeparatorRangeRCPConst () const
 Get (local) seperator range by const RCP. More...
 
ArrayRCP< lno_t > & getSeparatorTreeRCPConst () const
 Get (local) seperator tree by const RCP. More...
 
lno_t * getPermutationView (bool inverse=false) const
 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...
 
lno_t * getSeparatorRangeView () const
 Get pointer to (local) separator range. More...
 
lno_t * getSeparatorTreeView () const
 Get pointer to (local) separator tree. More...
 
lno_t & NumSeparatorBlocks ()
 Get reference to (local) separator column block. More...
 

Protected Attributes

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

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

◆ OrderingSolution()

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

◆ havePerm()

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

Do we have the direct permutation?

Definition at line 97 of file Zoltan2_OrderingSolution.hpp.

◆ setHavePerm()

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

◆ haveInverse()

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

Do we have the inverse permutation?

Definition at line 112 of file Zoltan2_OrderingSolution.hpp.

◆ setHaveInverse()

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

◆ setHaveSeparator()

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

set all separator flags.

Definition at line 126 of file Zoltan2_OrderingSolution.hpp.

◆ haveSeparatorRange()

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

Do we have the seperator range?

Definition at line 134 of file Zoltan2_OrderingSolution.hpp.

◆ setHaveSeparatorRange()

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

Set haveSeparatorRange (intended for ordering algorithms only)

Definition at line 141 of file Zoltan2_OrderingSolution.hpp.

◆ haveSeparatorTree()

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

Do we have the seperator tree?

Definition at line 148 of file Zoltan2_OrderingSolution.hpp.

◆ haveSeparators()

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

Do we have the seperators?

Definition at line 155 of file Zoltan2_OrderingSolution.hpp.

◆ setHaveSeparatorTree()

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

Set haveSeparatorTree (intended for ordering algorithms only)

Definition at line 162 of file Zoltan2_OrderingSolution.hpp.

◆ computePerm()

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

Compute direct permutation from inverse.

Definition at line 169 of file Zoltan2_OrderingSolution.hpp.

◆ computeInverse()

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

Compute inverse permutation.

Definition at line 185 of file Zoltan2_OrderingSolution.hpp.

◆ setNumSeparatorBlocks()

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

Set number of separator column blocks.

Definition at line 201 of file Zoltan2_OrderingSolution.hpp.

◆ getPermutationSize()

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

Get (local) size of permutation.

Definition at line 210 of file Zoltan2_OrderingSolution.hpp.

◆ getNumSeparatorBlocks()

template<typename lno_t , typename gno_t >
lno_t Zoltan2::OrderingSolution< lno_t, gno_t >::getNumSeparatorBlocks ( ) const
inline

Get number of separator column blocks.

Definition at line 214 of file Zoltan2_OrderingSolution.hpp.

◆ getPermutationRCP()

template<typename lno_t , typename gno_t >
const ArrayRCP<lno_t>& Zoltan2::OrderingSolution< lno_t, gno_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 225 of file Zoltan2_OrderingSolution.hpp.

◆ getVertexSeparator()

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

return vertex separator variables by reference.

Definition at line 235 of file Zoltan2_OrderingSolution.hpp.

◆ getSeparatorRangeRCP()

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

Get (local) seperator range by RCP.

Definition at line 251 of file Zoltan2_OrderingSolution.hpp.

◆ getSeparatorTreeRCP()

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

Get (local) seperator tree by RCP.

Definition at line 258 of file Zoltan2_OrderingSolution.hpp.

◆ getPermutationRCPConst()

template<typename lno_t , typename gno_t >
ArrayRCP<lno_t>& Zoltan2::OrderingSolution< lno_t, gno_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 275 of file Zoltan2_OrderingSolution.hpp.

◆ getSeparatorRangeRCPConst()

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

Get (local) seperator range by const RCP.

Definition at line 285 of file Zoltan2_OrderingSolution.hpp.

◆ getSeparatorTreeRCPConst()

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

Get (local) seperator tree by const RCP.

Definition at line 292 of file Zoltan2_OrderingSolution.hpp.

◆ getPermutationView()

template<typename lno_t , typename gno_t >
lno_t* Zoltan2::OrderingSolution< lno_t, gno_t >::getPermutationView ( bool  inverse = false) const
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 303 of file Zoltan2_OrderingSolution.hpp.

◆ getSeparatorRangeView()

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

Get pointer to (local) separator range.

Definition at line 317 of file Zoltan2_OrderingSolution.hpp.

◆ getSeparatorTreeView()

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

Get pointer to (local) separator tree.

Definition at line 327 of file Zoltan2_OrderingSolution.hpp.

◆ NumSeparatorBlocks()

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

Get reference to (local) separator column block.

Definition at line 337 of file Zoltan2_OrderingSolution.hpp.

Member Data Documentation

◆ perm_size_

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

Definition at line 345 of file Zoltan2_OrderingSolution.hpp.

◆ havePerm_

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

Definition at line 347 of file Zoltan2_OrderingSolution.hpp.

◆ haveInverse_

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

Definition at line 348 of file Zoltan2_OrderingSolution.hpp.

◆ haveSeparatorRange_

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

Definition at line 349 of file Zoltan2_OrderingSolution.hpp.

◆ haveSeparatorTree_

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

Definition at line 350 of file Zoltan2_OrderingSolution.hpp.

◆ perm_

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

Definition at line 351 of file Zoltan2_OrderingSolution.hpp.

◆ invperm_

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

Definition at line 352 of file Zoltan2_OrderingSolution.hpp.

◆ separatorRange_

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

Definition at line 353 of file Zoltan2_OrderingSolution.hpp.

◆ separatorTree_

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

Definition at line 354 of file Zoltan2_OrderingSolution.hpp.

◆ separatorColBlocks_

template<typename lno_t , typename gno_t >
lno_t Zoltan2::OrderingSolution< lno_t, gno_t >::separatorColBlocks_
protected

Definition at line 355 of file Zoltan2_OrderingSolution.hpp.


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