49#ifndef ZOLTAN2_GRAPHCMETRICS_HPP
50#define ZOLTAN2_GRAPHCMETRICS_HPP
56#define GRAPH_METRICS_TYPE_NAME "GraphMetrics"
61template <
typename scalar_t>
78virtual void printLine(std::ostream &os)
const;
103template <
typename scalar_t>
107template <
typename scalar_t>
113template <
typename scalar_t>
116 os << std::setw(20) <<
" ";
117 os << std::setw(12) <<
"total" << std::setw(12) <<
"max";
121template <
typename scalar_t>
124 std::string label( this->getName() );
126 os << std::setw(20) << label;
127 os << std::setw(12) << std::setprecision(4) << this->getMetricValue(
"global sum");
128 os << std::setw(12) << std::setprecision(4) << this->getMetricValue(
"global maximum");
#define GRAPH_METRICS_TYPE_NAME
Defines the GraphModel interface.
void setMetricValue(const std::string &metric_name, scalar_t value) const
void setValue(int enumIndex, scalar_t value)
scalar_t getMetricValue(const std::string &metric_name) const
static void printHeader(std::ostream &os)
Print a standard header.
scalar_t getGlobalSum() const
Get the global sum of edge cuts for all parts.
static std::string static_metricTypeName_
virtual const std::string & getMetricType() const
Get the class type of the metric.
void setGlobalMax(scalar_t x)
Set the global maximum 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.
static std::vector< std::string > static_metricNames_
virtual const std::vector< std::string > & getMetrics() const
scalar_t getGlobalMax() const
Get the global maximum of edge cuts per part across all parts.
GraphMetrics()
Constructor.
GraphMetrics(std::string mname)
Constructor.
Created by mbenlioglu on Aug 31, 2020.