-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathProbas.h
42 lines (35 loc) · 927 Bytes
/
Probas.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Probas.h
* TTree
*
* Created by Vincent Botta on 14/01/09.
* Copyright 2009 University of Liège. All rights reserved.
*
*/
#ifndef __PROBAS__
#define __PROBAS__
#include <vector>
#include <stdio.h>
class Probas {
private:
std::vector<unsigned int> object;
std::vector<unsigned short int> realclass;
unsigned int size;
public:
Probas();
~Probas();
void push(Probas &p);
void push(unsigned int o, double p, double rc);
unsigned int getSize() const;
void print(FILE* out = stdout) const;
unsigned int getObj(unsigned int i) const;
double getProb(unsigned int i) const;
double getRealClass(unsigned int i) const;
std::vector<double> probas;
void shrink() {
std::vector<unsigned int>(object.begin(),object.end()).swap(object);
std::vector<double>(probas.begin(),probas.end()).swap(probas);
std::vector<unsigned short int>(realclass.begin(),realclass.end()).swap(realclass);
};
};
#endif