|
Zoltan2
|
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. | |
| 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 idx=0) const |
| Return the imbalance for the requested weight. | |
| void | printMetrics (std::ostream &os) const |
| Print all the metrics. | |
A class that computes and returns quality metrics.
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.
| 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.
| env | the problem environment |
| problemComm | the problem communicator |
| ia | the problem input adapter |
| soln | the solution |
The constructor does global communication to compute the metrics. The rest of the methods are local.
Definition at line 152 of file Zoltan2_PartitioningSolutionQuality.hpp.
| ArrayRCP<const MetricValues<scalar_t> > Zoltan2::PartitioningSolutionQuality< Adapter >::getMetrics | ( | ) | const [inline] |
Return the metric values.
| values | on return is the array of values. |
Definition at line 103 of file Zoltan2_PartitioningSolutionQuality.hpp.
| void Zoltan2::PartitioningSolutionQuality< Adapter >::getObjectCountImbalance | ( | scalar_t & | imbalance | ) | const [inline] |
Return the object count imbalance.
| imbalance | on return is the object count imbalance. |
Definition at line 110 of file Zoltan2_PartitioningSolutionQuality.hpp.
| void Zoltan2::PartitioningSolutionQuality< Adapter >::getNormedImbalance | ( | scalar_t & | imbalance | ) | const [inline] |
Return the object normed weight imbalance.
| imbalance | on 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 119 of file Zoltan2_PartitioningSolutionQuality.hpp.
| void Zoltan2::PartitioningSolutionQuality< Adapter >::getWeightImbalance | ( | scalar_t & | imbalance, |
| int | idx = 0 |
||
| ) | const [inline] |
Return the imbalance for the requested weight.
| imbalance | on return is the requested value. |
| idx | is 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 132 of file Zoltan2_PartitioningSolutionQuality.hpp.
| void Zoltan2::PartitioningSolutionQuality< Adapter >::printMetrics | ( | std::ostream & | os | ) | const [inline] |
Print all the metrics.
Definition at line 144 of file Zoltan2_PartitioningSolutionQuality.hpp.
1.7.6.1