49 #ifndef ZOLTAN2_IMBALANCEMETRICS_HPP 50 #define ZOLTAN2_IMBALANCEMETRICS_HPP 59 template <
typename scalar_t>
79 virtual void printLine(std::ostream &os)
const;
139 template <
typename scalar_t>
150 template <
typename scalar_t>
153 os << std::setw(20) <<
" ";
154 os << std::setw(11) <<
"min" << std::setw(11) <<
"max" << std::setw(11) <<
"avg";
155 os << std::setw(2) <<
" ";
156 os << std::setw(10) <<
"imbalance";
160 template <
typename scalar_t>
163 std::string label( this->getName() );
166 std::ostringstream oss;
169 oss << this->getName() <<
" (1)";
172 oss << this->getName() <<
" (2)";
175 oss << this->getName() <<
" (inf)";
178 oss << this->getName() <<
" (?)";
185 os << std::setw(20) << label;
186 os << std::setw(11) << std::setprecision(4)
187 << this->getMetricValue(
"global minimum");
188 os << std::setw(11) << std::setprecision(4)
189 << this->getMetricValue(
"global maximum");
190 os << std::setw(11) << std::setprecision(4)
191 << this->getMetricValue(
"global average");
193 os << std::setw(2) <<
" ";
194 os << std::setw(10) << std::setprecision(4)
195 << this->getMetricValue(
"maximum imbalance");
scalar_t getGlobalMin() const
Get the global minimum across all parts.
scalar_t getMetricValue(const std::string &metric_name) const
scalar_t getGlobalMax() const
Get the global maximum across all parts.
void setLocalSum(scalar_t x)
Set the sum on the local process.
#define IMBALANCE_METRICS_TYPE_NAME
static std::string static_metricTypeName_
void setGlobalMin(scalar_t x)
Set the global minimum across parts.
void setGlobalSum(scalar_t x)
Set the global sum.
virtual void printLine(std::ostream &os) const
Print a standard line of data that fits under the header.
void setAvgImbalance(scalar_t x)
Set the average imbalance of all parts.
void setMetricValue(const std::string &metric_name, scalar_t value) const
scalar_t getLocalSum() const
Get the sum on the local process.
static void printHeader(std::ostream &os)
Print a standard header.
static std::vector< std::string > static_metricNames_
void setGlobalMax(scalar_t x)
Set the global maximum across parts.
void setMaxImbalance(scalar_t x)
Set the imbalance of the worst imbalanced part. This is what we normally call the imbalance of a part...
void setNorm(multiCriteriaNorm normVal)
Set or reset the norm.
multiCriteriaNorm getNorm()
Get the norm.
multiCriteriaNorm
Enumerator used in code for multicriteria norm choice.
virtual const std::vector< std::string > & getMetrics() const
ImbalanceMetrics()
Constructor.
Defines the GraphModel interface.
scalar_t getAvgImbalance() const
Get the average of the part imbalances.
virtual const std::string & getMetricType() const
Get the class type of the metric.
scalar_t getMaxImbalance() const
Get the imbalance of the most imbalanced part. This is what we normally call the imbalance of a parti...
ImbalanceMetrics(std::string mname)
Constructor.
scalar_t getGlobalSum() const
Get the global sum for all parts.