10 #ifndef _ZOLTAN2_ALGRANDOM_HPP_
11 #define _ZOLTAN2_ALGRANDOM_HPP_
25 template <
typename Adapter>
30 const RCP<const typename Adapter::base_adapter_t> adapter;
31 const RCP<Teuchos::ParameterList> pl;
32 const RCP<const Teuchos::Comm<int> > comm;
33 const RCP<const Environment> env;
41 const RCP<const typename Adapter::base_adapter_t> &adapter__,
42 const RCP<Teuchos::ParameterList> &pl__,
43 const RCP<
const Teuchos::Comm<int> > &comm__,
44 const RCP<const Environment> &env__
45 ) : adapter(adapter__), pl(pl__), comm(comm__), env(env__)
51 throw std::logic_error(
"AlgRandom does not yet support global ordering.");
70 const size_t n = model->getLocalNumIdentifiers();
72 perm = (
lno_t *) (solution->getPermutationRCP().getRawPtr());
74 for (
size_t i=0; i<n; i++){
84 for (
lno_t i=n-1; i>0; i--){
93 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.