14 #ifndef _ZOLTAN2_ORDERINGSOLUTION_HPP_
15 #define _ZOLTAN2_ORDERINGSOLUTION_HPP_
33 template <
typename index_t>
139 std::cerr <<
"No inverse!" << std::endl;
155 std::cerr <<
"No perm!" << std::endl;
197 index_t *
tree)
const {
238 return const_cast<ArrayRCP<index_t>&
> (
invperm_);
240 return const_cast<ArrayRCP<index_t>&
> (
perm_);
269 return perm_.getRawPtr();
313 for (
size_t i = 0; i < n; i++) {
317 for (
size_t i = 0; i < n; i++) {
318 if ( (
perm_[i] < 0) || (
perm_[i] >= static_cast<index_t>(n)) )
325 for (
size_t i = 0; i < n; i++) {
349 template <
typename lno_t>
356 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.
map_t::global_ordinal_type gno_t
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.
map_t::local_ordinal_type lno_t
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?