Zoltan2 Version of the Day
Classes | Namespaces | Functions
Zoltan2_Metric.hpp File Reference

Metric class and namespace methods to compute quality metrics. More...

#include <Zoltan2_StridedData.hpp>
#include <Zoltan2_PartitioningSolution.hpp>
#include <Epetra_SerialDenseVector.h>
#include <cmath>
#include <iomanip>
#include <iostream>
Include dependency graph for Zoltan2_Metric.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Zoltan2::MetricValues< scalar_t >
 A class containing the metrics for one measurable item. More...

Namespaces

namespace  Zoltan2

Functions

template<typename scalar_t >
void Zoltan2::getStridedStats (const ArrayView< scalar_t > &v, int stride, int offset, scalar_t &min, scalar_t &max, scalar_t &sum)
 Find min, max and sum of metric values.
template<typename scalar_t , typename pnum_t , typename lno_t >
void Zoltan2::normedPartWeights (const RCP< const Environment > &env, int numberOfParts, const ArrayView< const pnum_t > &parts, const ArrayView< StridedData< lno_t, scalar_t > > &vwgts, multiCriteriaNorm mcNorm, scalar_t *weights)
 Compute the total weight in each part on this process.
template<typename scalar_t , typename pnum_t , typename lno_t >
void Zoltan2::globalSumsByPart (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, const ArrayView< const pnum_t > &part, const ArrayView< StridedData< lno_t, scalar_t > > &vwgts, multiCriteriaNorm mcNorm, partId_t &numParts, partId_t &numNonemptyParts, ArrayRCP< MetricValues< scalar_t > > &metrics, ArrayRCP< scalar_t > &globalSums)
 Given the local partitioning, compute the global sums in each part.
template<typename scalar_t >
void Zoltan2::computeImbalances (partId_t numParts, partId_t targetNumParts, const scalar_t *psizes, scalar_t sumVals, const scalar_t *vals, scalar_t &min, scalar_t &max, scalar_t &avg)
 Compute the imbalance.
template<typename scalar_t >
void Zoltan2::computeImbalances (partId_t numParts, partId_t targetNumParts, int numSizes, ArrayView< ArrayRCP< scalar_t > > psizes, scalar_t sumVals, const scalar_t *vals, scalar_t &min, scalar_t &max, scalar_t &avg)
 Compute the imbalance in the case of multiple part sizes.
template<typename Adapter >
void Zoltan2::objectMetrics (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, multiCriteriaNorm mcNorm, const RCP< const Adapter > &ia, const RCP< const PartitioningSolution< Adapter > > &solution, partId_t &numParts, partId_t &numNonemptyParts, ArrayRCP< MetricValues< typename Adapter::scalar_t > > &metrics)
 Compute imbalance metrics for a distribution.
template<typename scalar_t >
void Zoltan2::printMetrics (ostream &os, partId_t targetNumParts, partId_t numParts, partId_t numNonemptyParts, const ArrayView< MetricValues< scalar_t > > &infoList)
 Print out a header and the values for a list of metrics.
template<typename scalar_t >
void Zoltan2::printMetrics (ostream &os, partId_t targetNumParts, partId_t numParts, partId_t numNonemptyParts, const MetricValues< scalar_t > &info)
 Print out a header and the values for a single metric.
template<typename scalar_t >
scalar_t Zoltan2::normedWeight (ArrayView< scalar_t > weights, multiCriteriaNorm norm)
 Compute the norm of the vector of weights.
template<typename lno_t , typename scalar_t >
scalar_t Zoltan2::normedWeight (ArrayView< StridedData< lno_t, scalar_t > > weights, lno_t idx, multiCriteriaNorm norm)
 Compute the norm of the vector of weights stored as StridedData.

Detailed Description

Metric class and namespace methods to compute quality metrics.

Todo:
Add graph and hypergraph metrics.

Definition in file Zoltan2_Metric.hpp.