Changeset 342


Ignore:
Timestamp:
Jun 7, 2005, 11:28:48 PM (16 years ago)
Author:
Jari Häkkinen
Message:

Removed vector negation operator.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/gslapi/vector.cc

    r341 r342  
    153153
    154154
    155   vector vector::operator-(void) const
    156   {
    157     vector res( *this );
    158     gsl_vector_scale (res.v_,-1.);
    159     return res;
    160   }
    161 
    162 
    163 
    164155  double vector::operator*( const vector &other ) const
    165156  {
  • trunk/lib/gslapi/vector.h

    r341 r342  
    300300      { return *gsl_vector_const_ptr(v_,i); }
    301301   
    302     ///
    303     /// @return The negation of the vector.
    304     ///
    305     vector operator-(void) const;
    306 
    307302    ///
    308303    /// @return The dot product.
  • trunk/lib/svm/GaussianKernelFunction.h

    r295 r342  
    3838    ///
    3939    inline double operator()(const gslapi::vector& a1,
    40                              const gslapi::vector& a2)
    41       {return exp(-(a1-a2)*(a1-a2)/(sigma_*sigma_));}
     40                             const gslapi::vector& a2) const
     41      { return exp(-((a1-a2)*(a1-a2))/(sigma_*sigma_)); }
    4242
    4343    ///
  • trunk/test/roc_test.cc

    r301 r342  
    3131    ok = false;
    3232  }
    33   area = roc.score(-target, value);
     33  target*=-1;
     34  area = roc.score(target, value);
    3435  if (area!=1.0){
    3536    if (print)
Note: See TracChangeset for help on using the changeset viewer.