Zoltan2
|
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... | |
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_EvaluatePartition.hpp.
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.
env | the problem environment |
problemComm | the problem communicator |
ia | the problem input adapter |
soln | the solution |
useDegreeAsWeight | whether to use vertex degree as vertex weight |
graphModel | the 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.
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.
env | the problem environment |
problemComm | the problem communicator |
ia | the problem input adapter |
soln | the solution |
graphModel | the 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.
|
inline |
Return the metric values.
values | on return is the array of values. |
Definition at line 127 of file Zoltan2_EvaluatePartition.hpp.
|
inline |
Return the object count imbalance.
imbalance | on return is the object count imbalance. |
Definition at line 136 of file Zoltan2_EvaluatePartition.hpp.
|
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 145 of file Zoltan2_EvaluatePartition.hpp.
|
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 158 of file Zoltan2_EvaluatePartition.hpp.
|
inline |
Print all the metrics.
Definition at line 170 of file Zoltan2_EvaluatePartition.hpp.
|
inline |
Return the graph metric values.
values | on return is the array of values. |
Definition at line 179 of file Zoltan2_EvaluatePartition.hpp.
|
inline |
Return the max cut for the requested weight.
cut | on return is the requested value. |
idx | is 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.
|
inline |
Print all the metrics.
Definition at line 201 of file Zoltan2_EvaluatePartition.hpp.