Go to the documentation of this file.
27 #ifndef INTERVAL_HPP_INCLUDED
28 #define INTERVAL_HPP_INCLUDED
30 #include "../core/global_definitions.hpp"
56 template <
class X,
class Y>
71 template<
class scalar_t =
double>
74 return scalar_t(x::num)/scalar_t(x::den);
89 template <
class Inter1,
class Inter2>
97 template <
class Iter,
class Begin>
105 typedef typename std::integral_constant<
124 template <
class Begin>
128 template <
class BP1,
class BP2>
135 template <
class BP1,
class BP2>
173 template <
class interval>
181 if (r < bp::x_value())
184 return eval_interval<typename tmp::pop_front<interval>::type>(r);
189 int eval_interval<tmp::vector<> >(double);
General declaration of the less oparation.
metafunction to dereference an iterator
template metaprogramming functions
tmp::bubble_sort< half_sorted, compare_by_y_desc< tmp::_1, tmp::_2 > >::type sorted
sort by y descending
sort a sequence by bubble sort
return begin iterator of a sequence
copy elements from a container into an other
tmp::copy_if< sorted, tmp::inserter< typename tmp::empty< sorted >::type, tmp::push_back< tmp::_1, tmp::_2 > >, copy_cond< tmp::_1, typename tmp::begin< sorted >::type > >::type type
zip using the copy condition
integer type representation and basic integer arithmetics
tmp::deref< Iter >::type cur
current element
break_point type
Self-returning.
comparison condition to sort in ascending order by x
Copy condition when zipping an interval.
std::giga ratio_infinite
define giga as the infinite as it fits into 32 bits
concatenate two sequences into a new sequence
implementation of a compile time vector tmp::vector
comparison condition to sort in descending order by y
push an element to the back
constexpr static scalar_t x_value(void)
Convert rational x value to scalar(double)
int eval_interval(double r)
Evaluate an interval at a given distance.
tmp::deref< typename tmp::prev< Iter >::type >::type prev
previous element
tmp::bubble_sort< typename tmp::concatenate< Inter1, Inter2 >::type, compare_by_x_asc< tmp::_1, tmp::_2 > >::type half_sorted
sort the concatenated intervals by x ascending
std::integral_constant< bool, std::ratio_greater< typename cur::x, typename prev::x >::type::value &&tmp::less< typename cur::y, typename prev::y >::type::value > type
copy if cur.x > prev.x and cur.y < prev.y
A break point consisting of a X and a Y value.
std::complex< double > Y(std::complex< double > const &z)
Bessel function Y_nu(z)