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.
Just a placeholder for now.
const ArrayRCP< index_t > & getSeparatorRangeRCP() const
Get (local) seperator range by RCP.
ArrayRCP< index_t > separatorRange_
ArrayRCP< index_t > & getSeparatorTreeRCPConst() const
Get seperator tree by const RCP.
bool havePerm() const
Do we have the direct permutation?
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)
bool getVertexSeparator(index_t &numBlocks, index_t *range, index_t *tree) const
return vertex separator variables by reference.
const ArrayRCP< index_t > & getPermutationRCP(bool inverse=false) const
Get (local) permuted GIDs by RCP.
ArrayRCP< index_t > & getPermutationRCPConst(bool inverse=false) const
Get (local) permuted GIDs by const RCP.
ArrayRCP< index_t > & getSeparatorRangeRCPConst() const
Get seperator range by const RCP.
index_t * getSeparatorRangeView() const
Get pointer to separator range.
OrderingSolution(index_t perm_size)
Constructor allocates memory for the solution.
bool haveSeparators() const
Do we have the seperators?
void setHavePerm(bool status)
Set havePerm (intended for ordering algorithms only)
bool haveSeparatorRange() const
Do we have the seperator range?
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)
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.
Gathering definitions used in software development.
size_t getPermutationSize() const
Get (local) size of permutation.
LocalOrderingSolution(lno_t perm_size)
index_t getNumSeparatorBlocks() const
Get number of separator column blocks.
bool haveInverse() const
Do we have the inverse permutation?
The class containing ordering solutions.
const ArrayRCP< index_t > & getSeparatorTreeRCP() const
Get (local) seperator tree by RCP.
index_t separatorColBlocks_
void computeInverse()
Compute inverse permutation.
bool haveSeparatorTree() const
Do we have the seperator tree?
index_t * getSeparatorTreeView() const
Get pointer to separator tree.