00001 // @(#)root/tmva $Id: TActivationIdentity.cxx 29122 2009-06-22 06:51:30Z brun $ 00002 // Author: Matt Jachowski 00003 00004 /********************************************************************************** 00005 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis * 00006 * Package: TMVA * 00007 * Class : TActivationIdentity * 00008 * Web : http://tmva.sourceforge.net * 00009 * * 00010 * Description: * 00011 * Identity activation function for TNeuron * 00012 * * 00013 * Authors (alphabetical): * 00014 * Matt Jachowski <jachowski@stanford.edu> - Stanford University, USA * 00015 * * 00016 * Copyright (c) 2005: * 00017 * CERN, Switzerland * 00018 * * 00019 * Redistribution and use in source and binary forms, with or without * 00020 * modification, are permitted according to the terms listed in LICENSE * 00021 * (http://tmva.sourceforge.net/LICENSE) * 00022 **********************************************************************************/ 00023 00024 #include <iostream> 00025 00026 #include "TMVA/TActivationIdentity.h" 00027 00028 ClassImp(TMVA::TActivationIdentity) 00029 00030 //______________________________________________________________________________ 00031 void TMVA::TActivationIdentity::MakeFunction( std::ostream& fout, const TString& fncName ) 00032 { 00033 // writes the identity function source code 00034 fout << "double " << fncName << "(double x) const {" << std::endl; 00035 fout << " // identity" << std::endl; 00036 fout << " return x;" << std::endl; 00037 fout << "}" << std::endl; 00038 }