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

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

#include <Zoltan2_PartitioningSolutionQuality.hpp>

Public Member Functions

 PartitioningSolutionQuality (const RCP< const Environment > &env, const RCP< const Comm< int > > &problemComm, const RCP< const Adapter > &ia, const RCP< const PartitioningSolution< Adapter > > &soln)
 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...
 

Detailed Description

template<typename Adapter>
class Zoltan2::PartitioningSolutionQuality< 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_PartitioningSolutionQuality.hpp.

Constructor & Destructor Documentation

template<typename Adapter >
Zoltan2::PartitioningSolutionQuality< Adapter >::PartitioningSolutionQuality ( const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  problemComm,
const RCP< const Adapter > &  ia,
const RCP< const PartitioningSolution< Adapter > > &  soln 
)

Constructor.

Parameters
envthe problem environment
problemCommthe problem communicator
iathe problem input adapter
solnthe solution

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

Definition at line 211 of file Zoltan2_PartitioningSolutionQuality.hpp.

Member Function Documentation

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

Return the metric values.

Parameters
valueson return is the array of values.

Definition at line 102 of file Zoltan2_PartitioningSolutionQuality.hpp.

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

Return the object count imbalance.

Parameters
imbalanceon return is the object count imbalance.

Definition at line 111 of file Zoltan2_PartitioningSolutionQuality.hpp.

template<typename Adapter >
void Zoltan2::PartitioningSolutionQuality< 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 120 of file Zoltan2_PartitioningSolutionQuality.hpp.

template<typename Adapter >
void Zoltan2::PartitioningSolutionQuality< 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 133 of file Zoltan2_PartitioningSolutionQuality.hpp.

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

Print all the metrics.

Definition at line 145 of file Zoltan2_PartitioningSolutionQuality.hpp.


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