Skip to content

Commit 58eacd4

Browse files
committed
Start implementing UCC PAC verifier tests
1 parent 2f4c13a commit 58eacd4

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#include <memory>
2+
#include <utility>
3+
4+
#include <gtest/gtest.h>
5+
6+
#include "core/algorithms/algo_factory.h"
7+
#include "core/config/custom_metric/custom_vector_metric.h"
8+
#include "core/config/indices/type.h"
9+
#include "core/config/names.h"
10+
11+
namespace tests {
12+
using namespace config::names;
13+
using namespace pac::model;
14+
15+
constexpr static auto kThreshold = 1e-3;
16+
17+
struct UCCPACVerifyingParams {
18+
algos::StdParamsMap params;
19+
double exp_epsilon;
20+
double exp_delta;
21+
22+
UCCPACVerifyingParams(CSVConfig const& csv_config, config::IndicesType&& column_indices,
23+
double expected_epsilon, double expected_delta, double max_delta = -1,
24+
double min_epsilon = -1, double max_epsilon = -1,
25+
unsigned long delta_steps = 0, bool dist_from_null_is_infinity = false,
26+
std::shared_ptr<config::ICustomVectorMetric>&& metric = nullptr,
27+
double diagonal_threshold = 1e-5)
28+
: params({
29+
{kCsvConfig, csv_config},
30+
{kColumnIndices, std::move(column_indices)},
31+
{kMaxDelta, max_delta},
32+
{kMinEpsilon, min_epsilon},
33+
{kMaxEpsilon, max_epsilon},
34+
{kDeltaSteps, delta_steps},
35+
{kDistFromNullIsInfinity, dist_from_null_is_infinity},
36+
{kMetric, std::move(metric)},
37+
{kDiagonalThreshold, diagonal_threshold},
38+
}),
39+
exp_epsilon(expected_epsilon),
40+
exp_delta(expected_delta) {}
41+
};
42+
43+
class TestUCCPACVerifier : public testing::TestWithParam<UCCPACVerifyingParams> {};
44+
} // namespace tests

0 commit comments

Comments
 (0)