8 #define BUILDING_LIBRARY 14 std::list<double>::const_iterator &age_i,
15 std::list< std::valarray<double> >::const_iterator &cond_i,
16 std::list< std::valarray<double> >::const_iterator &deriv_i)
18 ++age_i; ++cond_i; ++deriv_i;
30 std::list<double>::const_iterator &age_i,
31 std::list< std::valarray<double> >::const_iterator &cond_i,
32 std::list< std::valarray<double> >::const_iterator &deriv_i)
42 --age_i; --cond_i; --deriv_i;
47 std::list<double>::const_iterator
first_age,
48 std::list<double>::const_iterator history_age_end,
49 std::list<double>::const_iterator discarded_age_begin,
50 std::list< std::valarray<double> >::const_iterator first_stop_cond,
51 std::list< std::valarray<double> >::const_iterator
52 stop_cond_history_end,
53 std::list< std::valarray<double> >::const_iterator
54 stop_cond_discarded_begin,
55 std::list< std::valarray<double> >::const_iterator first_stop_deriv,
56 std::list< std::valarray<double> >::const_iterator
57 stop_deriv_history_end,
58 std::list< std::valarray<double> >::const_iterator
59 stop_deriv_discarded_begin
81 "Attempt to contsruct a StopHistoryInterval of size 0." 83 for(
size_t i = 0; i < num_points - 1; i++)
123 "Attempting to increment two points past the end of a " 124 "StopHistoryInterval!" 140 "Attempting to go before the beginning of a " 141 "StopHistoryInterval." 157 for(
size_t i=0; i<n; i++) {
168 for(
size_t i=0; i<n; i++) {
223 for(
size_t i=0; i<n; i++) {
233 for(
size_t i=0; i<n; i++)
240 std::streamsize orig_precision=os.precision();
241 std::ios_base::fmtflags orig_flags=os.flags();
242 os.setf(std::ios_base::scientific);
246 os << std::setw(20) <<
"Age:";
247 for(interval.
reset(); !interval.
end(); interval++) {
250 os << std::setw(25) << interval.
age();
257 os << std::setw(13) <<
"Condition[" << std::setw(5)
259 for(interval.
reset(); !interval.
end(); interval++) {
268 os << std::setw(13) <<
"Derivative[" << std::setw(5)
270 for(interval.
reset(); !interval.
end(); interval++) {
279 os.precision(orig_precision);
280 os.flags(orig_flags);
std::list< double >::const_iterator __discarded_age_begin
The first age in the discarded stopping conditions.
std::list< std::valarray< double > >::const_iterator __stop_cond_history_end
The one past last element of the history of stoppnig conditions.
Function arguments do not satisfy some requirement.
std::list< std::valarray< double > >::const_iterator __first_stop_deriv
The first stopping condition derivative in the interval.
StopHistoryInterval & operator--()
Advances to the next point in the interval.
StopHistoryInterval(size_t num_points=0, std::list< double >::const_iterator first_age=std::list< double >::const_iterator(), std::list< double >::const_iterator history_age_end=std::list< double >::const_iterator(), std::list< double >::const_iterator discarded_age_begin=std::list< double >::const_iterator(), std::list< std::valarray< double > >::const_iterator first_stop_cond=std::list< std::valarray< double > >::const_iterator(), std::list< std::valarray< double > >::const_iterator stop_cond_history_end=std::list< std::valarray< double > >::const_iterator(), std::list< std::valarray< double > >::const_iterator stop_cond_discarded_begin=std::list< std::valarray< double > >::const_iterator(), std::list< std::valarray< double > >::const_iterator first_stop_deriv=std::list< std::valarray< double > >::const_iterator(), std::list< std::valarray< double > >::const_iterator stop_deriv_history_end=std::list< std::valarray< double > >::const_iterator(), std::list< std::valarray< double > >::const_iterator stop_deriv_discarded_begin=std::list< std::valarray< double > >::const_iterator())
Construct an interval of steps with some reason to stop the evolution.
double stop_condition_deriv(size_t condition_index) const
Returns the derivative of the stop condition with the given index for the current point...
void advance_iterator_set(std::list< double >::const_iterator &age_i, std::list< std::valarray< double > >::const_iterator &cond_i, std::list< std::valarray< double > >::const_iterator &deriv_i)
Increments all the iterators passed as arguments.
std::list< std::valarray< double > >::const_iterator __last_stop_deriv
The last stopping condition derivative in the interval.
size_t number_conditions()
Returns the number of conditions at the first point.
StopHistoryInterval & operator<<(size_t n)
Moves the entire interval, along with the current point left n points.
void grow_left(size_t n=1)
Adds the n points before the first point to the interval.
StopHistoryInterval & operator=(const StopHistoryInterval &rhs)
Copies rhs to this.
std::list< std::valarray< double > >::const_iterator __stop_deriv_i
The current stop condition derivative.
Declares the StopHistoryInterval class.
std::list< std::valarray< double > >::const_iterator __stop_cond_i
The current stopping condition value.
std::list< double >::const_iterator __last_age
The last age in the interval.
std::list< std::valarray< double > >::const_iterator __stop_deriv_discarded_begin
The first of the discarded stopping condition values.
Orientations of zones of bodies in a binary system.
std::list< std::valarray< double > >::const_iterator __stop_deriv_history_end
The one past last element of the history of stoppnig conditions.
size_t __point_i
The index of the current point.
void reset()
Makes the current point the first point in the interval.
size_t __num_points
Number of points in the interval.
size_t current_point_index()
Returns the index of the current point within the interval.
std::list< std::valarray< double > >::const_iterator __first_stop_cond
The first stopping condition value in the interval.
StopHistoryInterval & operator>>(size_t n)
Moves the entire interval, along with the current point right n points.
std::list< std::valarray< double > >::const_iterator __last_stop_cond
The last stopping condition value in the interval.
double first_age() const
Returns the age of the first point in the interval.
std::list< double >::const_iterator __first_age
The first age in the interval.
size_t num_points()
Returns the number of points in the interval.
void grow_right(size_t n=1)
Adds the n points before the first point to the interval.
bool end()
Returns true iff this is the invalid point marking the end of the interval.
bool operator==(const StopHistoryInterval &rhs)
Checks if the RHS is the same interval and is at the same point in it.
std::list< double >::const_iterator __age_i
The age of the current point.
std::list< double >::const_iterator __history_age_end
The one past last element of the history of stoppnig condition ages.
double stop_condition_value(size_t condition_index) const
Returns the value of the stop condition with the given index for the current point.
std::list< std::valarray< double > >::const_iterator __stop_cond_discarded_begin
The first of the discarded stopping condition values.
double age() const
Returns the age of the current point.
StopHistoryInterval & operator++()
Advances to the next point in the interval.
void retreat_iterator_set(std::list< double >::const_iterator &age_i, std::list< std::valarray< double > >::const_iterator &cond_i, std::list< std::valarray< double > >::const_iterator &deriv_i)
Decrements all the iterators passed as arguments.
A collection of accepted and discarded evolution steps which contain some reason to stop...