Changeset 1361 for trunk/yat


Ignore:
Timestamp:
Jul 2, 2008, 11:23:56 PM (13 years ago)
Author:
Peter
Message:

fixing ticket:389 - the problem was in test code

Location:
trunk/yat
Files:
2 edited

Legend:

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

    r1275 r1361  
    113113    : data_(other.data_)
    114114  {
     115    assert(other.validate());
    115116    if (row){
    116117      row_index_ = utility::Index(other.row_index_, index);
     
    123124    assert(validate());
    124125  }
    125  
    126126
    127127
  • trunk/yat/utility/Index.cc

    r1134 r1361  
    2323
    2424#include "Index.h"
     25
     26#include <cassert>
    2527
    2628namespace theplu {
     
    5759    std::vector<size_t>* vec = new std::vector<size_t>;
    5860    vec->reserve(b.size());
    59     for (size_t i=0; i<b.size(); ++i)
     61    for (size_t i=0; i<b.size(); ++i) {
     62      assert(b[i]<a.size());
    6063      vec->push_back(a[b[i]]);
     64    }
    6165    index_ = SmartPtr<const std::vector<size_t> >(vec);
    6266  }
Note: See TracChangeset for help on using the changeset viewer.