MINT2
src
Mojito
Chi2Test
HyperBinningMakerMintRandomise.cpp
Go to the documentation of this file.
1
#include "
Mint/HyperBinningMakerMintRandomise.h
"
2
3
4
5
HyperBinningMakerMintRandomise::HyperBinningMakerMintRandomise
(
const
HyperCuboid
& binningRange,
const
HyperPointSet
& data) :
6
HyperBinningMaker
(binningRange, data)
7
{
8
WELCOME_LOG
<<
"Good day from the HyperBinningMakerRandomise() Constructor"
<<std::endl;
9
}
10
11
void
HyperBinningMakerMintRandomise::makeBinning
(){
12
13
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"Splitting all bins in random dimensions"
<<std::endl;
14
int
dimension =
_binningDimensions
.size();
15
16
int
nBins = 0;
17
int
unchanged = 0;
18
19
while
(
splitAllRandomise
() != 0){
20
if
(nBins ==
getNumBins
()) unchanged++;
21
else
unchanged = 0;
22
if
(unchanged >= 2.0*dimension)
break
;
23
nBins =
getNumBins
();
24
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"There is now a total of "
<< nBins <<
" bins"
<<std::endl;
25
}
26
27
if
(
s_printBinning
==
true
)
INFO_LOG
<<
"Random binning algorithm complete "
<<std::endl;
28
29
30
}
31
32
HyperBinningMakerMintRandomise::~HyperBinningMakerMintRandomise
(){
33
GOODBYE_LOG
<<
"Goodbye from the HyperBinningMakerRandomise() Constructor"
<<std::endl;
34
}
HyperCuboid
Definition:
HyperCuboid.h:28
INFO_LOG
#define INFO_LOG
Definition:
MessageService.h:160
HyperBinningMaker::s_printBinning
static bool s_printBinning
Definition:
HyperBinningMaker.h:52
HyperBinningMaker::getNumBins
int getNumBins() const
Definition:
HyperBinningMaker.cpp:1152
HyperBinningMakerMintRandomise::~HyperBinningMakerMintRandomise
~HyperBinningMakerMintRandomise()
Definition:
HyperBinningMakerMintRandomise.cpp:32
HyperBinningMakerMintRandomise::HyperBinningMakerMintRandomise
HyperBinningMakerMintRandomise(const HyperCuboid &binningRange, const HyperPointSet &data)
Definition:
HyperBinningMakerMintRandomise.cpp:5
GOODBYE_LOG
#define GOODBYE_LOG
Definition:
MessageService.h:162
HyperBinningMakerMintRandomise::makeBinning
virtual void makeBinning()
Definition:
HyperBinningMakerMintRandomise.cpp:11
HyperBinningMaker::splitAllRandomise
int splitAllRandomise(double splitPoint=0.5)
Definition:
HyperBinningMaker.cpp:1095
WELCOME_LOG
#define WELCOME_LOG
Definition:
MessageService.h:158
HyperBinningMakerMintRandomise.h
HyperBinningMaker
Definition:
HyperBinningMaker.h:43
HyperPointSet
Definition:
HyperPointSet.h:31
HyperBinningMaker::_binningDimensions
std::vector< int > _binningDimensions
Definition:
HyperBinningMaker.h:90
Generated by
1.8.15