forked from aesuli/mp-boost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboostingmodel.cpp
34 lines (31 loc) · 1.25 KB
/
boostingmodel.cpp
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
/************************************************************************/
/* */
/* MPBoost++ */
/* */
/* Copyright: Andrea Esuli */
/* Date: 16 august 2010 */
/* License and Info: http://www.esuli.it/ */
/* */
/************************************************************************/
#include "boostingmodel.h"
#include "mpboostmodel.h"
#include "adaboostmhmodel.h"
#include "defs.h"
BoostingModel * BoostingModel::Read(std::istream & in) {
int modelType;
in >> modelType;
if(modelType==MPBOOST)
return MPBoostModel::Read(in);
if(modelType==ADABOOSTMH)
return AdaBoostMHModel::Read(in);
return NULL;
}
BoostingModel * BoostingModel::Read(std::istream & in,int count) {
int modelType;
in >> modelType;
if(modelType==MPBOOST)
return MPBoostModel::Read(in,count);
if(modelType==ADABOOSTMH)
return AdaBoostMHModel::Read(in,count);
return NULL;
}