Class Holes
Metric counting the holes of both meshes and the average hole circumference.More...
#include <bench_holes.h>
Inherits the following classes: Metric
Public Functions
| Type | Name |
|---|---|
| Holes () Construct the metric with label "Holes". |
|
| double | averageCircumference (const std::vector< HoleInfo > & holes) const Compute the average circumference over a list of holes. |
| virtual void | compute (const Mesh & originalMesh, const Mesh & reconstructedMesh, benchmark::State & state) override const Compute the metric for a single (original, reconstructed) pair. |
| ~Holes () = default |
Public Functions inherited from Metric
See Metric
| 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
Records four counters:
* Holes.HoleA — number of holes in the original mesh
* Holes.HoleB — number of holes in the reconstructed mesh
* Holes.CircumferenceA — average hole circumference on the original
* Holes.CircumferenceB — average hole circumference on the reconstructed
When the original mesh is empty, Holes.HoleA and Holes.CircumferenceA are reported as -1.0 and the values for B are still reported.
Public Functions Documentation
function Holes
Construct the metric with label "Holes".
function averageCircumference
Compute the average circumference over a list of holes.
Parameters:
holesHoles to average.
Returns:
Mean circumference, or 0.0 if holes is empty.
function compute
Compute the metric for a single (original, reconstructed) pair.
virtual void Holes::compute (
const Mesh & originalMesh,
const Mesh & reconstructedMesh,
benchmark::State & state
) override const
Implementations should record their values on state.counters.
Parameters:
originalMeshGround-truth mesh.reconstructedMeshMesh produced by the reconstruction algorithm.stateGoogle Benchmark state receiving the counters.
Implements Metric::compute
function ~Holes
The documentation for this class was generated from the following file benchmark/metrics/implementations/bench_holes.h