Changeset 7715:1b96a16d0b01 in orange


Ignore:
Timestamp:
03/02/11 01:44:16 (3 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
6ceaa13542b467cc96ac23a26920312a7075c442
Message:

Most C++ classes which are exported through the new modules now show the "correct" names.

Location:
source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • source/orange/cls_example.cpp

    r7665 r7715  
    3939 
    4040 
    41 DATASTRUCTURE(Example, TPyExample, 0) 
     41DATASTRUCTURE(Example - Orange.data.Instance, TPyExample, 0) 
    4242 
    4343 
  • source/orange/cls_value.cpp

    r7665 r7715  
    4747 
    4848 
    49 DATASTRUCTURE(Value, TPyValue, 0) 
    50 ABSTRACT(SomeValue, Orange) 
     49DATASTRUCTURE(Value - Orange.data.Value, TPyValue, 0) 
     50ABSTRACT(SomeValue - Orange.core.SomeValue, Orange) 
    5151 
    5252/* Converts a value into an appropriate python variable. 
     
    11431143 
    11441144PyObject *VarTypes() 
    1145 { PyObject *vartypes=PyModule_New("VarTypes"); 
     1145{ PyObject *vartypes=PyModule_New("Orange.data.Type"); 
    11461146  PyModule_AddObject(vartypes, "None", PyVariable_Type_FromLong((int)TValue::NONE)); 
    11471147  PyModule_AddObject(vartypes, "Discrete", PyVariable_Type_FromLong((int)TValue::INTVAR)); 
  • source/orange/lib_components.cpp

    r7665 r7715  
    152152 
    153153 
    154 PyObject *CostMatrix_new(PyTypeObject *type, PyObject *args) BASED_ON(Orange, "(list-of-list-of-prices) -> CostMatrix") 
     154PyObject *CostMatrix_new(PyTypeObject *type, PyObject *args) BASED_ON(Orange - Orange.classification.CostMatrix, "(list-of-list-of-prices) -> CostMatrix") 
    155155{ 
    156156    PyTRY 
     
    291291#include "basstat.hpp" 
    292292 
    293 PyObject *BasicAttrStat_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Orange, "(variable, [examples, weightID, min=, max=, avg=, dev=, n=]) -> BasicAttrStat") ALLOWS_EMPTY 
     293PyObject *BasicAttrStat_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Orange - Orange.statistics.basic.Variable, "(variable, [examples, weightID, min=, max=, avg=, dev=, n=]) -> BasicAttrStat") ALLOWS_EMPTY 
    294294{ 
    295295  PyTRY 
     
    381381parameters, while this one returns the same type, disregarding whether it was given examples or not. 
    382382*/ 
    383 PyObject *DomainBasicAttrStat_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange, "(examples | <list of BasicAttrStat>) -> DomainBasicAttrStat") ALLOWS_EMPTY 
     383PyObject *DomainBasicAttrStat_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange - Orange.statistics.basic.Domain, "(examples | <list of BasicAttrStat>) -> DomainBasicAttrStat") ALLOWS_EMPTY 
    384384{ PyTRY 
    385385if (!args || !PyTuple_Size(args)) 
     
    503503#include "estimateprob.hpp" 
    504504 
    505 ABSTRACT(ContingencyClass, Contingency) 
     505ABSTRACT(ContingencyClass - Orange.statistics.contingency.Class, Contingency) 
    506506 
    507507PDistribution *Contingency_getItemRef(PyObject *self, PyObject *index) 
     
    545545 
    546546 
    547 PyObject *Contingency_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Orange, "(outer_desc, inner_desc)") 
     547PyObject *Contingency_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Orange - Orange.statistics.contingency.Table, "(outer_desc, inner_desc)") 
    548548{ PyTRY 
    549549PVariable var1, var2; 
     
    763763 
    764764 
    765 PyObject *ContingencyAttrClass_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(ContingencyClass, "(attribute, class attribute) | (attribute, examples[, weightID])") 
     765PyObject *ContingencyAttrClass_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(ContingencyClass - Orange.statistics.contingency.VarClass, "(attribute, class attribute) | (attribute, examples[, weightID])") 
    766766{ PyTRY 
    767767PVariable var1, var2; 
     
    818818 
    819819 
    820 PyObject *ContingencyClassAttr_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(ContingencyClass, "(attribute, class attribute) | (attribute, examples[, weightID])") 
     820PyObject *ContingencyClassAttr_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(ContingencyClass - Orange.statistics.contingency.ClassVar, "(attribute, class attribute) | (attribute, examples[, weightID])") 
    821821{ PyTRY 
    822822PVariable var1, var2; 
     
    874874 
    875875 
    876 PyObject *ContingencyAttrAttr_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Contingency, "(outer_attr, inner_attr[, examples [, weight-id]])") 
     876PyObject *ContingencyAttrAttr_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Contingency - Orange.statistics.contingency.VarVar, "(outer_attr, inner_attr[, examples [, weight-id]])") 
    877877{ PyTRY 
    878878PyObject *pyvar, *pyinvar; 
     
    11701170CONSTRUCTOR_KEYWORDS(DomainContingency, "classIsOuter class_is_outer") 
    11711171 
    1172 PyObject *DomainContingency_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange, "(examples [, weightID] | <list of Contingency>) -> DomainContingency") ALLOWS_EMPTY 
     1172PyObject *DomainContingency_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange - Orange.statistics.contingency.Domain, "(examples [, weightID] | <list of Contingency>) -> DomainContingency") ALLOWS_EMPTY 
    11731173{ PyTRY 
    11741174if (!args || !PyTuple_Size(args)) 
     
    13591359#include "distance_dtw.hpp" 
    13601360 
    1361 ABSTRACT(ExamplesDistance_Normalized, ExamplesDistance) 
    1362 C_NAMED(ExamplesDistance_Hamming, ExamplesDistance, "()") 
    1363 C_NAMED(ExamplesDistance_Maximal, ExamplesDistance_Normalized, "()") 
    1364 C_NAMED(ExamplesDistance_Manhattan, ExamplesDistance_Normalized, "()") 
    1365 C_NAMED(ExamplesDistance_Euclidean, ExamplesDistance_Normalized, "()") 
    1366 C_NAMED(ExamplesDistance_Relief, ExamplesDistance, "()") 
    1367 C_NAMED(ExamplesDistance_DTW, ExamplesDistance_Normalized, "()") 
    1368  
    1369 C_CALL(ExamplesDistanceConstructor_Hamming, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Hamming") 
    1370 C_CALL(ExamplesDistanceConstructor_Maximal, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Maximal") 
    1371 C_CALL(ExamplesDistanceConstructor_Manhattan, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Manhattan") 
    1372 C_CALL(ExamplesDistanceConstructor_Euclidean, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Euclidean") 
    1373 C_CALL(ExamplesDistanceConstructor_Relief, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Relief") 
    1374 C_CALL(ExamplesDistanceConstructor_DTW, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_DTW") 
    1375  
    1376  
    1377 PyObject *ExamplesDistanceConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1361ABSTRACT(ExamplesDistance_Normalized - Orange.distances.ExamplesDistance_Normalized, ExamplesDistance) 
     1362C_NAMED(ExamplesDistance_Hamming - Orange.distances.Hamming, ExamplesDistance, "()") 
     1363C_NAMED(ExamplesDistance_Maximal - Orange.distances.Maximal, ExamplesDistance_Normalized, "()") 
     1364C_NAMED(ExamplesDistance_Manhattan - Orange.distances.Manhattan, ExamplesDistance_Normalized, "()") 
     1365C_NAMED(ExamplesDistance_Euclidean - Orange.distances.Euclidean, ExamplesDistance_Normalized, "()") 
     1366C_NAMED(ExamplesDistance_Relief - Orange.distances.Relief, ExamplesDistance, "()") 
     1367C_NAMED(ExamplesDistance_DTW - Orange.distances.DTW, ExamplesDistance_Normalized, "()") 
     1368 
     1369C_CALL(ExamplesDistanceConstructor_Hamming - Orange.distances.HammingConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Hamming") 
     1370C_CALL(ExamplesDistanceConstructor_Maximal - Orange.distances.MaximalConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Maximal") 
     1371C_CALL(ExamplesDistanceConstructor_Manhattan - Orange.distances.ManhattanConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Manhattan") 
     1372C_CALL(ExamplesDistanceConstructor_Euclidean - Orange.distances.EuclideanConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Euclidean") 
     1373C_CALL(ExamplesDistanceConstructor_Relief - Orange.distances.ReliefConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_Relief") 
     1374C_CALL(ExamplesDistanceConstructor_DTW - Orange.distances.DTWConstructor, ExamplesDistanceConstructor, "([examples, weightID][, DomainDistributions][, DomainBasicAttrStat]) -/-> ExamplesDistance_DTW") 
     1375 
     1376 
     1377PyObject *ExamplesDistanceConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.distances.ExamplesDistanceConstructor, "<abstract>") 
    13781378{ 
    13791379  if (type == (PyTypeObject *)&PyOrExamplesDistanceConstructor_Type) 
     
    13901390 
    13911391 
    1392 PyObject *ExamplesDistance_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1392PyObject *ExamplesDistance_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.distances.ExamplesDistance, "<abstract>") 
    13931393{ if (type == (PyTypeObject *)&PyOrExamplesDistance_Type) 
    13941394return setCallbackFunction(WrapNewOrange(mlnew TExamplesDistance_Python(), type), args); 
     
    15261526#include "nearest.hpp" 
    15271527 
    1528 ABSTRACT(FindNearest, Orange) 
    1529 C_NAMED(FindNearest_BruteForce, FindNearest, "([distance=, distanceID=, includeSame=])") 
    1530  
    1531 ABSTRACT(FindNearestConstructor, Orange) 
    1532 C_CALL(FindNearestConstructor_BruteForce, FindNearestConstructor, "([examples[, weightID[, distanceID]], distanceConstructor=, includeSame=]) -/-> FindNearest") 
     1528ABSTRACT(FindNearest - Orange.core.FindNearest, Orange) 
     1529C_NAMED(FindNearest_BruteForce - Orange.classification.knn.FindNearest, FindNearest, "([distance=, distanceID=, includeSame=])") 
     1530 
     1531ABSTRACT(FindNearestConstructor - Orange.core.FindNearestConstructor, Orange) 
     1532C_CALL(FindNearestConstructor_BruteForce - Orange.classification.knn.FindNearestConstructor, FindNearestConstructor, "([examples[, weightID[, distanceID]], distanceConstructor=, includeSame=]) -/-> FindNearest") 
    15331533 
    15341534 
     
    19981998C_NAMED(TransformValue_IsDefined, TransformValue, "([value=])") 
    19991999 
    2000 ABSTRACT(Imputer, Orange) 
    2001 C_NAMED(Imputer_asValue, Imputer, "() -> Imputer_asValue") 
    2002 C_NAMED(Imputer_model, Imputer, "() -> Imputer_model") 
    2003 C_NAMED(Imputer_random, Imputer, "() -> Imputer_random") 
    2004  
    2005 PyObject *Imputer_defaults_new(PyTypeObject *tpe, PyObject *args) BASED_ON(Imputer, "(domain | example) -> Imputer_defaults") 
     2000ABSTRACT(Imputer - Orange.feature.imputation.Imputer, Orange) 
     2001C_NAMED(Imputer_asValue - Orange.feature.imputation.Imputer_asValue, Imputer, "() -> Imputer_asValue") 
     2002C_NAMED(Imputer_model - Orange.feature.imputation.Imputer_model, Imputer, "() -> Imputer_model") 
     2003C_NAMED(Imputer_random - Orange.feature.imputation.Imputer_random, Imputer, "() -> Imputer_random") 
     2004 
     2005PyObject *Imputer_defaults_new(PyTypeObject *tpe, PyObject *args) BASED_ON(Imputer - Orange.feature.imputation.Imputer_defaults, "(domain | example) -> Imputer_defaults") 
    20062006{ 
    20072007    PyTRY 
     
    20282028 
    20292029 
    2030 ABSTRACT(ImputerConstructor, Orange) 
    2031 C_CALL(ImputerConstructor_average, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2032 C_CALL(ImputerConstructor_minimal, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2033 C_CALL(ImputerConstructor_maximal, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2034 C_CALL(ImputerConstructor_model, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2035 C_CALL(ImputerConstructor_asValue, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    2036 C_CALL(ImputerConstructor_random, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2030ABSTRACT(ImputerConstructor - Orange.feature.imputation.ImputerConstructor, Orange) 
     2031C_CALL(ImputerConstructor_average - Orange.feature.imputation.ImputerConstructor_average, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2032C_CALL(ImputerConstructor_minimal - Orange.feature.imputation.ImputerConstructor_minimal, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2033C_CALL(ImputerConstructor_maximal - Orange.feature.imputation.ImputerConstructor_maximal, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2034C_CALL(ImputerConstructor_model - Orange.feature.imputation.ImputerConstructor_model, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2035C_CALL(ImputerConstructor_asValue - Orange.feature.imputation.ImputerConstructor_asValue, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
     2036C_CALL(ImputerConstructor_random - Orange.feature.imputation.ImputerConstructor_random, ImputerConstructor, "(examples[, weightID]) -> Imputer") 
    20372037 
    20382038PyObject *Imputer_call(PyObject *self, PyObject *args, PyObject *keywords) 
     
    20792079#include "trindex.hpp" 
    20802080 
    2081 ABSTRACT(MakeRandomIndices, Orange) 
    2082 C_CALL3(MakeRandomIndices2, MakeRandomIndices2, MakeRandomIndices, "[n | gen [, p0]], [p0=, stratified=, randseed=] -/-> [int]") 
    2083 C_CALL3(MakeRandomIndicesMultiple, MakeRandomIndicesMultiple, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
    2084 C_CALL3(MakeRandomIndicesN, MakeRandomIndicesN, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
    2085 C_CALL3(MakeRandomIndicesCV, MakeRandomIndicesCV, MakeRandomIndices, "[n | gen [, folds]], [folds=, stratified=, randseed=] -/-> [int]") 
     2081ABSTRACT(MakeRandomIndices - Orange.data.sample.MakeRandomIndices, Orange) 
     2082C_CALL3(MakeRandomIndices2 - Orange.data.sample.MakeRandomIndices2, MakeRandomIndices2, MakeRandomIndices, "[n | gen [, p0]], [p0=, stratified=, randseed=] -/-> [int]") 
     2083C_CALL3(MakeRandomIndicesMultiple - Orange.data.sample.MakeRandomIndicesMultiple, MakeRandomIndicesMultiple, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
     2084C_CALL3(MakeRandomIndicesN - Orange.data.sample.MakeRandomIndicesN, MakeRandomIndicesN, MakeRandomIndices, "[n | gen [, p]], [p=, stratified=, randseed=] -/-> [int]") 
     2085C_CALL3(MakeRandomIndicesCV - Orange.data.sample.MakeRandomIndicesCV, MakeRandomIndicesCV, MakeRandomIndices, "[n | gen [, folds]], [folds=, stratified=, randseed=] -/-> [int]") 
    20862086 
    20872087 
     
    25812581#include "relief.hpp" 
    25822582 
    2583 BASED_ON(MeasureAttribute, Orange) 
    2584 ABSTRACT(MeasureAttributeFromProbabilities, MeasureAttribute) 
    2585  
    2586 C_CALL(MeasureAttribute_info, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    2587 C_CALL(MeasureAttribute_gini, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    2588 C_CALL(MeasureAttribute_gainRatio, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    2589 C_CALL(MeasureAttribute_gainRatioA, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
    2590 C_CALL(MeasureAttribute_cost, MeasureAttributeFromProbabilities, "(cost=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    2591 C_CALL(MeasureAttribute_relevance, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    2592 C_CALL(MeasureAttribute_logOddsRatio, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    2593 C_CALL(MeasureAttribute_chiSquare, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    2594  
    2595 C_CALL(MeasureAttribute_MSE, MeasureAttribute, "(estimate=, m=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
    2596  
    2597 C_CALL(MeasureAttribute_relief, MeasureAttribute, "(estimate=, m=, k=) | (attr, examples[, apriori] [,weightID]) -/-> float") 
     2583BASED_ON(MeasureAttribute - Orange.feature.scoring.Measure, Orange) 
     2584ABSTRACT(MeasureAttributeFromProbabilities - Orange.core.MeasureAttributeFromProbabilities, MeasureAttribute) 
     2585 
     2586C_CALL(MeasureAttribute_info - Orange.feature.scoring.InfoGain, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
     2587C_CALL(MeasureAttribute_gini - Orange.feature.scoring.Gini, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
     2588C_CALL(MeasureAttribute_gainRatio - Orange.feature.scoring.GainRatio, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
     2589C_CALL(MeasureAttribute_gainRatioA - Orange.core.MeasureAttribute_gainRatioA, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori) -/-> float") 
     2590C_CALL(MeasureAttribute_cost - Orange.feature.scoring.Cost, MeasureAttributeFromProbabilities, "(cost=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     2591C_CALL(MeasureAttribute_relevance - Orange.feature.scoring.Relevance, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     2592C_CALL(MeasureAttribute_logOddsRatio - Orange.core.MeasureAttribute_logOddsRatio, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     2593C_CALL(MeasureAttribute_chiSquare - Orange.feature.scoring.MeasureAttribute_chiSquare, MeasureAttributeFromProbabilities, "(estimate=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     2594 
     2595C_CALL(MeasureAttribute_MSE - Orange.feature.scoring.MSE, MeasureAttribute, "(estimate=, m=) | (attr, examples[, apriori] [,weightID]) | (attrno, domain-cont[, apriori]) | (cont, class dist [,apriori]) -/-> float") 
     2596 
     2597C_CALL(MeasureAttribute_relief - Orange.feature.scoring.Relief, MeasureAttribute, "(estimate=, m=, k=) | (attr, examples[, apriori] [,weightID]) -/-> float") 
    25982598 
    25992599/* obsolete: */ 
     
    26042604PYCLASSCONSTANT_FLOAT(MeasureAttribute, Rejected, ATTRIBUTE_REJECTED) 
    26052605 
    2606 PyObject *MeasureAttribute_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     2606PyObject *MeasureAttribute_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.feature.scoring.Measure, "<abstract>") 
    26072607{ if (type == (PyTypeObject *)&PyOrMeasureAttribute_Type) 
    26082608return setCallbackFunction(WrapNewOrange(mlnew TMeasureAttribute_Python(), type), args); 
     
    28732873#include "exampleclustering.hpp" 
    28742874 
    2875 ABSTRACT(GeneralExampleClustering, Orange) 
    2876 C_NAMED(ExampleCluster, Orange, "([left=, right=, distance=, centroid=])") 
    2877 C_NAMED(ExampleClusters, GeneralExampleClustering, "([root=, quality=]") 
     2875ABSTRACT(GeneralExampleClustering - Orange.core.GeneralExampleClustering, Orange) 
     2876C_NAMED(ExampleCluster - Orange.clustering.ExampleCluster, Orange, "([left=, right=, distance=, centroid=])") 
     2877C_NAMED(ExampleClusters - Orange.core.ExampleClusters, GeneralExampleClustering, "([root=, quality=]") 
    28782878 
    28792879 
     
    29242924#include "calibrate.hpp" 
    29252925 
    2926 C_CALL(ThresholdCA, Orange, "([classifier, examples[, weightID, target value]]) -/-> (threshold, optimal CA, list of CAs))") 
     2926C_CALL(ThresholdCA - Orange.wrappers.ThresholdCA, Orange, "([classifier, examples[, weightID, target value]]) -/-> (threshold, optimal CA, list of CAs))") 
    29272927 
    29282928PyObject *ThresholdCA_call(PyObject *self, PyObject *args, PyObject *keywords) PYDOC("(classifier, examples[, weightID, target value]) -> (threshold, optimal CA, list of CAs)") 
     
    35393539#include "hclust.hpp" 
    35403540 
    3541 C_NAMED(HierarchicalCluster, Orange, "()") 
    3542 C_CALL3(HierarchicalClustering, HierarchicalClustering, Orange, "(linkage=)") 
     3541C_NAMED(HierarchicalCluster - Orange.clustering.hierarchical.HierarchicalCluster, Orange, "()") 
     3542C_CALL3(HierarchicalClustering - Orange.clustering.hierarchical.HierarchicalClustering, HierarchicalClustering, Orange, "(linkage=)") 
    35433543 
    35443544PyObject *HierarchicalClustering_call(PyObject *self, PyObject *args, PyObject *keywords) PYDOC("(distance matrix) -> HierarchicalCluster") 
     
    36953695PHierarchicalClusterList PHierarchicalClusterList_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PHierarchicalClusterList, THierarchicalClusterList, PHierarchicalCluster, &PyOrHierarchicalCluster_Type>::P_FromArguments(arg); } 
    36963696PyObject *HierarchicalClusterList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PHierarchicalClusterList, THierarchicalClusterList, PHierarchicalCluster, &PyOrHierarchicalCluster_Type>::_FromArguments(type, arg); } 
    3697 PyObject *HierarchicalClusterList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of HierarchicalCluster>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PHierarchicalClusterList, THierarchicalClusterList, PHierarchicalCluster, &PyOrHierarchicalCluster_Type>::_new(type, arg, kwds); } 
     3697PyObject *HierarchicalClusterList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.clustering.hierarchical.HierarchicalClusterList, "(<list of HierarchicalCluster>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PHierarchicalClusterList, THierarchicalClusterList, PHierarchicalCluster, &PyOrHierarchicalCluster_Type>::_new(type, arg, kwds); } 
    36983698PyObject *HierarchicalClusterList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PHierarchicalClusterList, THierarchicalClusterList, PHierarchicalCluster, &PyOrHierarchicalCluster_Type>::_getitem(self, index); } 
    36993699int       HierarchicalClusterList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PHierarchicalClusterList, THierarchicalClusterList, PHierarchicalCluster, &PyOrHierarchicalCluster_Type>::_setitem(self, index, item); } 
     
    37253725#include "distancemap.hpp" 
    37263726 
    3727 C_NAMED(DistanceMapConstructor, Orange, "(distanceMatrix=, order=)") 
     3727C_NAMED(DistanceMapConstructor - Orange.distances.DistanceMapConstructor, Orange, "(distanceMatrix=, order=)") 
    37283728 
    37293729 
     
    37623762 
    37633763 
    3764 BASED_ON(DistanceMap, Orange) 
     3764BASED_ON(DistanceMap - Orange.distances.DistanceMap, Orange) 
    37653765 
    37663766PyObject *DistanceMap__reduce__(PyObject *self) 
     
    43284328 
    43294329 
    4330 ABSTRACT(Graph, Orange) 
     4330ABSTRACT(Graph - Orange.network.Graph, Orange) 
    43314331RECOGNIZED_ATTRIBUTES(Graph, "objects forceMapping force_mapping returnIndices return_indices objectsOnEdges object_on_edges") 
    43324332 
     
    54905490} 
    54915491 
    5492 PyObject *GraphAsMatrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Graph, "(nVertices, directed[, nEdgeTypes])") 
     5492PyObject *GraphAsMatrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Graph - Orange.network.GraphAsMatrix, "(nVertices, directed[, nEdgeTypes])") 
    54935493{ 
    54945494    PyTRY 
     
    55845584 
    55855585 
    5586 PyObject *GraphAsList_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Graph, "(nVertices, directed[, nEdgeTypes])") 
     5586PyObject *GraphAsList_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Graph - Orange.network.GraphAsList, "(nVertices, directed[, nEdgeTypes])") 
    55875587{ 
    55885588    PyTRY 
     
    57065706 
    57075707 
    5708 PyObject *GraphAsTree_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Graph, "(nVertices, directed[, nEdgeTypes])") 
     5708PyObject *GraphAsTree_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Graph - Orange.network.GraphAsTree, "(nVertices, directed[, nEdgeTypes])") 
    57095709{ 
    57105710    PyTRY 
  • source/orange/lib_io.cpp

    r7663 r7715  
    4242 
    4343#include "filegen.hpp" 
    44 BASED_ON(FileExampleGenerator, ExampleGenerator) 
     44BASED_ON(FileExampleGenerator - Orange.data.io.FileExampleGenerator, ExampleGenerator) 
    4545 
    4646#include "tabdelim.hpp" 
     
    6565NO_PICKLE(BasketFeeder) 
    6666 
    67 BASED_ON(BasketFeeder, Orange) 
    68  
    69  
    70  
    71  
    72 PyObject *TabDelimExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator, "(examples[, use=domain|varlist])") 
     67BASED_ON(BasketFeeder - Orange.data.io.BasketFeeder, Orange) 
     68 
     69 
     70 
     71 
     72PyObject *TabDelimExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator - Orange.data.io.TabDelimExampleGenerator, "(examples[, use=domain|varlist])") 
    7373{ PyTRY 
    7474    char *fileName; 
     
    8989 
    9090 
    91 PyObject *BasketExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator, "(examples[, use=domain])") 
     91PyObject *BasketExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator - Orange.data.io.BasketExampleGenerator, "(examples[, use=domain])") 
    9292{ PyTRY 
    9393    char *fileName; 
     
    117117 
    118118 
    119 PyObject *C45ExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator, "(examples[, use=domain|varlist])") 
     119PyObject *C45ExampleGenerator_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(FileExampleGenerator - Orange.data.io.C45ExampleGenerator, "(examples[, use=domain|varlist])") 
    120120{ PyTRY 
    121121    char *stem; 
  • source/orange/lib_kernel.cpp

    r7685 r7715  
    124124PVarList PVarList_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::P_FromArguments(arg); } 
    125125PyObject *VarList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_FromArguments(type, arg); } 
    126 PyObject *VarList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of Variable>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_new(type, arg, kwds); } 
     126PyObject *VarList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.data.variable.Variables, "(<list of Variable>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_new(type, arg, kwds); } 
    127127PyObject *VarList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_getitem(self, index); } 
    128128int       VarList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PVarList, TVarList, PVariable, &PyOrVariable_Type>::_setitem(self, index, item); } 
     
    238238} 
    239239 
    240 ABSTRACT(Variable, Orange) 
    241 C_NAMED(EnumVariable, Variable, "([name=, values=, autoValues=, distributed=, getValueFrom=])") 
    242 C_NAMED(FloatVariable, Variable, "([name=, startValue=, endValue=, stepValue=, distributed=, getValueFrom=])") 
     240ABSTRACT(Variable - Orange.data.variable.Variable, Orange) 
     241C_NAMED(EnumVariable - Orange.data.variable.Discrete, Variable, "([name=, values=, autoValues=, distributed=, getValueFrom=])") 
     242C_NAMED(FloatVariable - Orange.data.variable.Continuous, Variable, "([name=, startValue=, endValue=, stepValue=, distributed=, getValueFrom=])") 
    243243 
    244244PyObject *PyVariable_MakeStatus_FromLong(long ok); 
     
    324324 
    325325#include "stringvars.hpp" 
    326 C_NAMED(StringVariable, Variable, "([name=])") 
     326C_NAMED(StringVariable - Orange.data.variable.String, Variable, "([name=])") 
    327327 
    328328#include "pythonvars.hpp" 
    329 C_NAMED(PythonVariable, Variable, "([name=])") 
     329C_NAMED(PythonVariable - Orange.data.variable.Python, Variable, "([name=])") 
    330330 
    331331PyObject *PythonValue_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(SomeValue, "([object])") 
     
    13381338CONSTRUCTOR_KEYWORDS(Domain, "source") 
    13391339 
    1340 PyObject *Domain_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange, "(list-of-attrs | domain [, hasClass | classVar | None] [,domain | list-of-attrs | source=domain])") 
     1340PyObject *Domain_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange - Orange.data.Domain, "(list-of-attrs | domain [, hasClass | classVar | None] [,domain | list-of-attrs | source=domain])") 
    13411341{ PyTRY 
    13421342    PyObject *list; 
     
    29302930CONSTRUCTOR_KEYWORDS(ExampleTable, "domain use useMetas dontCheckStored dontStore filterMetas filter_metas DC DK NA noClass noCodedDiscrete createNewOn") 
    29312931 
    2932 PyObject *ExampleTable_new(PyTypeObject *type, PyObject *argstuple, PyObject *keywords) BASED_ON(ExampleGenerator, "(filename | domain[, examples] | examples)") 
     2932PyObject *ExampleTable_new(PyTypeObject *type, PyObject *argstuple, PyObject *keywords) BASED_ON(ExampleGenerator - Orange.data.Table, "(filename | domain[, examples] | examples)") 
    29332933{ 
    29342934  PyTRY 
     
    43034303NO_PICKLE(Distribution) 
    43044304 
    4305 PyObject *Distribution_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(SomeValue, "(attribute[, examples[, weightID]])") 
     4305PyObject *Distribution_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(SomeValue - Orange.statistics.distribution.Distribution, "(attribute[, examples[, weightID]])") 
    43064306{ 
    43074307  PyTRY 
     
    45554555 
    45564556 
    4557 PyObject *DiscDistribution_new(PyTypeObject *type, PyObject *targs, PyObject *) BASED_ON(Distribution, "[list of floats] | DiscDistribution") 
     4557PyObject *DiscDistribution_new(PyTypeObject *type, PyObject *targs, PyObject *) BASED_ON(Distribution - Orange.statistics.distribution.Discrete, "[list of floats] | DiscDistribution") 
    45584558{ PyTRY { 
    45594559    if (!PyTuple_Size(targs)) { 
     
    47334733 
    47344734 
    4735 PyObject *ContDistribution_new(PyTypeObject *type, PyObject *targs, PyObject *) BASED_ON(Distribution, "[dist of float:float] | DiscDistribution") 
     4735PyObject *ContDistribution_new(PyTypeObject *type, PyObject *targs, PyObject *) BASED_ON(Distribution - Orange.statistics.distribution.Continuous, "[dist of float:float] | DiscDistribution") 
    47364736{ PyTRY { 
    47374737 
     
    49854985 
    49864986 
    4987 PyObject *GaussianDistribution_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Distribution, "(mean, sigma) | (distribution) | () -> distribution") ALLOWS_EMPTY 
     4987PyObject *GaussianDistribution_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Distribution - Orange.statistics.distribution.Gaussian, "(mean, sigma) | (distribution) | () -> distribution") ALLOWS_EMPTY 
    49884988{ PyTRY 
    49894989    float mean = 0.0, sigma = 1.0; 
     
    50895089   parameters, while this one returns the same type, disregarding whether it was given examples or not. 
    50905090*/ 
    5091 PyObject *DomainDistributions_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange, "(examples[, weightID, skipDiscrete, skipContinuous] | <list of Distribution>) -> DomainDistributions") ALLOWS_EMPTY 
     5091PyObject *DomainDistributions_new(PyTypeObject *type, PyObject *args, PyObject *keywds) BASED_ON(Orange - Orange.statistics.distribution.Domain, "(examples[, weightID, skipDiscrete, skipContinuous] | <list of Distribution>) -> DomainDistributions") ALLOWS_EMPTY 
    50925092{ PyTRY 
    50935093    if (!args || !PyTuple_Size(args)) 
     
    52575257 
    52585258 
    5259 ABSTRACT(LearnerFD, Learner) 
    5260  
    5261 PyObject *Learner_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     5259ABSTRACT(LearnerFD - Orange.classification.LearnerFD, Learner) 
     5260 
     5261PyObject *Learner_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.Learner, "<abstract>") 
    52625262{ if (type == (PyTypeObject *)&PyOrLearner_Type) 
    52635263    return setCallbackFunction(WrapNewOrange(mlnew TLearner_Python(), type), args); 
     
    53135313#include "majority.hpp" 
    53145314 
    5315 ABSTRACT(ClassifierFD, Classifier) 
    5316  
    5317 PyObject *DefaultClassifier_new(PyTypeObject *tpe, PyObject *args, PyObject *kw) BASED_ON(Classifier, "([defaultVal])") ALLOWS_EMPTY 
     5315ABSTRACT(ClassifierFD - Orange.classification.ClassifierFD, Classifier) 
     5316 
     5317PyObject *DefaultClassifier_new(PyTypeObject *tpe, PyObject *args, PyObject *kw) BASED_ON(Classifier - Orange.classification.ConstantClassifier, "([defaultVal])") ALLOWS_EMPTY 
    53185318{ 
    53195319  PyObject *arg1 = NULL, *arg2 = NULL; 
     
    53455345} 
    53465346 
    5347 C_NAMED(RandomLearner, Learner, "([probabilities=])") 
    5348 C_NAMED(RandomClassifier, Classifier, "([probabilities=])") 
     5347C_NAMED(RandomLearner - Orange.classification.RandomLearner, Learner, "([probabilities=])") 
     5348C_NAMED(RandomClassifier - Orange.classification.RandomClassifier, Classifier, "([probabilities=])") 
    53495349 
    53505350PClassifierList PClassifierList_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PClassifierList, TClassifierList, PClassifier, &PyOrClassifier_Type>::P_FromArguments(arg); } 
    53515351PyObject *ClassifierList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PClassifierList, TClassifierList, PClassifier, &PyOrClassifier_Type>::_FromArguments(type, arg); } 
    5352 PyObject *ClassifierList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of Classifier>)")  ALLOWS_EMPTY { return ListOfWrappedMethods<PClassifierList, TClassifierList, PClassifier, &PyOrClassifier_Type>::_new(type, arg, kwds); } 
     5352PyObject *ClassifierList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.classification.ClassifierList, "(<list of Classifier>)")  ALLOWS_EMPTY { return ListOfWrappedMethods<PClassifierList, TClassifierList, PClassifier, &PyOrClassifier_Type>::_new(type, arg, kwds); } 
    53535353PyObject *ClassifierList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PClassifierList, TClassifierList, PClassifier, &PyOrClassifier_Type>::_getitem(self, index); } 
    53545354int       ClassifierList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PClassifierList, TClassifierList, PClassifier, &PyOrClassifier_Type>::_setitem(self, index, item); } 
     
    53885388 
    53895389 
    5390 PyObject *Classifier_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     5390PyObject *Classifier_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.Classifier, "<abstract>") 
    53915391{ if (type == (PyTypeObject *)&PyOrClassifier_Type) 
    53925392    return setCallbackFunction(WrapNewOrange(mlnew TClassifier_Python(), type), args); 
     
    54615461 
    54625462#include "classfromvar.hpp" 
    5463 C_NAMED(ClassifierFromVar, Classifier, "([whichVar=, transformer=])") 
    5464 C_NAMED(ClassifierFromVarFD, ClassifierFD, "([position=, transformer=])") 
     5463C_NAMED(ClassifierFromVar - Orange.classification.ClassifierFromVar, Classifier, "([whichVar=, transformer=])") 
     5464C_NAMED(ClassifierFromVarFD - Orange.classification.ClassifierFromVarFD, ClassifierFD, "([position=, transformer=])") 
    54655465 
    54665466#include "cartesian.hpp" 
    5467 C_NAMED(CartesianClassifier, ClassifierFD, "()") 
     5467C_NAMED(CartesianClassifier - Orange.classification.CartesianClassifier, ClassifierFD, "()") 
    54685468 
    54695469 
     
    54725472#include "lookup.hpp" 
    54735473 
    5474 C_CALL(LookupLearner, Learner, "([examples] [, weight=]) -/-> Classifier") 
    5475 C_NAMED(ClassifierByExampleTable, ClassifierFD, "([examples=])") 
     5474C_CALL(LookupLearner - Orange.classification.lookup.LookupLearner, Learner, "([examples] [, weight=]) -/-> Classifier") 
     5475C_NAMED(ClassifierByExampleTable - Orange.classification.lookup.ClassifierByDataTable, ClassifierFD, "([examples=])") 
    54765476 
    54775477 
     
    55955595 
    55965596 
    5597 PyObject *ClassifierByLookupTable1_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(ClassifierByLookupTable, "(class-descriptor, descriptor)") 
     5597PyObject *ClassifierByLookupTable1_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(ClassifierByLookupTable - Orange.classification.lookup.ClassifierByLookupTable1, "(class-descriptor, descriptor)") 
    55985598{ PyTRY 
    55995599    PVariable vcl, vvl; 
     
    56215621 
    56225622 
    5623 PyObject *ClassifierByLookupTable2_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(ClassifierByLookupTable, "(class-descriptor, desc0, desc1)") 
     5623PyObject *ClassifierByLookupTable2_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(ClassifierByLookupTable - Orange.classification.lookup.ClassifierByLookupTable2, "(class-descriptor, desc0, desc1)") 
    56245624{ PyTRY 
    56255625    PVariable vcl, vvl1, vvl2; 
     
    56485648 
    56495649 
    5650 PyObject *ClassifierByLookupTable3_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(ClassifierByLookupTable, "(class-descriptor, desc0, desc1, desc2)") 
     5650PyObject *ClassifierByLookupTable3_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(ClassifierByLookupTable - Orange.classification.lookup.ClassifierByLookupTable3, "(class-descriptor, desc0, desc1, desc2)") 
    56515651{ PyTRY 
    56525652    PVariable vcl, vvl1, vvl2, vvl3; 
     
    56765676 
    56775677 
    5678 PyObject *ClassifierByLookupTable_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Classifier, "(class-descriptor, descriptor)") 
     5678PyObject *ClassifierByLookupTable_new(PyTypeObject *type, PyObject *args, PyObject *kwds) BASED_ON(Classifier - Orange.classification.lookup.ClassifierByLookupTable, "(class-descriptor, descriptor)") 
    56795679{ 
    56805680  static newfunc constructors[] = {ClassifierByLookupTable1_new, ClassifierByLookupTable2_new, ClassifierByLookupTable3_new}; 
  • source/orange/lib_learner.cpp

    r7665 r7715  
    5353 
    5454#include "majority.hpp" 
    55 C_CALL(MajorityLearner, Learner, "([examples] [, weight=, estimate=]) -/-> Classifier") 
    56 C_CALL(CostLearner, Learner, "([examples] [, weight=, estimate=, costs=]) -/-> Classifier") 
     55C_CALL(MajorityLearner - Orange.classification.majority.MajorityLearner, Learner, "([examples] [, weight=, estimate=]) -/-> Classifier") 
     56C_CALL(CostLearner - Orange.wrappers.CostLearner, Learner, "([examples] [, weight=, estimate=, costs=]) -/-> Classifier") 
    5757 
    5858 
    5959#include "costwrapper.hpp" 
    60 C_CALL(CostWrapperLearner, Learner, "([examples] [, weight=, costs=]) -/-> Classifier") 
    61 C_NAMED(CostWrapperClassifier, Classifier, "([classifier=, costs=])") 
     60C_CALL(CostWrapperLearner - Orange.wrappers.CostWrapperLearner, Learner, "([examples] [, weight=, costs=]) -/-> Classifier") 
     61C_NAMED(CostWrapperClassifier - Orange.wrappers.CostWrapperClassifier, Classifier, "([classifier=, costs=])") 
    6262 
    6363 
     
    6565 
    6666#include "assoc.hpp" 
    67 C_CALL(AssociationLearner, Learner, "([examples] [, weight=, conf=, supp=, voteWeight=]) -/-> Classifier") 
    68 C_NAMED(AssociationClassifier, ClassifierFD, "([rules=, voteWeight=])") 
    69 C_CALL3(AssociationRulesInducer, AssociationRulesInducer, Orange, "([examples[, weightID]], confidence=, support=]) -/-> AssociationRules") 
    70 C_CALL3(AssociationRulesSparseInducer, AssociationRulesSparseInducer, Orange, "([examples[, weightID]], confidence=, support=]) -/-> AssociationRules") 
    71 C_CALL3(ItemsetsSparseInducer, ItemsetsSparseInducer, Orange, "([examples[, weightID]], support=]) -/-> AssociationRules") 
    72  
    73 BASED_ON(ItemsetNodeProxy, Orange) 
     67C_CALL(AssociationLearner - Orange.classification.rules.AssociationLearner, Learner, "([examples] [, weight=, conf=, supp=, voteWeight=]) -/-> Classifier") 
     68C_NAMED(AssociationClassifier - Orange.classification.rules.AssociationClassifier, ClassifierFD, "([rules=, voteWeight=])") 
     69C_CALL3(AssociationRulesInducer - Orange.associate.AssociationRulesInducer, AssociationRulesInducer, Orange, "([examples[, weightID]], confidence=, support=]) -/-> AssociationRules") 
     70C_CALL3(AssociationRulesSparseInducer - Orange.associate.AssociationRulesSparseInducer, AssociationRulesSparseInducer, Orange, "([examples[, weightID]], confidence=, support=]) -/-> AssociationRules") 
     71C_CALL3(ItemsetsSparseInducer - Orange.associate.ItemsSparseInducer, ItemsetsSparseInducer, Orange, "([examples[, weightID]], support=]) -/-> AssociationRules") 
     72 
     73BASED_ON(ItemsetNodeProxy - Orange.associate.ItemsetNodeProxy, Orange) 
    7474 
    7575bool operator < (const TAssociationRule &, const TAssociationRule &) { return false; } 
     
    340340bool convertFromPython(PyObject *, PAssociationRule &); 
    341341 
    342 PyObject *AssociationRule_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Orange, "(left, right, support, confidence)") 
     342PyObject *AssociationRule_new(PyTypeObject *type, PyObject *args, PyObject *) BASED_ON(Orange - Orange.associate.AssociationRule, "(left, right, support, confidence)") 
    343343{ PyTRY 
    344344    PAssociationRule rule; 
     
    501501PAssociationRules PAssociationRules_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PAssociationRules, TAssociationRules, PAssociationRule, &PyOrAssociationRule_Type>::P_FromArguments(arg); } 
    502502PyObject *AssociationRules_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PAssociationRules, TAssociationRules, PAssociationRule, &PyOrAssociationRule_Type>::_FromArguments(type, arg); } 
    503 PyObject *AssociationRules_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of AssociationRule>)")  ALLOWS_EMPTY { return ListOfWrappedMethods<PAssociationRules, TAssociationRules, PAssociationRule, &PyOrAssociationRule_Type>::_new(type, arg, kwds); } 
     503PyObject *AssociationRules_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.associate.AssociationRules, "(<list of AssociationRule>)")  ALLOWS_EMPTY { return ListOfWrappedMethods<PAssociationRules, TAssociationRules, PAssociationRule, &PyOrAssociationRule_Type>::_new(type, arg, kwds); } 
    504504PyObject *AssociationRules_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PAssociationRules, TAssociationRules, PAssociationRule, &PyOrAssociationRule_Type>::_getitem(self, index); } 
    505505int       AssociationRules_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PAssociationRules, TAssociationRules, PAssociationRule, &PyOrAssociationRule_Type>::_setitem(self, index, item); } 
     
    533533#include "callback.hpp" 
    534534 
    535 C_CALL(TreeLearner, Learner, "([examples] [, weight=, split=, stop=, nodeLearner=, lookDownOnUnknown=]) -/-> Classifier") 
    536  
    537 C_NAMED(TreeNode, Orange, "([lookDownOnUnknown=, branchSelector=, nodeClassifier=, branches=, contingency=])") 
    538 C_NAMED(TreeClassifier, ClassifierFD, "([domain=, tree=, descender=])") 
    539  
    540 C_NAMED(TreeStopCriteria_common, TreeStopCriteria, "([maxMajority=, minExamples=])") 
    541 HIDDEN(TreeStopCriteria_Python, TreeStopCriteria) 
     535C_CALL(TreeLearner - Orange.core.TreeLearner, Learner, "([examples] [, weight=, split=, stop=, nodeLearner=, lookDownOnUnknown=]) -/-> Classifier") 
     536 
     537C_NAMED(TreeNode - Orange.classification.tree.Node, Orange, "([lookDownOnUnknown=, branchSelector=, nodeClassifier=, branches=, contingency=])") 
     538C_NAMED(TreeClassifier - Orange.classification.tree.TreeClassifier, ClassifierFD, "([domain=, tree=, descender=])") 
     539 
     540C_NAMED(TreeStopCriteria_common - Orange.classification.tree.StopCriteria_common, TreeStopCriteria, "([maxMajority=, minExamples=])") 
     541HIDDEN(TreeStopCriteria_Python - Orange.classification.tree.StopCriteria_Python, TreeStopCriteria) 
    542542NO_PICKLE(TreeStopCriteria_Python) 
    543543 
    544 C_CALL(TreeSplitConstructor_Combined, TreeSplitConstructor, "([examples, [weight, domainContingency, apriorClass, candidates] [discreteTreeSplitConstructor=, continuousTreeSplitConstructor=]) -/-> (Classifier, descriptions, sizes, quality)") 
    545  
    546 ABSTRACT(TreeSplitConstructor_Measure, TreeSplitConstructor) 
    547 C_CALL(TreeSplitConstructor_Attribute, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
    548 C_CALL(TreeSplitConstructor_ExhaustiveBinary, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
    549 C_CALL(TreeSplitConstructor_OneAgainstOthers, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
    550 C_CALL(TreeSplitConstructor_Threshold, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
    551 PYXTRACT_IGNORE C_CALL(TreeSplitConstructor_LR, TreeSplitConstructor, "([minSubset=])") 
    552  
    553 BASED_ON(TreeExampleSplitter, Orange) 
    554  
    555 C_CALL(TreeExampleSplitter_IgnoreUnknowns, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
    556 C_CALL(TreeExampleSplitter_UnknownsToCommon, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
    557 C_CALL(TreeExampleSplitter_UnknownsToAll, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
    558 C_CALL(TreeExampleSplitter_UnknownsToRandom, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
    559 C_CALL(TreeExampleSplitter_UnknownsToBranch, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
    560  
    561 C_CALL(TreeExampleSplitter_UnknownsAsBranchSizes, TreeExampleSplitter, "([branchIndex, node, examples[, weight]]) -/-> (ExampleGenerator, [list of weight ID's])") 
    562 C_CALL(TreeExampleSplitter_UnknownsAsSelector, TreeExampleSplitter, "([branchIndex, node, examples[, weight]]) -/-> (ExampleGenerator, [list of weight ID's])") 
    563  
    564 C_CALL(TreeDescender_UnknownToBranch, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
    565 C_CALL(TreeDescender_UnknownToCommonBranch, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
    566 C_CALL(TreeDescender_UnknownToCommonSelector, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
    567 C_CALL(TreeDescender_UnknownMergeAsBranchSizes, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
    568 C_CALL(TreeDescender_UnknownMergeAsSelector, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
    569  
    570 ABSTRACT(TreePruner, Orange) 
    571 C_CALL (TreePruner_SameMajority, TreePruner, "([tree]) -/-> tree") 
    572 C_CALL (TreePruner_m, TreePruner, "([tree]) -/-> tree") 
     544C_CALL(TreeSplitConstructor_Combined - Orange.classification.tree.SplitConstructor_Combined, TreeSplitConstructor, "([examples, [weight, domainContingency, apriorClass, candidates] [discreteTreeSplitConstructor=, continuousTreeSplitConstructor=]) -/-> (Classifier, descriptions, sizes, quality)") 
     545 
     546ABSTRACT(TreeSplitConstructor_Measure - Orange.classification.tree.SplitConstructor_Measure, TreeSplitConstructor) 
     547C_CALL(TreeSplitConstructor_Attribute - Orange.classification.tree.SplitConstructor_Attribute, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
     548C_CALL(TreeSplitConstructor_ExhaustiveBinary - Orange.classification.tree.SplitConstructor_ExhaustiveBinary, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
     549C_CALL(TreeSplitConstructor_OneAgainstOthers - Orange.classification.tree.SplitConstructor_OneAgainstOthers, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
     550C_CALL(TreeSplitConstructor_Threshold - Orange.classification.tree.SplitConstructor_Threshold, TreeSplitConstructor_Measure, "([measure=, worstAcceptable=, minSubset=])") 
     551PYXTRACT_IGNORE C_CALL(TreeSplitConstructor_LR - Orange.classification.tree.SplitConstructor_LR, TreeSplitConstructor, "([minSubset=])") 
     552 
     553BASED_ON(TreeExampleSplitter - Orange.classification.tree.Splitter, Orange) 
     554 
     555C_CALL(TreeExampleSplitter_IgnoreUnknowns - Orange.classification.tree.Splitter_IgnoreUnknowns, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
     556C_CALL(TreeExampleSplitter_UnknownsToCommon - Orange.classification.tree.Splitter_UnknownsToCommon, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
     557C_CALL(TreeExampleSplitter_UnknownsToAll - Orange.classification.tree.Splitter_UnknownsToAll, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
     558C_CALL(TreeExampleSplitter_UnknownsToRandom - Orange.classification.tree.Splitter_UnknownsToRandom, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
     559C_CALL(TreeExampleSplitter_UnknownsToBranch - Orange.classification.tree.Splitter_UnknownsToBranch, TreeExampleSplitter, "([node, examples[, weight]]) -/-> (ExampleGeneratorList, [list of weight ID's])") 
     560 
     561C_CALL(TreeExampleSplitter_UnknownsAsBranchSizes - Orange.classification.tree.Splitter_UnknownsAsBranchSizes, TreeExampleSplitter, "([branchIndex, node, examples[, weight]]) -/-> (ExampleGenerator, [list of weight ID's])") 
     562C_CALL(TreeExampleSplitter_UnknownsAsSelector - Orange.classification.tree.Splitter_UnknownsAsSelector, TreeExampleSplitter, "([branchIndex, node, examples[, weight]]) -/-> (ExampleGenerator, [list of weight ID's])") 
     563 
     564C_CALL(TreeDescender_UnknownToBranch - Orange.classification.tree.Descender_Unknown, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
     565C_CALL(TreeDescender_UnknownToCommonBranch - Orange.classification.tree.Descender_UnknownToCommonBranch, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
     566C_CALL(TreeDescender_UnknownToCommonSelector - Orange.classification.tree.Descender_UnknownToCommonSelector, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
     567C_CALL(TreeDescender_UnknownMergeAsBranchSizes - Orange.classification.tree.Descender_UnknownMergeAsBranchSizes, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
     568C_CALL(TreeDescender_UnknownMergeAsSelector - Orange.classification.tree.Descender_UnknownMergeAsSelector, TreeDescender, "(node, example) -/-> (node, {distribution | None})") 
     569 
     570ABSTRACT(TreePruner - Orange.classification.tree.Pruner, Orange) 
     571C_CALL (TreePruner_SameMajority - Orange.classification.tree.Pruner_SameMajority, TreePruner, "([tree]) -/-> tree") 
     572C_CALL (TreePruner_m - Orange.classification.tree.Pruner_m, TreePruner, "([tree]) -/-> tree") 
    573573 
    574574 
     
    588588 
    589589 
    590 PyObject *TreeStopCriteria_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "()") 
     590PyObject *TreeStopCriteria_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.tree.StopCriteria, "()") 
    591591{ if (type == (PyTypeObject *)&PyOrTreeStopCriteria_Type) { 
    592592      PyObject *name=NULL; 
     
    672672 
    673673 
    674 PyObject *TreeSplitConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     674PyObject *TreeSplitConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.tree.SplitConstructor, "<abstract>") 
    675675{ if (type == (PyTypeObject *)&PyOrTreeSplitConstructor_Type) 
    676676    return setCallbackFunction(WrapNewOrange(mlnew TTreeSplitConstructor_Python(), type), args); 
     
    734734 
    735735 
    736 PyObject *TreeExampleSplitter_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     736PyObject *TreeExampleSplitter_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.tree.Splitter, "<abstract>") 
    737737{ if (type == (PyTypeObject *)&PyOrTreeExampleSplitter_Type) 
    738738    return setCallbackFunction(WrapNewOrange(mlnew TTreeExampleSplitter_Python(), type), args); 
     
    785785 
    786786 
    787 PyObject *TreeDescender_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     787PyObject *TreeDescender_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.tree.Descender, "<abstract>") 
    788788{ if (type == (PyTypeObject *)&PyOrTreeDescender_Type) 
    789789    return setCallbackFunction(WrapNewOrange(mlnew TMeasureAttribute_Python(), type), args); 
     
    865865PTreeNodeList PTreeNodeList_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PTreeNodeList, TTreeNodeList, PTreeNode, &PyOrTreeNode_Type>::P_FromArguments(arg); } 
    866866PyObject *TreeNodeList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PTreeNodeList, TTreeNodeList, PTreeNode, &PyOrTreeNode_Type>::_FromArguments(type, arg); } 
    867 PyObject *TreeNodeList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of TreeNode>)")  ALLOWS_EMPTY { return ListOfWrappedMethods<PTreeNodeList, TTreeNodeList, PTreeNode, &PyOrTreeNode_Type>::_new(type, arg, kwds); } 
     867PyObject *TreeNodeList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.classification.tree.NodeList, "(<list of TreeNode>)")  ALLOWS_EMPTY { return ListOfWrappedMethods<PTreeNodeList, TTreeNodeList, PTreeNode, &PyOrTreeNode_Type>::_new(type, arg, kwds); } 
    868868PyObject *TreeNodeList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PTreeNodeList, TTreeNodeList, PTreeNode, &PyOrTreeNode_Type>::_getitem(self, index); } 
    869869int       TreeNodeList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PTreeNodeList, TTreeNodeList, PTreeNode, &PyOrTreeNode_Type>::_setitem(self, index, item); } 
     
    895895#include "c4.5.hpp" 
    896896 
    897 C_CALL(C45Learner, Learner, "([examples] [, weight=, gainRatio=, subset=, batch=, probThresh=, minObjs=, window=, increment=, cf=, trials=]) -/-> Classifier") 
    898 C_NAMED(C45Classifier, Classifier, "()") 
     897C_CALL(C45Learner - Orange.classification.tree.C45Learner, Learner, "([examples] [, weight=, gainRatio=, subset=, batch=, probThresh=, minObjs=, window=, increment=, cf=, trials=]) -/-> Classifier") 
     898C_NAMED(C45Classifier - Orange.classification.tree.C45Classifier, Classifier, "()") 
    899899 
    900900PyObject *C45Learner_command_line(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "(line) -> None") 
     
    909909} 
    910910 
    911 C_NAMED(C45TreeNode, Orange, "") 
     911C_NAMED(C45TreeNode - Orange.classification.tree.C45Node, Orange, "") 
    912912 
    913913PC45TreeNodeList PC45TreeNodeList_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PC45TreeNodeList, TC45TreeNodeList, PC45TreeNode, &PyOrC45TreeNode_Type>::P_FromArguments(arg); } 
    914914PyObject *C45TreeNodeList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PC45TreeNodeList, TC45TreeNodeList, PC45TreeNode, &PyOrC45TreeNode_Type>::_FromArguments(type, arg); } 
    915 PyObject *C45TreeNodeList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of C45TreeNode>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PC45TreeNodeList, TC45TreeNodeList, PC45TreeNode, &PyOrC45TreeNode_Type>::_new(type, arg, kwds); } 
     915PyObject *C45TreeNodeList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.classification.tree.C45NodeList, "(<list of C45TreeNode>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PC45TreeNodeList, TC45TreeNodeList, PC45TreeNode, &PyOrC45TreeNode_Type>::_new(type, arg, kwds); } 
    916916PyObject *C45TreeNodeList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PC45TreeNodeList, TC45TreeNodeList, PC45TreeNode, &PyOrC45TreeNode_Type>::_getitem(self, index); } 
    917917int       C45TreeNodeList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PC45TreeNodeList, TC45TreeNodeList, PC45TreeNode, &PyOrC45TreeNode_Type>::_setitem(self, index, item); } 
     
    942942 
    943943#include "knn.hpp" 
    944 C_CALL(kNNLearner, Learner, "([examples] [k=, weightID=, findNearest=] -/-> Classifier") 
    945 C_NAMED(kNNClassifier, ClassifierFD, "(example[, returnWhat]) -> prediction") 
     944C_CALL(kNNLearner - Orange.classification.knn.kNNLearner, Learner, "([examples] [k=, weightID=, findNearest=] -/-> Classifier") 
     945C_NAMED(kNNClassifier - Orange.classification.knn.kNNClassifier, ClassifierFD, "(example[, returnWhat]) -> prediction") 
    946946 
    947947 
     
    952952#include "pnn.hpp" 
    953953 
    954 PyObject *P2NN_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(ClassifierFD, "(examples, anchors[, domain]) -> PNN") 
     954PyObject *P2NN_new(PyTypeObject *type, PyObject *args, PyObject *keywords) BASED_ON(ClassifierFD - Orange.classification.knn.P2NN, "(examples, anchors[, domain]) -> PNN") 
    955955{ 
    956956  PyTRY 
     
    11791179 
    11801180#include "logistic.hpp" 
    1181 C_CALL(LogRegLearner, Learner, "([examples[, weight=]]) -/-> Classifier") 
    1182 C_NAMED(LogRegClassifier, ClassifierFD, "([probabilities=])") 
    1183  
    1184  
    1185 PyObject *LogRegFitter_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1181C_CALL(LogRegLearner - Orange.classification.logreg.LogRegLearner, Learner, "([examples[, weight=]]) -/-> Classifier") 
     1182C_NAMED(LogRegClassifier - Orange.classification.logreg.LogRegClassifier, ClassifierFD, "([probabilities=])") 
     1183 
     1184 
     1185PyObject *LogRegFitter_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.logreg.LogRegFitter, "<abstract>") 
    11861186{ if (type == (PyTypeObject *)&PyOrLogRegFitter_Type) 
    11871187    return setCallbackFunction(WrapNewOrange(mlnew TLogRegFitter_Python(), type), args); 
     
    11961196 
    11971197 
    1198 C_CALL(LogRegFitter_Cholesky, LogRegFitter, "([example[, weightID]]) -/-> (status, beta, beta_se, likelihood) | (status, attribute)") 
     1198C_CALL(LogRegFitter_Cholesky - Orange.classification.logreg.LogRegFitter_Cholesky, LogRegFitter, "([example[, weightID]]) -/-> (status, beta, beta_se, likelihood) | (status, attribute)") 
    11991199 
    12001200PyObject *LogRegLearner_fitModel(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "(examples[, weight])") 
     
    12521252/************ Linear **********/ 
    12531253#include "linear.hpp" 
    1254 C_CALL(LinearLearner, Learner, "([examples] -/-> Classifier)") 
    1255 C_NAMED(LinearClassifier, ClassifierFD, " ") 
     1254C_CALL(LinearLearner - Orange.classification.svm.LinearLearner, Learner, "([examples] -/-> Classifier)") 
     1255C_NAMED(LinearClassifier - Orange.classification.svm.LinearClassifier, ClassifierFD, " ") 
    12561256 
    12571257 
     
    12891289 
    12901290#include "svm.hpp" 
    1291 C_CALL(SVMLearner, Learner, "([examples] -/-> Classifier)") 
    1292 C_CALL(SVMLearnerSparse, SVMLearner, "([examples] -/-> Classifier)") 
    1293 C_NAMED(SVMClassifier, ClassifierFD," ") 
    1294 C_NAMED(SVMClassifierSparse, SVMClassifier," ") 
     1291C_CALL(SVMLearner - Orange.core.SVMLearner, Learner, "([examples] -/-> Classifier)") 
     1292C_CALL(SVMLearnerSparse - Orange.core.SVMLearnerSparse, SVMLearner, "([examples] -/-> Classifier)") 
     1293C_NAMED(SVMClassifier - Orange.classification.svm.SVMClassifier, ClassifierFD," ") 
     1294C_NAMED(SVMClassifierSparse - Orange.classification.svm.SVMClassifierSparse, SVMClassifier," ") 
    12951295 
    12961296PyObject *SVMLearner_setWeights(PyObject *self, PyObject* args, PyObject *keywords) PYARGS(METH_VARARGS, "('list of tuple pairs') -> None") 
     
    13361336} 
    13371337 
    1338 PyObject *KernelFunc_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1338PyObject *KernelFunc_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.kernels.KernelFunc, "<abstract>") 
    13391339{ if (type == (PyTypeObject *)&PyOrKernelFunc_Type) 
    13401340    return setCallbackFunction(WrapNewOrange(mlnew TKernelFunc_Python(), type), args); 
     
    15021502 
    15031503#include "bayes.hpp" 
    1504 C_CALL(BayesLearner, Learner, "([examples], [weight=, estimate=] -/-> Classifier") 
    1505 C_NAMED(BayesClassifier, ClassifierFD, "([probabilities=])") 
     1504C_CALL(BayesLearner - Orange.core.BayesLearner, Learner, "([examples], [weight=, estimate=] -/-> Classifier") 
     1505C_NAMED(BayesClassifier - Orange.core.BayesClassifier, ClassifierFD, "([probabilities=])") 
    15061506 
    15071507PyObject *BayesClassifier_p(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "(class, example) -> float") 
     
    15271527#include "rulelearner.hpp" 
    15281528 
    1529 C_NAMED(Rule, Orange, "()") 
    1530  
    1531 C_NAMED(RuleValidator_LRS, RuleValidator, "([alpha=0.05,min_coverage=0,max_rule_complexity=0,min_quality=numeric_limits<float>::min()])") 
    1532  
    1533 C_NAMED(RuleEvaluator_Entropy, RuleEvaluator, "()") 
    1534 C_NAMED(RuleEvaluator_Laplace, RuleEvaluator, "()") 
    1535 C_NAMED(RuleEvaluator_LRS, RuleEvaluator, "()") 
    1536 C_NAMED(RuleEvaluator_mEVC, RuleEvaluator, "(ruleAlpha=1.0,attributeAlpha=1.0)") 
     1529C_NAMED(Rule - Orange.classification.rules.Rule, Orange, "()") 
     1530 
     1531C_NAMED(RuleValidator_LRS - Orange.classification.rules.RuleValidator_LRS, RuleValidator, "([alpha=0.05,min_coverage=0,max_rule_complexity=0,min_quality=numeric_limits<float>::min()])") 
     1532 
     1533C_NAMED(RuleEvaluator_Entropy - Orange.classification.rules.RuleEvaluator_Entropy, RuleEvaluator, "()") 
     1534C_NAMED(RuleEvaluator_Laplace - Orange.classification.rules.RuleEvaluator_Laplace, RuleEvaluator, "()") 
     1535C_NAMED(RuleEvaluator_LRS - Orange.classification.rules.RuleEvaluator_LRS, RuleEvaluator, "()") 
     1536C_NAMED(RuleEvaluator_mEVC - Orange.classification.rules.RuleEvaluator_mEVC, RuleEvaluator, "(ruleAlpha=1.0,attributeAlpha=1.0)") 
    15371537 
    15381538C_NAMED(EVDist, Orange, "()") 
    15391539C_NAMED(EVDistGetter_Standard, EVDistGetter, "()") 
    15401540 
    1541 C_NAMED(RuleBeamFinder, RuleFinder, "([validator=, evaluator=, initializer=, refiner=, candidateSelector=, ruleFilter=])") 
    1542  
    1543 C_NAMED(RuleBeamInitializer_Default, RuleBeamInitializer, "()") 
    1544  
    1545 C_NAMED(RuleBeamRefiner_Selector, RuleBeamRefiner, "([discretization=])") 
    1546  
    1547 C_NAMED(RuleBeamCandidateSelector_TakeAll, RuleBeamCandidateSelector, "()") 
    1548  
    1549 C_NAMED(RuleBeamFilter_Width, RuleBeamFilter, "([width=5])") 
    1550  
    1551 C_NAMED(RuleDataStoppingCriteria_NoPositives, RuleDataStoppingCriteria, "()") 
    1552  
    1553 C_NAMED(RuleCovererAndRemover_Default, RuleCovererAndRemover, "()") 
    1554  
    1555 C_NAMED(RuleStoppingCriteria_NegativeDistribution, RuleStoppingCriteria, "()") 
    1556 C_CALL(RuleLearner, Learner, "([examples[, weightID]]) -/-> Classifier") 
    1557  
    1558 ABSTRACT(RuleClassifier, Classifier) 
    1559 C_NAMED(RuleClassifier_firstRule, RuleClassifier, "([rules,examples[,weightID]])") 
    1560 C_NAMED(RuleClassifier_logit, RuleClassifier, "([rules,minSig,minBeta,examples[,weightID]])") 
     1541C_NAMED(RuleBeamFinder - Orange.classification.rules.RuleBeamFinder, RuleFinder, "([validator=, evaluator=, initializer=, refiner=, candidateSelector=, ruleFilter=])") 
     1542 
     1543C_NAMED(RuleBeamInitializer_Default - Orange.classification.rules.RuleBeamInitializer_Default, RuleBeamInitializer, "()") 
     1544 
     1545C_NAMED(RuleBeamRefiner_Selector - Orange.classification.rules.RuleBeamRefiner_Selector, RuleBeamRefiner, "([discretization=])") 
     1546 
     1547C_NAMED(RuleBeamCandidateSelector_TakeAll - Orange.classification.rules.RuleBeamCandidateSelector_TakeAll, RuleBeamCandidateSelector, "()") 
     1548 
     1549C_NAMED(RuleBeamFilter_Width - Orange.classification.rules.RuleBeamFilter_Width, RuleBeamFilter, "([width=5])") 
     1550 
     1551C_NAMED(RuleDataStoppingCriteria_NoPositives - Orange.classification.rules.RuleDataStoppingCriteria_NoPositives, RuleDataStoppingCriteria, "()") 
     1552 
     1553C_NAMED(RuleCovererAndRemover_Default - Orange.classification.rules.RuleCovererAndRemover_Default, RuleCovererAndRemover, "()") 
     1554 
     1555C_NAMED(RuleStoppingCriteria_NegativeDistribution - Orange.classification.rules.RuleStoppingCriteria_NegativeDistribution, RuleStoppingCriteria, "()") 
     1556C_CALL(RuleLearner - Orange.classification.rules.RuleLearner, Learner, "([examples[, weightID]]) -/-> Classifier") 
     1557 
     1558ABSTRACT(RuleClassifier - Orange.classification.rules.RuleClassifier, Classifier) 
     1559C_NAMED(RuleClassifier_firstRule - Orange.classification.rules.RuleClassifier_firstRule, RuleClassifier, "([rules,examples[,weightID]])") 
     1560C_NAMED(RuleClassifier_logit - Orange.classification.rules.RuleClassifier_logit, RuleClassifier, "([rules,minSig,minBeta,examples[,weightID]])") 
    15611561 
    15621562PyObject *Rule_call(PyObject *self, PyObject *args, PyObject *keywords) 
     
    15991599} 
    16001600 
    1601 PyObject *RuleEvaluator_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1601PyObject *RuleEvaluator_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleEvaluator, "<abstract>") 
    16021602{ if (type == (PyTypeObject *)&PyOrRuleEvaluator_Type) 
    16031603    return setCallbackFunction(WrapNewOrange(mlnew TRuleEvaluator_Python(), type), args); 
     
    16631663} 
    16641664 
    1665 PyObject *RuleValidator_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1665PyObject *RuleValidator_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleValidator, "<abstract>") 
    16661666{ if (type == (PyTypeObject *)&PyOrRuleValidator_Type) 
    16671667    return setCallbackFunction(WrapNewOrange(mlnew TRuleValidator_Python(), type), args); 
     
    16981698} 
    16991699 
    1700 PyObject *RuleCovererAndRemover_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1700PyObject *RuleCovererAndRemover_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleCovererAndRemover, "<abstract>") 
    17011701{ if (type == (PyTypeObject *)&PyOrRuleCovererAndRemover_Type) 
    17021702    return setCallbackFunction(WrapNewOrange(mlnew TRuleCovererAndRemover_Python(), type), args); 
     
    17311731} 
    17321732 
    1733 PyObject *RuleStoppingCriteria_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1733PyObject *RuleStoppingCriteria_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleStoppingCriteria, "<abstract>") 
    17341734{ if (type == (PyTypeObject *)&PyOrRuleStoppingCriteria_Type) 
    17351735    return setCallbackFunction(WrapNewOrange(mlnew TRuleStoppingCriteria_Python(), type), args); 
     
    17631763} 
    17641764 
    1765 PyObject *RuleDataStoppingCriteria_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1765PyObject *RuleDataStoppingCriteria_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleDataStoppingCriteria, "<abstract>") 
    17661766{ if (type == (PyTypeObject *)&PyOrRuleDataStoppingCriteria_Type) 
    17671767    return setCallbackFunction(WrapNewOrange(mlnew TRuleDataStoppingCriteria_Python(), type), args); 
     
    17941794} 
    17951795 
    1796 PyObject *RuleFinder_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1796PyObject *RuleFinder_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleFinder, "<abstract>") 
    17971797{ if (type == (PyTypeObject *)&PyOrRuleFinder_Type) 
    17981798    return setCallbackFunction(WrapNewOrange(mlnew TRuleFinder_Python(), type), args); 
     
    18261826} 
    18271827 
    1828 PyObject *RuleBeamRefiner_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1828PyObject *RuleBeamRefiner_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleBeamRefiner, "<abstract>") 
    18291829{ if (type == (PyTypeObject *)&PyOrRuleBeamRefiner_Type) 
    18301830    return setCallbackFunction(WrapNewOrange(mlnew TRuleBeamRefiner_Python(), type), args); 
     
    18581858} 
    18591859 
    1860 PyObject *RuleBeamInitializer_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1860PyObject *RuleBeamInitializer_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleBeamInitializer, "<abstract>") 
    18611861{ if (type == (PyTypeObject *)&PyOrRuleBeamInitializer_Type) 
    18621862    return setCallbackFunction(WrapNewOrange(mlnew TRuleBeamInitializer_Python(), type), args); 
     
    18941894} 
    18951895 
    1896 PyObject *RuleBeamCandidateSelector_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1896PyObject *RuleBeamCandidateSelector_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleBeamCandidateSelector, "<abstract>") 
    18971897{ if (type == (PyTypeObject *)&PyOrRuleBeamCandidateSelector_Type) 
    18981898    return setCallbackFunction(WrapNewOrange(mlnew TRuleBeamCandidateSelector_Python(), type), args); 
     
    19261926} 
    19271927 
    1928 PyObject *RuleBeamFilter_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1928PyObject *RuleBeamFilter_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleBeamFilter, "<abstract>") 
    19291929{ if (type == (PyTypeObject *)&PyOrRuleBeamFilter_Type) 
    19301930    return setCallbackFunction(WrapNewOrange(mlnew TRuleBeamFilter_Python(), type), args); 
     
    19571957} 
    19581958 
    1959 PyObject *RuleClassifierConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange, "<abstract>") 
     1959PyObject *RuleClassifierConstructor_new(PyTypeObject *type, PyObject *args, PyObject *keywords)  BASED_ON(Orange - Orange.classification.rules.RuleClassifierConstructor, "<abstract>") 
    19601960{ if (type == (PyTypeObject *)&PyOrRuleClassifierConstructor_Type) 
    19611961    return setCallbackFunction(WrapNewOrange(mlnew TRuleClassifierConstructor_Python(), type), args); 
  • source/orange/lib_preprocess.cpp

    r6531 r7715  
    5252 
    5353 
    54 ABSTRACT(Discretizer, TransformValue) 
    55 C_NAMED(EquiDistDiscretizer, Discretizer, "([numberOfIntervals=, firstCut=, step=])") 
    56 C_NAMED(IntervalDiscretizer, Discretizer, "([points=])") 
    57 C_NAMED(ThresholdDiscretizer, Discretizer, "([threshold=])") 
    58 C_NAMED(BiModalDiscretizer, Discretizer, "([low=, high=])") 
    59  
    60 ABSTRACT(Discretization, Orange) 
    61 C_CALL (EquiDistDiscretization, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
    62 C_CALL (   EquiNDiscretization, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
    63 C_CALL ( EntropyDiscretization, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
    64 C_CALL ( BiModalDiscretization, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
     54ABSTRACT(Discretizer - Orange.feature.discretization.Discretizer, TransformValue) 
     55C_NAMED(EquiDistDiscretizer - Orange.feature.discretization.EquiDistDiscretizer, Discretizer, "([numberOfIntervals=, firstCut=, step=])") 
     56C_NAMED(IntervalDiscretizer - Orange.feature.discretization.IntervalDiscretizer, Discretizer, "([points=])") 
     57C_NAMED(ThresholdDiscretizer - Orange.feature.discretization.ThresholdDiscretizer, Discretizer, "([threshold=])") 
     58C_NAMED(BiModalDiscretizer - Orange.feature.discretization.BiModalDiscretizer, Discretizer, "([low=, high=])") 
     59 
     60ABSTRACT(Discretization - Orange.feature.discretization.Discretization, Orange) 
     61C_CALL (EquiDistDiscretization - Orange.feature.discretization.EquiDistDiscretization, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
     62C_CALL (   EquiNDiscretization - Orange.feature.discretization.EquiNDiscretization, Discretization, "() | (attribute, examples[, weight, numberOfIntervals=]) -/-> Variable") 
     63C_CALL ( EntropyDiscretization - Orange.feature.discretization.EntropyDiscretization, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
     64C_CALL ( BiModalDiscretization - Orange.feature.discretization.BiModalDiscretization, Discretization, "() | (attribute, examples[, weight]) -/-> Variable") 
    6565 
    6666 
     
    116116 
    117117C_NAMED(MapIntValue, TransformValue, "([mapping=])") 
    118 C_NAMED(Discrete2Continuous, TransformValue, "([value=])") 
     118C_NAMED(Discrete2Continuous - Orange.feature.discretization.Discrete2Continuous, TransformValue, "([value=])") 
    119119C_NAMED(Ordinal2Continuous, TransformValue, "([nvalues=])") 
    120120C_NAMED(NormalizeContinuous, TransformValue, "([average=, span=])") 
    121121 
    122 C_NAMED(DomainContinuizer, Orange, "(domain|examples, convertClass=, invertClass=, zeroBased=, normalizeContinuous=, baseValueSelection=) -/-> Domain") 
     122C_NAMED(DomainContinuizer - Orange.feature.DomainContinuizer, Orange, "(domain|examples, convertClass=, invertClass=, zeroBased=, normalizeContinuous=, baseValueSelection=) -/-> Domain") 
    123123 
    124124int getTargetClass(PVariable classVar, PyObject *pyval) 
     
    13971397#include "dist_clustering.hpp" 
    13981398 
    1399 ABSTRACT(ExampleDistConstructor, Orange) 
    1400 C_CALL(ExampleDistBySorting, ExampleDistConstructor, "([examples, bound-attrs[, weightID]]) -/-> ExampleDistVector") 
    1401 BASED_ON(ExampleDistVector, Orange) 
     1399ABSTRACT(ExampleDistConstructor - Orange.distances.ExampleDistConstructor, Orange) 
     1400C_CALL(ExampleDistBySorting - Orange.distances.ExampleDistBySorting, ExampleDistConstructor, "([examples, bound-attrs[, weightID]]) -/-> ExampleDistVector") 
     1401BASED_ON(ExampleDistVector - Orange.distances.ExampleDistVector, Orange) 
    14021402ABSTRACT(ClustersFromDistributions, Orange) 
    14031403C_CALL(ClustersFromDistributionsByAssessor, ClustersFromDistributions, "([example-dist-vector] [minProfitProportion=, distributionAssessor=, stopCriterion=]) -/-> DistClustering") 
  • source/orange/lib_vectors.cpp

    r6796 r7715  
    3333PBoolList PBoolList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PBoolList, TBoolList, bool>::P_FromArguments(arg); } 
    3434PyObject *BoolList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PBoolList, TBoolList, bool>::_FromArguments(type, arg); } 
    35 PyObject *BoolList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of bool>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PBoolList, TBoolList, bool>::_new(type, arg, kwds); } 
     35PyObject *BoolList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.BoolList, "(<list of bool>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PBoolList, TBoolList, bool>::_new(type, arg, kwds); } 
    3636PyObject *BoolList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PBoolList, TBoolList, bool>::_getitem(self, index); } 
    3737int       BoolList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PBoolList, TBoolList, bool>::_setitem(self, index, item); } 
     
    6565PIntList PIntList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PIntList, TIntList, int>::P_FromArguments(arg); } 
    6666PyObject *IntList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PIntList, TIntList, int>::_FromArguments(type, arg); } 
    67 PyObject *IntList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of int>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PIntList, TIntList, int>::_new(type, arg, kwds); } 
     67PyObject *IntList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.IntList, "(<list of int>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PIntList, TIntList, int>::_new(type, arg, kwds); } 
    6868PyObject *IntList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PIntList, TIntList, int>::_getitem(self, index); } 
    6969int       IntList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PIntList, TIntList, int>::_setitem(self, index, item); } 
     
    9797PFloatList PFloatList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PFloatList, TFloatList, float>::P_FromArguments(arg); } 
    9898PyObject *FloatList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PFloatList, TFloatList, float>::_FromArguments(type, arg); } 
    99 PyObject *FloatList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of float>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PFloatList, TFloatList, float>::_new(type, arg, kwds); } 
     99PyObject *FloatList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.FloatList, "(<list of float>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PFloatList, TFloatList, float>::_new(type, arg, kwds); } 
    100100PyObject *FloatList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PFloatList, TFloatList, float>::_getitem(self, index); } 
    101101int       FloatList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PFloatList, TFloatList, float>::_setitem(self, index, item); } 
     
    128128PFloatListList PFloatListList_FromArguments(PyObject *arg) { return ListOfWrappedMethods<PFloatListList, TFloatListList, PFloatList, &PyOrFloatList_Type>::P_FromArguments(arg); } 
    129129PyObject *FloatListList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfWrappedMethods<PFloatListList, TFloatListList, PFloatList, &PyOrFloatList_Type>::_FromArguments(type, arg); } 
    130 PyObject *FloatListList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of FloatList>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PFloatListList, TFloatListList, PFloatList, &PyOrFloatList_Type>::_new(type, arg, kwds); } 
     130PyObject *FloatListList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.FloatListList, "(<list of FloatList>)") ALLOWS_EMPTY { return ListOfWrappedMethods<PFloatListList, TFloatListList, PFloatList, &PyOrFloatList_Type>::_new(type, arg, kwds); } 
    131131PyObject *FloatListList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfWrappedMethods<PFloatListList, TFloatListList, PFloatList, &PyOrFloatList_Type>::_getitem(self, index); } 
    132132int       FloatListList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfWrappedMethods<PFloatListList, TFloatListList, PFloatList, &PyOrFloatList_Type>::_setitem(self, index, item); } 
     
    160160PStringList PStringList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PStringList, TStringList, string>::P_FromArguments(arg); } 
    161161PyObject *StringList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PStringList, TStringList, string>::_FromArguments(type, arg); } 
    162 PyObject *StringList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of string>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PStringList, TStringList, string>::_new(type, arg, kwds); } 
     162PyObject *StringList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.StringList, "(<list of string>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PStringList, TStringList, string>::_new(type, arg, kwds); } 
    163163PyObject *StringList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PStringList, TStringList, string>::_getitem(self, index); } 
    164164int       StringList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PStringList, TStringList, string>::_setitem(self, index, item); } 
     
    192192PLongList PLongList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PLongList, TLongList, long>::P_FromArguments(arg); } 
    193193PyObject *LongList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PLongList, TLongList, long>::_FromArguments(type, arg); } 
    194 PyObject *LongList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of int>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PLongList, TLongList, long>::_new(type, arg, kwds); } 
     194PyObject *LongList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.LongList, "(<list of int>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PLongList, TLongList, long>::_new(type, arg, kwds); } 
    195195PyObject *LongList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PLongList, TLongList, long>::_getitem(self, index); } 
    196196int       LongList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PLongList, TLongList, long>::_setitem(self, index, item); } 
     
    224224PAlignmentList PAlignmentList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PAlignmentList, TAlignmentList, TAlignment>::P_FromArguments(arg); } 
    225225PyObject *AlignmentList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PAlignmentList, TAlignmentList, TAlignment>::_FromArguments(type, arg); } 
    226 PyObject *AlignmentList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of Alignment>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PAlignmentList, TAlignmentList, TAlignment>::_new(type, arg, kwds); } 
     226PyObject *AlignmentList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.AlignmentList, "(<list of Alignment>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PAlignmentList, TAlignmentList, TAlignment>::_new(type, arg, kwds); } 
    227227PyObject *AlignmentList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PAlignmentList, TAlignmentList, TAlignment>::_getitem(self, index); } 
    228228int       AlignmentList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PAlignmentList, TAlignmentList, TAlignment>::_setitem(self, index, item); } 
     
    256256PIntFloatList PIntFloatList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PIntFloatList, TIntFloatList, pair<int, float> >::P_FromArguments(arg); } 
    257257PyObject *IntFloatList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PIntFloatList, TIntFloatList, pair<int, float> >::_FromArguments(type, arg); } 
    258 PyObject *IntFloatList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of tuple(int, float)>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PIntFloatList, TIntFloatList, pair<int, float> >::_new(type, arg, kwds); } 
     258PyObject *IntFloatList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.IntFloatList, "(<list of tuple(int, float)>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PIntFloatList, TIntFloatList, pair<int, float> >::_new(type, arg, kwds); } 
    259259PyObject *IntFloatList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PIntFloatList, TIntFloatList, pair<int, float> >::_getitem(self, index); } 
    260260int       IntFloatList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PIntFloatList, TIntFloatList, pair<int, float> >::_setitem(self, index, item); } 
     
    288288PFloatFloatList PFloatFloatList_FromArguments(PyObject *arg) { return ListOfUnwrappedMethods<PFloatFloatList, TFloatFloatList, pair<float, float> >::P_FromArguments(arg); } 
    289289PyObject *FloatFloatList_FromArguments(PyTypeObject *type, PyObject *arg) { return ListOfUnwrappedMethods<PFloatFloatList, TFloatFloatList, pair<float, float> >::_FromArguments(type, arg); } 
    290 PyObject *FloatFloatList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of tuple(float, float)>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PFloatFloatList, TFloatFloatList, pair<float, float> >::_new(type, arg, kwds); } 
     290PyObject *FloatFloatList_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange - Orange.core.FloatFloatList, "(<list of tuple(float, float)>)") ALLOWS_EMPTY { return ListOfUnwrappedMethods<PFloatFloatList, TFloatFloatList, pair<float, float> >::_new(type, arg, kwds); } 
    291291PyObject *FloatFloatList_getitem_sq(TPyOrange *self, Py_ssize_t index) { return ListOfUnwrappedMethods<PFloatFloatList, TFloatFloatList, pair<float, float> >::_getitem(self, index); } 
    292292int       FloatFloatList_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return ListOfUnwrappedMethods<PFloatFloatList, TFloatFloatList, pair<float, float> >::_setitem(self, index, item); } 
  • source/pyxtract/defvectors.py

    r6538 r7715  
    77$wrappedlistname$ P$pyname$_FromArguments(PyObject *arg) { return $classname$::P_FromArguments(arg); } 
    88PyObject *$pyname$_FromArguments(PyTypeObject *type, PyObject *arg) { return $classname$::_FromArguments(type, arg); } 
    9 PyObject *$pyname$_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange, "(<list of $pyelement$>)") ALLOWS_EMPTY { return $classname$::_new(type, arg, kwds); } 
     9PyObject *$pyname$_new(PyTypeObject *type, PyObject *arg, PyObject *kwds) BASED_ON(Orange$displayname, "(<list of $pyelement$>)") ALLOWS_EMPTY { return $classname$::_new(type, arg, kwds); } 
    1010PyObject *$pyname$_getitem_sq(TPyOrange *self, Py_ssize_t index) { return $classname$::_getitem(self, index); } 
    1111int       $pyname$_setitem_sq(TPyOrange *self, Py_ssize_t index, PyObject *item) { return $classname$::_setitem(self, index, item); } 
     
    4747outf = open("lib_vectors_auto.txt", "wt") 
    4848 
    49 def normalList(name, goesto): 
    50   return tuple([x % name for x in ("%sList", "%s", "P%sList", "T%sList", "P%s")] + [goesto]) 
     49def normalList(displayname, name, goesto): 
     50  return (displayname,) + tuple([x % name for x in ("%sList", "%s", "P%sList", "T%sList", "P%s")] + [goesto]) 
    5151 
    5252 
    5353#  list name in Python,    element name in Py, wrapped list name in C, list name in C,         list element name in C, interface file 
    54 for (pyname, pyelementname, wrappedlistname, listname, elementname, goesto) in \ 
    55   [("ValueList",           "Value",            "PValueList",           "TValueList",           "TValue",               "cls_value.cpp"), 
    56    ("VarList",             "Variable",         "PVarList",             "TVarList",             "PVariable",            "lib_kernel.cpp"), 
    57    ("VarListList",         "VarList",          "PVarListList",         "TVarListList",         "PVarList",             "lib_kernel.cpp"), 
    58    ("DomainDistributions", "Distribution",     "PDomainDistributions", "TDomainDistributions", "PDistribution",        "lib_kernel.cpp"), 
    59    normalList("Distribution", "lib_kernel.cpp"), 
    60    normalList("ExampleGenerator", "lib_kernel.cpp"), 
    61    normalList("Classifier", "lib_kernel.cpp"), 
     54for (displayname, pyname, pyelementname, wrappedlistname, listname, elementname, goesto) in \ 
     55  [("",                               "ValueList",           "Value",            "PValueList",           "TValueList",           "TValue",               "cls_value.cpp"), 
     56   ("Orange.data.variable.Variables", "VarList",             "Variable",         "PVarList",             "TVarList",             "PVariable",            "lib_kernel.cpp"), 
     57   ("",                               "VarListList",         "VarList",          "PVarListList",         "TVarListList",         "PVarList",             "lib_kernel.cpp"), 
     58   ("",                               "DomainDistributions", "Distribution",     "PDomainDistributions", "TDomainDistributions", "PDistribution",        "lib_kernel.cpp"), 
     59   normalList("", "Distribution", "lib_kernel.cpp"), 
     60   normalList("", "ExampleGenerator", "lib_kernel.cpp"), 
     61   normalList("Orange.classification.ClassifierList", "Classifier", "lib_kernel.cpp"), 
    6262    
    63    ("DomainBasicAttrStat", "BasicAttrStat",    "PDomainBasicAttrStat", "TDomainBasicAttrStat", "PBasicAttrStat",       "lib_components.cpp"), 
    64    ("DomainContingency",   "Contingency",      "PDomainContingency",   "TDomainContingency",   "PContingencyClass",    "lib_components.cpp"), 
    65    normalList("ValueFilter", "lib_components.cpp"), 
    66    normalList("Filter", "lib_components.cpp"), 
    67    normalList("HierarchicalCluster", "lib_components.cpp"), 
     63   ("",                               "DomainBasicAttrStat", "BasicAttrStat",    "PDomainBasicAttrStat", "TDomainBasicAttrStat", "PBasicAttrStat",       "lib_components.cpp"), 
     64   ("",                               "DomainContingency",   "Contingency",      "PDomainContingency",   "TDomainContingency",   "PContingencyClass",    "lib_components.cpp"), 
     65   normalList("", "ValueFilter", "lib_components.cpp"), 
     66   normalList("", "Filter", "lib_components.cpp"), 
     67   normalList("Orange.clustering.hierarchical.HierarchicalClusterList", "HierarchicalCluster", "lib_components.cpp"), 
    6868    
    69    ("AssociationRules",    "AssociationRule",  "PAssociationRules",    "TAssociationRules",    "PAssociationRule",     "lib_learner.cpp"), 
    70    normalList("TreeNode", "lib_learner.cpp"), 
    71    normalList("C45TreeNode", "lib_learner.cpp"), 
    72    normalList("Rule", "lib_learner.cpp"), 
    73    normalList("ConditionalProbabilityEstimator", "lib_components.cpp"), 
    74    normalList("ProbabilityEstimator", "lib_components.cpp"), 
    75    normalList("EVDist", "lib_learner.cpp"), 
     69   ("Orange.associate.AssociationRules",  "AssociationRules", "AssociationRule",  "PAssociationRules",    "TAssociationRules",    "PAssociationRule",     "lib_learner.cpp"), 
     70   normalList("Orange.classification.tree.NodeList", "TreeNode", "lib_learner.cpp"), 
     71   normalList("Orange.classification.tree.C45NodeList", "C45TreeNode", "lib_learner.cpp"), 
     72   normalList("Orange.classification.rules.RuleList", "Rule", "lib_learner.cpp"), 
     73   normalList("", "ConditionalProbabilityEstimator", "lib_components.cpp"), 
     74   normalList("", "ProbabilityEstimator", "lib_components.cpp"), 
     75   normalList("", "EVDist", "lib_learner.cpp"), 
    7676 
    77    normalList("Heatmap", "orangene.cpp"), 
    78    normalList("SOMNode", "som.cpp") 
     77   normalList("", "Heatmap", "orangene.cpp"), 
     78   normalList("", "SOMNode", "som.cpp") 
    7979   ]: 
    8080  outf.write("**** This goes to '%s' ****\n" % goesto) 
    81   outf.write(wdefinition.replace("$pyname$", pyname) 
     81  outf.write(wdefinition.replace("$displayname", ((" - "+displayname) if displayname else "")) 
     82                        .replace("$pyname$", pyname) 
    8283                        .replace("$classname$", "ListOfWrappedMethods<%s, %s, %s, &PyOr%s_Type>" % (wrappedlistname, listname, elementname, pyelementname)) 
    83                        .replace("$pyelement$", pyelementname) 
    84                        .replace("$wrappedlistname$", wrappedlistname) 
    85                        .replace(">>", "> >") 
     84                        .replace("$pyelement$", pyelementname) 
     85                        .replace("$wrappedlistname$", wrappedlistname) 
     86                        .replace(">>", "> >") 
    8687             +"\n\n" 
    8788            ) 
     
    147148 
    148149  outfile.write((wrapped and wdefinition or udefinition) 
     150                       .replace("$displayname", " - Orange.core."+pyname) 
    149151                       .replace("$pyname$", pyname) 
    150152                       .replace("$classname$", classname) 
  • source/pyxtract/pyxtract.py

    r7704 r7715  
    101101if 1: ### Definitions of regular expressions 
    102102 
    103   constrdef_mac=re.compile(r'(?P<constype>ABSTRACT|C_UNNAMED|C_NAMED|C_CALL)\s*\(\s*(?P<typename>\w*)\s*,\s*(?P<basename>\w*\s*)\s*(,\s*"(?P<doc>[^"]*)")?\s*\)') 
    104   constrdef_mac_call3=re.compile(r'(?P<constype>C_CALL3)\s*\(\s*(?P<typename>\w*)\s*,\s*(?P<callname>\w*\s*)\s*,\s*(?P<basename>\w*\s*)\s*(,\s*"(?P<doc>[^"]*)")?\s*\)') 
     103  constrdef_mac=re.compile(r'(?P<constype>ABSTRACT|C_UNNAMED|C_NAMED|C_CALL)\s*\(\s*(?P<typename>\w*)\s*(-\s*(?P<displayname>\S*))?,\s*(?P<basename>\w*\s*)\s*(,\s*"(?P<doc>[^"]*)")?\s*\)') 
     104  constrdef_mac_call3=re.compile(r'(?P<constype>C_CALL3)\s*\(\s*(?P<typename>\w*)\s*(-\s*(?P<displayname>\S*))?,\s*(?P<callname>\w*\s*)\s*,\s*(?P<basename>\w*\s*)\s*(,\s*"(?P<doc>[^"]*)")?\s*\)') 
    105105  constrkeywords = re.compile(r'CONSTRUCTOR_KEYWORDS\s*\(\s*(?P<typename>\w*)\s*, \s*"(?P<keywords>[^"]*)"\s*\)') 
    106106  nopickle=re.compile(r"NO_PICKLE\s*\(\s*(?P<typename>\w*)\s*\)") 
    107107  constrwarndef=re.compile(r"[^\w](ABSTRACT|CONS|C_UNNAMED|C_NAMED|C_CALL)[^\w]") 
    108108 
    109   datastructuredef=re.compile(r'DATASTRUCTURE\s*\(\s*(?P<typename>\w*)\s*,\s*(?P<structurename>\w*)\s*,\s*(?P<dictfield>\w*)\s*\)') 
    110   newbasedondef=re.compile(r'(inline)?\s*PyObject\s*\*(?P<typename>\w*)_new\s*\([^)]*\)\s*BASED_ON\s*\(\s*(?P<basename>\w*)\s*,\s*"(?P<doc>[^"]*)"\s*\)\s*(?P<allows_empty_args>ALLOWS_EMPTY)?') 
    111   basedondef=re.compile(r'BASED_ON\s*\(\s*(?P<typename>\w*)\s*,\s*(?P<basename>\w*)\s*\)') 
    112   hiddendef=re.compile(r'HIDDEN\s*\(\s*(?P<typename>\w*)\s*,\s*(?P<basename>\w*)\s*\)') 
     109  datastructuredef=re.compile(r'DATASTRUCTURE\s*\(\s*(?P<typename>\w*)\s*(-\s*(?P<displayname>\S*))?,\s*(?P<structurename>\w*)\s*,\s*(?P<dictfield>\w*)\s*\)') 
     110  newbasedondef=re.compile(r'(inline)?\s*PyObject\s*\*(?P<typename>\w*)_new\s*\([^)]*\)\s*BASED_ON\s*\(\s*(?P<basename>\w*)\s*(-\s*(?P<displayname>\S*))?,\s*"(?P<doc>[^"]*)"\s*\)\s*(?P<allows_empty_args>ALLOWS_EMPTY)?') 
     111  basedondef=re.compile(r'BASED_ON\s*\(\s*(?P<typename>\w*)\s*(-\s*(?P<displayname>\S*))?,\s*(?P<basename>\w*)\s*\)') 
     112  hiddendef=re.compile(r'HIDDEN\s*\(\s*(?P<typename>\w*)\s*(-\s*(?P<displayname>\S*))?,\s*(?P<basename>\w*)\s*\)') 
    113113   
    114114 
     
    169169    found=constrdef_mac_call3.search(line) 
    170170  if found: 
    171     typename, basename, constype, doc=found.group("typename", "basename", "constype", "doc") 
     171    typename, basename, constype, doc, displayname =found.group("typename", "basename", "constype", "doc", "displayname") 
    172172    printV2("%s (%s): Macro constructor %s", (typename, basename, constype)) 
    173     addClassDef(classdefs, typename, parsedFile, "basetype", basename) 
     173    addClassDef(classdefs, typename, parsedFile, "basetype", basename, displayname=displayname) 
    174174    if constype=="ABSTRACT": 
    175175      classdefs[typename].abstract = True 
     
    292292  found=datastructuredef.search(line) 
    293293  if found: 
    294     typename, structurename, dictfield = found.group("typename", "structurename", "dictfield") 
    295     addClassDef(classdefs, typename, parsedFile, "datastructure", structurename) 
     294    typename, structurename, dictfield, displayname = found.group("typename", "structurename", "dictfield", "displayname") 
     295    addClassDef(classdefs, typename, parsedFile, "datastructure", structurename, displayname=displayname) 
    296296    addClassDef(classdefs, typename, parsedFile, "dictfield", dictfield, 0) 
    297297    printV2("%s: definition/declaration of datastructure", typename) 
     
    300300  found=newbasedondef.match(line) 
    301301  if found: 
    302     typename, basename, doc = found.group("typename", "basename", "doc") 
     302    typename, basename, doc, displayname = found.group("typename", "basename", "doc", "displayname") 
    303303    allows_empty_args = bool(found.group("allows_empty_args")) 
    304     addClassDef(classdefs, typename, parsedFile, "basetype", basename, 0) 
     304    addClassDef(classdefs, typename, parsedFile, "basetype", basename, 0, displayname) 
    305305    addClassDef(classdefs, typename, parsedFile, "constructor", ConstructorDefinition(arguments=doc, type="MANUAL", allows_empty_args=allows_empty_args)) 
    306306    return 1 
     
    308308  found=basedondef.match(line) 
    309309  if found: 
    310     typename, basename = found.group("typename", "basename") 
    311     addClassDef(classdefs, typename, parsedFile, "basetype", basename, 0) 
     310    typename, basename, displayname = found.group("typename", "basename", "displayname") 
     311    addClassDef(classdefs, typename, parsedFile, "basetype", basename, 0, displayname) 
    312312    return 1 
    313313 
    314314  found=hiddendef.match(line) 
    315315  if found: 
    316     typename, basename = found.group("typename", "basename") 
    317     addClassDef(classdefs, typename, parsedFile, "basetype", basename, 0) 
     316    typename, basename, displayname = found.group("typename", "basename", "displayname") 
     317    addClassDef(classdefs, typename, parsedFile, "basetype", basename, 0, displayname=displayname) 
    318318    classdefs[typename].hidden = 1 
    319319    return 1 
     
    745745    outfile.write('  PyObject_HEAD_INIT((_typeobject *)&PyType_Type)\n') 
    746746    outfile.write('  0,\n') 
    747     outfile.write('  "%s.%s",\n' % (modulename, type)) 
     747    if getattr(fields, "displayname", None): 
     748        outfile.write('  "%s",\n' % fields.displayname) 
     749    else: 
     750        outfile.write('  "%s.%s",\n' % (modulename, type)) 
    748751    outfile.write('  sizeof(%s), 0,\n' % fields.datastructure) 
    749752    innulls=writeslots(specialmethods, 1) 
  • source/pyxtract/pyxtractstructures.py

    r6538 r7715  
    5959     
    6060 
    61 def addClassDef(cds, typename, parsedFile, str="", val=1, warn=1): 
     61def addClassDef(cds, typename, parsedFile, str="", val=1, warn=1, displayname=None): 
    6262  """ 
    6363  If class is not been encountered yet, it creates a new class definition. 
     
    6868  if not cds.has_key(typename): 
    6969    if str: 
    70       cds[typename]=apply(ClassDefinition, (), {str:val, 'infile':parsedFile}) 
     70      cds[typename]=ClassDefinition(**{str:val, 'infile':parsedFile}) 
    7171    else: 
    7272      cds[typename]=ClassDefinition(infile=parsedFile) 
     
    7777    if parsedFile and cds[typename].infile!=parsedFile: 
    7878      print ("Warning: %s appears in different files (%s, %s)" % (typename, cds[typename].infile, parsedFile)) 
     79  if displayname: 
     80      cds[typename].displayname = displayname 
Note: See TracChangeset for help on using the changeset viewer.