50 #ifndef _ZOLTAN2_ORDERINGSOLUTION_HPP_
51 #define _ZOLTAN2_ORDERINGSOLUTION_HPP_
69 template <
typename index_t>
175 std::cerr <<
"No inverse!" << std::endl;
191 std::cerr <<
"No perm!" << std::endl;
233 index_t *
tree)
const {
274 return const_cast<ArrayRCP<index_t>&
> (
invperm_);
276 return const_cast<ArrayRCP<index_t>&
> (
perm_);
305 return perm_.getRawPtr();
349 for (
size_t i = 0; i < n; i++) {
353 for (
size_t i = 0; i < n; i++) {
354 if ( (
perm_[i] < 0) || (
perm_[i] >= static_cast<index_t>(n)) )
361 for (
size_t i = 0; i < n; i++) {
385 template <
typename lno_t>
392 template <
typename gno_t>
void setHaveSeparator(bool status)
set all separator flags.
ArrayRCP< index_t > invperm_
void setNumSeparatorBlocks(index_t nblks)
Set number of separator column blocks.
ArrayRCP< index_t > perm_
Defines the Solution base class.
ArrayRCP< index_t > & getPermutationRCPConst(bool inverse=false) const
Get (local) permuted GIDs by const RCP.
ArrayRCP< index_t > & getSeparatorRangeRCPConst() const
Get separator range by const RCP.
Just a placeholder for now.
ArrayRCP< index_t > separatorRange_
bool havePerm() const
Do we have the direct permutation?
bool haveSeparatorRange() const
Do we have the separator range?
const ArrayRCP< index_t > & getSeparatorTreeRCP() const
Get (local) separator tree by RCP.
void computePerm()
Compute direct permutation from inverse.
index_t & NumSeparatorBlocks()
Get reference to separator column block.
ArrayRCP< index_t > separatorTree_
void setHaveSeparatorTree(bool status)
Set haveSeparatorTree (intended for ordering algorithms only)
void setHaveSeparatorRange(bool status)
Set haveSeparatorRange (intended for ordering algorithms only)
size_t getPermutationSize() const
Get (local) size of permutation.
const ArrayRCP< index_t > & getPermutationRCP(bool inverse=false) const
Get (local) permuted GIDs by RCP.
index_t getNumSeparatorBlocks() const
Get number of separator column blocks.
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.
const ArrayRCP< index_t > & getSeparatorRangeRCP() const
Get (local) separator range by RCP.
bool getVertexSeparator(index_t &numBlocks, index_t *range, index_t *tree) const
return vertex separator variables by reference.
bool haveSeparators() const
Do we have the separators?
OrderingSolution(index_t perm_size)
Constructor allocates memory for the solution.
index_t * getSeparatorRangeView() const
Get pointer to separator range.
void setHavePerm(bool status)
Set havePerm (intended for ordering algorithms only)
int validatePerm()
returns 0 if permutation is valid, negative if invalid.
void setHaveInverse(bool status)
Set haveInverse (intended for ordering algorithms only)
GlobalOrderingSolution(gno_t perm_size)
bool haveSeparatorTree() const
Do we have the separator tree?
Gathering definitions used in software development.
LocalOrderingSolution(lno_t perm_size)
index_t * getSeparatorTreeView() const
Get pointer to separator tree.
The class containing ordering solutions.
index_t separatorColBlocks_
void computeInverse()
Compute inverse permutation.
ArrayRCP< index_t > & getSeparatorTreeRCPConst() const
Get separator tree by const RCP.
bool haveInverse() const
Do we have the inverse permutation?