File Metric.h
File List > benchmark > metrics > Metric.h
Go to the documentation of this file
#pragma once
#include <string>
#include <benchmark/benchmark.h>
#include "mesh/Mesh.h"
using namespace Argos;
class Metric {
std::string name;
public:
Metric(const std::string& name): name(name){}
virtual ~Metric() = default;
virtual void compute(const Mesh& originalMesh, const Mesh& reconstructedMesh, benchmark::State& state) const = 0;
const std::string& getName() const { return name; }
};
class VertexCount : public Metric {
public:
VertexCount(): Metric("Vertices"){}
~VertexCount() = default;
void compute(const Mesh&, const Mesh&, benchmark::State&) const override;
};
class FaceCount : public Metric {
public:
FaceCount() : Metric("Faces") {}
~FaceCount() = default;
void compute(const Mesh&, const Mesh&, benchmark::State&) const override;
};