50#ifndef _ZOLTAN2_ORDERINGSOLUTION_HPP_
51#define _ZOLTAN2_ORDERINGSOLUTION_HPP_
69template <
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++) {
385template <
typename lno_t>
392template <
typename gno_t>
Defines the Solution base class.
Gathering definitions used in software development.
GlobalOrderingSolution(gno_t perm_size)
LocalOrderingSolution(lno_t perm_size)
The class containing ordering solutions.
ArrayRCP< index_t > separatorRange_
ArrayRCP< index_t > separatorTree_
bool getVertexSeparator(index_t &numBlocks, index_t *range, index_t *tree) const
return vertex separator variables by reference.
index_t separatorColBlocks_
index_t * getSeparatorRangeView() const
Get pointer to separator range.
ArrayRCP< index_t > & getPermutationRCPConst(bool inverse=false) const
Get (local) permuted GIDs by const RCP.
void setNumSeparatorBlocks(index_t nblks)
Set number of separator column blocks.
bool haveSeparators() const
Do we have the separators?
ArrayRCP< index_t > perm_
index_t getNumSeparatorBlocks() const
Get number of separator column blocks.
void setHavePerm(bool status)
Set havePerm (intended for ordering algorithms only)
index_t & NumSeparatorBlocks()
Get reference to separator column block.
ArrayRCP< index_t > invperm_
void setHaveInverse(bool status)
Set haveInverse (intended for ordering algorithms only)
const ArrayRCP< index_t > & getSeparatorRangeRCP() const
Get (local) separator range by RCP.
int validatePerm()
returns 0 if permutation is valid, negative if invalid.
bool haveSeparatorTree() const
Do we have the separator tree?
bool haveSeparatorRange() const
Do we have the separator range?
void computeInverse()
Compute inverse permutation.
index_t * getPermutationView(bool inverse=false) const
Get pointer to permutation. If inverse = true, return inverse permutation. By default,...
void computePerm()
Compute direct permutation from inverse.
size_t getPermutationSize() const
Get (local) size of permutation.
const ArrayRCP< index_t > & getSeparatorTreeRCP() const
Get (local) separator tree by RCP.
const ArrayRCP< index_t > & getPermutationRCP(bool inverse=false) const
Get (local) permuted GIDs by RCP.
OrderingSolution(index_t perm_size)
Constructor allocates memory for the solution.
void setHaveSeparatorTree(bool status)
Set haveSeparatorTree (intended for ordering algorithms only)
bool haveInverse() const
Do we have the inverse permutation?
ArrayRCP< index_t > & getSeparatorRangeRCPConst() const
Get separator range by const RCP.
void setHaveSeparator(bool status)
set all separator flags.
bool havePerm() const
Do we have the direct permutation?
index_t * getSeparatorTreeView() const
Get pointer to separator tree.
void setHaveSeparatorRange(bool status)
Set haveSeparatorRange (intended for ordering algorithms only)
ArrayRCP< index_t > & getSeparatorTreeRCPConst() const
Get separator tree by const RCP.
Just a placeholder for now.
map_t::local_ordinal_type lno_t
map_t::global_ordinal_type gno_t
Created by mbenlioglu on Aug 31, 2020.