Zoltan2 Version of the Day
Public Member Functions
Zoltan2::PartitioningSolutionQuality< Adapter > Class Template Reference

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

#include <Zoltan2_PartitioningSolutionQuality.hpp>

List of all members.

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.
ArrayRCP< const MetricValues
< scalar_t > > 
getMetrics () const
 Return the metric values.
void getObjectCountImbalance (scalar_t &imbalance) const
 Return the object count imbalance.
void getNormedImbalance (scalar_t &imbalance) const
 Return the object normed weight imbalance.
void getWeightImbalance (scalar_t &imbalance, int dim=0) const
 Return the imbalance for the requested weight dimension.
void printMetrics (ostream &os) const
 Print all the metrics.

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 151 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 109 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 118 of file Zoltan2_PartitioningSolutionQuality.hpp.

template<typename Adapter >
void Zoltan2::PartitioningSolutionQuality< Adapter >::getWeightImbalance ( scalar_t &  imbalance,
int  dim = 0 
) const [inline]

Return the imbalance for the requested weight dimension.

Parameters:
imbalanceon return is the requested value.
dimis the weight dimension 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 131 of file Zoltan2_PartitioningSolutionQuality.hpp.

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

Print all the metrics.

Definition at line 143 of file Zoltan2_PartitioningSolutionQuality.hpp.


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