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;
71 typedef typename Adapter::lno_t
lno_t;
72 typedef typename Adapter::gno_t
gno_t;
76 const RCP<Teuchos::ParameterList> &pl__,
77 const RCP<
const Teuchos::Comm<int> > &comm__
78 ) : model(model__), pl(pl__), comm(comm__)
96 const size_t n = model->getLocalNumIdentifiers();
98 perm = (
lno_t *) (solution->getPermutationRCP().getRawPtr());
100 for (
size_t i=0; i<n; i++){
110 for (
lno_t i=n-1; i>0; i--){
119 solution->setHavePerm(
true);
Defines the OrderingSolution class.
Defines the IdentifierModel interface.
Algorithm defines the base class for all algorithms.
IdentifierModel defines the interface for all identifier models.
The class containing ordering solutions.
AlgRandom(const RCP< IdentifierModel< Adapter > > &model__, const RCP< Teuchos::ParameterList > &pl__, const RCP< const Teuchos::Comm< int > > &comm__)
int order(const RCP< OrderingSolution< lno_t, gno_t > > &solution)
Ordering method.