Ignore:
Timestamp:
11/22/05 11:06:56 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mranforest/MRanForest.cc

    r7417 r7420  
    6262// Default constructor.
    6363//
    64 MRanForest::MRanForest(const char *name, const char *title) : fClassify(1), fNumTrees(100), fNumTry(0), fNdSize(1), fRanTree(NULL), fUserVal(-1)
     64MRanForest::MRanForest(const char *name, const char *title)
     65    : fClassify(kTRUE), fNumTrees(100), fNumTry(0), fNdSize(1),
     66    fRanTree(NULL), fRules(NULL), fMatrix(NULL), fUserVal(-1)
    6567{
    6668    fName  = name  ? name  : "MRanForest";
     
    125127{
    126128    delete fForest;
     129    if (fMatrix)
     130        delete fMatrix;
     131    if (fRules)
     132        delete fRules;
    127133}
    128134
     
    152158void MRanForest::SetWeights(const TArrayF &weights)
    153159{
    154     const int n=weights.GetSize();
    155     fWeight.Set(n);
    156160    fWeight=weights;
    157 
    158     return;
    159161}
    160162
     
    175177    //for(int i=0;i<n;i++)
    176178    //    *fLog<<inf<<" "<<i<<") "<<fGrid[i]<<endl;
    177 
    178     return;
    179179}
    180180
     
    227227}
    228228
    229 /*
    230 Bool_t MRanForest::PreProcess(MParList *plist)
    231 {
    232     if (!fRules)
    233     {
    234         *fLog << err << dbginf << "MDataArray with rules not initialized... aborting." << endl;
    235         return kFALSE;
    236     }
    237 
    238     if (!fRules->PreProcess(plist))
    239     {
    240         *fLog << err << dbginf << "PreProcessing of MDataArray failed... aborting." << endl;
    241         return kFALSE;
    242     }
    243 
    244     return kTRUE;
    245 }
    246 */
    247 
    248229Double_t MRanForest::CalcHadroness()
    249230{
     
    285266    // access matrix, copy last column (target) preliminarily
    286267    // into fHadTrue
     268    if (fMatrix)
     269        delete fMatrix;
    287270    fMatrix = new TMatrix(mat->GetM());
    288271
     
    337320    }
    338321
     322    if (fRules)
     323        delete fRules;
    339324    fRules = new MDataArray();
    340325    fRules->Reset();
Note: See TracChangeset for help on using the changeset viewer.