Skip to content

Class Metric

ClassList > Metric

Base class for all reconstruction-quality metrics. More...

  • #include <Metric.h>

Inherited by the following classes: Argos::BoundingBoxMetric, Argos::CentroidToFaceMetric, EdgeFaceIntersection, FaceCount, Heatmap, Holes, MemoryPeak, MemoryPeakGlobal, VertexCount

Public Functions

Type Name
Metric (const std::string & name)
Construct a metric with the given short label.
virtual void compute (const Mesh & originalMesh, const Mesh & reconstructedMesh, benchmark::State & state) const = 0
Compute the metric for a single (original, reconstructed) pair.
const std::string & getName () const
Return the metric's short label.
virtual ~Metric () = default

Detailed Description

Subclasses implement a single compute call that records one or more counters on a Google Benchmark state.

Public Functions Documentation

function Metric

Construct a metric with the given short label.

inline Metric::Metric (
    const std::string & name
) 

Parameters:

  • name Human-readable name (e.g. "BoundingBox", "Heatmap").

function compute

Compute the metric for a single (original, reconstructed) pair.

virtual void Metric::compute (
    const Mesh & originalMesh,
    const Mesh & reconstructedMesh,
    benchmark::State & state
) const = 0

Implementations should record their values on state.counters.

Parameters:

  • originalMesh Ground-truth mesh.
  • reconstructedMesh Mesh produced by the reconstruction algorithm.
  • state Google Benchmark state receiving the counters.

function getName

Return the metric's short label.

inline const std::string & Metric::getName () const

Returns:

Reference to the metric name.


function ~Metric

virtual Metric::~Metric () = default


The documentation for this class was generated from the following file benchmark/metrics/Metric.h