Page MenuHomec4science

Series.cc
No OneTemporary

File Metadata

Created
Sat, Nov 9, 17:33

Series.cc

//Numerical Series Interface
#include "series.hh"
#include <cmath>
Series::Series()
:
current_term(0),
current_value(0.){};
Series::~Series() {}
void Series::add_term() {
++current_term;
current_value += eval_term(current_term);
}
double Series::compute(unsigned N){
for (unsigned k = 0 ; k < N ; ++k){
add_term();
}
return current_value;
}
double Series::getAnalyticPrediction() {
return nan("");
}

Event Timeline