Ignore:
Timestamp:
Mar 3, 2005, 12:08:37 PM (18 years ago)
Author:
Peter
Message:

modified prediction function in RegressionLocal? to take a ostream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/RegressionLocal.cc

    r245 r253  
    1919  }
    2020
    21   void RegressionLocal::fit(const double f, const u_int step_size)
     21  void RegressionLocal::fit(std::ostream& s, const double f,
     22                            const u_int step_size)
    2223  {
    2324    sort(data_.begin(), data_.end());
     25    regressor_->print_header(s);
     26    s << std::endl;
    2427
    2528    // number of points on each side
     
    5255      }
    5356
    54 
    5557      // copying data
    5658      // Peter, too much copying. Move the copying outside loop and
     
    7779      regressor_->predict(x_[x_.size()-1], y_[y_.size()-1],
    7880                          y_err_[y_err_.size()-1]);
     81      regressor_->print(s);
     82      s << std::endl;
    7983    }
    8084  }
    8185
    82   std::ostream& RegressionLocal::print(std::ostream& s) const
    83   {
    84     for (size_t i=0; i<x_.size(); i++) {
    85       regressor_->print(s);
    86       s << std::endl;
    87     }
    88     return s;
    89   }
    9086
    9187
Note: See TracChangeset for help on using the changeset viewer.