Ignore:
Timestamp:
Mar 5, 2008, 3:56:13 AM (14 years ago)
Author:
Peter
Message:

returning SmartPtr? rather than conventional pointer when object is dynamically allocated - also fixed bug in SubsetGenerator? for Kernel with feature selection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/KernelLookup.h

    r1170 r1201  
    267267       corresponds to the same pair of samples as in the original
    268268       KernelLookup.
    269 
    270        \note Returns a dynamically allocated KernelLookup, which has
    271        to be deleted by the caller to avoid memory leaks.
    272     */
    273     const KernelLookup* selected(const utility::Index& index) const;
     269    */
     270    utility::SmartPtr<const KernelLookup>
     271    selected(const utility::Index& index) const;
    274272   
     273    /**
     274       This function is useful when predicting on an independent data
     275       set using a kernel-based classifier. In returned KernelLookup
     276       column \f$ i \f$ corresponds to column \f$ i \f$ in @a
     277       data. Row \f$ i \f$ in returned KernelLookup corresponds to
     278       same sample as row \f$ i \f$ in @a this. In other words, this
     279       function returns a KernelLookup containing the kernel elements
     280       between the passed @a data and the internal underlying data @a
     281       this was built from.
     282    */
     283    utility::SmartPtr<const KernelLookup>
     284    test_kernel(const MatrixLookup& data) const;
     285
    275286    /**
    276287       This function is useful when predicting on an independent data
     
    286297       to be deleted by the caller to avoid memory leaks.
    287298    */
    288     const KernelLookup* test_kernel(const MatrixLookup& data) const;
    289 
    290     /**
    291        This function is useful when predicting on an independent data
    292        set using a kernel-based classifier. In returned KernelLookup
    293        column \f$ i \f$ corresponds to column \f$ i \f$ in @a
    294        data. Row \f$ i \f$ in returned KernelLookup corresponds to
    295        same sample as row \f$ i \f$ in @a this. In other words, this
    296        function returns a KernelLookup containing the kernel elements
    297        between the passed @a data and the internal underlying data @a
    298        this was built from.
    299    
    300        @note Returns a dynamically allocated KernelLookup, which has
    301        to be deleted by the caller to avoid memory leaks.
    302     */
    303     const KernelLookup* test_kernel(const MatrixLookupWeighted& data) const;
     299    utility::SmartPtr<const KernelLookup>
     300    test_kernel(const MatrixLookupWeighted& data) const;
    304301
    305302    /**
Note: See TracChangeset for help on using the changeset viewer.