Changeset 3578:9115bd8e1f1d in orange


Ignore:
Timestamp:
04/24/07 11:18:28 (7 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
9fbcfd8c3a880934244a382f9aa9091d9c789249
Message:
  • uses sqr instead of pow to compute the matrix size for evc rule learner
File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/rulelearner.cpp

    r3576 r3578  
    15141514   // if initial example probability is given, update F and P 
    15151515  if (probList) { 
    1516     double *matrix = new double [pow(examples->domain->classVar->noOfValues()-1,2)]; 
     1516    double *matrix = new double [sqr(examples->domain->classVar->noOfValues()-1)]; 
    15171517    double *fVals = new double [examples->domain->classVar->noOfValues()-1]; 
    15181518    double *results = new double [examples->domain->classVar->noOfValues()-1]; 
     
    19811981void TRuleClassifier_logit::addPriorClassifier(const TExample &ex, double * priorFs) { 
    19821982  // initialize variables 
    1983   double *matrix = new double [pow(examples->domain->classVar->noOfValues()-1,2)]; 
     1983  double *matrix = new double [sqr(examples->domain->classVar->noOfValues()-1)]; 
    19841984  double *fVals = new double [examples->domain->classVar->noOfValues()-1]; 
    19851985  double *results = new double [examples->domain->classVar->noOfValues()-1]; 
Note: See TracChangeset for help on using the changeset viewer.