45 #ifndef _ZOLTAN2_ALGRANDOM_HPP_
46 #define _ZOLTAN2_ALGRANDOM_HPP_
60 template <
typename Adapter>
65 const RCP<IdentifierModel<Adapter> > model;
66 const RCP<Teuchos::ParameterList> pl;
67 const RCP<const Teuchos::Comm<int> > comm;
76 const RCP<Teuchos::ParameterList> &pl__,
77 const RCP<
const Teuchos::Comm<int> > &comm__
78 ) : model(model__), pl(pl__), comm(comm__)
84 throw std::logic_error(
"AlgRandom does not yet support global ordering.");
101 const size_t n = model->getLocalNumIdentifiers();
103 perm = (
lno_t *) (solution->getPermutationRCP().getRawPtr());
105 for (
size_t i=0; i<n; i++){
115 for (
lno_t i=n-1; i>0; i--){
124 solution->setHavePerm(
true);
Defines the IdentifierModel interface.
Defines the OrderingSolution class.
AlgRandom(const RCP< IdentifierModel< Adapter > > &model__, const RCP< Teuchos::ParameterList > &pl__, const RCP< const Teuchos::Comm< int > > &comm__)
int localOrder(const RCP< LocalOrderingSolution< lno_t > > &solution)
Ordering method.
int globalOrder(const RCP< GlobalOrderingSolution< gno_t > > &)
Ordering method.
Algorithm defines the base class for all algorithms.
IdentifierModel defines the interface for all identifier models.
map_t::local_ordinal_type lno_t
map_t::global_ordinal_type gno_t
Created by mbenlioglu on Aug 31, 2020.