<commit_before>#ifndef _VOLTAGE_TABLE_
#define _VOLTAGE_TABLE_

#include <cmath>
#include <vector>

using std::vector;

// The base class for a voltage table corresponding to a processor model
class VoltageTable {
public:
	VoltageTable(const vector<double> &, double nominalVol);
	virtual ~VoltageTable() {}

	virtual double VoltageCurrentRelation(double targetVol, double nominalCur) const;
	virtual double VoltageFrequencyRelation(double targetVol, double nominalLen) const;

	const vector<double> &getVoltageTable() const { return m_voltageTable; }
	double GetNominalVoltage() const { return m_nominalVol; }

private:
	vector<double> m_voltageTable;
	double m_nominalVol;
};

class TaskVoltageTable {
public:
	TaskVoltageTable(const VoltageTable &vt, double nomCur, double nomLen);
	double getVoltage(size_t level) const { return m_VCLTable[level].v; }
	double getNominalVoltage() const { return m_nominalVoltage; }
	double getCurrent(size_t level) const { return m_VCLTable[level].c; }
	double getCurrent(double voltage) const;
	int getScaledCeilLength(size_t level, int scale) const { return ceil(scale*m_VCLTable[level].l); }
	int getScaledCeilLength(double voltage, int scale) const;

private:
	size_t getVoltageLevel(double v) const;

private:
	struct VolCurLenEntry {
		double v;
		double c;<commit_msg>Added one more interface in TaskVoltageTable class<commit_after>#ifndef _VOLTAGE_TABLE_
#define _VOLTAGE_TABLE_

#include <cmath>
#include <vector>

using std::vector;

// The base class for a voltage table corresponding to a processor model
class VoltageTable {
public:
	VoltageTable(const vector<double> &, double nominalVol);
	virtual ~VoltageTable() {}

	virtual double VoltageCurrentRelation(double targetVol, double nominalCur) const;
	virtual double VoltageFrequencyRelation(double targetVol, double nominalLen) const;

	const vector<double> &getVoltageTable() const { return m_voltageTable; }
	double GetNominalVoltage() const { return m_nominalVol; }

private:
	vector<double> m_voltageTable;
	double m_nominalVol;
};

class TaskVoltageTable {
public:
	TaskVoltageTable(const VoltageTable &vt, double nomCur, double nomLen);
	double getVoltage(size_t level) const { return m_VCLTable[level].v; }
	double getNominalVoltage() const { return m_nominalVoltage; }
	double getCurrent(size_t level) const { return m_VCLTable[level].c; }
	double getCurrent(double voltage) const;
	int getScaledCeilLength(size_t level, int scale) const { return ceil(scale*m_VCLTable[level].l); }
	int getScaledCeilLength(double voltage, int scale) const;
	const vector<double> &getVoltageTable() const { return m_voltageTable; }

private:
	size_t getVoltageLevel(double v) const;

private:
	struct VolCurLenEntry {
		double v;
		double c;
{'fraction_non_alphanumeric': 0.08628884826325411, 'fraction_numerical': 0.0, 'mean_word_length': 6.64245810055866, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3343455', 'n_tokens_mistral': 923, 'n_tokens_neox': 890, 'n_words': 247}