| 198 |  |  | 
| 199 |  | if (!generated) generate(); | 
| 200 |  |  | 
| 201 | < | assert(t > data_.front().first); | 
| 202 | < | assert(t < data_.back().first); | 
| 201 | > | assert(t >= data_.front().first); | 
| 202 | > | assert(t <= data_.back().first); | 
| 203 |  |  | 
| 204 |  | //  Find the interval ( x[j], x[j+1] ) that contains or is nearest | 
| 205 |  | //  to t. | 
| 237 |  |  | 
| 238 |  | if (!generated) generate(); | 
| 239 |  |  | 
| 240 | < | assert(t > data_.front().first); | 
| 241 | < | assert(t < data_.back().first); | 
| 240 | > | assert(t >= data_.front().first); | 
| 241 | > | assert(t <= data_.back().first); | 
| 242 |  |  | 
| 243 |  | //  Find the interval ( x[j], x[j+1] ) that contains or is nearest | 
| 244 |  | //  to t. | 
| 276 |  |  | 
| 277 |  | if (!generated) generate(); | 
| 278 |  |  | 
| 279 | < | assert(t > data_.front().first); | 
| 280 | < | assert(t < data_.back().first); | 
| 279 | > | assert(t >= data_.front().first); | 
| 280 | > | assert(t <= data_.back().first); | 
| 281 |  |  | 
| 282 |  | //  Find the interval ( x[j], x[j+1] ) that contains or is nearest | 
| 283 |  | //  to t. | 
| 308 |  | return make_pair(yval, dydx); | 
| 309 |  | } | 
| 310 |  |  | 
| 311 | + | pair<RealType, RealType> CubicSpline::getLimits(){ | 
| 312 | + | if (!generated) generate(); | 
| 313 | + | return make_pair( data_.front().first, data_.back().first ); | 
| 314 | + | } | 
| 315 | + |  | 
| 316 |  | void CubicSpline::getValueAndDerivativeAt(const RealType& t, RealType& v, | 
| 317 |  | RealType &dv) { | 
| 318 |  | // Evaluate the spline and first derivative at t using coefficients | 
| 322 |  |  | 
| 323 |  | if (!generated) generate(); | 
| 324 |  |  | 
| 325 | < | assert(t > data_.front().first); | 
| 326 | < | assert(t < data_.back().first); | 
| 325 | > | assert(t >= data_.front().first); | 
| 326 | > | assert(t <= data_.back().first); | 
| 327 |  |  | 
| 328 |  | //  Find the interval ( x[j], x[j+1] ) that contains or is nearest | 
| 329 |  | //  to t. |