Zoltan2
Public Member Functions | List of all members
Zoltan2::EvaluatePartition< Adapter > Class Template Reference

A class that computes and returns quality metrics. More...

#include <Zoltan2_EvaluatePartition.hpp>

Public Member Functions

 EvaluatePartition (const RCP< const Environment > &env, const RCP< const Comm< int > > &problemComm, const RCP< const typename Adapter::base_adapter_t > &ia, const RCP< const PartitioningSolution< Adapter > > &soln, bool useDegreeAsWeight, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel=Teuchos::null)
 Constructor. More...
 
 EvaluatePartition (const RCP< const Environment > &env, const RCP< const Comm< int > > &problemComm, const RCP< const typename Adapter::base_adapter_t > &ia, const RCP< const PartitioningSolution< Adapter > > &soln, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel=Teuchos::null)
 Constructor. More...
 
ArrayRCP< const MetricValues< scalar_t > > getMetrics () const
 Return the metric values. More...
 
void getObjectCountImbalance (scalar_t &imbalance) const
 Return the object count imbalance. More...
 
void getNormedImbalance (scalar_t &imbalance) const
 Return the object normed weight imbalance. More...
 
void getWeightImbalance (scalar_t &imbalance, int idx=0) const
 Return the imbalance for the requested weight. More...
 
void printMetrics (std::ostream &os) const
 Print all the metrics. More...
 
ArrayRCP< const GraphMetricValues< scalar_t > > getGraphMetrics () const
 Return the graph metric values. More...
 
void getWeightCut (scalar_t &cut, int idx=0) const
 Return the max cut for the requested weight. More...
 
void printGraphMetrics (std::ostream &os) const
 Print all the metrics. More...
 

Detailed Description

template<typename Adapter>
class Zoltan2::EvaluatePartition< Adapter >

A class that computes and returns quality metrics.

Todo:

For some problems it will be necessary to build the Model again in order to compute metrics. For now we don't have any problems like that.

write a unit test for this class

Definition at line 66 of file Zoltan2_EvaluatePartition.hpp.

Constructor & Destructor Documentation

template<typename Adapter >
Zoltan2::EvaluatePartition< Adapter >::EvaluatePartition ( const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  problemComm,
const RCP< const typename Adapter::base_adapter_t > &  ia,
const RCP< const PartitioningSolution< Adapter > > &  soln,
bool  useDegreeAsWeight,
const RCP< const GraphModel< typename Adapter::base_adapter_t > > &  graphModel = Teuchos::null 
)

Constructor.

Parameters
envthe problem environment
problemCommthe problem communicator
iathe problem input adapter
solnthe solution
useDegreeAsWeightwhether to use vertex degree as vertex weight
graphModelthe graph model

The constructor does global communication to compute the metrics. The rest of the methods are local.

Definition at line 209 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
Zoltan2::EvaluatePartition< Adapter >::EvaluatePartition ( const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  problemComm,
const RCP< const typename Adapter::base_adapter_t > &  ia,
const RCP< const PartitioningSolution< Adapter > > &  soln,
const RCP< const GraphModel< typename Adapter::base_adapter_t > > &  graphModel = Teuchos::null 
)

Constructor.

Parameters
envthe problem environment
problemCommthe problem communicator
iathe problem input adapter
solnthe solution
graphModelthe graph model

The constructor does global communication to compute the graph metrics. The rest of the methods are local.

Definition at line 254 of file Zoltan2_EvaluatePartition.hpp.

Member Function Documentation

template<typename Adapter >
ArrayRCP<const MetricValues<scalar_t> > Zoltan2::EvaluatePartition< Adapter >::getMetrics ( ) const
inline

Return the metric values.

Parameters
valueson return is the array of values.

Definition at line 127 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
void Zoltan2::EvaluatePartition< Adapter >::getObjectCountImbalance ( scalar_t &  imbalance) const
inline

Return the object count imbalance.

Parameters
imbalanceon return is the object count imbalance.

Definition at line 136 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
void Zoltan2::EvaluatePartition< Adapter >::getNormedImbalance ( scalar_t &  imbalance) const
inline

Return the object normed weight imbalance.

Parameters
imbalanceon return is the object normed weight imbalance. If there were no weights, this is the object count imbalance. If there was one weight, it is the imbalance with respect to that weight.

Definition at line 145 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
void Zoltan2::EvaluatePartition< Adapter >::getWeightImbalance ( scalar_t &  imbalance,
int  idx = 0 
) const
inline

Return the imbalance for the requested weight.

Parameters
imbalanceon return is the requested value.
idxis the weight index requested, ranging from zero to one less than the number of weights provided in the input. If there were no weights, this is the object count imbalance.

Definition at line 158 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
void Zoltan2::EvaluatePartition< Adapter >::printMetrics ( std::ostream &  os) const
inline

Print all the metrics.

Definition at line 170 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
ArrayRCP<const GraphMetricValues<scalar_t> > Zoltan2::EvaluatePartition< Adapter >::getGraphMetrics ( ) const
inline

Return the graph metric values.

Parameters
valueson return is the array of values.

Definition at line 179 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
void Zoltan2::EvaluatePartition< Adapter >::getWeightCut ( scalar_t &  cut,
int  idx = 0 
) const
inline

Return the max cut for the requested weight.

Parameters
cuton return is the requested value.
idxis the weight index reqested, ranging from zero to one less than the number of weights provided in the input. If there were no weights, this is the cut count.

Definition at line 190 of file Zoltan2_EvaluatePartition.hpp.

template<typename Adapter >
void Zoltan2::EvaluatePartition< Adapter >::printGraphMetrics ( std::ostream &  os) const
inline

Print all the metrics.

Definition at line 201 of file Zoltan2_EvaluatePartition.hpp.


The documentation for this class was generated from the following file: