Files Classes Functions Hierarchy
#include <pointsgraph.h>
Public Member Functions | |
| pointsgraphtime (uintc N_) | |
| Create N subdivision including endpoints. | |
| void | push_front (double yval) |
| Start adding to the front. | |
| void | push_back (double yval) |
| Start adding to the back. | |
Definition at line 88 of file pointsgraph.h.
| pointsgraphtime::pointsgraphtime | ( | uintc | N_ | ) |
Create N subdivision including endpoints.
Definition at line 171 of file pointsgraph.cpp.
00172 { 00173 N = N_; 00174 00175 assert(N!=1); 00176 assert(N!=0); 00177 00178 dx = (double)1.0/(N-1); 00179 }
| void pointsgraphtime::push_back | ( | double | yval | ) |
Start adding to the back.
Definition at line 198 of file pointsgraph.cpp.
References pointsgraph::pts.
Referenced by windowscaleD2test::test002().
00199 { 00200 uint imax=pts.size(); 00201 for (uint i=0; i<imax; ++i) 00202 { pts[i].x -= dx; } 00203 00204 if (imax==N) 00205 pts.pop_front(); 00206 00207 pts.push_back( point2<double>(1.0,yval) ); 00208 00209 assert(pts.size()<=N); 00210 }
| void pointsgraphtime::push_front | ( | double | yval | ) |
Start adding to the front.
Definition at line 181 of file pointsgraph.cpp.
References pointsgraph::pts.
00182 { 00183 assert(false); // TODO write this function. 00184 for (uint i=0; i<N; ++i) 00185 { pts[i].x += dx; } 00186 00187 pts.push_front( point2<double>(0,yval) ); 00188 00189 if (pts.size()==N) 00190 { 00191 pts.pop_back(); 00192 return; 00193 } 00194 00195 assert(pts.size()<N); 00196 }
1.5.8