Changeset 3670:1f2de2b99fc7 in orange


Ignore:
Timestamp:
05/18/07 12:45:27 (7 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
b817ba4e5cef4d9ed1447a1fc48847d7c4444839
Message:
  • MeasureAttribute_Python.call must/can now handle arguments (Distribution, None, None)
Location:
source/orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orange/callback.cpp

    r3575 r3670  
    162162                                            WrapOrange(apriorClass))); } 
    163163 
     164float TMeasureAttribute_Python::operator ()(PDistribution d) const 
     165{  
     166  return (const_cast <TMeasureAttribute_Python *>(this))->callMeasure(Py_BuildValue("(NOO)", WrapOrange(d), Py_None, Py_None)); 
     167} 
     168 
     169float TMeasureAttribute_Python::operator ()(const TDiscDistribution &d) const 
     170{  
     171  PDiscDistribution nd = new TDiscDistribution(d); 
     172  return (const_cast <TMeasureAttribute_Python *>(this))->callMeasure(Py_BuildValue("(NOO)", WrapOrange(nd), Py_None, Py_None)); 
     173} 
     174 
     175float TMeasureAttribute_Python::operator ()(const TContDistribution &d) const 
     176{  
     177  PContDistribution nd = new TContDistribution(d); 
     178  return (const_cast <TMeasureAttribute_Python *>(this))->callMeasure(Py_BuildValue("(NOO)", WrapOrange(nd), Py_None, Py_None)); 
     179} 
    164180 
    165181 
  • source/orange/callback.hpp

    r3576 r3670  
    5555  virtual float operator()(PContingency, PDistribution classDistribution, PDistribution apriorClass=PDistribution()); 
    5656  virtual float operator()(int attrNo, PDomainContingency, PDistribution apriorClass=PDistribution()); 
     57  virtual float operator()(PDistribution) const; 
     58  virtual float operator ()(const TDiscDistribution &) const; 
     59  virtual float operator ()(const TContDistribution &) const; 
    5760 
    5861private: 
Note: See TracChangeset for help on using the changeset viewer.