Ignore:
Files:
12 deleted
261 edited

Legend:

Unmodified
Added
Removed
  • .hgtags

    r11554 r11690  
    778adaabe1a15bdc88d3baa633042c02c1a7bc7fa9 2.6.1 
    8819b97395b702366db35cc58615e3d016ce1c9701 2.7 
     9b3d7eae5e2c49d74debd44c64a33490d330154c6 2.7.1 
  • LICENSES

    r11083 r11708  
    33Faculty of Computer and Information Science, University of Ljubljana, 
    44Slovenia, together with open source community. 
     5 
     6Orange is released under GNU GPL (see below). A subset (without GUI) is also 
     7available under the terms of BSD upon request (orange.biolab.si/contact). 
     8 
    59 
    610Orange is free software; you can redistribute it and/or modify it under 
  • Orange/OrangeCanvas/config.py

    r11532 r11702  
    55 
    66import os 
     7import sys 
    78import logging 
    89import cPickle as pickle 
     
    170171        os.makedirs(cachedir) 
    171172    return cachedir 
     173 
     174 
     175def log_dir(): 
     176    """ 
     177    Return the application log directory. 
     178    """ 
     179    init() 
     180    if sys.platform == "darwin": 
     181        name = str(QCoreApplication.applicationName()) 
     182        logdir = os.path.join(os.path.expanduser("~/Library/Logs"), name) 
     183    else: 
     184        logdir = data_dir() 
     185 
     186    if not os.path.exists(logdir): 
     187        os.makedirs(logdir) 
     188    return logdir 
    172189 
    173190 
  • Orange/OrangeCanvas/main.py

    r11676 r11702  
    110110    fix_win_pythonw_std_stream() 
    111111 
    112     logging.basicConfig(level=levels[options.log_level]) 
     112    # File handler should always be at least INFO level so we need 
     113    # the application root level to be at least at INFO. 
     114    root_level = min(levels[options.log_level], logging.INFO) 
     115    rootlogger = logging.getLogger(OrangeCanvas.__name__) 
     116    rootlogger.setLevel(root_level) 
     117 
     118    # Standard output stream handler at the requested level 
     119    stream_hander = logging.StreamHandler() 
     120    stream_hander.setLevel(level=levels[options.log_level]) 
     121    rootlogger.addHandler(stream_hander) 
    113122 
    114123    log.info("Starting 'Orange Canvas' application.") 
     
    126135    log.debug("Starting CanvasApplicaiton with argv = %r.", qt_argv) 
    127136    app = CanvasApplication(qt_argv) 
     137 
     138    # NOTE: config.init() must be called after the QApplication constructor 
     139    config.init() 
     140 
     141    file_handler = logging.FileHandler( 
     142        filename=os.path.join(config.log_dir(), "canvas.log"), 
     143        mode="w" 
     144    ) 
     145 
     146    file_handler.setLevel(root_level) 
     147    rootlogger.addHandler(file_handler) 
    128148 
    129149    # intercept any QFileOpenEvent requests until the main window is 
     
    142162    app.fileOpenRequest.connect(onrequest) 
    143163 
    144     # Note: config.init must be called after the QApplication constructor 
    145     config.init() 
    146164    settings = QSettings() 
    147165 
  • Orange/OrangeCanvas/orngDlgs.py

    r11654 r11695  
    854854        self.busy(True) 
    855855        self.repaint() 
     856 
     857        addons = Orange.utils.addons.open_addons(flag="r") 
     858 
    856859        add, remove, upgrade = self.to_install(), self.to_remove(), self.to_upgrade 
    857860 
     
    872875            return box.exec_() 
    873876 
     877        def subprocesswait(process): 
     878            output = [] 
     879            while process.poll() is None: 
     880                try: 
     881                    line = process.stdout.readline() 
     882                except IOError as ex: 
     883                    if ex.errno != 4: 
     884                        raise 
     885                else: 
     886                    output.append(line) 
     887                    qApp.processEvents(QEventLoop.ExcludeUserInputEvents) 
     888                    print line, 
     889 
     890            if process.returncode: 
     891                output = "".join(output) 
     892                output += process.stdout.read() 
     893 
     894                errormessage("Error", 
     895                             "'easy_install' exited with error code %i" % 
     896                             process.returncode, 
     897                             details=output) 
     898            return process.returncode 
     899 
     900        def easy_install(req): 
     901            try: 
     902                process = Orange.utils.addons.easy_install_process([req]) 
     903            except (OSError, IOError): 
     904                # TODO: Should show some usefull message (executable not 
     905                # found, permission error, ... 
     906                raise 
     907            else: 
     908                subprocesswait(process) 
     909 
    874910        for name in upgrade: 
     911            req = "{0}=={1}".format( 
     912                name, addons[name.lower()].available_version) 
     913 
     914            self.busy("Upgrading %s ..." % name) 
     915            self.progress.setRange(0, 0) 
     916            self.repaint() 
     917 
     918            easy_install(req) 
     919 
     920        for name in remove: 
     921            self.busy("Uninstalling %s ..." % name) 
     922            self.repaint() 
    875923            try: 
    876                 self.busy("Upgrading %s ..." % name) 
    877                 self.repaint() 
    878                 Orange.utils.addons.upgrade(name, self.pcb) 
    879             except subprocess.CalledProcessError, ex: 
    880                 errormessage("Error", 
    881                              "setup.py script exited with error code %i" \ 
    882                              % ex.returncode, 
    883                              details=ex.output) 
    884             except Exception, e: 
    885                 errormessage("Error", 
    886                              "Problem upgrading add-on %s: %s" % (name, e), 
    887                              exc_info=True) 
    888  
    889         for name in remove: 
    890             try: 
    891                 self.busy("Uninstalling %s ..." % name) 
    892                 self.repaint() 
    893924                Orange.utils.addons.uninstall(name, self.pcb) 
    894925            except Exception, e: 
     
    898929 
    899930        for name in add: 
    900             try: 
    901                 self.busy("Installing %s ..." % name) 
    902                 self.repaint() 
    903                 Orange.utils.addons.install(name, self.pcb) 
    904             except subprocess.CalledProcessError, ex: 
    905                 errormessage("Error", 
    906                              "setup.py script exited with error code %i" \ 
    907                              % ex.returncode, 
    908                              details=ex.output) 
    909  
    910             except Exception, e: 
    911                 errormessage("Error", 
    912                              "Problem installing add-on %s: %s" % (name, e), 
    913                              exc_info=True) 
    914  
    915         if len(upgrade) > 0: 
    916             QMessageBox.warning(self, "Restart Orange", "After upgrading add-ons, it is very important to restart Orange to make sure the changes have been applied.") 
    917         elif len(remove) > 0:  # Don't bother with this if there has already been one (more important) warning. 
    918             QMessageBox.warning(self, "Restart Orange", "After removal of add-ons, it is suggested that you restart Orange for the changes to become effective.") 
     931            req = "{0}=={1}".format( 
     932                name, addons[name.lower()].available_version) 
     933 
     934            self.busy("Installing %s ..." % name) 
     935            self.progress.setRange(0, 0) 
     936            self.repaint() 
     937 
     938            easy_install(req) 
     939 
     940        if len(add) + len(upgrade) + len(remove) > 0: 
     941            QMessageBox.information( 
     942                self, "Restart Orange", 
     943                "Please restart Orange for changes to take effect.") 
    919944 
    920945        QDialog.accept(self) 
  • Orange/OrangeCanvas/scheme/readwrite.py

    r11683 r11701  
    628628 
    629629    if desc.version == "1.0": 
    630         desc = resolve_1_0(desc, registry, error_handler) 
     630        desc = resolve_1_0(desc, registry) 
    631631 
    632632    desc = resolve_replaced(desc, registry) 
  • Orange/OrangeWidgets/Data/OWRank.py

    r11685 r11692  
    1818import Orange 
    1919from Orange.feature import scoring 
    20 from Orange.regression import earth 
    2120from Orange.classification import svm 
    2221from Orange.ensemble import forest 
     
    4645 
    4746MEASURE_PARAMS = { 
    48     earth.ScoreEarthImportance: [ 
    49         {"name": "t", 
    50          "type": int, 
    51          "display_name": "Num. models.", 
    52          "range": (1, 20), 
    53          "default": 10, 
    54          "doc": "Number of models to train for feature scoring."}, 
    55         {"name": "terms", 
    56          "type": int, 
    57          "display_name": "Max. num of terms", 
    58          "range": (3, 200), 
    59          "default": 10, 
    60          "doc": "Maximum number of terms in the forward pass"}, 
    61         {"name": "degree", 
    62          "type": int, 
    63          "display_name": "Max. term degree", 
    64          "range": (1, 3), 
    65          "default": 2, 
    66          "doc": "Maximum degree of terms included in the model."} 
    67     ], 
    6847    scoring.Relief: [ 
    6948        {"name": "k", 
     
    158137        "Random Forests", "RF", forest.ScoreFeature, 
    159138        params=MEASURE_PARAMS[forest.ScoreFeature]), 
    160     score_meta( 
    161         "Earth Importance", "Earth imp.", earth.ScoreEarthImportance, 
    162         params=MEASURE_PARAMS[earth.ScoreEarthImportance], 
    163     ) 
    164139] 
    165140 
  • Orange/OrangeWidgets/OWDatabasesUpdate.py

    r11619 r11693  
    44import sys 
    55 
    6 from datetime import datetime 
     6from datetime import datetime, timedelta 
    77from functools import partial 
    88from collections import namedtuple 
     
    1818 
    1919import OWGUIEx 
     20import OWGUI 
    2021 
    2122 
     
    6263    #: Remove button was clicked. 
    6364    removeClicked = Signal() 
    64  
     65     
    6566    def __init__(self, state=AVAILABLE, parent=None): 
    6667        QWidget.__init__(self, parent) 
     
    6869        layout.setSpacing(1) 
    6970        layout.setContentsMargins(1, 1, 1, 1) 
    70         self.installButton = UpdateOptionButton(self) 
    71         self.installButton.setIcon(icon("update.png")) 
    72         self.installButton.setToolTip("Download") 
    73  
    74         self.removeButton = UpdateOptionButton(self) 
    75         self.removeButton.setIcon(icon("delete.png")) 
    76         self.removeButton.setToolTip("Remove from system") 
    77  
    78         self.installButton.clicked.connect(self.installClicked) 
    79         self.removeButton.clicked.connect(self.removeClicked) 
    80  
    81         layout.addWidget(self.installButton) 
    82         layout.addWidget(self.removeButton) 
     71 
     72        self.checkButton = QCheckBox() 
     73          
     74        layout.addWidget(self.checkButton) 
    8375        self.setLayout(layout) 
    84  
     76  
    8577        self.setMaximumHeight(30) 
    8678 
    8779        self.state = -1 
    8880        self.setState(state) 
    89  
     81         
    9082    def setState(self, state): 
    9183        """ 
     
    9789            self.state = state 
    9890            self._update() 
    99  
     91  
    10092    def _update(self): 
    10193        if self.state == AVAILABLE: 
    102             self.installButton.setIcon(icon("update.png")) 
    103             self.installButton.setToolTip("Download") 
    104             self.installButton.setEnabled(True) 
    105             self.removeButton.setEnabled(False) 
     94            self.checkButton.setChecked(False) 
    10695        elif self.state == CURRENT: 
    107             self.installButton.setIcon(icon("update1.png")) 
    108             self.installButton.setToolTip("Update") 
    109             self.installButton.setEnabled(False) 
    110             self.removeButton.setEnabled(True) 
     96            self.checkButton.setChecked(True) 
    11197        elif self.state == OUTDATED: 
    112             self.installButton.setIcon(icon("update1.png")) 
    113             self.installButton.setToolTip("Update") 
    114             self.installButton.setEnabled(True) 
    115             self.removeButton.setEnabled(True) 
     98            self.checkButton.setChecked(True) 
    11699        elif self.state == DEPRECATED: 
    117             self.installButton.setIcon(icon("update.png")) 
    118             self.installButton.setToolTip("") 
    119             self.installButton.setEnabled(False) 
    120             self.removeButton.setEnabled(True) 
     100            self.checkButton.setChecked(True) 
    121101        else: 
    122102            raise ValueError("Invalid state %r" % self._state) 
     103 
     104        try: 
     105            self.checkButton.clicked.disconnect()   # Remove old signals if they exist 
     106        except: 
     107            pass 
     108 
     109        if not self.checkButton.isChecked():        # Switch signals if the file is present or not 
     110            self.checkButton.clicked.connect(self.installClicked) 
     111        else: 
     112            self.checkButton.clicked.connect(self.removeClicked) 
    123113 
    124114 
     
    167157        self.setData(1, self.EditRole2, item.title) 
    168158 
    169         self.setData(2, Qt.DisplayRole, sizeof_fmt(item.size)) 
    170         self.setData(2, self.EditRole2, item.size) 
    171  
    172         if item.latest is not None: 
    173             self.setData(3, Qt.DisplayRole, item.latest.date().isoformat()) 
    174             self.setData(3, self.EditRole2, item.latest) 
    175         else: 
    176             self.setData(3, Qt.DisplayRole, "N/A") 
     159        self.setData(4, Qt.DisplayRole, sizeof_fmt(item.size)) 
     160        self.setData(4, self.EditRole2, item.size) 
     161 
     162        if item.local is not None: 
     163            self.setData(3, Qt.DisplayRole, item.local.date().isoformat()) 
     164            self.setData(3, self.EditRole2, item.local) 
     165        else: 
     166            self.setData(3, Qt.DisplayRole, "") 
    177167            self.setData(3, self.EditRole2, datetime.now()) 
    178168 
     
    181171    def _updateToolTip(self): 
    182172        state_str = self.STATE_STRINGS[self.item.state] 
     173        try: 
     174            diff_date = self.item.latest - self.item.local 
     175        except: 
     176            diff_date = None 
     177         
    183178        tooltip = ("State: %s\nTags: %s" % 
    184                    (state_str, 
    185                     ", ".join(tag for tag in self.item.tags 
    186                               if not tag.startswith("#")))) 
     179                   (state_str, ", ".join(tag for tag in self.item.tags 
     180                    if not tag.startswith("#")))) 
    187181 
    188182        if self.item.state in [CURRENT, OUTDATED, DEPRECATED]: 
     
    190184                        serverfiles.localpath(self.item.domain, 
    191185                                              self.item.filename)) 
     186        
     187        if self.item.state == 2 and diff_date: 
     188            tooltip += ("\nServer version: %s\nStatus: old (%d days)" % (self.item.latest, diff_date.days)) 
     189        else: 
     190            tooltip += ("\nServer version: %s" % self.item.latest) 
     191 
    192192        for i in range(1, 4): 
    193193            self.setToolTip(i, tooltip) 
     
    402402        box = OWGUI.widgetBox(self.controlArea, "Files") 
    403403        self.filesView = QTreeWidget(self) 
    404         self.filesView.setHeaderLabels(["Options", "Title", "Size", 
    405                                         "Last Updated"]) 
     404        self.filesView.setHeaderLabels(["", "Data Source", "Update", 
     405                                        "Last Updated", "Size"]) 
    406406        self.filesView.setRootIsDecorated(False) 
    407407        self.filesView.setUniformRowHeights(True) 
     
    418418 
    419419        box = OWGUI.widgetBox(self.controlArea, orientation="horizontal") 
    420         OWGUI.button(box, self, "Update all local files", 
     420        self.updateButton = OWGUI.button(box, self, "Update all", 
    421421                     callback=self.UpdateAll, 
    422                      tooltip="Update all updatable files") 
    423         OWGUI.button(box, self, "Download filtered", 
     422                     tooltip="Update all updatable files", 
     423                     ) 
     424         
     425        self.downloadButton = OWGUI.button(box, self, "Download all", 
    424426                     callback=self.DownloadFiltered, 
    425427                     tooltip="Download all filtered files shown") 
    426         OWGUI.button(box, self, "Cancel", callback=self.Cancel, 
     428        self.cancelButton = OWGUI.button(box, self, "Cancel", callback=self.Cancel, 
    427429                     tooltip="Cancel scheduled downloads/updates.") 
    428430        OWGUI.rubber(box) 
     
    479481        self.setEnabled(False) 
    480482 
     483 
    481484    def SetFilesList(self, serverInfo): 
    482485        """ 
     
    504507            options_widget.item = item 
    505508 
    506             # Connect the actions to the appropriate methods 
    507509            options_widget.installClicked.connect( 
    508510                partial(self.SubmitDownloadTask, item.domain, item.filename) 
     
    521523        for item, tree_item, options_widget in self.updateItems: 
    522524            self.filesView.setItemWidget(tree_item, 0, options_widget) 
     525             
     526            # Add an update button if the file is updateable 
     527            if item.state == 2: 
     528                ButtonWidget = QPushButton("Update") 
     529                layout = QHBoxLayout() 
     530                layout.setSpacing(1) 
     531                layout.setContentsMargins(20, 30, 30, 30) 
     532 
     533                layout.addWidget(ButtonWidget)                  
     534                ButtonWidget.setMaximumHeight(30) 
     535                ButtonWidget.setMaximumWidth(120) 
     536                ButtonWidget.setAutoDefault(False) 
     537 
     538                ButtonWidget.clicked.connect(partial(self.SubmitDownloadTask, item.domain, item.filename)) 
     539 
     540                self.filesView.setItemWidget(tree_item, 2, ButtonWidget) 
    523541 
    524542        self.progress.advance() 
     
    533551        self.SearchUpdate() 
    534552        self.UpdateInfoLabel() 
     553        self.toggleButtons() 
     554        self.cancelButton.setEnabled(False) 
    535555 
    536556        self.progress.setRange(0, 0) 
     557 
     558    def buttonCheck(self, selected_items, state, button): 
     559        for item in selected_items: 
     560            if item.state != state: 
     561                button.setEnabled(False) 
     562            else: 
     563                button.setEnabled(True) 
     564                break 
     565 
     566    def toggleButtons(self): 
     567        selected_items = [item for item, tree_item, _ in self.updateItems if not tree_item.isHidden()] 
     568        self.buttonCheck(selected_items, OUTDATED, self.updateButton) 
     569        self.buttonCheck(selected_items, AVAILABLE, self.downloadButton) 
    537570 
    538571    def HandleError(self, exception): 
     
    564597 
    565598    def UpdateAll(self): 
    566         for item, _, _ in self.updateItems: 
    567             if item.state == OUTDATED: 
     599        for item, tree_item, _ in self.updateItems: 
     600            if item.state == OUTDATED and not tree_item.isHidden(): 
    568601                self.SubmitDownloadTask(item.domain, item.filename) 
    569602 
     
    582615            tree_item.setHidden(hide) 
    583616        self.UpdateInfoLabel() 
     617        self.toggleButtons() 
    584618 
    585619    def SubmitDownloadTask(self, domain, filename): 
     
    587621        Submit the (domain, filename) to be downloaded/updated. 
    588622        """ 
     623        self.cancelButton.setEnabled(True) 
     624 
    589625        index = self.updateItemIndex(domain, filename) 
    590626        _, tree_item, opt_widget = self.updateItems[index] 
     
    655691 
    656692            self.UpdateInfoLabel() 
     693            self.cancelButton.setEnabled(False) 
    657694 
    658695    def SubmitRemoveTask(self, domain, filename): 
  • Orange/__init__.py

    r11092 r11692  
    126126_import("regression") 
    127127_import("regression.base") 
    128 _import("regression.earth") 
    129128_import("regression.lasso") 
    130129_import("regression.linear") 
  • Orange/orng/ensemble.c

    r9671 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Orange is free software; you can redistribute it and/or modify 
    5     it under the terms of the GNU General Public License as published by 
    6     the Free Software Foundation; either version 2 of the License, or 
    7     (at your option) any later version. 
    8  
    9     Orange is distributed in the hope that it will be useful, 
    10     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    12     GNU General Public License for more details. 
    13  
    14     You should have received a copy of the GNU General Public License 
    15     along with Orange; if not, write to the Free Software 
    16     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    17  
    18     Authors: Janez Demsar, Blaz Zupan, 1996--2002 
    19     Contact: janez.demsar@fri.uni-lj.si 
    20 */ 
    21  
    221/*  This file is a part of dynamic library that staticaly links with C4.5. 
    232    To compile it, download C4.5 (R8) from http://www.cse.unsw.edu.au/~quinlan/, 
  • Orange/orng/orngDimRed.py

    r9671 r11707  
    1616#   - 2003/11/20: returning the parameters of the transform 
    1717 
    18 import numpy, mathutil 
     18import numpy 
    1919import numpy.linalg as LinearAlgebra 
    2020 
     
    8989        return skewness**2 
    9090 
    91 def BoxCoxTransform(vector,lambd=None): 
    92     v = -min(vector)+1+vector 
    93     print "shifting by ",-min(vector)+1 
    94     if lambd==None: 
    95         # find the value of lambda that will minimize skew 
    96         lambd = mathutil.minimum(_BCskewness(v)) 
    97         print "best-fitting lambda = ",lambd 
    98     return _BC(v,lambd) 
     91# def BoxCoxTransform(vector,lambd=None): 
     92#     v = -min(vector)+1+vector 
     93#     print "shifting by ",-min(vector)+1 
     94#     if lambd==None: 
     95#         # find the value of lambda that will minimize skew 
     96#         lambd = mathutil.minimum(_BCskewness(v)) 
     97#         print "best-fitting lambda = ",lambd 
     98#     return _BC(v,lambd) 
    9999 
    100100def RankConversion(vector,reverse=0): 
     
    140140    print "variance scaling" 
    141141    print VarianceScaling(v) 
    142     print "Box-Cox" 
    143     print BoxCoxTransform(v) 
     142#    print "Box-Cox" 
     143#    print BoxCoxTransform(v) 
  • Orange/testing/unit/tests/test_table.py

    r11048 r11699  
    4646        s = cPickle.dumps(table) 
    4747        table_clone = cPickle.loads(s) 
    48 #        self.assertEqual(table.domain, table_clone.domain) 
    49 #        self.assertEqual(table.domain.class_var, table_clone.domain.class_var) 
     48 
     49        self.assertSequenceEqual(list(table.domain), 
     50                                 list(table_clone.domain)) 
    5051        self.assertEqual(native(table), native(table_clone), 
    5152                         "Native representation is not equal!") 
     
    204205 
    205206 
     207class TestConstructor(unittest.TestCase): 
     208    def test_from_list(self): 
     209        A = [[0., 1., 2.], 
     210             [3., 4., 5.], 
     211             [6., 7., 8.]] 
     212 
     213        domain = Orange.data.Domain( 
     214            [Orange.feature.Continuous("F%i" % i) 
     215             for i in range(1, 4)], 
     216            None 
     217        ) 
     218 
     219        data = Orange.data.Table(domain, A) 
     220 
     221        self.assertEqual(native(data), A) 
     222 
     223        lenses = Orange.data.Table("lenses") 
     224        domain = lenses.domain 
     225 
     226        A = [[0, 1, 0, 1, 0], 
     227             [2, 0, 1, 0, 2]] 
     228 
     229        data = Orange.data.Table(domain, A) 
     230 
     231        self.assertEqual( 
     232            A, 
     233            [[int(v) for v in row] for row in data] 
     234        ) 
     235 
     236        A[0][0] = 4 
     237        with self.assertRaises(ValueError): 
     238            data = Orange.data.Table(domain, A) 
     239 
     240        A[0][0] = -1 
     241        with self.assertRaises(ValueError): 
     242            data = Orange.data.Table(domain, A) 
     243 
     244    def test_from_array(self): 
     245        """Test Table construction from numpy arrays. 
     246        """ 
     247        from numpy import array, arange 
     248 
     249        A = arange(9).reshape(3, 3) 
     250        data = Orange.data.Table(A) 
     251 
     252        self.assertTrue(all(isinstance(f, Orange.feature.Continuous) 
     253                            for f in data.domain)) 
     254        self.assertEqual(data.domain.class_var, None) 
     255 
     256        self.assertEqual(native(data), A.tolist()) 
     257 
     258        lenses = Orange.data.Table("lenses") 
     259        domain = lenses.domain 
     260 
     261        A = [[0, 1, 0, 1, 0], 
     262             [2, 0, 1, 0, 2]] 
     263 
     264        data = Orange.data.Table(domain, array(A)) 
     265 
     266        self.assertEqual( 
     267            A, 
     268            [[int(v) for v in row] for row in data] 
     269        ) 
     270 
     271        A[0][0] = 4 
     272        with self.assertRaises(ValueError): 
     273            data = Orange.data.Table(domain, array(A)) 
     274 
     275        A[0][0] = -1 
     276        with self.assertRaises(ValueError): 
     277            data = Orange.data.Table(domain, array(A)) 
     278 
     279    def test_from_masked_array(self): 
     280        """Test Table construction from numpy masked arrays. 
     281        """ 
     282        from numpy.ma import masked_array, masked, arange 
     283 
     284        A = arange(9).reshape(3, 3) 
     285        A[1, 1] = masked 
     286 
     287        data = Orange.data.Table(A) 
     288 
     289        self.assertTrue(all(isinstance(f, Orange.feature.Continuous) 
     290                            for f in data.domain)) 
     291        self.assertEqual(data.domain.class_var, None) 
     292 
     293        self.assertTrue(data[1][1].isSpecial()) 
     294 
     295        lenses = Orange.data.Table("lenses") 
     296        domain = lenses.domain 
     297 
     298        A = masked_array([[0, 1, 0, 1, 0], 
     299                          [2, 0, 1, 0, 2]]) 
     300 
     301        data = Orange.data.Table(domain, A) 
     302 
     303        self.assertEqual( 
     304            A.tolist(), 
     305            [[int(v) for v in row] for row in data] 
     306        ) 
     307 
     308        A[0, 0] = 4 
     309        with self.assertRaises(ValueError): 
     310            data = Orange.data.Table(domain, A) 
     311 
     312        A[0, 0] = -1 
     313        with self.assertRaises(ValueError): 
     314            data = Orange.data.Table(domain, A) 
     315 
     316        A[0, 0] = masked 
     317        data = Orange.data.Table(domain, A) 
     318 
     319        self.assertTrue(data[0][0].isSpecial()) 
     320 
     321 
    206322if __name__ == "__main__": 
    207323    unittest.main() 
  • Orange/utils/addons.py

    r11656 r11695  
    1919 
    2020import shelve 
     21import anydbm 
    2122import xmlrpclib 
    2223import warnings 
     
    3132import platform 
    3233import subprocess 
     34import errno 
    3335import urllib2 
    34 import urlparse 
    35 import posixpath 
    3636import site 
    3737import itertools 
     38import pipes 
    3839 
    3940from collections import namedtuple, defaultdict 
     
    4243import Orange.utils.environ 
    4344 
    44 ADDONS_ENTRY_POINT="orange.addons" 
    45  
    46  
    47 OrangeAddOn = namedtuple('OrangeAddOn', ['name', 'available_version', 'installed_version', 'summary', 'description', 
    48                                          'author', 'docs_url', 'keywords', 'homepage', 'package_url', 
    49                                          'release_url', 'release_size', 'python_version']) 
    50 #It'd be great if we could somehow read a list and descriptions of widgets, show them in the dialog and enable 
    51 #search of add-ons based on keywords in widget names and descriptions. 
     45ADDONS_ENTRY_POINT = "orange.addons" 
     46 
     47 
     48OrangeAddOn = namedtuple( 
     49    'OrangeAddOn', 
     50    ['name', 'available_version', 'installed_version', 'summary', 
     51     'description', 'author', 'docs_url', 'keywords', 'homepage', 
     52     'package_url', 'release_urls'] 
     53) 
     54 
     55ReleaseUrl = namedtuple( 
     56    "ReleaseUrl", 
     57    ["filename", "url", "size", "python_version", "packagetype"] 
     58) 
     59 
     60# It'd be great if we could somehow read a list and descriptions of 
     61# widgets, show them in the dialog and enable search of add-ons 
     62# based on keywords in widget names and descriptions. 
    5263 
    5364INDEX_RE = "[^a-z0-9-']"  # RE for splitting entries in the search index 
    5465 
    55 AOLIST_FILE = os.path.join(Orange.utils.environ.orange_settings_dir, "addons.shelve") 
    56  
    57 def open_addons(): 
     66AOLIST_FILE = os.path.join(Orange.utils.environ.orange_settings_dir, 
     67                           "addons_v2.shelve") 
     68 
     69 
     70def open_addons(flag="r"): 
    5871    try: 
    59         addons = shelve.open(AOLIST_FILE, 'c') 
    60         if any(name != name.lower() for name, record in addons.items()):  # Try to read the whole list and check for sanity. 
    61             raise Exception("Corrupted add-on list.") 
    62     except: 
    63         if os.path.isfile(AOLIST_FILE): 
    64             os.remove(AOLIST_FILE) 
    65         addons = shelve.open(AOLIST_FILE, 'n') 
     72        addons = shelve.open(AOLIST_FILE, flag) 
     73    except anydbm.error as ex: 
     74        if flag in ["r", "w"] and ex.message.startswith("need 'c'"): 
     75            # Need to create it it first. 
     76            s = shelve.open(AOLIST_FILE, "c") 
     77            s.close() 
     78            addons = shelve.open(AOLIST_FILE, flag) 
     79        else: 
     80            if os.path.isfile(AOLIST_FILE): 
     81                os.remove(AOLIST_FILE) 
     82            addons = shelve.open(AOLIST_FILE, 'n') 
     83    else: 
     84        # Try to read the whole list and check for sanity. 
     85        if any(name != name.lower() for name, _ in addons.items()): 
     86            addons.close() 
     87            if os.path.isfile(AOLIST_FILE): 
     88                os.remove(AOLIST_FILE) 
     89            addons = shelve.open(AOLIST_FILE, 'n') 
     90 
    6691    return addons 
    6792 
    6893 
    6994def addons_corrupted(): 
    70     with closing(open_addons()) as addons: 
     95    with closing(open_addons(flag="r")) as addons: 
    7196        return len(addons) == 0 
    7297 
     
    79104 
    80105    index = defaultdict(list) 
    81     with closing(open_addons()) as addons: 
     106    with closing(open_addons(flag="r")) as addons: 
    82107        for name, ao in addons.items(): 
    83108            for s in [name, ao.summary, ao.description, ao.author] + (ao.keywords if ao.keywords else []): 
     
    90115                        index[word[:i+1]].append(name) 
    91116 
     117 
    92118def search_index(query): 
    93119    global index 
     
    95121    words = [word for word in re.split(INDEX_RE, query.lower()) if len(word)>1] 
    96122    if not words: 
    97         with closing(open_addons()) as addons: 
     123        with closing(open_addons(flag="r")) as addons: 
    98124            return addons.keys() 
    99125    for word in words: 
    100126        result.update(index[word]) 
    101127    return result 
     128 
    102129 
    103130def refresh_available_addons(force=False, progress_callback=None): 
     
    121148    docs = {} 
    122149    if progress_callback: 
    123         progress_callback(len(pkg_dict)+1, 1) 
    124     with closing(open_addons()) as addons: 
     150        progress_callback(len(pkg_dict) + 1, 1) 
     151 
     152    with closing(open_addons(flag="c")) as addons: 
    125153        for i, (name, (_, version)) in enumerate(pkg_dict.items()): 
    126             if force or name not in addons or addons[name.lower()].available_version != version: 
     154            installed = addons[name.lower()] if name.lower() in addons else None 
     155            if force or not installed or installed.available_version != version: 
    127156                try: 
    128157                    data = pypi.release_data(name, version) 
    129                     rel = pypi.release_urls(name, version)[0] 
    130  
     158                    urls = pypi.release_urls(name, version) 
     159                    release_urls = \ 
     160                        [ReleaseUrl(url["filename"], url["url"], 
     161                                    url["size"], url["python_version"], 
     162                                    url["packagetype"]) 
     163                         for url in urls] 
    131164                    if readthedocs: 
    132165                        try: 
    133                             docs = readthedocs.project.get(slug=name.lower())['objects'][0] 
     166                            docs = readthedocs.project.get( 
     167                                slug=name.lower())['objects'][0] 
    134168                        except: 
    135169                            docs = {} 
    136                     addons[name.lower()] = OrangeAddOn(name = name, 
    137                                                available_version = data['version'], 
    138                                                installed_version = addons[name.lower()].installed_version if name.lower() in addons else None, 
    139                                                summary = data['summary'], 
    140                                                description = data.get('description', ''), 
    141                                                author = str((data.get('author', '') or '') + ' ' + (data.get('author_email', '') or '')).strip(), 
    142                                                docs_url = data.get('docs_url', docs.get('subdomain', '')), 
    143                                                keywords = data.get('keywords', "").split(","), 
    144                                                homepage = data.get('home_page', ''), 
    145                                                package_url = data.get('package_url', ''), 
    146                                                release_url = rel.get('url', None), 
    147                                                release_size = rel.get('size', -1), 
    148                                                python_version = rel.get('python_version', None)) 
    149                 except Exception, e: 
     170                    addons[name.lower()] = OrangeAddOn( 
     171                        name=name, 
     172                        available_version=data['version'], 
     173                        installed_version=installed.installed_version if installed else None, 
     174                        summary=data['summary'], 
     175                        description=data.get('description', ''), 
     176                        author=str((data.get('author', '') or '') + ' ' + 
     177                                   (data.get('author_email', '') or '')).strip(), 
     178                        docs_url=data.get('docs_url', docs.get('subdomain', '')), 
     179                        keywords=data.get('keywords', "").split(","), 
     180                        homepage=data.get('home_page', ''), 
     181                        package_url=data.get('package_url', ''), 
     182                        release_urls=release_urls 
     183                    ) 
     184                except Exception: 
    150185                    import traceback 
    151186                    traceback.print_exc() 
    152                     warnings.warn('Could not load data for the following add-on: %s'%name) 
     187                    warnings.warn( 
     188                        'Could not load data for the add-on: %s' % name) 
     189 
    153190            if progress_callback: 
    154                 progress_callback(len(pkg_dict)+1, i+2) 
     191                progress_callback(len(pkg_dict) + 1, i + 2) 
    155192 
    156193    rebuild_index() 
     194 
    157195 
    158196def load_installed_addons(): 
    159197    found = set() 
    160     with closing(open_addons()) as addons: 
     198    with closing(open_addons(flag="c")) as addons: 
    161199        for entry_point in pkg_resources.iter_entry_points(ADDONS_ENTRY_POINT): 
    162             name, version = entry_point.dist.project_name, entry_point.dist.version 
    163             #TODO We could import setup.py from entry_point.location and load descriptions and such ... 
     200            name = entry_point.dist.project_name 
     201            version = entry_point.dist.version 
     202 
    164203            if name.lower() in addons: 
    165                 addons[name.lower()] = addons[name.lower()]._replace(installed_version = version) 
     204                addons[name.lower()] = addons[name.lower()]._replace(installed_version=version) 
    166205            else: 
    167                 addons[name.lower()] = OrangeAddOn(name = name, 
    168                     available_version = None, 
    169                     installed_version = version, 
    170                     summary = "", 
    171                     description = "", 
    172                     author = "", 
    173                     docs_url = "", 
    174                     keywords = "", 
    175                     homepage = "", 
    176                     package_url = "", 
    177                     release_url = "", 
    178                     release_size = None, 
    179                     python_version = None) 
     206                addons[name.lower()] = OrangeAddOn( 
     207                    name=name, 
     208                    available_version=None, 
     209                    installed_version=version, 
     210                    summary="", 
     211                    description="", 
     212                    author="", 
     213                    docs_url="", 
     214                    keywords="", 
     215                    homepage="", 
     216                    package_url="", 
     217                    release_urls=[]) 
    180218            found.add(name.lower()) 
     219 
    181220        for name in set(addons).difference(found): 
    182             addons[name.lower()] = addons[name.lower()]._replace(installed_version = None) 
     221            addons[name.lower()] = addons[name.lower()]._replace(installed_version=None) 
     222 
    183223    rebuild_index() 
    184224 
     
    318358        extra_kwargs["startupinfo"] = startupinfo 
    319359 
    320     subprocess.check_output([executable, setup_script] + args, 
    321                              cwd=source_root, 
    322                              stderr=subprocess.STDOUT, 
    323                              **extra_kwargs) 
     360    process = subprocess.Popen([executable, setup_script] + args, 
     361                               cwd=source_root, 
     362                               stdout=subprocess.PIPE, 
     363                               stderr=subprocess.STDOUT, 
     364                               bufsize=1,  # line buffered 
     365                               **extra_kwargs) 
     366    output = [] 
     367    while process.poll() is None: 
     368        try: 
     369            line = process.stdout.readline() 
     370        except (OSError, IOError) as ex: 
     371            if ex.errno != errno.EINTR: 
     372                raise 
     373        else: 
     374            output.append(line) 
     375            print line, 
     376 
     377    if process.returncode: 
     378        raise subprocess.CalledProcessError( 
     379                  process.returncode, 
     380                  setup_script, 
     381                  "".join(output) 
     382              ) 
    324383 
    325384 
    326385def install(name, progress_callback=None): 
    327     if progress_callback: 
    328         progress_callback(1, 0) 
    329  
    330     with closing(open_addons()) as addons: 
     386    with closing(open_addons(flag="r")) as addons: 
    331387        addon = addons[name.lower()] 
    332     release_url = addon.release_url 
     388 
     389    source_urls = [url for url in addon.release_urls 
     390                   if url.packagetype == "sdist"] 
     391    release_url = source_urls[0] 
    333392 
    334393    try: 
    335394        tmpdir = tempfile.mkdtemp() 
    336395 
    337         stream = urllib2.urlopen(release_url, timeout=120) 
    338  
    339         parsed_url = urlparse.urlparse(release_url) 
    340         package_name = posixpath.basename(parsed_url.path) 
    341         package_path = os.path.join(tmpdir, package_name) 
     396        stream = urllib2.urlopen(release_url.url, timeout=120) 
     397 
     398        package_path = os.path.join(tmpdir, release_url.filename) 
    342399 
    343400        progress_cb = (lambda value: progress_callback(value, 0)) \ 
     
    374431        func() 
    375432 
     433 
     434def easy_install_process(args, bufsize=-1): 
     435    from setuptools.command import easy_install 
     436    # Check if easy_install supports '--user' switch 
     437    if "user" in [opt[0] for opt in easy_install.easy_install.user_options]: 
     438        has_user_site = True 
     439    else: 
     440        has_user_site = False 
     441 
     442    if has_user_site and site.USER_SITE in sys.path: 
     443        args = ["--user"] + args 
     444 
     445    # properly quote arguments if necessary 
     446    args = map(pipes.quote, args) 
     447 
     448    script = """ 
     449import sys 
     450from setuptools.command.easy_install import main 
     451sys.exit(main({args!r})) 
     452""" 
     453    script = script.format(args=args) 
     454 
     455    return python_process(["-c", script], bufsize=bufsize) 
     456 
     457 
     458def python_process(args, script_name=None, cwd=None, env=None, **kwargs): 
     459    """ 
     460    Run a `sys.executable` in a subprocess with `args`. 
     461    """ 
     462    executable = sys.executable 
     463    if os.name == "nt" and os.path.basename(executable) == "pythonw.exe": 
     464        dirname, _ = os.path.split(executable) 
     465        executable = os.path.join(dirname, "python.exe") 
     466        # by default a new console window would show up when executing the 
     467        # script 
     468        startupinfo = subprocess.STARTUPINFO() 
     469        if hasattr(subprocess, "STARTF_USESHOWWINDOW"): 
     470            startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW 
     471        else: 
     472            # This flag was missing in inital releases of 2.7 
     473            startupinfo.dwFlags |= subprocess._subprocess.STARTF_USESHOWWINDOW 
     474 
     475        kwargs["startupinfo"] = startupinfo 
     476 
     477    if script_name is not None: 
     478        script = script_name 
     479    else: 
     480        script = executable 
     481 
     482    process = subprocess.Popen( 
     483        [script] + args, 
     484        executable=executable, 
     485        cwd=cwd, 
     486        env=env, 
     487        stderr=subprocess.STDOUT, 
     488        stdout=subprocess.PIPE, 
     489        **kwargs 
     490    ) 
     491 
     492    return process 
     493 
     494 
    376495def uninstall(name, progress_callback=None): 
    377496    try: 
     
    380499        ao.uninstall(True) 
    381500    except ImportError: 
    382         raise Exception("Pip is required for add-on uninstallation. Install pip and try again.") 
     501        raise Exception("Pip is required for add-on uninstallation. " 
     502                        "Install pip and try again.") 
     503 
    383504 
    384505def upgrade(name, progress_callback=None): 
    385506    install(name, progress_callback) 
    386507 
    387 load_installed_addons() 
    388  
     508 
     509try: 
     510    load_installed_addons() 
     511except Exception as ex: 
     512    # Do not let an exception propagate during the import phase, 
     513    # It should not even be called at import only if/when add-ons 
     514    # db is actually requested. 
     515    warnings.warn("'load_installed_addons' failed with %s" % ex, 
     516                  UserWarning) 
    389517 
    390518 
     
    399527registered = __read_addons_list(os.path.join(Orange.utils.environ.orange_settings_dir, "add-ons.txt"), False) + \ 
    400528             __read_addons_list(os.path.join(Orange.utils.environ.install_dir, "add-ons.txt"), True) 
     529 
     530if registered: 
     531    warnings.warn("'add-ons.txt' is deprecated. " + 
     532                  "Please use setuptools/entry points.", 
     533                  UserWarning) 
    401534 
    402535for name, path in registered: 
  • docs/index.rst

    r11675 r11706  
    1616------------------------- 
    1717 
    18 .. - :doc:`Canvas development reference <canvas/index>` 
     18.. .. - :doc:`Canvas development reference <canvas/index>` 
    1919 
    2020- :doc:`Widget development manual <extend-widgets/rst/index>` 
  • docs/reference/rst/Orange.data.formats.rst

    r11028 r11700  
    3535 * multiclass - feature is one of multiple classes. Data can have both, multiple classes and an ordinary class. 
    3636 * meta (or m) - feature will be imported as a meta attribute. 
    37  * -dc 
    3837 
    3938Baskets 
  • docs/reference/rst/Orange.regression.rst

    r10537 r11692  
    1212   Orange.regression.lasso 
    1313   Orange.regression.pls 
    14    Orange.regression.earth 
    1514   Orange.regression.tree 
    1615   Orange.regression.mean 
  • docs/tutorial/rst/code/regression-cv.py

    r11090 r11692  
    55lin = Orange.regression.linear.LinearRegressionLearner() 
    66lin.name = "lin" 
    7 earth = Orange.regression.earth.EarthLearner() 
    8 earth.name = "mars" 
     7rf = Orange.ensemble.forest.RandomForestLearner() 
     8rf.name = "rf" 
    99tree = Orange.regression.tree.TreeLearner(m_pruning = 2) 
    1010tree.name = "tree" 
    1111 
    12 learners = [lin, earth, tree] 
     12learners = [lin, rf, tree] 
    1313 
    1414res = Orange.evaluation.testing.cross_validation(learners, data, folds=5) 
  • docs/tutorial/rst/code/regression-other.py

    r11052 r11692  
    88lin = Orange.regression.linear.LinearRegressionLearner(train) 
    99lin.name = "lin" 
    10 earth = Orange.regression.earth.EarthLearner(train) 
    11 earth.name = "mars" 
     10rf = Orange.ensemble.forest.RandomForestLearner(train) 
     11rf.name = "rf" 
    1212tree = Orange.regression.tree.TreeLearner(train) 
    1313tree.name = "tree" 
    1414 
    15 models = [lin, earth, tree] 
     15models = [lin, rf, tree] 
    1616 
    1717print "y    " + " ".join("%-4s" % l.name for l in models) 
  • docs/tutorial/rst/regression.rst

    r11090 r11692  
    3636 
    3737.. index:: 
    38    single: regression; mars 
    3938   single: regression; linear 
    4039 
     
    4443Looks like the housing prices are not that hard to predict:: 
    4544 
    46    y    lin  mars tree 
    47    21.4 24.8 23.0 20.1 
    48    15.7 14.4 19.0 17.3 
    49    36.5 35.7 35.6 33.8 
     45   y    lin  rf   tree 
     46   12.7 11.3 15.3 19.1 
     47   13.8 20.2 14.1 13.1 
     48   19.3 20.8 20.7 23.3 
     49 
    5050 
    5151Cross Validation 
     
    6060   single: regression; root mean squared error 
    6161 
    62 `MARS <http://en.wikipedia.org/wiki/Multivariate_adaptive_regression_splines>`_ has the lowest root mean squared error:: 
     62Random forest has the lowest root mean squared error:: 
    6363 
    6464   Learner  RMSE 
    6565   lin      4.83 
    66    mars     3.84 
     66   rf       3.73 
    6767   tree     5.10 
    68  
  • docs/widgets/rst/index.rst

    r11433 r11692  
    646646   regression/mean.rst 
    647647   regression/linear.rst 
    648    regression/earth.rst 
    649648   regression/regressiontree.rst 
    650649   regression/regressiontreegraph.rst 
  • install-scripts/debian/control-files/python-orange.install

    r9517 r11707  
    44usr/lib/python*/*-packages/orange/orng*.py 
    55usr/lib/python*/*-packages/orange/fileutil.py 
    6 usr/lib/python*/*-packages/orange/mathutil.py 
    76usr/lib/python*/*-packages/orange/orange2to25.py 
    87usr/lib/python*/*-packages/orange/widgetParser.py 
  • setup.py

    r11665 r11692  
    3535NAME = 'Orange' 
    3636 
    37 VERSION = '2.7.1' 
     37VERSION = '2.7.2' 
    3838ISRELEASED = False 
    3939 
     
    5858    'Environment :: Plugins', 
    5959    'Programming Language :: Python', 
    60     'Framework :: Orange', 
    6160    'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 
    6261    'Operating System :: POSIX', 
     
    9998 
    10099site_cfg = namedtuple( 
    101     "site_cfg", ["libsvm", "liblinear", "blas", "R", "qhull"]) 
     100    "site_cfg", ["libsvm", "liblinear", "blas", "qhull"]) 
    102101 
    103102 
     
    141140    liblinear = parse_lib_opt(parser, "liblinear") 
    142141    blas = parse_lib_opt(parser, "blas") 
    143     R = parse_lib_opt(parser, "R") 
    144142    qhull = parse_lib_opt(parser, "qhull") 
    145143 
    146     return site_cfg(libsvm, liblinear, blas, R, qhull) 
     144    return site_cfg(libsvm, liblinear, blas, qhull) 
    147145 
    148146 
     
    587585    orange_sources += get_source_files("source/orange/blas/", "c") 
    588586 
    589 if site.R: 
    590     # Link external R library (for linpack) 
    591     orange_libraries += site.R.libraries 
    592     orange_library_dirs += site.R.library_dirs 
    593 else: 
    594     orange_sources += get_source_files("source/orange/linpack/", "c") 
    595  
    596587if site.liblinear: 
    597588    # Link external LIBLINEAR library 
  • source/corn/corn.cpp

    r10232 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232  #define NOMINMAX 
  • source/corn/corn.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232  #ifdef CORN_EXPORTS 
  • source/include/c2py.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "c2py.hpp" 
    232 
  • source/include/c2py.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __C2PY_HPP 
    232#define __C2PY_HPP 
  • source/include/common.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232 #include <limits> 
  • source/include/crc.h

    r10596 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __CRC_H 
    222#define __CRC_H 
  • source/include/lcomb.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232  #pragma warning (disable : 4786 4114 4018 4267 4244 4702 4710) 
  • source/include/lcomb.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __LCOMB_HPP 
    232#define __LCOMB _HPP 
  • source/include/pywrapper.hpp

    r10478 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __PYWRAPPER_HPP 
    232#define __PYWRAPPER_HPP 
  • source/include/stat.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <functional> 
    232 
  • source/include/stat.hpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21 /*  Most of the functions on this file are adapted from stat.py, which is in 
    22     turn based on number of various sources. */ 
    23  
    241#ifndef STAT_HPP 
    252#define STAT_HPP 
  • source/include/statexceptions.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifdef _MSC_VER 
    222  #pragma warning (disable : 4290) 
  • source/include/statexceptions.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef EXCEPTIONS_HPP 
    232#define EXCEPTIONS_HPP 
  • source/include/stladdon.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __STLADDON_HPP 
    232#define __STLADDON_HPP 
  • source/include/strings.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    201#include "strings.hpp" 
    212 
  • source/include/strings.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __STRINGS_HPP 
    222#define __STRINGS_HPP 
  • source/include/student.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __STUDENT_HPP 
    222#define __STUDENT_HPP 
  • source/orange/Makefile

    r8981 r11692  
    1414 
    1515ifndef BLAS_LIB 
    16 BLAS_OBJECTS = obj/daxpy.o obj/ddot.o obj/dnrm2.o obj/dscal.o obj/dcopy.o 
     16BLAS_OBJECTS = obj/daxpy.o obj/ddot.o obj/dnrm2.o obj/dscal.o 
    1717else 
    1818BLAS_OBJECTS = 
     
    5959obj/%.o : libsvm/%.cpp libsvm/%.h 
    6060    $(COMPILER) $(COMPILEOPTIONS) -c $< -o $@ 
    61      
    6261 
    63 LINPACK_OBJECTS = obj/dqrsl.o obj/dqrdc2.o obj/dtrsl.o obj/linpack.o 
    6462 
    65 obj/%.o : linpack/%.c linpack/linpack.h 
    66     $(CCOMPILER) $(COMPILEOPTIONS) -c $< -o $@ 
    67  
    68 ALL_OBJECTS = $(ORANGE_OBJECTS) $(BLAS_OBJECTS) $(LINPACK_OBJECTS) $(LIBLINEAR_OBJECTS) $(LIBSVM_OBJECTS) 
     63ALL_OBJECTS = $(ORANGE_OBJECTS) $(BLAS_OBJECTS) $(LIBLINEAR_OBJECTS) $(LIBSVM_OBJECTS) 
    6964 
    7065$(OLD)/orange.so:   ppp/stamp px/stamp $(ALL_OBJECTS) 
  • source/orange/Orange.vcproj

    r10972 r11692  
    430430            </File> 
    431431            <File 
    432                 RelativePath=".\earth.cpp" 
    433                 > 
    434             </File> 
    435             <File 
    436                 RelativePath=".\earth.hpp" 
    437                 > 
    438             </File> 
    439             <File 
    440432                RelativePath="errors.cpp" 
    441433                > 
     
    10131005                </File> 
    10141006                <File 
    1015                     RelativePath=".\blas\dcopy.c" 
    1016                     > 
    1017                 </File> 
    1018                 <File 
    10191007                    RelativePath=".\blas\ddot.c" 
    10201008                    > 
     
    10261014                <File 
    10271015                    RelativePath=".\blas\dscal.c" 
    1028                     > 
    1029                 </File> 
    1030             </Filter> 
    1031             <Filter 
    1032                 Name="linpack" 
    1033                 > 
    1034                 <File 
    1035                     RelativePath=".\linpack\dqrdc2.c" 
    1036                     > 
    1037                 </File> 
    1038                 <File 
    1039                     RelativePath=".\linpack\dqrsl.c" 
    1040                     > 
    1041                 </File> 
    1042                 <File 
    1043                     RelativePath=".\linpack\dtrsl.c" 
    1044                     > 
    1045                 </File> 
    1046                 <File 
    1047                     RelativePath=".\linpack\linpack.c" 
    1048                     > 
    1049                 </File> 
    1050                 <File 
    1051                     RelativePath=".\linpack\linpack.h" 
    10521016                    > 
    10531017                </File> 
  • source/orange/assoc.cpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include  <iomanip> 
    232#include <fstream> 
  • source/orange/assoc.hpp

    r11338 r11703  
    1 /* 
    2     This file is part of Orange. 
    3          
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef _ASSOC_HPP 
    232#define _ASSOC_HPP 
  • source/orange/assoc_sparse.cpp

    r7986 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "assoc.hpp" 
    232#include "examplegen.hpp" 
  • source/orange/base.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "stladdon.hpp" 
    222#include "domain.hpp" 
  • source/orange/basket.cpp

    r7665 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    201 
    212// to include Python.h before STL defines a template set (doesn't work with VC 6.0) 
  • source/orange/basket.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __BASKET_HPP 
    222#define __BASKET_HPP 
  • source/orange/basstat.cpp

    r10761 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "stladdon.hpp" 
    232 
  • source/orange/basstat.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __BASSTAT_HPP 
    232#define __BASSTAT_HPP 
  • source/orange/bayes.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include <math.h> 
    222 
  • source/orange/bayes.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __BAYES_HPP 
    222#define __BAYES_HPP 
  • source/orange/boolcnt.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "boolcnt.hpp" 
    232#include "stladdon.hpp" 
  • source/orange/boolcnt.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __BOOLCNT_HPP 
    222#define __BOOLCNT_HPP 
  • source/orange/c4.5.cpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "vars.hpp" 
    232#include "examples.hpp" 
  • source/orange/c4.5.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __C45_HPP 
    232#define __C45_HPP 
  • source/orange/c45inter.cpp

    r9401 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <string> 
    232#include <stdio.h> 
  • source/orange/c45inter.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __C45INTER_HPP 
    232#define __C45INTER_HPP 
  • source/orange/calibrate.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211// to include Python.h before STL defines a template set (doesn't work with VC 6.0) 
    222#include "garbage.hpp"  
  • source/orange/calibrate.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CALIBRATE_HPP 
    232#define __CALIBRATE_HPP 
  • source/orange/callback.cpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "values.hpp" 
    222#include "vars.hpp" 
  • source/orange/callback.hpp

    r8981 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CALLBACK_HPP 
    232#define __CALLBACK_HPP 
  • source/orange/cartesian.cpp

    r7665 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "boolcnt.hpp" 
    222 
  • source/orange/cartesian.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CARTESIAN_HPP 
    232#define __CARTESIAN_HPP 
  • source/orange/clas_gen.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "stladdon.hpp" 
    222#include "vars.hpp" 
  • source/orange/clas_gen.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CLAS_GEN_HPP 
    232#define __CLAS_GEN_HPP 
  • source/orange/classfromvar.cpp

    r6886 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "vars.hpp" 
    222#include "domain.hpp" 
  • source/orange/classfromvar.hpp

    r6886 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __CLASSFROMVAR_HPP 
    222#define __CLASSFROMVAR_HPP 
  • source/orange/classifier.cpp

    r7157 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "vars.hpp" 
    232#include <math.h> 
  • source/orange/classify.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef _CLASSIFY_HPP 
    222#define _CLASSIFY_HPP 
  • source/orange/cls_example.cpp

    r11662 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "orange.hpp" 
    232 
     
    8867      if (li == Py_None) { 
    8968        *(ei++) = (*vi)->DK(); 
    90       } 
    91          
    92       else if (PyString_Check(li)) 
     69      } else if (PyString_Check(li)) { 
    9370          (*vi)->str2val(string(PyString_AsString(li)), *(ei++)); 
    94  
    95       else if ((*vi)->varType==TValue::INTVAR) { 
    96         if (PyInt_Check(li)) 
    97           *(ei++)=TValue(int(PyInt_AsLong(li))); 
    98         else { 
    99           PyErr_Format(PyExc_TypeError, "attribute no. %i (%s) is ordinal, string value expected", pos, (*vi)->get_name().c_str()); 
     71      } else if ((*vi)->varType==TValue::INTVAR) { 
     72        if (PyInt_Check(li)) { 
     73          TEnumVariable * enumvar = dynamic_cast<TEnumVariable *>(vi->getUnwrappedPtr()); 
     74          int value = int(PyInt_AsLong(li)); 
     75          if (value < 0 || value >= enumvar->noOfValues()) { 
     76            PyErr_Format(PyExc_ValueError, 
     77                         "value index %i out of range (0 - %i) at attribute no %i (%s)", 
     78                         value, enumvar->noOfValues() - 1, pos, enumvar->get_name().c_str()); 
     79            return false; 
     80          } 
     81          *(ei++) = TValue(value); 
     82        } else { 
     83          PyErr_Format(PyExc_TypeError, "attribute no. %i (%s) is ordinal, string or int value expected", pos, (*vi)->get_name().c_str()); 
    10084          return false; 
    10185        } 
  • source/orange/cls_example.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __CLS_EXAMPLE_HPP 
    222#define __CLS_EXAMPLE_HPP 
  • source/orange/cls_misc.cpp

    r9401 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "stladdon.hpp" 
    232#include "orange.hpp" 
  • source/orange/cls_misc.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __CLS_MISC_HPP 
    222#define __CLS_MISC_HPP 
  • source/orange/cls_orange.cpp

    r11603 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <string.h> 
    232 
  • source/orange/cls_orange.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CLS_ORANGE_HPP 
    232#define __CLS_ORANGE_HPP 
  • source/orange/cls_value.cpp

    r8937 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232 #pragma warning (disable : 4786 4114 4018 4267 4244) 
  • source/orange/cls_value.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CLS_VALUE_HPP 
    232#define __CLS_VALUE_HPP 
  • source/orange/contingency.cpp

    r7665 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "stladdon.hpp" 
    232 
  • source/orange/contingency.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CONTINGENCY_HPP 
    232#define __CONTINGENCY_HPP 
  • source/orange/converts.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "c2py.hpp" 
    222 
  • source/orange/converts.hpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __CONVERTS_HPP 
    232#define __CONVERTS_HPP 
  • source/orange/cost.cpp

    r7665 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "cost.ppp" 
    232 
  • source/orange/cost.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __COST_HPP 
    232#define __COST_HPP 
  • source/orange/costwrapper.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "random.hpp" 
    222#include "vars.hpp" 
  • source/orange/costwrapper.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __COSTWRAPPER_HPP 
    232#define __COSTWRAPPER_HPP 
  • source/orange/decomposition.cpp

    r10039 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "stladdon.hpp" 
    232 
  • source/orange/decomposition.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __DECOMPOSITION_HPP 
    232#define __DECOMPOSITION_HPP 
  • source/orange/dictproxy.cpp

    r10956 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "cls_orange.hpp" 
    222 
  • source/orange/discretize.cpp

    r11583 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <math.h> 
    232 
  • source/orange/discretize.hpp

    r9943 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __DISCRETIZE_HPP 
    232#define __DISCRETIZE_HPP 
  • source/orange/dist_clustering.cpp

    r7665 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "stladdon.hpp" 
    232 
  • source/orange/dist_clustering.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __DIST_CLUSTERING_HPP 
    232#define __DIST_CLUSTERING_HPP 
  • source/orange/distance.cpp

    r9107 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <math.h> 
    232#include "stladdon.hpp" 
  • source/orange/distance.hpp

    r9107 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __DISTANCE_HPP 
    232#define __DISTANCE_HPP 
  • source/orange/distance_dtw.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include <cmath> 
    222#include <limits> 
  • source/orange/distance_dtw.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "orvector.hpp" 
    222#include <vector> 
  • source/orange/distancemap.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <algorithm> 
    232#include <queue> 
  • source/orange/distancemap.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __DISTANCEMAP_HPP 
    232#define __DISTANCEMAP_HPP 
  • source/orange/distvars.cpp

    r10596 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <math.h> 
    232#include "crc.h" 
  • source/orange/distvars.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __DISTVARS_HPP 
    232#define __DISTVARS_HPP 
  • source/orange/domain.cpp

    r10596 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "vars.hpp" 
    232#include "examples.hpp" 
  • source/orange/domain.hpp

    r10596 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __DOMAIN_HPP 
    222#define __DOMAIN_HPP 
  • source/orange/domaindepot.cpp

    r9410 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "vars.hpp" 
    222#include "domain.hpp" 
  • source/orange/domaindepot.hpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __DOMAINDEPOT_HPP 
    232#define __DOMAINDEPOT_HPP 
  • source/orange/errors.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "errors.hpp" 
    232#include "stdio.h" 
  • source/orange/errors.hpp

    r10887 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef __ERRORS_HPP 
    222#define __ERRORS_HPP 
  • source/orange/estimateprob.cpp

    r10963 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "vars.hpp" 
    232#include "contingency.hpp" 
  • source/orange/estimateprob.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __ESTIMATEPROB_HPP 
    232#define __ESTIMATEPROB_HPP 
  • source/orange/exampleclustering.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "values.hpp" 
    232#include "examples.hpp" 
  • source/orange/exampleclustering.hpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __EXAMPLECLUSTERING_HPP 
    232#define __EXAMPLECLUSTERING_HPP 
  • source/orange/examplegen.cpp

    r10596 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "vars.hpp" 
    232#include "domain.hpp" 
  • source/orange/examplegen.hpp

    r11338 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __EXAMPLE_GEN_HPP 
    232#define __EXAMPLE_GEN_HPP 
  • source/orange/examples.cpp

    r11661 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <algorithm> 
    232#include <iomanip> 
  • source/orange/examples.hpp

    r10596 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __EXAMPLES_HPP 
    232#define __EXAMPLES_HPP 
  • source/orange/excel.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef INCLUDE_EXCEL 
    232 
  • source/orange/filegen.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include <stdio.h> 
    222 
  • source/orange/filegen.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __FILEGEN_HPP 
    232#define __FILEGEN_HPP 
  • source/orange/filter.cpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <stdlib.h> 
    232#include <iostream> 
  • source/orange/filter.hpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __FILTER_HPP 
    232#define __FILTER_HPP 
  • source/orange/functions.cpp

    r7665 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232 #pragma warning (disable : 4786 4114 4018 4267) 
  • source/orange/garbage.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "garbage.hpp" 
    232#include <string> 
  • source/orange/garbage.hpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __GARBAGE_HPP 
    232#define __GARBAGE_HPP 
  • source/orange/getarg.cpp

    r10887 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include <iostream> 
    222#include <fstream> 
  • source/orange/getarg.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __GETARG_HPP 
    232#define __GETARG_HPP 
  • source/orange/graph.cpp

    r6963 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include <algorithm> 
    222#include <limits> 
  • source/orange/graph.hpp

    r6963 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __GRAPH_HPP 
    232#define __GRAPH_HPP 
  • source/orange/gslconversions.cpp

    r10945 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211/* 
    222#include "gsl/gsl_matrix.h" 
  • source/orange/gslconversions.hpp

    r9532 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __GSLCONVERSIONS_HPP 
    232#define __GSLCONVERSIONS_HPP 
  • source/orange/hclust.cpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#define USE_TR1 1 
    222 
  • source/orange/hclust.hpp

    r11338 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __HCLUST_CPP 
    232#define __HCLUST_CPP 
  • source/orange/imputation.cpp

    r7665 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include "vars.hpp" 
    232#include "examples.hpp" 
  • source/orange/imputation.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __IMPUTATION_HPP 
    232#define __IMPUTATION_HPP 
  • source/orange/induce.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "induce.ppp" 
  • source/orange/induce.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __INDUCE_HPP 
    232#define __INDUCE_HPP 
  • source/orange/knn.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#include <limits> 
    232#include <list> 
  • source/orange/knn.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __KNN_HPP 
    232#define __KNN_HPP 
  • source/orange/learn.cpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221// to include Python.h before STL defines a template set (doesn't work with VC >6.0) 
    232#include "garbage.hpp"  
  • source/orange/learn.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __LEARN_HPP 
    232#define __LEARN_HPP 
  • source/orange/lib_components.cpp

    r11336 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232#pragma warning (disable : 4786 4114 4018 4267 4244) 
  • source/orange/lib_io.cpp

    r10460 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232  #pragma warning (disable : 4786 4114 4018 4267 4244) 
  • source/orange/lib_kernel.cpp

    r11625 r11705  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifdef _MSC_VER 
    222  #pragma warning (disable : 4786 4114 4018 4267 4244) 
     
    336316 
    337317 
     318/* 
     319 * Variable.attributes dictionary getter/setter 
     320 */ 
     321 
     322PyObject *Variable_get_attributes(TPyOrange *self) 
     323{ 
     324    PyObject *res = NULL; 
     325 
     326    if (self->orange_dict && (res = PyDict_GetItemString(self->orange_dict, "attributes"))) { 
     327        Py_INCREF(res); 
     328        return res; 
     329    } 
     330 
     331    PyObject *dict = PyDict_New(); 
     332    Orange_setattrDictionary(self, "attributes", dict, false); 
     333    return dict; 
     334} 
     335 
     336 
     337int Variable_set_attributes(TPyOrange *self, PyObject *dict) 
     338{ 
     339    if (!dict) { 
     340        PYERROR(PyExc_TypeError, "Cannot delete 'attributes' dict", 0); 
     341    } 
     342 
     343    if (!PyDict_Check(dict)) { 
     344        PYERROR(PyExc_TypeError, "'attributes' must be a dict", 0); 
     345    } 
     346    return Orange_setattrDictionary(self, "attributes", dict, false); 
     347} 
     348 
     349 
    338350#include "stringvars.hpp" 
    339351C_NAMED(StringVariable - Orange.feature.String, Variable, "([name=])") 
     
    386398} 
    387399 
    388  
    389 PyObject *Variable_getattr(TPyOrange *self, PyObject *name) 
    390 { 
    391   if (PyString_Check(name) && !strcmp(PyString_AsString(name), "attributes") 
    392       && (!self->orange_dict || !PyDict_Contains(self->orange_dict, name))) { 
    393     PyObject *dict = PyDict_New(); 
    394     Orange_setattrDictionary(self, name, dict, false); 
    395     Py_DECREF(dict); 
    396   } 
    397  
    398   return Orange_getattr(self, name); 
    399 } 
    400400 
    401401PyObject *Variable_randomvalue(PyObject *self, PyObject *args) PYARGS(0, "() -> Value") 
     
    28932893TExampleTable *readListOfExamples(PyObject *args) 
    28942894{ 
    2895     if (isSomeNumeric_wPrecheck(args)) 
     2895    if (isSomeNumeric_wPrecheck(args) || isSomeMaskedNumeric_wPrecheck(args)) 
    28962896      return readListOfExamples(args, PDomain(), false); 
    28972897 
     
    29342934 
    29352935 
     2936 
     2937template<typename T> 
     2938int to_int_value(T & value) { 
     2939    return (int)value; 
     2940} 
     2941 
     2942 
     2943template<> 
     2944int to_int_value<float>(float & value) { 
     2945    return (int)floor(0.5 + value); 
     2946} 
     2947 
     2948 
     2949template<> 
     2950int to_int_value<double>(double & value) { 
     2951    return (int)floor(0.5 + value); 
     2952} 
     2953 
     2954 
     2955template<typename T> 
     2956void init_value(TValue & target, TVariable & variable, T & value, bool masked=false) { 
     2957    if (variable.varType == TValue::INTVAR) { 
     2958        TEnumVariable * enumvar = dynamic_cast<TEnumVariable *>(&variable); 
     2959        int ivalue = to_int_value(value); 
     2960        if (enumvar) { 
     2961            if (!masked && (ivalue < 0 || ivalue >= enumvar->noOfValues())) { 
     2962                PyErr_Format(PyExc_ValueError, "Invalid value for a Discrete variable."); 
     2963                throw pyexception(); 
     2964            } 
     2965        } 
     2966        intValInit(target, ivalue, masked ? valueDK : valueRegular); 
     2967    } else { 
     2968        floatValInit(target, (float)value,  masked ? valueDK : valueRegular); 
     2969    } 
     2970} 
     2971 
     2972 
     2973template<typename T> 
     2974void copy_strided_buffer_to_example( 
     2975        TExample & example, 
     2976        char * buffer, Py_ssize_t stride, 
     2977        char * mask_buffer, Py_ssize_t mask_stride) { 
     2978    PDomain domain = example.domain; 
     2979    PVarList vars = domain->variables, class_vars = domain->classVars; 
     2980    TVarList::iterator var_iter = vars->begin(); 
     2981    TValue * value_iter = example.begin(); 
     2982    int pos = 0; 
     2983 
     2984    // copy variables part 
     2985    for (; var_iter != vars->end(); 
     2986            var_iter++, value_iter++, pos++) { 
     2987        init_value(*value_iter, var_iter->getReference(), 
     2988                   *((T *) buffer), mask_buffer && (*mask_buffer)); 
     2989 
     2990        buffer += stride; 
     2991        if (mask_buffer) { 
     2992            mask_buffer += mask_stride; 
     2993        } 
     2994    } 
     2995 
     2996    // copy class vars part 
     2997    for (var_iter = class_vars->begin(); 
     2998            var_iter != class_vars->end(); 
     2999            var_iter++, value_iter++, pos++) { 
     3000        init_value(*value_iter, var_iter->getReference(), 
     3001                   *((T *) buffer), mask_buffer && (*mask_buffer)); 
     3002 
     3003        buffer += stride; 
     3004        if (mask_buffer) { 
     3005        mask_buffer += mask_stride; 
     3006        } 
     3007    } 
     3008} 
     3009 
     3010 
    29363011TExampleTable *readListOfExamples(PyObject *args, PDomain domain, bool filterMetas) 
    29373012{ 
     
    29393014 
    29403015  if (isSomeNumeric_wPrecheck(args)) { 
    2941     array = (PyArrayObject *)(args); 
    2942   } 
    2943   else if (isSomeMaskedNumeric_wPrecheck(args)) { 
    2944     array = (PyArrayObject *)(args); 
     3016    array = (PyArrayObject *)args; 
     3017  } else if (isSomeMaskedNumeric_wPrecheck(args)) { 
     3018    array = (PyArrayObject *)args; 
    29453019    mask = (PyArrayObject *)PyObject_GetAttrString(args, "mask"); 
    29463020    if (!mask) { 
    29473021        PyErr_Clear(); 
    2948     } 
    2949     else if (!isSomeNumeric_wPrecheck((PyObject *)mask)) { 
     3022    } else if (!isSomeNumeric_wPrecheck((PyObject *)mask)) { 
    29503023      Py_DECREF((PyObject *)mask); 
    29513024      mask = NULL; 
     
    30073080      const int &strideMaskCol = mask ? mask->strides[1] : strideCol; 
    30083081 
    3009       TVarList::const_iterator const vb(variables->begin()); 
    3010       TVarList::const_iterator const ve(variables->end()); 
    3011       TVarList::const_iterator const cb(domain->classVars->begin()); 
    3012       TVarList::const_iterator const ce(domain->classVars->end()); 
    3013  
    30143082      try { 
    30153083        TExample::iterator ei; 
     
    30173085        char *maskRowPtr = mask ? mask->data : array->data; 
    30183086 
    3019         for(int row = 0, rowe = array->dimensions[0]; row < rowe; row++, rowPtr += strideRow, maskRowPtr += strideMaskRow) { 
    3020           char *elPtr = rowPtr; 
    3021           char *maskPtr = maskRowPtr; 
     3087        for (int row = 0, rowe = array->dimensions[0]; 
     3088             row < rowe; 
     3089             row++, rowPtr += strideRow, maskRowPtr += strideMaskRow) { 
    30223090          TExample *nex = mlnew TExample(domain); 
    3023  
    3024           #define ARRAYTYPE(TYPE) \ 
    3025             for(ei = nex->begin(), vi = vb; vi!=ve; vi++, ei++, elPtr += strideCol, maskPtr += strideMaskCol) \ 
    3026               if ((*vi)->varType == TValue::INTVAR) \ 
    3027                 intValInit(*ei, *(TYPE *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); \ 
    3028               else \ 
    3029                 floatValInit(*ei, *(TYPE *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); \ 
    3030             for(vi = cb; vi!=ce; vi++, ei++, elPtr += strideCol, maskPtr += strideMaskCol) \ 
    3031               if ((*vi)->varType == TValue::INTVAR) \ 
    3032                 intValInit(*ei, *(TYPE *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); \ 
    3033               else \ 
    3034                 floatValInit(*ei, *(TYPE *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); \ 
    3035             break; 
     3091          char * maskPtr = mask ? maskRowPtr : NULL; 
     3092 
     3093          #define COPY_BUFFER(TYPE) \ 
     3094                  copy_strided_buffer_to_example<TYPE>(*nex, rowPtr, strideCol, maskPtr, strideMaskCol); \ 
     3095                  break; 
    30363096 
    30373097          switch (arrayType) { 
    30383098            case 'c': 
    3039             case 'b': ARRAYTYPE(char) 
    3040             case 'B': ARRAYTYPE(unsigned char) 
    3041             case 'h': ARRAYTYPE(short) 
    3042             case 'H': ARRAYTYPE(unsigned short) 
    3043             case 'i': ARRAYTYPE(int) 
    3044             case 'I': ARRAYTYPE(unsigned int) 
    3045             case 'l': ARRAYTYPE(long) 
    3046             case 'L': ARRAYTYPE(unsigned long) 
    3047  
    3048             case 'f': 
    3049               for(ei = nex->begin(), vi = vb; vi!=ve; vi++, ei++, elPtr += strideCol, maskPtr += strideMaskCol) 
    3050                 if ((*vi)->varType == TValue::INTVAR) 
    3051                   intValInit(*ei, int(floor(0.5 + *(float *)elPtr)), mask && !*maskPtr ? valueDK : valueRegular); 
    3052                 else 
    3053                   floatValInit(*ei, *(float *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); 
    3054               for(vi = cb; vi!=ce; vi++, ei++, elPtr += strideCol, maskPtr += strideMaskCol) 
    3055                 if ((*vi)->varType == TValue::INTVAR) 
    3056                   intValInit(*ei, int(floor(0.5 + *(float *)elPtr)), mask && !*maskPtr ? valueDK : valueRegular); 
    3057                 else 
    3058                   floatValInit(*ei, *(float *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); 
    3059               break; 
    3060  
    3061             case 'd': 
    3062               for(ei = nex->begin(), vi = variables->begin(); vi!=ve; vi++, ei++, elPtr += strideCol, maskPtr += strideMaskCol) 
    3063                 if ((*vi)->varType == TValue::INTVAR) 
    3064                   intValInit(*ei, int(floor(0.5 + *(double *)elPtr)), mask && !*maskPtr ? valueDK : valueRegular); 
    3065                 else 
    3066                   floatValInit(*ei, *(double *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); 
    3067               for(vi = cb; vi!=ce; vi++, ei++, elPtr += strideCol, maskPtr += strideMaskCol) 
    3068                 if ((*vi)->varType == TValue::INTVAR) 
    3069                   intValInit(*ei, int(floor(0.5 + *(double *)elPtr)), mask && !*maskPtr ? valueDK : valueRegular); 
    3070                 else 
    3071                   floatValInit(*ei, *(double *)elPtr, mask && !*maskPtr ? valueDK : valueRegular); 
    3072               break; 
    3073  
     3099            case 'b': COPY_BUFFER(char) 
     3100            case 'B': COPY_BUFFER(unsigned char) 
     3101            case 'h': COPY_BUFFER(short) 
     3102            case 'H': COPY_BUFFER(unsigned short) 
     3103            case 'i': COPY_BUFFER(int) 
     3104            case 'I': COPY_BUFFER(unsigned int) 
     3105            case 'l': COPY_BUFFER(long) 
     3106            case 'L': COPY_BUFFER(unsigned long) 
     3107            case 'f': COPY_BUFFER(float) 
     3108            case 'd': COPY_BUFFER(double) 
    30743109          } 
    30753110 
    3076           #undef ARRAYTYPE 
     3111          #undef COPY_BUFFER 
    30773112 
    30783113          table->addExample(nex); 
  • source/orange/lib_kernel.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifndef __LIB_KERNEL_HPP 
    232#define __LIB_KERNEL_HPP 
  • source/orange/lib_learner.cpp

    r11610 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232  #pragma warning (disable : 4786 4114 4018 4267 4244) 
     
    16481627} 
    16491628 
    1650  
    1651 /************ EARTH (MARS) ******/ 
    1652 #include "earth.hpp" 
    1653  
    1654 C_CALL(EarthLearner, Learner, "([examples], [weight=] -/-> Classifier)") 
    1655 C_NAMED(EarthClassifier, ClassifierFD, " ") 
    1656  
    1657 PyObject *EarthClassifier_formatEarth(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "() -> None") 
    1658 { 
    1659     PyTRY 
    1660     CAST_TO(TEarthClassifier, classifier); 
    1661     classifier->format_earth(); 
    1662     RETURN_NONE; 
    1663     PyCATCH 
    1664 } 
    1665  
    1666 PyObject *EarthClassifier__reduce__(PyObject *self) PYARGS(METH_VARARGS, "") 
    1667 { 
    1668     PyTRY 
    1669     CAST_TO(TEarthClassifier, classifier); 
    1670     TCharBuffer buffer(1024); 
    1671     classifier->save_model(buffer); 
    1672     return Py_BuildValue("O(s#)N", getExportedFunction("__pickleLoaderEarthClassifier"), 
    1673                                     buffer.buf, buffer.length(), 
    1674                                     packOrangeDictionary(self)); 
    1675     PyCATCH 
    1676 } 
    1677  
    1678 PyObject *__pickleLoaderEarthClassifier(PyObject *self, PyObject *args) PYARGS(METH_VARARGS, "(buffer)") 
    1679 { 
    1680     PyTRY 
    1681     char * cbuf = NULL; 
    1682     int buffer_size = 0; 
    1683     if (!PyArg_ParseTuple(args, "s#:__pickleLoaderEarthClassifier", &cbuf, &buffer_size)) 
    1684         return NULL; 
    1685     TCharBuffer buffer(cbuf); 
    1686     PEarthClassifier classifier = mlnew TEarthClassifier(); 
    1687     classifier->load_model(buffer); 
    1688     return WrapOrange(classifier); 
    1689     PyCATCH 
    1690 } 
    1691  
    1692  
    16931629     
    16941630/************* BAYES ************/ 
  • source/orange/lib_preprocess.cpp

    r10960 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    21  
    221#ifdef _MSC_VER 
    232  #pragma warning (disable : 4786 4114 4018 4267 4244) 
  • source/orange/lib_vectors.cpp

    r10668 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Orange is free software; you can redistribute it and/or modify 
    5     it under the terms of the GNU General Public License as published by 
    6     the Free Software Foundation; either version 2 of the License, or 
    7     (at your option) any later version. 
    8  
    9     Orange is distributed in the hope that it will be useful, 
    10     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    12     GNU General Public License for more details. 
    13  
    14     You should have received a copy of the GNU General Public License 
    15     along with Orange; if not, write to the Free Software 
    16     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    17  
    18     Authors: Janez Demsar, Blaz Zupan, 1996--2002 
    19     Contact: janez.demsar@fri.uni-lj.si 
    20 */ 
    21  
    22  
    231#include "orvector.hpp" 
    242#include "cls_orange.hpp" 
  • source/orange/liblinear_interface.cpp

    r11670 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Copyright 1996-2011 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include <iostream> 
    222#include <sstream> 
  • source/orange/liblinear_interface.hpp

    r11610 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#ifndef LINEAR_HPP 
    222#define LINEAR_HPP 
  • source/orange/libsvm_interface.cpp

    r11664 r11703  
    1 /* 
    2     This file is part of Orange. 
    3  
    4     Copyright 1996-2011 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include <iostream> 
    222#include <sstream> 
  • source/orange/libsvm_interface.hpp

    r11650 r11703  
    1 /* 
    2   
    3  Copyright (c) 2000-2010 Chih-Chung Chang and Chih-Jen Lin 
    4  All rights reserved. 
    5   
    6  Redistribution and use in source and binary forms, with or without 
    7  modification, are permitted provided that the following conditions 
    8  are met: 
    9   
    10  1. Redistributions of source code must retain the above copyright 
    11  notice, this list of conditions and the following disclaimer. 
    12   
    13  2. Redistributions in binary form must reproduce the above copyright 
    14  notice, this list of conditions and the following disclaimer in the 
    15  documentation and/or other materials provided with the distribution. 
    16   
    17  3. Neither name of copyright holders nor the names of its contributors 
    18  may be used to endorse or promote products derived from this software 
    19  without specific prior written permission. 
    20   
    21   
    22  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    23  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    24  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
    25  A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR 
    26  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
    27  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
    28  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
    29  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
    30  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
    31  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    32  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    33  */ 
    34  
    35  
    361#ifndef __SVM_HPP 
    372#define __SVM_HPP 
  • source/orange/logfit.cpp

    r9178 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "logfit.ppp" 
    222#include "converts.hpp" 
  • source/orange/logfit.hpp

    r6531 r11703  
    1 /* 
    2     This file is part of Orange. 
    3      
    4     Copyright 1996-2010 Faculty of Computer and Information Science, University of Ljubljana 
    5     Contact: janez.demsar@fri.uni-lj.si 
    6  
    7     Orange is free software: you can redistribute it and/or modify 
    8     it under the terms of the GNU General Public License as published by 
    9     the Free Software Foundation, either version 3 of the License, or 
    10     (at your option) any later version. 
    11  
    12     Orange is distributed in the hope that it will be useful, 
    13     but WITHOUT ANY WARRANTY; without even the implied warranty of 
    14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    15     GNU General Public License for more details. 
    16  
    17     You should have received a copy of the GNU General Public License 
    18     along with Orange.  If not, see <http://www.gnu.org/licenses/>. 
    19 */ 
    20  
    211#include "root.hpp" 
    222#include "orvector.hpp" 
     
    9777  double tol; //  tolerance for matrix singularity 
    9878  double eps; //difference in `-2  log' likelihood for declaring convergence. 
    99   double penalty; //penalty (scalar), substract from ML beta'×penalty×beta. Set if  
     79  double penalty; //penalty (scalar), substract from ML beta'�penalty�beta. Set if  
    10080     //model doesnt converge */ 
    10181 
  • source/orange/logistic.cpp

    r7665