Logo ROOT   6.08/07
Reference Guide
TActivationIdentity.cxx
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Matt Jachowski
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : TActivationIdentity *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Identity activation function for TNeuron *
12  * *
13  * Authors (alphabetical): *
14  * Matt Jachowski <jachowski@stanford.edu> - Stanford University, USA *
15  * *
16  * Copyright (c) 2005: *
17  * CERN, Switzerland *
18  * *
19  * Redistribution and use in source and binary forms, with or without *
20  * modification, are permitted according to the terms listed in LICENSE *
21  * (http://tmva.sourceforge.net/LICENSE) *
22  **********************************************************************************/
23 
25 
26 #include "Rtypes.h"
27 #include "TString.h"
28 
29 #include <iostream>
30 
31 class TString;
32 
34 
35 ////////////////////////////////////////////////////////////////////////////////
36 /// writes the identity function source code
37 
38 void TMVA::TActivationIdentity::MakeFunction( std::ostream& fout, const TString& fncName )
39 {
40  fout << "double " << fncName << "(double x) const {" << std::endl;
41  fout << " // identity" << std::endl;
42  fout << " return x;" << std::endl;
43  fout << "}" << std::endl;
44 }
Basic string class.
Definition: TString.h:137
STL namespace.
#define ClassImp(name)
Definition: Rtypes.h:279
typedef void((*Func_t)())
Abstract ClassifierFactory template that handles arbitrary types.