18 lines
453 B
C
18 lines
453 B
C
|
|
#pragma once
|
||
|
|
#include <TestProject/RNG/model/IModel.h>
|
||
|
|
#include <TestProject/RNG/read_csv.hpp>
|
||
|
|
#include <nlohmann/json.hpp>
|
||
|
|
#include <string>
|
||
|
|
using json = nlohmann::json;
|
||
|
|
|
||
|
|
struct BoolCsvModel : IModel {
|
||
|
|
ReadCSV::IntData data;
|
||
|
|
int column;
|
||
|
|
|
||
|
|
BoolCsvModel(const json& params, float)
|
||
|
|
: data(params["file"].get<std::string>())
|
||
|
|
, column(params["column"].get<int>()) {}
|
||
|
|
|
||
|
|
bool evaluateBool(size_t t) override { return (bool)data(t, column); }
|
||
|
|
};
|