Zoltan2 Version of the Day
Public Types | Public Member Functions | Static Public Member Functions
Zoltan2::MetricValues< scalar_t > Class Template Reference

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

#include <Zoltan2_Metric.hpp>

List of all members.

Public Types

enum  metricOffset {
  evalLocalSum, evalGlobalSum, evalGlobalMin, evalGlobalMax,
  evalGlobalAvg, evalMinImbalance, evalAvgImbalance, evalMaxImbalance,
  evalNumMetrics
}
 Enumerator for offsets into metric data. More...

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

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

A class containing the metrics for one measurable item.

Definition at line 73 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 94 of file Zoltan2_Metric.hpp.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 119 of file Zoltan2_Metric.hpp.

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

Constructor.

Definition at line 124 of file Zoltan2_Metric.hpp.


Member Function Documentation

template<typename scalar_t >
void Zoltan2::MetricValues< scalar_t >::printHeader ( 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 233 of file Zoltan2_Metric.hpp.

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

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

Definition at line 197 of file Zoltan2_Metric.hpp.

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

Set or reset the name.

Definition at line 129 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 132 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 136 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 139 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 142 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 145 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 148 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 151 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 156 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 159 of file Zoltan2_Metric.hpp.

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

Get the name of the item measured.

Definition at line 162 of file Zoltan2_Metric.hpp.

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

Get the norm.

Definition at line 165 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 168 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 171 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 174 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 177 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 180 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 183 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 188 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 191 of file Zoltan2_Metric.hpp.


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