File: data_store_int.h

package info (click to toggle)
entropybroker 2.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,600 kB
  • sloc: cpp: 14,386; sh: 934; makefile: 188; java: 148; perl: 12
file content (28 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class data_store_int
{
private:
	long long int *values;
	int *counts;
	bool *valid;
	int n_samples, interval;
	int cur_t;

	int init_data(int t);

public:
	data_store_int(int n_samples, int interval);
	data_store_int(std::string file);
	~data_store_int();

	void dump(std::string file);

	void add_avg(int t, int value);
	void add_sum(int t, int value);
	bool get(int index, double *value);

	void get_data(long int **t, double **v, int *n);

	int get_cur_t() { return cur_t; }
	int get_n_samples() { return n_samples; }
	int get_interval() { return interval; }
};