Changeset 7420 for trunk/MagicSoft/Mars/mranforest/MRanForest.cc
- Timestamp:
- 11/22/05 11:06:56 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mranforest/MRanForest.cc
r7417 r7420 62 62 // Default constructor. 63 63 // 64 MRanForest::MRanForest(const char *name, const char *title) : fClassify(1), fNumTrees(100), fNumTry(0), fNdSize(1), fRanTree(NULL), fUserVal(-1) 64 MRanForest::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) 65 67 { 66 68 fName = name ? name : "MRanForest"; … … 125 127 { 126 128 delete fForest; 129 if (fMatrix) 130 delete fMatrix; 131 if (fRules) 132 delete fRules; 127 133 } 128 134 … … 152 158 void MRanForest::SetWeights(const TArrayF &weights) 153 159 { 154 const int n=weights.GetSize();155 fWeight.Set(n);156 160 fWeight=weights; 157 158 return;159 161 } 160 162 … … 175 177 //for(int i=0;i<n;i++) 176 178 // *fLog<<inf<<" "<<i<<") "<<fGrid[i]<<endl; 177 178 return;179 179 } 180 180 … … 227 227 } 228 228 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 248 229 Double_t MRanForest::CalcHadroness() 249 230 { … … 285 266 // access matrix, copy last column (target) preliminarily 286 267 // into fHadTrue 268 if (fMatrix) 269 delete fMatrix; 287 270 fMatrix = new TMatrix(mat->GetM()); 288 271 … … 337 320 } 338 321 322 if (fRules) 323 delete fRules; 339 324 fRules = new MDataArray(); 340 325 fRules->Reset();
Note:
See TracChangeset
for help on using the changeset viewer.