Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91291698
Series.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 9, 17:33
Size
466 B
Mime Type
text/x-c
Expires
Mon, Nov 11, 17:33 (2 d)
Engine
blob
Format
Raw Data
Handle
22237367
Attached To
R7561 SP4E_HW1
Series.cc
View Options
//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
Log In to Comment