Ignore:
Timestamp:
Mar 1, 2006, 12:23:53 PM (16 years ago)
Author:
Peter
Message:

Modified Kernel to be built from MatrixLookup? rather than
gslapi::matrix. Also changed interface to create DataLookup1D from
DataLookup2D - is now coherent with gslapi.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/classifier/KernelWeighted_SEV.cc

    r513 r527  
    33#include <c++_tools/classifier/KernelWeighted_SEV.h>
    44
     5#include <c++_tools/classifier/DataLookup1D.h>
    56#include <c++_tools/classifier/Kernel.h>
    67#include <c++_tools/classifier/KernelFunction.h>
     8#include <c++_tools/classifier/MatrixLookup.h>
    79#include <c++_tools/gslapi/matrix.h>
    810#include <c++_tools/gslapi/vector.h>
     
    1214
    1315
    14 KernelWeighted_SEV::KernelWeighted_SEV(const gslapi::matrix& data,
     16KernelWeighted_SEV::KernelWeighted_SEV(const MatrixLookup& data,
    1517                                       const KernelFunction& kf,
    16                                        const gslapi::matrix& weights)
     18                                       const MatrixLookup& weights)
    1719  : Kernel(data,kf), weights_(weights)
    1820{
     
    2123    for (size_t j=i; j<kernel_matrix_.columns(); j++)
    2224      kernel_matrix_(i,j) = kernel_matrix_(j,i) =
    23         (*kf_)(gslapi::vector(data_,i,false),gslapi::vector(data_,j,false),
    24                gslapi::vector(weights_,i,false),
    25                gslapi::vector(weights_,j,false));
     25        (*kf_)(DataLookup1D(data_,i,false),
     26               DataLookup1D(data_,j,false),
     27               DataLookup1D(weights_,i,false),
     28               DataLookup1D(weights_,j,false));
    2629}
    2730
Note: See TracChangeset for help on using the changeset viewer.