Changeset 8980:9d0d27f6fe7a in orange


Ignore:
Timestamp:
09/19/11 14:15:09 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
5c1482f6ace78fbd1094ba1869a9e3926785e2e8
Message:

Reverting a bad commit in r12089 (did not preserve history).

Location:
source/orange
Files:
4 added
14 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • source/orange/Makefile

    r8978 r8980  
    66 
    77 
    8 ######################################################################### 
    9 # If BLAS_LIB is not defiend then include a minimal subset of blas into 
    10 # orange library. If BLAS_LIB is defined it must be the name of the blas 
    11 # library to link with (e.g. blas). The libraries must be on the 
    12 # search path.  
    13 ######################################################################### 
     8r_imports.jpp: r_imports.hpp 
     9    $(PYTHON) ../pyxtract/jitlink_build.py R.so r_imports.hpp 
     10r_imports.ipp: r_imports.hpp 
     11    $(PYTHON) ../pyxtract/jitlink_build.py R.so r_imports.hpp 
    1412 
    15 ifndef BLAS_LIB 
     13 
     14# TODO: Dont compile BLAS if we can link with system (or user 
     15# supplied) blas 
     16 
    1617BLAS_OBJECTS = obj/daxpy.o obj/ddot.o obj/dnrm2.o obj/dscal.o obj/dcopy.o 
    17 else 
    18 BLAS_OBJECTS = 
    19 LINKOPTIONS += -l$(BLAS_LIB) 
    20 endif 
    21  
     18     
    2219obj/%.o : blas/%.c blas/blas.h blas/blasp.h 
    2320    $(CCOMPILER) $(COMPILEOPTIONS) -c $< -o $@ 
    24  
    25  
    26 ######################################################################### 
    27 # If LIBLINEAR_LIB is not defiend then include a minimal subset of LIBLINEAR 
    28 # into orange library. If LIBLINEAR_LIB is defined it must be the name of the 
    29 # liblinear library to link with (e.g. linear). The library must be on the 
    30 # search path.  
    31 #########################################################################  
    32  
    33 ifndef LIBLINEAR_LIB 
    34 LIBLINEAR_OBJECTS = obj/linear.o obj/tron.o 
    35 COMPILEOPTIONS += -Iliblinear # Add liblinear inclue dir to compile options 
    36 else 
    37 LIBLINEAR_OBJECTS = 
    38 LINKOPTIONS += -l$(LIBLINEAR_LIB) 
    39 endif 
    40  
    41 obj/%.o : liblinear/%.cpp liblinear/%.h 
    42     $(COMPILER) $(COMPILEOPTIONS) -c $< -o $@ 
    43  
    44  
    45 ######################################################################### 
    46 # If LIBSVM_LIB is not defiend then include a minimal subset of LIBSVM 
    47 # into orange library. If LIBSVM_LIB is defined it must be the name of the 
    48 # libsvm library to link with (e.g. svm). The library must be on the  
    49 # search path.  
    50 ######################################################################### 
    51  
    52 ifndef LIBSVM_LIB 
    53 LIBSVM_OBJECTS = obj/svm.o 
    54 else 
    55 LIBSVM_OBJECTS = 
    56 LINKOPTIONS += -l$(LIBSVM_LIB) 
    57 endif 
    58  
    59 obj/%.o : libsvm/%.cpp libsvm/%.h 
    60     $(COMPILER) $(COMPILEOPTIONS) -c $< -o $@ 
    61      
    6221 
    6322LINPACK_OBJECTS = obj/dqrsl.o obj/dqrdc2.o obj/dtrsl.o obj/linpack.o 
     
    6625    $(CCOMPILER) $(COMPILEOPTIONS) -c $< -o $@ 
    6726 
    68 ALL_OBJECTS = $(ORANGE_OBJECTS) $(BLAS_OBJECTS) $(LINPACK_OBJECTS) $(LIBLINEAR_OBJECTS) $(LIBSVM_OBJECTS) 
    69  
    70 $(OLD)/orange.so:   ppp/stamp px/stamp $(ALL_OBJECTS) 
    71     $(LINKER) $(ALL_OBJECTS) $(LINKOPTIONS) -o $(OLD)/orange.so 
     27$(OLD)/orange.so:   ppp/stamp px/stamp $(ORANGE_OBJECTS) $(BLAS_OBJECTS) $(LINPACK_OBJECTS) 
     28    $(LINKER) $(ORANGE_OBJECTS) $(BLAS_OBJECTS) $(LINPACK_OBJECTS) $(LINKOPTIONS) -o $(OLD)/orange.so 
    7229ifeq ($(OS), Darwin) 
    7330    install_name_tool -id $(DESTDIR)/orange.so $(OLD)/orange.so 
     
    7633 
    7734clean: cleantemp 
    78 #   rm -f r_imports.ipp r_imports.jpp 
     35    rm -f r_imports.ipp r_imports.jpp 
    7936    rm -f $(OLD)/orange.so $(OLD)/liborange.so 
  • source/orange/lib_learner.cpp

    r8978 r8980  
    12571257 
    12581258/************ Linear **********/ 
    1259 #include "liblinear_interface.hpp" 
     1259#include "linear.hpp" 
    12601260C_CALL(LinearLearner - Orange.classification.svm.LinearLearner, Learner, "([examples] -/-> Classifier)") 
    12611261C_NAMED(LinearClassifier - Orange.classification.svm.LinearClassifier, ClassifierFD, " ") 
     
    12951295} 
    12961296 
    1297 /************* LIBSVM ************/ 
    1298  
    1299 #include "libsvm_interface.hpp" 
     1297/************* SVM ************/ 
     1298 
     1299#include "svm.hpp" 
    13001300C_CALL(SVMLearner - Orange.core.SVMLearner, Learner, "([examples] -/-> Classifier)") 
    13011301C_CALL(SVMLearnerSparse - Orange.core.SVMLearnerSparse, SVMLearner, "([examples] -/-> Classifier)") 
     
    14741474    if (!model) 
    14751475        raiseError("Error building LibSVM Model"); 
    1476 //  model->param.learner = NULL; 
    1477     PSVMClassifier svm = mlnew TSVMClassifier(classVar, examples, model, NULL, kernel); 
    1478 //  svm->kernelFunc = kernel; 
     1476    model->param.learner = NULL; 
     1477    PSVMClassifier svm = mlnew TSVMClassifier(classVar, examples, model, NULL); 
     1478    svm->kernelFunc = kernel; 
    14791479    svm->supportVectors = supportVectors; 
    14801480    return WrapOrange(svm); 
     
    15011501    if (!model) 
    15021502        raiseError("Error building LibSVM Model"); 
    1503 //  model->param.learner = NULL; 
    1504     PSVMClassifier svm = mlnew TSVMClassifierSparse(classVar, examples, model, NULL, useNonMeta != 0, kernel); 
    1505 //  svm->kernelFunc = kernel; 
     1503    model->param.learner = NULL; 
     1504    PSVMClassifier svm = mlnew TSVMClassifierSparse(classVar, examples, model, NULL, useNonMeta != 0); 
     1505    svm->kernelFunc = kernel; 
    15061506    svm->supportVectors = supportVectors; 
    15071507    return WrapOrange(svm); 
Note: See TracChangeset for help on using the changeset viewer.