Ignore:
Timestamp:
Aug 25, 2008, 7:55:00 PM (13 years ago)
Author:
Peter
Message:

merge patch release 0.4.2 to trunk. Delta 0.4.2-0.4.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/regression/Local.cc

    r1275 r1437  
    66  Copyright (C) 2008 Peter Johansson
    77
    8   This file is part of the yat library, http://trac.thep.lu.se/yat
     8  This file is part of the yat library, http://dev.thep.lu.se/yat
    99
    1010  The yat library is free software; you can redistribute it and/or
     
    6969
    7070    size_t nof_fits=data_.size()/step_size;
    71     x_ = utility::Vector(nof_fits);
    72     y_predicted_ = utility::Vector(x_.size());
    73     y_err_ = utility::Vector(x_.size());
     71    x_.resize(nof_fits);
     72    y_predicted_.resize(x_.size());
     73    y_err_.resize(x_.size());
    7474    sort(data_.begin(), data_.end());
    7575
    76     // coying data to 2 utility vectors ONCE to use views from
     76    // copying data to 2 utility vectors ONCE to use views from
    7777    utility::Vector x(data_.size());
    7878    utility::Vector y(data_.size());
     
    124124      assert(i<y_predicted_.size());
    125125      assert(i<y_err_.size());
     126      x_(i) = x(i*step_size);
    126127      y_predicted_(i) = regressor_->predict(x(i*step_size));
    127128      y_err_(i) = sqrt(regressor_->standard_error2(x(i*step_size)));
Note: See TracChangeset for help on using the changeset viewer.