#ifndef ROOT_TMVA_TNeuronInputChooser
#define ROOT_TMVA_TNeuronInputChooser
#include <vector>
#include "TString.h"
#ifndef ROOT_TMVA_TActivation
#include "TNeuronInput.h"
#endif
#ifndef ROOT_TMVA_TNeuronInputSum
#include "TNeuronInputSum.h"
#endif
#ifndef ROOT_TMVA_TNeuronInputSqSum
#include "TNeuronInputSqSum.h"
#endif
#ifndef ROOT_TMVA_TNeuronInputAbs
#include "TNeuronInputAbs.h"
#endif
namespace TMVA {
class TNeuron;
class TNeuronInputChooser {
public:
TNeuronInputChooser()
{
fSUM = "sum";
fSQSUM = "sqsum";
fABSSUM = "abssum";
}
virtual ~TNeuronInputChooser() {}
enum ENeuronInputType { kSum = 0,
kSqSum,
kAbsSum
};
TNeuronInput* CreateNeuronInput(ENeuronInputType type) const
{
switch (type) {
case kSum: return new TNeuronInputSum();
case kSqSum: return new TNeuronInputSqSum();
case kAbsSum: return new TNeuronInputAbs();
default: return NULL;
}
return NULL;
}
TNeuronInput* CreateNeuronInput(const TString type) const
{
if (type == fSUM) return CreateNeuronInput(kSum);
else if (type == fSQSUM) return CreateNeuronInput(kSqSum);
else if (type == fABSSUM) return CreateNeuronInput(kAbsSum);
else return NULL;
}
std::vector<TString>* GetAllNeuronInputNames() const
{
std::vector<TString>* names = new std::vector<TString>();
names->push_back(fSUM);
names->push_back(fSQSUM);
names->push_back(fABSSUM);
return names;
}
private:
TString fSUM;
TString fSQSUM;
TString fABSSUM;
ClassDef(TNeuronInputChooser,0)
};
}
#endif
Last change: Wed Jun 25 08:48:52 2008
Last generated: 2008-06-25 08:48
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.