Changeset 2226


Ignore:
Timestamp:
Mar 24, 2010, 3:40:02 PM (13 years ago)
Author:
Peter
Message:

remove usage of deprecated constructors also in templates and tests. (refs #543)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/matrix_lookup_test.cc

    r2161 r2226  
    8888         << "                           const bool)...";
    8989  std::vector<size_t> one(1,1);
    90   classifier::MatrixLookup m3(gsl_m2,utility::Index(one),true);
     90  classifier::MatrixLookup m3(gsl_m2,utility::Index(one),
     91                              utility::Index(gsl_m2.columns()));
    9192  if (m3.rows()!=1 || m3.columns()!=gsl_m2.columns() || m3(0,0)!=gsl_m2(1,0) ||
    9293      m3(0,1)!=gsl_m2(1,1) || m3(0,2)!=gsl_m2(1,2) || m3(0,3)!=gsl_m2(1,3)) {
  • trunk/yat/classifier/EnsembleBuilder.h

    r2138 r2226  
    1010  Copyright (C) 2008 Jari Häkkinen, Peter Johansson, Markus Ringnér
    1111  Copyright (C) 2009 Jari Häkkinen, Peter Johansson
     12  Copyright (C) 2010 Peter Johansson
    1213
    1314  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    221222                                               size_t k)
    222223  {
    223     return MatrixLookupWeighted(data, subset_->training_features(k), true);
     224    return MatrixLookupWeighted(data, subset_->training_features(k),
     225                                utility::Index(data.columns()));
    224226  }
    225227 
  • trunk/yat/classifier/SubsetGenerator.h

    r2210 r2226  
    77  Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
    88  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2009 Peter Johansson
     9  Copyright (C) 2009, 2010 Peter Johansson
    1010
    1111  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    302302        // training data with no feature selection
    303303        const MatrixLookupWeighted* train_data_all_feat =
    304           new MatrixLookupWeighted(ml, training_index(k), false);
     304          new MatrixLookupWeighted(ml, utility::Index(ml.rows()),
     305                                   training_index(k));
    305306        // use these data to create feature selection
    306307        f_selector_->update(*train_data_all_feat, training_target(k));
     
    329330        if (kernel.weighted()){
    330331          MatrixLookupWeighted ml = kernel.data_weighted();
    331           f_selector_->update(MatrixLookupWeighted(ml,training_index(k),false),
     332          f_selector_->update(MatrixLookupWeighted(ml,
     333                                                   utility::Index(ml.rows()),
     334                                                   training_index(k)),
    332335                              training_target(k));
    333336        }
Note: See TracChangeset for help on using the changeset viewer.