13 #ifndef ZOLTAN2_GRAPHCMETRICS_HPP
14 #define ZOLTAN2_GRAPHCMETRICS_HPP
20 #define GRAPH_METRICS_TYPE_NAME "GraphMetrics"
25 template <
typename scalar_t>
42 virtual void printLine(std::ostream &os)
const;
67 template <
typename scalar_t>
71 template <
typename scalar_t>
77 template <
typename scalar_t>
80 os << std::setw(20) <<
" ";
81 os << std::setw(12) <<
"total" << std::setw(12) <<
"max";
85 template <
typename scalar_t>
88 std::string label( this->getName() );
90 os << std::setw(20) << label;
91 os << std::setw(12) << std::setprecision(4) << this->getMetricValue(
"global sum");
92 os << std::setw(12) << std::setprecision(4) << this->getMetricValue(
"global maximum");
virtual const std::vector< std::string > & getMetrics() const
virtual void printLine(std::ostream &os) const
Print a standard line of data that fits under the header.
GraphMetrics()
Constructor.
static void printHeader(std::ostream &os)
Print a standard header.
GraphMetrics(std::string mname)
Constructor.
virtual const std::string & getMetricType() const
Get the class type of the metric.
scalar_t getMetricValue(const std::string &metric_name) const
static std::string static_metricTypeName_
void setMetricValue(const std::string &metric_name, scalar_t value) const
void setGlobalMax(scalar_t x)
Set the global maximum across parts.
void setValue(int enumIndex, scalar_t value)
#define GRAPH_METRICS_TYPE_NAME
void setGlobalSum(scalar_t x)
Set the global sum.
scalar_t getGlobalSum() const
Get the global sum of edge cuts for all parts.
static std::vector< std::string > static_metricNames_
Defines the GraphModel interface.
scalar_t getGlobalMax() const
Get the global maximum of edge cuts per part across all parts.