45 #ifndef _ZOLTAN2_ALGRANDOM_HPP_
46 #define _ZOLTAN2_ALGRANDOM_HPP_
60 template <
typename Adapter>
65 const RCP<const typename Adapter::base_adapter_t> adapter;
66 const RCP<Teuchos::ParameterList> pl;
67 const RCP<const Teuchos::Comm<int> > comm;
68 const RCP<const Environment> env;
76 const RCP<const typename Adapter::base_adapter_t> &adapter__,
77 const RCP<Teuchos::ParameterList> &pl__,
78 const RCP<
const Teuchos::Comm<int> > &comm__,
79 const RCP<const Environment> &env__
80 ) : adapter(adapter__), pl(pl__), comm(comm__), env(env__)
86 throw std::logic_error(
"AlgRandom does not yet support global ordering.");
105 const size_t n = model->getLocalNumIdentifiers();
107 perm = (
lno_t *) (solution->getPermutationRCP().getRawPtr());
109 for (
size_t i=0; i<n; i++){
119 for (
lno_t i=n-1; i>0; i--){
128 solution->setHavePerm(
true);
std::bitset< NUM_MODEL_FLAGS > modelFlag_t
map_t::global_ordinal_type gno_t
Defines the OrderingSolution class.
Defines the IdentifierModel interface.
AlgRandom(const RCP< const typename Adapter::base_adapter_t > &adapter__, const RCP< Teuchos::ParameterList > &pl__, const RCP< const Teuchos::Comm< int > > &comm__, const RCP< const Environment > &env__)
Algorithm defines the base class for all algorithms.
map_t::local_ordinal_type lno_t
int localOrder(const RCP< LocalOrderingSolution< lno_t > > &solution)
Ordering method.
IdentifierModel defines the interface for all identifier models.
int globalOrder(const RCP< GlobalOrderingSolution< gno_t > > &)
Ordering method.