Changeset 556


Ignore:
Timestamp:
Mar 8, 2006, 2:09:48 PM (16 years ago)
Author:
Peter
Message:

correcting assignment operators

Location:
trunk/lib
Files:
5 edited

Legend:

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

    r537 r556  
    8383  }
    8484
     85  const DataLookup2D& DataLookup2D::operator=(const DataLookup2D& other)
     86  {
     87    // never copy yourself
     88    if (this!=&other){
     89      row_index_ = other.row_index_;
     90      column_index_ = other.column_index_;
     91      owner_=false;
     92    }
     93    return *this;
     94  }
     95
    8596}} // of namespace classifier and namespace theplu
  • trunk/lib/classifier/MatrixLookup.cc

    r537 r556  
    127127
    128128
     129  const MatrixLookup& MatrixLookup::operator=(const MatrixLookup& other)
     130  {
     131    if (this!=&other){
     132      DataLookup2D::operator=(other);
     133      data_ = other.data_;
     134    }
     135    return *this;
     136  }
     137
     138
    129139  std::ostream& operator<<(std::ostream& s, const MatrixLookup& m)
    130140  {
  • trunk/lib/classifier/MatrixLookup.h

    r555 r556  
    139139    }
    140140
     141    ///
     142    /// @brief assigment operator
     143    ///
     144    const MatrixLookup& operator=(const MatrixLookup&);
     145   
    141146  private:
    142     MatrixLookup& operator=(const MatrixLookup&);
    143 
    144147    const gslapi::matrix* data_;
    145148  }; 
  • trunk/lib/statistics/Fisher.cc

    r514 r556  
    162162    return oddsratio(a_,b_,c_,d_);
    163163  }
    164  
     164 
    165165  double Fisher::score(const u_int a, const u_int b,
    166166                       const u_int c, const u_int d)
  • trunk/lib/statistics/Fisher.h

    r475 r556  
    9898    /// Function calculating score from 2x2 table for which the
    9999    /// elements are calculated as follows \n
    100     /// target=positive_label (a,c)
    101     /// \f$ value > \f$ value_cutoff() a,b \n
     100    /// target.binary(i) sample i in group a or c otherwise in b or d
     101    /// \f$ value(i) > \f$ value_cutoff() sample i in group a or b
     102    /// otherwise c or d\n
    102103    ///
    103104    /// @return odds ratio. If absolute_ is true and odds ratio is
Note: See TracChangeset for help on using the changeset viewer.