Changeset 7822:cdc2bf0a711a in orange


Ignore:
Timestamp:
04/08/11 13:35:51 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
819deaccae943f7a419719e21eaa657b5132feae
Message:

Changed function class name to function1 to avoid name clash with std:tr1:function on VS 2010.

Location:
source/orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orange/linear.cpp

    r7812 r7822  
    3434 
    3535/* 
    36 Copy from linear.cpp of LIBLINEAR 
    37 Changes: 
    38     -#include "linear.h" -> #include "linear.ppp" 
    39     - removed #include "tron.h", instead the contents of tron.h are in linear.h 
    40     -#ifndef block around swap, min and max definition 
     36Changes to original linear.cpp v1.7: 
     37    - changed '#include "linear.h"' -> '#include "linear.ppp"' 
     38    - removed '#include "tron.h"', instead the contents of tron.h are in linear.hpp 
     39    - added '#ifndef' block around swap, min and max definition 
     40    - changed function to function1 
    4141*/ 
    4242 
     
    9494#endif 
    9595 
    96 class l2r_lr_fun : public function 
     96class l2r_lr_fun : public function1 
    9797{ 
    9898public: 
     
    249249} 
    250250 
    251 class l2r_l2_svc_fun : public function 
     251class l2r_l2_svc_fun : public function1 
    252252{ 
    253253public: 
     
    17991799    neg = prob->l - pos; 
    18001800     
    1801     function *fun_obj=NULL; 
     1801    function1 *fun_obj=NULL; 
    18021802    switch(param->solver_type) 
    18031803    { 
     
    24002400} 
    24012401 
    2402 TRON::TRON(const function *fun_obj, double eps, int max_iter) 
    2403 { 
    2404     this->fun_obj=const_cast<function *>(fun_obj); 
     2402TRON::TRON(const function1 *fun_obj, double eps, int max_iter) 
     2403{ 
     2404    this->fun_obj=const_cast<function1 *>(fun_obj); 
    24052405    this->eps=eps; 
    24062406    this->max_iter=max_iter; 
  • source/orange/linear.hpp

    r7812 r7822  
    3434*/ 
    3535 
     36/* 
     37Changes to the original linear.h version 1.7: 
     38    - changed the class function to class function1 (name conflict with C++ 0x) 
     39*/ 
    3640 
    3741 
     
    112116#define _TRON_H 
    113117 
    114 class function 
     118class function1 
    115119{ 
    116120public: 
     
    120124     
    121125    virtual int get_nr_variable(void) = 0 ; 
    122     virtual ~function(void){} 
     126    virtual ~function1(void){} 
    123127}; 
    124128 
     
    126130{ 
    127131public: 
    128     TRON(const function *fun_obj, double eps = 0.1, int max_iter = 1000); 
     132    TRON(const function1 *fun_obj, double eps = 0.1, int max_iter = 1000); 
    129133    ~TRON(); 
    130134     
     
    138142    double eps; 
    139143    int max_iter; 
    140     function *fun_obj; 
     144    function1 *fun_obj; 
    141145    void info(const char *fmt,...); 
    142146    void (*tron_print_string)(const char *buf); 
Note: See TracChangeset for help on using the changeset viewer.