Zoltan2
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Zoltan2::MetricValues< scalar_t > Class Template Reference

A class containing the metrics for one measurable item. More...

#include <Zoltan2_Metric.hpp>

Public Types

Public Member Functions

void printLine (std::ostream &os) const
 Print a standard line of data that fits under the header. More...
 
 MetricValues (std::string mname)
 Constructor. More...
 
 MetricValues ()
 Constructor. More...
 
void setName (std::string name)
 Set or reset the name. More...
 
void setNorm (multiCriteriaNorm normVal)
 Set or reset the norm. More...
 
void setLocalSum (scalar_t x)
 Set the sum on the local process. More...
 
void setGlobalSum (scalar_t x)
 Set the global sum. More...
 
void setGlobalMin (scalar_t x)
 Set the global minimum across parts. More...
 
void setGlobalMax (scalar_t x)
 Set the global maximum across parts. More...
 
void setGlobalAvg (scalar_t x)
 Set the global average (sum / numParts). More...
 
void setMinImbalance (scalar_t x)
 Set the imbalance of the least imbalanced part. More...
 
void setMaxImbalance (scalar_t x)
 Set the imbalance of the worst imbalanced part. This is what we normally call the imbalance of a partition. More...
 
void setAvgImbalance (scalar_t x)
 Set the average imbalance of all parts. More...
 
const std::string & getName () const
 Get the name of the item measured. More...
 
multiCriteriaNorm getNorm ()
 Get the norm. More...
 
scalar_t getLocalSum () const
 Get the sum on the local process. More...
 
scalar_t getGlobalSum () const
 Get the global sum for all parts. More...
 
scalar_t getGlobalMin () const
 Get the global minimum across all parts. More...
 
scalar_t getGlobalMax () const
 Get the global maximum across all parts. More...
 
scalar_t getGlobalAvg () const
 Get the average of the sum over all parts. More...
 
scalar_t getMinImbalance () const
 Get the imbalance of the least imbalanced part. More...
 
scalar_t getMaxImbalance () const
 Get the imbalance of the most imbalanced part. This is what we normally call the imbalance of a partition. More...
 
scalar_t getAvgImbalance () const
 Get the average of the part imbalances. More...
 

Static Public Member Functions

static void printHeader (std::ostream &os)
 Print a standard header. More...
 

Detailed Description

template<typename scalar_t>
class Zoltan2::MetricValues< scalar_t >

A class containing the metrics for one measurable item.

Definition at line 75 of file Zoltan2_Metric.hpp.

Member Enumeration Documentation

template<typename scalar_t>
enum Zoltan2::MetricValues::metricOffset

Enumerator for offsets into metric data.

When part sizes are all uniform, it is sufficient to look at totals per part. For non-uniform part sizes, the total is not really significant, but rather the min, max and average part imbalances. We provide both types of metrics.

Enumerator
evalLocalSum 

the total on this process

evalGlobalSum 

the global total on all parts

evalGlobalMin 

the minimum across all parts

evalGlobalMax 

the maximum across all parts

evalGlobalAvg 

the global sum divided by the number of parts

evalMinImbalance 

the imbalance of best balanced part

evalAvgImbalance 

the average of the part imbalances

evalMaxImbalance 

the worst, which is the overall imbalance

evalNumMetrics 

the number of metric values_

Definition at line 96 of file Zoltan2_Metric.hpp.

Constructor & Destructor Documentation

template<typename scalar_t>
Zoltan2::MetricValues< scalar_t >::MetricValues ( std::string  mname)
inline

Constructor.

Definition at line 121 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
Zoltan2::MetricValues< scalar_t >::MetricValues ( )
inline

Constructor.

Definition at line 126 of file Zoltan2_Metric.hpp.

Member Function Documentation

template<typename scalar_t >
void Zoltan2::MetricValues< scalar_t >::printHeader ( std::ostream &  os)
static

Print a standard header.

Todo:
This method is static and the header is the same for every type of MetricValues object. But when we add metrics for graph and hypergraph, we may need to look at which type of metric are set in order to decide what header to print. So it would be a member method instead of static.

Definition at line 296 of file Zoltan2_Metric.hpp.

template<typename scalar_t >
void Zoltan2::MetricValues< scalar_t >::printLine ( std::ostream &  os) const

Print a standard line of data that fits under the header.

Definition at line 260 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setName ( std::string  name)
inline

Set or reset the name.

Definition at line 131 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setNorm ( multiCriteriaNorm  normVal)
inline

Set or reset the norm.

Definition at line 134 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setLocalSum ( scalar_t  x)
inline

Set the sum on the local process.

Definition at line 138 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setGlobalSum ( scalar_t  x)
inline

Set the global sum.

Definition at line 141 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setGlobalMin ( scalar_t  x)
inline

Set the global minimum across parts.

Definition at line 144 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setGlobalMax ( scalar_t  x)
inline

Set the global maximum across parts.

Definition at line 147 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setGlobalAvg ( scalar_t  x)
inline

Set the global average (sum / numParts).

Definition at line 150 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setMinImbalance ( scalar_t  x)
inline

Set the imbalance of the least imbalanced part.

Definition at line 153 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setMaxImbalance ( scalar_t  x)
inline

Set the imbalance of the worst imbalanced part. This is what we normally call the imbalance of a partition.

Definition at line 158 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
void Zoltan2::MetricValues< scalar_t >::setAvgImbalance ( scalar_t  x)
inline

Set the average imbalance of all parts.

Definition at line 161 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
const std::string& Zoltan2::MetricValues< scalar_t >::getName ( ) const
inline

Get the name of the item measured.

Definition at line 164 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
multiCriteriaNorm Zoltan2::MetricValues< scalar_t >::getNorm ( )
inline

Get the norm.

Definition at line 167 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getLocalSum ( ) const
inline

Get the sum on the local process.

Definition at line 170 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getGlobalSum ( ) const
inline

Get the global sum for all parts.

Definition at line 173 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getGlobalMin ( ) const
inline

Get the global minimum across all parts.

Definition at line 176 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getGlobalMax ( ) const
inline

Get the global maximum across all parts.

Definition at line 179 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getGlobalAvg ( ) const
inline

Get the average of the sum over all parts.

Definition at line 182 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getMinImbalance ( ) const
inline

Get the imbalance of the least imbalanced part.

Definition at line 185 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getMaxImbalance ( ) const
inline

Get the imbalance of the most imbalanced part. This is what we normally call the imbalance of a partition.

Definition at line 190 of file Zoltan2_Metric.hpp.

template<typename scalar_t>
scalar_t Zoltan2::MetricValues< scalar_t >::getAvgImbalance ( ) const
inline

Get the average of the part imbalances.

Definition at line 193 of file Zoltan2_Metric.hpp.


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