Ignore:
Timestamp:
Sep 9, 2008, 7:01:43 PM (13 years ago)
Author:
Peter
Message:

refs #396

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/MatrixLookupWeighted.cc

    r1483 r1484  
    8888
    8989
    90   /*
    91   MatrixLookupWeighted::MatrixLookupWeighted(const utility::Matrix& data)
    92     : data_(MatrixP(&data, false))
    93   {
    94     utility::Matrix weights;
    95     utility::nan(*data_,weights);
    96     weights_= MatrixP(new utility::Matrix(weights));
    97     row_index_ = utility::Index(data.rows());
    98     column_index_ = utility::Index(data.columns());
    99     assert(validate());
    100   }
    101   */
    102 
    103 
    10490  MatrixLookupWeighted::MatrixLookupWeighted(const MatrixLookup& ml)
    10591    : column_index_(ml.column_index_), data_(ml.data_),
     
    115101                                             const utility::Index& row,
    116102                                             const utility::Index& col)
    117     : column_index_(col), data_(MatrixP(new utility::Matrix(data), false)),
    118       row_index_(row), weights_(MatrixP(new utility::Matrix(weights), false))
    119   {
    120     assert(validate());
    121   }
    122  
    123 
    124 
     103    : column_index_(col), data_(MatrixP(&data, false)),
     104      row_index_(row), weights_(MatrixP(&weights, false))
     105  {
     106    assert(validate());
     107  }
     108 
     109
     110
     111  /*
    125112  MatrixLookupWeighted::MatrixLookupWeighted(const utility::Matrix& data,
    126113                                             const utility::Matrix& weights,
     
    142129    assert(validate());
    143130  }
    144  
     131  */
    145132
    146133  /*
     
    295282  {
    296283    for (size_t i=0; i<row_index_.size(); ++i)
    297       if (row_index_[i]>=data_->rows())
     284      if (row_index_[i]>=data_->rows()) {
     285        std::cerr << i << " " << row_index_[i] << std::endl;
    298286        return false;
     287      }
    299288    for (size_t i=0; i<column_index_.size(); ++i)
    300289      if (column_index_[i]>=data_->columns())
Note: See TracChangeset for help on using the changeset viewer.