// /usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.7.0/cc1plus -quiet -I /tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/../../include -I /localhome/glisse2/include -I /tmp/cgal-testsuite/CGAL-3.10-Ic-197/include -I /tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/include -I /tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo -I /tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/include/CGAL_ipelets -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D CGAL_alpha_shapes_EXPORTS -D CGAL_USE_IPE_7 /tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/alpha_shapes.cpp -quiet -dumpbase alpha_shapes.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/CGAL_alpha_shapes.dir/alpha_shapes.cpp.o -g -g -O2 -Wall -Wno-unused-but-set-variable -std=gnu++11 -frounding-math -fPIC -o - -frandom-seed=0 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/alpha_shapes.cpp" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo//" # 1 "" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/alpha_shapes.cpp" # 21 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/alpha_shapes.cpp" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_predicates_inexact_constructions_kernel.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_predicates_inexact_constructions_kernel.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Simple_cartesian.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Simple_cartesian.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" 1 # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" # 1 "/localhome/glisse2/include/boost/config.hpp" 1 # 26 "/localhome/glisse2/include/boost/config.hpp" # 1 "/localhome/glisse2/include/boost/config/user.hpp" 1 # 27 "/localhome/glisse2/include/boost/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/select_compiler_config.hpp" 1 # 32 "/localhome/glisse2/include/boost/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/compiler/gcc.hpp" 1 # 36 "/localhome/glisse2/include/boost/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/select_stdlib_config.hpp" 1 # 18 "/localhome/glisse2/include/boost/config/select_stdlib_config.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++config.h" 1 3 # 171 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++config.h" 3 namespace std { typedef long unsigned int size_t; typedef long int ptrdiff_t; typedef decltype(nullptr) nullptr_t; } # 414 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++config.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/os_defines.h" 1 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/os_defines.h" 3 # 1 "/usr/include/features.h" 1 3 4 # 323 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/predefs.h" 1 3 4 # 324 "/usr/include/features.h" 2 3 4 # 356 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 # 353 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 354 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 # 357 "/usr/include/features.h" 2 3 4 # 388 "/usr/include/features.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 5 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 # 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 # 389 "/usr/include/features.h" 2 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/os_defines.h" 2 3 # 415 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++config.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/cpu_defines.h" 1 3 # 418 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++config.h" 2 3 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 150 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 3 4 typedef long int ptrdiff_t; # 212 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 3 4 typedef long unsigned int size_t; # 422 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 3 4 typedef struct { long long __max_align_ll __attribute__((__aligned__(__alignof__(long long)))); long double __max_align_ld __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 19 "/localhome/glisse2/include/boost/config/select_stdlib_config.hpp" 2 # 37 "/localhome/glisse2/include/boost/config/select_stdlib_config.hpp" # 1 "/localhome/glisse2/include/boost/config/no_tr1/utility.hpp" 1 # 21 "/localhome/glisse2/include/boost/config/no_tr1/utility.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility" 1 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility" 3 # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility" 3 # 71 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_relops.h" 1 3 # 68 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_relops.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace rel_ops { # 86 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_relops.h" 3 template inline bool operator!=(const _Tp& __x, const _Tp& __y) { return !(__x == __y); } # 99 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_relops.h" 3 template inline bool operator>(const _Tp& __x, const _Tp& __y) { return __y < __x; } # 112 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_relops.h" 3 template inline bool operator<=(const _Tp& __x, const _Tp& __y) { return !(__y < __x); } # 125 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_relops.h" 3 template inline bool operator>=(const _Tp& __x, const _Tp& __y) { return !(__x < __y); } } } # 72 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_pair.h" 1 3 # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_pair.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/move.h" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/move.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/concept_check.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/concept_check.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/concept_check.h" 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/move.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline _Tp* __addressof(_Tp& __r) noexcept { return reinterpret_cast<_Tp*> (&const_cast(reinterpret_cast(__r))); } } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct integral_constant { static constexpr _Tp value = __v; typedef _Tp value_type; typedef integral_constant<_Tp, __v> type; constexpr operator value_type() { return value; } }; typedef integral_constant true_type; typedef integral_constant false_type; template constexpr _Tp integral_constant<_Tp, __v>::value; template struct conditional; template struct __or_; template<> struct __or_<> : public false_type { }; template struct __or_<_B1> : public _B1 { }; template struct __or_<_B1, _B2> : public conditional<_B1::value, _B1, _B2>::type { }; template struct __or_<_B1, _B2, _B3, _Bn...> : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type { }; template struct __and_; template<> struct __and_<> : public true_type { }; template struct __and_<_B1> : public _B1 { }; template struct __and_<_B1, _B2> : public conditional<_B1::value, _B2, _B1>::type { }; template struct __and_<_B1, _B2, _B3, _Bn...> : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type { }; template struct __not_ : public integral_constant { }; struct __sfinae_types { typedef char __one; typedef struct { char __arr[2]; } __two; }; template struct remove_cv; template struct __is_void_helper : public false_type { }; template<> struct __is_void_helper : public true_type { }; template struct is_void : public integral_constant::type>::value)> { }; template struct __is_integral_helper : public false_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template<> struct __is_integral_helper<__int128> : public true_type { }; template<> struct __is_integral_helper : public true_type { }; template struct is_integral : public integral_constant::type>::value)> { }; template struct __is_floating_point_helper : public false_type { }; template<> struct __is_floating_point_helper : public true_type { }; template<> struct __is_floating_point_helper : public true_type { }; template<> struct __is_floating_point_helper : public true_type { }; template<> struct __is_floating_point_helper<__float128> : public true_type { }; template struct is_floating_point : public integral_constant::type>::value)> { }; template struct is_array : public false_type { }; template struct is_array<_Tp[_Size]> : public true_type { }; template struct is_array<_Tp[]> : public true_type { }; template struct __is_pointer_helper : public false_type { }; template struct __is_pointer_helper<_Tp*> : public true_type { }; template struct is_pointer : public integral_constant::type>::value)> { }; template struct is_lvalue_reference : public false_type { }; template struct is_lvalue_reference<_Tp&> : public true_type { }; template struct is_rvalue_reference : public false_type { }; template struct is_rvalue_reference<_Tp&&> : public true_type { }; template struct is_function; template struct __is_member_object_pointer_helper : public false_type { }; template struct __is_member_object_pointer_helper<_Tp _Cp::*> : public integral_constant::value> { }; template struct is_member_object_pointer : public integral_constant::type>::value)> { }; template struct __is_member_function_pointer_helper : public false_type { }; template struct __is_member_function_pointer_helper<_Tp _Cp::*> : public integral_constant::value> { }; template struct is_member_function_pointer : public integral_constant::type>::value)> { }; template struct is_enum : public integral_constant { }; template struct is_union : public integral_constant { }; template struct is_class : public integral_constant { }; template struct is_function : public false_type { }; template struct is_function<_Res(_ArgTypes...)> : public true_type { }; template struct is_function<_Res(_ArgTypes......)> : public true_type { }; template struct is_function<_Res(_ArgTypes...) const> : public true_type { }; template struct is_function<_Res(_ArgTypes......) const> : public true_type { }; template struct is_function<_Res(_ArgTypes...) volatile> : public true_type { }; template struct is_function<_Res(_ArgTypes......) volatile> : public true_type { }; template struct is_function<_Res(_ArgTypes...) const volatile> : public true_type { }; template struct is_function<_Res(_ArgTypes......) const volatile> : public true_type { }; template struct __is_nullptr_t_helper : public false_type { }; template<> struct __is_nullptr_t_helper : public true_type { }; template struct __is_nullptr_t : public integral_constant::type>::value)> { }; template struct is_reference : public __or_, is_rvalue_reference<_Tp>>::type { }; template struct is_arithmetic : public __or_, is_floating_point<_Tp>>::type { }; template struct is_fundamental : public __or_, is_void<_Tp>>::type { }; template struct is_object : public __not_<__or_, is_reference<_Tp>, is_void<_Tp>>>::type { }; template struct is_member_pointer; template struct is_scalar : public __or_, is_enum<_Tp>, is_pointer<_Tp>, is_member_pointer<_Tp>, __is_nullptr_t<_Tp>>::type { }; template struct is_compound : public integral_constant::value> { }; template struct __is_member_pointer_helper : public false_type { }; template struct __is_member_pointer_helper<_Tp _Cp::*> : public true_type { }; template struct is_member_pointer : public integral_constant::type>::value)> { }; template struct is_const : public false_type { }; template struct is_const<_Tp const> : public true_type { }; template struct is_volatile : public false_type { }; template struct is_volatile<_Tp volatile> : public true_type { }; template struct is_trivial : public integral_constant { }; template struct is_standard_layout : public integral_constant { }; template struct is_pod : public integral_constant { }; template struct is_literal_type : public integral_constant { }; template struct is_empty : public integral_constant { }; template struct is_polymorphic : public integral_constant { }; template struct is_abstract : public integral_constant { }; template::value, bool = is_floating_point<_Tp>::value> struct __is_signed_helper : public false_type { }; template struct __is_signed_helper<_Tp, false, true> : public true_type { }; template struct __is_signed_helper<_Tp, true, false> : public integral_constant(_Tp(-1) < _Tp(0))> { }; template struct is_signed : public integral_constant::value> { }; template struct is_unsigned : public __and_, __not_>>::type { }; template struct add_rvalue_reference; template typename add_rvalue_reference<_Tp>::type declval() noexcept; template struct extent; template struct remove_all_extents; template struct __is_array_known_bounds : public integral_constant::value > 0)> { }; template struct __is_array_unknown_bounds : public __and_, __not_>>::type { }; struct __do_is_destructible_impl_1 { template struct __w { _Up __u; }; template&>().~__w<_Tp>())> static true_type __test(int); template static false_type __test(...); }; template struct __is_destructible_impl_1 : public __do_is_destructible_impl_1 { typedef decltype(__test<_Tp>(0)) type; }; struct __do_is_destructible_impl_2 { template().~_Tp())> static true_type __test(int); template static false_type __test(...); }; template struct __is_destructible_impl_2 : public __do_is_destructible_impl_2 { typedef decltype(__test<_Tp>(0)) type; }; template, __is_array_unknown_bounds<_Tp>>::value, bool = __or_, is_function<_Tp>>::value> struct __is_destructible_safe; template struct __is_destructible_safe<_Tp, false, false> : public conditional::value, __is_destructible_impl_2<_Tp>, __is_destructible_impl_1<_Tp>>::type::type { }; template struct __is_destructible_safe<_Tp, true, false> : public false_type { }; template struct __is_destructible_safe<_Tp, false, true> : public true_type { }; template struct is_destructible : public integral_constant::value)> { }; struct __do_is_default_constructible_impl { template static true_type __test(int); template static false_type __test(...); }; template struct __is_default_constructible_impl : public __do_is_default_constructible_impl { typedef decltype(__test<_Tp>(0)) type; }; template struct __is_default_constructible_atom : public __and_<__not_>, __is_default_constructible_impl<_Tp>>::type { }; template::value> struct __is_default_constructible_safe; template struct __is_default_constructible_safe<_Tp, true> : public __and_<__is_array_known_bounds<_Tp>, __is_default_constructible_atom::type>>::type { }; template struct __is_default_constructible_safe<_Tp, false> : public __is_default_constructible_atom<_Tp>::type { }; template struct is_default_constructible : public integral_constant::value)> { }; # 716 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits" 3 struct __do_is_static_castable_impl { template(declval<_From>()))> static true_type __test(int); template static false_type __test(...); }; template struct __is_static_castable_impl : public __do_is_static_castable_impl { typedef decltype(__test<_From, _To>(0)) type; }; template struct __is_static_castable_safe : public __is_static_castable_impl<_From, _To>::type { }; template struct __is_static_castable : public integral_constant::value)> { }; struct __do_is_direct_constructible_impl { template()))> static true_type __test(int); template static false_type __test(...); }; template struct __is_direct_constructible_impl : public __do_is_direct_constructible_impl { typedef decltype(__test<_Tp, _Arg>(0)) type; }; template struct __is_direct_constructible_new_safe : public __and_, __is_direct_constructible_impl<_Tp, _Arg>>::type { }; template struct is_same; template struct is_base_of; template struct remove_reference; template::value> struct __is_base_to_derived_ref; template struct __is_base_to_derived_ref<_From, _To, true> { typedef typename remove_cv::type>::type __src_t; typedef typename remove_cv::type>::type __dst_t; typedef __and_<__not_>, is_base_of<__src_t, __dst_t>> type; static constexpr bool value = type::value; }; template struct __is_base_to_derived_ref<_From, _To, false> : public false_type { }; template, is_rvalue_reference<_To>>::value> struct __is_lvalue_to_rvalue_ref; template struct __is_lvalue_to_rvalue_ref<_From, _To, true> { typedef typename remove_cv::type>::type __src_t; typedef typename remove_cv::type>::type __dst_t; typedef __or_, is_base_of<__dst_t, __src_t>> type; static constexpr bool value = type::value; }; template struct __is_lvalue_to_rvalue_ref<_From, _To, false> : public false_type { }; template struct __is_direct_constructible_ref_cast : public __and_<__is_static_castable<_Arg, _Tp>, __not_<__or_<__is_base_to_derived_ref<_Arg, _Tp>, __is_lvalue_to_rvalue_ref<_Arg, _Tp> >>>::type { }; template struct __is_direct_constructible_new : public conditional::value, __is_direct_constructible_ref_cast<_Tp, _Arg>, __is_direct_constructible_new_safe<_Tp, _Arg> >::type { }; template struct __is_direct_constructible : public integral_constant::value)> { }; struct __do_is_nary_constructible_impl { template()...))> static true_type __test(int); template static false_type __test(...); }; template struct __is_nary_constructible_impl : public __do_is_nary_constructible_impl { typedef decltype(__test<_Tp, _Args...>(0)) type; }; template struct __is_nary_constructible : public __is_nary_constructible_impl<_Tp, _Args...>::type { static_assert(sizeof...(_Args) > 1, "Only useful for > 1 arguments"); }; template struct __is_constructible_impl : public __is_nary_constructible<_Tp, _Args...> { }; template struct __is_constructible_impl<_Tp, _Arg> : public __is_direct_constructible<_Tp, _Arg> { }; template struct __is_constructible_impl<_Tp> : public is_default_constructible<_Tp> { }; template struct is_constructible : public integral_constant::value)> { }; template::value> struct __is_copy_constructible_impl; template struct __is_copy_constructible_impl<_Tp, true> : public false_type { }; template struct __is_copy_constructible_impl<_Tp, false> : public is_constructible<_Tp, const _Tp&> { }; template struct is_copy_constructible : public __is_copy_constructible_impl<_Tp> { }; template::value> struct __is_move_constructible_impl; template struct __is_move_constructible_impl<_Tp, true> : public false_type { }; template struct __is_move_constructible_impl<_Tp, false> : public is_constructible<_Tp, _Tp&&> { }; template struct is_move_constructible : public __is_move_constructible_impl<_Tp> { }; template struct __is_nt_default_constructible_atom : public integral_constant { }; template::value> struct __is_nt_default_constructible_impl; template struct __is_nt_default_constructible_impl<_Tp, true> : public __and_<__is_array_known_bounds<_Tp>, __is_nt_default_constructible_atom::type>>::type { }; template struct __is_nt_default_constructible_impl<_Tp, false> : public __is_nt_default_constructible_atom<_Tp> { }; template struct is_nothrow_default_constructible : public __and_, __is_nt_default_constructible_impl<_Tp>>::type { }; template struct __is_nt_constructible_impl : public integral_constant()...))> { }; template struct __is_nt_constructible_impl<_Tp, _Arg> : public integral_constant(declval<_Arg>()))> { }; template struct __is_nt_constructible_impl<_Tp> : public is_nothrow_default_constructible<_Tp> { }; template struct is_nothrow_constructible : public __and_, __is_nt_constructible_impl<_Tp, _Args...>>::type { }; template::value> struct __is_nothrow_copy_constructible_impl; template struct __is_nothrow_copy_constructible_impl<_Tp, true> : public false_type { }; template struct __is_nothrow_copy_constructible_impl<_Tp, false> : public is_nothrow_constructible<_Tp, const _Tp&> { }; template struct is_nothrow_copy_constructible : public __is_nothrow_copy_constructible_impl<_Tp> { }; template::value> struct __is_nothrow_move_constructible_impl; template struct __is_nothrow_move_constructible_impl<_Tp, true> : public false_type { }; template struct __is_nothrow_move_constructible_impl<_Tp, false> : public is_nothrow_constructible<_Tp, _Tp&&> { }; template struct is_nothrow_move_constructible : public __is_nothrow_move_constructible_impl<_Tp> { }; template class __is_assignable_helper : public __sfinae_types { template static decltype(declval<_Tp1>() = declval<_Up1>(), __one()) __test(int); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp, _Up>(0)) == 1; }; template struct is_assignable : public integral_constant::value> { }; template::value> struct __is_copy_assignable_impl; template struct __is_copy_assignable_impl<_Tp, true> : public false_type { }; template struct __is_copy_assignable_impl<_Tp, false> : public is_assignable<_Tp&, const _Tp&> { }; template struct is_copy_assignable : public __is_copy_assignable_impl<_Tp> { }; template::value> struct __is_move_assignable_impl; template struct __is_move_assignable_impl<_Tp, true> : public false_type { }; template struct __is_move_assignable_impl<_Tp, false> : public is_assignable<_Tp&, _Tp&&> { }; template struct is_move_assignable : public __is_move_assignable_impl<_Tp> { }; template struct __is_nt_assignable_impl : public integral_constant() = declval<_Up>())> { }; template struct is_nothrow_assignable : public __and_, __is_nt_assignable_impl<_Tp, _Up>>::type { }; template::value> struct __is_nt_copy_assignable_impl; template struct __is_nt_copy_assignable_impl<_Tp, true> : public false_type { }; template struct __is_nt_copy_assignable_impl<_Tp, false> : public is_nothrow_assignable<_Tp&, const _Tp&> { }; template struct is_nothrow_copy_assignable : public __is_nt_copy_assignable_impl<_Tp> { }; template::value> struct __is_nt_move_assignable_impl; template struct __is_nt_move_assignable_impl<_Tp, true> : public false_type { }; template struct __is_nt_move_assignable_impl<_Tp, false> : public is_nothrow_assignable<_Tp&, _Tp&&> { }; template struct is_nothrow_move_assignable : public __is_nt_move_assignable_impl<_Tp> { }; template struct has_trivial_default_constructor : public integral_constant { }; template struct has_trivial_copy_constructor : public integral_constant { }; template struct has_trivial_copy_assign : public integral_constant { }; template struct has_trivial_destructor : public integral_constant { }; template struct has_virtual_destructor : public integral_constant { }; template struct alignment_of : public integral_constant { }; template struct rank : public integral_constant { }; template struct rank<_Tp[_Size]> : public integral_constant::value> { }; template struct rank<_Tp[]> : public integral_constant::value> { }; template struct extent : public integral_constant { }; template struct extent<_Tp[_Size], _Uint> : public integral_constant::value> { }; template struct extent<_Tp[], _Uint> : public integral_constant::value> { }; template struct is_same : public false_type { }; template struct is_same<_Tp, _Tp> : public true_type { }; template struct is_base_of : public integral_constant { }; template, is_function<_To>, is_array<_To>>::value> struct __is_convertible_helper { static constexpr bool value = is_void<_To>::value; }; template class __is_convertible_helper<_From, _To, false> : public __sfinae_types { template static void __test_aux(_To1); template static decltype(__test_aux<_To1>(std::declval<_From1>()), __one()) __test(int); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_From, _To>(0)) == 1; }; template struct is_convertible : public integral_constant::value> { }; template struct is_explicitly_convertible : public is_constructible<_To, _From> { }; template struct remove_const { typedef _Tp type; }; template struct remove_const<_Tp const> { typedef _Tp type; }; template struct remove_volatile { typedef _Tp type; }; template struct remove_volatile<_Tp volatile> { typedef _Tp type; }; template struct remove_cv { typedef typename remove_const::type>::type type; }; template struct add_const { typedef _Tp const type; }; template struct add_volatile { typedef _Tp volatile type; }; template struct add_cv { typedef typename add_const::type>::type type; }; template struct remove_reference { typedef _Tp type; }; template struct remove_reference<_Tp&> { typedef _Tp type; }; template struct remove_reference<_Tp&&> { typedef _Tp type; }; template>, __not_>>::value, bool = is_rvalue_reference<_Tp>::value> struct __add_lvalue_reference_helper { typedef _Tp type; }; template struct __add_lvalue_reference_helper<_Tp, true, false> { typedef _Tp& type; }; template struct __add_lvalue_reference_helper<_Tp, false, true> { typedef typename remove_reference<_Tp>::type& type; }; template struct add_lvalue_reference : public __add_lvalue_reference_helper<_Tp> { }; template>, __not_>>::value> struct __add_rvalue_reference_helper { typedef _Tp type; }; template struct __add_rvalue_reference_helper<_Tp, true> { typedef _Tp&& type; }; template struct add_rvalue_reference : public __add_rvalue_reference_helper<_Tp> { }; template struct __cv_selector; template struct __cv_selector<_Unqualified, false, false> { typedef _Unqualified __type; }; template struct __cv_selector<_Unqualified, false, true> { typedef volatile _Unqualified __type; }; template struct __cv_selector<_Unqualified, true, false> { typedef const _Unqualified __type; }; template struct __cv_selector<_Unqualified, true, true> { typedef const volatile _Unqualified __type; }; template::value, bool _IsVol = is_volatile<_Qualified>::value> class __match_cv_qualifiers { typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; public: typedef typename __match::__type __type; }; template struct __make_unsigned { typedef _Tp __type; }; template<> struct __make_unsigned { typedef unsigned char __type; }; template<> struct __make_unsigned { typedef unsigned char __type; }; template<> struct __make_unsigned { typedef unsigned short __type; }; template<> struct __make_unsigned { typedef unsigned int __type; }; template<> struct __make_unsigned { typedef unsigned long __type; }; template<> struct __make_unsigned { typedef unsigned long long __type; }; template<> struct __make_unsigned<__int128> { typedef unsigned __int128 __type; }; template::value, bool _IsEnum = is_enum<_Tp>::value> class __make_unsigned_selector; template class __make_unsigned_selector<_Tp, true, false> { typedef __make_unsigned::type> __unsignedt; typedef typename __unsignedt::__type __unsigned_type; typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned; public: typedef typename __cv_unsigned::__type __type; }; template class __make_unsigned_selector<_Tp, false, true> { typedef unsigned char __smallest; static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); static const bool __b1 = sizeof(_Tp) <= sizeof(unsigned short); static const bool __b2 = sizeof(_Tp) <= sizeof(unsigned int); typedef conditional<__b2, unsigned int, unsigned long> __cond2; typedef typename __cond2::type __cond2_type; typedef conditional<__b1, unsigned short, __cond2_type> __cond1; typedef typename __cond1::type __cond1_type; public: typedef typename conditional<__b0, __smallest, __cond1_type>::type __type; }; template struct make_unsigned { typedef typename __make_unsigned_selector<_Tp>::__type type; }; template<> struct make_unsigned; template struct __make_signed { typedef _Tp __type; }; template<> struct __make_signed { typedef signed char __type; }; template<> struct __make_signed { typedef signed char __type; }; template<> struct __make_signed { typedef signed short __type; }; template<> struct __make_signed { typedef signed int __type; }; template<> struct __make_signed { typedef signed long __type; }; template<> struct __make_signed { typedef signed long long __type; }; template<> struct __make_signed { typedef __int128 __type; }; template::value, bool _IsEnum = is_enum<_Tp>::value> class __make_signed_selector; template class __make_signed_selector<_Tp, true, false> { typedef __make_signed::type> __signedt; typedef typename __signedt::__type __signed_type; typedef __match_cv_qualifiers<_Tp, __signed_type> __cv_signed; public: typedef typename __cv_signed::__type __type; }; template class __make_signed_selector<_Tp, false, true> { typedef signed char __smallest; static const bool __b0 = sizeof(_Tp) <= sizeof(__smallest); static const bool __b1 = sizeof(_Tp) <= sizeof(signed short); static const bool __b2 = sizeof(_Tp) <= sizeof(signed int); typedef conditional<__b2, signed int, signed long> __cond2; typedef typename __cond2::type __cond2_type; typedef conditional<__b1, signed short, __cond2_type> __cond1; typedef typename __cond1::type __cond1_type; public: typedef typename conditional<__b0, __smallest, __cond1_type>::type __type; }; template struct make_signed { typedef typename __make_signed_selector<_Tp>::__type type; }; template<> struct make_signed; template struct remove_extent { typedef _Tp type; }; template struct remove_extent<_Tp[_Size]> { typedef _Tp type; }; template struct remove_extent<_Tp[]> { typedef _Tp type; }; template struct remove_all_extents { typedef _Tp type; }; template struct remove_all_extents<_Tp[_Size]> { typedef typename remove_all_extents<_Tp>::type type; }; template struct remove_all_extents<_Tp[]> { typedef typename remove_all_extents<_Tp>::type type; }; template struct __remove_pointer_helper { typedef _Tp type; }; template struct __remove_pointer_helper<_Tp, _Up*> { typedef _Up type; }; template struct remove_pointer : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type> { }; template struct add_pointer { typedef typename remove_reference<_Tp>::type* type; }; template struct __aligned_storage_msa { union __type { unsigned char __data[_Len]; struct __attribute__((__aligned__)) { } __align; }; }; # 1623 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits" 3 template::__type)> struct aligned_storage { union type { unsigned char __data[_Len]; struct __attribute__((__aligned__((_Align)))) { } __align; }; }; template::value, bool _IsFunction = is_function<_Up>::value> struct __decay_selector; template struct __decay_selector<_Up, false, false> { typedef typename remove_cv<_Up>::type __type; }; template struct __decay_selector<_Up, true, false> { typedef typename remove_extent<_Up>::type* __type; }; template struct __decay_selector<_Up, false, true> { typedef typename add_pointer<_Up>::type __type; }; template class decay { typedef typename remove_reference<_Tp>::type __remove_type; public: typedef typename __decay_selector<__remove_type>::__type type; }; template class reference_wrapper; template struct __strip_reference_wrapper { typedef _Tp __type; }; template struct __strip_reference_wrapper > { typedef _Tp& __type; }; template struct __strip_reference_wrapper > { typedef _Tp& __type; }; template struct __decay_and_strip { typedef typename __strip_reference_wrapper< typename decay<_Tp>::type>::__type __type; }; template struct enable_if { }; template struct enable_if { typedef _Tp type; }; template struct conditional { typedef _Iftrue type; }; template struct conditional { typedef _Iffalse type; }; template struct common_type; template struct common_type<_Tp> { typedef _Tp type; }; template struct common_type<_Tp, _Up> { typedef decltype(true ? declval<_Tp>() : declval<_Up>()) type; }; template struct common_type<_Tp, _Up, _Vp...> { typedef typename common_type::type, _Vp...>::type type; }; template struct underlying_type { typedef __underlying_type(_Tp) type; }; template struct __declval_protector { static const bool __stop = false; static typename add_rvalue_reference<_Tp>::type __delegate(); }; template inline typename add_rvalue_reference<_Tp>::type declval() noexcept { static_assert(__declval_protector<_Tp>::__stop, "declval() must not be used!"); return __declval_protector<_Tp>::__delegate(); } template class result_of; template struct _Result_of_memobj; template struct _Result_of_memobj<_Res _Class::*, _Arg> { private: typedef _Res _Class::* _Func; template static _Tp _S_get(const _Class&); template static decltype(*std::declval<_Tp>()) _S_get(...); public: typedef decltype(_S_get<_Arg>(std::declval<_Arg>()).*std::declval<_Func>()) __type; }; template struct _Result_of_memfun; template struct _Result_of_memfun<_Res _Class::*, _Arg, _Args...> { private: typedef _Res _Class::* _Func; template static _Tp _S_get(const _Class&); template static decltype(*std::declval<_Tp>()) _S_get(...); public: typedef decltype((_S_get<_Arg>(std::declval<_Arg>()).*std::declval<_Func>()) (std::declval<_Args>()...) ) __type; }; template struct _Result_of_impl; template struct _Result_of_impl { typedef decltype( std::declval<_Functor>()(std::declval<_ArgTypes>()...) ) __type; }; template struct _Result_of_impl : _Result_of_memobj::type, _Arg> { typedef typename _Result_of_memobj< typename remove_reference<_MemPtr>::type, _Arg>::__type __type; }; template struct _Result_of_impl : _Result_of_memfun::type, _Arg, _ArgTypes...> { typedef typename _Result_of_memfun< typename remove_reference<_MemPtr>::type, _Arg, _ArgTypes...>::__type __type; }; template struct result_of<_Functor(_ArgTypes...)> : _Result_of_impl::type >::value, is_member_function_pointer< typename remove_reference<_Functor>::type >::value, _Functor, _ArgTypes...> { typedef typename _Result_of_impl< is_member_object_pointer< typename remove_reference<_Functor>::type >::value, is_member_function_pointer< typename remove_reference<_Functor>::type >::value, _Functor, _ArgTypes...>::__type type; }; # 1886 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits" 3 } # 54 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/move.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type& __t) noexcept { return static_cast<_Tp&&>(__t); } template constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type&& __t) noexcept { static_assert(!std::is_lvalue_reference<_Tp>::value, "template argument" " substituting _Tp is an lvalue reference type"); return static_cast<_Tp&&>(__t); } template constexpr typename std::remove_reference<_Tp>::type&& move(_Tp&& __t) noexcept { return static_cast::type&&>(__t); } template struct __move_if_noexcept_cond : public __and_<__not_>, is_copy_constructible<_Tp>>::type { }; template inline typename conditional<__move_if_noexcept_cond<_Tp>::value, const _Tp&, _Tp&&>::type move_if_noexcept(_Tp& __x) noexcept { return std::move(__x); } # 113 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/move.h" 3 template inline _Tp* addressof(_Tp& __r) noexcept { return std::__addressof(__r); } } # 128 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/move.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 139 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/move.h" 3 template inline void swap(_Tp& __a, _Tp& __b) noexcept(__and_, is_nothrow_move_assignable<_Tp>>::value) { _Tp __tmp = std::move(__a); __a = std::move(__b); __b = std::move(__tmp); } template inline void swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) noexcept(noexcept(swap(*__a, *__b))) { for (size_t __n = 0; __n < _Nm; ++__n) swap(__a[__n], __b[__n]); } } # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_pair.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct piecewise_construct_t { }; constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t(); template class tuple; template struct _Index_tuple; template struct pair { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; constexpr pair() : first(), second() { } constexpr pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } template, is_convertible>::value>::type> constexpr pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } constexpr pair(const pair&) = default; pair(pair&& __p) noexcept(__and_, is_nothrow_move_constructible<_T2>>::value) : first(std::forward(__p.first)), second(std::forward(__p.second)) { } template::value>::type> constexpr pair(_U1&& __x, const _T2& __y) : first(std::forward<_U1>(__x)), second(__y) { } template::value>::type> constexpr pair(const _T1& __x, _U2&& __y) : first(__x), second(std::forward<_U2>(__y)) { } template, is_convertible<_U2, _T2>>::value>::type> constexpr pair(_U1&& __x, _U2&& __y) : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { } template, is_convertible<_U2, _T2>>::value>::type> constexpr pair(pair<_U1, _U2>&& __p) : first(std::forward<_U1>(__p.first)), second(std::forward<_U2>(__p.second)) { } template pair(piecewise_construct_t, tuple<_Args1...> __first, tuple<_Args2...> __second) : first(__cons(std::move(__first))), second(__cons(std::move(__second))) { } pair& operator=(const pair& __p) { first = __p.first; second = __p.second; return *this; } pair& operator=(pair&& __p) noexcept(__and_, is_nothrow_move_assignable<_T2>>::value) { first = std::forward(__p.first); second = std::forward(__p.second); return *this; } template pair& operator=(const pair<_U1, _U2>& __p) { first = __p.first; second = __p.second; return *this; } template pair& operator=(pair<_U1, _U2>&& __p) { first = std::forward<_U1>(__p.first); second = std::forward<_U2>(__p.second); return *this; } void swap(pair& __p) noexcept(noexcept(swap(first, __p.first)) && noexcept(swap(second, __p.second))) { using std::swap; swap(first, __p.first); swap(second, __p.second); } private: template static _Tp __cons(tuple<_Args...>&&); template static _Tp __do_cons(tuple<_Args...>&&, const _Index_tuple<_Indexes...>&); }; template inline constexpr bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } template inline constexpr bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } template inline constexpr bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } template inline constexpr bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } template inline constexpr bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } template inline constexpr bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } template inline void swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } # 277 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_pair.h" 3 template constexpr pair::__type, typename __decay_and_strip<_T2>::__type> make_pair(_T1&& __x, _T2&& __y) { typedef typename __decay_and_strip<_T1>::__type __ds_type1; typedef typename __decay_and_strip<_T2>::__type __ds_type2; typedef pair<__ds_type1, __ds_type2> __pair_type; return __pair_type(std::forward<_T1>(__x), std::forward<_T2>(__y)); } } # 73 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/initializer_list" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/initializer_list" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/initializer_list" 3 #pragma GCC visibility push(default) namespace std { template class initializer_list { public: typedef _E value_type; typedef const _E& reference; typedef const _E& const_reference; typedef size_t size_type; typedef const _E* iterator; typedef const _E* const_iterator; private: iterator _M_array; size_type _M_len; constexpr initializer_list(const_iterator __a, size_type __l) : _M_array(__a), _M_len(__l) { } public: constexpr initializer_list() noexcept : _M_array(0), _M_len(0) { } constexpr size_type size() const noexcept { return _M_len; } constexpr const_iterator begin() const noexcept { return _M_array; } constexpr const_iterator end() const noexcept { return begin() + size(); } }; template constexpr const _Tp* begin(initializer_list<_Tp> __ils) noexcept { return __ils.begin(); } template constexpr const _Tp* end(initializer_list<_Tp> __ils) noexcept { return __ils.end(); } } #pragma GCC visibility pop # 77 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/utility" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class tuple_size; template class tuple_element; template struct tuple_size> : public integral_constant { }; template struct tuple_element<0, std::pair<_Tp1, _Tp2>> { typedef _Tp1 type; }; template struct tuple_element<1, std::pair<_Tp1, _Tp2>> { typedef _Tp2 type; }; template struct __pair_get; template<> struct __pair_get<0> { template static constexpr _Tp1& __get(std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.first; } template static constexpr _Tp1&& __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<_Tp1>(__pair.first); } template static constexpr const _Tp1& __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.first; } }; template<> struct __pair_get<1> { template static constexpr _Tp2& __get(std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.second; } template static constexpr _Tp2&& __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept { return std::forward<_Tp2>(__pair.second); } template static constexpr const _Tp2& __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept { return __pair.second; } }; template constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& get(std::pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__get(__in); } template constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& get(std::pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__move_get(std::move(__in)); } template constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& get(const std::pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__const_get(__in); } } # 22 "/localhome/glisse2/include/boost/config/no_tr1/utility.hpp" 2 # 38 "/localhome/glisse2/include/boost/config/select_stdlib_config.hpp" 2 # 41 "/localhome/glisse2/include/boost/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/stdlib/libstdcpp3.hpp" 1 # 74 "/localhome/glisse2/include/boost/config/stdlib/libstdcpp3.hpp" # 1 "/usr/include/unistd.h" 1 3 4 # 28 "/usr/include/unistd.h" 3 4 extern "C" { # 203 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4 # 204 "/usr/include/unistd.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4 # 208 "/usr/include/unistd.h" 2 3 4 # 218 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 29 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef long int __quad_t; typedef unsigned long int __u_quad_t; # 131 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 # 132 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 typedef unsigned long int __dev_t; typedef unsigned int __uid_t; typedef unsigned int __gid_t; typedef unsigned long int __ino_t; typedef unsigned long int __ino64_t; typedef unsigned int __mode_t; typedef unsigned long int __nlink_t; typedef long int __off_t; typedef long int __off64_t; typedef int __pid_t; typedef struct { int __val[2]; } __fsid_t; typedef long int __clock_t; typedef unsigned long int __rlim_t; typedef unsigned long int __rlim64_t; typedef unsigned int __id_t; typedef long int __time_t; typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef int __daddr_t; typedef long int __swblk_t; typedef int __key_t; typedef int __clockid_t; typedef void * __timer_t; typedef long int __blksize_t; typedef long int __blkcnt_t; typedef long int __blkcnt64_t; typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; typedef long int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; typedef long int __intptr_t; typedef unsigned int __socklen_t; # 219 "/usr/include/unistd.h" 2 3 4 typedef __ssize_t ssize_t; # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 228 "/usr/include/unistd.h" 2 3 4 typedef __gid_t gid_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __useconds_t useconds_t; typedef __pid_t pid_t; typedef __intptr_t intptr_t; typedef __socklen_t socklen_t; # 288 "/usr/include/unistd.h" 3 4 extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int euidaccess (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int eaccess (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); extern int faccessat (int __fd, __const char *__file, int __type, int __flag) throw () __attribute__ ((__nonnull__ (2))) ; # 331 "/usr/include/unistd.h" 3 4 extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); # 342 "/usr/include/unistd.h" 3 4 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) throw (); extern int close (int __fd); extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; # 373 "/usr/include/unistd.h" 3 4 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) ; extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, __off_t __offset) ; # 401 "/usr/include/unistd.h" 3 4 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) ; extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, __off64_t __offset) ; extern int pipe (int __pipedes[2]) throw () ; extern int pipe2 (int __pipedes[2], int __flags) throw () ; # 429 "/usr/include/unistd.h" 3 4 extern unsigned int alarm (unsigned int __seconds) throw (); # 441 "/usr/include/unistd.h" 3 4 extern unsigned int sleep (unsigned int __seconds); extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) throw (); extern int usleep (__useconds_t __useconds); # 466 "/usr/include/unistd.h" 3 4 extern int pause (void); extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) ; extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) ; extern int fchownat (int __fd, __const char *__file, __uid_t __owner, __gid_t __group, int __flag) throw () __attribute__ ((__nonnull__ (2))) ; extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; extern int fchdir (int __fd) throw () ; # 508 "/usr/include/unistd.h" 3 4 extern char *getcwd (char *__buf, size_t __size) throw () ; extern char *get_current_dir_name (void) throw (); extern char *getwd (char *__buf) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; extern int dup (int __fd) throw () ; extern int dup2 (int __fd, int __fd2) throw (); extern int dup3 (int __fd, int __fd2, int __flags) throw (); extern char **__environ; extern char **environ; extern int execve (__const char *__path, char *__const __argv[], char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) throw () __attribute__ ((__nonnull__ (2))); extern int execv (__const char *__path, char *__const __argv[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execle (__const char *__path, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execl (__const char *__path, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execvp (__const char *__file, char *__const __argv[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execlp (__const char *__file, __const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); extern int execvpe (__const char *__file, char *__const __argv[], char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nice (int __inc) throw () ; extern void _exit (int __status) __attribute__ ((__noreturn__)); # 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/confname.h" 3 4 enum { _PC_LINK_MAX, _PC_MAX_CANON, _PC_MAX_INPUT, _PC_NAME_MAX, _PC_PATH_MAX, _PC_PIPE_BUF, _PC_CHOWN_RESTRICTED, _PC_NO_TRUNC, _PC_VDISABLE, _PC_SYNC_IO, _PC_ASYNC_IO, _PC_PRIO_IO, _PC_SOCK_MAXBUF, _PC_FILESIZEBITS, _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, _PC_REC_XFER_ALIGN, _PC_ALLOC_SIZE_MIN, _PC_SYMLINK_MAX, _PC_2_SYMLINKS }; enum { _SC_ARG_MAX, _SC_CHILD_MAX, _SC_CLK_TCK, _SC_NGROUPS_MAX, _SC_OPEN_MAX, _SC_STREAM_MAX, _SC_TZNAME_MAX, _SC_JOB_CONTROL, _SC_SAVED_IDS, _SC_REALTIME_SIGNALS, _SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO, _SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC, _SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE, _SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES, _SC_SHARED_MEMORY_OBJECTS, _SC_AIO_LISTIO_MAX, _SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX, _SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_VERSION, _SC_PAGESIZE, _SC_RTSIG_MAX, _SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, _SC_TIMER_MAX, _SC_BC_BASE_MAX, _SC_BC_DIM_MAX, _SC_BC_SCALE_MAX, _SC_BC_STRING_MAX, _SC_COLL_WEIGHTS_MAX, _SC_EQUIV_CLASS_MAX, _SC_EXPR_NEST_MAX, _SC_LINE_MAX, _SC_RE_DUP_MAX, _SC_CHARCLASS_NAME_MAX, _SC_2_VERSION, _SC_2_C_BIND, _SC_2_C_DEV, _SC_2_FORT_DEV, _SC_2_FORT_RUN, _SC_2_SW_DEV, _SC_2_LOCALEDEF, _SC_PII, _SC_PII_XTI, _SC_PII_SOCKET, _SC_PII_INTERNET, _SC_PII_OSI, _SC_POLL, _SC_SELECT, _SC_UIO_MAXIOV, _SC_IOV_MAX = _SC_UIO_MAXIOV, _SC_PII_INTERNET_STREAM, _SC_PII_INTERNET_DGRAM, _SC_PII_OSI_COTS, _SC_PII_OSI_CLTS, _SC_PII_OSI_M, _SC_T_IOV_MAX, _SC_THREADS, _SC_THREAD_SAFE_FUNCTIONS, _SC_GETGR_R_SIZE_MAX, _SC_GETPW_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_TTY_NAME_MAX, _SC_THREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_KEYS_MAX, _SC_THREAD_STACK_MIN, _SC_THREAD_THREADS_MAX, _SC_THREAD_ATTR_STACKADDR, _SC_THREAD_ATTR_STACKSIZE, _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PRIO_INHERIT, _SC_THREAD_PRIO_PROTECT, _SC_THREAD_PROCESS_SHARED, _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES, _SC_ATEXIT_MAX, _SC_PASS_MAX, _SC_XOPEN_VERSION, _SC_XOPEN_XCU_VERSION, _SC_XOPEN_UNIX, _SC_XOPEN_CRYPT, _SC_XOPEN_ENH_I18N, _SC_XOPEN_SHM, _SC_2_CHAR_TERM, _SC_2_C_VERSION, _SC_2_UPE, _SC_XOPEN_XPG2, _SC_XOPEN_XPG3, _SC_XOPEN_XPG4, _SC_CHAR_BIT, _SC_CHAR_MAX, _SC_CHAR_MIN, _SC_INT_MAX, _SC_INT_MIN, _SC_LONG_BIT, _SC_WORD_BIT, _SC_MB_LEN_MAX, _SC_NZERO, _SC_SSIZE_MAX, _SC_SCHAR_MAX, _SC_SCHAR_MIN, _SC_SHRT_MAX, _SC_SHRT_MIN, _SC_UCHAR_MAX, _SC_UINT_MAX, _SC_ULONG_MAX, _SC_USHRT_MAX, _SC_NL_ARGMAX, _SC_NL_LANGMAX, _SC_NL_MSGMAX, _SC_NL_NMAX, _SC_NL_SETMAX, _SC_NL_TEXTMAX, _SC_XBS5_ILP32_OFF32, _SC_XBS5_ILP32_OFFBIG, _SC_XBS5_LP64_OFF64, _SC_XBS5_LPBIG_OFFBIG, _SC_XOPEN_LEGACY, _SC_XOPEN_REALTIME, _SC_XOPEN_REALTIME_THREADS, _SC_ADVISORY_INFO, _SC_BARRIERS, _SC_BASE, _SC_C_LANG_SUPPORT, _SC_C_LANG_SUPPORT_R, _SC_CLOCK_SELECTION, _SC_CPUTIME, _SC_THREAD_CPUTIME, _SC_DEVICE_IO, _SC_DEVICE_SPECIFIC, _SC_DEVICE_SPECIFIC_R, _SC_FD_MGMT, _SC_FIFO, _SC_PIPE, _SC_FILE_ATTRIBUTES, _SC_FILE_LOCKING, _SC_FILE_SYSTEM, _SC_MONOTONIC_CLOCK, _SC_MULTI_PROCESS, _SC_SINGLE_PROCESS, _SC_NETWORKING, _SC_READER_WRITER_LOCKS, _SC_SPIN_LOCKS, _SC_REGEXP, _SC_REGEX_VERSION, _SC_SHELL, _SC_SIGNALS, _SC_SPAWN, _SC_SPORADIC_SERVER, _SC_THREAD_SPORADIC_SERVER, _SC_SYSTEM_DATABASE, _SC_SYSTEM_DATABASE_R, _SC_TIMEOUTS, _SC_TYPED_MEMORY_OBJECTS, _SC_USER_GROUPS, _SC_USER_GROUPS_R, _SC_2_PBS, _SC_2_PBS_ACCOUNTING, _SC_2_PBS_LOCATE, _SC_2_PBS_MESSAGE, _SC_2_PBS_TRACK, _SC_SYMLOOP_MAX, _SC_STREAMS, _SC_2_PBS_CHECKPOINT, _SC_V6_ILP32_OFF32, _SC_V6_ILP32_OFFBIG, _SC_V6_LP64_OFF64, _SC_V6_LPBIG_OFFBIG, _SC_HOST_NAME_MAX, _SC_TRACE, _SC_TRACE_EVENT_FILTER, _SC_TRACE_INHERIT, _SC_TRACE_LOG, _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE, _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE, _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE, _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE, _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE, _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, _SC_RAW_SOCKETS, _SC_V7_ILP32_OFF32, _SC_V7_ILP32_OFFBIG, _SC_V7_LP64_OFF64, _SC_V7_LPBIG_OFFBIG, _SC_SS_REPL_MAX, _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS, _SC_THREAD_ROBUST_PRIO_INHERIT, _SC_THREAD_ROBUST_PRIO_PROTECT }; enum { _CS_PATH, _CS_V6_WIDTH_RESTRICTED_ENVS, _CS_GNU_LIBC_VERSION, _CS_GNU_LIBPTHREAD_VERSION, _CS_V5_WIDTH_RESTRICTED_ENVS, _CS_V7_WIDTH_RESTRICTED_ENVS, _CS_LFS_CFLAGS = 1000, _CS_LFS_LDFLAGS, _CS_LFS_LIBS, _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, _CS_LFS64_LDFLAGS, _CS_LFS64_LIBS, _CS_LFS64_LINTFLAGS, _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, _CS_XBS5_ILP32_OFF32_LDFLAGS, _CS_XBS5_ILP32_OFF32_LIBS, _CS_XBS5_ILP32_OFF32_LINTFLAGS, _CS_XBS5_ILP32_OFFBIG_CFLAGS, _CS_XBS5_ILP32_OFFBIG_LDFLAGS, _CS_XBS5_ILP32_OFFBIG_LIBS, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, _CS_XBS5_LP64_OFF64_CFLAGS, _CS_XBS5_LP64_OFF64_LDFLAGS, _CS_XBS5_LP64_OFF64_LIBS, _CS_XBS5_LP64_OFF64_LINTFLAGS, _CS_XBS5_LPBIG_OFFBIG_CFLAGS, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, _CS_XBS5_LPBIG_OFFBIG_LIBS, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V6_ILP32_OFF32_CFLAGS, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, _CS_POSIX_V6_ILP32_OFF32_LIBS, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V6_ILP32_OFFBIG_LIBS, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V6_LP64_OFF64_CFLAGS, _CS_POSIX_V6_LP64_OFF64_LDFLAGS, _CS_POSIX_V6_LP64_OFF64_LIBS, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, _CS_POSIX_V7_ILP32_OFF32_CFLAGS, _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, _CS_POSIX_V7_ILP32_OFF32_LIBS, _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, _CS_POSIX_V7_ILP32_OFFBIG_LIBS, _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, _CS_POSIX_V7_LP64_OFF64_CFLAGS, _CS_POSIX_V7_LP64_OFF64_LDFLAGS, _CS_POSIX_V7_LP64_OFF64_LIBS, _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, _CS_V6_ENV, _CS_V7_ENV }; # 607 "/usr/include/unistd.h" 2 3 4 extern long int pathconf (__const char *__path, int __name) throw () __attribute__ ((__nonnull__ (1))); extern long int fpathconf (int __fd, int __name) throw (); extern long int sysconf (int __name) throw (); extern size_t confstr (int __name, char *__buf, size_t __len) throw (); extern __pid_t getpid (void) throw (); extern __pid_t getppid (void) throw (); extern __pid_t getpgrp (void) throw (); # 643 "/usr/include/unistd.h" 3 4 extern __pid_t __getpgid (__pid_t __pid) throw (); extern __pid_t getpgid (__pid_t __pid) throw (); extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); # 669 "/usr/include/unistd.h" 3 4 extern int setpgrp (void) throw (); # 686 "/usr/include/unistd.h" 3 4 extern __pid_t setsid (void) throw (); extern __pid_t getsid (__pid_t __pid) throw (); extern __uid_t getuid (void) throw (); extern __uid_t geteuid (void) throw (); extern __gid_t getgid (void) throw (); extern __gid_t getegid (void) throw (); extern int getgroups (int __size, __gid_t __list[]) throw () ; extern int group_member (__gid_t __gid) throw (); extern int setuid (__uid_t __uid) throw (); extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); extern int seteuid (__uid_t __uid) throw (); extern int setgid (__gid_t __gid) throw (); extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); extern int setegid (__gid_t __gid) throw (); extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) throw (); extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) throw (); extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) throw (); extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) throw (); extern __pid_t fork (void) throw (); extern __pid_t vfork (void) throw (); extern char *ttyname (int __fd) throw (); extern int ttyname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))) ; extern int isatty (int __fd) throw (); extern int ttyslot (void) throw (); extern int link (__const char *__from, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) ; extern int linkat (int __fromfd, __const char *__from, int __tofd, __const char *__to, int __flags) throw () __attribute__ ((__nonnull__ (2, 4))) ; extern int symlink (__const char *__from, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) ; extern ssize_t readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (1, 2))) ; extern int symlinkat (__const char *__from, int __tofd, __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern ssize_t readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (2, 3))) ; extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern int unlinkat (int __fd, __const char *__name, int __flag) throw () __attribute__ ((__nonnull__ (2))); extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); extern __pid_t tcgetpgrp (int __fd) throw (); extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); extern char *getlogin (void); extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); # 890 "/usr/include/unistd.h" 3 4 # 1 "/usr/include/getopt.h" 1 3 4 # 50 "/usr/include/getopt.h" 3 4 extern "C" { # 59 "/usr/include/getopt.h" 3 4 extern char *optarg; # 73 "/usr/include/getopt.h" 3 4 extern int optind; extern int opterr; extern int optopt; # 152 "/usr/include/getopt.h" 3 4 extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) throw (); # 187 "/usr/include/getopt.h" 3 4 } # 891 "/usr/include/unistd.h" 2 3 4 extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); extern int sethostname (__const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) ; extern int sethostid (long int __id) throw () ; extern int getdomainname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) ; extern int setdomainname (__const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) ; extern int vhangup (void) throw (); extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ; extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) throw () __attribute__ ((__nonnull__ (1))); extern int acct (__const char *__name) throw (); extern char *getusershell (void) throw (); extern void endusershell (void) throw (); extern void setusershell (void) throw (); extern int daemon (int __nochdir, int __noclose) throw () ; extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); # 976 "/usr/include/unistd.h" 3 4 extern int fsync (int __fd); extern long int gethostid (void); extern void sync (void) throw (); extern int getpagesize (void) throw () __attribute__ ((__const__)); extern int getdtablesize (void) throw (); # 1007 "/usr/include/unistd.h" 3 4 extern int truncate (__const char *__file, __off_t __length) throw () __attribute__ ((__nonnull__ (1))) ; # 1019 "/usr/include/unistd.h" 3 4 extern int truncate64 (__const char *__file, __off64_t __length) throw () __attribute__ ((__nonnull__ (1))) ; # 1029 "/usr/include/unistd.h" 3 4 extern int ftruncate (int __fd, __off_t __length) throw () ; # 1039 "/usr/include/unistd.h" 3 4 extern int ftruncate64 (int __fd, __off64_t __length) throw () ; # 1050 "/usr/include/unistd.h" 3 4 extern int brk (void *__addr) throw () ; extern void *sbrk (intptr_t __delta) throw (); # 1071 "/usr/include/unistd.h" 3 4 extern long int syscall (long int __sysno, ...) throw (); # 1094 "/usr/include/unistd.h" 3 4 extern int lockf (int __fd, int __cmd, __off_t __len) ; # 1104 "/usr/include/unistd.h" 3 4 extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; # 1125 "/usr/include/unistd.h" 3 4 extern int fdatasync (int __fildes); extern char *crypt (__const char *__key, __const char *__salt) throw () __attribute__ ((__nonnull__ (1, 2))); extern void encrypt (char *__libc_block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); extern void swab (__const void *__restrict __from, void *__restrict __to, ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *ctermid (char *__s) throw (); # 1163 "/usr/include/unistd.h" 3 4 } # 75 "/localhome/glisse2/include/boost/config/stdlib/libstdcpp3.hpp" 2 # 45 "/localhome/glisse2/include/boost/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/select_platform_config.hpp" 1 # 50 "/localhome/glisse2/include/boost/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/platform/linux.hpp" 1 # 15 "/localhome/glisse2/include/boost/config/platform/linux.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 66 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 1 "/usr/include/stdlib.h" 1 3 4 # 33 "/usr/include/stdlib.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 34 "/usr/include/stdlib.h" 2 3 4 extern "C" { # 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 # 43 "/usr/include/stdlib.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 # 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 37 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 # 38 "/usr/include/endian.h" 2 3 4 # 61 "/usr/include/endian.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 # 62 "/usr/include/endian.h" 2 3 4 # 66 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4 union wait { int w_status; struct { unsigned int __w_termsig:7; unsigned int __w_coredump:1; unsigned int __w_retcode:8; unsigned int:16; } __wait_terminated; struct { unsigned int __w_stopval:8; unsigned int __w_stopsig:8; unsigned int:16; } __wait_stopped; }; # 44 "/usr/include/stdlib.h" 2 3 4 # 96 "/usr/include/stdlib.h" 3 4 typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; __extension__ typedef struct { long long int quot; long long int rem; } lldiv_t; # 140 "/usr/include/stdlib.h" 3 4 extern size_t __ctype_get_mb_cur_max (void) throw () ; extern double atof (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern int atoi (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern long int atol (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int atoll (__const char *__nptr) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern float strtof (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long double strtold (__const char *__restrict __nptr, char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () __attribute__ ((__nonnull__ (1))) ; # 236 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/xlocale.h" 1 3 4 # 28 "/usr/include/xlocale.h" 3 4 typedef struct __locale_struct { struct __locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; typedef __locale_t locale_t; # 237 "/usr/include/stdlib.h" 2 3 4 extern long int strtol_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern unsigned long int strtoul_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern long long int strtoll_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; __extension__ extern unsigned long long int strtoull_l (__const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; extern double strtod_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern float strtof_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern long double strtold_l (__const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 3))) ; extern __inline __attribute__ ((__gnu_inline__)) double atof (__const char *__nptr) throw () { return strtod (__nptr, (char **) __null); } extern __inline __attribute__ ((__gnu_inline__)) int atoi (__const char *__nptr) throw () { return (int) strtol (__nptr, (char **) __null, 10); } extern __inline __attribute__ ((__gnu_inline__)) long int atol (__const char *__nptr) throw () { return strtol (__nptr, (char **) __null, 10); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int atoll (__const char *__nptr) throw () { return strtoll (__nptr, (char **) __null, 10); } # 311 "/usr/include/stdlib.h" 3 4 extern char *l64a (long int __n) throw () ; extern long int a64l (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; # 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 extern "C" { typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; # 71 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __mode_t mode_t; typedef __nlink_t nlink_t; # 105 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __id_t id_t; # 116 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 58 "/usr/include/time.h" 3 4 typedef __clock_t clock_t; # 74 "/usr/include/time.h" 3 4 typedef __time_t time_t; # 92 "/usr/include/time.h" 3 4 typedef __clockid_t clockid_t; # 104 "/usr/include/time.h" 3 4 typedef __timer_t timer_t; # 134 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 148 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 195 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 # 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4 # 32 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 35 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 120 "/usr/include/time.h" 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 45 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 # 75 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 47 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 # 55 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 typedef long int __fd_mask; # 67 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern "C" { # 109 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); } # 221 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 # 30 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 __extension__ extern unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); __extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 224 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 263 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 # 50 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[56]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; # 76 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; int __spins; __pthread_list_t __list; # 101 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 } __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; int __shared; unsigned long int __pad1; unsigned long int __pad2; unsigned int __flags; } __data; # 187 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 char __size[56]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[32]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 272 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 } # 321 "/usr/include/stdlib.h" 2 3 4 extern long int random (void) throw (); extern void srandom (unsigned int __seed) throw (); extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () __attribute__ ((__nonnull__ (2))); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (2, 4))); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); extern int rand (void) throw (); extern void srand (unsigned int __seed) throw (); extern int rand_r (unsigned int *__seed) throw (); extern double drand48 (void) throw (); extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int lrand48 (void) throw (); extern long int nrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern long int mrand48 (void) throw (); extern long int jrand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); extern void srand48 (long int __seedval) throw (); extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () __attribute__ ((__nonnull__ (1))); extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); struct drand48_data { unsigned short int __x[3]; unsigned short int __old_x[3]; unsigned short int __c; unsigned short int __init; unsigned long long int __a; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (2))); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *calloc (size_t __nmemb, size_t __size) throw () __attribute__ ((__malloc__)) ; extern void *realloc (void *__ptr, size_t __size) throw () __attribute__ ((__warn_unused_result__)); extern void free (void *__ptr) throw (); extern void cfree (void *__ptr) throw (); # 1 "/usr/include/alloca.h" 1 3 4 # 25 "/usr/include/alloca.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 26 "/usr/include/alloca.h" 2 3 4 extern "C" { extern void *alloca (size_t __size) throw (); } # 498 "/usr/include/stdlib.h" 2 3 4 extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) throw () __attribute__ ((__nonnull__ (1))) ; extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); extern "C++" int at_quick_exit (void (*__func) (void)) throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) throw () __attribute__ ((__nonnull__ (1))); extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern char *__secure_getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern int setenv (__const char *__name, __const char *__value, int __replace) throw () __attribute__ ((__nonnull__ (2))); extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); extern int clearenv (void) throw (); # 606 "/usr/include/stdlib.h" 3 4 extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; # 620 "/usr/include/stdlib.h" 3 4 extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; # 630 "/usr/include/stdlib.h" 3 4 extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; # 642 "/usr/include/stdlib.h" 3 4 extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; # 652 "/usr/include/stdlib.h" 3 4 extern int mkstemps64 (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; # 663 "/usr/include/stdlib.h" 3 4 extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; # 674 "/usr/include/stdlib.h" 3 4 extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; # 684 "/usr/include/stdlib.h" 3 4 extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; # 694 "/usr/include/stdlib.h" 3 4 extern int mkostemps (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) ; # 706 "/usr/include/stdlib.h" 3 4 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __attribute__ ((__nonnull__ (1))) ; extern int system (__const char *__command) ; extern char *canonicalize_file_name (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; # 734 "/usr/include/stdlib.h" 3 4 extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw () ; typedef int (*__compar_fn_t) (__const void *, __const void *); typedef __compar_fn_t comparison_fn_t; typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); extern void *bsearch (__const void *__key, __const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 2, 5))) ; extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __attribute__ ((__nonnull__ (1, 4))); extern int abs (int __x) throw () __attribute__ ((__const__)) ; extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; __extension__ extern long long int llabs (long long int __x) throw () __attribute__ ((__const__)) ; extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)) ; extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)) ; __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) throw () __attribute__ ((__const__)) ; # 808 "/usr/include/stdlib.h" 3 4 extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *gcvt (double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () __attribute__ ((__nonnull__ (3))) ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); extern int mblen (__const char *__s, size_t __n) throw () ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw () ; extern int wctomb (char *__s, wchar_t __wchar) throw () ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw (); extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw (); extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; # 896 "/usr/include/stdlib.h" 3 4 extern int getsubopt (char **__restrict __optionp, char *__const *__restrict __tokens, char **__restrict __valuep) throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); extern int posix_openpt (int __oflag) ; extern int grantpt (int __fd) throw (); extern int unlockpt (int __fd) throw (); extern char *ptsname (int __fd) throw () ; extern int ptsname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int getpt (void); extern int getloadavg (double __loadavg[], int __nelem) throw () __attribute__ ((__nonnull__ (1))); # 964 "/usr/include/stdlib.h" 3 4 } # 67 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 2 3 # 98 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::div_t; using ::ldiv_t; using ::abort; using ::abs; using ::atexit; using ::atof; using ::atoi; using ::atol; using ::bsearch; using ::calloc; using ::div; using ::exit; using ::free; using ::getenv; using ::labs; using ::ldiv; using ::malloc; using ::mblen; using ::mbstowcs; using ::mbtowc; using ::qsort; using ::rand; using ::realloc; using ::srand; using ::strtod; using ::strtol; using ::strtoul; using ::system; using ::wcstombs; using ::wctomb; inline long abs(long __i) { return labs(__i); } inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } } # 160 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using ::lldiv_t; using ::_Exit; inline long long abs(long long __x) { return __x >= 0 ? __x : -__x; } using ::llabs; inline lldiv_t div(long long __n, long long __d) { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } using ::lldiv; # 195 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 using ::atoll; using ::strtoll; using ::strtoull; using ::strtof; using ::strtold; } namespace std { using ::__gnu_cxx::lldiv_t; using ::__gnu_cxx::_Exit; using ::__gnu_cxx::abs; using ::__gnu_cxx::llabs; using ::__gnu_cxx::div; using ::__gnu_cxx::lldiv; using ::__gnu_cxx::atoll; using ::__gnu_cxx::strtof; using ::__gnu_cxx::strtoll; using ::__gnu_cxx::strtoull; using ::__gnu_cxx::strtold; } namespace std { using std::lldiv_t; using std::llabs; using std::lldiv; using std::atoll; using std::strtoll; using std::strtoull; using std::strtof; using std::strtold; using std::abs; using std::div; } # 16 "/localhome/glisse2/include/boost/config/platform/linux.hpp" 2 # 74 "/localhome/glisse2/include/boost/config/platform/linux.hpp" # 1 "/localhome/glisse2/include/boost/config/posix_features.hpp" 1 # 75 "/localhome/glisse2/include/boost/config/platform/linux.hpp" 2 # 54 "/localhome/glisse2/include/boost/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/suffix.hpp" 1 # 33 "/localhome/glisse2/include/boost/config/suffix.hpp" # 34 "/localhome/glisse2/include/boost/config/suffix.hpp" 3 # 520 "/localhome/glisse2/include/boost/config/suffix.hpp" 3 namespace boost{ __extension__ typedef long long long_long_type; __extension__ typedef unsigned long long ulong_long_type; } # 58 "/localhome/glisse2/include/boost/config.hpp" 2 # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/version.h" 1 # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/../../include/CGAL/compiler_config.h" 1 # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/gcc_cpp0x.h" 1 # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/CGAL.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/CGAL.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/auto_link.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/CGAL.h" 2 # 61 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" 2 # 189 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/algorithm" 1 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/algorithm" 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/algorithm" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 1 3 # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functexcept.h" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functexcept.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/exception_defines.h" 1 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functexcept.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { void __throw_bad_exception(void) __attribute__((__noreturn__)); void __throw_bad_alloc(void) __attribute__((__noreturn__)); void __throw_bad_cast(void) __attribute__((__noreturn__)); void __throw_bad_typeid(void) __attribute__((__noreturn__)); void __throw_logic_error(const char*) __attribute__((__noreturn__)); void __throw_domain_error(const char*) __attribute__((__noreturn__)); void __throw_invalid_argument(const char*) __attribute__((__noreturn__)); void __throw_length_error(const char*) __attribute__((__noreturn__)); void __throw_out_of_range(const char*) __attribute__((__noreturn__)); void __throw_runtime_error(const char*) __attribute__((__noreturn__)); void __throw_range_error(const char*) __attribute__((__noreturn__)); void __throw_overflow_error(const char*) __attribute__((__noreturn__)); void __throw_underflow_error(const char*) __attribute__((__noreturn__)); void __throw_ios_failure(const char*) __attribute__((__noreturn__)); void __throw_system_error(int) __attribute__((__noreturn__)); void __throw_future_error(int) __attribute__((__noreturn__)); void __throw_bad_function_call() __attribute__((__noreturn__)); } # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/cpp_type_traits.h" 1 3 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/cpp_type_traits.h" 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/cpp_type_traits.h" 3 # 69 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/cpp_type_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template class __normal_iterator; } namespace std __attribute__ ((__visibility__ ("default"))) { struct __true_type { }; struct __false_type { }; template struct __truth_type { typedef __false_type __type; }; template<> struct __truth_type { typedef __true_type __type; }; template struct __traitor { enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; typedef typename __truth_type<__value>::__type __type; }; template struct __are_same { enum { __value = 0 }; typedef __false_type __type; }; template struct __are_same<_Tp, _Tp> { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_void { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_void { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_integer { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_integer { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_floating { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_floating { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_pointer { enum { __value = 0 }; typedef __false_type __type; }; template struct __is_pointer<_Tp*> { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_normal_iterator { enum { __value = 0 }; typedef __false_type __type; }; template struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { }; template struct __is_fundamental : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > { }; template struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; template struct __is_char { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_char { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_char { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_byte { enum { __value = 0 }; typedef __false_type __type; }; template<> struct __is_byte { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte { enum { __value = 1 }; typedef __true_type __type; }; template<> struct __is_byte { enum { __value = 1 }; typedef __true_type __type; }; template struct __is_move_iterator { enum { __value = 0 }; typedef __false_type __type; }; template class move_iterator; template struct __is_move_iterator< move_iterator<_Iterator> > { enum { __value = 1 }; typedef __true_type __type; }; } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/type_traits.h" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/type_traits.h" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/type_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template struct __enable_if { }; template struct __enable_if { typedef _Tp __type; }; template struct __conditional_type { typedef _Iftrue __type; }; template struct __conditional_type { typedef _Iffalse __type; }; template struct __add_unsigned { private: typedef __enable_if::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __add_unsigned { typedef unsigned char __type; }; template<> struct __add_unsigned { typedef unsigned char __type; }; template<> struct __add_unsigned { typedef unsigned short __type; }; template<> struct __add_unsigned { typedef unsigned int __type; }; template<> struct __add_unsigned { typedef unsigned long __type; }; template<> struct __add_unsigned { typedef unsigned long long __type; }; template<> struct __add_unsigned; template<> struct __add_unsigned; template struct __remove_unsigned { private: typedef __enable_if::__value, _Tp> __if_type; public: typedef typename __if_type::__type __type; }; template<> struct __remove_unsigned { typedef signed char __type; }; template<> struct __remove_unsigned { typedef signed char __type; }; template<> struct __remove_unsigned { typedef short __type; }; template<> struct __remove_unsigned { typedef int __type; }; template<> struct __remove_unsigned { typedef long __type; }; template<> struct __remove_unsigned { typedef long long __type; }; template<> struct __remove_unsigned; template<> struct __remove_unsigned; template inline bool __is_null_pointer(_Type* __ptr) { return __ptr == 0; } template inline bool __is_null_pointer(_Type) { return false; } template::__value> struct __promote { typedef double __type; }; template struct __promote<_Tp, false> { }; template<> struct __promote { typedef long double __type; }; template<> struct __promote { typedef double __type; }; template<> struct __promote { typedef float __type; }; template::__type, typename _Up2 = typename __promote<_Up>::__type> struct __promote_2 { typedef __typeof__(_Tp2() + _Up2()) __type; }; template::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type> struct __promote_3 { typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; }; template::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type, typename _Wp2 = typename __promote<_Wp>::__type> struct __promote_4 { typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; }; } # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/numeric_traits.h" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/numeric_traits.h" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/numeric_traits.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 54 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/numeric_traits.h" 3 template struct __numeric_traits_integer { static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); static const bool __is_signed = ((_Value)(-1) < 0); static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); }; template const _Value __numeric_traits_integer<_Value>::__min; template const _Value __numeric_traits_integer<_Value>::__max; template const bool __numeric_traits_integer<_Value>::__is_signed; template const int __numeric_traits_integer<_Value>::__digits; # 99 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/numeric_traits.h" 3 template struct __numeric_traits_floating { static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136); static const bool __is_signed = true; static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); }; template const int __numeric_traits_floating<_Value>::__max_digits10; template const bool __numeric_traits_floating<_Value>::__is_signed; template const int __numeric_traits_floating<_Value>::__digits10; template const int __numeric_traits_floating<_Value>::__max_exponent10; template struct __numeric_traits : public __conditional_type::__value, __numeric_traits_integer<_Value>, __numeric_traits_floating<_Value> >::__type { }; } # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_types.h" 1 3 # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_types.h" 3 # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_types.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 90 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_types.h" 3 struct input_iterator_tag { }; struct output_iterator_tag { }; struct forward_iterator_tag : public input_iterator_tag { }; struct bidirectional_iterator_tag : public forward_iterator_tag { }; struct random_access_iterator_tag : public bidirectional_iterator_tag { }; # 117 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_types.h" 3 template struct iterator { typedef _Category iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Pointer pointer; typedef _Reference reference; }; # 143 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_types.h" 3 template class __has_iterator_category_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_iterator_category : integral_constant::type>::value> { }; template::value> struct __iterator_traits { }; template struct __iterator_traits<_Iterator, true> { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; typedef typename _Iterator::pointer pointer; typedef typename _Iterator::reference reference; }; template struct iterator_traits : public __iterator_traits<_Iterator> { }; # 175 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_types.h" 3 template struct iterator_traits<_Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; template struct iterator_traits { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef const _Tp* pointer; typedef const _Tp& reference; }; template inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } template struct _Iter_base { typedef _Iterator iterator_type; static iterator_type _S_base(_Iterator __it) { return __it; } }; template struct _Iter_base<_Iterator, true> { typedef typename _Iterator::iterator_type iterator_type; static iterator_type _S_base(_Iterator __it) { return __it.base(); } }; } # 67 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_funcs.h" 1 3 # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_funcs.h" 3 # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_funcs.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } template inline typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { return __last - __first; } # 112 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_funcs.h" 3 template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { return std::__distance(__first, __last, std::__iterator_category(__first)); } template inline void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { while (__n--) ++__i; } template inline void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { if (__n > 0) while (__n--) ++__i; else while (__n++) --__i; } template inline void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { __i += __n; } # 170 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator_base_funcs.h" 3 template inline void advance(_InputIterator& __i, _Distance __n) { typename iterator_traits<_InputIterator>::difference_type __d = __n; std::__advance(__i, __d, std::__iterator_category(__i)); } template inline _ForwardIterator next(_ForwardIterator __x, typename iterator_traits<_ForwardIterator>::difference_type __n = 1) { std::advance(__x, __n); return __x; } template inline _BidirectionalIterator prev(_BidirectionalIterator __x, typename iterator_traits<_BidirectionalIterator>::difference_type __n = 1) { std::advance(__x, -__n); return __x; } } # 68 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 1 3 # 69 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 97 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template class reverse_iterator : public iterator::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> { protected: _Iterator current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::pointer pointer; typedef typename __traits_type::reference reference; reverse_iterator() : current() { } explicit reverse_iterator(iterator_type __x) : current(__x) { } reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } template reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } iterator_type base() const { return current; } reference operator*() const { _Iterator __tmp = current; return *--__tmp; } pointer operator->() const { return &(operator*()); } reverse_iterator& operator++() { --current; return *this; } reverse_iterator operator++(int) { reverse_iterator __tmp = *this; --current; return __tmp; } reverse_iterator& operator--() { ++current; return *this; } reverse_iterator operator--(int) { reverse_iterator __tmp = *this; ++current; return __tmp; } reverse_iterator operator+(difference_type __n) const { return reverse_iterator(current - __n); } reverse_iterator& operator+=(difference_type __n) { current -= __n; return *this; } reverse_iterator operator-(difference_type __n) const { return reverse_iterator(current + __n); } reverse_iterator& operator-=(difference_type __n) { current += __n; return *this; } reference operator[](difference_type __n) const { return *(*this + __n); } }; # 284 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template inline bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template inline bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } template inline bool operator!=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } template inline bool operator>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y < __x; } template inline bool operator<=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } template inline bool operator>=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } template inline typename reverse_iterator<_Iterator>::difference_type operator-(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() - __x.base(); } template inline reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) { return reverse_iterator<_Iterator>(__x.base() - __n); } template inline bool operator==(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template inline bool operator<(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() < __x.base(); } template inline bool operator!=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x == __y); } template inline bool operator>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y < __x; } template inline bool operator<=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__y < __x); } template inline bool operator>=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x < __y); } template inline auto operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) -> decltype(__y.base() - __x.base()) { return __y.base() - __x.base(); } # 396 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template class back_insert_iterator : public iterator { protected: _Container* container; public: typedef _Container container_type; explicit back_insert_iterator(_Container& __x) : container(&__x) { } # 430 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 back_insert_iterator& operator=(const typename _Container::value_type& __value) { container->push_back(__value); return *this; } back_insert_iterator& operator=(typename _Container::value_type&& __value) { container->push_back(std::move(__value)); return *this; } back_insert_iterator& operator*() { return *this; } back_insert_iterator& operator++() { return *this; } back_insert_iterator operator++(int) { return *this; } }; # 472 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template inline back_insert_iterator<_Container> back_inserter(_Container& __x) { return back_insert_iterator<_Container>(__x); } # 487 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template class front_insert_iterator : public iterator { protected: _Container* container; public: typedef _Container container_type; explicit front_insert_iterator(_Container& __x) : container(&__x) { } # 520 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 front_insert_iterator& operator=(const typename _Container::value_type& __value) { container->push_front(__value); return *this; } front_insert_iterator& operator=(typename _Container::value_type&& __value) { container->push_front(std::move(__value)); return *this; } front_insert_iterator& operator*() { return *this; } front_insert_iterator& operator++() { return *this; } front_insert_iterator operator++(int) { return *this; } }; # 562 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template inline front_insert_iterator<_Container> front_inserter(_Container& __x) { return front_insert_iterator<_Container>(__x); } # 581 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template class insert_iterator : public iterator { protected: _Container* container; typename _Container::iterator iter; public: typedef _Container container_type; insert_iterator(_Container& __x, typename _Container::iterator __i) : container(&__x), iter(__i) {} # 632 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 insert_iterator& operator=(const typename _Container::value_type& __value) { iter = container->insert(iter, __value); ++iter; return *this; } insert_iterator& operator=(typename _Container::value_type&& __value) { iter = container->insert(iter, std::move(__value)); ++iter; return *this; } insert_iterator& operator*() { return *this; } insert_iterator& operator++() { return *this; } insert_iterator& operator++(int) { return *this; } }; # 676 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template inline insert_iterator<_Container> inserter(_Container& __x, _Iterator __i) { return insert_iterator<_Container>(__x, typename _Container::iterator(__i)); } } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 700 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 using std::iterator_traits; using std::iterator; template class __normal_iterator { protected: _Iterator _M_current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::iterator_category iterator_category; typedef typename __traits_type::value_type value_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::reference reference; typedef typename __traits_type::pointer pointer; constexpr __normal_iterator() : _M_current(_Iterator()) { } explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { } template __normal_iterator(const __normal_iterator<_Iter, typename __enable_if< (std::__are_same<_Iter, typename _Container::pointer>::__value), _Container>::__type>& __i) : _M_current(__i.base()) { } reference operator*() const { return *_M_current; } pointer operator->() const { return _M_current; } __normal_iterator& operator++() { ++_M_current; return *this; } __normal_iterator operator++(int) { return __normal_iterator(_M_current++); } __normal_iterator& operator--() { --_M_current; return *this; } __normal_iterator operator--(int) { return __normal_iterator(_M_current--); } reference operator[](const difference_type& __n) const { return _M_current[__n]; } __normal_iterator& operator+=(const difference_type& __n) { _M_current += __n; return *this; } __normal_iterator operator+(const difference_type& __n) const { return __normal_iterator(_M_current + __n); } __normal_iterator& operator-=(const difference_type& __n) { _M_current -= __n; return *this; } __normal_iterator operator-(const difference_type& __n) const { return __normal_iterator(_M_current - __n); } const _Iterator& base() const { return _M_current; } }; # 798 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template inline bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template inline bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template inline bool operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template inline bool operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } template inline bool operator<(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } template inline bool operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } template inline bool operator>(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } template inline bool operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template inline bool operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template inline bool operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template inline bool operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template inline auto operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) -> decltype(__lhs.base() - __rhs.base()) { return __lhs.base() - __rhs.base(); } template inline typename __normal_iterator<_Iterator, _Container>::difference_type operator-(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() - __rhs.base(); } template inline __normal_iterator<_Iterator, _Container> operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n, const __normal_iterator<_Iterator, _Container>& __i) { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } } namespace std __attribute__ ((__visibility__ ("default"))) { # 924 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_iterator.h" 3 template class move_iterator { protected: _Iterator _M_current; typedef iterator_traits<_Iterator> __traits_type; public: typedef _Iterator iterator_type; typedef typename __traits_type::iterator_category iterator_category; typedef typename __traits_type::value_type value_type; typedef typename __traits_type::difference_type difference_type; typedef _Iterator pointer; typedef value_type&& reference; move_iterator() : _M_current() { } explicit move_iterator(iterator_type __i) : _M_current(__i) { } template move_iterator(const move_iterator<_Iter>& __i) : _M_current(__i.base()) { } iterator_type base() const { return _M_current; } reference operator*() const { return std::move(*_M_current); } pointer operator->() const { return _M_current; } move_iterator& operator++() { ++_M_current; return *this; } move_iterator operator++(int) { move_iterator __tmp = *this; ++_M_current; return __tmp; } move_iterator& operator--() { --_M_current; return *this; } move_iterator operator--(int) { move_iterator __tmp = *this; --_M_current; return __tmp; } move_iterator operator+(difference_type __n) const { return move_iterator(_M_current + __n); } move_iterator& operator+=(difference_type __n) { _M_current += __n; return *this; } move_iterator operator-(difference_type __n) const { return move_iterator(_M_current - __n); } move_iterator& operator-=(difference_type __n) { _M_current -= __n; return *this; } reference operator[](difference_type __n) const { return std::move(_M_current[__n]); } }; template inline bool operator==(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template inline bool operator==(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template inline bool operator!=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x == __y); } template inline bool operator!=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x == __y); } template inline bool operator<(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __x.base() < __y.base(); } template inline bool operator<(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __x.base() < __y.base(); } template inline bool operator<=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__y < __x); } template inline bool operator<=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__y < __x); } template inline bool operator>(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return __y < __x; } template inline bool operator>(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return __y < __x; } template inline bool operator>=(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) { return !(__x < __y); } template inline bool operator>=(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) { return !(__x < __y); } template inline auto operator-(const move_iterator<_IteratorL>& __x, const move_iterator<_IteratorR>& __y) -> decltype(__x.base() - __y.base()) { return __x.base() - __y.base(); } template inline auto operator-(const move_iterator<_Iterator>& __x, const move_iterator<_Iterator>& __y) -> decltype(__x.base() - __y.base()) { return __x.base() - __y.base(); } template inline move_iterator<_Iterator> operator+(typename move_iterator<_Iterator>::difference_type __n, const move_iterator<_Iterator>& __x) { return __x + __n; } template inline move_iterator<_Iterator> make_move_iterator(_Iterator __i) { return move_iterator<_Iterator>(__i); } template::value_type>::value, _Iterator, move_iterator<_Iterator>>::type> inline _ReturnType __make_move_if_noexcept_iterator(_Iterator __i) { return _ReturnType(__i); } } # 69 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/debug/debug.h" 1 3 # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/debug/debug.h" 3 namespace std { namespace __debug { } } namespace __gnu_debug { using namespace std::__debug; } # 71 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __iter_swap { template static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; _ValueType1 __tmp = std::move(*__a); *__a = std::move(*__b); *__b = std::move(__tmp); } }; template<> struct __iter_swap { template static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { swap(*__a, *__b); } }; # 116 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2; typedef typename iterator_traits<_ForwardIterator1>::reference _ReferenceType1; typedef typename iterator_traits<_ForwardIterator2>::reference _ReferenceType2; std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && __are_same<_ValueType1&, _ReferenceType1>::__value && __are_same<_ValueType2&, _ReferenceType2>::__value>:: iter_swap(__a, __b); } # 157 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template _ForwardIterator2 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { ; for (; __first1 != __last1; ++__first1, ++__first2) std::iter_swap(__first1, __first2); return __first2; } # 185 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline const _Tp& min(const _Tp& __a, const _Tp& __b) { if (__b < __a) return __b; return __a; } # 208 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline const _Tp& max(const _Tp& __a, const _Tp& __b) { if (__a < __b) return __b; return __a; } # 231 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__b, __a)) return __b; return __a; } # 252 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { if (__comp(__a, __b)) return __b; return __a; } template struct _Niter_base : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> { }; template inline typename _Niter_base<_Iterator>::iterator_type __niter_base(_Iterator __it) { return std::_Niter_base<_Iterator>::_S_base(__it); } template struct _Miter_base : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> { }; template inline typename _Miter_base<_Iterator>::iterator_type __miter_base(_Iterator __it) { return std::_Miter_base<_Iterator>::_S_base(__it); } template struct __copy_move { template static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, ++__first) *__result = *__first; return __result; } }; template struct __copy_move { template static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, ++__first) *__result = std::move(*__first); return __result; } }; template<> struct __copy_move { template static _OI __copy_m(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = *__first; ++__first; ++__result; } return __result; } }; template<> struct __copy_move { template static _OI __copy_m(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = std::move(*__first); ++__first; ++__result; } return __result; } }; template struct __copy_move<_IsMove, true, random_access_iterator_tag> { template static _Tp* __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); return __result + _Num; } }; template inline _OI __copy_move_a(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::value_type _ValueTypeI; typedef typename iterator_traits<_OI>::value_type _ValueTypeO; typedef typename iterator_traits<_II>::iterator_category _Category; const bool __simple = (__is_trivial(_ValueTypeI) && __is_pointer<_II>::__value && __is_pointer<_OI>::__value && __are_same<_ValueTypeI, _ValueTypeO>::__value); return std::__copy_move<_IsMove, __simple, _Category>::__copy_m(__first, __last, __result); } template struct char_traits; template class istreambuf_iterator; template class ostreambuf_iterator; template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(_CharT*, _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); template inline _OI __copy_move_a2(_II __first, _II __last, _OI __result) { return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } # 442 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline _OI copy(_II __first, _II __last, _OI __result) { ; return (std::__copy_move_a2<__is_move_iterator<_II>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result)); } # 475 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline _OI move(_II __first, _II __last, _OI __result) { ; return std::__copy_move_a2(std::__miter_base(__first), std::__miter_base(__last), __result); } template struct __copy_move_backward { template static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = *--__last; return __result; } }; template struct __copy_move_backward { template static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = std::move(*--__last); return __result; } }; template<> struct __copy_move_backward { template static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = *--__last; return __result; } }; template<> struct __copy_move_backward { template static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = std::move(*--__last); return __result; } }; template struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> { template static _Tp* __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; } }; template inline _BI2 __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) { typedef typename iterator_traits<_BI1>::value_type _ValueType1; typedef typename iterator_traits<_BI2>::value_type _ValueType2; typedef typename iterator_traits<_BI1>::iterator_category _Category; const bool __simple = (__is_trivial(_ValueType1) && __is_pointer<_BI1>::__value && __is_pointer<_BI2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__copy_move_backward<_IsMove, __simple, _Category>::__copy_move_b(__first, __last, __result); } template inline _BI2 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) { return _BI2(std::__copy_move_backward_a<_IsMove> (std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } # 611 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) { ; return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result)); } # 647 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline _BI2 move_backward(_BI1 __first, _BI1 __last, _BI2 __result) { ; return std::__copy_move_backward_a2(std::__miter_base(__first), std::__miter_base(__last), __result); } template inline typename __gnu_cxx::__enable_if::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { for (; __first != __last; ++__first) *__first = __value; } template inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { const _Tp __tmp = __value; for (; __first != __last; ++__first) *__first = __tmp; } template inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) { const _Tp __tmp = __c; __builtin_memset(__first, static_cast(__tmp), __last - __first); } # 713 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), __value); } template inline typename __gnu_cxx::__enable_if::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, ++__first) *__first = __value; return __first; } template inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { const _Tp __tmp = __value; for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, ++__first) *__first = __tmp; return __first; } template inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) { std::__fill_a(__first, __first + __n, __c); return __first + __n; } # 773 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline _OI fill_n(_OI __first, _Size __n, const _Tp& __value) { return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); } template struct __equal { template static bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) return false; return true; } }; template<> struct __equal { template static bool equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) { return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * (__last1 - __first1)); } }; template inline bool __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = ((__is_integer<_ValueType1>::__value || __is_pointer<_ValueType1>::__value) && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value && __are_same<_ValueType1, _ValueType2>::__value); return std::__equal<__simple>::equal(__first1, __last1, __first2); } template struct __lc_rai { template static _II1 __newlast1(_II1, _II1 __last1, _II2, _II2) { return __last1; } template static bool __cnd2(_II __first, _II __last) { return __first != __last; } }; template<> struct __lc_rai { template static _RAI1 __newlast1(_RAI1 __first1, _RAI1 __last1, _RAI2 __first2, _RAI2 __last2) { const typename iterator_traits<_RAI1>::difference_type __diff1 = __last1 - __first1; const typename iterator_traits<_RAI2>::difference_type __diff2 = __last2 - __first2; return __diff2 < __diff1 ? __first1 + __diff2 : __last1; } template static bool __cnd2(_RAI, _RAI) { return true; } }; template struct __lexicographical_compare { template static bool __lc(_II1, _II1, _II2, _II2); }; template template bool __lexicographical_compare<_BoolType>:: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef std::__lc_rai<_Category1, _Category2> __rai_type; __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); ++__first1, ++__first2) { if (*__first1 < *__first2) return true; if (*__first2 < *__first1) return false; } return __first1 == __last1 && __first2 != __last2; } template<> struct __lexicographical_compare { template static bool __lc(const _Tp* __first1, const _Tp* __last1, const _Up* __first2, const _Up* __last2) { const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; const int __result = __builtin_memcmp(__first1, __first2, std::min(__len1, __len2)); return __result != 0 ? __result < 0 : __len1 < __len2; } }; template inline bool __lexicographical_compare_aux(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value); return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, __first2, __last2); } # 935 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } template inline _Size __lg(_Size __n) { _Size __k; for (__k = 0; __n != 0; __n >>= 1) ++__k; return __k - 1; } inline int __lg(int __n) { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } inline long __lg(long __n) { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } inline long long __lg(long long __n) { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } # 1009 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { ; return std::__equal_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2)); } # 1041 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred) { ; for (; __first1 != __last1; ++__first1, ++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return true; } # 1072 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template inline bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; ; ; return std::__lexicographical_compare_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2), std::__niter_base(__last2)); } # 1106 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef std::__lc_rai<_Category1, _Category2> __rai_type; ; ; __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); ++__first1, ++__first2) { if (__comp(*__first1, *__first2)) return true; if (__comp(*__first2, *__first1)) return false; } return __first1 == __last1 && __first2 != __last2; } # 1146 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { ; while (__first1 != __last1 && *__first1 == *__first2) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } # 1183 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algobase.h" 3 template pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { ; while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/algorithm" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 1 3 # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/algorithmfwd.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/algorithmfwd.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/algorithmfwd.h" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/algorithmfwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 194 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/algorithmfwd.h" 3 template bool all_of(_IIter, _IIter, _Predicate); template bool any_of(_IIter, _IIter, _Predicate); template bool binary_search(_FIter, _FIter, const _Tp&); template bool binary_search(_FIter, _FIter, const _Tp&, _Compare); template _OIter copy(_IIter, _IIter, _OIter); template _BIter2 copy_backward(_BIter1, _BIter1, _BIter2); template _OIter copy_if(_IIter, _IIter, _OIter, _Predicate); template _OIter copy_n(_IIter, _Size, _OIter); template pair<_FIter, _FIter> equal_range(_FIter, _FIter, const _Tp&); template pair<_FIter, _FIter> equal_range(_FIter, _FIter, const _Tp&, _Compare); template void fill(_FIter, _FIter, const _Tp&); template _OIter fill_n(_OIter, _Size, const _Tp&); template _FIter1 find_end(_FIter1, _FIter1, _FIter2, _FIter2); template _FIter1 find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template _IIter find_if_not(_IIter, _IIter, _Predicate); template bool includes(_IIter1, _IIter1, _IIter2, _IIter2); template bool includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template void inplace_merge(_BIter, _BIter, _BIter); template void inplace_merge(_BIter, _BIter, _BIter, _Compare); template bool is_heap(_RAIter, _RAIter); template bool is_heap(_RAIter, _RAIter, _Compare); template _RAIter is_heap_until(_RAIter, _RAIter); template _RAIter is_heap_until(_RAIter, _RAIter, _Compare); template bool is_partitioned(_IIter, _IIter, _Predicate); template bool is_permutation(_FIter1, _FIter1, _FIter2); template bool is_permutation(_FIter1, _FIter1, _FIter2, _BinaryPredicate); template bool is_sorted(_FIter, _FIter); template bool is_sorted(_FIter, _FIter, _Compare); template _FIter is_sorted_until(_FIter, _FIter); template _FIter is_sorted_until(_FIter, _FIter, _Compare); template void iter_swap(_FIter1, _FIter2); template _FIter lower_bound(_FIter, _FIter, const _Tp&); template _FIter lower_bound(_FIter, _FIter, const _Tp&, _Compare); template void make_heap(_RAIter, _RAIter); template void make_heap(_RAIter, _RAIter, _Compare); template const _Tp& max(const _Tp&, const _Tp&); template const _Tp& max(const _Tp&, const _Tp&, _Compare); template const _Tp& min(const _Tp&, const _Tp&); template const _Tp& min(const _Tp&, const _Tp&, _Compare); template pair minmax(const _Tp&, const _Tp&); template pair minmax(const _Tp&, const _Tp&, _Compare); template pair<_FIter, _FIter> minmax_element(_FIter, _FIter); template pair<_FIter, _FIter> minmax_element(_FIter, _FIter, _Compare); template _Tp min(initializer_list<_Tp>); template _Tp min(initializer_list<_Tp>, _Compare); template _Tp max(initializer_list<_Tp>); template _Tp max(initializer_list<_Tp>, _Compare); template pair<_Tp, _Tp> minmax(initializer_list<_Tp>); template pair<_Tp, _Tp> minmax(initializer_list<_Tp>, _Compare); template bool next_permutation(_BIter, _BIter); template bool next_permutation(_BIter, _BIter, _Compare); template bool none_of(_IIter, _IIter, _Predicate); template _RAIter partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); template _RAIter partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); template pair<_OIter1, _OIter2> partition_copy(_IIter, _IIter, _OIter1, _OIter2, _Predicate); template _FIter partition_point(_FIter, _FIter, _Predicate); template void pop_heap(_RAIter, _RAIter); template void pop_heap(_RAIter, _RAIter, _Compare); template bool prev_permutation(_BIter, _BIter); template bool prev_permutation(_BIter, _BIter, _Compare); template void push_heap(_RAIter, _RAIter); template void push_heap(_RAIter, _RAIter, _Compare); template _FIter remove(_FIter, _FIter, const _Tp&); template _FIter remove_if(_FIter, _FIter, _Predicate); template _OIter remove_copy(_IIter, _IIter, _OIter, const _Tp&); template _OIter remove_copy_if(_IIter, _IIter, _OIter, _Predicate); template _OIter replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); template _OIter replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); template void reverse(_BIter, _BIter); template _OIter reverse_copy(_BIter, _BIter, _OIter); template void rotate(_FIter, _FIter, _FIter); template _OIter rotate_copy(_FIter, _FIter, _FIter, _OIter); # 535 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/algorithmfwd.h" 3 template void shuffle(_RAIter, _RAIter, _UGenerator&&); template void sort_heap(_RAIter, _RAIter); template void sort_heap(_RAIter, _RAIter, _Compare); template _BIter stable_partition(_BIter, _BIter, _Predicate); template void swap(_Tp&, _Tp&) noexcept(__and_, is_nothrow_move_assignable<_Tp>>::value) ; template void swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) noexcept(noexcept(swap(*__a, *__b))) ; template _FIter2 swap_ranges(_FIter1, _FIter1, _FIter2); template _FIter unique(_FIter, _FIter); template _FIter unique(_FIter, _FIter, _BinaryPredicate); template _FIter upper_bound(_FIter, _FIter, const _Tp&); template _FIter upper_bound(_FIter, _FIter, const _Tp&, _Compare); template _FIter adjacent_find(_FIter, _FIter); template _FIter adjacent_find(_FIter, _FIter, _BinaryPredicate); template typename iterator_traits<_IIter>::difference_type count(_IIter, _IIter, const _Tp&); template typename iterator_traits<_IIter>::difference_type count_if(_IIter, _IIter, _Predicate); template bool equal(_IIter1, _IIter1, _IIter2); template bool equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template _IIter find(_IIter, _IIter, const _Tp&); template _FIter1 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); template _FIter1 find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template _IIter find_if(_IIter, _IIter, _Predicate); template _Funct for_each(_IIter, _IIter, _Funct); template void generate(_FIter, _FIter, _Generator); template _OIter generate_n(_OIter, _Size, _Generator); template bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); template bool lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); template _FIter max_element(_FIter, _FIter); template _FIter max_element(_FIter, _FIter, _Compare); template _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _FIter min_element(_FIter, _FIter); template _FIter min_element(_FIter, _FIter, _Compare); template pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2); template pair<_IIter1, _IIter2> mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); template void nth_element(_RAIter, _RAIter, _RAIter); template void nth_element(_RAIter, _RAIter, _RAIter, _Compare); template void partial_sort(_RAIter, _RAIter, _RAIter); template void partial_sort(_RAIter, _RAIter, _RAIter, _Compare); template _BIter partition(_BIter, _BIter, _Predicate); template void random_shuffle(_RAIter, _RAIter); template void random_shuffle(_RAIter, _RAIter, _Generator&&); template void replace(_FIter, _FIter, const _Tp&, const _Tp&); template void replace_if(_FIter, _FIter, _Predicate, const _Tp&); template _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2); template _FIter1 search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); template _FIter search_n(_FIter, _FIter, _Size, const _Tp&); template _FIter search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); template _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); template _OIter set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); template void sort(_RAIter, _RAIter); template void sort(_RAIter, _RAIter, _Compare); template void stable_sort(_RAIter, _RAIter); template void stable_sort(_RAIter, _RAIter, _Compare); template _OIter transform(_IIter, _IIter, _OIter, _UnaryOperation); template _OIter transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); template _OIter unique_copy(_IIter, _IIter, _OIter); template _OIter unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 1 3 # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template _Distance __is_heap_until(_RandomAccessIterator __first, _Distance __n) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__first[__parent] < __first[__child]) return __child; if ((__child & 1) == 0) ++__parent; } return __n; } template _Distance __is_heap_until(_RandomAccessIterator __first, _Distance __n, _Compare __comp) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__comp(__first[__parent], __first[__child])) return __child; if ((__child & 1) == 0) ++__parent; } return __n; } template inline bool __is_heap(_RandomAccessIterator __first, _Distance __n) { return std::__is_heap_until(__first, __n) == __n; } template inline bool __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) { return std::__is_heap_until(__first, __n, __comp) == __n; } template inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::__is_heap(__first, std::distance(__first, __last)); } template inline bool __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } template void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && *(__first + __parent) < __value) { *(__first + __holeIndex) = std::move(*(__first + __parent)); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = std::move(__value); } # 155 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; _ValueType __value = std::move(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), std::move(__value)); } template void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value, _Compare __comp) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) { *(__first + __holeIndex) = std::move(*(__first + __parent)); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = std::move(__value); } # 205 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; _ValueType __value = std::move(*(__last - 1)); std::__push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), std::move(__value), __comp); } template void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value) { const _Distance __topIndex = __holeIndex; _Distance __secondChild = __holeIndex; while (__secondChild < (__len - 1) / 2) { __secondChild = 2 * (__secondChild + 1); if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) __secondChild--; *(__first + __holeIndex) = std::move(*(__first + __secondChild)); __holeIndex = __secondChild; } if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) { __secondChild = 2 * (__secondChild + 1); *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) ; __holeIndex = __secondChild - 1; } std::__push_heap(__first, __holeIndex, __topIndex, std::move(__value)); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; _ValueType __value = std::move(*__result); *__result = std::move(*__first); std::__adjust_heap(__first, _DistanceType(0), _DistanceType(__last - __first), std::move(__value)); } # 279 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; --__last; std::__pop_heap(__first, __last, __last); } template void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value, _Compare __comp) { const _Distance __topIndex = __holeIndex; _Distance __secondChild = __holeIndex; while (__secondChild < (__len - 1) / 2) { __secondChild = 2 * (__secondChild + 1); if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) __secondChild--; *(__first + __holeIndex) = std::move(*(__first + __secondChild)); __holeIndex = __secondChild; } if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) { __secondChild = 2 * (__secondChild + 1); *(__first + __holeIndex) = std::move(*(__first + (__secondChild - 1))) ; __holeIndex = __secondChild - 1; } std::__push_heap(__first, __holeIndex, __topIndex, std::move(__value), __comp); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; _ValueType __value = std::move(*__result); *__result = std::move(*__first); std::__adjust_heap(__first, _DistanceType(0), _DistanceType(__last - __first), std::move(__value), __comp); } # 353 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; --__last; std::__pop_heap(__first, __last, __last, __comp); } # 376 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; if (__last - __first < 2) return; const _DistanceType __len = __last - __first; _DistanceType __parent = (__len - 2) / 2; while (true) { _ValueType __value = std::move(*(__first + __parent)); std::__adjust_heap(__first, __parent, __len, std::move(__value)); if (__parent == 0) return; __parent--; } } # 416 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; if (__last - __first < 2) return; const _DistanceType __len = __last - __first; _DistanceType __parent = (__len - 2) / 2; while (true) { _ValueType __value = std::move(*(__first + __parent)); std::__adjust_heap(__first, __parent, __len, std::move(__value), __comp); if (__parent == 0) return; __parent--; } } # 455 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; ; while (__last - __first > 1) { --__last; std::__pop_heap(__first, __last, __last); } } # 484 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; ; while (__last - __first > 1) { --__last; std::__pop_heap(__first, __last, __last, __comp); } } # 513 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; return __first + std::__is_heap_until(__first, std::distance(__first, __last)); } # 539 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline _RandomAccessIterator is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { ; return __first + std::__is_heap_until(__first, std::distance(__first, __last), __comp); } # 561 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { return std::is_heap_until(__first, __last) == __last; } # 574 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_heap.h" 3 template inline bool is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { return std::is_heap_until(__first, __last, __comp) == __last; } } # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h" 1 3 # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_construct.h" 1 3 # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_construct.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/new" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/new" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/new" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 1 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 3 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 3 #pragma GCC visibility push(default) extern "C++" { namespace std { # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 3 class exception { public: exception() throw() { } virtual ~exception() throw(); virtual const char* what() const throw(); }; class bad_exception : public exception { public: bad_exception() throw() { } virtual ~bad_exception() throw(); virtual const char* what() const throw(); }; typedef void (*terminate_handler) (); typedef void (*unexpected_handler) (); terminate_handler set_terminate(terminate_handler) throw(); void terminate() throw() __attribute__ ((__noreturn__)); unexpected_handler set_unexpected(unexpected_handler) throw(); void unexpected() __attribute__ ((__noreturn__)); # 118 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 3 bool uncaught_exception() throw() __attribute__ ((__pure__)); } namespace __gnu_cxx { # 143 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 3 void __verbose_terminate_handler(); } } #pragma GCC visibility pop # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/exception_ptr.h" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/exception_ptr.h" 3 #pragma GCC visibility push(default) # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/exception_ptr.h" 3 extern "C++" { namespace std { namespace __exception_ptr { class exception_ptr; } using __exception_ptr::exception_ptr; exception_ptr current_exception() throw(); void rethrow_exception(exception_ptr) __attribute__ ((__noreturn__)); namespace __exception_ptr { class exception_ptr { void* _M_exception_object; explicit exception_ptr(void* __e) throw(); void _M_addref() throw(); void _M_release() throw(); void *_M_get() const throw() __attribute__ ((__pure__)); friend exception_ptr std::current_exception() throw(); friend void std::rethrow_exception(exception_ptr); public: exception_ptr() throw(); exception_ptr(const exception_ptr&) throw(); exception_ptr(nullptr_t) throw() : _M_exception_object(0) { } exception_ptr(exception_ptr&& __o) throw() : _M_exception_object(__o._M_exception_object) { __o._M_exception_object = 0; } # 109 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/exception_ptr.h" 3 exception_ptr& operator=(const exception_ptr&) throw(); exception_ptr& operator=(exception_ptr&& __o) throw() { exception_ptr(static_cast(__o)).swap(*this); return *this; } ~exception_ptr() throw(); void swap(exception_ptr&) throw(); # 134 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/exception_ptr.h" 3 explicit operator bool() const { return _M_exception_object; } friend bool operator==(const exception_ptr&, const exception_ptr&) throw() __attribute__ ((__pure__)); const class type_info* __cxa_exception_type() const throw() __attribute__ ((__pure__)); }; bool operator==(const exception_ptr&, const exception_ptr&) throw() __attribute__ ((__pure__)); bool operator!=(const exception_ptr&, const exception_ptr&) throw() __attribute__ ((__pure__)); inline void swap(exception_ptr& __lhs, exception_ptr& __rhs) { __lhs.swap(__rhs); } } template exception_ptr copy_exception(_Ex __ex) throw() { try { throw __ex; } catch(...) { return current_exception(); } } template exception_ptr make_exception_ptr(_Ex __ex) throw() { return std::copy_exception<_Ex>(__ex); } } } #pragma GCC visibility pop # 155 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/nested_exception.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/nested_exception.h" 3 #pragma GCC visibility push(default) # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/nested_exception.h" 3 extern "C++" { namespace std { class nested_exception { exception_ptr _M_ptr; public: nested_exception() throw() : _M_ptr(current_exception()) { } nested_exception(const nested_exception&) = default; nested_exception& operator=(const nested_exception&) = default; virtual ~nested_exception(); void rethrow_nested() const __attribute__ ((__noreturn__)) { rethrow_exception(_M_ptr); } exception_ptr nested_ptr() const { return _M_ptr; } }; template struct _Nested_exception : public _Except, public nested_exception { explicit _Nested_exception(_Except&& __ex) : _Except(static_cast<_Except&&>(__ex)) { } }; template struct __get_nested_helper { static const nested_exception* _S_get(const _Ex& __ex) { return dynamic_cast(&__ex); } }; template struct __get_nested_helper<_Ex*> { static const nested_exception* _S_get(const _Ex* __ex) { return dynamic_cast(__ex); } }; template inline const nested_exception* __get_nested_exception(const _Ex& __ex) { return __get_nested_helper<_Ex>::_S_get(__ex); } template void __throw_with_nested(_Ex&&, const nested_exception* = 0) __attribute__ ((__noreturn__)); template void __throw_with_nested(_Ex&&, ...) __attribute__ ((__noreturn__)); template inline void __throw_with_nested(_Ex&& __ex, const nested_exception*) { throw __ex; } template inline void __throw_with_nested(_Ex&& __ex, ...) { throw _Nested_exception<_Ex>(static_cast<_Ex&&>(__ex)); } template void throw_with_nested(_Ex __ex) __attribute__ ((__noreturn__)); template inline void throw_with_nested(_Ex __ex) { if (__get_nested_exception(__ex)) throw __ex; __throw_with_nested(static_cast<_Ex&&>(__ex), &__ex); } template inline void rethrow_if_nested(const _Ex& __ex) { if (const nested_exception* __nested = __get_nested_exception(__ex)) __nested->rethrow_nested(); } inline void rethrow_if_nested(const nested_exception& __ex) { __ex.rethrow_nested(); } } } #pragma GCC visibility pop # 156 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/exception" 2 3 # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/new" 2 3 #pragma GCC visibility push(default) extern "C++" { namespace std { class bad_alloc : public exception { public: bad_alloc() throw() { } virtual ~bad_alloc() throw(); virtual const char* what() const throw(); }; struct nothrow_t { }; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler(new_handler) throw(); } # 93 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/new" 3 void* operator new(std::size_t) __attribute__((__externally_visible__)); void* operator new[](std::size_t) __attribute__((__externally_visible__)); void operator delete(void*) noexcept __attribute__((__externally_visible__)); void operator delete[](void*) noexcept __attribute__((__externally_visible__)); void* operator new(std::size_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); void* operator new[](std::size_t, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); void operator delete(void*, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); void operator delete[](void*, const std::nothrow_t&) noexcept __attribute__((__externally_visible__)); inline void* operator new(std::size_t, void* __p) noexcept { return __p; } inline void* operator new[](std::size_t, void* __p) noexcept { return __p; } inline void operator delete (void*, void*) noexcept { } inline void operator delete[](void*, void*) noexcept { } } #pragma GCC visibility pop # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_construct.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/alloc_traits.h" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/alloc_traits.h" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/alloc_traits.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 1 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ptr_traits.h" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ptr_traits.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class __has_element_type_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_element_type : integral_constant::type>::value> { }; template class __has_difference_type_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_difference_type : integral_constant::type>::value> { }; template::value> struct __ptrtr_elt_type; template struct __ptrtr_elt_type<_Tp, true> { typedef typename _Tp::element_type __type; }; template class _SomePtr, typename _Tp, typename... _Args> struct __ptrtr_elt_type<_SomePtr<_Tp, _Args...>, false> { typedef _Tp __type; }; template::value> struct __ptrtr_diff_type { typedef typename _Tp::difference_type __type; }; template struct __ptrtr_diff_type<_Tp, false> { typedef ptrdiff_t __type; }; template class __ptrtr_rebind_helper { template static constexpr bool _S_chk(typename _Ptr2::template rebind<_Up2>*) { return true; } template static constexpr bool _S_chk(...) { return false; } public: static const bool __value = _S_chk<_Ptr, _Up>(nullptr); }; template::__value> struct __ptrtr_rebind; template struct __ptrtr_rebind<_Tp, _Up, true> { typedef typename _Tp::template rebind<_Up> __type; }; template class _SomePtr, typename _Up, typename _Tp, typename... _Args> struct __ptrtr_rebind<_SomePtr<_Tp, _Args...>, _Up, false> { typedef _SomePtr<_Up, _Args...> __type; }; template::type> struct __ptrtr_not_void { typedef _Tp __type; }; template struct __ptrtr_not_void<_Tp, void> { struct __type { }; }; template class __ptrtr_pointer_to { typedef typename __ptrtr_elt_type<_Ptr>::__type __orig_type; typedef typename __ptrtr_not_void<__orig_type>::__type __element_type; public: static _Ptr pointer_to(__element_type& __e) { return _Ptr::pointer_to(__e); } }; template struct pointer_traits : __ptrtr_pointer_to<_Ptr> { typedef _Ptr pointer; typedef typename __ptrtr_elt_type<_Ptr>::__type element_type; typedef typename __ptrtr_diff_type<_Ptr>::__type difference_type; private: template using rebind = typename __ptrtr_rebind<_Ptr, _Up>::__type; template friend struct allocator_traits; template friend struct pointer_traits; template friend class __ptrtr_rebind_helper2; }; template struct pointer_traits<_Tp*> { typedef _Tp* pointer; typedef _Tp element_type; typedef ptrdiff_t difference_type; template using rebind = _Up*; static pointer pointer_to(typename __ptrtr_not_void::__type& __r) noexcept { return std::addressof(__r); } }; } # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class __alloctr_rebind_helper { template static constexpr bool _S_chk(typename _Alloc2::template rebind<_Tp2>::other*) { return true; } template static constexpr bool _S_chk(...) { return false; } public: static const bool __value = _S_chk<_Alloc, _Tp>(nullptr); }; template::__value> struct __alloctr_rebind; template struct __alloctr_rebind<_Alloc, _Tp, true> { typedef typename _Alloc::template rebind<_Tp>::other __type; }; template class _Alloc, typename _Tp, typename _Up, typename... _Args> struct __alloctr_rebind<_Alloc<_Up, _Args...>, _Tp, false> { typedef _Alloc<_Tp, _Args...> __type; }; template struct allocator_traits { typedef _Alloc allocator_type; typedef typename _Alloc::value_type value_type; # 96 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 private: template static typename _Tp::pointer _S_pointer_helper(_Tp*); static value_type* _S_pointer_helper(...); typedef decltype(_S_pointer_helper((_Alloc*)0)) __pointer; public: typedef __pointer pointer; private: template static typename _Tp::const_pointer _S_const_pointer_helper # 105 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static typename pointer_traits::template rebind _S_const_pointer_helper # 105 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_const_pointer_helper # 105 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __const_pointer # 105 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 114 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __const_pointer const_pointer; private: template static typename _Tp::void_pointer _S_void_pointer_helper # 116 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static typename pointer_traits::template rebind _S_void_pointer_helper # 116 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_void_pointer_helper # 116 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __void_pointer # 116 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 125 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __void_pointer void_pointer; private: template static typename _Tp::const_void_pointer _S_const_void_pointer_helper # 127 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static typename pointer_traits::template rebind _S_const_void_pointer_helper # 127 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_const_void_pointer_helper # 127 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __const_void_pointer # 127 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 136 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __const_void_pointer const_void_pointer; private: template static typename _Tp::difference_type _S_difference_type_helper # 138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static typename pointer_traits::difference_type _S_difference_type_helper # 138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_difference_type_helper # 138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __difference_type # 138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 147 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __difference_type difference_type; private: template static typename _Tp::size_type _S_size_type_helper # 149 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static typename make_unsigned::type _S_size_type_helper # 149 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_size_type_helper # 149 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __size_type # 149 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 158 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __size_type size_type; private: template static typename _Tp::propagate_on_container_copy_assignment _S_propagate_on_container_copy_assignment_helper # 160 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static false_type _S_propagate_on_container_copy_assignment_helper # 160 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_propagate_on_container_copy_assignment_helper # 160 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __propagate_on_container_copy_assignment # 160 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 169 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __propagate_on_container_copy_assignment propagate_on_container_copy_assignment; private: template static typename _Tp::propagate_on_container_move_assignment _S_propagate_on_container_move_assignment_helper # 172 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static false_type _S_propagate_on_container_move_assignment_helper # 172 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_propagate_on_container_move_assignment_helper # 172 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __propagate_on_container_move_assignment # 172 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 181 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __propagate_on_container_move_assignment propagate_on_container_move_assignment; private: template static typename _Tp::propagate_on_container_swap _S_propagate_on_container_swap_helper # 184 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (_Tp*); static false_type _S_propagate_on_container_swap_helper # 184 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 (...); typedef decltype( _S_propagate_on_container_swap_helper # 184 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ((_Alloc*)0)) __propagate_on_container_swap # 184 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 ; public: # 193 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 typedef __propagate_on_container_swap propagate_on_container_swap; template using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type; template using rebind_traits = allocator_traits>; private: template struct __allocate_helper { template()->allocate( std::declval(), std::declval()))> static true_type __test(int); template static false_type __test(...); typedef decltype(__test<_Alloc>(0)) type; static const bool value = type::value; }; template static typename enable_if<__allocate_helper<_Alloc2>::value, pointer>::type _S_allocate(_Alloc2& __a, size_type __n, const_void_pointer __hint) { return __a.allocate(__n, __hint); } template static typename enable_if::value, pointer>::type _S_allocate(_Alloc2& __a, size_type __n, ...) { return __a.allocate(__n); } template struct __construct_helper { template()->construct( std::declval<_Tp*>(), std::declval<_Args>()...))> static true_type __test(int); template static false_type __test(...); typedef decltype(__test<_Alloc>(0)) type; static const bool value = type::value; }; template static typename enable_if<__construct_helper<_Tp, _Args...>::value, void>::type _S_construct(_Alloc& __a, _Tp* __p, _Args&&... __args) { __a.construct(__p, std::forward<_Args>(__args)...); } template static typename enable_if::value, void>::type _S_construct(_Alloc&, _Tp* __p, _Args&&... __args) { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); } template struct __destroy_helper { template()->destroy( std::declval<_Tp*>()))> static true_type __test(int); template static false_type __test(...); typedef decltype(__test<_Alloc>(0)) type; static const bool value = type::value; }; template static typename enable_if<__destroy_helper<_Tp>::value, void>::type _S_destroy(_Alloc& __a, _Tp* __p) { __a.destroy(__p); } template static typename enable_if::value, void>::type _S_destroy(_Alloc&, _Tp* __p) { __p->~_Tp(); } template struct __maxsize_helper { template()->max_size())> static true_type __test(int); template static false_type __test(...); typedef decltype(__test<_Alloc2>(0)) type; static const bool value = type::value; }; template static typename enable_if<__maxsize_helper<_Alloc2>::value, size_type>::type _S_max_size(_Alloc2& __a) { return __a.max_size(); } template static typename enable_if::value, size_type>::type _S_max_size(_Alloc2&) { return __gnu_cxx::__numeric_traits::__max; } template struct __select_helper { template() ->select_on_container_copy_construction())> static true_type __test(int); template static false_type __test(...); typedef decltype(__test<_Alloc2>(0)) type; static const bool value = type::value; }; template static typename enable_if<__select_helper<_Alloc2>::value, _Alloc2>::type _S_select(_Alloc2& __a) { return __a.select_on_container_copy_construction(); } template static typename enable_if::value, _Alloc2>::type _S_select(_Alloc2& __a) { return __a; } public: # 344 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 static pointer allocate(_Alloc& __a, size_type __n) { return __a.allocate(__n); } # 359 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 static pointer allocate(_Alloc& __a, size_type __n, const_void_pointer __hint) { return _S_allocate(__a, __n, __hint); } # 371 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 static void deallocate(_Alloc& __a, pointer __p, size_type __n) { __a.deallocate(__p, __n); } # 385 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 template static void construct(_Alloc& __a, _Tp* __p, _Args&&... __args) { _S_construct(__a, __p, std::forward<_Args>(__args)...); } # 397 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 template static void destroy(_Alloc& __a, _Tp* __p) { _S_destroy(__a, __p); } # 409 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 static size_type max_size(const _Alloc& __a) { return _S_max_size(__a); } # 420 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/alloc_traits.h" 3 static _Alloc select_on_container_copy_construction(const _Alloc& __rhs) { return _S_select(__rhs); } }; template inline void __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) { __one = __two; } template inline void __do_alloc_on_copy(_Alloc&, const _Alloc&, false_type) { } template inline void __alloc_on_copy(_Alloc& __one, const _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_copy_assignment __pocca; __do_alloc_on_copy(__one, __two, __pocca()); } template inline _Alloc __alloc_on_copy(const _Alloc& __a) { typedef allocator_traits<_Alloc> __traits; return __traits::select_on_container_copy_construction(__a); } template inline void __do_alloc_on_move(_Alloc& __one, _Alloc& __two, true_type) { __one = std::move(__two); } template inline void __do_alloc_on_move(_Alloc&, _Alloc&, false_type) { } template inline void __alloc_on_move(_Alloc& __one, _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_move_assignment __pocma; __do_alloc_on_move(__one, __two, __pocma()); } template inline void __do_alloc_on_swap(_Alloc& __one, _Alloc& __two, true_type) { using std::swap; swap(__one, __two); } template inline void __do_alloc_on_swap(_Alloc&, _Alloc&, false_type) { } template inline void __alloc_on_swap(_Alloc& __one, _Alloc& __two) { typedef allocator_traits<_Alloc> __traits; typedef typename __traits::propagate_on_container_swap __pocs; __do_alloc_on_swap(__one, __two, __pocs()); } } # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/alloc_traits.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct allocator; } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template struct __allocator_always_compares_equal { static const bool value = false; }; template struct __allocator_always_compares_equal> { static const bool value = true; }; template struct array_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; template struct mt_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; template struct new_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; template struct pool_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; template struct __alloc_traits : std::allocator_traits<_Alloc> { typedef _Alloc allocator_type; typedef std::allocator_traits<_Alloc> _Base_type; typedef typename _Base_type::value_type value_type; typedef typename _Base_type::pointer pointer; typedef typename _Base_type::const_pointer const_pointer; typedef typename _Base_type::size_type size_type; typedef value_type& reference; typedef const value_type& const_reference; using _Base_type::allocate; using _Base_type::deallocate; using _Base_type::construct; using _Base_type::destroy; using _Base_type::max_size; private: template struct __is_custom_pointer : std::integral_constant::value && !std::is_pointer<_Ptr>::value> { }; public: template static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type construct(_Alloc& __a, _Ptr __p, _Args&&... __args) { _Base_type::construct(__a, std::addressof(*__p), std::forward<_Args>(__args)...); } template static typename std::enable_if<__is_custom_pointer<_Ptr>::value>::type destroy(_Alloc& __a, _Ptr __p) { _Base_type::destroy(__a, std::addressof(*__p)); } static _Alloc _S_select_on_copy(const _Alloc& __a) { return _Base_type::select_on_container_copy_construction(__a); } static void _S_on_swap(_Alloc& __a, _Alloc& __b) { std::__alloc_on_swap(__a, __b); } static constexpr bool _S_propagate_on_copy_assign() { return _Base_type::propagate_on_container_copy_assignment::value; } static constexpr bool _S_propagate_on_move_assign() { return _Base_type::propagate_on_container_move_assignment::value; } static constexpr bool _S_propagate_on_swap() { return _Base_type::propagate_on_container_swap::value; } static constexpr bool _S_always_equal() { return __allocator_always_compares_equal<_Alloc>::value; } static constexpr bool _S_nothrow_move() { return _S_propagate_on_move_assign() || _S_always_equal(); } static constexpr bool _S_nothrow_swap() { using std::swap; return !_S_propagate_on_swap() || noexcept(swap(std::declval<_Alloc&>(), std::declval<_Alloc&>())); } template struct rebind { typedef typename _Base_type::template rebind_alloc<_Tp> other; }; # 204 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/alloc_traits.h" 3 }; } # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_construct.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline void _Construct(_T1* __p, _Args&&... __args) { ::new(static_cast(__p)) _T1(std::forward<_Args>(__args)...); } # 92 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_construct.h" 3 template inline void _Destroy(_Tp* __pointer) { __pointer->~_Tp(); } template struct _Destroy_aux { template static void __destroy(_ForwardIterator __first, _ForwardIterator __last) { for (; __first != __last; ++__first) std::_Destroy(std::__addressof(*__first)); } }; template<> struct _Destroy_aux { template static void __destroy(_ForwardIterator, _ForwardIterator) { } }; template inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _Value_type; std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: __destroy(__first, __last); } template class allocator; template void _Destroy(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __first != __last; ++__first) __traits::destroy(__alloc, std::__addressof(*__first)); } template inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) { _Destroy(__first, __last); } } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 85 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h" 3 template pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) noexcept { const ptrdiff_t __max = __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); if (__len > __max) __len = __max; while (__len > 0) { _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), std::nothrow)); if (__tmp != 0) return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); __len /= 2; } return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); } # 112 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h" 3 template inline void return_temporary_buffer(_Tp* __p) { ::operator delete(__p, std::nothrow); } template class _Temporary_buffer { public: typedef _Tp value_type; typedef value_type* pointer; typedef pointer iterator; typedef ptrdiff_t size_type; protected: size_type _M_original_len; size_type _M_len; pointer _M_buffer; public: size_type size() const { return _M_len; } size_type requested_size() const { return _M_original_len; } iterator begin() { return _M_buffer; } iterator end() { return _M_buffer + _M_len; } _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); ~_Temporary_buffer() { std::_Destroy(_M_buffer, _M_buffer + _M_len); std::return_temporary_buffer(_M_buffer); } private: _Temporary_buffer(const _Temporary_buffer&); void operator=(const _Temporary_buffer&); }; template struct __uninitialized_construct_buf_dispatch { template static void __ucr(_ForwardIterator __first, _ForwardIterator __last, _Tp& __value) { if(__first == __last) return; _ForwardIterator __cur = __first; try { std::_Construct(std::__addressof(*__first), std::move(__value)); _ForwardIterator __prev = __cur; ++__cur; for(; __cur != __last; ++__cur, ++__prev) std::_Construct(std::__addressof(*__cur), std::move(*__prev)); __value = std::move(*__prev); } catch(...) { std::_Destroy(__first, __cur); throw; } } }; template<> struct __uninitialized_construct_buf_dispatch { template static void __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { } }; # 231 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tempbuf.h" 3 template inline void __uninitialized_construct_buf(_ForwardIterator __first, _ForwardIterator __last, _Tp& __value) { typedef typename std::iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_construct_buf_dispatch< __has_trivial_constructor(_ValueType)>:: __ucr(__first, __last, __value); } template _Temporary_buffer<_ForwardIterator, _Tp>:: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) : _M_original_len(std::distance(__first, __last)), _M_len(0), _M_buffer(0) { try { std::pair __p(std::get_temporary_buffer< value_type>(_M_original_len)); _M_buffer = __p.first; _M_len = __p.second; if(_M_buffer) std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len, *__first); } catch(...) { std::return_temporary_buffer(_M_buffer); _M_buffer = 0; _M_len = 0; throw; } } } # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 1 "/usr/include/math.h" 1 3 4 # 30 "/usr/include/math.h" 3 4 extern "C" { # 1 "/usr/include/x86_64-linux-gnu/bits/huge_val.h" 1 3 4 # 35 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/huge_valf.h" 1 3 4 # 37 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/huge_vall.h" 1 3 4 # 38 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/inf.h" 1 3 4 # 41 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/nan.h" 1 3 4 # 44 "/usr/include/math.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathdef.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/mathdef.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/mathdef.h" 2 3 4 typedef float float_t; typedef double double_t; # 48 "/usr/include/math.h" 2 3 4 # 71 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern double acos (double __x) throw (); extern double __acos (double __x) throw (); extern double asin (double __x) throw (); extern double __asin (double __x) throw (); extern double atan (double __x) throw (); extern double __atan (double __x) throw (); extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); extern double cos (double __x) throw (); extern double __cos (double __x) throw (); extern double sin (double __x) throw (); extern double __sin (double __x) throw (); extern double tan (double __x) throw (); extern double __tan (double __x) throw (); extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () ; extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); extern double exp (double __x) throw (); extern double __exp (double __x) throw (); extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); extern double log (double __x) throw (); extern double __log (double __x) throw (); extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); extern double logb (double __x) throw (); extern double __logb (double __x) throw (); extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); extern int __isinf (double __value) throw () __attribute__ ((__const__)); extern int __finite (double __value) throw () __attribute__ ((__const__)); extern int isinf (double __value) throw () __attribute__ ((__const__)); extern int finite (double __value) throw () __attribute__ ((__const__)); extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); extern double significand (double __x) throw (); extern double __significand (double __x) throw (); extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnan (double __value) throw () __attribute__ ((__const__)); extern int isnan (double __value) throw () __attribute__ ((__const__)); extern double j0 (double) throw (); extern double __j0 (double) throw (); extern double j1 (double) throw (); extern double __j1 (double) throw (); extern double jn (int, double) throw (); extern double __jn (int, double) throw (); extern double y0 (double) throw (); extern double __y0 (double) throw (); extern double y1 (double) throw (); extern double __y1 (double) throw (); extern double yn (int, double) throw (); extern double __yn (int, double) throw (); extern double erf (double) throw (); extern double __erf (double) throw (); extern double erfc (double) throw (); extern double __erfc (double) throw (); extern double lgamma (double) throw (); extern double __lgamma (double) throw (); extern double tgamma (double) throw (); extern double __tgamma (double) throw (); extern double gamma (double) throw (); extern double __gamma (double) throw (); extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); extern double rint (double __x) throw (); extern double __rint (double __x) throw (); extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); extern int __signbit (double __value) throw () __attribute__ ((__const__)); extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); # 72 "/usr/include/math.h" 2 3 4 # 94 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); extern void sincosf # 82 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf # 82 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 (float __x, float *__sinx, float *__cosx) throw () ; extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); extern float expf (float __x) throw (); extern float __expf (float __x) throw (); extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); extern float logf (float __x) throw (); extern float __logf (float __x) throw (); extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); extern int __isinff (float __value) throw () __attribute__ ((__const__)); extern int __finitef (float __value) throw () __attribute__ ((__const__)); extern int isinff (float __value) throw () __attribute__ ((__const__)); extern int finitef (float __value) throw () __attribute__ ((__const__)); extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanf (float __value) throw () __attribute__ ((__const__)); extern int isnanf (float __value) throw () __attribute__ ((__const__)); extern float j0f (float) throw (); extern float __j0f (float) throw (); extern float j1f (float) throw (); extern float __j1f (float) throw (); extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); extern float y0f (float) throw (); extern float __y0f (float) throw (); extern float y1f (float) throw (); extern float __y1f (float) throw (); extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); extern float erff (float) throw (); extern float __erff (float) throw (); extern float erfcf (float) throw (); extern float __erfcf (float) throw (); extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); extern float gammaf (float) throw (); extern float __gammaf (float) throw (); extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); extern int __signbitf (float __value) throw () __attribute__ ((__const__)); extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); # 95 "/usr/include/math.h" 2 3 4 # 145 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 # 53 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); extern void sincosl # 82 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl # 82 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 3 4 (long double __x, long double *__sinx, long double *__cosx) throw () ; extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); extern int __finitel (long double __value) throw () __attribute__ ((__const__)); extern int isinfl (long double __value) throw () __attribute__ ((__const__)); extern int finitel (long double __value) throw () __attribute__ ((__const__)); extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); extern int isnanl (long double __value) throw () __attribute__ ((__const__)); extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); extern int __signbitl (long double __value) throw () __attribute__ ((__const__)); extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); # 146 "/usr/include/math.h" 2 3 4 # 161 "/usr/include/math.h" 3 4 extern int signgam; # 202 "/usr/include/math.h" 3 4 enum { FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL }; # 295 "/usr/include/math.h" 3 4 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; # 318 "/usr/include/math.h" 3 4 struct __exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct __exception *__exc) throw (); # 420 "/usr/include/math.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/mathinline.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/mathinline.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/mathinline.h" 2 3 4 # 37 "/usr/include/x86_64-linux-gnu/bits/mathinline.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int __signbitf (float __x) throw () { int __m; __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); return __m & 0x8; } extern __inline __attribute__ ((__gnu_inline__)) int __signbit (double __x) throw () { int __m; __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); return __m & 0x80; } extern __inline __attribute__ ((__gnu_inline__)) int __signbitl (long double __x) throw () { __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; return (__u.__i[2] & 0x8000) != 0; } # 421 "/usr/include/math.h" 2 3 4 # 476 "/usr/include/math.h" 3 4 } # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 2 3 # 77 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { inline constexpr double abs(double __x) { return __builtin_fabs(__x); } inline constexpr float abs(float __x) { return __builtin_fabsf(__x); } inline constexpr long double abs(long double __x) { return __builtin_fabsl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type abs(_Tp __x) { return __builtin_fabs(__x); } using ::acos; inline constexpr float acos(float __x) { return __builtin_acosf(__x); } inline constexpr long double acos(long double __x) { return __builtin_acosl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acos(_Tp __x) { return __builtin_acos(__x); } using ::asin; inline constexpr float asin(float __x) { return __builtin_asinf(__x); } inline constexpr long double asin(long double __x) { return __builtin_asinl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asin(_Tp __x) { return __builtin_asin(__x); } using ::atan; inline constexpr float atan(float __x) { return __builtin_atanf(__x); } inline constexpr long double atan(long double __x) { return __builtin_atanl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atan(_Tp __x) { return __builtin_atan(__x); } using ::atan2; inline constexpr float atan2(float __y, float __x) { return __builtin_atan2f(__y, __x); } inline constexpr long double atan2(long double __y, long double __x) { return __builtin_atan2l(__y, __x); } template inline constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type atan2(_Tp __y, _Up __x) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return atan2(__type(__y), __type(__x)); } using ::ceil; inline constexpr float ceil(float __x) { return __builtin_ceilf(__x); } inline constexpr long double ceil(long double __x) { return __builtin_ceill(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ceil(_Tp __x) { return __builtin_ceil(__x); } using ::cos; inline constexpr float cos(float __x) { return __builtin_cosf(__x); } inline constexpr long double cos(long double __x) { return __builtin_cosl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cos(_Tp __x) { return __builtin_cos(__x); } using ::cosh; inline constexpr float cosh(float __x) { return __builtin_coshf(__x); } inline constexpr long double cosh(long double __x) { return __builtin_coshl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cosh(_Tp __x) { return __builtin_cosh(__x); } using ::exp; inline constexpr float exp(float __x) { return __builtin_expf(__x); } inline constexpr long double exp(long double __x) { return __builtin_expl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp(_Tp __x) { return __builtin_exp(__x); } using ::fabs; inline constexpr float fabs(float __x) { return __builtin_fabsf(__x); } inline constexpr long double fabs(long double __x) { return __builtin_fabsl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type fabs(_Tp __x) { return __builtin_fabs(__x); } using ::floor; inline constexpr float floor(float __x) { return __builtin_floorf(__x); } inline constexpr long double floor(long double __x) { return __builtin_floorl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type floor(_Tp __x) { return __builtin_floor(__x); } using ::fmod; inline constexpr float fmod(float __x, float __y) { return __builtin_fmodf(__x, __y); } inline constexpr long double fmod(long double __x, long double __y) { return __builtin_fmodl(__x, __y); } template inline constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmod(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmod(__type(__x), __type(__y)); } using ::frexp; inline float frexp(float __x, int* __exp) { return __builtin_frexpf(__x, __exp); } inline long double frexp(long double __x, int* __exp) { return __builtin_frexpl(__x, __exp); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type frexp(_Tp __x, int* __exp) { return __builtin_frexp(__x, __exp); } using ::ldexp; inline constexpr float ldexp(float __x, int __exp) { return __builtin_ldexpf(__x, __exp); } inline constexpr long double ldexp(long double __x, int __exp) { return __builtin_ldexpl(__x, __exp); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ldexp(_Tp __x, int __exp) { return __builtin_ldexp(__x, __exp); } using ::log; inline constexpr float log(float __x) { return __builtin_logf(__x); } inline constexpr long double log(long double __x) { return __builtin_logl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log(_Tp __x) { return __builtin_log(__x); } using ::log10; inline constexpr float log10(float __x) { return __builtin_log10f(__x); } inline constexpr long double log10(long double __x) { return __builtin_log10l(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log10(_Tp __x) { return __builtin_log10(__x); } using ::modf; inline float modf(float __x, float* __iptr) { return __builtin_modff(__x, __iptr); } inline long double modf(long double __x, long double* __iptr) { return __builtin_modfl(__x, __iptr); } using ::pow; inline constexpr float pow(float __x, float __y) { return __builtin_powf(__x, __y); } inline constexpr long double pow(long double __x, long double __y) { return __builtin_powl(__x, __y); } # 434 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 template inline constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type pow(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return pow(__type(__x), __type(__y)); } using ::sin; inline constexpr float sin(float __x) { return __builtin_sinf(__x); } inline constexpr long double sin(long double __x) { return __builtin_sinl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sin(_Tp __x) { return __builtin_sin(__x); } using ::sinh; inline constexpr float sinh(float __x) { return __builtin_sinhf(__x); } inline constexpr long double sinh(long double __x) { return __builtin_sinhl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sinh(_Tp __x) { return __builtin_sinh(__x); } using ::sqrt; inline constexpr float sqrt(float __x) { return __builtin_sqrtf(__x); } inline constexpr long double sqrt(long double __x) { return __builtin_sqrtl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sqrt(_Tp __x) { return __builtin_sqrt(__x); } using ::tan; inline constexpr float tan(float __x) { return __builtin_tanf(__x); } inline constexpr long double tan(long double __x) { return __builtin_tanl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tan(_Tp __x) { return __builtin_tan(__x); } using ::tanh; inline constexpr float tanh(float __x) { return __builtin_tanhf(__x); } inline constexpr long double tanh(long double __x) { return __builtin_tanhl(__x); } template inline constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tanh(_Tp __x) { return __builtin_tanh(__x); } } # 558 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { constexpr int fpclassify(float __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x); } constexpr int fpclassify(double __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x); } constexpr int fpclassify(long double __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type fpclassify(_Tp __x) { return __x != 0 ? FP_NORMAL : FP_ZERO; } constexpr bool isfinite(float __x) { return __builtin_isfinite(__x); } constexpr bool isfinite(double __x) { return __builtin_isfinite(__x); } constexpr bool isfinite(long double __x) { return __builtin_isfinite(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isfinite(_Tp __x) { return true; } constexpr bool isinf(float __x) { return __builtin_isinf(__x); } constexpr bool isinf(double __x) { return __builtin_isinf(__x); } constexpr bool isinf(long double __x) { return __builtin_isinf(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isinf(_Tp __x) { return false; } constexpr bool isnan(float __x) { return __builtin_isnan(__x); } constexpr bool isnan(double __x) { return __builtin_isnan(__x); } constexpr bool isnan(long double __x) { return __builtin_isnan(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnan(_Tp __x) { return false; } constexpr bool isnormal(float __x) { return __builtin_isnormal(__x); } constexpr bool isnormal(double __x) { return __builtin_isnormal(__x); } constexpr bool isnormal(long double __x) { return __builtin_isnormal(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type isnormal(_Tp __x) { return __x != 0 ? true : false; } constexpr bool signbit(float __x) { return __builtin_signbit(__x); } constexpr bool signbit(double __x) { return __builtin_signbit(__x); } constexpr bool signbit(long double __x) { return __builtin_signbit(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, bool>::__type signbit(_Tp __x) { return __x < 0 ? true : false; } constexpr bool isgreater(float __x, float __y) { return __builtin_isgreater(__x, __y); } constexpr bool isgreater(double __x, double __y) { return __builtin_isgreater(__x, __y); } constexpr bool isgreater(long double __x, long double __y) { return __builtin_isgreater(__x, __y); } template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isgreater(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreater(__type(__x), __type(__y)); } constexpr bool isgreaterequal(float __x, float __y) { return __builtin_isgreaterequal(__x, __y); } constexpr bool isgreaterequal(double __x, double __y) { return __builtin_isgreaterequal(__x, __y); } constexpr bool isgreaterequal(long double __x, long double __y) { return __builtin_isgreaterequal(__x, __y); } template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isgreaterequal(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isgreaterequal(__type(__x), __type(__y)); } constexpr bool isless(float __x, float __y) { return __builtin_isless(__x, __y); } constexpr bool isless(double __x, double __y) { return __builtin_isless(__x, __y); } constexpr bool isless(long double __x, long double __y) { return __builtin_isless(__x, __y); } template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isless(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isless(__type(__x), __type(__y)); } constexpr bool islessequal(float __x, float __y) { return __builtin_islessequal(__x, __y); } constexpr bool islessequal(double __x, double __y) { return __builtin_islessequal(__x, __y); } constexpr bool islessequal(long double __x, long double __y) { return __builtin_islessequal(__x, __y); } template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type islessequal(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessequal(__type(__x), __type(__y)); } constexpr bool islessgreater(float __x, float __y) { return __builtin_islessgreater(__x, __y); } constexpr bool islessgreater(double __x, double __y) { return __builtin_islessgreater(__x, __y); } constexpr bool islessgreater(long double __x, long double __y) { return __builtin_islessgreater(__x, __y); } template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type islessgreater(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_islessgreater(__type(__x), __type(__y)); } constexpr bool isunordered(float __x, float __y) { return __builtin_isunordered(__x, __y); } constexpr bool isunordered(double __x, double __y) { return __builtin_isunordered(__x, __y); } constexpr bool isunordered(long double __x, long double __y) { return __builtin_isunordered(__x, __y); } template constexpr typename __gnu_cxx::__enable_if<(__is_arithmetic<_Tp>::__value && __is_arithmetic<_Up>::__value), bool>::__type isunordered(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return __builtin_isunordered(__type(__x), __type(__y)); } # 919 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 } # 1035 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::double_t; using ::float_t; using ::acosh; using ::acoshf; using ::acoshl; using ::asinh; using ::asinhf; using ::asinhl; using ::atanh; using ::atanhf; using ::atanhl; using ::cbrt; using ::cbrtf; using ::cbrtl; using ::copysign; using ::copysignf; using ::copysignl; using ::erf; using ::erff; using ::erfl; using ::erfc; using ::erfcf; using ::erfcl; using ::exp2; using ::exp2f; using ::exp2l; using ::expm1; using ::expm1f; using ::expm1l; using ::fdim; using ::fdimf; using ::fdiml; using ::fma; using ::fmaf; using ::fmal; using ::fmax; using ::fmaxf; using ::fmaxl; using ::fmin; using ::fminf; using ::fminl; using ::hypot; using ::hypotf; using ::hypotl; using ::ilogb; using ::ilogbf; using ::ilogbl; using ::lgamma; using ::lgammaf; using ::lgammal; using ::llrint; using ::llrintf; using ::llrintl; using ::llround; using ::llroundf; using ::llroundl; using ::log1p; using ::log1pf; using ::log1pl; using ::log2; using ::log2f; using ::log2l; using ::logb; using ::logbf; using ::logbl; using ::lrint; using ::lrintf; using ::lrintl; using ::lround; using ::lroundf; using ::lroundl; using ::nan; using ::nanf; using ::nanl; using ::nearbyint; using ::nearbyintf; using ::nearbyintl; using ::nextafter; using ::nextafterf; using ::nextafterl; using ::nexttoward; using ::nexttowardf; using ::nexttowardl; using ::remainder; using ::remainderf; using ::remainderl; using ::remquo; using ::remquof; using ::remquol; using ::rint; using ::rintf; using ::rintl; using ::round; using ::roundf; using ::roundl; using ::scalbln; using ::scalblnf; using ::scalblnl; using ::scalbn; using ::scalbnf; using ::scalbnl; using ::tgamma; using ::tgammaf; using ::tgammal; using ::trunc; using ::truncf; using ::truncl; constexpr float acosh(float __x) { return __builtin_acoshf(__x); } constexpr long double acosh(long double __x) { return __builtin_acoshl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acosh(_Tp __x) { return __builtin_acosh(__x); } constexpr float asinh(float __x) { return __builtin_asinhf(__x); } constexpr long double asinh(long double __x) { return __builtin_asinhl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asinh(_Tp __x) { return __builtin_asinh(__x); } constexpr float atanh(float __x) { return __builtin_atanhf(__x); } constexpr long double atanh(long double __x) { return __builtin_atanhl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atanh(_Tp __x) { return __builtin_atanh(__x); } constexpr float cbrt(float __x) { return __builtin_cbrtf(__x); } constexpr long double cbrt(long double __x) { return __builtin_cbrtl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cbrt(_Tp __x) { return __builtin_cbrt(__x); } constexpr float copysign(float __x, float __y) { return __builtin_copysignf(__x, __y); } constexpr long double copysign(long double __x, long double __y) { return __builtin_copysignl(__x, __y); } template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type copysign(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return copysign(__type(__x), __type(__y)); } constexpr float erf(float __x) { return __builtin_erff(__x); } constexpr long double erf(long double __x) { return __builtin_erfl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erf(_Tp __x) { return __builtin_erf(__x); } constexpr float erfc(float __x) { return __builtin_erfcf(__x); } constexpr long double erfc(long double __x) { return __builtin_erfcl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type erfc(_Tp __x) { return __builtin_erfc(__x); } constexpr float exp2(float __x) { return __builtin_exp2f(__x); } constexpr long double exp2(long double __x) { return __builtin_exp2l(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp2(_Tp __x) { return __builtin_exp2(__x); } constexpr float expm1(float __x) { return __builtin_expm1f(__x); } constexpr long double expm1(long double __x) { return __builtin_expm1l(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type expm1(_Tp __x) { return __builtin_expm1(__x); } constexpr float fdim(float __x, float __y) { return __builtin_fdimf(__x, __y); } constexpr long double fdim(long double __x, long double __y) { return __builtin_fdiml(__x, __y); } template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fdim(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fdim(__type(__x), __type(__y)); } constexpr float fma(float __x, float __y, float __z) { return __builtin_fmaf(__x, __y, __z); } constexpr long double fma(long double __x, long double __y, long double __z) { return __builtin_fmal(__x, __y, __z); } template constexpr typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type fma(_Tp __x, _Up __y, _Vp __z) { typedef typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type __type; return fma(__type(__x), __type(__y), __type(__z)); } constexpr float fmax(float __x, float __y) { return __builtin_fmaxf(__x, __y); } constexpr long double fmax(long double __x, long double __y) { return __builtin_fmaxl(__x, __y); } template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmax(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmax(__type(__x), __type(__y)); } constexpr float fmin(float __x, float __y) { return __builtin_fminf(__x, __y); } constexpr long double fmin(long double __x, long double __y) { return __builtin_fminl(__x, __y); } template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type fmin(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return fmin(__type(__x), __type(__y)); } constexpr float hypot(float __x, float __y) { return __builtin_hypotf(__x, __y); } constexpr long double hypot(long double __x, long double __y) { return __builtin_hypotl(__x, __y); } template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type hypot(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return hypot(__type(__x), __type(__y)); } constexpr int ilogb(float __x) { return __builtin_ilogbf(__x); } constexpr int ilogb(long double __x) { return __builtin_ilogbl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, int>::__type ilogb(_Tp __x) { return __builtin_ilogb(__x); } constexpr float lgamma(float __x) { return __builtin_lgammaf(__x); } constexpr long double lgamma(long double __x) { return __builtin_lgammal(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type lgamma(_Tp __x) { return __builtin_lgamma(__x); } constexpr long long llrint(float __x) { return __builtin_llrintf(__x); } constexpr long long llrint(long double __x) { return __builtin_llrintl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llrint(_Tp __x) { return __builtin_llrint(__x); } constexpr long long llround(float __x) { return __builtin_llroundf(__x); } constexpr long long llround(long double __x) { return __builtin_llroundl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long long>::__type llround(_Tp __x) { return __builtin_llround(__x); } constexpr float log1p(float __x) { return __builtin_log1pf(__x); } constexpr long double log1p(long double __x) { return __builtin_log1pl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log1p(_Tp __x) { return __builtin_log1p(__x); } constexpr float log2(float __x) { return __builtin_log2f(__x); } constexpr long double log2(long double __x) { return __builtin_log2l(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log2(_Tp __x) { return __builtin_log2(__x); } constexpr float logb(float __x) { return __builtin_logbf(__x); } constexpr long double logb(long double __x) { return __builtin_logbl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type logb(_Tp __x) { return __builtin_logb(__x); } constexpr long lrint(float __x) { return __builtin_lrintf(__x); } constexpr long lrint(long double __x) { return __builtin_lrintl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lrint(_Tp __x) { return __builtin_lrint(__x); } constexpr long lround(float __x) { return __builtin_lroundf(__x); } constexpr long lround(long double __x) { return __builtin_lroundl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, long>::__type lround(_Tp __x) { return __builtin_lround(__x); } constexpr float nearbyint(float __x) { return __builtin_nearbyintf(__x); } constexpr long double nearbyint(long double __x) { return __builtin_nearbyintl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nearbyint(_Tp __x) { return __builtin_nearbyint(__x); } constexpr float nextafter(float __x, float __y) { return __builtin_nextafterf(__x, __y); } constexpr long double nextafter(long double __x, long double __y) { return __builtin_nextafterl(__x, __y); } template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type nextafter(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return nextafter(__type(__x), __type(__y)); } constexpr float nexttoward(float __x, long double __y) { return __builtin_nexttowardf(__x, __y); } constexpr long double nexttoward(long double __x, long double __y) { return __builtin_nexttowardl(__x, __y); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type nexttoward(_Tp __x, long double __y) { return __builtin_nexttoward(__x, __y); } constexpr float remainder(float __x, float __y) { return __builtin_remainderf(__x, __y); } constexpr long double remainder(long double __x, long double __y) { return __builtin_remainderl(__x, __y); } template constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remainder(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remainder(__type(__x), __type(__y)); } inline float remquo(float __x, float __y, int* __pquo) { return __builtin_remquof(__x, __y, __pquo); } inline long double remquo(long double __x, long double __y, int* __pquo) { return __builtin_remquol(__x, __y, __pquo); } template inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type remquo(_Tp __x, _Up __y, int* __pquo) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return remquo(__type(__x), __type(__y), __pquo); } constexpr float rint(float __x) { return __builtin_rintf(__x); } constexpr long double rint(long double __x) { return __builtin_rintl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type rint(_Tp __x) { return __builtin_rint(__x); } constexpr float round(float __x) { return __builtin_roundf(__x); } constexpr long double round(long double __x) { return __builtin_roundl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type round(_Tp __x) { return __builtin_round(__x); } constexpr float scalbln(float __x, long __ex) { return __builtin_scalblnf(__x, __ex); } constexpr long double scalbln(long double __x, long __ex) { return __builtin_scalblnl(__x, __ex); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbln(_Tp __x, long __ex) { return __builtin_scalbln(__x, __ex); } constexpr float scalbn(float __x, int __ex) { return __builtin_scalbnf(__x, __ex); } constexpr long double scalbn(long double __x, int __ex) { return __builtin_scalbnl(__x, __ex); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type scalbn(_Tp __x, int __ex) { return __builtin_scalbn(__x, __ex); } constexpr float tgamma(float __x) { return __builtin_tgammaf(__x); } constexpr long double tgamma(long double __x) { return __builtin_tgammal(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tgamma(_Tp __x) { return __builtin_tgamma(__x); } constexpr float trunc(float __x) { return __builtin_truncf(__x); } constexpr long double trunc(long double __x) { return __builtin_truncl(__x); } template constexpr typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type trunc(_Tp __x) { return __builtin_trunc(__x); } } # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 1 "/usr/include/stdio.h" 1 3 4 # 30 "/usr/include/stdio.h" 3 4 extern "C" { # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 35 "/usr/include/stdio.h" 2 3 4 # 45 "/usr/include/stdio.h" 3 4 struct _IO_FILE; typedef struct _IO_FILE FILE; # 65 "/usr/include/stdio.h" 3 4 typedef struct _IO_FILE __FILE; # 75 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/libio.h" 1 3 4 # 32 "/usr/include/libio.h" 3 4 # 1 "/usr/include/_G_config.h" 1 3 4 # 15 "/usr/include/_G_config.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 16 "/usr/include/_G_config.h" 2 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 83 "/usr/include/wchar.h" 3 4 typedef struct { int __count; union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; # 21 "/usr/include/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; # 53 "/usr/include/_G_config.h" 3 4 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); # 33 "/usr/include/libio.h" 2 3 4 # 53 "/usr/include/libio.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stdarg.h" 1 3 4 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 54 "/usr/include/libio.h" 2 3 4 # 170 "/usr/include/libio.h" 3 4 struct _IO_jump_t; struct _IO_FILE; # 180 "/usr/include/libio.h" 3 4 typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 203 "/usr/include/libio.h" 3 4 }; enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; # 271 "/usr/include/libio.h" 3 4 struct _IO_FILE { int _flags; char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _flags2; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; # 319 "/usr/include/libio.h" 3 4 __off64_t _offset; # 328 "/usr/include/libio.h" 3 4 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; int _mode; char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; }; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; # 364 "/usr/include/libio.h" 3 4 typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, size_t __n); typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); typedef int __io_close_fn (void *__cookie); typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; typedef struct { __io_read_fn *read; __io_write_fn *write; __io_seek_fn *seek; __io_close_fn *close; } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); extern "C" { extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); # 460 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); extern int _IO_peekc_locked (_IO_FILE *__fp); extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); # 490 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) throw (); # 552 "/usr/include/libio.h" 3 4 } # 76 "/usr/include/stdio.h" 2 3 4 typedef __gnuc_va_list va_list; # 109 "/usr/include/stdio.h" 3 4 typedef _G_fpos_t fpos_t; typedef _G_fpos64_t fpos64_t; # 161 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 # 162 "/usr/include/stdio.h" 2 3 4 extern struct _IO_FILE *stdin; extern struct _IO_FILE *stdout; extern struct _IO_FILE *stderr; extern int remove (__const char *__filename) throw (); extern int rename (__const char *__old, __const char *__new) throw (); extern int renameat (int __oldfd, __const char *__old, int __newfd, __const char *__new) throw (); extern FILE *tmpfile (void) ; # 202 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void) ; extern char *tmpnam (char *__s) throw () ; extern char *tmpnam_r (char *__s) throw () ; # 224 "/usr/include/stdio.h" 3 4 extern char *tempnam (__const char *__dir, __const char *__pfx) throw () __attribute__ ((__malloc__)) ; extern int fclose (FILE *__stream); extern int fflush (FILE *__stream); # 249 "/usr/include/stdio.h" 3 4 extern int fflush_unlocked (FILE *__stream); # 259 "/usr/include/stdio.h" 3 4 extern int fcloseall (void); extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) ; extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) ; # 292 "/usr/include/stdio.h" 3 4 extern FILE *fopen64 (__const char *__restrict __filename, __const char *__restrict __modes) ; extern FILE *freopen64 (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) ; extern FILE *fdopen (int __fd, __const char *__modes) throw () ; extern FILE *fopencookie (void *__restrict __magic_cookie, __const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw () ; extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) throw () ; extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); extern void setlinebuf (FILE *__stream) throw (); extern int fprintf (FILE *__restrict __stream, __const char *__restrict __format, ...); extern int printf (__const char *__restrict __format, ...); extern int sprintf (char *__restrict __s, __const char *__restrict __format, ...) throw (); extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg); extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); extern int vsprintf (char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw (); extern int snprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; extern int __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; extern int asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; # 414 "/usr/include/stdio.h" 3 4 extern int vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, __const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int fscanf (FILE *__restrict __stream, __const char *__restrict __format, ...) ; extern int scanf (__const char *__restrict __format, ...) ; extern int sscanf (__const char *__restrict __s, __const char *__restrict __format, ...) throw (); # 465 "/usr/include/stdio.h" 3 4 extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) ; extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) ; extern int vsscanf (__const char *__restrict __s, __const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); # 524 "/usr/include/stdio.h" 3 4 extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); extern int getchar (void); # 552 "/usr/include/stdio.h" 3 4 extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); # 563 "/usr/include/stdio.h" 3 4 extern int fgetc_unlocked (FILE *__stream); extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); extern int putchar (int __c); # 596 "/usr/include/stdio.h" 3 4 extern int fputc_unlocked (int __c, FILE *__stream); extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); extern int getw (FILE *__stream); extern int putw (int __w, FILE *__stream); extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) ; extern char *gets (char *__s) ; # 642 "/usr/include/stdio.h" 3 4 extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) ; # 658 "/usr/include/stdio.h" 3 4 extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) ; extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) ; extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); extern int puts (__const char *__s); extern int ungetc (int __c, FILE *__stream); extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); # 719 "/usr/include/stdio.h" 3 4 extern int fputs_unlocked (__const char *__restrict __s, FILE *__restrict __stream); # 730 "/usr/include/stdio.h" 3 4 extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) ; extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); extern int fseek (FILE *__stream, long int __off, int __whence); extern long int ftell (FILE *__stream) ; extern void rewind (FILE *__stream); # 766 "/usr/include/stdio.h" 3 4 extern int fseeko (FILE *__stream, __off_t __off, int __whence); extern __off_t ftello (FILE *__stream) ; # 785 "/usr/include/stdio.h" 3 4 extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); extern int fsetpos (FILE *__stream, __const fpos_t *__pos); # 808 "/usr/include/stdio.h" 3 4 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) ; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); extern void clearerr (FILE *__stream) throw (); extern int feof (FILE *__stream) throw () ; extern int ferror (FILE *__stream) throw () ; extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw () ; extern int ferror_unlocked (FILE *__stream) throw () ; extern void perror (__const char *__s); # 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 extern int sys_nerr; extern __const char *__const sys_errlist[]; extern int _sys_nerr; extern __const char *__const _sys_errlist[]; # 847 "/usr/include/stdio.h" 2 3 4 extern int fileno (FILE *__stream) throw () ; extern int fileno_unlocked (FILE *__stream) throw () ; # 866 "/usr/include/stdio.h" 3 4 extern FILE *popen (__const char *__command, __const char *__modes) ; extern int pclose (FILE *__stream); extern char *ctermid (char *__s) throw (); extern char *cuserid (char *__s); struct obstack; extern int obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); extern void flockfile (FILE *__stream) throw (); extern int ftrylockfile (FILE *__stream) throw () ; extern void funlockfile (FILE *__stream) throw (); # 927 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 1 3 4 # 36 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4 extern __inline __attribute__ ((__gnu_inline__)) int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } extern __inline __attribute__ ((__gnu_inline__)) int getchar (void) { return _IO_getc (stdin); } extern __inline __attribute__ ((__gnu_inline__)) int fgetc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getc_unlocked (FILE *__fp) { return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int getchar_unlocked (void) { return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); } extern __inline __attribute__ ((__gnu_inline__)) int putchar (int __c) { return _IO_putc (__c, stdout); } extern __inline __attribute__ ((__gnu_inline__)) int fputc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putc_unlocked (int __c, FILE *__stream) { return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) int putchar_unlocked (int __c) { return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); } extern __inline __attribute__ ((__gnu_inline__)) __ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } extern __inline __attribute__ ((__gnu_inline__)) int feof_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x10) != 0); } extern __inline __attribute__ ((__gnu_inline__)) int ferror_unlocked (FILE *__stream) throw () { return (((__stream)->_flags & 0x20) != 0); } # 928 "/usr/include/stdio.h" 2 3 4 # 936 "/usr/include/stdio.h" 3 4 } # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 2 3 # 92 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 namespace std { using ::FILE; using ::fpos_t; using ::clearerr; using ::fclose; using ::feof; using ::ferror; using ::fflush; using ::fgetc; using ::fgetpos; using ::fgets; using ::fopen; using ::fprintf; using ::fputc; using ::fputs; using ::fread; using ::freopen; using ::fscanf; using ::fseek; using ::fsetpos; using ::ftell; using ::fwrite; using ::getc; using ::getchar; using ::gets; using ::perror; using ::printf; using ::putc; using ::putchar; using ::puts; using ::remove; using ::rename; using ::rewind; using ::scanf; using ::setbuf; using ::setvbuf; using ::sprintf; using ::sscanf; using ::tmpfile; using ::tmpnam; using ::ungetc; using ::vfprintf; using ::vprintf; using ::vsprintf; } # 148 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 namespace __gnu_cxx { # 166 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 using ::snprintf; using ::vfscanf; using ::vscanf; using ::vsnprintf; using ::vsscanf; } namespace std { using ::__gnu_cxx::snprintf; using ::__gnu_cxx::vfscanf; using ::__gnu_cxx::vscanf; using ::__gnu_cxx::vsnprintf; using ::__gnu_cxx::vsscanf; } # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stringfwd.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stringfwd.h" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stringfwd.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class allocator; template struct char_traits; template, typename _Alloc = allocator<_CharT> > class basic_string; template<> struct char_traits; typedef basic_string string; template<> struct char_traits; typedef basic_string wstring; template<> struct char_traits; template<> struct char_traits; typedef basic_string u16string; typedef basic_string u32string; } # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 1 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 1 "/usr/include/wchar.h" 1 3 4 # 40 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stdarg.h" 1 3 4 # 41 "/usr/include/wchar.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 # 43 "/usr/include/wchar.h" 2 3 4 # 52 "/usr/include/wchar.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 353 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 3 4 typedef unsigned int wint_t; # 53 "/usr/include/wchar.h" 2 3 4 # 104 "/usr/include/wchar.h" 3 4 typedef __mbstate_t mbstate_t; # 129 "/usr/include/wchar.h" 3 4 extern "C" { struct tm; extern wchar_t *wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw (); extern wchar_t *wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); extern wchar_t *wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw (); extern wchar_t *wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) throw () __attribute__ ((__pure__)); extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __attribute__ ((__pure__)); extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw (); extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) throw (); extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) throw (); extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); extern size_t wcsxfrm (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw (); extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, __locale_t __loc) throw (); extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, size_t __n, __locale_t __loc) throw (); extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcschr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcschr") __attribute__ ((__pure__)); extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcsrchr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) throw () __asm ("wcsrchr") __attribute__ ((__pure__)); extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) throw () __attribute__ ((__pure__)); extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) throw () __attribute__ ((__pure__)); extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) throw () __attribute__ ((__pure__)); extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) throw () __asm ("wcspbrk") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept) throw () __asm ("wcspbrk") __attribute__ ((__pure__)); extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcsstr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcsstr") __attribute__ ((__pure__)); extern wchar_t *wcstok (wchar_t *__restrict __s, __const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) throw (); extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcswcs") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) throw () __asm ("wcswcs") __attribute__ ((__pure__)); # 303 "/usr/include/wchar.h" 3 4 extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) throw () __attribute__ ((__pure__)); extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm ("wmemchr") __attribute__ ((__pure__)); extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n) throw () __asm ("wmemchr") __attribute__ ((__pure__)); extern int wmemcmp (__const wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __attribute__ ((__pure__)); extern wchar_t *wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw (); extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw (); extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); extern wchar_t *wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw (); extern wint_t btowc (int __c) throw (); extern int wctob (wint_t __c) throw (); extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); extern size_t mbrtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n, mbstate_t *__p) throw (); extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) throw (); extern size_t __mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); extern size_t mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); extern wint_t __btowc_alias (int __c) __asm ("btowc"); extern __inline __attribute__ ((__gnu_inline__)) wint_t btowc (int __c) throw () { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' ? (wint_t) __c : __btowc_alias (__c)); } extern int __wctob_alias (wint_t __c) __asm ("wctob"); extern __inline __attribute__ ((__gnu_inline__)) int wctob (wint_t __wc) throw () { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' ? (int) __wc : __wctob_alias (__wc)); } extern __inline __attribute__ ((__gnu_inline__)) size_t mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () { return (__ps != __null ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } extern size_t mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw (); extern size_t wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw (); extern int wcwidth (wchar_t __c) throw (); extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); extern double wcstod (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern float wcstof (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern long double wcstold (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern long int wcstol (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern long long int wcstoll (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern long long int wcstoq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); __extension__ extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); # 528 "/usr/include/wchar.h" 3 4 extern long int wcstol_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); __extension__ extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); __extension__ extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); extern double wcstod_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); extern float wcstof_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); extern long double wcstold_l (__const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); extern wchar_t *wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw (); extern wchar_t *wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw (); # 578 "/usr/include/wchar.h" 3 4 extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); extern int fwide (__FILE *__fp, int __mode) throw (); extern int fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __format, ...) ; extern int wprintf (__const wchar_t *__restrict __format, ...) ; extern int swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __format, ...) throw () ; extern int vfwprintf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwprintf (__const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () ; extern int fwscanf (__FILE *__restrict __stream, __const wchar_t *__restrict __format, ...) ; extern int wscanf (__const wchar_t *__restrict __format, ...) ; extern int swscanf (__const wchar_t *__restrict __s, __const wchar_t *__restrict __format, ...) throw () ; # 678 "/usr/include/wchar.h" 3 4 extern int vfwscanf (__FILE *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vwscanf (__const wchar_t *__restrict __format, __gnuc_va_list __arg) ; extern int vswscanf (__const wchar_t *__restrict __s, __const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () ; # 734 "/usr/include/wchar.h" 3 4 extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); extern wint_t getwchar (void); extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); extern wint_t putwchar (wchar_t __wc); extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws (__const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern wint_t ungetwc (wint_t __wc, __FILE *__stream); # 799 "/usr/include/wchar.h" 3 4 extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); extern wint_t fgetwc_unlocked (__FILE *__stream); extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); # 825 "/usr/include/wchar.h" 3 4 extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); # 835 "/usr/include/wchar.h" 3 4 extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); extern int fputws_unlocked (__const wchar_t *__restrict __ws, __FILE *__restrict __stream); extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, __const wchar_t *__restrict __format, __const struct tm *__restrict __tp) throw (); extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, __const wchar_t *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) throw (); # 889 "/usr/include/wchar.h" 3 4 } # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 2 3 # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 namespace std { using ::mbstate_t; } # 137 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::wint_t; using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; using ::fputws; using ::fwide; using ::fwprintf; using ::fwscanf; using ::getwc; using ::getwchar; using ::mbrlen; using ::mbrtowc; using ::mbsinit; using ::mbsrtowcs; using ::putwc; using ::putwchar; using ::swprintf; using ::swscanf; using ::ungetwc; using ::vfwprintf; using ::vfwscanf; using ::vswprintf; using ::vswscanf; using ::vwprintf; using ::vwscanf; using ::wcrtomb; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wcsrtombs; using ::wcsspn; using ::wcstod; using ::wcstof; using ::wcstok; using ::wcstol; using ::wcstoul; using ::wcsxfrm; using ::wctob; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wprintf; using ::wscanf; using ::wcschr; using ::wcspbrk; using ::wcsrchr; using ::wcsstr; using ::wmemchr; # 234 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 } namespace __gnu_cxx { using ::wcstold; # 259 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 using ::wcstoll; using ::wcstoull; } namespace std { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } # 279 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 namespace std { using std::wcstof; using std::vfwscanf; using std::vswscanf; using std::vwscanf; using std::wcstold; using std::wcstoll; using std::wcstoull; } # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 2 3 # 70 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 90 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 3 typedef long streamoff; # 100 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 3 typedef ptrdiff_t streamsize; # 113 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 3 template class fpos { private: streamoff _M_off; _StateT _M_state; public: fpos() : _M_off(0), _M_state() { } # 135 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/postypes.h" 3 fpos(streamoff __off) : _M_off(__off), _M_state() { } operator streamoff() const { return _M_off; } void state(_StateT __st) { _M_state = __st; } _StateT state() const { return _M_state; } fpos& operator+=(streamoff __off) { _M_off += __off; return *this; } fpos& operator-=(streamoff __off) { _M_off -= __off; return *this; } fpos operator+(streamoff __off) const { fpos __pos(*this); __pos += __off; return __pos; } fpos operator-(streamoff __off) const { fpos __pos(*this); __pos -= __off; return __pos; } streamoff operator-(const fpos& __other) const { return _M_off - __other._M_off; } }; template inline bool operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) == streamoff(__rhs); } template inline bool operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) != streamoff(__rhs); } typedef fpos streampos; typedef fpos wstreampos; typedef fpos u16streampos; typedef fpos u32streampos; } # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 1 "/usr/include/wchar.h" 1 3 4 # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 2 3 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 3 template struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; # 84 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 3 template struct char_traits { typedef _CharT char_type; typedef typename _Char_types<_CharT>::int_type int_type; typedef typename _Char_types<_CharT>::pos_type pos_type; typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); static std::size_t length(const char_type* __s); static const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); static char_type* assign(char_type* __s, std::size_t __n, char_type __a); static constexpr char_type to_char_type(const int_type& __c) { return static_cast(__c); } static constexpr int_type to_int_type(const char_type& __c) { return static_cast(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static constexpr int_type eof() { return static_cast(-1); } static constexpr int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; template int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (std::size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } template std::size_t char_traits<_CharT>:: length(const char_type* __p) { std::size_t __i = 0; while (!eq(__p[__i], char_type())) ++__i; return __i; } template const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { for (std::size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))); } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: copy(char_type* __s1, const char_type* __s2, std::size_t __n) { std::copy(__s2, __s2 + __n, __s1); return __s1; } template typename char_traits<_CharT>::char_type* char_traits<_CharT>:: assign(char_type* __s, std::size_t __n, char_type __a) { std::fill_n(__s, __n, __a); return __s; } } namespace std __attribute__ ((__visibility__ ("default"))) { # 228 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 3 template struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; template<> struct char_traits { typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return __builtin_memcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return __builtin_strlen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return static_cast(__builtin_memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(__builtin_memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return static_cast(__builtin_memset(__s, __a, __n)); } static constexpr char_type to_char_type(const int_type& __c) noexcept { return static_cast(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return static_cast(static_cast(__c)); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return (__c == eof()) ? 0 : __c; } }; template<> struct char_traits { typedef wchar_t char_type; typedef wint_t int_type; typedef streamoff off_type; typedef wstreampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return wmemcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return wcslen(__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return wmemchr(__s, __a, __n); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return wmemmove(__s1, __s2, __n); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return wmemcpy(__s1, __s2, __n); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return wmemset(__s, __a, __n); } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast((0xffffffffu)); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdint" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdint" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdint" 3 # 50 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdint" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stdint.h" 1 3 4 # 1 "/usr/include/stdint.h" 1 3 4 # 28 "/usr/include/stdint.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 29 "/usr/include/stdint.h" 2 3 4 # 49 "/usr/include/stdint.h" 3 4 typedef unsigned char uint8_t; typedef unsigned short int uint16_t; typedef unsigned int uint32_t; typedef unsigned long int uint64_t; # 66 "/usr/include/stdint.h" 3 4 typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; typedef long int int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned long int uint_least64_t; # 91 "/usr/include/stdint.h" 3 4 typedef signed char int_fast8_t; typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; # 104 "/usr/include/stdint.h" 3 4 typedef unsigned char uint_fast8_t; typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; # 123 "/usr/include/stdint.h" 3 4 typedef unsigned long int uintptr_t; # 135 "/usr/include/stdint.h" 3 4 typedef long int intmax_t; typedef unsigned long int uintmax_t; # 4 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stdint.h" 2 3 4 # 51 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdint" 2 3 # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdint" 3 namespace std { using ::int8_t; using ::int16_t; using ::int32_t; using ::int64_t; using ::int_fast8_t; using ::int_fast16_t; using ::int_fast32_t; using ::int_fast64_t; using ::int_least8_t; using ::int_least16_t; using ::int_least32_t; using ::int_least64_t; using ::intmax_t; using ::intptr_t; using ::uint8_t; using ::uint16_t; using ::uint32_t; using ::uint64_t; using ::uint_fast8_t; using ::uint_fast16_t; using ::uint_fast32_t; using ::uint_fast64_t; using ::uint_least8_t; using ::uint_least16_t; using ::uint_least32_t; using ::uint_least64_t; using ::uintmax_t; using ::uintptr_t; } # 379 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/char_traits.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<> struct char_traits { typedef char16_t char_type; typedef uint_least16_t int_type; typedef streamoff off_type; typedef u16streampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; template<> struct char_traits { typedef char32_t char_type; typedef uint_least32_t int_type; typedef streamoff off_type; typedef u32streampos pos_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) noexcept { __c1 = __c2; } static constexpr bool eq(const char_type& __c1, const char_type& __c2) noexcept { return __c1 == __c2; } static constexpr bool lt(const char_type& __c1, const char_type& __c2) noexcept { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { for (size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } static size_t length(const char_type* __s) { size_t __i = 0; while (!eq(__s[__i], char_type())) ++__i; return __i; } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { for (size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast (__builtin_memmove(__s1, __s2, __n * sizeof(char_type)))); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return (static_cast (__builtin_memcpy(__s1, __s2, __n * sizeof(char_type)))); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { for (size_t __i = 0; __i < __n; ++__i) assign(__s[__i], __a); return __s; } static constexpr char_type to_char_type(const int_type& __c) noexcept { return char_type(__c); } static constexpr int_type to_int_type(const char_type& __c) noexcept { return int_type(__c); } static constexpr bool eq_int_type(const int_type& __c1, const int_type& __c2) noexcept { return __c1 == __c2; } static constexpr int_type eof() noexcept { return static_cast(-1); } static constexpr int_type not_eof(const int_type& __c) noexcept { return eq_int_type(__c, eof()) ? 0 : __c; } }; } # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/allocator.h" 1 3 # 48 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/allocator.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++allocator.h" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++allocator.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/new_allocator.h" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/new_allocator.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { using std::size_t; using std::ptrdiff_t; # 53 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/new_allocator.h" 3 template class new_allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template struct rebind { typedef new_allocator<_Tp1> other; }; new_allocator() noexcept { } new_allocator(const new_allocator&) noexcept { } template new_allocator(const new_allocator<_Tp1>&) noexcept { } ~new_allocator() noexcept { } pointer address(reference __x) const noexcept { return std::__addressof(__x); } const_pointer address(const_reference __x) const noexcept { return std::__addressof(__x); } pointer allocate(size_type __n, const void* = 0) { if (__n > this->max_size()) std::__throw_bad_alloc(); return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } void deallocate(pointer __p, size_type) { ::operator delete(__p); } size_type max_size() const noexcept { return size_t(-1) / sizeof(_Tp); } template void construct(_Up* __p, _Args&&... __args) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } template void destroy(_Up* __p) { __p->~_Up(); } # 125 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/new_allocator.h" 3 }; template inline bool operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return true; } template inline bool operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return false; } } # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++allocator.h" 2 3 # 49 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/allocator.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/allocator.h" 3 template class allocator; template<> class allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { typedef allocator<_Tp1> other; }; }; template class allocator: public __gnu_cxx::new_allocator<_Tp> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; template struct rebind { typedef allocator<_Tp1> other; }; allocator() throw() { } allocator(const allocator& __a) throw() : __gnu_cxx::new_allocator<_Tp>(__a) { } template allocator(const allocator<_Tp1>&) throw() { } ~allocator() throw() { } }; template inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) { return true; } template inline bool operator==(const allocator<_Tp>&, const allocator<_Tp>&) { return true; } template inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) { return false; } template inline bool operator!=(const allocator<_Tp>&, const allocator<_Tp>&) { return false; } # 144 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/allocator.h" 3 extern template class allocator; extern template class allocator; template struct __alloc_swap { static void _S_do_it(_Alloc&, _Alloc&) { } }; template struct __alloc_swap<_Alloc, false> { static void _S_do_it(_Alloc& __one, _Alloc& __two) { if (__one != __two) swap(__one, __two); } }; template struct __alloc_neq { static bool _S_do_it(const _Alloc&, const _Alloc&) { return false; } }; template struct __alloc_neq<_Alloc, false> { static bool _S_do_it(const _Alloc& __one, const _Alloc& __two) { return __one != __two; } }; template, is_nothrow_move_constructible>::value> struct __shrink_to_fit_aux { static bool _S_do_it(_Tp&) { return false; } }; template struct __shrink_to_fit_aux<_Tp, true> { static bool _S_do_it(_Tp& __c) { try { _Tp(__make_move_if_noexcept_iterator(__c.begin()), __make_move_if_noexcept_iterator(__c.end()), __c.get_allocator()).swap(__c); return true; } catch(...) { return false; } } }; template struct uses_allocator; } # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/localefwd.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/localefwd.h" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/localefwd.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++locale.h" 1 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++locale.h" 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++locale.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/clocale" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/clocale" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/clocale" 3 # 1 "/usr/include/locale.h" 1 3 4 # 29 "/usr/include/locale.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 30 "/usr/include/locale.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/locale.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/locale.h" 3 4 enum { __LC_CTYPE = 0, __LC_NUMERIC = 1, __LC_TIME = 2, __LC_COLLATE = 3, __LC_MONETARY = 4, __LC_MESSAGES = 5, __LC_ALL = 6, __LC_PAPER = 7, __LC_NAME = 8, __LC_ADDRESS = 9, __LC_TELEPHONE = 10, __LC_MEASUREMENT = 11, __LC_IDENTIFICATION = 12 }; # 31 "/usr/include/locale.h" 2 3 4 extern "C" { # 51 "/usr/include/locale.h" 3 4 struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; char int_p_cs_precedes; char int_p_sep_by_space; char int_n_cs_precedes; char int_n_sep_by_space; char int_p_sign_posn; char int_n_sign_posn; # 121 "/usr/include/locale.h" 3 4 }; extern char *setlocale (int __category, __const char *__locale) throw (); extern struct lconv *localeconv (void) throw (); # 152 "/usr/include/locale.h" 3 4 extern __locale_t newlocale (int __category_mask, __const char *__locale, __locale_t __base) throw (); # 187 "/usr/include/locale.h" 3 4 extern __locale_t duplocale (__locale_t __dataset) throw (); extern void freelocale (__locale_t __dataset) throw (); extern __locale_t uselocale (__locale_t __dataset) throw (); } # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/clocale" 2 3 # 53 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/clocale" 3 namespace std { using ::lconv; using ::setlocale; using ::localeconv; } # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++locale.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { extern "C" __typeof(uselocale) __uselocale; } namespace std __attribute__ ((__visibility__ ("default"))) { typedef __locale_t __c_locale; inline int __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), char* __out, const int __size __attribute__ ((__unused__)), const char* __fmt, ...) { __c_locale __old = __gnu_cxx::__uselocale(__cloc); # 89 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/c++locale.h" 3 __builtin_va_list __args; __builtin_va_start(__args, __fmt); const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); __builtin_va_end(__args); __gnu_cxx::__uselocale(__old); return __ret; } } # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/localefwd.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iosfwd" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iosfwd" 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iosfwd" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 76 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iosfwd" 3 class ios_base; template > class basic_ios; template > class basic_streambuf; template > class basic_istream; template > class basic_ostream; template > class basic_iostream; template, typename _Alloc = allocator<_CharT> > class basic_stringbuf; template, typename _Alloc = allocator<_CharT> > class basic_istringstream; template, typename _Alloc = allocator<_CharT> > class basic_ostringstream; template, typename _Alloc = allocator<_CharT> > class basic_stringstream; template > class basic_filebuf; template > class basic_ifstream; template > class basic_ofstream; template > class basic_fstream; template > class istreambuf_iterator; template > class ostreambuf_iterator; typedef basic_ios ios; typedef basic_streambuf streambuf; typedef basic_istream istream; typedef basic_ostream ostream; typedef basic_iostream iostream; typedef basic_stringbuf stringbuf; typedef basic_istringstream istringstream; typedef basic_ostringstream ostringstream; typedef basic_stringstream stringstream; typedef basic_filebuf filebuf; typedef basic_ifstream ifstream; typedef basic_ofstream ofstream; typedef basic_fstream fstream; typedef basic_ios wios; typedef basic_streambuf wstreambuf; typedef basic_istream wistream; typedef basic_ostream wostream; typedef basic_iostream wiostream; typedef basic_stringbuf wstringbuf; typedef basic_istringstream wistringstream; typedef basic_ostringstream wostringstream; typedef basic_stringstream wstringstream; typedef basic_filebuf wfilebuf; typedef basic_ifstream wifstream; typedef basic_ofstream wofstream; typedef basic_fstream wfstream; } # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/localefwd.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 3 # 1 "/usr/include/ctype.h" 1 3 4 # 30 "/usr/include/ctype.h" 3 4 extern "C" { # 48 "/usr/include/ctype.h" 3 4 enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; # 81 "/usr/include/ctype.h" 3 4 extern __const unsigned short int **__ctype_b_loc (void) throw () __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) throw () __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) throw () __attribute__ ((__const)); # 96 "/usr/include/ctype.h" 3 4 extern int isalnum (int) throw (); extern int isalpha (int) throw (); extern int iscntrl (int) throw (); extern int isdigit (int) throw (); extern int islower (int) throw (); extern int isgraph (int) throw (); extern int isprint (int) throw (); extern int ispunct (int) throw (); extern int isspace (int) throw (); extern int isupper (int) throw (); extern int isxdigit (int) throw (); extern int tolower (int __c) throw (); extern int toupper (int __c) throw (); extern int isblank (int) throw (); extern int isctype (int __c, int __mask) throw (); extern int isascii (int __c) throw (); extern int toascii (int __c) throw (); extern int _toupper (int) throw (); extern int _tolower (int) throw (); # 247 "/usr/include/ctype.h" 3 4 extern int isalnum_l (int, __locale_t) throw (); extern int isalpha_l (int, __locale_t) throw (); extern int iscntrl_l (int, __locale_t) throw (); extern int isdigit_l (int, __locale_t) throw (); extern int islower_l (int, __locale_t) throw (); extern int isgraph_l (int, __locale_t) throw (); extern int isprint_l (int, __locale_t) throw (); extern int ispunct_l (int, __locale_t) throw (); extern int isspace_l (int, __locale_t) throw (); extern int isupper_l (int, __locale_t) throw (); extern int isxdigit_l (int, __locale_t) throw (); extern int isblank_l (int, __locale_t) throw (); extern int __tolower_l (int __c, __locale_t __l) throw (); extern int tolower_l (int __c, __locale_t __l) throw (); extern int __toupper_l (int __c, __locale_t __l) throw (); extern int toupper_l (int __c, __locale_t __l) throw (); # 323 "/usr/include/ctype.h" 3 4 } # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 2 3 # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 3 namespace std { using ::isalnum; using ::isalpha; using ::iscntrl; using ::isdigit; using ::isgraph; using ::islower; using ::isprint; using ::ispunct; using ::isspace; using ::isupper; using ::isxdigit; using ::tolower; using ::toupper; } namespace std { using ::isblank; } # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/localefwd.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 57 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/localefwd.h" 3 class locale; template bool has_facet(const locale&) throw(); template const _Facet& use_facet(const locale&); template bool isspace(_CharT, const locale&); template bool isprint(_CharT, const locale&); template bool iscntrl(_CharT, const locale&); template bool isupper(_CharT, const locale&); template bool islower(_CharT, const locale&); template bool isalpha(_CharT, const locale&); template bool isdigit(_CharT, const locale&); template bool ispunct(_CharT, const locale&); template bool isxdigit(_CharT, const locale&); template bool isalnum(_CharT, const locale&); template bool isgraph(_CharT, const locale&); template _CharT toupper(_CharT, const locale&); template _CharT tolower(_CharT, const locale&); class ctype_base; template class ctype; template<> class ctype; template<> class ctype; template class ctype_byname; class codecvt_base; template class codecvt; template<> class codecvt; template<> class codecvt; template class codecvt_byname; template > class num_get; template > class num_put; template class numpunct; template class numpunct_byname; template class collate; template class collate_byname; class time_base; template > class time_get; template > class time_get_byname; template > class time_put; template > class time_put_byname; class money_base; template > class money_get; template > class money_put; template class moneypunct; template class moneypunct_byname; class messages_base; template class messages; template class messages_byname; } # 46 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ostream_insert.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ostream_insert.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ostream_insert.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/cxxabi_forced.h" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/cxxabi_forced.h" 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/cxxabi_forced.h" 3 #pragma GCC visibility push(default) namespace __cxxabiv1 { class __forced_unwind { virtual ~__forced_unwind() throw(); virtual void __pure_dummy() = 0; }; } #pragma GCC visibility pop # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ostream_insert.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline void __ostream_write(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const streamsize __put = __out.rdbuf()->sputn(__s, __n); if (__put != __n) __out.setstate(__ios_base::badbit); } template inline void __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const _CharT __c = __out.fill(); for (; __n > 0; --__n) { const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); if (_Traits::eq_int_type(__put, _Traits::eof())) { __out.setstate(__ios_base::badbit); break; } } } template basic_ostream<_CharT, _Traits>& __ostream_insert(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; typename __ostream_type::sentry __cerb(__out); if (__cerb) { try { const streamsize __w = __out.width(); if (__w > __n) { const bool __left = ((__out.flags() & __ios_base::adjustfield) == __ios_base::left); if (!__left) __ostream_fill(__out, __w - __n); if (__out.good()) __ostream_write(__out, __s, __n); if (__left && __out.good()) __ostream_fill(__out, __w - __n); } else __ostream_write(__out, __s, __n); __out.width(0); } catch(__cxxabiv1::__forced_unwind&) { __out._M_setstate(__ios_base::badbit); throw; } catch(...) { __out._M_setstate(__ios_base::badbit); } } return __out; } extern template ostream& __ostream_insert(ostream&, const char*, streamsize); extern template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize); } # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 1 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 101 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 template struct unary_function { typedef _Arg argument_type; typedef _Result result_type; }; template struct binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; typedef _Result result_type; }; # 140 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 template struct plus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } }; template struct minus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } }; template struct multiplies : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } }; template struct divides : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } }; template struct modulus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } }; template struct negate : public unary_function<_Tp, _Tp> { _Tp operator()(const _Tp& __x) const { return -__x; } }; # 204 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 template struct equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } }; template struct not_equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } }; template struct greater : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } }; template struct less : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; template struct greater_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } }; template struct less_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } }; # 268 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 template struct logical_and : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } }; template struct logical_or : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } }; template struct logical_not : public unary_function<_Tp, bool> { bool operator()(const _Tp& __x) const { return !__x; } }; template struct bit_and : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x & __y; } }; template struct bit_or : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x | __y; } }; template struct bit_xor : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x ^ __y; } }; # 351 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 template class unary_negate : public unary_function { protected: _Predicate _M_pred; public: explicit unary_negate(const _Predicate& __x) : _M_pred(__x) { } bool operator()(const typename _Predicate::argument_type& __x) const { return !_M_pred(__x); } }; template inline unary_negate<_Predicate> not1(const _Predicate& __pred) { return unary_negate<_Predicate>(__pred); } template class binary_negate : public binary_function { protected: _Predicate _M_pred; public: explicit binary_negate(const _Predicate& __x) : _M_pred(__x) { } bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const { return !_M_pred(__x, __y); } }; template inline binary_negate<_Predicate> not2(const _Predicate& __pred) { return binary_negate<_Predicate>(__pred); } # 422 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 template class pointer_to_unary_function : public unary_function<_Arg, _Result> { protected: _Result (*_M_ptr)(_Arg); public: pointer_to_unary_function() { } explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) { } _Result operator()(_Arg __x) const { return _M_ptr(__x); } }; template inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) { return pointer_to_unary_function<_Arg, _Result>(__x); } template class pointer_to_binary_function : public binary_function<_Arg1, _Arg2, _Result> { protected: _Result (*_M_ptr)(_Arg1, _Arg2); public: pointer_to_binary_function() { } explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) : _M_ptr(__x) { } _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_ptr(__x, __y); } }; template inline pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } template struct _Identity : public unary_function<_Tp,_Tp> { _Tp& operator()(_Tp& __x) const { return __x; } const _Tp& operator()(const _Tp& __x) const { return __x; } }; template struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { typename _Pair::first_type& operator()(_Pair& __x) const { return __x.first; } const typename _Pair::first_type& operator()(const _Pair& __x) const { return __x.first; } template typename _Pair2::first_type& operator()(_Pair2& __x) const { return __x.first; } template const typename _Pair2::first_type& operator()(const _Pair2& __x) const { return __x.first; } }; template struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> { typename _Pair::second_type& operator()(_Pair& __x) const { return __x.second; } const typename _Pair::second_type& operator()(const _Pair& __x) const { return __x.second; } }; # 541 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 3 template class mem_fun_t : public unary_function<_Tp*, _Ret> { public: explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template class const_mem_fun_t : public unary_function { public: explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template class mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> { public: explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_t : public binary_function { public: explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } _Ret operator()(const _Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template inline mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)()) { return mem_fun_t<_Ret, _Tp>(__f); } template inline const_mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)() const) { return const_mem_fun_t<_Ret, _Tp>(__f); } template inline mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)()) { return mem_fun_ref_t<_Ret, _Tp>(__f); } template inline const_mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } template inline mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template inline const_mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } template inline mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } template inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/binders.h" 1 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/binders.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 99 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/binders.h" 3 template class binder1st : public unary_function { protected: _Operation op; typename _Operation::first_argument_type value; public: binder1st(const _Operation& __x, const typename _Operation::first_argument_type& __y) : op(__x), value(__y) { } typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const { return op(value, __x); } typename _Operation::result_type operator()(typename _Operation::second_argument_type& __x) const { return op(value, __x); } } __attribute__ ((__deprecated__)); template inline binder1st<_Operation> bind1st(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::first_argument_type _Arg1_type; return binder1st<_Operation>(__fn, _Arg1_type(__x)); } template class binder2nd : public unary_function { protected: _Operation op; typename _Operation::second_argument_type value; public: binder2nd(const _Operation& __x, const typename _Operation::second_argument_type& __y) : op(__x), value(__y) { } typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const { return op(__x, value); } typename _Operation::result_type operator()(typename _Operation::first_argument_type& __x) const { return op(__x, value); } } __attribute__ ((__deprecated__)); template inline binder2nd<_Operation> bind2nd(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::second_argument_type _Arg2_type; return binder2nd<_Operation>(__fn, _Arg2_type(__x)); } } # 732 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_function.h" 2 3 # 51 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/range_access.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/range_access.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/range_access.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline auto begin(_Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } template inline auto begin(const _Container& __cont) -> decltype(__cont.begin()) { return __cont.begin(); } template inline auto end(_Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } template inline auto end(const _Container& __cont) -> decltype(__cont.end()) { return __cont.end(); } template inline _Tp* begin(_Tp (&__arr)[_Nm]) { return __arr; } template inline _Tp* end(_Tp (&__arr)[_Nm]) { return __arr + _Nm; } } # 54 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr.h" 1 3 # 31 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr.h" 3 #pragma GCC visibility push(default) # 142 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 3 # 1 "/usr/include/pthread.h" 1 3 4 # 25 "/usr/include/pthread.h" 3 4 # 1 "/usr/include/sched.h" 1 3 4 # 30 "/usr/include/sched.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 31 "/usr/include/sched.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 # 35 "/usr/include/sched.h" 2 3 4 # 43 "/usr/include/sched.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4 # 74 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 struct sched_param { int __sched_priority; }; extern "C" { extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) throw (); extern int unshare (int __flags) throw (); extern int sched_getcpu (void) throw (); } struct __sched_param { int __sched_priority; }; # 116 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 typedef unsigned long int __cpu_mask; typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; # 199 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 extern "C" { extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) throw (); extern cpu_set_t *__sched_cpualloc (size_t __count) throw () ; extern void __sched_cpufree (cpu_set_t *__set) throw (); } # 44 "/usr/include/sched.h" 2 3 4 extern "C" { extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) throw (); extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); extern int sched_setscheduler (__pid_t __pid, int __policy, __const struct sched_param *__param) throw (); extern int sched_getscheduler (__pid_t __pid) throw (); extern int sched_yield (void) throw (); extern int sched_get_priority_max (int __algorithm) throw (); extern int sched_get_priority_min (int __algorithm) throw (); extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); # 118 "/usr/include/sched.h" 3 4 extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw (); extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) throw (); } # 26 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/time.h" 1 3 4 # 30 "/usr/include/time.h" 3 4 extern "C" { # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 39 "/usr/include/time.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 # 43 "/usr/include/time.h" 2 3 4 # 131 "/usr/include/time.h" 3 4 struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long int tm_gmtoff; __const char *tm_zone; }; struct itimerspec { struct timespec it_interval; struct timespec it_value; }; struct sigevent; # 180 "/usr/include/time.h" 3 4 extern clock_t clock (void) throw (); extern time_t time (time_t *__timer) throw (); extern double difftime (time_t __time1, time_t __time0) throw () __attribute__ ((__const__)); extern time_t mktime (struct tm *__tp) throw (); extern size_t strftime (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp) throw (); extern char *strptime (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp) throw (); extern size_t strftime_l (char *__restrict __s, size_t __maxsize, __const char *__restrict __format, __const struct tm *__restrict __tp, __locale_t __loc) throw (); extern char *strptime_l (__const char *__restrict __s, __const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) throw (); extern struct tm *gmtime (__const time_t *__timer) throw (); extern struct tm *localtime (__const time_t *__timer) throw (); extern struct tm *gmtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern struct tm *localtime_r (__const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); extern char *asctime (__const struct tm *__tp) throw (); extern char *ctime (__const time_t *__timer) throw (); extern char *asctime_r (__const struct tm *__restrict __tp, char *__restrict __buf) throw (); extern char *ctime_r (__const time_t *__restrict __timer, char *__restrict __buf) throw (); extern char *__tzname[2]; extern int __daylight; extern long int __timezone; extern char *tzname[2]; extern void tzset (void) throw (); extern int daylight; extern long int timezone; extern int stime (__const time_t *__when) throw (); # 313 "/usr/include/time.h" 3 4 extern time_t timegm (struct tm *__tp) throw (); extern time_t timelocal (struct tm *__tp) throw (); extern int dysize (int __year) throw () __attribute__ ((__const__)); # 328 "/usr/include/time.h" 3 4 extern int nanosleep (__const struct timespec *__requested_time, struct timespec *__remaining); extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) throw (); extern int clock_nanosleep (clockid_t __clock_id, int __flags, __const struct timespec *__req, struct timespec *__rem); extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) throw (); extern int timer_delete (timer_t __timerid) throw (); extern int timer_settime (timer_t __timerid, int __flags, __const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) throw (); extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) throw (); extern int timer_getoverrun (timer_t __timerid) throw (); # 390 "/usr/include/time.h" 3 4 extern int getdate_err; # 399 "/usr/include/time.h" 3 4 extern struct tm *getdate (__const char *__string); # 413 "/usr/include/time.h" 3 4 extern int getdate_r (__const char *__restrict __string, struct tm *__restrict __resbufp); } # 27 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4 # 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4 typedef long int __jmp_buf[8]; # 30 "/usr/include/pthread.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 31 "/usr/include/pthread.h" 2 3 4 enum { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED }; enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP }; enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; # 115 "/usr/include/pthread.h" 3 4 enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; # 147 "/usr/include/pthread.h" 3 4 enum { PTHREAD_INHERIT_SCHED, PTHREAD_EXPLICIT_SCHED }; enum { PTHREAD_SCOPE_SYSTEM, PTHREAD_SCOPE_PROCESS }; enum { PTHREAD_PROCESS_PRIVATE, PTHREAD_PROCESS_SHARED }; # 182 "/usr/include/pthread.h" 3 4 struct _pthread_cleanup_buffer { void (*__routine) (void *); void *__arg; int __canceltype; struct _pthread_cleanup_buffer *__prev; }; enum { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS }; # 220 "/usr/include/pthread.h" 3 4 extern "C" { extern int pthread_create (pthread_t *__restrict __newthread, __const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); extern int pthread_join (pthread_t __th, void **__thread_return); extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, __const struct timespec *__abstime); extern int pthread_detach (pthread_t __th) throw (); extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_destroy (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, int *__detachstate) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, size_t *__guardsize) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, __const struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict __attr, int *__restrict __policy) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict __attr, int *__restrict __inherit) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, int *__restrict __scope) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (2))); extern int pthread_setschedparam (pthread_t __target_thread, int __policy, __const struct sched_param *__param) throw () __attribute__ ((__nonnull__ (3))); extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (2, 3))); extern int pthread_setschedprio (pthread_t __target_thread, int __prio) throw (); extern int pthread_getname_np (pthread_t __target_thread, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) throw () __attribute__ ((__nonnull__ (2))); extern int pthread_getconcurrency (void) throw (); extern int pthread_setconcurrency (int __level) throw (); extern int pthread_yield (void) throw (); extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, __const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); # 478 "/usr/include/pthread.h" 3 4 extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); # 490 "/usr/include/pthread.h" 3 4 extern int pthread_setcancelstate (int __state, int *__oldstate); extern int pthread_setcanceltype (int __type, int *__oldtype); extern int pthread_cancel (pthread_t __th); extern void pthread_testcancel (void); typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); # 524 "/usr/include/pthread.h" 3 4 struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; class __pthread_cleanup_class { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; public: __pthread_cleanup_class (void (*__fct) (void *), void *__arg) : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } void __setdoit (int __newval) { __do_it = __newval; } void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &__cancel_type); } void __restore () const { pthread_setcanceltype (__cancel_type, 0); } }; # 726 "/usr/include/pthread.h" 3 4 struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); extern int pthread_mutex_init (pthread_mutex_t *__mutex, __const pthread_mutexattr_t *__mutexattr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) throw () __attribute__ ((__nonnull__ (1, 3))); extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); # 790 "/usr/include/pthread.h" 3 4 extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, int *__robustness) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, int *__robustness) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, int __robustness) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) throw () __attribute__ ((__nonnull__ (1))); # 872 "/usr/include/pthread.h" 3 4 extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, __const pthread_rwlockattr_t *__restrict __attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_init (pthread_cond_t *__restrict __cond, __const pthread_condattr_t *__restrict __cond_attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_destroy (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_signal (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); # 984 "/usr/include/pthread.h" 3 4 extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, __const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); extern int pthread_condattr_init (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getpshared (__const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_condattr_getclock (__const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) throw () __attribute__ ((__nonnull__ (1))); # 1028 "/usr/include/pthread.h" 3 4 extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_destroy (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_lock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_trylock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_spin_unlock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, __const pthread_barrierattr_t *__restrict __attr, unsigned int __count) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrier_wait (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); # 1095 "/usr/include/pthread.h" 3 4 extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) throw () __attribute__ ((__nonnull__ (1))); extern int pthread_key_delete (pthread_key_t __key) throw (); extern void *pthread_getspecific (pthread_key_t __key) throw (); extern int pthread_setspecific (pthread_key_t __key, __const void *__pointer) throw () ; extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) throw () __attribute__ ((__nonnull__ (2))); # 1129 "/usr/include/pthread.h" 3 4 extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) throw (); extern __inline __attribute__ ((__gnu_inline__)) int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () { return __thread1 == __thread2; } } # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 2 3 # 53 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 3 typedef pthread_t __gthread_t; typedef pthread_key_t __gthread_key_t; typedef pthread_once_t __gthread_once_t; typedef pthread_mutex_t __gthread_mutex_t; typedef pthread_mutex_t __gthread_recursive_mutex_t; typedef pthread_cond_t __gthread_cond_t; typedef struct timespec __gthread_time_t; # 125 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 3 static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); # 244 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_active_p (void) { static void *const __gthread_active_ptr = __extension__ (void *) &__gthrw_pthread_cancel; return __gthread_active_ptr != 0; } # 663 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), void *__args) { return __gthrw_pthread_create (__threadid, __null, __func, __args); } static inline int __gthread_join (__gthread_t __threadid, void **__value_ptr) { return __gthrw_pthread_join (__threadid, __value_ptr); } static inline int __gthread_detach (__gthread_t __threadid) { return __gthrw_pthread_detach (__threadid); } static inline int __gthread_equal (__gthread_t __t1, __gthread_t __t2) { return __gthrw_pthread_equal (__t1, __t2); } static inline __gthread_t __gthread_self (void) { return __gthrw_pthread_self (); } static inline int __gthread_yield (void) { return __gthrw_sched_yield (); } static inline int __gthread_once (__gthread_once_t *__once, void (*__func) (void)) { if (__gthread_active_p ()) return __gthrw_pthread_once (__once, __func); else return -1; } static inline int __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) { return __gthrw_pthread_key_create (__key, __dtor); } static inline int __gthread_key_delete (__gthread_key_t __key) { return __gthrw_pthread_key_delete (__key); } static inline void * __gthread_getspecific (__gthread_key_t __key) { return __gthrw_pthread_getspecific (__key); } static inline int __gthread_setspecific (__gthread_key_t __key, const void *__ptr) { return __gthrw_pthread_setspecific (__key, __ptr); } static inline int __gthread_mutex_destroy (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_destroy (__mutex); else return 0; } static inline int __gthread_mutex_lock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_lock (__mutex); else return 0; } static inline int __gthread_mutex_trylock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_trylock (__mutex); else return 0; } static inline int __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); else return 0; } static inline int __gthread_mutex_unlock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_unlock (__mutex); else return 0; } # 804 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_lock (__mutex); } static inline int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_trylock (__mutex); } static inline int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthread_mutex_timedlock (__mutex, __abs_timeout); } static inline int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_unlock (__mutex); } static inline int __gthread_cond_broadcast (__gthread_cond_t *__cond) { return __gthrw_pthread_cond_broadcast (__cond); } static inline int __gthread_cond_signal (__gthread_cond_t *__cond) { return __gthrw_pthread_cond_signal (__cond); } static inline int __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) { return __gthrw_pthread_cond_wait (__cond, __mutex); } static inline int __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); } static inline int __gthread_cond_wait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex) { return __gthread_cond_wait (__cond, __mutex); } static inline int __gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); } static inline int __gthread_cond_destroy (__gthread_cond_t* __cond) { return __gthrw_pthread_cond_destroy (__cond); } # 143 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/gthr.h" 2 3 #pragma GCC visibility pop # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/atomic_word.h" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/atomic_word.h" 3 typedef int _Atomic_word; # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { static inline _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) { return __sync_fetch_and_add(__mem, __val); } static inline void __atomic_add(volatile _Atomic_word* __mem, int __val) { __sync_fetch_and_add(__mem, __val); } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/atomicity.h" 3 static inline _Atomic_word __exchange_and_add_single(_Atomic_word* __mem, int __val) { _Atomic_word __result = *__mem; *__mem += __val; return __result; } static inline void __atomic_add_single(_Atomic_word* __mem, int __val) { *__mem += __val; } static inline _Atomic_word __attribute__ ((__unused__)) __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) { if (__gthread_active_p()) return __exchange_and_add(__mem, __val); else return __exchange_and_add_single(__mem, __val); } static inline void __attribute__ ((__unused__)) __atomic_add_dispatch(_Atomic_word* __mem, int __val) { if (__gthread_active_p()) __atomic_add(__mem, __val); else __atomic_add_single(__mem, __val); } } # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 108 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template class basic_string { typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; public: typedef _Traits traits_type; typedef typename _Traits::char_type value_type; typedef _Alloc allocator_type; typedef typename _CharT_alloc_type::size_type size_type; typedef typename _CharT_alloc_type::difference_type difference_type; typedef typename _CharT_alloc_type::reference reference; typedef typename _CharT_alloc_type::const_reference const_reference; typedef typename _CharT_alloc_type::pointer pointer; typedef typename _CharT_alloc_type::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; private: # 145 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 struct _Rep_base { size_type _M_length; size_type _M_capacity; _Atomic_word _M_refcount; }; struct _Rep : _Rep_base { typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; # 170 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 static const size_type _S_max_size; static const _CharT _S_terminal; static size_type _S_empty_rep_storage[]; static _Rep& _S_empty_rep() { void* __p = reinterpret_cast(&_S_empty_rep_storage); return *reinterpret_cast<_Rep*>(__p); } bool _M_is_leaked() const { return this->_M_refcount < 0; } bool _M_is_shared() const { return this->_M_refcount > 0; } void _M_set_leaked() { this->_M_refcount = -1; } void _M_set_sharable() { this->_M_refcount = 0; } void _M_set_length_and_sharable(size_type __n) { if (__builtin_expect(this != &_S_empty_rep(), false)) { this->_M_set_sharable(); this->_M_length = __n; traits_type::assign(this->_M_refdata()[__n], _S_terminal); } } _CharT* _M_refdata() throw() { return reinterpret_cast<_CharT*>(this + 1); } _CharT* _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) { return (!_M_is_leaked() && __alloc1 == __alloc2) ? _M_refcopy() : _M_clone(__alloc1); } static _Rep* _S_create(size_type, size_type, const _Alloc&); void _M_dispose(const _Alloc& __a) { if (__builtin_expect(this != &_S_empty_rep(), false)) { ; if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) { ; _M_destroy(__a); } } } void _M_destroy(const _Alloc&) throw(); _CharT* _M_refcopy() throw() { if (__builtin_expect(this != &_S_empty_rep(), false)) __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); return _M_refdata(); } _CharT* _M_clone(const _Alloc&, size_type __res = 0); }; struct _Alloc_hider : _Alloc { _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) { } _CharT* _M_p; }; public: static const size_type npos = static_cast(-1); private: mutable _Alloc_hider _M_dataplus; _CharT* _M_data() const { return _M_dataplus._M_p; } _CharT* _M_data(_CharT* __p) { return (_M_dataplus._M_p = __p); } _Rep* _M_rep() const { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } iterator _M_ibegin() const { return iterator(_M_data()); } iterator _M_iend() const { return iterator(_M_data() + this->size()); } void _M_leak() { if (!_M_rep()->_M_is_leaked()) _M_leak_hard(); } size_type _M_check(size_type __pos, const char* __s) const { if (__pos > this->size()) __throw_out_of_range((__s)); return __pos; } void _M_check_length(size_type __n1, size_type __n2, const char* __s) const { if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error((__s)); } size_type _M_limit(size_type __pos, size_type __off) const { const bool __testoff = __off < this->size() - __pos; return __testoff ? __off : this->size() - __pos; } bool _M_disjunct(const _CharT* __s) const { return (less()(__s, _M_data()) || less()(_M_data() + this->size(), __s)); } static void _M_copy(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::copy(__d, __s, __n); } static void _M_move(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::move(__d, __s, __n); } static void _M_assign(_CharT* __d, size_type __n, _CharT __c) { if (__n == 1) traits_type::assign(*__d, __c); else traits_type::assign(__d, __n, __c); } template static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) { for (; __k1 != __k2; ++__k1, ++__p) traits_type::assign(*__p, *__k1); } static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } static int _S_compare(size_type __n1, size_type __n2) { const difference_type __d = difference_type(__n1 - __n2); if (__d > __gnu_cxx::__numeric_traits::__max) return __gnu_cxx::__numeric_traits::__max; else if (__d < __gnu_cxx::__numeric_traits::__min) return __gnu_cxx::__numeric_traits::__min; else return int(__d); } void _M_mutate(size_type __pos, size_type __len1, size_type __len2); void _M_leak_hard(); static _Rep& _S_empty_rep() { return _Rep::_S_empty_rep(); } public: basic_string() : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } explicit basic_string(const _Alloc& __a); basic_string(const basic_string& __str); basic_string(const basic_string& __str, size_type __pos, size_type __n = npos); basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a); # 480 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()); basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); # 504 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string(basic_string&& __str) noexcept : _M_dataplus(__str._M_dataplus) { __str._M_data(_S_empty_rep()._M_refdata()); } basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc()); # 528 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()); ~basic_string() noexcept { _M_rep()->_M_dispose(this->get_allocator()); } basic_string& operator=(const basic_string& __str) { return this->assign(__str); } basic_string& operator=(const _CharT* __s) { return this->assign(__s); } # 561 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& operator=(_CharT __c) { this->assign(1, __c); return *this; } # 576 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& operator=(basic_string&& __str) { this->swap(__str); return *this; } basic_string& operator=(initializer_list<_CharT> __l) { this->assign(__l.begin(), __l.size()); return *this; } iterator begin() noexcept { _M_leak(); return iterator(_M_data()); } const_iterator begin() const noexcept { return const_iterator(_M_data()); } iterator end() noexcept { _M_leak(); return iterator(_M_data() + this->size()); } const_iterator end() const noexcept { return const_iterator(_M_data() + this->size()); } reverse_iterator rbegin() noexcept { return reverse_iterator(this->end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(this->end()); } reverse_iterator rend() noexcept { return reverse_iterator(this->begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(this->begin()); } const_iterator cbegin() const noexcept { return const_iterator(this->_M_data()); } const_iterator cend() const noexcept { return const_iterator(this->_M_data() + this->size()); } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(this->end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(this->begin()); } public: size_type size() const noexcept { return _M_rep()->_M_length; } size_type length() const noexcept { return _M_rep()->_M_length; } size_type max_size() const noexcept { return _Rep::_S_max_size; } # 736 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 void resize(size_type __n, _CharT __c); # 749 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 void resize(size_type __n) { this->resize(__n, _CharT()); } void shrink_to_fit() { if (capacity() > size()) { try { reserve(0); } catch(...) { } } } size_type capacity() const noexcept { return _M_rep()->_M_capacity; } # 793 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 void reserve(size_type __res_arg = 0); void clear() noexcept { _M_mutate(0, this->size(), 0); } bool empty() const noexcept { return this->size() == 0; } # 822 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 const_reference operator[] (size_type __pos) const { ; return _M_data()[__pos]; } # 839 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 reference operator[](size_type __pos) { ; ; _M_leak(); return _M_data()[__pos]; } # 860 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 const_reference at(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("basic_string::at")); return _M_data()[__n]; } # 879 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 reference at(size_type __n) { if (__n >= size()) __throw_out_of_range(("basic_string::at")); _M_leak(); return _M_data()[__n]; } reference front() { return operator[](0); } const_reference front() const { return operator[](0); } reference back() { return operator[](this->size() - 1); } const_reference back() const { return operator[](this->size() - 1); } # 928 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& operator+=(const basic_string& __str) { return this->append(__str); } basic_string& operator+=(const _CharT* __s) { return this->append(__s); } basic_string& operator+=(_CharT __c) { this->push_back(__c); return *this; } basic_string& operator+=(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } basic_string& append(const basic_string& __str); # 985 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& append(const basic_string& __str, size_type __pos, size_type __n); basic_string& append(const _CharT* __s, size_type __n); basic_string& append(const _CharT* __s) { ; return this->append(__s, traits_type::length(__s)); } # 1017 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& append(size_type __n, _CharT __c); basic_string& append(initializer_list<_CharT> __l) { return this->append(__l.begin(), __l.size()); } # 1039 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template basic_string& append(_InputIterator __first, _InputIterator __last) { return this->replace(_M_iend(), _M_iend(), __first, __last); } void push_back(_CharT __c) { const size_type __len = 1 + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); traits_type::assign(_M_data()[this->size()], __c); _M_rep()->_M_set_length_and_sharable(__len); } basic_string& assign(const basic_string& __str); # 1075 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& assign(basic_string&& __str) { this->swap(__str); return *this; } # 1096 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n) { return this->assign(__str._M_data() + __str._M_check(__pos, "basic_string::assign"), __str._M_limit(__pos, __n)); } # 1112 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s, size_type __n); # 1124 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& assign(const _CharT* __s) { ; return this->assign(__s, traits_type::length(__s)); } # 1140 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& assign(size_type __n, _CharT __c) { return _M_replace_aux(size_type(0), this->size(), __n, __c); } # 1152 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template basic_string& assign(_InputIterator __first, _InputIterator __last) { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } basic_string& assign(initializer_list<_CharT> __l) { return this->assign(__l.begin(), __l.size()); } # 1181 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 void insert(iterator __p, size_type __n, _CharT __c) { this->replace(__p, __p, __n, __c); } # 1197 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template void insert(iterator __p, _InputIterator __beg, _InputIterator __end) { this->replace(__p, __p, __beg, __end); } # 1209 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 void insert(iterator __p, initializer_list<_CharT> __l) { ; this->insert(__p - _M_ibegin(), __l.begin(), __l.size()); } # 1229 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str) { return this->insert(__pos1, __str, size_type(0), __str.size()); } # 1251 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n) { return this->insert(__pos1, __str._M_data() + __str._M_check(__pos2, "basic_string::insert"), __str._M_limit(__pos2, __n)); } # 1274 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s, size_type __n); # 1292 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& insert(size_type __pos, const _CharT* __s) { ; return this->insert(__pos, __s, traits_type::length(__s)); } # 1315 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& insert(size_type __pos, size_type __n, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), size_type(0), __n, __c); } # 1333 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 iterator insert(iterator __p, _CharT __c) { ; const size_type __pos = __p - _M_ibegin(); _M_replace_aux(__pos, size_type(0), size_type(1), __c); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } # 1358 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& erase(size_type __pos = 0, size_type __n = npos) { _M_mutate(_M_check(__pos, "basic_string::erase"), _M_limit(__pos, __n), size_type(0)); return *this; } # 1374 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 iterator erase(iterator __position) { ; const size_type __pos = __position - _M_ibegin(); _M_mutate(__pos, size_type(1), size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } # 1394 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 iterator erase(iterator __first, iterator __last); void pop_back() { erase(size()-1, 1); } # 1425 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n, const basic_string& __str) { return this->replace(__pos, __n, __str._M_data(), __str.size()); } # 1447 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) { return this->replace(__pos1, __n1, __str._M_data() + __str._M_check(__pos2, "basic_string::replace"), __str._M_limit(__pos2, __n2)); } # 1472 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2); # 1492 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s) { ; return this->replace(__pos, __n1, __s, traits_type::length(__s)); } # 1516 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __n2, __c); } # 1534 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const basic_string& __str) { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } # 1553 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) { ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); } # 1574 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s) { ; return this->replace(__i1, __i2, __s, traits_type::length(__s)); } # 1595 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) { ; return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); } # 1618 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template basic_string& replace(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2) { ; ; typedef typename std::__is_integer<_InputIterator>::__type _Integral; return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); } basic_string& replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const _CharT* __k1, const _CharT* __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } basic_string& replace(iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2) { ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } # 1689 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string& replace(iterator __i1, iterator __i2, initializer_list<_CharT> __l) { return this->replace(__i1, __i2, __l.begin(), __l.end()); } private: template basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, _Integer __val, __true_type) { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } template basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type); basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); basic_string& _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2); template static _CharT* _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a, __false_type) { typedef typename iterator_traits<_InIterator>::iterator_category _Tag; return _S_construct(__beg, __end, __a, _Tag()); } template static _CharT* _S_construct_aux(_Integer __beg, _Integer __end, const _Alloc& __a, __true_type) { return _S_construct_aux_2(static_cast(__beg), __end, __a); } static _CharT* _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) { return _S_construct(__req, __c, __a); } template static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) { typedef typename std::__is_integer<_InIterator>::__type _Integral; return _S_construct_aux(__beg, __end, __a, _Integral()); } template static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag); template static _CharT* _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, forward_iterator_tag); static _CharT* _S_construct(size_type __req, _CharT __c, const _Alloc& __a); public: # 1776 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; # 1786 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 void swap(basic_string& __s); # 1796 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 const _CharT* c_str() const noexcept { return _M_data(); } const _CharT* data() const noexcept { return _M_data(); } allocator_type get_allocator() const noexcept { return _M_dataplus; } # 1829 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos, size_type __n) const; # 1842 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find(const basic_string& __str, size_type __pos = 0) const noexcept { return this->find(__str.data(), __pos, __str.size()); } # 1857 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find(const _CharT* __s, size_type __pos = 0) const { ; return this->find(__s, __pos, traits_type::length(__s)); } # 1874 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find(_CharT __c, size_type __pos = 0) const noexcept; # 1887 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type rfind(const basic_string& __str, size_type __pos = npos) const noexcept { return this->rfind(__str.data(), __pos, __str.size()); } # 1904 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const; # 1917 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type rfind(const _CharT* __s, size_type __pos = npos) const { ; return this->rfind(__s, __pos, traits_type::length(__s)); } # 1934 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type rfind(_CharT __c, size_type __pos = npos) const noexcept; # 1948 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_of(const basic_string& __str, size_type __pos = 0) const noexcept { return this->find_first_of(__str.data(), __pos, __str.size()); } # 1965 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; # 1978 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_of(__s, __pos, traits_type::length(__s)); } # 1997 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_of(_CharT __c, size_type __pos = 0) const noexcept { return this->find(__c, __pos); } # 2012 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_of(const basic_string& __str, size_type __pos = npos) const noexcept { return this->find_last_of(__str.data(), __pos, __str.size()); } # 2029 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; # 2042 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_of(__s, __pos, traits_type::length(__s)); } # 2061 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_of(_CharT __c, size_type __pos = npos) const noexcept { return this->rfind(__c, __pos); } # 2075 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const noexcept { return this->find_first_not_of(__str.data(), __pos, __str.size()); } # 2092 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const; # 2106 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } # 2123 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_first_not_of(_CharT __c, size_type __pos = 0) const noexcept; # 2138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const noexcept { return this->find_last_not_of(__str.data(), __pos, __str.size()); } # 2155 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; # 2169 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } # 2186 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 size_type find_last_not_of(_CharT __c, size_type __pos = npos) const noexcept; # 2202 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 basic_string substr(size_type __pos = 0, size_type __n = npos) const { return basic_string(*this, _M_check(__pos, "basic_string::substr"), __n); } # 2221 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 int compare(const basic_string& __str) const { const size_type __size = this->size(); const size_type __osize = __str.size(); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __str.data(), __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } # 2253 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n, const basic_string& __str) const; # 2279 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const; # 2297 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 int compare(const _CharT* __s) const; # 2321 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s) const; # 2348 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; }; # 2360 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } template basic_string<_CharT,_Traits,_Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template basic_string<_CharT,_Traits,_Alloc> operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); template inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } template inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str(__lhs); __str.append(__size_type(1), __rhs); return __str; } template inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return std::move(__lhs.append(__rhs)); } template inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, __lhs)); } template inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { const auto __size = __lhs.size() + __rhs.size(); const bool __cond = (__size > __lhs.capacity() && __size <= __rhs.capacity()); return __cond ? std::move(__rhs.insert(0, __lhs)) : std::move(__lhs.append(__rhs)); } template inline basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, __lhs)); } template inline basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, basic_string<_CharT, _Traits, _Alloc>&& __rhs) { return std::move(__rhs.insert(0, 1, __lhs)); } template inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, const _CharT* __rhs) { return std::move(__lhs.append(__rhs)); } template inline basic_string<_CharT, _Traits, _Alloc> operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, _CharT __rhs) { return std::move(__lhs.append(1, __rhs)); } # 2481 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) == 0; } template inline typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type operator==(const basic_string<_CharT>& __lhs, const basic_string<_CharT>& __rhs) { return (__lhs.size() == __rhs.size() && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), __lhs.size())); } template inline bool operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) == 0; } template inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) == 0; } # 2527 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } template inline bool operator!=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } template inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return !(__lhs == __rhs); } # 2564 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) < 0; } template inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) < 0; } template inline bool operator<(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) > 0; } # 2601 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) > 0; } template inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) > 0; } template inline bool operator>(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) < 0; } # 2638 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) <= 0; } template inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) <= 0; } template inline bool operator<=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) >= 0; } # 2675 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) >= 0; } template inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) >= 0; } template inline bool operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) <= 0; } # 2712 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) { __lhs.swap(__rhs); } # 2730 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str); template<> basic_istream& operator>>(basic_istream& __is, basic_string& __str); # 2748 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Alloc>& __str) { return __ostream_insert(__os, __str.data(), __str.size()); } # 2772 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); # 2790 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 3 template inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return getline(__is, __str, __is.widen('\n')); } template<> basic_istream& getline(basic_istream& __in, basic_string& __str, char __delim); template<> basic_istream& getline(basic_istream& __in, basic_string& __str, wchar_t __delim); } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/string_conversions.h" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/string_conversions.h" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/string_conversions.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/string_conversions.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 1 "/usr/include/wchar.h" 1 3 4 # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 2 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/string_conversions.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/string_conversions.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 3 # 1 "/usr/include/errno.h" 1 3 4 # 32 "/usr/include/errno.h" 3 4 extern "C" { # 1 "/usr/include/x86_64-linux-gnu/bits/errno.h" 1 3 4 # 25 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 # 1 "/usr/include/linux/errno.h" 1 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno.h" 1 3 4 # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 # 5 "/usr/include/asm-generic/errno.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/asm/errno.h" 2 3 4 # 5 "/usr/include/linux/errno.h" 2 3 4 # 26 "/usr/include/x86_64-linux-gnu/bits/errno.h" 2 3 4 # 47 "/usr/include/x86_64-linux-gnu/bits/errno.h" 3 4 extern int *__errno_location (void) throw () __attribute__ ((__const__)); # 37 "/usr/include/errno.h" 2 3 4 # 55 "/usr/include/errno.h" 3 4 extern char *program_invocation_name, *program_invocation_short_name; } # 69 "/usr/include/errno.h" 3 4 typedef int error_t; # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 2 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/string_conversions.h" 2 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template _Ret __stoa(_TRet (*__convf) (const _CharT*, _CharT**, _Base...), const char* __name, const _CharT* __str, std::size_t* __idx, _Base... __base) { _Ret __ret; _CharT* __endptr; (*__errno_location ()) = 0; const _TRet __tmp = __convf(__str, &__endptr, __base...); if (__endptr == __str) std::__throw_invalid_argument(__name); else if ((*__errno_location ()) == 34 || (std::__are_same<_Ret, int>::__value && (__tmp < __numeric_traits::__min || __tmp > __numeric_traits::__max))) std::__throw_out_of_range(__name); else __ret = __tmp; if (__idx) *__idx = __endptr - __str; return __ret; } template _String __to_xstring(int (*__convf) (_CharT*, std::size_t, const _CharT*, __builtin_va_list), std::size_t __n, const _CharT* __fmt, ...) { _CharT* __s = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __n)); __builtin_va_list __args; __builtin_va_start(__args, __fmt); const int __len = __convf(__s, __n, __fmt, __args); __builtin_va_end(__args); return _String(__s, __s + __len); } } # 2815 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { inline int stoi(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtol, "stoi", __str.c_str(), __idx, __base); } inline long stol(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtol, "stol", __str.c_str(), __idx, __base); } inline unsigned long stoul(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoul, "stoul", __str.c_str(), __idx, __base); } inline long long stoll(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoll, "stoll", __str.c_str(), __idx, __base); } inline unsigned long long stoull(const string& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::strtoull, "stoull", __str.c_str(), __idx, __base); } inline float stof(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtof, "stof", __str.c_str(), __idx); } inline double stod(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtod, "stod", __str.c_str(), __idx); } inline long double stold(const string& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::strtold, "stold", __str.c_str(), __idx); } inline string to_string(int __val) { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(int), "%d", __val); } inline string to_string(unsigned __val) { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(unsigned), "%u", __val); } inline string to_string(long __val) { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(long), "%ld", __val); } inline string to_string(unsigned long __val) { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(unsigned long), "%lu", __val); } inline string to_string(long long __val) { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(long long), "%lld", __val); } inline string to_string(unsigned long long __val) { return __gnu_cxx::__to_xstring(&std::vsnprintf, 4 * sizeof(unsigned long long), "%llu", __val); } inline string to_string(float __val) { const int __n = __gnu_cxx::__numeric_traits::__max_exponent10 + 20; return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, "%f", __val); } inline string to_string(double __val) { const int __n = __gnu_cxx::__numeric_traits::__max_exponent10 + 20; return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, "%f", __val); } inline string to_string(long double __val) { const int __n = __gnu_cxx::__numeric_traits::__max_exponent10 + 20; return __gnu_cxx::__to_xstring(&std::vsnprintf, __n, "%Lf", __val); } inline int stoi(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstol, "stoi", __str.c_str(), __idx, __base); } inline long stol(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstol, "stol", __str.c_str(), __idx, __base); } inline unsigned long stoul(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoul, "stoul", __str.c_str(), __idx, __base); } inline long long stoll(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoll, "stoll", __str.c_str(), __idx, __base); } inline unsigned long long stoull(const wstring& __str, size_t* __idx = 0, int __base = 10) { return __gnu_cxx::__stoa(&std::wcstoull, "stoull", __str.c_str(), __idx, __base); } inline float stof(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstof, "stof", __str.c_str(), __idx); } inline double stod(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstod, "stod", __str.c_str(), __idx); } inline long double stold(const wstring& __str, size_t* __idx = 0) { return __gnu_cxx::__stoa(&std::wcstold, "stold", __str.c_str(), __idx); } inline wstring to_wstring(int __val) { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(int), L"%d", __val); } inline wstring to_wstring(unsigned __val) { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(unsigned), L"%u", __val); } inline wstring to_wstring(long __val) { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(long), L"%ld", __val); } inline wstring to_wstring(unsigned long __val) { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(unsigned long), L"%lu", __val); } inline wstring to_wstring(long long __val) { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(long long), L"%lld", __val); } inline wstring to_wstring(unsigned long long __val) { return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(unsigned long long), L"%llu", __val); } inline wstring to_wstring(float __val) { const int __n = __gnu_cxx::__numeric_traits::__max_exponent10 + 20; return __gnu_cxx::__to_xstring(&std::vswprintf, __n, L"%f", __val); } inline wstring to_wstring(double __val) { const int __n = __gnu_cxx::__numeric_traits::__max_exponent10 + 20; return __gnu_cxx::__to_xstring(&std::vswprintf, __n, L"%f", __val); } inline wstring to_wstring(long double __val) { const int __n = __gnu_cxx::__numeric_traits::__max_exponent10 + 20; return __gnu_cxx::__to_xstring(&std::vswprintf, __n, L"%Lf", __val); } } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functional_hash.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functional_hash.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functional_hash.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/hash_bytes.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/hash_bytes.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/hash_bytes.h" 3 namespace std { size_t _Hash_bytes(const void* __ptr, size_t __len, size_t __seed); size_t _Fnv_hash_bytes(const void* __ptr, size_t __len, size_t __seed); } # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functional_hash.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 49 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functional_hash.h" 3 template struct __hash_base { typedef _Result result_type; typedef _Arg argument_type; }; template struct hash : public __hash_base { size_t operator()(_Tp __val) const; }; template struct hash<_Tp*> : public __hash_base { size_t operator()(_Tp* __p) const { return reinterpret_cast(__p); } }; # 81 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/functional_hash.h" 3 template<> inline size_t hash::operator()(bool __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(char __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(signed char __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(unsigned char __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(wchar_t __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(char16_t __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(char32_t __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(short __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(int __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(long __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(long long __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(unsigned short __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(unsigned int __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(unsigned long __val) const { return static_cast(__val); }; template<> inline size_t hash::operator()(unsigned long long __val) const { return static_cast(__val); }; struct _Hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast(0xc70f6907UL)) { return _Hash_bytes(__ptr, __clength, __seed); } template static size_t hash(const _Tp& __val) { return hash(&__val, sizeof(__val)); } template static size_t __hash_combine(const _Tp& __val, size_t __hash) { return hash(&__val, sizeof(__val), __hash); } }; struct _Fnv_hash_impl { static size_t hash(const void* __ptr, size_t __clength, size_t __seed = static_cast(2166136261UL)) { return _Fnv_hash_bytes(__ptr, __clength, __seed); } template static size_t hash(const _Tp& __val) { return hash(&__val, sizeof(__val)); } template static size_t __hash_combine(const _Tp& __val, size_t __hash) { return hash(&__val, sizeof(__val), __hash); } }; template<> inline size_t hash::operator()(float __val) const { return __val != 0.0f ? std::_Hash_impl::hash(__val) : 0; } template<> inline size_t hash::operator()(double __val) const { return __val != 0.0 ? std::_Hash_impl::hash(__val) : 0; } template<> __attribute__ ((__pure__)) size_t hash::operator()(long double __val) const; } # 3033 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template<> struct hash : public __hash_base { size_t operator()(const string& __s) const { return std::_Hash_impl::hash(__s.data(), __s.length()); } }; template<> struct hash : public __hash_base { size_t operator()(const wstring& __s) const { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); } }; template<> struct hash : public __hash_base { size_t operator()(const u16string& __s) const { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(char16_t)); } }; template<> struct hash : public __hash_base { size_t operator()(const u32string& __s) const { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(char32_t)); } }; } # 55 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.tcc" 1 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.tcc" 3 # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; template const _CharT basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_terminal = _CharT(); template const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / sizeof(size_type)]; template template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag) { if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); _CharT __buf[128]; size_type __len = 0; while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) { __buf[__len++] = *__beg; ++__beg; } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _M_copy(__r->_M_refdata(), __buf, __len); try { while (__beg != __end) { if (__len == __r->_M_capacity) { _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); __r->_M_destroy(__a); __r = __another; } __r->_M_refdata()[__len++] = *__beg; ++__beg; } } catch(...) { __r->_M_destroy(__a); throw; } __r->_M_set_length_and_sharable(__len); return __r->_M_refdata(); } template template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, forward_iterator_tag) { if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) __throw_logic_error(("basic_string::_S_construct null not valid")); const size_type __dnew = static_cast(std::distance(__beg, __end)); _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); try { _S_copy_chars(__r->_M_refdata(), __beg, __end); } catch(...) { __r->_M_destroy(__a); throw; } __r->_M_set_length_and_sharable(__dnew); return __r->_M_refdata(); } template _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(size_type __n, _CharT __c, const _Alloc& __a) { if (__n == 0 && __a == _Alloc()) return _S_empty_rep()._M_refdata(); _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); if (__n) _M_assign(__r->_M_refdata(), __n, __c); __r->_M_set_length_and_sharable(__n); return __r->_M_refdata(); } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str) : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), __str.get_allocator()), __str.get_allocator()) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _Alloc& __a) : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, _Alloc()), _Alloc()) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : __s + npos, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(size_type __n, _CharT __c, const _Alloc& __a) : _M_dataplus(_S_construct(__n, __c, __a), __a) { } template template basic_string<_CharT, _Traits, _Alloc>:: basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) : _M_dataplus(_S_construct(__beg, __end, __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>:: basic_string(initializer_list<_CharT> __l, const _Alloc& __a) : _M_dataplus(_S_construct(__l.begin(), __l.end(), __a), __a) { } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const basic_string& __str) { if (_M_rep() != __str._M_rep()) { const allocator_type __a = this->get_allocator(); _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const _CharT* __s, size_type __n) { ; _M_check_length(this->size(), __n, "basic_string::assign"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(size_type(0), this->size(), __s, __n); else { const size_type __pos = __s - _M_data(); if (__pos >= __n) _M_copy(_M_data(), __s, __n); else if (__pos) _M_move(_M_data(), __s, __n); _M_rep()->_M_set_length_and_sharable(__n); return *this; } } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(size_type __n, _CharT __c) { if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_assign(_M_data() + this->size(), __n, __c); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const _CharT* __s, size_type __n) { ; if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) { if (_M_disjunct(__s)) this->reserve(__len); else { const size_type __off = __s - _M_data(); this->reserve(__len); __s = _M_data() + __off; } } _M_copy(_M_data() + this->size(), __s, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str) { const size_type __size = __str.size(); if (__size) { const size_type __len = __size + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data(), __size); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str, size_type __pos, size_type __n) { __str._M_check(__pos, "basic_string::append"); __n = __str._M_limit(__pos, __n); if (__n) { const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: insert(size_type __pos, const _CharT* __s, size_type __n) { ; _M_check(__pos, "basic_string::insert"); _M_check_length(size_type(0), __n, "basic_string::insert"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, size_type(0), __s, __n); else { const size_type __off = __s - _M_data(); _M_mutate(__pos, 0, __n); __s = _M_data() + __off; _CharT* __p = _M_data() + __pos; if (__s + __n <= __p) _M_copy(__p, __s, __n); else if (__s >= __p) _M_copy(__p, __s + __n, __n); else { const size_type __nleft = __p - __s; _M_copy(__p, __s, __nleft); _M_copy(__p + __nleft, __p + __n, __n - __nleft); } return *this; } } template typename basic_string<_CharT, _Traits, _Alloc>::iterator basic_string<_CharT, _Traits, _Alloc>:: erase(iterator __first, iterator __last) { ; const size_type __size = __last - __first; if (__size) { const size_type __pos = __first - _M_ibegin(); _M_mutate(__pos, __size, size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } else return __first; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) { ; _M_check(__pos, "basic_string::replace"); __n1 = _M_limit(__pos, __n1); _M_check_length(__n1, __n2, "basic_string::replace"); bool __left; if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, __n1, __s, __n2); else if ((__left = __s + __n2 <= _M_data() + __pos) || _M_data() + __pos + __n1 <= __s) { size_type __off = __s - _M_data(); __left ? __off : (__off += __n2 - __n1); _M_mutate(__pos, __n1, __n2); _M_copy(_M_data() + __pos, _M_data() + __off, __n2); return *this; } else { const basic_string __tmp(__s, __n2); return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); } } template void basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_destroy(const _Alloc& __a) throw () { const size_type __size = sizeof(_Rep_base) + (this->_M_capacity + 1) * sizeof(_CharT); _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); } template void basic_string<_CharT, _Traits, _Alloc>:: _M_leak_hard() { if (_M_rep() == &_S_empty_rep()) return; if (_M_rep()->_M_is_shared()) _M_mutate(0, 0, 0); _M_rep()->_M_set_leaked(); } template void basic_string<_CharT, _Traits, _Alloc>:: _M_mutate(size_type __pos, size_type __len1, size_type __len2) { const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; const size_type __how_much = __old_size - __pos - __len1; if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) { const allocator_type __a = get_allocator(); _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); if (__pos) _M_copy(__r->_M_refdata(), _M_data(), __pos); if (__how_much) _M_copy(__r->_M_refdata() + __pos + __len2, _M_data() + __pos + __len1, __how_much); _M_rep()->_M_dispose(__a); _M_data(__r->_M_refdata()); } else if (__how_much && __len1 != __len2) { _M_move(_M_data() + __pos + __len2, _M_data() + __pos + __len1, __how_much); } _M_rep()->_M_set_length_and_sharable(__new_size); } template void basic_string<_CharT, _Traits, _Alloc>:: reserve(size_type __res) { if (__res != this->capacity() || _M_rep()->_M_is_shared()) { if (__res < this->size()) __res = this->size(); const allocator_type __a = get_allocator(); _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } } template void basic_string<_CharT, _Traits, _Alloc>:: swap(basic_string& __s) { if (_M_rep()->_M_is_leaked()) _M_rep()->_M_set_sharable(); if (__s._M_rep()->_M_is_leaked()) __s._M_rep()->_M_set_sharable(); if (this->get_allocator() == __s.get_allocator()) { _CharT* __tmp = _M_data(); _M_data(__s._M_data()); __s._M_data(__tmp); } else { const basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator()); const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), this->get_allocator()); *this = __tmp2; __s = __tmp1; } } template typename basic_string<_CharT, _Traits, _Alloc>::_Rep* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _S_create(size_type __capacity, size_type __old_capacity, const _Alloc& __alloc) { if (__capacity > _S_max_size) __throw_length_error(("basic_string::_S_create")); # 579 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_string.tcc" 3 const size_type __pagesize = 4096; const size_type __malloc_header_size = 4 * sizeof(void*); if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) __capacity = 2 * __old_capacity; size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); const size_type __adj_size = __size + __malloc_header_size; if (__adj_size > __pagesize && __capacity > __old_capacity) { const size_type __extra = __pagesize - __adj_size % __pagesize; __capacity += __extra / sizeof(_CharT); if (__capacity > _S_max_size) __capacity = _S_max_size; __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); } void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); _Rep *__p = new (__place) _Rep; __p->_M_capacity = __capacity; __p->_M_set_sharable(); return __p; } template _CharT* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_clone(const _Alloc& __alloc, size_type __res) { const size_type __requested_cap = this->_M_length + __res; _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, __alloc); if (this->_M_length) _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); __r->_M_set_length_and_sharable(this->_M_length); return __r->_M_refdata(); } template void basic_string<_CharT, _Traits, _Alloc>:: resize(size_type __n, _CharT __c) { const size_type __size = this->size(); _M_check_length(__size, __n, "basic_string::resize"); if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) this->erase(__n); } template template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type) { const basic_string __s(__k1, __k2); const size_type __n1 = __i2 - __i1; _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), __s.size()); } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c) { _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); _M_mutate(__pos1, __n1, __n2); if (__n2) _M_assign(_M_data() + __pos1, __n2, __c); return *this; } template basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) { _M_mutate(__pos1, __n1, __n2); if (__n2) _M_copy(_M_data() + __pos1, __s, __n2); return *this; } template basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { ; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; const __size_type __len = _Traits::length(__lhs); __string_type __str; __str.reserve(__len + __rhs.size()); __str.append(__lhs, __len); __str.append(__rhs); return __str; } template basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str; const __size_type __len = __rhs.size(); __str.reserve(__len + 1); __str.append(__size_type(1), __lhs); __str.append(__rhs); return __str; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: copy(_CharT* __s, size_type __n, size_type __pos) const { _M_check(__pos, "basic_string::copy"); __n = _M_limit(__pos, __n); ; if (__n) _M_copy(__s, _M_data() + __pos, __n); return __n; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(const _CharT* __s, size_type __pos, size_type __n) const { ; const size_type __size = this->size(); const _CharT* __data = _M_data(); if (__n == 0) return __pos <= __size ? __pos : npos; if (__n <= __size) { for (; __pos <= __size - __n; ++__pos) if (traits_type::eq(__data[__pos], __s[0]) && traits_type::compare(__data + __pos + 1, __s + 1, __n - 1) == 0) return __pos; } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(_CharT __c, size_type __pos) const noexcept { size_type __ret = npos; const size_type __size = this->size(); if (__pos < __size) { const _CharT* __data = _M_data(); const size_type __n = __size - __pos; const _CharT* __p = traits_type::find(__data + __pos, __n, __c); if (__p) __ret = __p - __data; } return __ret; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const { ; const size_type __size = this->size(); if (__n <= __size) { __pos = std::min(size_type(__size - __n), __pos); const _CharT* __data = _M_data(); do { if (traits_type::compare(__data + __pos, __s, __n) == 0) return __pos; } while (__pos-- > 0); } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(_CharT __c, size_type __pos) const noexcept { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; for (++__size; __size-- > 0; ) if (traits_type::eq(_M_data()[__size], __c)) return __size; } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const { ; for (; __n && __pos < this->size(); ++__pos) { const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); if (__p) return __pos; } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const { ; size_type __size = this->size(); if (__size && __n) { if (--__size > __pos) __size = __pos; do { if (traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size-- != 0); } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const { ; for (; __pos < this->size(); ++__pos) if (!traits_type::find(__s, __n, _M_data()[__pos])) return __pos; return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(_CharT __c, size_type __pos) const noexcept { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(_M_data()[__pos], __c)) return __pos; return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const { ; size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size--); } return npos; } template typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(_CharT __c, size_type __pos) const noexcept { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::eq(_M_data()[__size], __c)) return __size; } while (__size--); } return npos; } template int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n, const basic_string& __str) const { _M_check(__pos, "basic_string::compare"); __n = _M_limit(__pos, __n); const size_type __osize = __str.size(); const size_type __len = std::min(__n, __osize); int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); if (!__r) __r = _S_compare(__n, __osize); return __r; } template int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const { _M_check(__pos1, "basic_string::compare"); __str._M_check(__pos2, "basic_string::compare"); __n1 = _M_limit(__pos1, __n1); __n2 = __str._M_limit(__pos2, __n2); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos1, __str.data() + __pos2, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } template int basic_string<_CharT, _Traits, _Alloc>:: compare(const _CharT* __s) const { ; const size_type __size = this->size(); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __s, __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } template int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__n1, __osize); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __osize); return __r; } template int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; typedef ctype<_CharT> __ctype_type; typedef typename __ctype_type::ctype_base __ctype_base; __size_type __extracted = 0; typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { try { __str.erase(); _CharT __buf[128]; __size_type __len = 0; const streamsize __w = __in.width(); const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size(); const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !__ct.is(__ctype_base::space, _Traits::to_char_type(__c))) { if (__len == sizeof(__buf) / sizeof(_CharT)) { __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); __len = 0; } __buf[__len++] = _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } __str.append(__buf, __len); if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; __in.width(0); } catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); throw; } catch(...) { __in._M_setstate(__ios_base::badbit); } } if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } template basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; __size_type __extracted = 0; const __size_type __n = __str.max_size(); typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, true); if (__cerb) { try { __str.erase(); const __int_type __idelim = _Traits::to_int_type(__delim); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !_Traits::eq_int_type(__c, __idelim)) { __str += _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; else if (_Traits::eq_int_type(__c, __idelim)) { ++__extracted; __in.rdbuf()->sbumpc(); } else __err |= __ios_base::failbit; } catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(__ios_base::badbit); throw; } catch(...) { __in._M_setstate(__ios_base::badbit); } } if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } extern template class basic_string; extern template basic_istream& operator>>(basic_istream&, string&); extern template basic_ostream& operator<<(basic_ostream&, const string&); extern template basic_istream& getline(basic_istream&, string&, char); extern template basic_istream& getline(basic_istream&, string&); extern template class basic_string; extern template basic_istream& operator>>(basic_istream&, wstring&); extern template basic_ostream& operator<<(basic_ostream&, const wstring&); extern template basic_istream& getline(basic_istream&, wstring&, wchar_t); extern template basic_istream& getline(basic_istream&, wstring&); } # 56 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/string" 2 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits" 3 # 148 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits" 3 namespace std __attribute__ ((__visibility__ ("default"))) { enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; # 192 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits" 3 struct __numeric_limits_base { static constexpr bool is_specialized = false; static constexpr int digits = 0; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr bool is_iec559 = false; static constexpr bool is_bounded = false; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; # 303 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/limits" 3 template struct numeric_limits : public __numeric_limits_base { static constexpr _Tp min() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp max() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp lowest() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp epsilon() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp round_error() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp infinity() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp quiet_NaN() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp signaling_NaN() noexcept { return static_cast<_Tp>(0); } static constexpr _Tp denorm_min() noexcept { return static_cast<_Tp>(0); } }; template struct numeric_limits : public numeric_limits<_Tp> { }; template struct numeric_limits : public numeric_limits<_Tp> { }; template struct numeric_limits : public numeric_limits<_Tp> { }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr bool min() noexcept { return false; } static constexpr bool max() noexcept { return true; } static constexpr bool lowest() noexcept { return min(); } static constexpr int digits = 1; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr bool epsilon() noexcept { return false; } static constexpr bool round_error() noexcept { return false; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr bool infinity() noexcept { return false; } static constexpr bool quiet_NaN() noexcept { return false; } static constexpr bool signaling_NaN() noexcept { return false; } static constexpr bool denorm_min() noexcept { return false; } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr char min() noexcept { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } static constexpr char max() noexcept { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } static constexpr char lowest() noexcept { return min(); } static constexpr int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); static constexpr int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char epsilon() noexcept { return 0; } static constexpr char round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char infinity() noexcept { return char(); } static constexpr char quiet_NaN() noexcept { return char(); } static constexpr char signaling_NaN() noexcept { return char(); } static constexpr char denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr signed char min() noexcept { return -127 - 1; } static constexpr signed char max() noexcept { return 127; } static constexpr signed char lowest() noexcept { return min(); } static constexpr int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); static constexpr int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr signed char epsilon() noexcept { return 0; } static constexpr signed char round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr signed char infinity() noexcept { return static_cast(0); } static constexpr signed char quiet_NaN() noexcept { return static_cast(0); } static constexpr signed char signaling_NaN() noexcept { return static_cast(0); } static constexpr signed char denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned char min() noexcept { return 0; } static constexpr unsigned char max() noexcept { return 127 * 2U + 1; } static constexpr unsigned char lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned char epsilon() noexcept { return 0; } static constexpr unsigned char round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned char infinity() noexcept { return static_cast(0); } static constexpr unsigned char quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned char signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned char denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr wchar_t min() noexcept { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } static constexpr wchar_t max() noexcept { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } static constexpr wchar_t lowest() noexcept { return min(); } static constexpr int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((wchar_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr wchar_t epsilon() noexcept { return 0; } static constexpr wchar_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr wchar_t infinity() noexcept { return wchar_t(); } static constexpr wchar_t quiet_NaN() noexcept { return wchar_t(); } static constexpr wchar_t signaling_NaN() noexcept { return wchar_t(); } static constexpr wchar_t denorm_min() noexcept { return wchar_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr char16_t min() noexcept { return (((char16_t)(-1) < 0) ? (char16_t)1 << (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) : (char16_t)0); } static constexpr char16_t max() noexcept { return (((char16_t)(-1) < 0) ? (((((char16_t)1 << ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char16_t)0); } static constexpr char16_t lowest() noexcept { return min(); } static constexpr int digits = (sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(char16_t) * 8 - ((char16_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char16_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char16_t epsilon() noexcept { return 0; } static constexpr char16_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char16_t infinity() noexcept { return char16_t(); } static constexpr char16_t quiet_NaN() noexcept { return char16_t(); } static constexpr char16_t signaling_NaN() noexcept { return char16_t(); } static constexpr char16_t denorm_min() noexcept { return char16_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr char32_t min() noexcept { return (((char32_t)(-1) < 0) ? (char32_t)1 << (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) : (char32_t)0); } static constexpr char32_t max() noexcept { return (((char32_t)(-1) < 0) ? (((((char32_t)1 << ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char32_t)0); } static constexpr char32_t lowest() noexcept { return min(); } static constexpr int digits = (sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)); static constexpr int digits10 = ((sizeof(char32_t) * 8 - ((char32_t)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = ((char32_t)(-1) < 0); static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr char32_t epsilon() noexcept { return 0; } static constexpr char32_t round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr char32_t infinity() noexcept { return char32_t(); } static constexpr char32_t quiet_NaN() noexcept { return char32_t(); } static constexpr char32_t signaling_NaN() noexcept { return char32_t(); } static constexpr char32_t denorm_min() noexcept { return char32_t(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr short min() noexcept { return -32767 - 1; } static constexpr short max() noexcept { return 32767; } static constexpr short lowest() noexcept { return min(); } static constexpr int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); static constexpr int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr short epsilon() noexcept { return 0; } static constexpr short round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr short infinity() noexcept { return short(); } static constexpr short quiet_NaN() noexcept { return short(); } static constexpr short signaling_NaN() noexcept { return short(); } static constexpr short denorm_min() noexcept { return short(); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned short min() noexcept { return 0; } static constexpr unsigned short max() noexcept { return 32767 * 2U + 1; } static constexpr unsigned short lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned short epsilon() noexcept { return 0; } static constexpr unsigned short round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned short infinity() noexcept { return static_cast(0); } static constexpr unsigned short quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned short signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned short denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr int min() noexcept { return -2147483647 - 1; } static constexpr int max() noexcept { return 2147483647; } static constexpr int lowest() noexcept { return min(); } static constexpr int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); static constexpr int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr int epsilon() noexcept { return 0; } static constexpr int round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr int infinity() noexcept { return static_cast(0); } static constexpr int quiet_NaN() noexcept { return static_cast(0); } static constexpr int signaling_NaN() noexcept { return static_cast(0); } static constexpr int denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned int min() noexcept { return 0; } static constexpr unsigned int max() noexcept { return 2147483647 * 2U + 1; } static constexpr unsigned int lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned int epsilon() noexcept { return 0; } static constexpr unsigned int round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned int infinity() noexcept { return static_cast(0); } static constexpr unsigned int quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned int signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned int denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr long min() noexcept { return -9223372036854775807L - 1; } static constexpr long max() noexcept { return 9223372036854775807L; } static constexpr long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); static constexpr int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr long epsilon() noexcept { return 0; } static constexpr long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr long infinity() noexcept { return static_cast(0); } static constexpr long quiet_NaN() noexcept { return static_cast(0); } static constexpr long signaling_NaN() noexcept { return static_cast(0); } static constexpr long denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned long min() noexcept { return 0; } static constexpr unsigned long max() noexcept { return 9223372036854775807L * 2UL + 1; } static constexpr unsigned long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned long epsilon() noexcept { return 0; } static constexpr unsigned long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned long infinity() noexcept { return static_cast(0); } static constexpr unsigned long quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned long signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned long denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr long long min() noexcept { return -9223372036854775807LL - 1; } static constexpr long long max() noexcept { return 9223372036854775807LL; } static constexpr long long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); static constexpr int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr long long epsilon() noexcept { return 0; } static constexpr long long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr long long infinity() noexcept { return static_cast(0); } static constexpr long long quiet_NaN() noexcept { return static_cast(0); } static constexpr long long signaling_NaN() noexcept { return static_cast(0); } static constexpr long long denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned long long min() noexcept { return 0; } static constexpr unsigned long long max() noexcept { return 9223372036854775807LL * 2ULL + 1; } static constexpr unsigned long long lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned long long epsilon() noexcept { return 0; } static constexpr unsigned long long round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned long long infinity() noexcept { return static_cast(0); } static constexpr unsigned long long quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned long long signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned long long denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept { return (((__int128)(-1) < 0) ? (__int128)1 << (sizeof(__int128) * 8 - ((__int128)(-1) < 0)) : (__int128)0); } static constexpr __int128 max() noexcept { return (((__int128)(-1) < 0) ? (((((__int128)1 << ((sizeof(__int128) * 8 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0); } static constexpr __int128 lowest() noexcept { return min(); } static constexpr int digits = (sizeof(__int128) * 8 - ((__int128)(-1) < 0)); static constexpr int digits10 = ((sizeof(__int128) * 8 - ((__int128)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept { return 0; } static constexpr __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept { return static_cast<__int128>(0); } static constexpr __int128 quiet_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 signaling_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 denorm_min() noexcept { return static_cast<__int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept { return 0; } static constexpr unsigned __int128 max() noexcept { return (((unsigned __int128)(-1) < 0) ? (((((unsigned __int128)1 << ((sizeof(unsigned __int128) * 8 - ((unsigned __int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(unsigned __int128)0); } static constexpr unsigned __int128 lowest() noexcept { return min(); } static constexpr int digits = (sizeof(unsigned __int128) * 8 - ((unsigned __int128)(-1) < 0)); static constexpr int digits10 = ((sizeof(unsigned __int128) * 8 - ((unsigned __int128)(-1) < 0)) * 643L / 2136); static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept { return 0; } static constexpr unsigned __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept { return static_cast(0); } static constexpr unsigned __int128 quiet_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 signaling_NaN() noexcept { return static_cast(0); } static constexpr unsigned __int128 denorm_min() noexcept { return static_cast(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr float min() noexcept { return 1.17549435082228750797e-38F; } static constexpr float max() noexcept { return 3.40282346638528859812e+38F; } static constexpr float lowest() noexcept { return -3.40282346638528859812e+38F; } static constexpr int digits = 24; static constexpr int digits10 = 6; static constexpr int max_digits10 = (2 + (24) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr float epsilon() noexcept { return 1.19209289550781250000e-7F; } static constexpr float round_error() noexcept { return 0.5F; } static constexpr int min_exponent = (-125); static constexpr int min_exponent10 = (-37); static constexpr int max_exponent = 128; static constexpr int max_exponent10 = 38; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr float infinity() noexcept { return __builtin_huge_valf(); } static constexpr float quiet_NaN() noexcept { return __builtin_nanf(""); } static constexpr float signaling_NaN() noexcept { return __builtin_nansf(""); } static constexpr float denorm_min() noexcept { return 1.40129846432481707092e-45F; } static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr double min() noexcept { return double(2.22507385850720138309e-308L); } static constexpr double max() noexcept { return double(1.79769313486231570815e+308L); } static constexpr double lowest() noexcept { return -double(1.79769313486231570815e+308L); } static constexpr int digits = 53; static constexpr int digits10 = 15; static constexpr int max_digits10 = (2 + (53) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr double epsilon() noexcept { return double(2.22044604925031308085e-16L); } static constexpr double round_error() noexcept { return 0.5; } static constexpr int min_exponent = (-1021); static constexpr int min_exponent10 = (-307); static constexpr int max_exponent = 1024; static constexpr int max_exponent10 = 308; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr double infinity() noexcept { return __builtin_huge_val(); } static constexpr double quiet_NaN() noexcept { return __builtin_nan(""); } static constexpr double signaling_NaN() noexcept { return __builtin_nans(""); } static constexpr double denorm_min() noexcept { return double(4.94065645841246544177e-324L); } static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; template<> struct numeric_limits { static constexpr bool is_specialized = true; static constexpr long double min() noexcept { return 3.36210314311209350626e-4932L; } static constexpr long double max() noexcept { return 1.18973149535723176502e+4932L; } static constexpr long double lowest() noexcept { return -1.18973149535723176502e+4932L; } static constexpr int digits = 64; static constexpr int digits10 = 18; static constexpr int max_digits10 = (2 + (64) * 643L / 2136); static constexpr bool is_signed = true; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 2; static constexpr long double epsilon() noexcept { return 1.08420217248550443401e-19L; } static constexpr long double round_error() noexcept { return 0.5L; } static constexpr int min_exponent = (-16381); static constexpr int min_exponent10 = (-4931); static constexpr int max_exponent = 16384; static constexpr int max_exponent10 = 4932; static constexpr bool has_infinity = 1; static constexpr bool has_quiet_NaN = 1; static constexpr bool has_signaling_NaN = has_quiet_NaN; static constexpr float_denorm_style has_denorm = bool(1) ? denorm_present : denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr long double infinity() noexcept { return __builtin_huge_vall(); } static constexpr long double quiet_NaN() noexcept { return __builtin_nanl(""); } static constexpr long double signaling_NaN() noexcept { return __builtin_nansl(""); } static constexpr long double denorm_min() noexcept { return 3.64519953188247460253e-4951L; } static constexpr bool is_iec559 = has_infinity && has_quiet_NaN && has_denorm == denorm_present; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_to_nearest; }; } # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector" 1 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector" 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_uninitialized.h" 1 3 # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_uninitialized.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __uninitialized_copy { template static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { _ForwardIterator __cur = __result; try { for (; __first != __last; ++__first, ++__cur) std::_Construct(std::__addressof(*__cur), *__first); return __cur; } catch(...) { std::_Destroy(__result, __cur); throw; } } }; template<> struct __uninitialized_copy { template static _ForwardIterator __uninit_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { return std::copy(__first, __last, __result); } }; # 107 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_uninitialized.h" 3 template inline _ForwardIterator uninitialized_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType2; return std::__uninitialized_copy<(__is_trivial(_ValueType1) && __is_trivial(_ValueType2))>:: __uninit_copy(__first, __last, __result); } template struct __uninitialized_fill { template static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { _ForwardIterator __cur = __first; try { for (; __cur != __last; ++__cur) std::_Construct(std::__addressof(*__cur), __x); } catch(...) { std::_Destroy(__first, __cur); throw; } } }; template<> struct __uninitialized_fill { template static void __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { std::fill(__first, __last, __x); } }; # 164 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_uninitialized.h" 3 template inline void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_fill<__is_trivial(_ValueType)>:: __uninit_fill(__first, __last, __x); } template struct __uninitialized_fill_n { template static void __uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { _ForwardIterator __cur = __first; try { for (; __n > 0; --__n, ++__cur) std::_Construct(std::__addressof(*__cur), __x); } catch(...) { std::_Destroy(__first, __cur); throw; } } }; template<> struct __uninitialized_fill_n { template static void __uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { std::fill_n(__first, __n, __x); } }; # 218 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_uninitialized.h" 3 template inline void uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_fill_n<__is_trivial(_ValueType)>:: __uninit_fill_n(__first, __n, __x); } template _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __cur = __result; try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __first != __last; ++__first, ++__cur) __traits::construct(__alloc, std::__addressof(*__cur), *__first); return __cur; } catch(...) { std::_Destroy(__result, __cur, __alloc); throw; } } template inline _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, allocator<_Tp>&) { return std::uninitialized_copy(__first, __last, __result); } template inline _ForwardIterator __uninitialized_move_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { return std::__uninitialized_copy_a(std::make_move_iterator(__first), std::make_move_iterator(__last), __result, __alloc); } template inline _ForwardIterator __uninitialized_move_if_noexcept_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { return std::__uninitialized_copy_a (std::__make_move_if_noexcept_iterator(__first), std::__make_move_if_noexcept_iterator(__last), __result, __alloc); } template void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __cur != __last; ++__cur) __traits::construct(__alloc, std::__addressof(*__cur), __x); } catch(...) { std::_Destroy(__first, __cur, __alloc); throw; } } template inline void __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x, allocator<_Tp2>&) { std::uninitialized_fill(__first, __last, __x); } template void __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __cur = __first; try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __n > 0; --__n, ++__cur) __traits::construct(__alloc, std::__addressof(*__cur), __x); } catch(...) { std::_Destroy(__first, __cur, __alloc); throw; } } template inline void __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, allocator<_Tp2>&) { std::uninitialized_fill_n(__first, __n, __x); } # 348 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_uninitialized.h" 3 template inline _ForwardIterator __uninitialized_copy_move(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, __result, __alloc); try { return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); } catch(...) { std::_Destroy(__result, __mid, __alloc); throw; } } template inline _ForwardIterator __uninitialized_move_copy(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _ForwardIterator __result, _Allocator& __alloc) { _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, __result, __alloc); try { return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); } catch(...) { std::_Destroy(__result, __mid, __alloc); throw; } } template inline _ForwardIterator __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, const _Tp& __x, _InputIterator __first, _InputIterator __last, _Allocator& __alloc) { std::__uninitialized_fill_a(__result, __mid, __x, __alloc); try { return std::__uninitialized_move_a(__first, __last, __mid, __alloc); } catch(...) { std::_Destroy(__result, __mid, __alloc); throw; } } template inline void __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, const _Tp& __x, _Allocator& __alloc) { _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, __first2, __alloc); try { std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); } catch(...) { std::_Destroy(__first2, __mid2, __alloc); throw; } } template struct __uninitialized_default_1 { template static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) { _ForwardIterator __cur = __first; try { for (; __cur != __last; ++__cur) std::_Construct(std::__addressof(*__cur)); } catch(...) { std::_Destroy(__first, __cur); throw; } } }; template<> struct __uninitialized_default_1 { template static void __uninit_default(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::fill(__first, __last, _ValueType()); } }; template struct __uninitialized_default_n_1 { template static void __uninit_default_n(_ForwardIterator __first, _Size __n) { _ForwardIterator __cur = __first; try { for (; __n > 0; --__n, ++__cur) std::_Construct(std::__addressof(*__cur)); } catch(...) { std::_Destroy(__first, __cur); throw; } } }; template<> struct __uninitialized_default_n_1 { template static void __uninit_default_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::fill_n(__first, __n, _ValueType()); } }; template inline void __uninitialized_default(_ForwardIterator __first, _ForwardIterator __last) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_default_1<__is_trivial(_ValueType)>:: __uninit_default(__first, __last); } template inline void __uninitialized_default_n(_ForwardIterator __first, _Size __n) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; std::__uninitialized_default_n_1<__is_trivial(_ValueType)>:: __uninit_default_n(__first, __n); } template void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, _Allocator& __alloc) { _ForwardIterator __cur = __first; try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __cur != __last; ++__cur) __traits::construct(__alloc, std::__addressof(*__cur)); } catch(...) { std::_Destroy(__first, __cur, __alloc); throw; } } template inline void __uninitialized_default_a(_ForwardIterator __first, _ForwardIterator __last, allocator<_Tp>&) { std::__uninitialized_default(__first, __last); } template void __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, _Allocator& __alloc) { _ForwardIterator __cur = __first; try { typedef __gnu_cxx::__alloc_traits<_Allocator> __traits; for (; __n > 0; --__n, ++__cur) __traits::construct(__alloc, std::__addressof(*__cur)); } catch(...) { std::_Destroy(__first, __cur, __alloc); throw; } } template inline void __uninitialized_default_n_a(_ForwardIterator __first, _Size __n, allocator<_Tp>&) { std::__uninitialized_default_n(__first, __n); } template _ForwardIterator __uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result, input_iterator_tag) { _ForwardIterator __cur = __result; try { for (; __n > 0; --__n, ++__first, ++__cur) std::_Construct(std::__addressof(*__cur), *__first); return __cur; } catch(...) { std::_Destroy(__result, __cur); throw; } } template inline _ForwardIterator __uninitialized_copy_n(_RandomAccessIterator __first, _Size __n, _ForwardIterator __result, random_access_iterator_tag) { return std::uninitialized_copy(__first, __first + __n, __result); } # 647 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_uninitialized.h" 3 template inline _ForwardIterator uninitialized_copy_n(_InputIterator __first, _Size __n, _ForwardIterator __result) { return std::__uninitialized_copy_n(__first, __n, __result, std::__iterator_category(__first)); } } # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 1 3 # 67 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct _Vector_base { typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type; typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer; struct _Vector_impl : public _Tp_alloc_type { pointer _M_start; pointer _M_finish; pointer _M_end_of_storage; _Vector_impl() : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } _Vector_impl(_Tp_alloc_type const& __a) : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } _Vector_impl(_Tp_alloc_type&& __a) : _Tp_alloc_type(std::move(__a)), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } void _M_swap_data(_Vector_impl& __x) { std::swap(_M_start, __x._M_start); std::swap(_M_finish, __x._M_finish); std::swap(_M_end_of_storage, __x._M_end_of_storage); } }; public: typedef _Alloc allocator_type; _Tp_alloc_type& _M_get_Tp_allocator() noexcept { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } const _Tp_alloc_type& _M_get_Tp_allocator() const noexcept { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Tp_allocator()); } _Vector_base() : _M_impl() { } _Vector_base(const allocator_type& __a) : _M_impl(__a) { } _Vector_base(size_t __n) : _M_impl() { _M_create_storage(__n); } _Vector_base(size_t __n, const allocator_type& __a) : _M_impl(__a) { _M_create_storage(__n); } _Vector_base(_Tp_alloc_type&& __a) : _M_impl(std::move(__a)) { } _Vector_base(_Vector_base&& __x) : _M_impl(std::move(__x._M_get_Tp_allocator())) { this->_M_impl._M_swap_data(__x._M_impl); } _Vector_base(_Vector_base&& __x, const allocator_type& __a) : _M_impl(__a) { if (__x.get_allocator() == __a) this->_M_impl._M_swap_data(__x._M_impl); else { size_t __n = __x._M_impl._M_finish - __x._M_impl._M_start; _M_create_storage(__n); } } ~_Vector_base() { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } public: _Vector_impl _M_impl; pointer _M_allocate(size_t __n) { return __n != 0 ? _M_impl.allocate(__n) : 0; } void _M_deallocate(pointer __p, size_t __n) { if (__p) _M_impl.deallocate(__p, __n); } private: void _M_create_storage(size_t __n) { this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_finish = this->_M_impl._M_start; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } }; # 207 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template > class vector : protected _Vector_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; typedef _Vector_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits; public: typedef _Tp value_type; typedef typename _Base::pointer pointer; typedef typename _Alloc_traits::const_pointer const_pointer; typedef typename _Alloc_traits::reference reference; typedef typename _Alloc_traits::const_reference const_reference; typedef __gnu_cxx::__normal_iterator iterator; typedef __gnu_cxx::__normal_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_M_impl; using _Base::_M_get_Tp_allocator; public: vector() : _Base() { } explicit vector(const allocator_type& __a) : _Base(__a) { } # 265 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 explicit vector(size_type __n) : _Base(__n) { _M_default_initialize(__n); } # 278 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 vector(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) : _Base(__n, __a) { _M_fill_initialize(__n, __value); } # 307 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 vector(const vector& __x) : _Base(__x.size(), _Alloc_traits::_S_select_on_copy(__x._M_get_Tp_allocator())) { this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } # 324 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 vector(vector&& __x) noexcept : _Base(std::move(__x)) { } vector(const vector& __x, const allocator_type& __a) : _Base(__x.size(), __a) { this->_M_impl._M_finish = std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } vector(vector&& __rv, const allocator_type& __m) : _Base(std::move(__rv), __m) { if (__rv.get_allocator() != __m) { this->_M_impl._M_finish = std::__uninitialized_move_a(__rv.begin(), __rv.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); __rv.clear(); } } # 361 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 vector(initializer_list __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_range_initialize(__l.begin(), __l.end(), random_access_iterator_tag()); } # 386 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~vector() noexcept { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); } # 414 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 vector& operator=(const vector& __x); # 425 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 vector& operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move()) { if (_Alloc_traits::_S_propagate_on_move_assign()) { const vector __tmp(std::move(*this)); this->_M_impl._M_swap_data(__x._M_impl); std::__alloc_on_move(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } else if (_Alloc_traits::_S_always_equal() || __x._M_get_Tp_allocator() == this->_M_get_Tp_allocator()) { this->clear(); this->_M_impl._M_swap_data(__x._M_impl); } else { this->assign(std::__make_move_if_noexcept_iterator(__x.begin()), std::__make_move_if_noexcept_iterator(__x.end())); __x.clear(); } return *this; } # 466 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 vector& operator=(initializer_list __l) { this->assign(__l.begin(), __l.end()); return *this; } # 484 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 500 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } # 521 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void assign(initializer_list __l) { this->assign(__l.begin(), __l.end()); } using _Base::get_allocator; iterator begin() noexcept { return iterator(this->_M_impl._M_start); } const_iterator begin() const noexcept { return const_iterator(this->_M_impl._M_start); } iterator end() noexcept { return iterator(this->_M_impl._M_finish); } const_iterator end() const noexcept { return const_iterator(this->_M_impl._M_finish); } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } const_iterator cbegin() const noexcept { return const_iterator(this->_M_impl._M_start); } const_iterator cend() const noexcept { return const_iterator(this->_M_impl._M_finish); } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } size_type size() const noexcept { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } size_type max_size() const noexcept { return _Alloc_traits::max_size(_M_get_Tp_allocator()); } # 661 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void resize(size_type __new_size) { if (__new_size > size()) _M_default_append(__new_size - size()); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } # 681 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void resize(size_type __new_size, const value_type& __x) { if (__new_size > size()) insert(end(), __new_size - size(), __x); else if (__new_size < size()) _M_erase_at_end(this->_M_impl._M_start + __new_size); } # 713 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void shrink_to_fit() { _M_shrink_to_fit(); } size_type capacity() const noexcept { return size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } bool empty() const noexcept { return begin() == end(); } # 752 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void reserve(size_type __n); # 767 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 reference operator[](size_type __n) { return *(this->_M_impl._M_start + __n); } # 782 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 const_reference operator[](size_type __n) const { return *(this->_M_impl._M_start + __n); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("vector::_M_range_check")); } public: # 807 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } # 825 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } # 872 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 _Tp* data() noexcept { return std::__addressof(front()); } const _Tp* data() const noexcept { return std::__addressof(front()); } # 898 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void push_back(const value_type& __x) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; } else _M_emplace_back_aux(__x); } void push_back(value_type&& __x) { emplace_back(std::move(__x)); } template void emplace_back(_Args&&... __args); # 934 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void pop_back() { --this->_M_impl._M_finish; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); } # 954 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template iterator emplace(iterator __position, _Args&&... __args); # 970 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 iterator insert(iterator __position, const value_type& __x); # 985 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 iterator insert(iterator __position, value_type&& __x) { return emplace(__position, std::move(__x)); } # 1002 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void insert(iterator __position, initializer_list __l) { this->insert(__position, __l.begin(), __l.end()); } # 1020 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void insert(iterator __position, size_type __n, const value_type& __x) { _M_fill_insert(__position, __n, __x); } # 1038 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } # 1063 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 iterator erase(iterator __position); # 1084 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 iterator erase(iterator __first, iterator __last); # 1096 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 void swap(vector& __x) noexcept(_Alloc_traits::_S_nothrow_swap()) { this->_M_impl._M_swap_data(__x._M_impl); _Alloc_traits::_S_on_swap(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } void clear() noexcept { _M_erase_at_end(this->_M_impl._M_start); } protected: template pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last) { pointer __result = this->_M_allocate(__n); try { std::__uninitialized_copy_a(__first, __last, __result, _M_get_Tp_allocator()); return __result; } catch(...) { _M_deallocate(__result, __n); throw; } } # 1148 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template void _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) { this->_M_impl._M_start = _M_allocate(static_cast(__n)); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + static_cast(__n); _M_fill_initialize(static_cast(__n), __value); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_initialize(__first, __last, _IterCategory()); } template void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); this->_M_impl._M_start = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; this->_M_impl._M_finish = std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_start, _M_get_Tp_allocator()); } void _M_fill_initialize(size_type __n, const value_type& __value) { std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, _M_get_Tp_allocator()); this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; } void _M_default_initialize(size_type __n) { std::__uninitialized_default_n_a(this->_M_impl._M_start, __n, _M_get_Tp_allocator()); this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; } # 1222 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_assign_aux(__first, __last, _IterCategory()); } template void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_assign(size_type __n, const value_type& __val); # 1262 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type) { _M_fill_insert(__pos, __n, __val); } template void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_insert(__pos, __first, __last, _IterCategory()); } template void _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_range_insert(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); void _M_default_append(size_type __n); bool _M_shrink_to_fit(); template void _M_insert_aux(iterator __position, _Args&&... __args); template void _M_emplace_back_aux(_Args&&... __args); size_type _M_check_len(size_type __n, const char* __s) const { if (max_size() - size() < __n) __throw_length_error((__s)); const size_type __len = size() + std::max(size(), __n); return (__len < size() || __len > max_size()) ? max_size() : __len; } void _M_erase_at_end(pointer __pos) { std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __pos; } }; # 1353 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template inline bool operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return (__x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin())); } # 1370 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_vector.h" 3 template inline bool operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) { return !(__x < __y); } template inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) { __x.swap(__y); } } # 66 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_bvector.h" 1 3 # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_bvector.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { typedef unsigned long _Bit_type; enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; struct _Bit_reference { _Bit_type * _M_p; _Bit_type _M_mask; _Bit_reference(_Bit_type * __x, _Bit_type __y) : _M_p(__x), _M_mask(__y) { } _Bit_reference() noexcept : _M_p(0), _M_mask(0) { } operator bool() const noexcept { return !!(*_M_p & _M_mask); } _Bit_reference& operator=(bool __x) noexcept { if (__x) *_M_p |= _M_mask; else *_M_p &= ~_M_mask; return *this; } _Bit_reference& operator=(const _Bit_reference& __x) noexcept { return *this = bool(__x); } bool operator==(const _Bit_reference& __x) const { return bool(*this) == bool(__x); } bool operator<(const _Bit_reference& __x) const { return !bool(*this) && bool(__x); } void flip() noexcept { *_M_p ^= _M_mask; } }; struct _Bit_iterator_base : public std::iterator { _Bit_type * _M_p; unsigned int _M_offset; _Bit_iterator_base(_Bit_type * __x, unsigned int __y) : _M_p(__x), _M_offset(__y) { } void _M_bump_up() { if (_M_offset++ == int(_S_word_bit) - 1) { _M_offset = 0; ++_M_p; } } void _M_bump_down() { if (_M_offset-- == 0) { _M_offset = int(_S_word_bit) - 1; --_M_p; } } void _M_incr(ptrdiff_t __i) { difference_type __n = __i + _M_offset; _M_p += __n / int(_S_word_bit); __n = __n % int(_S_word_bit); if (__n < 0) { __n += int(_S_word_bit); --_M_p; } _M_offset = static_cast(__n); } bool operator==(const _Bit_iterator_base& __i) const { return _M_p == __i._M_p && _M_offset == __i._M_offset; } bool operator<(const _Bit_iterator_base& __i) const { return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset); } bool operator!=(const _Bit_iterator_base& __i) const { return !(*this == __i); } bool operator>(const _Bit_iterator_base& __i) const { return __i < *this; } bool operator<=(const _Bit_iterator_base& __i) const { return !(__i < *this); } bool operator>=(const _Bit_iterator_base& __i) const { return !(*this < __i); } }; inline ptrdiff_t operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { return (int(_S_word_bit) * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset); } struct _Bit_iterator : public _Bit_iterator_base { typedef _Bit_reference reference; typedef _Bit_reference* pointer; typedef _Bit_iterator iterator; _Bit_iterator() : _Bit_iterator_base(0, 0) { } _Bit_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } reference operator*() const { return reference(_M_p, 1UL << _M_offset); } iterator& operator++() { _M_bump_up(); return *this; } iterator operator++(int) { iterator __tmp = *this; _M_bump_up(); return __tmp; } iterator& operator--() { _M_bump_down(); return *this; } iterator operator--(int) { iterator __tmp = *this; _M_bump_down(); return __tmp; } iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } iterator& operator-=(difference_type __i) { *this += -__i; return *this; } iterator operator+(difference_type __i) const { iterator __tmp = *this; return __tmp += __i; } iterator operator-(difference_type __i) const { iterator __tmp = *this; return __tmp -= __i; } reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_iterator operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; } struct _Bit_const_iterator : public _Bit_iterator_base { typedef bool reference; typedef bool const_reference; typedef const bool* pointer; typedef _Bit_const_iterator const_iterator; _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } _Bit_const_iterator(_Bit_type * __x, unsigned int __y) : _Bit_iterator_base(__x, __y) { } _Bit_const_iterator(const _Bit_iterator& __x) : _Bit_iterator_base(__x._M_p, __x._M_offset) { } const_reference operator*() const { return _Bit_reference(_M_p, 1UL << _M_offset); } const_iterator& operator++() { _M_bump_up(); return *this; } const_iterator operator++(int) { const_iterator __tmp = *this; _M_bump_up(); return __tmp; } const_iterator& operator--() { _M_bump_down(); return *this; } const_iterator operator--(int) { const_iterator __tmp = *this; _M_bump_down(); return __tmp; } const_iterator& operator+=(difference_type __i) { _M_incr(__i); return *this; } const_iterator& operator-=(difference_type __i) { *this += -__i; return *this; } const_iterator operator+(difference_type __i) const { const_iterator __tmp = *this; return __tmp += __i; } const_iterator operator-(difference_type __i) const { const_iterator __tmp = *this; return __tmp -= __i; } const_reference operator[](difference_type __i) const { return *(*this + __i); } }; inline _Bit_const_iterator operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; } inline void __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) { for (; __first != __last; ++__first) *__first = __x; } inline void fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) { if (__first._M_p != __last._M_p) { std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); } else __fill_bvector(__first, __last, __x); } template struct _Bvector_base { typedef typename _Alloc::template rebind<_Bit_type>::other _Bit_alloc_type; struct _Bvector_impl : public _Bit_alloc_type { _Bit_iterator _M_start; _Bit_iterator _M_finish; _Bit_type* _M_end_of_storage; _Bvector_impl() : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) { } _Bvector_impl(const _Bit_alloc_type& __a) : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) { } _Bvector_impl(_Bit_alloc_type&& __a) : _Bit_alloc_type(std::move(__a)), _M_start(), _M_finish(), _M_end_of_storage(0) { } }; public: typedef _Alloc allocator_type; _Bit_alloc_type& _M_get_Bit_allocator() noexcept { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } const _Bit_alloc_type& _M_get_Bit_allocator() const noexcept { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Bit_allocator()); } _Bvector_base() : _M_impl() { } _Bvector_base(const allocator_type& __a) : _M_impl(__a) { } _Bvector_base(_Bvector_base&& __x) noexcept : _M_impl(std::move(__x._M_get_Bit_allocator())) { this->_M_impl._M_start = __x._M_impl._M_start; this->_M_impl._M_finish = __x._M_impl._M_finish; this->_M_impl._M_end_of_storage = __x._M_impl._M_end_of_storage; __x._M_impl._M_start = _Bit_iterator(); __x._M_impl._M_finish = _Bit_iterator(); __x._M_impl._M_end_of_storage = 0; } ~_Bvector_base() { this->_M_deallocate(); } protected: _Bvector_impl _M_impl; _Bit_type* _M_allocate(size_t __n) { return _M_impl.allocate(_S_nword(__n)); } void _M_deallocate() { if (_M_impl._M_start._M_p) _M_impl.deallocate(_M_impl._M_start._M_p, _M_impl._M_end_of_storage - _M_impl._M_start._M_p); } static size_t _S_nword(size_t __n) { return (__n + int(_S_word_bit) - 1) / int(_S_word_bit); } }; } namespace std __attribute__ ((__visibility__ ("default"))) { # 490 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_bvector.h" 3 template class vector : protected _Bvector_base<_Alloc> { typedef _Bvector_base<_Alloc> _Base; template friend class hash; public: typedef bool value_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Bit_reference reference; typedef bool const_reference; typedef _Bit_reference* pointer; typedef const bool* const_pointer; typedef _Bit_iterator iterator; typedef _Bit_const_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef _Alloc allocator_type; allocator_type get_allocator() const { return _Base::get_allocator(); } protected: using _Base::_M_allocate; using _Base::_M_deallocate; using _Base::_S_nword; using _Base::_M_get_Bit_allocator; public: vector() : _Base() { } explicit vector(const allocator_type& __a) : _Base(__a) { } explicit vector(size_type __n, const bool& __value = bool(), const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize(__n); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __value ? ~0 : 0); } vector(const vector& __x) : _Base(__x._M_get_Bit_allocator()) { _M_initialize(__x.size()); _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); } vector(vector&& __x) noexcept : _Base(std::move(__x)) { } vector(initializer_list __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_initialize_range(__l.begin(), __l.end(), random_access_iterator_tag()); } template vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~vector() noexcept { } vector& operator=(const vector& __x) { if (&__x == this) return *this; if (__x.size() > capacity()) { this->_M_deallocate(); _M_initialize(__x.size()); } this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), begin()); return *this; } vector& operator=(vector&& __x) { this->clear(); this->swap(__x); return *this; } vector& operator=(initializer_list __l) { this->assign (__l.begin(), __l.end()); return *this; } void assign(size_type __n, const bool& __x) { _M_fill_assign(__n, __x); } template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } void assign(initializer_list __l) { this->assign(__l.begin(), __l.end()); } iterator begin() noexcept { return this->_M_impl._M_start; } const_iterator begin() const noexcept { return this->_M_impl._M_start; } iterator end() noexcept { return this->_M_impl._M_finish; } const_iterator end() const noexcept { return this->_M_impl._M_finish; } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } const_iterator cbegin() const noexcept { return this->_M_impl._M_start; } const_iterator cend() const noexcept { return this->_M_impl._M_finish; } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } size_type size() const noexcept { return size_type(end() - begin()); } size_type max_size() const noexcept { const size_type __isize = __gnu_cxx::__numeric_traits::__max - int(_S_word_bit) + 1; const size_type __asize = _M_get_Bit_allocator().max_size(); return (__asize <= __isize / int(_S_word_bit) ? __asize * int(_S_word_bit) : __isize); } size_type capacity() const noexcept { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) - begin()); } bool empty() const noexcept { return begin() == end(); } reference operator[](size_type __n) { return *iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } const_reference operator[](size_type __n) const { return *const_iterator(this->_M_impl._M_start._M_p + __n / int(_S_word_bit), __n % int(_S_word_bit)); } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("vector::_M_range_check")); } public: reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } void reserve(size_type __n) { if (__n > max_size()) __throw_length_error(("vector::reserve")); if (capacity() < __n) _M_reallocate(__n); } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return *(end() - 1); } const_reference back() const { return *(end() - 1); } void data() noexcept { } void push_back(bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(end(), __x); } void swap(vector& __x) { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_end_of_storage, __x._M_impl._M_end_of_storage); std::__alloc_swap:: _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); } static void swap(reference __x, reference __y) noexcept { bool __tmp = __x; __x = __y; __y = __tmp; } iterator insert(iterator __position, const bool& __x = bool()) { const difference_type __n = __position - begin(); if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage && __position == end()) *this->_M_impl._M_finish++ = __x; else _M_insert_aux(__position, __x); return begin() + __n; } template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } void insert(iterator __position, size_type __n, const bool& __x) { _M_fill_insert(__position, __n, __x); } void insert(iterator __p, initializer_list __l) { this->insert(__p, __l.begin(), __l.end()); } void pop_back() { --this->_M_impl._M_finish; } iterator erase(iterator __position) { if (__position + 1 != end()) std::copy(__position + 1, end(), __position); --this->_M_impl._M_finish; return __position; } iterator erase(iterator __first, iterator __last) { if (__first != __last) _M_erase_at_end(std::copy(__last, end(), __first)); return __first; } void resize(size_type __new_size, bool __x = bool()) { if (__new_size < size()) _M_erase_at_end(begin() + difference_type(__new_size)); else insert(end(), __new_size - size(), __x); } void shrink_to_fit() { _M_shrink_to_fit(); } void flip() noexcept { for (_Bit_type * __p = this->_M_impl._M_start._M_p; __p != this->_M_impl._M_end_of_storage; ++__p) *__p = ~*__p; } void clear() noexcept { _M_erase_at_end(begin()); } protected: iterator _M_copy_aligned(const_iterator __first, const_iterator __last, iterator __result) { _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); return std::copy(const_iterator(__last._M_p, 0), __last, iterator(__q, 0)); } void _M_initialize(size_type __n) { _Bit_type* __q = this->_M_allocate(__n); this->_M_impl._M_end_of_storage = __q + _S_nword(__n); this->_M_impl._M_start = iterator(__q, 0); this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); } void _M_reallocate(size_type __n); bool _M_shrink_to_fit(); template void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize(static_cast(__n)); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_initialize_range(__first, __last, std::__iterator_category(__first)); } template void _M_initialize_range(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) push_back(*__first); } template void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); _M_initialize(__n); std::copy(__first, __last, this->_M_impl._M_start); } template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } void _M_fill_assign(size_t __n, bool __x) { if (__n > size()) { std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); insert(end(), __n - size(), __x); } else { _M_erase_at_end(begin() + __n); std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, __x ? ~0 : 0); } } template void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { iterator __cur = begin(); for (; __first != __last && __cur != end(); ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len < size()) _M_erase_at_end(std::copy(__first, __last, begin())); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); insert(end(), __mid, __last); } } template void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, __n, __x); } template void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { _M_insert_range(__pos, __first, __last, std::__iterator_category(__first)); } void _M_fill_insert(iterator __position, size_type __n, bool __x); template void _M_insert_range(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template void _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_insert_aux(iterator __position, bool __x); size_type _M_check_len(size_type __n, const char* __s) const { if (max_size() - size() < __n) __throw_length_error((__s)); const size_type __len = size() + std::max(size(), __n); return (__len < size() || __len > max_size()) ? max_size() : __len; } void _M_erase_at_end(iterator __pos) { this->_M_impl._M_finish = __pos; } }; } namespace std __attribute__ ((__visibility__ ("default"))) { template struct hash> : public __hash_base> { size_t operator()(const std::vector& __b) const; }; } # 67 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/vector.tcc" 1 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/vector.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void vector<_Tp, _Alloc>:: reserve(size_type __n) { if (__n > this->max_size()) __throw_length_error(("vector::reserve")); if (this->capacity() < __n) { const size_type __old_size = size(); pointer __tmp = _M_allocate_and_copy(__n, std::__make_move_if_noexcept_iterator(this->_M_impl._M_start), std::__make_move_if_noexcept_iterator(this->_M_impl._M_finish)); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = __tmp + __old_size; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; } } template template void vector<_Tp, _Alloc>:: emplace_back(_Args&&... __args) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish; } else _M_emplace_back_aux(std::forward<_Args>(__args)...); } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: insert(iterator __position, const value_type& __x) { const size_type __n = __position - begin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage && __position == end()) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, __x); ++this->_M_impl._M_finish; } else { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { _Tp __x_copy = __x; _M_insert_aux(__position, std::move(__x_copy)); } else _M_insert_aux(__position, __x); } return iterator(this->_M_impl._M_start + __n); } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: erase(iterator __position) { if (__position + 1 != end()) std::move(__position + 1, end(), __position); --this->_M_impl._M_finish; _Alloc_traits::destroy(this->_M_impl, this->_M_impl._M_finish); return __position; } template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: erase(iterator __first, iterator __last) { if (__first != __last) { if (__last != end()) std::move(__last, end(), __first); _M_erase_at_end(__first.base() + (end() - __last)); } return __first; } template vector<_Tp, _Alloc>& vector<_Tp, _Alloc>:: operator=(const vector<_Tp, _Alloc>& __x) { if (&__x != this) { if (_Alloc_traits::_S_propagate_on_copy_assign()) { if (!_Alloc_traits::_S_always_equal() && _M_get_Tp_allocator() != __x._M_get_Tp_allocator()) { this->clear(); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); } std::__alloc_on_copy(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } const size_type __xlen = __x.size(); if (__xlen > capacity()) { pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end()); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; } else if (size() >= __xlen) { std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), end(), _M_get_Tp_allocator()); } else { std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), this->_M_impl._M_start); std::__uninitialized_copy_a(__x._M_impl._M_start + size(), __x._M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); } this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; } return *this; } template void vector<_Tp, _Alloc>:: _M_fill_assign(size_t __n, const value_type& __val) { if (__n > capacity()) { vector __tmp(__n, __val, _M_get_Tp_allocator()); __tmp.swap(*this); } else if (__n > size()) { std::fill(begin(), end(), __val); std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - size(), __val, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - size(); } else _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); } template template void vector<_Tp, _Alloc>:: _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { pointer __cur(this->_M_impl._M_start); for (; __first != __last && __cur != this->_M_impl._M_finish; ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template template void vector<_Tp, _Alloc>:: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len > capacity()) { pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __tmp; this->_M_impl._M_finish = this->_M_impl._M_start + __len; this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; } else if (size() >= __len) _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); else { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, this->_M_impl._M_start); this->_M_impl._M_finish = std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); } } template template typename vector<_Tp, _Alloc>::iterator vector<_Tp, _Alloc>:: emplace(iterator __position, _Args&&... __args) { const size_type __n = __position - begin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage && __position == end()) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish; } else _M_insert_aux(__position, std::forward<_Args>(__args)...); return iterator(this->_M_impl._M_start + __n); } template template void vector<_Tp, _Alloc>:: _M_insert_aux(iterator __position, _Args&&... __args) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) { _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish, std::move(*(this->_M_impl._M_finish - 1)) ); ++this->_M_impl._M_finish; std::move_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) ; *__position = _Tp(std::forward<_Args>(__args)...); } else { const size_type __len = _M_check_len(size_type(1), "vector::_M_insert_aux"); const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { _Alloc_traits::construct(this->_M_impl, __new_start + __elems_before, std::forward<_Args>(__args)...); __new_finish = 0; __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); ++__new_finish; __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } catch(...) { if (!__new_finish) _Alloc_traits::destroy(this->_M_impl, __new_start + __elems_before); else std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } template template void vector<_Tp, _Alloc>:: _M_emplace_back_aux(_Args&&... __args) { const size_type __len = _M_check_len(size_type(1), "vector::_M_emplace_back_aux"); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { _Alloc_traits::construct(this->_M_impl, __new_start + size(), std::forward<_Args>(__args)...); __new_finish = 0; __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, this->_M_impl._M_finish, __new_start, _M_get_Tp_allocator()); ++__new_finish; } catch(...) { if (!__new_finish) _Alloc_traits::destroy(this->_M_impl, __new_start + size()); else std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } template void vector<_Tp, _Alloc>:: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) { if (__n != 0) { if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { value_type __x_copy = __x; const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { std::__uninitialized_move_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; std::move_backward(__position.base(), __old_finish - __n, __old_finish) ; std::fill(__position.base(), __position.base() + __n, __x_copy); } else { std::__uninitialized_fill_n_a(this->_M_impl._M_finish, __n - __elems_after, __x_copy, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - __elems_after; std::__uninitialized_move_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; std::fill(__position.base(), __old_finish, __x_copy); } } else { const size_type __len = _M_check_len(__n, "vector::_M_fill_insert"); const size_type __elems_before = __position - begin(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { std::__uninitialized_fill_n_a(__new_start + __elems_before, __n, __x, _M_get_Tp_allocator()); __new_finish = 0; __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish += __n; __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } catch(...) { if (!__new_finish) std::_Destroy(__new_start + __elems_before, __new_start + __elems_before + __n, _M_get_Tp_allocator()); else std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template void vector<_Tp, _Alloc>:: _M_default_append(size_type __n) { if (__n != 0) { if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { std::__uninitialized_default_n_a(this->_M_impl._M_finish, __n, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; } else { const size_type __len = _M_check_len(__n, "vector::_M_default_append"); const size_type __old_size = this->size(); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, this->_M_impl._M_finish, __new_start, _M_get_Tp_allocator()); std::__uninitialized_default_n_a(__new_finish, __n, _M_get_Tp_allocator()); __new_finish += __n; } catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template bool vector<_Tp, _Alloc>:: _M_shrink_to_fit() { if (capacity() == size()) return false; return std::__shrink_to_fit_aux::_S_do_it(*this); } template template void vector<_Tp, _Alloc>:: _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; } } template template void vector<_Tp, _Alloc>:: _M_range_insert(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { const size_type __n = std::distance(__first, __last); if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { const size_type __elems_after = end() - __position; pointer __old_finish(this->_M_impl._M_finish); if (__elems_after > __n) { std::__uninitialized_move_a(this->_M_impl._M_finish - __n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n; std::move_backward(__position.base(), __old_finish - __n, __old_finish) ; std::copy(__first, __last, __position); } else { _ForwardIterator __mid = __first; std::advance(__mid, __elems_after); std::__uninitialized_copy_a(__mid, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __n - __elems_after; std::__uninitialized_move_a(__position.base(), __old_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish += __elems_after; std::copy(__first, __mid, __position); } } else { const size_type __len = _M_check_len(__n, "vector::_M_range_insert"); pointer __new_start(this->_M_allocate(__len)); pointer __new_finish(__new_start); try { __new_finish = std::__uninitialized_move_if_noexcept_a (this->_M_impl._M_start, __position.base(), __new_start, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_copy_a(__first, __last, __new_finish, _M_get_Tp_allocator()); __new_finish = std::__uninitialized_move_if_noexcept_a (__position.base(), this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); _M_deallocate(__new_start, __len); throw; } std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage - this->_M_impl._M_start); this->_M_impl._M_start = __new_start; this->_M_impl._M_finish = __new_finish; this->_M_impl._M_end_of_storage = __new_start + __len; } } } template void vector:: _M_reallocate(size_type __n) { _Bit_type* __q = this->_M_allocate(__n); this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), iterator(__q, 0)); this->_M_deallocate(); this->_M_impl._M_start = iterator(__q, 0); this->_M_impl._M_end_of_storage = __q + _S_nword(__n); } template void vector:: _M_fill_insert(iterator __position, size_type __n, bool __x) { if (__n == 0) return; if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::fill(__position, __position + difference_type(__n), __x); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = _M_check_len(__n, "vector::_M_fill_insert"); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); std::fill(__i, __i + difference_type(__n), __x); this->_M_impl._M_finish = std::copy(__position, end(), __i + difference_type(__n)); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = iterator(__q, 0); } } template template void vector:: _M_insert_range(iterator __position, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { if (__first != __last) { size_type __n = std::distance(__first, __last); if (capacity() - size() >= __n) { std::copy_backward(__position, end(), this->_M_impl._M_finish + difference_type(__n)); std::copy(__first, __last, __position); this->_M_impl._M_finish += difference_type(__n); } else { const size_type __len = _M_check_len(__n, "vector::_M_insert_range"); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); __i = std::copy(__first, __last, __i); this->_M_impl._M_finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = iterator(__q, 0); } } } template void vector:: _M_insert_aux(iterator __position, bool __x) { if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) { std::copy_backward(__position, this->_M_impl._M_finish, this->_M_impl._M_finish + 1); *__position = __x; ++this->_M_impl._M_finish; } else { const size_type __len = _M_check_len(size_type(1), "vector::_M_insert_aux"); _Bit_type * __q = this->_M_allocate(__len); iterator __i = _M_copy_aligned(begin(), __position, iterator(__q, 0)); *__i++ = __x; this->_M_impl._M_finish = std::copy(__position, end(), __i); this->_M_deallocate(); this->_M_impl._M_end_of_storage = __q + _S_nword(__len); this->_M_impl._M_start = iterator(__q, 0); } } template bool vector:: _M_shrink_to_fit() { if (capacity() - size() < int(_S_word_bit)) return false; try { _M_reallocate(size()); return true; } catch(...) { return false; } } } namespace std __attribute__ ((__visibility__ ("default"))) { template size_t hash>:: operator()(const std::vector& __b) const { size_t __hash = 0; using std::_S_word_bit; using std::_Bit_type; const size_t __words = __b.size() / _S_word_bit; if (__words) { const size_t __clength = __words * sizeof(_Bit_type); __hash = std::_Hash_impl::hash(__b._M_impl._M_start._M_p, __clength); } const size_t __extrabits = __b.size() % _S_word_bit; if (__extrabits) { _Bit_type __hiword = *__b._M_impl._M_finish._M_p; __hiword &= ~((~static_cast<_Bit_type>(0)) << __extrabits); const size_t __clength = (__extrabits + 8 - 1) / 8; if (__words) __hash = std::_Hash_impl::hash(&__hiword, __clength, __hash); else __hash = std::_Hash_impl::hash(&__hiword, __clength); } return __hash; } } # 71 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/vector" 2 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 55 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template _RealType generate_canonical(_UniformRandomNumberGenerator& __g); namespace __detail { template (std::numeric_limits<_UIntType>::digits)> struct _Shift { static const _UIntType __value = 0; }; template struct _Shift<_UIntType, __w, true> { static const _UIntType __value = _UIntType(1) << __w; }; template struct _Mod; template inline _Tp __mod(_Tp __x) { return _Mod<_Tp, __m, __a, __c, __m == 0>::__calc(__x); } template struct _Adaptor { public: _Adaptor(_Engine& __g) : _M_g(__g) { } _DInputType min() const { return _DInputType(0); } _DInputType max() const { return _DInputType(1); } _DInputType operator()() { return std::generate_canonical<_DInputType, std::numeric_limits<_DInputType>::digits, _Engine>(_M_g); } private: _Engine& _M_g; }; } # 169 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class linear_congruential_engine { static_assert(std::is_unsigned<_UIntType>::value, "template argument " "substituting _UIntType not an unsigned integral type"); static_assert(__m == 0u || (__a < __m && __c < __m), "template argument substituting __m out of bounds"); public: typedef _UIntType result_type; static constexpr result_type multiplier = __a; static constexpr result_type increment = __c; static constexpr result_type modulus = __m; static constexpr result_type default_seed = 1u; # 196 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 explicit linear_congruential_engine(result_type __s = default_seed) { seed(__s); } template::value> ::type> explicit linear_congruential_engine(_Sseq& __q) { seed(__q); } void seed(result_type __s = default_seed); # 229 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template typename std::enable_if::value>::type seed(_Sseq& __q); static constexpr result_type min() { return __c == 0u ? 1u : 0u; } static constexpr result_type max() { return __m - 1u; } void discard(unsigned long long __z) { for (; __z != 0ULL; --__z) (*this)(); } result_type operator()() { _M_x = __detail::__mod<_UIntType, __m, __a, __c>(_M_x); return _M_x; } # 281 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 friend bool operator==(const linear_congruential_engine& __lhs, const linear_congruential_engine& __rhs) { return __lhs._M_x == __rhs._M_x; } # 294 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::linear_congruential_engine<_UIntType1, __a1, __c1, __m1>& __lcr); # 314 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::linear_congruential_engine<_UIntType1, __a1, __c1, __m1>& __lcr); private: _UIntType _M_x; }; # 336 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template inline bool operator!=(const std::linear_congruential_engine<_UIntType, __a, __c, __m>& __lhs, const std::linear_congruential_engine<_UIntType, __a, __c, __m>& __rhs) { return !(__lhs == __rhs); } # 373 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class mersenne_twister_engine { static_assert(std::is_unsigned<_UIntType>::value, "template argument " "substituting _UIntType not an unsigned integral type"); static_assert(1u <= __m && __m <= __n, "template argument substituting __m out of bounds"); static_assert(__r <= __w, "template argument substituting " "__r out of bound"); static_assert(__u <= __w, "template argument substituting " "__u out of bound"); static_assert(__s <= __w, "template argument substituting " "__s out of bound"); static_assert(__t <= __w, "template argument substituting " "__t out of bound"); static_assert(__l <= __w, "template argument substituting " "__l out of bound"); static_assert(__w <= std::numeric_limits<_UIntType>::digits, "template argument substituting __w out of bound"); static_assert(__a <= (__detail::_Shift<_UIntType, __w>::__value - 1), "template argument substituting __a out of bound"); static_assert(__b <= (__detail::_Shift<_UIntType, __w>::__value - 1), "template argument substituting __b out of bound"); static_assert(__c <= (__detail::_Shift<_UIntType, __w>::__value - 1), "template argument substituting __c out of bound"); static_assert(__d <= (__detail::_Shift<_UIntType, __w>::__value - 1), "template argument substituting __d out of bound"); static_assert(__f <= (__detail::_Shift<_UIntType, __w>::__value - 1), "template argument substituting __f out of bound"); public: typedef _UIntType result_type; static constexpr size_t word_size = __w; static constexpr size_t state_size = __n; static constexpr size_t shift_size = __m; static constexpr size_t mask_bits = __r; static constexpr result_type xor_mask = __a; static constexpr size_t tempering_u = __u; static constexpr result_type tempering_d = __d; static constexpr size_t tempering_s = __s; static constexpr result_type tempering_b = __b; static constexpr size_t tempering_t = __t; static constexpr result_type tempering_c = __c; static constexpr size_t tempering_l = __l; static constexpr result_type initialization_multiplier = __f; static constexpr result_type default_seed = 5489u; explicit mersenne_twister_engine(result_type __sd = default_seed) { seed(__sd); } template::value> ::type> explicit mersenne_twister_engine(_Sseq& __q) { seed(__q); } void seed(result_type __sd = default_seed); template typename std::enable_if::value>::type seed(_Sseq& __q); static constexpr result_type min() { return 0; }; static constexpr result_type max() { return __detail::_Shift<_UIntType, __w>::__value - 1; } void discard(unsigned long long __z) { for (; __z != 0ULL; --__z) (*this)(); } result_type operator()(); # 491 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 friend bool operator==(const mersenne_twister_engine& __lhs, const mersenne_twister_engine& __rhs) { return (std::equal(__lhs._M_x, __lhs._M_x + state_size, __rhs._M_x) && __lhs._M_p == __rhs._M_p); } # 509 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::mersenne_twister_engine<_UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1>& __x); # 535 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::mersenne_twister_engine<_UIntType1, __w1, __n1, __m1, __r1, __a1, __u1, __d1, __s1, __b1, __t1, __c1, __l1, __f1>& __x); private: _UIntType _M_x[state_size]; size_t _M_p; }; # 566 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template inline bool operator!=(const std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __lhs, const std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __rhs) { return !(__lhs == __rhs); } # 598 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class subtract_with_carry_engine { static_assert(std::is_unsigned<_UIntType>::value, "template argument " "substituting _UIntType not an unsigned integral type"); static_assert(0u < __s && __s < __r, "template argument substituting __s out of bounds"); static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, "template argument substituting __w out of bounds"); public: typedef _UIntType result_type; static constexpr size_t word_size = __w; static constexpr size_t short_lag = __s; static constexpr size_t long_lag = __r; static constexpr result_type default_seed = 19780503u; explicit subtract_with_carry_engine(result_type __sd = default_seed) { seed(__sd); } template::value> ::type> explicit subtract_with_carry_engine(_Sseq& __q) { seed(__q); } # 651 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 void seed(result_type __sd = default_seed); template typename std::enable_if::value>::type seed(_Sseq& __q); static constexpr result_type min() { return 0; } static constexpr result_type max() { return __detail::_Shift<_UIntType, __w>::__value - 1; } void discard(unsigned long long __z) { for (; __z != 0ULL; --__z) (*this)(); } result_type operator()(); # 706 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 friend bool operator==(const subtract_with_carry_engine& __lhs, const subtract_with_carry_engine& __rhs) { return (std::equal(__lhs._M_x, __lhs._M_x + long_lag, __rhs._M_x) && __lhs._M_carry == __rhs._M_carry && __lhs._M_p == __rhs._M_p); } # 725 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>&, const std::subtract_with_carry_engine<_UIntType1, __w1, __s1, __r1>&); # 744 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>&, std::subtract_with_carry_engine<_UIntType1, __w1, __s1, __r1>&); private: _UIntType _M_x[long_lag]; _UIntType _M_carry; size_t _M_p; }; # 769 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template inline bool operator!=(const std::subtract_with_carry_engine<_UIntType, __w, __s, __r>& __lhs, const std::subtract_with_carry_engine<_UIntType, __w, __s, __r>& __rhs) { return !(__lhs == __rhs); } # 784 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class discard_block_engine { static_assert(1 <= __r && __r <= __p, "template argument substituting __r out of bounds"); public: typedef typename _RandomNumberEngine::result_type result_type; static constexpr size_t block_size = __p; static constexpr size_t used_block = __r; discard_block_engine() : _M_b(), _M_n(0) { } explicit discard_block_engine(const _RandomNumberEngine& __rng) : _M_b(__rng), _M_n(0) { } explicit discard_block_engine(_RandomNumberEngine&& __rng) : _M_b(std::move(__rng)), _M_n(0) { } explicit discard_block_engine(result_type __s) : _M_b(__s), _M_n(0) { } template::value && !std::is_same<_Sseq, _RandomNumberEngine>::value> ::type> explicit discard_block_engine(_Sseq& __q) : _M_b(__q), _M_n(0) { } void seed() { _M_b.seed(); _M_n = 0; } void seed(result_type __s) { _M_b.seed(__s); _M_n = 0; } template void seed(_Sseq& __q) { _M_b.seed(__q); _M_n = 0; } const _RandomNumberEngine& base() const noexcept { return _M_b; } static constexpr result_type min() { return _RandomNumberEngine::min(); } static constexpr result_type max() { return _RandomNumberEngine::max(); } void discard(unsigned long long __z) { for (; __z != 0ULL; --__z) (*this)(); } result_type operator()(); # 934 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 friend bool operator==(const discard_block_engine& __lhs, const discard_block_engine& __rhs) { return __lhs._M_b == __rhs._M_b && __lhs._M_n == __rhs._M_n; } # 950 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::discard_block_engine<_RandomNumberEngine1, __p1, __r1>& __x); # 968 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::discard_block_engine<_RandomNumberEngine1, __p1, __r1>& __x); private: _RandomNumberEngine _M_b; size_t _M_n; }; # 991 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template inline bool operator!=(const std::discard_block_engine<_RandomNumberEngine, __p, __r>& __lhs, const std::discard_block_engine<_RandomNumberEngine, __p, __r>& __rhs) { return !(__lhs == __rhs); } template class independent_bits_engine { static_assert(std::is_unsigned<_UIntType>::value, "template argument " "substituting _UIntType not an unsigned integral type"); static_assert(0u < __w && __w <= std::numeric_limits<_UIntType>::digits, "template argument substituting __w out of bounds"); public: typedef _UIntType result_type; independent_bits_engine() : _M_b() { } explicit independent_bits_engine(const _RandomNumberEngine& __rng) : _M_b(__rng) { } explicit independent_bits_engine(_RandomNumberEngine&& __rng) : _M_b(std::move(__rng)) { } explicit independent_bits_engine(result_type __s) : _M_b(__s) { } template::value && !std::is_same<_Sseq, _RandomNumberEngine>::value> ::type> explicit independent_bits_engine(_Sseq& __q) : _M_b(__q) { } void seed() { _M_b.seed(); } void seed(result_type __s) { _M_b.seed(__s); } template void seed(_Sseq& __q) { _M_b.seed(__q); } const _RandomNumberEngine& base() const noexcept { return _M_b; } static constexpr result_type min() { return 0U; } static constexpr result_type max() { return __detail::_Shift<_UIntType, __w>::__value - 1; } void discard(unsigned long long __z) { for (; __z != 0ULL; --__z) (*this)(); } result_type operator()(); # 1144 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 friend bool operator==(const independent_bits_engine& __lhs, const independent_bits_engine& __rhs) { return __lhs._M_b == __rhs._M_b; } # 1161 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::independent_bits_engine<_RandomNumberEngine, __w, _UIntType>& __x) { __is >> __x._M_b; return __is; } private: _RandomNumberEngine _M_b; }; # 1187 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template inline bool operator!=(const std::independent_bits_engine<_RandomNumberEngine, __w, _UIntType>& __lhs, const std::independent_bits_engine<_RandomNumberEngine, __w, _UIntType>& __rhs) { return !(__lhs == __rhs); } # 1205 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::independent_bits_engine<_RandomNumberEngine, __w, _UIntType>& __x) { __os << __x.base(); return __os; } template class shuffle_order_engine { static_assert(1u <= __k, "template argument substituting " "__k out of bound"); public: typedef typename _RandomNumberEngine::result_type result_type; static constexpr size_t table_size = __k; shuffle_order_engine() : _M_b() { _M_initialize(); } explicit shuffle_order_engine(const _RandomNumberEngine& __rng) : _M_b(__rng) { _M_initialize(); } explicit shuffle_order_engine(_RandomNumberEngine&& __rng) : _M_b(std::move(__rng)) { _M_initialize(); } explicit shuffle_order_engine(result_type __s) : _M_b(__s) { _M_initialize(); } template::value && !std::is_same<_Sseq, _RandomNumberEngine>::value> ::type> explicit shuffle_order_engine(_Sseq& __q) : _M_b(__q) { _M_initialize(); } void seed() { _M_b.seed(); _M_initialize(); } void seed(result_type __s) { _M_b.seed(__s); _M_initialize(); } template void seed(_Sseq& __q) { _M_b.seed(__q); _M_initialize(); } const _RandomNumberEngine& base() const noexcept { return _M_b; } static constexpr result_type min() { return _RandomNumberEngine::min(); } static constexpr result_type max() { return _RandomNumberEngine::max(); } void discard(unsigned long long __z) { for (; __z != 0ULL; --__z) (*this)(); } result_type operator()(); # 1373 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 friend bool operator==(const shuffle_order_engine& __lhs, const shuffle_order_engine& __rhs) { return (__lhs._M_b == __rhs._M_b && std::equal(__lhs._M_v, __lhs._M_v + __k, __rhs._M_v) && __lhs._M_y == __rhs._M_y); } # 1391 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::shuffle_order_engine<_RandomNumberEngine1, __k1>& __x); # 1409 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::shuffle_order_engine<_RandomNumberEngine1, __k1>& __x); private: void _M_initialize() { for (size_t __i = 0; __i < __k; ++__i) _M_v[__i] = _M_b(); _M_y = _M_b(); } _RandomNumberEngine _M_b; result_type _M_v[__k]; result_type _M_y; }; # 1439 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template inline bool operator!=(const std::shuffle_order_engine<_RandomNumberEngine, __k>& __lhs, const std::shuffle_order_engine<_RandomNumberEngine, __k>& __rhs) { return !(__lhs == __rhs); } typedef linear_congruential_engine minstd_rand0; typedef linear_congruential_engine minstd_rand; # 1468 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 typedef mersenne_twister_engine< uint_fast32_t, 32, 624, 397, 31, 0x9908b0dfUL, 11, 0xffffffffUL, 7, 0x9d2c5680UL, 15, 0xefc60000UL, 18, 1812433253UL> mt19937; typedef mersenne_twister_engine< uint_fast64_t, 64, 312, 156, 31, 0xb5026f5aa96619e9ULL, 29, 0x5555555555555555ULL, 17, 0x71d67fffeda60000ULL, 37, 0xfff7eee000000000ULL, 43, 6364136223846793005ULL> mt19937_64; typedef subtract_with_carry_engine ranlux24_base; typedef subtract_with_carry_engine ranlux48_base; typedef discard_block_engine ranlux24; typedef discard_block_engine ranlux48; typedef shuffle_order_engine knuth_b; typedef minstd_rand0 default_random_engine; class random_device { public: typedef unsigned int result_type; explicit random_device(const std::string& __token = "/dev/urandom") { if ((__token != "/dev/urandom" && __token != "/dev/random") || !(_M_file = std::fopen(__token.c_str(), "rb"))) std::__throw_runtime_error(("random_device::" "random_device(const std::string&)") ); } ~random_device() { std::fclose(_M_file); } # 1555 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 static constexpr result_type min() { return std::numeric_limits::min(); } static constexpr result_type max() { return std::numeric_limits::max(); } double entropy() const noexcept { return 0.0; } result_type operator()() { result_type __ret; std::fread(reinterpret_cast(&__ret), sizeof(result_type), 1, _M_file); return __ret; } random_device(const random_device&) = delete; void operator=(const random_device&) = delete; private: FILE* _M_file; }; # 1612 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class uniform_int_distribution { static_assert(std::is_integral<_IntType>::value, "template argument not an integral type"); public: typedef _IntType result_type; struct param_type { typedef uniform_int_distribution<_IntType> distribution_type; explicit param_type(_IntType __a = 0, _IntType __b = std::numeric_limits<_IntType>::max()) : _M_a(__a), _M_b(__b) { ; } result_type a() const { return _M_a; } result_type b() const { return _M_b; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } private: _IntType _M_a; _IntType _M_b; }; public: explicit uniform_int_distribution(_IntType __a = 0, _IntType __b = std::numeric_limits<_IntType>::max()) : _M_param(__a, __b) { } explicit uniform_int_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } result_type a() const { return _M_param.a(); } result_type b() const { return _M_param.b(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return this->a(); } result_type max() const { return this->b(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); param_type _M_param; }; template inline bool operator==(const std::uniform_int_distribution<_IntType>& __d1, const std::uniform_int_distribution<_IntType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::uniform_int_distribution<_IntType>& __d1, const std::uniform_int_distribution<_IntType>& __d2) { return !(__d1 == __d2); } # 1757 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>&, const std::uniform_int_distribution<_IntType>&); # 1771 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>&, std::uniform_int_distribution<_IntType>&); # 1784 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class uniform_real_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef uniform_real_distribution<_RealType> distribution_type; explicit param_type(_RealType __a = _RealType(0), _RealType __b = _RealType(1)) : _M_a(__a), _M_b(__b) { ; } result_type a() const { return _M_a; } result_type b() const { return _M_b; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } private: _RealType _M_a; _RealType _M_b; }; public: explicit uniform_real_distribution(_RealType __a = _RealType(0), _RealType __b = _RealType(1)) : _M_param(__a, __b) { } explicit uniform_real_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } result_type a() const { return _M_param.a(); } result_type b() const { return _M_param.b(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return this->a(); } result_type max() const { return this->b(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); return (__aurng() * (__p.b() - __p.a())) + __p.a(); } private: param_type _M_param; }; template inline bool operator==(const std::uniform_real_distribution<_IntType>& __d1, const std::uniform_real_distribution<_IntType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::uniform_real_distribution<_IntType>& __d1, const std::uniform_real_distribution<_IntType>& __d2) { return !(__d1 == __d2); } # 1938 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>&, const std::uniform_real_distribution<_RealType>&); # 1952 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>&, std::uniform_real_distribution<_RealType>&); # 1974 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class normal_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef normal_distribution<_RealType> distribution_type; explicit param_type(_RealType __mean = _RealType(0), _RealType __stddev = _RealType(1)) : _M_mean(__mean), _M_stddev(__stddev) { ; } _RealType mean() const { return _M_mean; } _RealType stddev() const { return _M_stddev; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return (__p1._M_mean == __p2._M_mean && __p1._M_stddev == __p2._M_stddev); } private: _RealType _M_mean; _RealType _M_stddev; }; public: explicit normal_distribution(result_type __mean = result_type(0), result_type __stddev = result_type(1)) : _M_param(__mean, __stddev), _M_saved_available(false) { } explicit normal_distribution(const param_type& __p) : _M_param(__p), _M_saved_available(false) { } void reset() { _M_saved_available = false; } _RealType mean() const { return _M_param.mean(); } _RealType stddev() const { return _M_param.stddev(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return std::numeric_limits::min(); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); template friend bool operator==(const std::normal_distribution<_RealType1>& __d1, const std::normal_distribution<_RealType1>& __d2); # 2113 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::normal_distribution<_RealType1>& __x); # 2128 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::normal_distribution<_RealType1>& __x); private: param_type _M_param; result_type _M_saved; bool _M_saved_available; }; template inline bool operator!=(const std::normal_distribution<_RealType>& __d1, const std::normal_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 2158 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class lognormal_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef lognormal_distribution<_RealType> distribution_type; explicit param_type(_RealType __m = _RealType(0), _RealType __s = _RealType(1)) : _M_m(__m), _M_s(__s) { } _RealType m() const { return _M_m; } _RealType s() const { return _M_s; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_m == __p2._M_m && __p1._M_s == __p2._M_s; } private: _RealType _M_m; _RealType _M_s; }; explicit lognormal_distribution(_RealType __m = _RealType(0), _RealType __s = _RealType(1)) : _M_param(__m, __s), _M_nd() { } explicit lognormal_distribution(const param_type& __p) : _M_param(__p), _M_nd() { } void reset() { _M_nd.reset(); } _RealType m() const { return _M_param.m(); } _RealType s() const { return _M_param.s(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { return std::exp(__p.s() * _M_nd(__urng) + __p.m()); } template friend bool operator==(const std::lognormal_distribution<_RealType1>& __d1, const std::lognormal_distribution<_RealType1>& __d2) { return (__d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd); } # 2289 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::lognormal_distribution<_RealType1>& __x); # 2304 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::lognormal_distribution<_RealType1>& __x); private: param_type _M_param; std::normal_distribution _M_nd; }; template inline bool operator!=(const std::lognormal_distribution<_RealType>& __d1, const std::lognormal_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 2334 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class gamma_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef gamma_distribution<_RealType> distribution_type; friend class gamma_distribution<_RealType>; explicit param_type(_RealType __alpha_val = _RealType(1), _RealType __beta_val = _RealType(1)) : _M_alpha(__alpha_val), _M_beta(__beta_val) { ; _M_initialize(); } _RealType alpha() const { return _M_alpha; } _RealType beta() const { return _M_beta; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return (__p1._M_alpha == __p2._M_alpha && __p1._M_beta == __p2._M_beta); } private: void _M_initialize(); _RealType _M_alpha; _RealType _M_beta; _RealType _M_malpha, _M_a2; }; public: explicit gamma_distribution(_RealType __alpha_val = _RealType(1), _RealType __beta_val = _RealType(1)) : _M_param(__alpha_val, __beta_val), _M_nd() { } explicit gamma_distribution(const param_type& __p) : _M_param(__p), _M_nd() { } void reset() { _M_nd.reset(); } _RealType alpha() const { return _M_param.alpha(); } _RealType beta() const { return _M_param.beta(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); template friend bool operator==(const std::gamma_distribution<_RealType1>& __d1, const std::gamma_distribution<_RealType1>& __d2) { return (__d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd); } # 2482 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::gamma_distribution<_RealType1>& __x); # 2496 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::gamma_distribution<_RealType1>& __x); private: param_type _M_param; std::normal_distribution _M_nd; }; template inline bool operator!=(const std::gamma_distribution<_RealType>& __d1, const std::gamma_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 2523 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class chi_squared_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef chi_squared_distribution<_RealType> distribution_type; explicit param_type(_RealType __n = _RealType(1)) : _M_n(__n) { } _RealType n() const { return _M_n; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_n == __p2._M_n; } private: _RealType _M_n; }; explicit chi_squared_distribution(_RealType __n = _RealType(1)) : _M_param(__n), _M_gd(__n / 2) { } explicit chi_squared_distribution(const param_type& __p) : _M_param(__p), _M_gd(__p.n() / 2) { } void reset() { _M_gd.reset(); } _RealType n() const { return _M_param.n(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return 2 * _M_gd(__urng); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { typedef typename std::gamma_distribution::param_type param_type; return 2 * _M_gd(__urng, param_type(__p.n() / 2)); } template friend bool operator==(const std::chi_squared_distribution<_RealType1>& __d1, const std::chi_squared_distribution<_RealType1>& __d2) { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; } # 2646 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::chi_squared_distribution<_RealType1>& __x); # 2661 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::chi_squared_distribution<_RealType1>& __x); private: param_type _M_param; std::gamma_distribution _M_gd; }; template inline bool operator!=(const std::chi_squared_distribution<_RealType>& __d1, const std::chi_squared_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 2688 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class cauchy_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef cauchy_distribution<_RealType> distribution_type; explicit param_type(_RealType __a = _RealType(0), _RealType __b = _RealType(1)) : _M_a(__a), _M_b(__b) { } _RealType a() const { return _M_a; } _RealType b() const { return _M_b; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } private: _RealType _M_a; _RealType _M_b; }; explicit cauchy_distribution(_RealType __a = _RealType(0), _RealType __b = _RealType(1)) : _M_param(__a, __b) { } explicit cauchy_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } _RealType a() const { return _M_param.a(); } _RealType b() const { return _M_param.b(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return std::numeric_limits::min(); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); private: param_type _M_param; }; template inline bool operator==(const std::cauchy_distribution<_RealType>& __d1, const std::cauchy_distribution<_RealType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::cauchy_distribution<_RealType>& __d1, const std::cauchy_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 2830 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::cauchy_distribution<_RealType>& __x); # 2845 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::cauchy_distribution<_RealType>& __x); # 2861 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class fisher_f_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef fisher_f_distribution<_RealType> distribution_type; explicit param_type(_RealType __m = _RealType(1), _RealType __n = _RealType(1)) : _M_m(__m), _M_n(__n) { } _RealType m() const { return _M_m; } _RealType n() const { return _M_n; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_m == __p2._M_m && __p1._M_n == __p2._M_n; } private: _RealType _M_m; _RealType _M_n; }; explicit fisher_f_distribution(_RealType __m = _RealType(1), _RealType __n = _RealType(1)) : _M_param(__m, __n), _M_gd_x(__m / 2), _M_gd_y(__n / 2) { } explicit fisher_f_distribution(const param_type& __p) : _M_param(__p), _M_gd_x(__p.m() / 2), _M_gd_y(__p.n() / 2) { } void reset() { _M_gd_x.reset(); _M_gd_y.reset(); } _RealType m() const { return _M_param.m(); } _RealType n() const { return _M_param.n(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return (_M_gd_x(__urng) * n()) / (_M_gd_y(__urng) * m()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { typedef typename std::gamma_distribution::param_type param_type; return ((_M_gd_x(__urng, param_type(__p.m() / 2)) * n()) / (_M_gd_y(__urng, param_type(__p.n() / 2)) * m())); } template friend bool operator==(const std::fisher_f_distribution<_RealType1>& __d1, const std::fisher_f_distribution<_RealType1>& __d2) { return (__d1.param() == __d2.param() && __d1._M_gd_x == __d2._M_gd_x && __d1._M_gd_y == __d2._M_gd_y); } # 3001 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::fisher_f_distribution<_RealType1>& __x); # 3016 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::fisher_f_distribution<_RealType1>& __x); private: param_type _M_param; std::gamma_distribution _M_gd_x, _M_gd_y; }; template inline bool operator!=(const std::fisher_f_distribution<_RealType>& __d1, const std::fisher_f_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 3045 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class student_t_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef student_t_distribution<_RealType> distribution_type; explicit param_type(_RealType __n = _RealType(1)) : _M_n(__n) { } _RealType n() const { return _M_n; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_n == __p2._M_n; } private: _RealType _M_n; }; explicit student_t_distribution(_RealType __n = _RealType(1)) : _M_param(__n), _M_nd(), _M_gd(__n / 2, 2) { } explicit student_t_distribution(const param_type& __p) : _M_param(__p), _M_nd(), _M_gd(__p.n() / 2, 2) { } void reset() { _M_nd.reset(); _M_gd.reset(); } _RealType n() const { return _M_param.n(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return std::numeric_limits::min(); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return _M_nd(__urng) * std::sqrt(n() / _M_gd(__urng)); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { typedef typename std::gamma_distribution::param_type param_type; const result_type __g = _M_gd(__urng, param_type(__p.n() / 2, 2)); return _M_nd(__urng) * std::sqrt(__p.n() / __g); } template friend bool operator==(const std::student_t_distribution<_RealType1>& __d1, const std::student_t_distribution<_RealType1>& __d2) { return (__d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd && __d1._M_gd == __d2._M_gd); } # 3174 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::student_t_distribution<_RealType1>& __x); # 3189 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::student_t_distribution<_RealType1>& __x); private: param_type _M_param; std::normal_distribution _M_nd; std::gamma_distribution _M_gd; }; template inline bool operator!=(const std::student_t_distribution<_RealType>& __d1, const std::student_t_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 3225 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 class bernoulli_distribution { public: typedef bool result_type; struct param_type { typedef bernoulli_distribution distribution_type; explicit param_type(double __p = 0.5) : _M_p(__p) { ; } double p() const { return _M_p; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_p == __p2._M_p; } private: double _M_p; }; public: explicit bernoulli_distribution(double __p = 0.5) : _M_param(__p) { } explicit bernoulli_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } double p() const { return _M_param.p(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return std::numeric_limits::min(); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); if ((__aurng() - __aurng.min()) < __p.p() * (__aurng.max() - __aurng.min())) return true; return false; } private: param_type _M_param; }; inline bool operator==(const std::bernoulli_distribution& __d1, const std::bernoulli_distribution& __d2) { return __d1.param() == __d2.param(); } inline bool operator!=(const std::bernoulli_distribution& __d1, const std::bernoulli_distribution& __d2) { return !(__d1 == __d2); } # 3368 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::bernoulli_distribution& __x); # 3382 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::bernoulli_distribution& __x) { double __p; __is >> __p; __x.param(bernoulli_distribution::param_type(__p)); return __is; } # 3401 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class binomial_distribution { static_assert(std::is_integral<_IntType>::value, "template argument not an integral type"); public: typedef _IntType result_type; struct param_type { typedef binomial_distribution<_IntType> distribution_type; friend class binomial_distribution<_IntType>; explicit param_type(_IntType __t = _IntType(1), double __p = 0.5) : _M_t(__t), _M_p(__p) { ; _M_initialize(); } _IntType t() const { return _M_t; } double p() const { return _M_p; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_t == __p2._M_t && __p1._M_p == __p2._M_p; } private: void _M_initialize(); _IntType _M_t; double _M_p; double _M_q; double _M_d1, _M_d2, _M_s1, _M_s2, _M_c, _M_a1, _M_a123, _M_s, _M_lf, _M_lp1p; bool _M_easy; }; explicit binomial_distribution(_IntType __t = _IntType(1), double __p = 0.5) : _M_param(__t, __p), _M_nd() { } explicit binomial_distribution(const param_type& __p) : _M_param(__p), _M_nd() { } void reset() { _M_nd.reset(); } _IntType t() const { return _M_param.t(); } double p() const { return _M_param.p(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return 0; } result_type max() const { return _M_param.t(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); template friend bool operator==(const std::binomial_distribution<_IntType1>& __d1, const std::binomial_distribution<_IntType1>& __d2) { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; } # 3553 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::binomial_distribution<_IntType1>& __x); # 3569 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::binomial_distribution<_IntType1>& __x); private: template result_type _M_waiting(_UniformRandomNumberGenerator& __urng, _IntType __t); param_type _M_param; std::normal_distribution _M_nd; }; template inline bool operator!=(const std::binomial_distribution<_IntType>& __d1, const std::binomial_distribution<_IntType>& __d2) { return !(__d1 == __d2); } # 3603 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class geometric_distribution { static_assert(std::is_integral<_IntType>::value, "template argument not an integral type"); public: typedef _IntType result_type; struct param_type { typedef geometric_distribution<_IntType> distribution_type; friend class geometric_distribution<_IntType>; explicit param_type(double __p = 0.5) : _M_p(__p) { ; _M_initialize(); } double p() const { return _M_p; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_p == __p2._M_p; } private: void _M_initialize() { _M_log_1_p = std::log(1.0 - _M_p); } double _M_p; double _M_log_1_p; }; explicit geometric_distribution(double __p = 0.5) : _M_param(__p) { } explicit geometric_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } double p() const { return _M_param.p(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return 0; } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); private: param_type _M_param; }; template inline bool operator==(const std::geometric_distribution<_IntType>& __d1, const std::geometric_distribution<_IntType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::geometric_distribution<_IntType>& __d1, const std::geometric_distribution<_IntType>& __d2) { return !(__d1 == __d2); } # 3746 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::geometric_distribution<_IntType>& __x); # 3761 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::geometric_distribution<_IntType>& __x); # 3775 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class negative_binomial_distribution { static_assert(std::is_integral<_IntType>::value, "template argument not an integral type"); public: typedef _IntType result_type; struct param_type { typedef negative_binomial_distribution<_IntType> distribution_type; explicit param_type(_IntType __k = 1, double __p = 0.5) : _M_k(__k), _M_p(__p) { ; } _IntType k() const { return _M_k; } double p() const { return _M_p; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_k == __p2._M_k && __p1._M_p == __p2._M_p; } private: _IntType _M_k; double _M_p; }; explicit negative_binomial_distribution(_IntType __k = 1, double __p = 0.5) : _M_param(__k, __p), _M_gd(__k, (1.0 - __p) / __p) { } explicit negative_binomial_distribution(const param_type& __p) : _M_param(__p), _M_gd(__p.k(), (1.0 - __p.p()) / __p.p()) { } void reset() { _M_gd.reset(); } _IntType k() const { return _M_param.k(); } double p() const { return _M_param.p(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng); template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); template friend bool operator==(const std::negative_binomial_distribution<_IntType1>& __d1, const std::negative_binomial_distribution<_IntType1>& __d2) { return __d1.param() == __d2.param() && __d1._M_gd == __d2._M_gd; } # 3907 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::negative_binomial_distribution<_IntType1>& __x); # 3922 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::negative_binomial_distribution<_IntType1>& __x); private: param_type _M_param; std::gamma_distribution _M_gd; }; template inline bool operator!=(const std::negative_binomial_distribution<_IntType>& __d1, const std::negative_binomial_distribution<_IntType>& __d2) { return !(__d1 == __d2); } # 3958 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class poisson_distribution { static_assert(std::is_integral<_IntType>::value, "template argument not an integral type"); public: typedef _IntType result_type; struct param_type { typedef poisson_distribution<_IntType> distribution_type; friend class poisson_distribution<_IntType>; explicit param_type(double __mean = 1.0) : _M_mean(__mean) { ; _M_initialize(); } double mean() const { return _M_mean; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_mean == __p2._M_mean; } private: void _M_initialize(); double _M_mean; double _M_lm_thr; double _M_lfm, _M_sm, _M_d, _M_scx, _M_1cx, _M_c2b, _M_cb; }; explicit poisson_distribution(double __mean = 1.0) : _M_param(__mean), _M_nd() { } explicit poisson_distribution(const param_type& __p) : _M_param(__p), _M_nd() { } void reset() { _M_nd.reset(); } double mean() const { return _M_param.mean(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return 0; } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); template friend bool operator==(const std::poisson_distribution<_IntType1>& __d1, const std::poisson_distribution<_IntType1>& __d2) { return __d1.param() == __d2.param() && __d1._M_nd == __d2._M_nd; } # 4094 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::poisson_distribution<_IntType1>& __x); # 4109 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::poisson_distribution<_IntType1>& __x); private: param_type _M_param; std::normal_distribution _M_nd; }; template inline bool operator!=(const std::poisson_distribution<_IntType>& __d1, const std::poisson_distribution<_IntType>& __d2) { return !(__d1 == __d2); } # 4146 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class exponential_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef exponential_distribution<_RealType> distribution_type; explicit param_type(_RealType __lambda = _RealType(1)) : _M_lambda(__lambda) { ; } _RealType lambda() const { return _M_lambda; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_lambda == __p2._M_lambda; } private: _RealType _M_lambda; }; public: explicit exponential_distribution(const result_type& __lambda = result_type(1)) : _M_param(__lambda) { } explicit exponential_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } _RealType lambda() const { return _M_param.lambda(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); return -std::log(__aurng()) / __p.lambda(); } private: param_type _M_param; }; template inline bool operator==(const std::exponential_distribution<_RealType>& __d1, const std::exponential_distribution<_RealType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::exponential_distribution<_RealType>& __d1, const std::exponential_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 4290 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::exponential_distribution<_RealType>& __x); # 4305 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::exponential_distribution<_RealType>& __x); # 4320 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class weibull_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef weibull_distribution<_RealType> distribution_type; explicit param_type(_RealType __a = _RealType(1), _RealType __b = _RealType(1)) : _M_a(__a), _M_b(__b) { } _RealType a() const { return _M_a; } _RealType b() const { return _M_b; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } private: _RealType _M_a; _RealType _M_b; }; explicit weibull_distribution(_RealType __a = _RealType(1), _RealType __b = _RealType(1)) : _M_param(__a, __b) { } explicit weibull_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } _RealType a() const { return _M_param.a(); } _RealType b() const { return _M_param.b(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); private: param_type _M_param; }; template inline bool operator==(const std::weibull_distribution<_RealType>& __d1, const std::weibull_distribution<_RealType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::weibull_distribution<_RealType>& __d1, const std::weibull_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 4465 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::weibull_distribution<_RealType>& __x); # 4480 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::weibull_distribution<_RealType>& __x); # 4495 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class extreme_value_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef extreme_value_distribution<_RealType> distribution_type; explicit param_type(_RealType __a = _RealType(0), _RealType __b = _RealType(1)) : _M_a(__a), _M_b(__b) { } _RealType a() const { return _M_a; } _RealType b() const { return _M_b; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_a == __p2._M_a && __p1._M_b == __p2._M_b; } private: _RealType _M_a; _RealType _M_b; }; explicit extreme_value_distribution(_RealType __a = _RealType(0), _RealType __b = _RealType(1)) : _M_param(__a, __b) { } explicit extreme_value_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } _RealType a() const { return _M_param.a(); } _RealType b() const { return _M_param.b(); } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return std::numeric_limits::min(); } result_type max() const { return std::numeric_limits::max(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); private: param_type _M_param; }; template inline bool operator==(const std::extreme_value_distribution<_RealType>& __d1, const std::extreme_value_distribution<_RealType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::extreme_value_distribution<_RealType>& __d1, const std::extreme_value_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 4640 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::extreme_value_distribution<_RealType>& __x); # 4655 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::extreme_value_distribution<_RealType>& __x); # 4667 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class discrete_distribution { static_assert(std::is_integral<_IntType>::value, "template argument not an integral type"); public: typedef _IntType result_type; struct param_type { typedef discrete_distribution<_IntType> distribution_type; friend class discrete_distribution<_IntType>; param_type() : _M_prob(), _M_cp() { } template param_type(_InputIterator __wbegin, _InputIterator __wend) : _M_prob(__wbegin, __wend), _M_cp() { _M_initialize(); } param_type(initializer_list __wil) : _M_prob(__wil.begin(), __wil.end()), _M_cp() { _M_initialize(); } template param_type(size_t __nw, double __xmin, double __xmax, _Func __fw); param_type(const param_type&) = default; param_type& operator=(const param_type&) = default; std::vector probabilities() const { return _M_prob.empty() ? std::vector(1, 1.0) : _M_prob; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_prob == __p2._M_prob; } private: void _M_initialize(); std::vector _M_prob; std::vector _M_cp; }; discrete_distribution() : _M_param() { } template discrete_distribution(_InputIterator __wbegin, _InputIterator __wend) : _M_param(__wbegin, __wend) { } discrete_distribution(initializer_list __wl) : _M_param(__wl) { } template discrete_distribution(size_t __nw, double __xmin, double __xmax, _Func __fw) : _M_param(__nw, __xmin, __xmax, __fw) { } explicit discrete_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } std::vector probabilities() const { return _M_param._M_prob.empty() ? std::vector(1, 1.0) : _M_param._M_prob; } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return result_type(0); } result_type max() const { return _M_param._M_prob.empty() ? result_type(0) : result_type(_M_param._M_prob.size() - 1); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); # 4817 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::discrete_distribution<_IntType1>& __x); # 4833 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::discrete_distribution<_IntType1>& __x); private: param_type _M_param; }; template inline bool operator==(const std::discrete_distribution<_IntType>& __d1, const std::discrete_distribution<_IntType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::discrete_distribution<_IntType>& __d1, const std::discrete_distribution<_IntType>& __d2) { return !(__d1 == __d2); } # 4869 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class piecewise_constant_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef piecewise_constant_distribution<_RealType> distribution_type; friend class piecewise_constant_distribution<_RealType>; param_type() : _M_int(), _M_den(), _M_cp() { } template param_type(_InputIteratorB __bfirst, _InputIteratorB __bend, _InputIteratorW __wbegin); template param_type(initializer_list<_RealType> __bi, _Func __fw); template param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw); param_type(const param_type&) = default; param_type& operator=(const param_type&) = default; std::vector<_RealType> intervals() const { if (_M_int.empty()) { std::vector<_RealType> __tmp(2); __tmp[1] = _RealType(1); return __tmp; } else return _M_int; } std::vector densities() const { return _M_den.empty() ? std::vector(1, 1.0) : _M_den; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return __p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den; } private: void _M_initialize(); std::vector<_RealType> _M_int; std::vector _M_den; std::vector _M_cp; }; explicit piecewise_constant_distribution() : _M_param() { } template piecewise_constant_distribution(_InputIteratorB __bfirst, _InputIteratorB __bend, _InputIteratorW __wbegin) : _M_param(__bfirst, __bend, __wbegin) { } template piecewise_constant_distribution(initializer_list<_RealType> __bl, _Func __fw) : _M_param(__bl, __fw) { } template piecewise_constant_distribution(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) : _M_param(__nw, __xmin, __xmax, __fw) { } explicit piecewise_constant_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } std::vector<_RealType> intervals() const { if (_M_param._M_int.empty()) { std::vector<_RealType> __tmp(2); __tmp[1] = _RealType(1); return __tmp; } else return _M_param._M_int; } std::vector densities() const { return _M_param._M_den.empty() ? std::vector(1, 1.0) : _M_param._M_den; } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return _M_param._M_int.empty() ? result_type(0) : _M_param._M_int.front(); } result_type max() const { return _M_param._M_int.empty() ? result_type(1) : _M_param._M_int.back(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); # 5056 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::piecewise_constant_distribution<_RealType1>& __x); # 5072 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::piecewise_constant_distribution<_RealType1>& __x); private: param_type _M_param; }; template inline bool operator==(const std::piecewise_constant_distribution<_RealType>& __d1, const std::piecewise_constant_distribution<_RealType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::piecewise_constant_distribution<_RealType>& __d1, const std::piecewise_constant_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 5108 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template class piecewise_linear_distribution { static_assert(std::is_floating_point<_RealType>::value, "template argument not a floating point type"); public: typedef _RealType result_type; struct param_type { typedef piecewise_linear_distribution<_RealType> distribution_type; friend class piecewise_linear_distribution<_RealType>; param_type() : _M_int(), _M_den(), _M_cp(), _M_m() { } template param_type(_InputIteratorB __bfirst, _InputIteratorB __bend, _InputIteratorW __wbegin); template param_type(initializer_list<_RealType> __bl, _Func __fw); template param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw); param_type(const param_type&) = default; param_type& operator=(const param_type&) = default; std::vector<_RealType> intervals() const { if (_M_int.empty()) { std::vector<_RealType> __tmp(2); __tmp[1] = _RealType(1); return __tmp; } else return _M_int; } std::vector densities() const { return _M_den.empty() ? std::vector(2, 1.0) : _M_den; } friend bool operator==(const param_type& __p1, const param_type& __p2) { return (__p1._M_int == __p2._M_int && __p1._M_den == __p2._M_den); } private: void _M_initialize(); std::vector<_RealType> _M_int; std::vector _M_den; std::vector _M_cp; std::vector _M_m; }; explicit piecewise_linear_distribution() : _M_param() { } template piecewise_linear_distribution(_InputIteratorB __bfirst, _InputIteratorB __bend, _InputIteratorW __wbegin) : _M_param(__bfirst, __bend, __wbegin) { } template piecewise_linear_distribution(initializer_list<_RealType> __bl, _Func __fw) : _M_param(__bl, __fw) { } template piecewise_linear_distribution(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) : _M_param(__nw, __xmin, __xmax, __fw) { } explicit piecewise_linear_distribution(const param_type& __p) : _M_param(__p) { } void reset() { } std::vector<_RealType> intervals() const { if (_M_param._M_int.empty()) { std::vector<_RealType> __tmp(2); __tmp[1] = _RealType(1); return __tmp; } else return _M_param._M_int; } std::vector densities() const { return _M_param._M_den.empty() ? std::vector(2, 1.0) : _M_param._M_den; } param_type param() const { return _M_param; } void param(const param_type& __param) { _M_param = __param; } result_type min() const { return _M_param._M_int.empty() ? result_type(0) : _M_param._M_int.front(); } result_type max() const { return _M_param._M_int.empty() ? result_type(1) : _M_param._M_int.back(); } template result_type operator()(_UniformRandomNumberGenerator& __urng) { return this->operator()(__urng, this->param()); } template result_type operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p); # 5298 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const std::piecewise_linear_distribution<_RealType1>& __x); # 5314 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 template friend std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, std::piecewise_linear_distribution<_RealType1>& __x); private: param_type _M_param; }; template inline bool operator==(const std::piecewise_linear_distribution<_RealType>& __d1, const std::piecewise_linear_distribution<_RealType>& __d2) { return __d1.param() == __d2.param(); } template inline bool operator!=(const std::piecewise_linear_distribution<_RealType>& __d1, const std::piecewise_linear_distribution<_RealType>& __d2) { return !(__d1 == __d2); } # 5358 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.h" 3 class seed_seq { public: typedef uint_least32_t result_type; seed_seq() : _M_v() { } template seed_seq(std::initializer_list<_IntType> il); template seed_seq(_InputIterator __begin, _InputIterator __end); template void generate(_RandomAccessIterator __begin, _RandomAccessIterator __end); size_t size() const { return _M_v.size(); } template void param(OutputIterator __dest) const { std::copy(_M_v.begin(), _M_v.end(), __dest); } private: std::vector _M_v; }; } # 51 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/numeric" 1 3 # 58 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/numeric" 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/numeric" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 1 3 # 66 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 81 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) { ; for (; __first != __last; ++__first) { *__first = __value; ++__value; } } } namespace std __attribute__ ((__visibility__ ("default"))) { # 119 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template inline _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) { ; for (; __first != __last; ++__first) __init = __init + *__first; return __init; } # 145 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template inline _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op) { ; for (; __first != __last; ++__first) __init = __binary_op(__init, *__first); return __init; } # 173 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template inline _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) { ; for (; __first1 != __last1; ++__first1, ++__first2) __init = __init + (*__first1 * *__first2); return __init; } # 204 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template inline _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2) { ; for (; __first1 != __last1; ++__first1, ++__first2) __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); return __init; } # 236 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType; ; if (__first == __last) return __result; _ValueType __value = *__first; *__result = __value; while (++__first != __last) { __value = __value + *__first; *++__result = __value; } return ++__result; } # 275 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType; ; if (__first == __last) return __result; _ValueType __value = *__first; *__result = __value; while (++__first != __last) { __value = __binary_op(__value, *__first); *++__result = __value; } return ++__result; } # 315 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType; ; if (__first == __last) return __result; _ValueType __value = *__first; *__result = __value; while (++__first != __last) { _ValueType __tmp = *__first; *++__result = __tmp - __value; __value = std::move(__tmp); } return ++__result; } # 356 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_numeric.h" 3 template _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) { typedef typename iterator_traits<_InputIterator>::value_type _ValueType; ; if (__first == __last) return __result; _ValueType __value = *__first; *__result = __value; while (++__first != __last) { _ValueType __tmp = *__first; *++__result = __binary_op(__tmp, __value); __value = std::move(__tmp); } return ++__result; } } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/numeric" 2 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { # 52 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 3 template struct _Mod { static _Tp __calc(_Tp __x) { if (__a == 1) __x %= __m; else { static const _Tp __q = __m / __a; static const _Tp __r = __m % __a; _Tp __t1 = __a * (__x % __q); _Tp __t2 = __r * (__x / __q); if (__t1 >= __t2) __x = __t1 - __t2; else __x = __m - __t2 + __t1; } if (__c != 0) { const _Tp __d = __m - __x; if (__d > __c) __x += __c; else __x = __c - __d; } return __x; } }; template struct _Mod<_Tp, __m, __a, __c, true> { static _Tp __calc(_Tp __x) { return __a * __x + __c; } }; template _OutputIterator __transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __unary_op) { for (; __first != __last; ++__first, ++__result) *__result = __unary_op(*__first); return __result; } } template constexpr _UIntType linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier; template constexpr _UIntType linear_congruential_engine<_UIntType, __a, __c, __m>::increment; template constexpr _UIntType linear_congruential_engine<_UIntType, __a, __c, __m>::modulus; template constexpr _UIntType linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed; template void linear_congruential_engine<_UIntType, __a, __c, __m>:: seed(result_type __s) { if ((__detail::__mod<_UIntType, __m>(__c) == 0) && (__detail::__mod<_UIntType, __m>(__s) == 0)) _M_x = 1; else _M_x = __detail::__mod<_UIntType, __m>(__s); } template template typename std::enable_if::value>::type linear_congruential_engine<_UIntType, __a, __c, __m>:: seed(_Sseq& __q) { const _UIntType __k0 = __m == 0 ? std::numeric_limits<_UIntType>::digits : std::__lg(__m); const _UIntType __k = (__k0 + 31) / 32; uint_least32_t __arr[__k + 3]; __q.generate(__arr + 0, __arr + __k + 3); _UIntType __factor = 1u; _UIntType __sum = 0u; for (size_t __j = 0; __j < __k; ++__j) { __sum += __arr[__j + 3] * __factor; __factor *= __detail::_Shift<_UIntType, 32>::__value; } seed(__sum); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const linear_congruential_engine<_UIntType, __a, __c, __m>& __lcr) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); __os.fill(__os.widen(' ')); __os << __lcr._M_x; __os.flags(__flags); __os.fill(__fill); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, linear_congruential_engine<_UIntType, __a, __c, __m>& __lcr) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec); __is >> __lcr._M_x; __is.flags(__flags); return __is; } template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::word_size; template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::state_size; template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::shift_size; template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mask_bits; template constexpr _UIntType mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::xor_mask; template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_u; template constexpr _UIntType mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_d; template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_s; template constexpr _UIntType mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_b; template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_t; template constexpr _UIntType mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_c; template constexpr size_t mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_l; template constexpr _UIntType mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>:: initialization_multiplier; template constexpr _UIntType mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::default_seed; template void mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>:: seed(result_type __sd) { _M_x[0] = __detail::__mod<_UIntType, __detail::_Shift<_UIntType, __w>::__value>(__sd); for (size_t __i = 1; __i < state_size; ++__i) { _UIntType __x = _M_x[__i - 1]; __x ^= __x >> (__w - 2); __x *= __f; __x += __detail::__mod<_UIntType, __n>(__i); _M_x[__i] = __detail::__mod<_UIntType, __detail::_Shift<_UIntType, __w>::__value>(__x); } _M_p = state_size; } template template typename std::enable_if::value>::type mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>:: seed(_Sseq& __q) { const _UIntType __upper_mask = (~_UIntType()) << __r; const size_t __k = (__w + 31) / 32; uint_least32_t __arr[__n * __k]; __q.generate(__arr + 0, __arr + __n * __k); bool __zero = true; for (size_t __i = 0; __i < state_size; ++__i) { _UIntType __factor = 1u; _UIntType __sum = 0u; for (size_t __j = 0; __j < __k; ++__j) { __sum += __arr[__k * __i + __j] * __factor; __factor *= __detail::_Shift<_UIntType, 32>::__value; } _M_x[__i] = __detail::__mod<_UIntType, __detail::_Shift<_UIntType, __w>::__value>(__sum); if (__zero) { if (__i == 0) { if ((_M_x[0] & __upper_mask) != 0u) __zero = false; } else if (_M_x[__i] != 0u) __zero = false; } } if (__zero) _M_x[0] = __detail::_Shift<_UIntType, __w - 1>::__value; } template typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>:: operator()() { if (_M_p >= state_size) { const _UIntType __upper_mask = (~_UIntType()) << __r; const _UIntType __lower_mask = ~__upper_mask; for (size_t __k = 0; __k < (__n - __m); ++__k) { _UIntType __y = ((_M_x[__k] & __upper_mask) | (_M_x[__k + 1] & __lower_mask)); _M_x[__k] = (_M_x[__k + __m] ^ (__y >> 1) ^ ((__y & 0x01) ? __a : 0)); } for (size_t __k = (__n - __m); __k < (__n - 1); ++__k) { _UIntType __y = ((_M_x[__k] & __upper_mask) | (_M_x[__k + 1] & __lower_mask)); _M_x[__k] = (_M_x[__k + (__m - __n)] ^ (__y >> 1) ^ ((__y & 0x01) ? __a : 0)); } _UIntType __y = ((_M_x[__n - 1] & __upper_mask) | (_M_x[0] & __lower_mask)); _M_x[__n - 1] = (_M_x[__m - 1] ^ (__y >> 1) ^ ((__y & 0x01) ? __a : 0)); _M_p = 0; } result_type __z = _M_x[_M_p++]; __z ^= (__z >> __u) & __d; __z ^= (__z << __s) & __b; __z ^= (__z << __t) & __c; __z ^= (__z >> __l); return __z; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); __os.fill(__space); for (size_t __i = 0; __i < __n; ++__i) __os << __x._M_x[__i] << __space; __os << __x._M_p; __os.flags(__flags); __os.fill(__fill); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); for (size_t __i = 0; __i < __n; ++__i) __is >> __x._M_x[__i]; __is >> __x._M_p; __is.flags(__flags); return __is; } template constexpr size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size; template constexpr size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag; template constexpr size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag; template constexpr _UIntType subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed; template void subtract_with_carry_engine<_UIntType, __w, __s, __r>:: seed(result_type __value) { std::linear_congruential_engine __lcg(__value == 0u ? default_seed : __value); const size_t __n = (__w + 31) / 32; for (size_t __i = 0; __i < long_lag; ++__i) { _UIntType __sum = 0u; _UIntType __factor = 1u; for (size_t __j = 0; __j < __n; ++__j) { __sum += __detail::__mod::__value> (__lcg()) * __factor; __factor *= __detail::_Shift<_UIntType, 32>::__value; } _M_x[__i] = __detail::__mod<_UIntType, __detail::_Shift<_UIntType, __w>::__value>(__sum); } _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; _M_p = 0; } template template typename std::enable_if::value>::type subtract_with_carry_engine<_UIntType, __w, __s, __r>:: seed(_Sseq& __q) { const size_t __k = (__w + 31) / 32; uint_least32_t __arr[__r * __k]; __q.generate(__arr + 0, __arr + __r * __k); for (size_t __i = 0; __i < long_lag; ++__i) { _UIntType __sum = 0u; _UIntType __factor = 1u; for (size_t __j = 0; __j < __k; ++__j) { __sum += __arr[__k * __i + __j] * __factor; __factor *= __detail::_Shift<_UIntType, 32>::__value; } _M_x[__i] = __detail::__mod<_UIntType, __detail::_Shift<_UIntType, __w>::__value>(__sum); } _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; _M_p = 0; } template typename subtract_with_carry_engine<_UIntType, __w, __s, __r>:: result_type subtract_with_carry_engine<_UIntType, __w, __s, __r>:: operator()() { long __ps = _M_p - short_lag; if (__ps < 0) __ps += long_lag; _UIntType __xi; if (_M_x[__ps] >= _M_x[_M_p] + _M_carry) { __xi = _M_x[__ps] - _M_x[_M_p] - _M_carry; _M_carry = 0; } else { __xi = (__detail::_Shift<_UIntType, __w>::__value - _M_x[_M_p] - _M_carry + _M_x[__ps]); _M_carry = 1; } _M_x[_M_p] = __xi; if (++_M_p >= long_lag) _M_p = 0; return __xi; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const subtract_with_carry_engine<_UIntType, __w, __s, __r>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); __os.fill(__space); for (size_t __i = 0; __i < __r; ++__i) __os << __x._M_x[__i] << __space; __os << __x._M_carry << __space << __x._M_p; __os.flags(__flags); __os.fill(__fill); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, subtract_with_carry_engine<_UIntType, __w, __s, __r>& __x) { typedef std::basic_ostream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); for (size_t __i = 0; __i < __r; ++__i) __is >> __x._M_x[__i]; __is >> __x._M_carry; __is >> __x._M_p; __is.flags(__flags); return __is; } template constexpr size_t discard_block_engine<_RandomNumberEngine, __p, __r>::block_size; template constexpr size_t discard_block_engine<_RandomNumberEngine, __p, __r>::used_block; template typename discard_block_engine<_RandomNumberEngine, __p, __r>::result_type discard_block_engine<_RandomNumberEngine, __p, __r>:: operator()() { if (_M_n >= used_block) { _M_b.discard(block_size - _M_n); _M_n = 0; } ++_M_n; return _M_b(); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const discard_block_engine<_RandomNumberEngine, __p, __r>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); __os.fill(__space); __os << __x.base() << __space << __x._M_n; __os.flags(__flags); __os.fill(__fill); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, discard_block_engine<_RandomNumberEngine, __p, __r>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); __is >> __x._M_b >> __x._M_n; __is.flags(__flags); return __is; } template typename independent_bits_engine<_RandomNumberEngine, __w, _UIntType>:: result_type independent_bits_engine<_RandomNumberEngine, __w, _UIntType>:: operator()() { const long double __r = static_cast(_M_b.max()) - static_cast(_M_b.min()) + 1.0L; const result_type __m = std::log(__r) / std::log(2.0L); result_type __n, __n0, __y0, __y1, __s0, __s1; for (size_t __i = 0; __i < 2; ++__i) { __n = (__w + __m - 1) / __m + __i; __n0 = __n - __w % __n; const result_type __w0 = __w / __n; const result_type __w1 = __w0 + 1; __s0 = result_type(1) << __w0; __s1 = result_type(1) << __w1; __y0 = __s0 * (__r / __s0); __y1 = __s1 * (__r / __s1); if (__r - __y0 <= __y0 / __n) break; } result_type __sum = 0; for (size_t __k = 0; __k < __n0; ++__k) { result_type __u; do __u = _M_b() - _M_b.min(); while (__u >= __y0); __sum = __s0 * __sum + __u % __s0; } for (size_t __k = __n0; __k < __n; ++__k) { result_type __u; do __u = _M_b() - _M_b.min(); while (__u >= __y1); __sum = __s1 * __sum + __u % __s1; } return __sum; } template constexpr size_t shuffle_order_engine<_RandomNumberEngine, __k>::table_size; template typename shuffle_order_engine<_RandomNumberEngine, __k>::result_type shuffle_order_engine<_RandomNumberEngine, __k>:: operator()() { size_t __j = __k * ((_M_y - _M_b.min()) / (_M_b.max() - _M_b.min() + 1.0L)); _M_y = _M_v[__j]; _M_v[__j] = _M_b(); return _M_y; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const shuffle_order_engine<_RandomNumberEngine, __k>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::dec | __ios_base::fixed | __ios_base::left); __os.fill(__space); __os << __x.base(); for (size_t __i = 0; __i < __k; ++__i) __os << __space << __x._M_v[__i]; __os << __space << __x._M_y; __os.flags(__flags); __os.fill(__fill); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, shuffle_order_engine<_RandomNumberEngine, __k>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); __is >> __x._M_b; for (size_t __i = 0; __i < __k; ++__i) __is >> __x._M_v[__i]; __is >> __x._M_y; __is.flags(__flags); return __is; } template template typename uniform_int_distribution<_IntType>::result_type uniform_int_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { typedef typename std::make_unsigned::type __urngtype; typedef typename std::make_unsigned::type __utype; typedef typename std::conditional<(sizeof(__urngtype) > sizeof(__utype)), __urngtype, __utype>::type __uctype; const __uctype __urngmin = __urng.min(); const __uctype __urngmax = __urng.max(); const __uctype __urngrange = __urngmax - __urngmin; const __uctype __urange = __uctype(__param.b()) - __uctype(__param.a()); __uctype __ret; if (__urngrange > __urange) { const __uctype __uerange = __urange + 1; const __uctype __scaling = __urngrange / __uerange; const __uctype __past = __uerange * __scaling; do __ret = __uctype(__urng()) - __urngmin; while (__ret >= __past); __ret /= __scaling; } else if (__urngrange < __urange) { # 884 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 3 __uctype __tmp; do { const __uctype __uerngrange = __urngrange + 1; __tmp = (__uerngrange * operator() (__urng, param_type(0, __urange / __uerngrange))); __ret = __tmp + (__uctype(__urng()) - __urngmin); } while (__ret > __urange || __ret < __tmp); } else __ret = __uctype(__urng()) - __urngmin; return __ret + __param.a(); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const uniform_int_distribution<_IntType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os << __x.a() << __space << __x.b(); __os.flags(__flags); __os.fill(__fill); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, uniform_int_distribution<_IntType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _IntType __a, __b; __is >> __a >> __b; __x.param(typename uniform_int_distribution<_IntType>:: param_type(__a, __b)); __is.flags(__flags); return __is; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const uniform_real_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.a() << __space << __x.b(); __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, uniform_real_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::skipws); _RealType __a, __b; __is >> __a >> __b; __x.param(typename uniform_real_distribution<_RealType>:: param_type(__a, __b)); __is.flags(__flags); return __is; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const bernoulli_distribution& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__os.widen(' ')); __os.precision(std::numeric_limits::max_digits10); __os << __x.p(); __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template template typename geometric_distribution<_IntType>::result_type geometric_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { const double __naf = (1 - std::numeric_limits::epsilon()) / 2; const double __thr = std::numeric_limits<_IntType>::max() + __naf; __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); double __cand; do __cand = std::floor(std::log(__aurng()) / __param._M_log_1_p); while (__cand >= __thr); return result_type(__cand + __naf); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const geometric_distribution<_IntType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__os.widen(' ')); __os.precision(std::numeric_limits::max_digits10); __os << __x.p(); __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, geometric_distribution<_IntType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::skipws); double __p; __is >> __p; __x.param(typename geometric_distribution<_IntType>::param_type(__p)); __is.flags(__flags); return __is; } template template typename negative_binomial_distribution<_IntType>::result_type negative_binomial_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng) { const double __y = _M_gd(__urng); std::poisson_distribution __poisson(__y); return __poisson(__urng); } template template typename negative_binomial_distribution<_IntType>::result_type negative_binomial_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { typedef typename std::gamma_distribution::param_type param_type; const double __y = _M_gd(__urng, param_type(__p.k(), (1.0 - __p.p()) / __p.p())); std::poisson_distribution __poisson(__y); return __poisson(__urng); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const negative_binomial_distribution<_IntType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__os.widen(' ')); __os.precision(std::numeric_limits::max_digits10); __os << __x.k() << __space << __x.p() << __space << __x._M_gd; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, negative_binomial_distribution<_IntType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::skipws); _IntType __k; double __p; __is >> __k >> __p >> __x._M_gd; __x.param(typename negative_binomial_distribution<_IntType>:: param_type(__k, __p)); __is.flags(__flags); return __is; } template void poisson_distribution<_IntType>::param_type:: _M_initialize() { if (_M_mean >= 12) { const double __m = std::floor(_M_mean); _M_lm_thr = std::log(_M_mean); _M_lfm = std::lgamma(__m + 1); _M_sm = std::sqrt(__m); const double __pi_4 = 0.7853981633974483096156608458198757L; const double __dx = std::sqrt(2 * __m * std::log(32 * __m / __pi_4)); _M_d = std::round(std::max(6.0, std::min(__m, __dx))); const double __cx = 2 * __m + _M_d; _M_scx = std::sqrt(__cx / 2); _M_1cx = 1 / __cx; _M_c2b = std::sqrt(__pi_4 * __cx) * std::exp(_M_1cx); _M_cb = 2 * __cx * std::exp(-_M_d * _M_1cx * (1 + _M_d / 2)) / _M_d; } else _M_lm_thr = std::exp(-_M_mean); } # 1198 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 3 template template typename poisson_distribution<_IntType>::result_type poisson_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); if (__param.mean() >= 12) { double __x; const double __naf = (1 - std::numeric_limits::epsilon()) / 2; const double __thr = std::numeric_limits<_IntType>::max() + __naf; const double __m = std::floor(__param.mean()); const double __spi_2 = 1.2533141373155002512078826424055226L; const double __c1 = __param._M_sm * __spi_2; const double __c2 = __param._M_c2b + __c1; const double __c3 = __c2 + 1; const double __c4 = __c3 + 1; const double __e178 = 1.0129030479320018583185514777512983L; const double __c5 = __c4 + __e178; const double __c = __param._M_cb + __c5; const double __2cx = 2 * (2 * __m + __param._M_d); bool __reject = true; do { const double __u = __c * __aurng(); const double __e = -std::log(__aurng()); double __w = 0.0; if (__u <= __c1) { const double __n = _M_nd(__urng); const double __y = -std::abs(__n) * __param._M_sm - 1; __x = std::floor(__y); __w = -__n * __n / 2; if (__x < -__m) continue; } else if (__u <= __c2) { const double __n = _M_nd(__urng); const double __y = 1 + std::abs(__n) * __param._M_scx; __x = std::ceil(__y); __w = __y * (2 - __y) * __param._M_1cx; if (__x > __param._M_d) continue; } else if (__u <= __c3) __x = -1; else if (__u <= __c4) __x = 0; else if (__u <= __c5) __x = 1; else { const double __v = -std::log(__aurng()); const double __y = __param._M_d + __v * __2cx / __param._M_d; __x = std::ceil(__y); __w = -__param._M_d * __param._M_1cx * (1 + __y / 2); } __reject = (__w - __e - __x * __param._M_lm_thr > __param._M_lfm - std::lgamma(__x + __m + 1)); __reject |= __x + __m >= __thr; } while (__reject); return result_type(__x + __m + __naf); } else { _IntType __x = 0; double __prod = 1.0; do { __prod *= __aurng(); __x += 1; } while (__prod > __param._M_lm_thr); return __x - 1; } } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const poisson_distribution<_IntType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits::max_digits10); __os << __x.mean() << __space << __x._M_nd; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, poisson_distribution<_IntType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::skipws); double __mean; __is >> __mean >> __x._M_nd; __x.param(typename poisson_distribution<_IntType>::param_type(__mean)); __is.flags(__flags); return __is; } template void binomial_distribution<_IntType>::param_type:: _M_initialize() { const double __p12 = _M_p <= 0.5 ? _M_p : 1.0 - _M_p; _M_easy = true; if (_M_t * __p12 >= 8) { _M_easy = false; const double __np = std::floor(_M_t * __p12); const double __pa = __np / _M_t; const double __1p = 1 - __pa; const double __pi_4 = 0.7853981633974483096156608458198757L; const double __d1x = std::sqrt(__np * __1p * std::log(32 * __np / (81 * __pi_4 * __1p))); _M_d1 = std::round(std::max(1.0, __d1x)); const double __d2x = std::sqrt(__np * __1p * std::log(32 * _M_t * __1p / (__pi_4 * __pa))); _M_d2 = std::round(std::max(1.0, __d2x)); const double __spi_2 = 1.2533141373155002512078826424055226L; _M_s1 = std::sqrt(__np * __1p) * (1 + _M_d1 / (4 * __np)); _M_s2 = std::sqrt(__np * __1p) * (1 + _M_d2 / (4 * _M_t * __1p)); _M_c = 2 * _M_d1 / __np; _M_a1 = std::exp(_M_c) * _M_s1 * __spi_2; const double __a12 = _M_a1 + _M_s2 * __spi_2; const double __s1s = _M_s1 * _M_s1; _M_a123 = __a12 + (std::exp(_M_d1 / (_M_t * __1p)) * 2 * __s1s / _M_d1 * std::exp(-_M_d1 * _M_d1 / (2 * __s1s))); const double __s2s = _M_s2 * _M_s2; _M_s = (_M_a123 + 2 * __s2s / _M_d2 * std::exp(-_M_d2 * _M_d2 / (2 * __s2s))); _M_lf = (std::lgamma(__np + 1) + std::lgamma(_M_t - __np + 1)); _M_lp1p = std::log(__pa / __1p); _M_q = -std::log(1 - (__p12 - __pa) / __1p); } else _M_q = -std::log(1 - __p12); } template template typename binomial_distribution<_IntType>::result_type binomial_distribution<_IntType>:: _M_waiting(_UniformRandomNumberGenerator& __urng, _IntType __t) { _IntType __x = 0; double __sum = 0.0; __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); do { const double __e = -std::log(__aurng()); __sum += __e / (__t - __x); __x += 1; } while (__sum <= _M_param._M_q); return __x - 1; } # 1430 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 3 template template typename binomial_distribution<_IntType>::result_type binomial_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { result_type __ret; const _IntType __t = __param.t(); const double __p = __param.p(); const double __p12 = __p <= 0.5 ? __p : 1.0 - __p; __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); if (!__param._M_easy) { double __x; const double __naf = (1 - std::numeric_limits::epsilon()) / 2; const double __thr = std::numeric_limits<_IntType>::max() + __naf; const double __np = std::floor(__t * __p12); const double __spi_2 = 1.2533141373155002512078826424055226L; const double __a1 = __param._M_a1; const double __a12 = __a1 + __param._M_s2 * __spi_2; const double __a123 = __param._M_a123; const double __s1s = __param._M_s1 * __param._M_s1; const double __s2s = __param._M_s2 * __param._M_s2; bool __reject; do { const double __u = __param._M_s * __aurng(); double __v; if (__u <= __a1) { const double __n = _M_nd(__urng); const double __y = __param._M_s1 * std::abs(__n); __reject = __y >= __param._M_d1; if (!__reject) { const double __e = -std::log(__aurng()); __x = std::floor(__y); __v = -__e - __n * __n / 2 + __param._M_c; } } else if (__u <= __a12) { const double __n = _M_nd(__urng); const double __y = __param._M_s2 * std::abs(__n); __reject = __y >= __param._M_d2; if (!__reject) { const double __e = -std::log(__aurng()); __x = std::floor(-__y); __v = -__e - __n * __n / 2; } } else if (__u <= __a123) { const double __e1 = -std::log(__aurng()); const double __e2 = -std::log(__aurng()); const double __y = __param._M_d1 + 2 * __s1s * __e1 / __param._M_d1; __x = std::floor(__y); __v = (-__e2 + __param._M_d1 * (1 / (__t - __np) -__y / (2 * __s1s))); __reject = false; } else { const double __e1 = -std::log(__aurng()); const double __e2 = -std::log(__aurng()); const double __y = __param._M_d2 + 2 * __s2s * __e1 / __param._M_d2; __x = std::floor(-__y); __v = -__e2 - __param._M_d2 * __y / (2 * __s2s); __reject = false; } __reject = __reject || __x < -__np || __x > __t - __np; if (!__reject) { const double __lfx = std::lgamma(__np + __x + 1) + std::lgamma(__t - (__np + __x) + 1); __reject = __v > __param._M_lf - __lfx + __x * __param._M_lp1p; } __reject |= __x + __np >= __thr; } while (__reject); __x += __np + __naf; const _IntType __z = _M_waiting(__urng, __t - _IntType(__x)); __ret = _IntType(__x) + __z; } else __ret = _M_waiting(__urng, __t); if (__p12 != __p) __ret = __t - __ret; return __ret; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const binomial_distribution<_IntType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits::max_digits10); __os << __x.t() << __space << __x.p() << __space << __x._M_nd; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, binomial_distribution<_IntType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _IntType __t; double __p; __is >> __t >> __p >> __x._M_nd; __x.param(typename binomial_distribution<_IntType>:: param_type(__t, __p)); __is.flags(__flags); return __is; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const exponential_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__os.widen(' ')); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.lambda(); __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, exponential_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __lambda; __is >> __lambda; __x.param(typename exponential_distribution<_RealType>:: param_type(__lambda)); __is.flags(__flags); return __is; } # 1647 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/random.tcc" 3 template template typename normal_distribution<_RealType>::result_type normal_distribution<_RealType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { result_type __ret; __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); if (_M_saved_available) { _M_saved_available = false; __ret = _M_saved; } else { result_type __x, __y, __r2; do { __x = result_type(2.0) * __aurng() - 1.0; __y = result_type(2.0) * __aurng() - 1.0; __r2 = __x * __x + __y * __y; } while (__r2 > 1.0 || __r2 == 0.0); const result_type __mult = std::sqrt(-2 * std::log(__r2) / __r2); _M_saved = __x * __mult; _M_saved_available = true; __ret = __y * __mult; } __ret = __ret * __param.stddev() + __param.mean(); return __ret; } template bool operator==(const std::normal_distribution<_RealType>& __d1, const std::normal_distribution<_RealType>& __d2) { if (__d1._M_param == __d2._M_param && __d1._M_saved_available == __d2._M_saved_available) { if (__d1._M_saved_available && __d1._M_saved == __d2._M_saved) return true; else if(!__d1._M_saved_available) return true; else return false; } else return false; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const normal_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.mean() << __space << __x.stddev() << __space << __x._M_saved_available; if (__x._M_saved_available) __os << __space << __x._M_saved; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, normal_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); double __mean, __stddev; __is >> __mean >> __stddev >> __x._M_saved_available; if (__x._M_saved_available) __is >> __x._M_saved; __x.param(typename normal_distribution<_RealType>:: param_type(__mean, __stddev)); __is.flags(__flags); return __is; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const lognormal_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.m() << __space << __x.s() << __space << __x._M_nd; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, lognormal_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __m, __s; __is >> __m >> __s >> __x._M_nd; __x.param(typename lognormal_distribution<_RealType>:: param_type(__m, __s)); __is.flags(__flags); return __is; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const chi_squared_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.n() << __space << __x._M_gd; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, chi_squared_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __n; __is >> __n >> __x._M_gd; __x.param(typename chi_squared_distribution<_RealType>:: param_type(__n)); __is.flags(__flags); return __is; } template template typename cauchy_distribution<_RealType>::result_type cauchy_distribution<_RealType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); _RealType __u; do __u = __aurng(); while (__u == 0.5); const _RealType __pi = 3.1415926535897932384626433832795029L; return __p.a() + __p.b() * std::tan(__pi * __u); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const cauchy_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.a() << __space << __x.b(); __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, cauchy_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __a, __b; __is >> __a >> __b; __x.param(typename cauchy_distribution<_RealType>:: param_type(__a, __b)); __is.flags(__flags); return __is; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const fisher_f_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.m() << __space << __x.n() << __space << __x._M_gd_x << __space << __x._M_gd_y; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, fisher_f_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __m, __n; __is >> __m >> __n >> __x._M_gd_x >> __x._M_gd_y; __x.param(typename fisher_f_distribution<_RealType>:: param_type(__m, __n)); __is.flags(__flags); return __is; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const student_t_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.n() << __space << __x._M_nd << __space << __x._M_gd; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, student_t_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __n; __is >> __n >> __x._M_nd >> __x._M_gd; __x.param(typename student_t_distribution<_RealType>::param_type(__n)); __is.flags(__flags); return __is; } template void gamma_distribution<_RealType>::param_type:: _M_initialize() { _M_malpha = _M_alpha < 1.0 ? _M_alpha + _RealType(1.0) : _M_alpha; const _RealType __a1 = _M_malpha - _RealType(1.0) / _RealType(3.0); _M_a2 = _RealType(1.0) / std::sqrt(_RealType(9.0) * __a1); } template template typename gamma_distribution<_RealType>::result_type gamma_distribution<_RealType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); result_type __u, __v, __n; const result_type __a1 = (__param._M_malpha - _RealType(1.0) / _RealType(3.0)); do { do { __n = _M_nd(__urng); __v = result_type(1.0) + __param._M_a2 * __n; } while (__v <= 0.0); __v = __v * __v * __v; __u = __aurng(); } while (__u > result_type(1.0) - 0.331 * __n * __n * __n * __n && (std::log(__u) > (0.5 * __n * __n + __a1 * (1.0 - __v + std::log(__v))))); if (__param.alpha() == __param._M_malpha) return __a1 * __v * __param.beta(); else { do __u = __aurng(); while (__u == 0.0); return (std::pow(__u, result_type(1.0) / __param.alpha()) * __a1 * __v * __param.beta()); } } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const gamma_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.alpha() << __space << __x.beta() << __space << __x._M_nd; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, gamma_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __alpha_val, __beta_val; __is >> __alpha_val >> __beta_val >> __x._M_nd; __x.param(typename gamma_distribution<_RealType>:: param_type(__alpha_val, __beta_val)); __is.flags(__flags); return __is; } template template typename weibull_distribution<_RealType>::result_type weibull_distribution<_RealType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); return __p.b() * std::pow(-std::log(__aurng()), result_type(1) / __p.a()); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const weibull_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.a() << __space << __x.b(); __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, weibull_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __a, __b; __is >> __a >> __b; __x.param(typename weibull_distribution<_RealType>:: param_type(__a, __b)); __is.flags(__flags); return __is; } template template typename extreme_value_distribution<_RealType>::result_type extreme_value_distribution<_RealType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __p) { __detail::_Adaptor<_UniformRandomNumberGenerator, result_type> __aurng(__urng); return __p.a() - __p.b() * std::log(-std::log(__aurng())); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const extreme_value_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); __os << __x.a() << __space << __x.b(); __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, extreme_value_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); _RealType __a, __b; __is >> __a >> __b; __x.param(typename extreme_value_distribution<_RealType>:: param_type(__a, __b)); __is.flags(__flags); return __is; } template void discrete_distribution<_IntType>::param_type:: _M_initialize() { if (_M_prob.size() < 2) { _M_prob.clear(); return; } const double __sum = std::accumulate(_M_prob.begin(), _M_prob.end(), 0.0); __detail::__transform(_M_prob.begin(), _M_prob.end(), _M_prob.begin(), std::bind2nd(std::divides(), __sum)); _M_cp.reserve(_M_prob.size()); std::partial_sum(_M_prob.begin(), _M_prob.end(), std::back_inserter(_M_cp)); _M_cp[_M_cp.size() - 1] = 1.0; } template template discrete_distribution<_IntType>::param_type:: param_type(size_t __nw, double __xmin, double __xmax, _Func __fw) : _M_prob(), _M_cp() { const size_t __n = __nw == 0 ? 1 : __nw; const double __delta = (__xmax - __xmin) / __n; _M_prob.reserve(__n); for (size_t __k = 0; __k < __nw; ++__k) _M_prob.push_back(__fw(__xmin + __k * __delta + 0.5 * __delta)); _M_initialize(); } template template typename discrete_distribution<_IntType>::result_type discrete_distribution<_IntType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { if (__param._M_cp.empty()) return result_type(0); __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); const double __p = __aurng(); auto __pos = std::lower_bound(__param._M_cp.begin(), __param._M_cp.end(), __p); return __pos - __param._M_cp.begin(); } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const discrete_distribution<_IntType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits::max_digits10); std::vector __prob = __x.probabilities(); __os << __prob.size(); for (auto __dit = __prob.begin(); __dit != __prob.end(); ++__dit) __os << __space << *__dit; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, discrete_distribution<_IntType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); size_t __n; __is >> __n; std::vector __prob_vec; __prob_vec.reserve(__n); for (; __n != 0; --__n) { double __prob; __is >> __prob; __prob_vec.push_back(__prob); } __x.param(typename discrete_distribution<_IntType>:: param_type(__prob_vec.begin(), __prob_vec.end())); __is.flags(__flags); return __is; } template void piecewise_constant_distribution<_RealType>::param_type:: _M_initialize() { if (_M_int.size() < 2 || (_M_int.size() == 2 && _M_int[0] == _RealType(0) && _M_int[1] == _RealType(1))) { _M_int.clear(); _M_den.clear(); return; } const double __sum = std::accumulate(_M_den.begin(), _M_den.end(), 0.0); __detail::__transform(_M_den.begin(), _M_den.end(), _M_den.begin(), std::bind2nd(std::divides(), __sum)); _M_cp.reserve(_M_den.size()); std::partial_sum(_M_den.begin(), _M_den.end(), std::back_inserter(_M_cp)); _M_cp[_M_cp.size() - 1] = 1.0; for (size_t __k = 0; __k < _M_den.size(); ++__k) _M_den[__k] /= _M_int[__k + 1] - _M_int[__k]; } template template piecewise_constant_distribution<_RealType>::param_type:: param_type(_InputIteratorB __bbegin, _InputIteratorB __bend, _InputIteratorW __wbegin) : _M_int(), _M_den(), _M_cp() { if (__bbegin != __bend) { for (;;) { _M_int.push_back(*__bbegin); ++__bbegin; if (__bbegin == __bend) break; _M_den.push_back(*__wbegin); ++__wbegin; } } _M_initialize(); } template template piecewise_constant_distribution<_RealType>::param_type:: param_type(initializer_list<_RealType> __bl, _Func __fw) : _M_int(), _M_den(), _M_cp() { _M_int.reserve(__bl.size()); for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter) _M_int.push_back(*__biter); _M_den.reserve(_M_int.size() - 1); for (size_t __k = 0; __k < _M_int.size() - 1; ++__k) _M_den.push_back(__fw(0.5 * (_M_int[__k + 1] + _M_int[__k]))); _M_initialize(); } template template piecewise_constant_distribution<_RealType>::param_type:: param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) : _M_int(), _M_den(), _M_cp() { const size_t __n = __nw == 0 ? 1 : __nw; const _RealType __delta = (__xmax - __xmin) / __n; _M_int.reserve(__n + 1); for (size_t __k = 0; __k <= __nw; ++__k) _M_int.push_back(__xmin + __k * __delta); _M_den.reserve(__n); for (size_t __k = 0; __k < __nw; ++__k) _M_den.push_back(__fw(_M_int[__k] + 0.5 * __delta)); _M_initialize(); } template template typename piecewise_constant_distribution<_RealType>::result_type piecewise_constant_distribution<_RealType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); const double __p = __aurng(); if (__param._M_cp.empty()) return __p; auto __pos = std::lower_bound(__param._M_cp.begin(), __param._M_cp.end(), __p); const size_t __i = __pos - __param._M_cp.begin(); const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; return __param._M_int[__i] + (__p - __pref) / __param._M_den[__i]; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const piecewise_constant_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); std::vector<_RealType> __int = __x.intervals(); __os << __int.size() - 1; for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit) __os << __space << *__xit; std::vector __den = __x.densities(); for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit) __os << __space << *__dit; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, piecewise_constant_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); size_t __n; __is >> __n; std::vector<_RealType> __int_vec; __int_vec.reserve(__n + 1); for (size_t __i = 0; __i <= __n; ++__i) { _RealType __int; __is >> __int; __int_vec.push_back(__int); } std::vector __den_vec; __den_vec.reserve(__n); for (size_t __i = 0; __i < __n; ++__i) { double __den; __is >> __den; __den_vec.push_back(__den); } __x.param(typename piecewise_constant_distribution<_RealType>:: param_type(__int_vec.begin(), __int_vec.end(), __den_vec.begin())); __is.flags(__flags); return __is; } template void piecewise_linear_distribution<_RealType>::param_type:: _M_initialize() { if (_M_int.size() < 2 || (_M_int.size() == 2 && _M_int[0] == _RealType(0) && _M_int[1] == _RealType(1) && _M_den[0] == _M_den[1])) { _M_int.clear(); _M_den.clear(); return; } double __sum = 0.0; _M_cp.reserve(_M_int.size() - 1); _M_m.reserve(_M_int.size() - 1); for (size_t __k = 0; __k < _M_int.size() - 1; ++__k) { const _RealType __delta = _M_int[__k + 1] - _M_int[__k]; __sum += 0.5 * (_M_den[__k + 1] + _M_den[__k]) * __delta; _M_cp.push_back(__sum); _M_m.push_back((_M_den[__k + 1] - _M_den[__k]) / __delta); } __detail::__transform(_M_den.begin(), _M_den.end(), _M_den.begin(), std::bind2nd(std::divides(), __sum)); __detail::__transform(_M_cp.begin(), _M_cp.end(), _M_cp.begin(), std::bind2nd(std::divides(), __sum)); __detail::__transform(_M_m.begin(), _M_m.end(), _M_m.begin(), std::bind2nd(std::divides(), __sum)); _M_cp[_M_cp.size() - 1] = 1.0; } template template piecewise_linear_distribution<_RealType>::param_type:: param_type(_InputIteratorB __bbegin, _InputIteratorB __bend, _InputIteratorW __wbegin) : _M_int(), _M_den(), _M_cp(), _M_m() { for (; __bbegin != __bend; ++__bbegin, ++__wbegin) { _M_int.push_back(*__bbegin); _M_den.push_back(*__wbegin); } _M_initialize(); } template template piecewise_linear_distribution<_RealType>::param_type:: param_type(initializer_list<_RealType> __bl, _Func __fw) : _M_int(), _M_den(), _M_cp(), _M_m() { _M_int.reserve(__bl.size()); _M_den.reserve(__bl.size()); for (auto __biter = __bl.begin(); __biter != __bl.end(); ++__biter) { _M_int.push_back(*__biter); _M_den.push_back(__fw(*__biter)); } _M_initialize(); } template template piecewise_linear_distribution<_RealType>::param_type:: param_type(size_t __nw, _RealType __xmin, _RealType __xmax, _Func __fw) : _M_int(), _M_den(), _M_cp(), _M_m() { const size_t __n = __nw == 0 ? 1 : __nw; const _RealType __delta = (__xmax - __xmin) / __n; _M_int.reserve(__n + 1); _M_den.reserve(__n + 1); for (size_t __k = 0; __k <= __nw; ++__k) { _M_int.push_back(__xmin + __k * __delta); _M_den.push_back(__fw(_M_int[__k] + __delta)); } _M_initialize(); } template template typename piecewise_linear_distribution<_RealType>::result_type piecewise_linear_distribution<_RealType>:: operator()(_UniformRandomNumberGenerator& __urng, const param_type& __param) { __detail::_Adaptor<_UniformRandomNumberGenerator, double> __aurng(__urng); const double __p = __aurng(); if (__param._M_cp.empty()) return __p; auto __pos = std::lower_bound(__param._M_cp.begin(), __param._M_cp.end(), __p); const size_t __i = __pos - __param._M_cp.begin(); const double __pref = __i > 0 ? __param._M_cp[__i - 1] : 0.0; const double __a = 0.5 * __param._M_m[__i]; const double __b = __param._M_den[__i]; const double __cm = __p - __pref; _RealType __x = __param._M_int[__i]; if (__a == 0) __x += __cm / __b; else { const double __d = __b * __b + 4.0 * __a * __cm; __x += 0.5 * (std::sqrt(__d) - __b) / __a; } return __x; } template std::basic_ostream<_CharT, _Traits>& operator<<(std::basic_ostream<_CharT, _Traits>& __os, const piecewise_linear_distribution<_RealType>& __x) { typedef std::basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __os.flags(); const _CharT __fill = __os.fill(); const std::streamsize __precision = __os.precision(); const _CharT __space = __os.widen(' '); __os.flags(__ios_base::scientific | __ios_base::left); __os.fill(__space); __os.precision(std::numeric_limits<_RealType>::max_digits10); std::vector<_RealType> __int = __x.intervals(); __os << __int.size() - 1; for (auto __xit = __int.begin(); __xit != __int.end(); ++__xit) __os << __space << *__xit; std::vector __den = __x.densities(); for (auto __dit = __den.begin(); __dit != __den.end(); ++__dit) __os << __space << *__dit; __os.flags(__flags); __os.fill(__fill); __os.precision(__precision); return __os; } template std::basic_istream<_CharT, _Traits>& operator>>(std::basic_istream<_CharT, _Traits>& __is, piecewise_linear_distribution<_RealType>& __x) { typedef std::basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::ios_base __ios_base; const typename __ios_base::fmtflags __flags = __is.flags(); __is.flags(__ios_base::dec | __ios_base::skipws); size_t __n; __is >> __n; std::vector<_RealType> __int_vec; __int_vec.reserve(__n + 1); for (size_t __i = 0; __i <= __n; ++__i) { _RealType __int; __is >> __int; __int_vec.push_back(__int); } std::vector __den_vec; __den_vec.reserve(__n + 1); for (size_t __i = 0; __i <= __n; ++__i) { double __den; __is >> __den; __den_vec.push_back(__den); } __x.param(typename piecewise_linear_distribution<_RealType>:: param_type(__int_vec.begin(), __int_vec.end(), __den_vec.begin())); __is.flags(__flags); return __is; } template seed_seq::seed_seq(std::initializer_list<_IntType> __il) { for (auto __iter = __il.begin(); __iter != __il.end(); ++__iter) _M_v.push_back(__detail::__mod::__value>(*__iter)); } template seed_seq::seed_seq(_InputIterator __begin, _InputIterator __end) { for (_InputIterator __iter = __begin; __iter != __end; ++__iter) _M_v.push_back(__detail::__mod::__value>(*__iter)); } template void seed_seq::generate(_RandomAccessIterator __begin, _RandomAccessIterator __end) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _Type; if (__begin == __end) return; std::fill(__begin, __end, _Type(0x8b8b8b8bu)); const size_t __n = __end - __begin; const size_t __s = _M_v.size(); const size_t __t = (__n >= 623) ? 11 : (__n >= 68) ? 7 : (__n >= 39) ? 5 : (__n >= 7) ? 3 : (__n - 1) / 2; const size_t __p = (__n - __t) / 2; const size_t __q = __p + __t; const size_t __m = std::max(__s + 1, __n); for (size_t __k = 0; __k < __m; ++__k) { _Type __arg = (__begin[__k % __n] ^ __begin[(__k + __p) % __n] ^ __begin[(__k - 1) % __n]); _Type __r1 = __arg ^ (__arg >> 27); __r1 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value, 1664525u, 0u>(__r1); _Type __r2 = __r1; if (__k == 0) __r2 += __s; else if (__k <= __s) __r2 += __k % __n + _M_v[__k - 1]; else __r2 += __k % __n; __r2 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value>(__r2); __begin[(__k + __p) % __n] += __r1; __begin[(__k + __q) % __n] += __r2; __begin[__k % __n] = __r2; } for (size_t __k = __m; __k < __m + __n; ++__k) { _Type __arg = (__begin[__k % __n] + __begin[(__k + __p) % __n] + __begin[(__k - 1) % __n]); _Type __r3 = __arg ^ (__arg >> 27); __r3 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value, 1566083941u, 0u>(__r3); _Type __r4 = __r3 - __k % __n; __r4 = __detail::__mod<_Type, __detail::_Shift<_Type, 32>::__value>(__r4); __begin[(__k + __p) % __n] ^= __r3; __begin[(__k + __q) % __n] ^= __r4; __begin[__k % __n] = __r4; } } template _RealType generate_canonical(_UniformRandomNumberGenerator& __urng) { const size_t __b = std::min(static_cast(std::numeric_limits<_RealType>::digits), __bits); const long double __r = static_cast(__urng.max()) - static_cast(__urng.min()) + 1.0L; const size_t __log2r = std::log(__r) / std::log(2.0L); size_t __k = std::max(1UL, (__b + __log2r - 1UL) / __log2r); _RealType __sum = _RealType(0); _RealType __tmp = _RealType(1); for (; __k != 0; --__k) { __sum += _RealType(__urng() - __urng.min()) * __tmp; __tmp *= __r; } return __sum / __tmp; } } # 52 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/random" 2 3 # 68 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 1 3 # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 # 48 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/typeinfo" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/typeinfo" 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/typeinfo" 3 #pragma GCC visibility push(default) extern "C++" { namespace __cxxabiv1 { class __class_type_info; } # 83 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/typeinfo" 3 namespace std { class type_info { public: virtual ~type_info(); const char* name() const { return __name[0] == '*' ? __name + 1 : __name; } # 118 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/typeinfo" 3 bool before(const type_info& __arg) const { return (__name[0] == '*' && __arg.__name[0] == '*') ? __name < __arg.__name : __builtin_strcmp (__name, __arg.__name) < 0; } bool operator==(const type_info& __arg) const { return ((__name == __arg.__name) || (__name[0] != '*' && __builtin_strcmp (__name, __arg.__name) == 0)); } # 139 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/typeinfo" 3 bool operator!=(const type_info& __arg) const { return !operator==(__arg); } size_t hash_code() const throw() { return _Hash_bytes(name(), __builtin_strlen(name()), static_cast(0xc70f6907UL)); } virtual bool __is_pointer_p() const; virtual bool __is_function_p() const; virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, unsigned __outer) const; virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; protected: const char *__name; explicit type_info(const char *__n): __name(__n) { } private: type_info& operator=(const type_info&); type_info(const type_info&); }; class bad_cast : public exception { public: bad_cast() throw() { } virtual ~bad_cast() throw(); virtual const char* what() const throw(); }; class bad_typeid : public exception { public: bad_typeid () throw() { } virtual ~bad_typeid() throw(); virtual const char* what() const throw(); }; } #pragma GCC visibility pop } # 55 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/tuple" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/tuple" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/tuple" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/uses_allocator.h" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/uses_allocator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct allocator_arg_t { }; constexpr allocator_arg_t allocator_arg = allocator_arg_t(); template class __has_allocator_type_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_allocator_type : integral_constant::type>::value> { }; template::value> struct __uses_allocator_helper : public false_type { }; template struct __uses_allocator_helper<_Tp, _Alloc, true> : public integral_constant::value> { }; template struct uses_allocator : public integral_constant::value> { }; template struct __uses_allocator_arg : is_constructible<_Tp, _Alloc, _Args...> { static_assert( uses_allocator<_Tp, _Alloc>::value, "uses allocator" ); }; struct __uses_alloc_base { }; struct __uses_alloc0 : __uses_alloc_base { struct _Anything { _Anything(...) { } } _M_a; }; template struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; }; template struct __uses_alloc2 : __uses_alloc_base { const _Alloc* _M_a; }; template struct __uses_alloc; template struct __uses_alloc : conditional< is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value, __uses_alloc1<_Alloc>, __uses_alloc2<_Alloc>>::type { }; template struct __uses_alloc : __uses_alloc0 { }; template struct __uses_alloc_impl : __uses_alloc::value, _Tp, _Alloc, _Args...> { }; template __uses_alloc_impl<_Tp, _Alloc, _Args...> __use_alloc(const _Alloc& __a) { __uses_alloc_impl<_Tp, _Alloc, _Args...> __ret; __ret._M_a = &__a; return __ret; } } # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/tuple" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __add_c_ref { typedef const _Tp& type; }; template struct __add_c_ref<_Tp&> { typedef _Tp& type; }; template struct __add_ref { typedef _Tp& type; }; template struct __add_ref<_Tp&> { typedef _Tp& type; }; template struct __add_r_ref { typedef _Tp&& type; }; template struct __add_r_ref<_Tp&> { typedef _Tp& type; }; template struct __conv_types { }; template struct __one_by_one_convertible : public false_type { }; template struct __one_by_one_convertible<__conv_types<_Tp>, __conv_types<_Up>> : public is_convertible<_Tp, _Up>::type { }; template struct __one_by_one_convertible<__conv_types<_T1, _TR...>, __conv_types<_U1, _UR...>> : public __and_, __one_by_one_convertible<__conv_types<_TR...>, __conv_types<_UR...>>>::type { }; template struct __all_convertible; template struct __all_convertible<__conv_types<_TTypes...>, __conv_types<_UTypes...>> : public __one_by_one_convertible<__conv_types<_TTypes...>, __conv_types<_UTypes...>>::type { }; template struct _Head_base; template struct _Head_base<_Idx, _Head, true> : public _Head { constexpr _Head_base() : _Head() { } constexpr _Head_base(const _Head& __h) : _Head(__h) { } template::value>::type> constexpr _Head_base(_UHead&& __h) : _Head(std::forward<_UHead>(__h)) { } _Head_base(__uses_alloc0) : _Head() { } template _Head_base(__uses_alloc1<_Alloc> __a) : _Head(allocator_arg, *__a._M_a) { } template _Head_base(__uses_alloc2<_Alloc> __a) : _Head(*__a._M_a) { } template _Head_base(__uses_alloc0, _UHead&& __uhead) : _Head(std::forward<_UHead>(__uhead)) { } template _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) : _Head(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } template _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) : _Head(std::forward<_UHead>(__uhead), *__a._M_a) { } static constexpr _Head& _M_head(_Head_base& __b) noexcept { return __b; } static constexpr const _Head& _M_head(const _Head_base& __b) noexcept { return __b; } }; template struct _Head_base<_Idx, _Head, false> { constexpr _Head_base() : _M_head_impl() { } constexpr _Head_base(const _Head& __h) : _M_head_impl(__h) { } template::value>::type> constexpr _Head_base(_UHead&& __h) : _M_head_impl(std::forward<_UHead>(__h)) { } _Head_base(__uses_alloc0) : _M_head_impl() { } template _Head_base(__uses_alloc1<_Alloc> __a) : _M_head_impl(allocator_arg, *__a._M_a) { } template _Head_base(__uses_alloc2<_Alloc> __a) : _M_head_impl(*__a._M_a) { } template _Head_base(__uses_alloc0, _UHead&& __uhead) : _M_head_impl(std::forward<_UHead>(__uhead)) { } template _Head_base(__uses_alloc1<_Alloc> __a, _UHead&& __uhead) : _M_head_impl(allocator_arg, *__a._M_a, std::forward<_UHead>(__uhead)) { } template _Head_base(__uses_alloc2<_Alloc> __a, _UHead&& __uhead) : _M_head_impl(std::forward<_UHead>(__uhead), *__a._M_a) { } static constexpr _Head& _M_head(_Head_base& __b) noexcept { return __b._M_head_impl; } static constexpr const _Head& _M_head(const _Head_base& __b) noexcept { return __b._M_head_impl; } _Head _M_head_impl; }; # 206 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/tuple" 3 template struct _Tuple_impl; template struct _Tuple_impl<_Idx> { template friend class _Tuple_impl; _Tuple_impl() = default; template _Tuple_impl(allocator_arg_t, const _Alloc&) { } template _Tuple_impl(allocator_arg_t, const _Alloc&, const _Tuple_impl&) { } template _Tuple_impl(allocator_arg_t, const _Alloc&, _Tuple_impl&&) { } protected: void _M_swap(_Tuple_impl&) noexcept { } }; template struct _Tuple_impl<_Idx, _Head, _Tail...> : public _Tuple_impl<_Idx + 1, _Tail...>, private _Head_base<_Idx, _Head, std::is_empty<_Head>::value> { template friend class _Tuple_impl; typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; typedef _Head_base<_Idx, _Head, std::is_empty<_Head>::value> _Base; static constexpr _Head& _M_head(_Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } static constexpr _Inherited& _M_tail(_Tuple_impl& __t) noexcept { return __t; } static constexpr const _Inherited& _M_tail(const _Tuple_impl& __t) noexcept { return __t; } constexpr _Tuple_impl() : _Inherited(), _Base() { } explicit constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) : _Inherited(__tail...), _Base(__head) { } template::type> explicit constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) : _Inherited(std::forward<_UTail>(__tail)...), _Base(std::forward<_UHead>(__head)) { } constexpr _Tuple_impl(const _Tuple_impl&) = default; constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(__and_, is_nothrow_move_constructible<_Inherited>>::value) : _Inherited(std::move(_M_tail(__in))), _Base(std::forward<_Head>(_M_head(__in))) { } template constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } template constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a), _Base(__use_alloc<_Head>(__a)) { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head, const _Tail&... __tail) : _Inherited(__tag, __a, __tail...), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } template::type> _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _UHead&& __head, _UTail&&... __tail) : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead>(__head)) { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl& __in) : _Inherited(__tag, __a, _M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl&& __in) : _Inherited(__tag, __a, std::move(_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), std::forward<_Head>(_M_head(__in))) { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Tuple_impl<_Idx, _UElements...>& __in) : _Inherited(__tag, __a, _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(__tag, __a, std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } _Tuple_impl& operator=(const _Tuple_impl& __in) { _M_head(*this) = _M_head(__in); _M_tail(*this) = _M_tail(__in); return *this; } _Tuple_impl& operator=(_Tuple_impl&& __in) noexcept(__and_, is_nothrow_move_assignable<_Inherited>>::value) { _M_head(*this) = std::forward<_Head>(_M_head(__in)); _M_tail(*this) = std::move(_M_tail(__in)); return *this; } template _Tuple_impl& operator=(const _Tuple_impl<_Idx, _UElements...>& __in) { _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); _M_tail(*this) = _Tuple_impl<_Idx, _UElements...>::_M_tail(__in); return *this; } template _Tuple_impl& operator=(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) { _M_head(*this) = std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); _M_tail(*this) = std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)); return *this; } protected: void _M_swap(_Tuple_impl& __in) noexcept(noexcept(swap(std::declval<_Head&>(), std::declval<_Head&>())) && noexcept(_M_tail(__in)._M_swap(_M_tail(__in)))) { using std::swap; swap(_M_head(*this), _M_head(__in)); _Inherited::_M_swap(_M_tail(__in)); } }; template class tuple : public _Tuple_impl<0, _Elements...> { typedef _Tuple_impl<0, _Elements...> _Inherited; public: constexpr tuple() : _Inherited() { } explicit constexpr tuple(const _Elements&... __elements) : _Inherited(__elements...) { } template, __all_convertible<__conv_types<_UElements...>, __conv_types<_Elements...>> >::value>::type> explicit constexpr tuple(_UElements&&... __elements) : _Inherited(std::forward<_UElements>(__elements)...) { } constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; template, __all_convertible<__conv_types, __conv_types<_Elements...>> >::value>::type> constexpr tuple(const tuple<_UElements...>& __in) : _Inherited(static_cast&>(__in)) { } template, __all_convertible<__conv_types<_UElements...>, __conv_types<_Elements...>> >::value>::type> constexpr tuple(tuple<_UElements...>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, const _Elements&... __elements) : _Inherited(__tag, __a, __elements...) { } template::type> tuple(allocator_arg_t __tag, const _Alloc& __a, _UElements&&... __elements) : _Inherited(__tag, __a, std::forward<_UElements>(__elements)...) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast(__in)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } template::type> tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_UElements...>& __in) : _Inherited(__tag, __a, static_cast&>(__in)) { } template::type> tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_UElements...>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _UElements...>&&>(__in)) { } tuple& operator=(const tuple& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } tuple& operator=(tuple&& __in) noexcept(is_nothrow_move_assignable<_Inherited>::value) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } template::type> tuple& operator=(const tuple<_UElements...>& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } template::type> tuple& operator=(tuple<_UElements...>&& __in) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } void swap(tuple& __in) noexcept(noexcept(__in._M_swap(__in))) { _Inherited::_M_swap(__in); } }; template<> class tuple<> { public: void swap(tuple&) noexcept { } }; template class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> { typedef _Tuple_impl<0, _T1, _T2> _Inherited; public: constexpr tuple() : _Inherited() { } explicit constexpr tuple(const _T1& __a1, const _T2& __a2) : _Inherited(__a1, __a2) { } template, is_convertible<_U2, _T2>>::value>::type> explicit constexpr tuple(_U1&& __a1, _U2&& __a2) : _Inherited(std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } constexpr tuple(const tuple&) = default; constexpr tuple(tuple&&) = default; template, is_convertible>::value>::type> constexpr tuple(const tuple<_U1, _U2>& __in) : _Inherited(static_cast&>(__in)) { } template, is_convertible<_U2, _T2>>::value>::type> constexpr tuple(tuple<_U1, _U2>&& __in) : _Inherited(static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template, is_convertible>::value>::type> constexpr tuple(const pair<_U1, _U2>& __in) : _Inherited(__in.first, __in.second) { } template, is_convertible<_U2, _T2>>::value>::type> constexpr tuple(pair<_U1, _U2>&& __in) : _Inherited(std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, const _T1& __a1, const _T2& __a2) : _Inherited(__tag, __a, __a1, __a2) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, _U1&& __a1, _U2&& __a2) : _Inherited(__tag, __a, std::forward<_U1>(__a1), std::forward<_U2>(__a2)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple& __in) : _Inherited(__tag, __a, static_cast(__in)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, tuple&& __in) : _Inherited(__tag, __a, static_cast<_Inherited&&>(__in)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, const tuple<_U1, _U2>& __in) : _Inherited(__tag, __a, static_cast&>(__in)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, tuple<_U1, _U2>&& __in) : _Inherited(__tag, __a, static_cast<_Tuple_impl<0, _U1, _U2>&&>(__in)) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, const pair<_U1, _U2>& __in) : _Inherited(__tag, __a, __in.first, __in.second) { } template tuple(allocator_arg_t __tag, const _Alloc& __a, pair<_U1, _U2>&& __in) : _Inherited(__tag, __a, std::forward<_U1>(__in.first), std::forward<_U2>(__in.second)) { } tuple& operator=(const tuple& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } tuple& operator=(tuple&& __in) noexcept(is_nothrow_move_assignable<_Inherited>::value) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } template tuple& operator=(const tuple<_U1, _U2>& __in) { static_cast<_Inherited&>(*this) = __in; return *this; } template tuple& operator=(tuple<_U1, _U2>&& __in) { static_cast<_Inherited&>(*this) = std::move(__in); return *this; } template tuple& operator=(const pair<_U1, _U2>& __in) { this->_M_head(*this) = __in.first; this->_M_tail(*this)._M_head(*this) = __in.second; return *this; } template tuple& operator=(pair<_U1, _U2>&& __in) { this->_M_head(*this) = std::forward<_U1>(__in.first); this->_M_tail(*this)._M_head(*this) = std::forward<_U2>(__in.second); return *this; } void swap(tuple& __in) noexcept(noexcept(__in._M_swap(__in))) { _Inherited::_M_swap(__in); } }; template struct tuple_element; template struct tuple_element<__i, tuple<_Head, _Tail...> > : tuple_element<__i - 1, tuple<_Tail...> > { }; template struct tuple_element<0, tuple<_Head, _Tail...> > { typedef _Head type; }; template struct tuple_element<__i, const _Tp> { typedef typename add_const::type>::type type; }; template struct tuple_element<__i, volatile _Tp> { typedef typename add_volatile::type>::type type; }; template struct tuple_element<__i, const volatile _Tp> { typedef typename add_cv::type>::type type; }; template struct tuple_size; template struct tuple_size : public integral_constant< typename remove_cv::value)>::type, tuple_size<_Tp>::value> { }; template struct tuple_size : public integral_constant< typename remove_cv::value)>::type, tuple_size<_Tp>::value> { }; template struct tuple_size : public integral_constant< typename remove_cv::value)>::type, tuple_size<_Tp>::value> { }; template struct tuple_size> : public integral_constant { }; template constexpr typename __add_ref<_Head>::type __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template constexpr typename __add_c_ref<_Head>::type __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } template constexpr typename __add_ref< typename tuple_element<__i, tuple<_Elements...>>::type >::type get(tuple<_Elements...>& __t) noexcept { return __get_helper<__i>(__t); } template constexpr typename __add_c_ref< typename tuple_element<__i, tuple<_Elements...>>::type >::type get(const tuple<_Elements...>& __t) noexcept { return __get_helper<__i>(__t); } template constexpr typename __add_r_ref< typename tuple_element<__i, tuple<_Elements...>>::type >::type get(tuple<_Elements...>&& __t) noexcept { return std::forward>::type&&>(get<__i>(__t)); } template struct __tuple_compare; template struct __tuple_compare<0, __i, __j, _Tp, _Up> { static bool __eq(const _Tp& __t, const _Up& __u) { return (get<__i>(__t) == get<__i>(__u) && __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__eq(__t, __u)); } static bool __less(const _Tp& __t, const _Up& __u) { return ((get<__i>(__t) < get<__i>(__u)) || !(get<__i>(__u) < get<__i>(__t)) && __tuple_compare<0, __i + 1, __j, _Tp, _Up>::__less(__t, __u)); } }; template struct __tuple_compare<0, __i, __i, _Tp, _Up> { static bool __eq(const _Tp&, const _Up&) { return true; } static bool __less(const _Tp&, const _Up&) { return false; } }; template bool operator==(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { typedef tuple<_TElements...> _Tp; typedef tuple<_UElements...> _Up; return (__tuple_compare::value - tuple_size<_Up>::value, 0, tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u)); } template bool operator<(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { typedef tuple<_TElements...> _Tp; typedef tuple<_UElements...> _Up; return (__tuple_compare::value - tuple_size<_Up>::value, 0, tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u)); } template inline bool operator!=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__t == __u); } template inline bool operator>(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return __u < __t; } template inline bool operator<=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__u < __t); } template inline bool operator>=(const tuple<_TElements...>& __t, const tuple<_UElements...>& __u) { return !(__t < __u); } template constexpr tuple::__type...> make_tuple(_Elements&&... __args) { typedef tuple::__type...> __result_type; return __result_type(std::forward<_Elements>(__args)...); } template constexpr tuple<_Elements&&...> forward_as_tuple(_Elements&&... __args) noexcept { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } template struct array; template constexpr _Tp& get(array<_Tp, _Nm>&) noexcept; template constexpr _Tp&& get(array<_Tp, _Nm>&&) noexcept; template constexpr const _Tp& get(const array<_Tp, _Nm>&) noexcept; template struct __is_tuple_like_impl : false_type { }; template struct __is_tuple_like_impl> : true_type { }; template struct __is_tuple_like_impl> : true_type { }; template struct __is_tuple_like_impl> : true_type { }; template struct __is_tuple_like : public __is_tuple_like_impl::type>::type>::type { }; template struct _Index_tuple { typedef _Index_tuple<_Indexes..., sizeof...(_Indexes)> __next; }; template struct _Build_index_tuple { typedef typename _Build_index_tuple<_Num - 1>::__type::__next __type; }; template<> struct _Build_index_tuple<0> { typedef _Index_tuple<> __type; }; template struct __make_tuple_impl; template struct __make_tuple_impl<_Idx, tuple<_Tp...>, _Tuple, _Nm> { typedef typename __make_tuple_impl<_Idx + 1, tuple<_Tp..., typename std::tuple_element<_Idx, _Tuple>::type>, _Tuple, _Nm>::__type __type; }; template struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> { typedef tuple<_Tp...> __type; }; template struct __do_make_tuple : public __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> { }; template struct __make_tuple : public __do_make_tuple::type>::type> { }; template struct __combine_tuples; template<> struct __combine_tuples<> { typedef tuple<> __type; }; template struct __combine_tuples> { typedef tuple<_Ts...> __type; }; template struct __combine_tuples, tuple<_T2s...>, _Rem...> { typedef typename __combine_tuples, _Rem...>::__type __type; }; template struct __tuple_cat_result { typedef typename __combine_tuples ::__type...>::__type __type; }; template struct __make_1st_indices; template<> struct __make_1st_indices<> { typedef std::_Index_tuple<> __type; }; template struct __make_1st_indices<_Tp, _Tpls...> { typedef typename std::_Build_index_tuple::type>::value>::__type __type; }; template struct __tuple_concater; template struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> { template static constexpr _Ret _S_do(_Tp&& __tp, _Tpls&&... __tps, _Us&&... __us) { typedef typename __make_1st_indices<_Tpls...>::__type __idx; typedef __tuple_concater<_Ret, __idx, _Tpls...> __next; return __next::_S_do(std::forward<_Tpls>(__tps)..., std::forward<_Us>(__us)..., std::get<_Is>(std::forward<_Tp>(__tp))...); } }; template struct __tuple_concater<_Ret, std::_Index_tuple<>> { template static constexpr _Ret _S_do(_Us&&... __us) { return _Ret(std::forward<_Us>(__us)...); } }; template...>::value>::type> constexpr auto tuple_cat(_Tpls&&... __tpls) -> typename __tuple_cat_result<_Tpls...>::__type { typedef typename __tuple_cat_result<_Tpls...>::__type __ret; typedef typename __make_1st_indices<_Tpls...>::__type __idx; typedef __tuple_concater<__ret, __idx, _Tpls...> __concater; return __concater::_S_do(std::forward<_Tpls>(__tpls)...); } template inline tuple<_Elements&...> tie(_Elements&... __args) noexcept { return tuple<_Elements&...>(__args...); } template inline void swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } struct _Swallow_assign { template const _Swallow_assign& operator=(const _Tp&) const { return *this; } }; const _Swallow_assign ignore{}; template struct uses_allocator, _Alloc> : true_type { }; template template inline _Tp pair<_T1, _T2>::__cons(tuple<_Args...>&& __tuple) { typedef typename _Build_index_tuple::__type _Indexes; return __do_cons<_Tp>(std::move(__tuple), _Indexes()); } template template inline _Tp pair<_T1, _T2>::__do_cons(tuple<_Args...>&& __tuple, const _Index_tuple<_Indexes...>&) { return _Tp(std::forward<_Args>(get<_Indexes>(__tuple))...); } } # 57 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class _Mem_fn; template _Mem_fn<_Tp _Class::*> mem_fn(_Tp _Class::*); template class __has_result_type_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_result_type : integral_constant::type>::value> { }; template struct _Maybe_get_result_type { }; template struct _Maybe_get_result_type { typedef typename _Functor::result_type result_type; }; template struct _Weak_result_type_impl : _Maybe_get_result_type<__has_result_type<_Functor>::value, _Functor> { }; template struct _Weak_result_type_impl<_Res(_ArgTypes...)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(_ArgTypes......)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(_ArgTypes...) const> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(_ArgTypes......) const> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(_ArgTypes...) volatile> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(_ArgTypes......) volatile> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(_ArgTypes...) const volatile> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(_ArgTypes......) const volatile> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(&)(_ArgTypes...)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(&)(_ArgTypes......)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(*)(_ArgTypes...)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res(*)(_ArgTypes......)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) volatile> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) volatile> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const volatile> { typedef _Res result_type; }; template struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const volatile> { typedef _Res result_type; }; template struct _Weak_result_type : _Weak_result_type_impl::type> { }; template struct _Derives_from_unary_function : __sfinae_types { private: template static __one __test(const volatile unary_function<_T1, _Res>*); static __two __test(...); public: static const bool value = sizeof(__test((_Tp*)0)) == 1; }; template struct _Derives_from_binary_function : __sfinae_types { private: template static __one __test(const volatile binary_function<_T1, _T2, _Res>*); static __two __test(...); public: static const bool value = sizeof(__test((_Tp*)0)) == 1; }; template inline typename enable_if< (!is_member_pointer<_Functor>::value && !is_function<_Functor>::value && !is_function::type>::value), typename result_of<_Functor(_Args&&...)>::type >::type __invoke(_Functor& __f, _Args&&... __args) { return __f(std::forward<_Args>(__args)...); } template inline typename enable_if< (is_member_pointer<_Functor>::value && !is_function<_Functor>::value && !is_function::type>::value), typename result_of<_Functor(_Args&&...)>::type >::type __invoke(_Functor& __f, _Args&&... __args) { return mem_fn(__f)(std::forward<_Args>(__args)...); } template inline typename enable_if< (is_pointer<_Functor>::value && is_function::type>::value), typename result_of<_Functor(_Args&&...)>::type >::type __invoke(_Functor __f, _Args&&... __args) { return __f(std::forward<_Args>(__args)...); } template struct _Reference_wrapper_base_impl; template struct _Reference_wrapper_base_impl : _Weak_result_type<_Tp> { }; template struct _Reference_wrapper_base_impl : _Weak_result_type<_Tp> { typedef typename _Tp::argument_type argument_type; }; template struct _Reference_wrapper_base_impl : _Weak_result_type<_Tp> { typedef typename _Tp::first_argument_type first_argument_type; typedef typename _Tp::second_argument_type second_argument_type; }; template struct _Reference_wrapper_base_impl : _Weak_result_type<_Tp> { typedef typename _Tp::argument_type argument_type; typedef typename _Tp::first_argument_type first_argument_type; typedef typename _Tp::second_argument_type second_argument_type; }; template class __has_argument_type_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_argument_type : integral_constant::type>::value> { }; template class __has_first_argument_type_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_first_argument_type : integral_constant::type>::value> { }; template class __has_second_argument_type_helper : __sfinae_types { template struct _Wrap_type { }; template static __one __test(_Wrap_type*); template static __two __test(...); public: static constexpr bool value = sizeof(__test<_Tp>(0)) == 1; }; template struct __has_second_argument_type : integral_constant::type>::value> { }; template struct _Reference_wrapper_base : _Reference_wrapper_base_impl< __has_argument_type<_Tp>::value, __has_first_argument_type<_Tp>::value && __has_second_argument_type<_Tp>::value, _Tp> { }; template struct _Reference_wrapper_base<_Res(_T1)> : unary_function<_T1, _Res> { }; template struct _Reference_wrapper_base<_Res(_T1) const> : unary_function<_T1, _Res> { }; template struct _Reference_wrapper_base<_Res(_T1) volatile> : unary_function<_T1, _Res> { }; template struct _Reference_wrapper_base<_Res(_T1) const volatile> : unary_function<_T1, _Res> { }; template struct _Reference_wrapper_base<_Res(_T1, _T2)> : binary_function<_T1, _T2, _Res> { }; template struct _Reference_wrapper_base<_Res(_T1, _T2) const> : binary_function<_T1, _T2, _Res> { }; template struct _Reference_wrapper_base<_Res(_T1, _T2) volatile> : binary_function<_T1, _T2, _Res> { }; template struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile> : binary_function<_T1, _T2, _Res> { }; template struct _Reference_wrapper_base<_Res(*)(_T1)> : unary_function<_T1, _Res> { }; template struct _Reference_wrapper_base<_Res(*)(_T1, _T2)> : binary_function<_T1, _T2, _Res> { }; template struct _Reference_wrapper_base<_Res (_T1::*)()> : unary_function<_T1*, _Res> { }; template struct _Reference_wrapper_base<_Res (_T1::*)(_T2)> : binary_function<_T1*, _T2, _Res> { }; template struct _Reference_wrapper_base<_Res (_T1::*)() const> : unary_function { }; template struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const> : binary_function { }; template struct _Reference_wrapper_base<_Res (_T1::*)() volatile> : unary_function { }; template struct _Reference_wrapper_base<_Res (_T1::*)(_T2) volatile> : binary_function { }; template struct _Reference_wrapper_base<_Res (_T1::*)() const volatile> : unary_function { }; template struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const volatile> : binary_function { }; template class reference_wrapper : public _Reference_wrapper_base::type> { _Tp* _M_data; public: typedef _Tp type; reference_wrapper(_Tp& __indata) noexcept : _M_data(std::__addressof(__indata)) { } reference_wrapper(_Tp&&) = delete; reference_wrapper(const reference_wrapper<_Tp>& __inref) noexcept : _M_data(__inref._M_data) { } reference_wrapper& operator=(const reference_wrapper<_Tp>& __inref) noexcept { _M_data = __inref._M_data; return *this; } operator _Tp&() const noexcept { return this->get(); } _Tp& get() const noexcept { return *_M_data; } template typename result_of<_Tp&(_Args&&...)>::type operator()(_Args&&... __args) const { return __invoke(get(), std::forward<_Args>(__args)...); } }; template inline reference_wrapper<_Tp> ref(_Tp& __t) noexcept { return reference_wrapper<_Tp>(__t); } template inline reference_wrapper cref(const _Tp& __t) noexcept { return reference_wrapper(__t); } template void ref(const _Tp&&) = delete; template void cref(const _Tp&&) = delete; template inline reference_wrapper<_Tp> ref(reference_wrapper<_Tp> __t) noexcept { return ref(__t.get()); } template inline reference_wrapper cref(reference_wrapper<_Tp> __t) noexcept { return cref(__t.get()); } # 510 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template struct _Maybe_unary_or_binary_function { }; template struct _Maybe_unary_or_binary_function<_Res, _T1> : std::unary_function<_T1, _Res> { }; template struct _Maybe_unary_or_binary_function<_Res, _T1, _T2> : std::binary_function<_T1, _T2, _Res> { }; template class _Mem_fn<_Res (_Class::*)(_ArgTypes...)> : public _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...> { typedef _Res (_Class::*_Functor)(_ArgTypes...); template _Res _M_call(_Tp& __object, const volatile _Class *, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); } public: typedef _Res result_type; explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } _Res operator()(_Class& __object, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } _Res operator()(_Class* __object, _ArgTypes... __args) const { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res operator()(_Tp& __object, _ArgTypes... __args) const { return _M_call(__object, &__object, std::forward<_ArgTypes>(__args)...); } private: _Functor __pmf; }; template class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const> : public _Maybe_unary_or_binary_function<_Res, const _Class*, _ArgTypes...> { typedef _Res (_Class::*_Functor)(_ArgTypes...) const; template _Res _M_call(_Tp& __object, const volatile _Class *, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); } public: typedef _Res result_type; explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } _Res operator()(const _Class& __object, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } _Res operator()(const _Class* __object, _ArgTypes... __args) const { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res operator()(_Tp& __object, _ArgTypes... __args) const { return _M_call(__object, &__object, std::forward<_ArgTypes>(__args)...); } private: _Functor __pmf; }; template class _Mem_fn<_Res (_Class::*)(_ArgTypes...) volatile> : public _Maybe_unary_or_binary_function<_Res, volatile _Class*, _ArgTypes...> { typedef _Res (_Class::*_Functor)(_ArgTypes...) volatile; template _Res _M_call(_Tp& __object, const volatile _Class *, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); } public: typedef _Res result_type; explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } _Res operator()(volatile _Class& __object, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } _Res operator()(volatile _Class* __object, _ArgTypes... __args) const { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res operator()(_Tp& __object, _ArgTypes... __args) const { return _M_call(__object, &__object, std::forward<_ArgTypes>(__args)...); } private: _Functor __pmf; }; template class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const volatile> : public _Maybe_unary_or_binary_function<_Res, const volatile _Class*, _ArgTypes...> { typedef _Res (_Class::*_Functor)(_ArgTypes...) const volatile; template _Res _M_call(_Tp& __object, const volatile _Class *, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); } public: typedef _Res result_type; explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { } _Res operator()(const volatile _Class& __object, _ArgTypes... __args) const { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); } _Res operator()(const volatile _Class* __object, _ArgTypes... __args) const { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); } template _Res operator()(_Tp& __object, _ArgTypes... __args) const { return _M_call(__object, &__object, std::forward<_ArgTypes>(__args)...); } private: _Functor __pmf; }; template struct _Mem_fn_const_or_non { typedef const _Tp& type; }; template struct _Mem_fn_const_or_non<_Tp, false> { typedef _Tp& type; }; template class _Mem_fn<_Res _Class::*> { template _Res& _M_call(_Tp& __object, _Class *) const { return __object.*__pm; } template _Res& _M_call(_Tp& __object, _Up * const *) const { return (*__object).*__pm; } template const _Res& _M_call(_Tp& __object, const _Up * const *) const { return (*__object).*__pm; } template const _Res& _M_call(_Tp& __object, const _Class *) const { return __object.*__pm; } template const _Res& _M_call(_Tp& __ptr, const volatile void*) const { return (*__ptr).*__pm; } template static _Tp& __get_ref(); template static __sfinae_types::__one __check_const(_Tp&, _Class*); template static __sfinae_types::__one __check_const(_Tp&, _Up * const *); template static __sfinae_types::__two __check_const(_Tp&, const _Up * const *); template static __sfinae_types::__two __check_const(_Tp&, const _Class*); template static __sfinae_types::__two __check_const(_Tp&, const volatile void*); public: template struct _Result_type : _Mem_fn_const_or_non<_Res, (sizeof(__sfinae_types::__two) == sizeof(__check_const<_Tp>(__get_ref<_Tp>(), (_Tp*)0)))> { }; template struct result; template struct result<_CVMem(_Tp)> : public _Result_type<_Tp> { }; template struct result<_CVMem(_Tp&)> : public _Result_type<_Tp> { }; explicit _Mem_fn(_Res _Class::*__pm) : __pm(__pm) { } _Res& operator()(_Class& __object) const { return __object.*__pm; } const _Res& operator()(const _Class& __object) const { return __object.*__pm; } _Res& operator()(_Class* __object) const { return __object->*__pm; } const _Res& operator()(const _Class* __object) const { return __object->*__pm; } template typename _Result_type<_Tp>::type operator()(_Tp& __unknown) const { return _M_call(__unknown, &__unknown); } private: _Res _Class::*__pm; }; template inline _Mem_fn<_Tp _Class::*> mem_fn(_Tp _Class::* __pm) { return _Mem_fn<_Tp _Class::*>(__pm); } template struct is_bind_expression : public false_type { }; template struct is_placeholder : public integral_constant { }; template struct _Placeholder { }; # 859 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 namespace placeholders { extern const _Placeholder<1> _1; extern const _Placeholder<2> _2; extern const _Placeholder<3> _3; extern const _Placeholder<4> _4; extern const _Placeholder<5> _5; extern const _Placeholder<6> _6; extern const _Placeholder<7> _7; extern const _Placeholder<8> _8; extern const _Placeholder<9> _9; extern const _Placeholder<10> _10; extern const _Placeholder<11> _11; extern const _Placeholder<12> _12; extern const _Placeholder<13> _13; extern const _Placeholder<14> _14; extern const _Placeholder<15> _15; extern const _Placeholder<16> _16; extern const _Placeholder<17> _17; extern const _Placeholder<18> _18; extern const _Placeholder<19> _19; extern const _Placeholder<20> _20; extern const _Placeholder<21> _21; extern const _Placeholder<22> _22; extern const _Placeholder<23> _23; extern const _Placeholder<24> _24; extern const _Placeholder<25> _25; extern const _Placeholder<26> _26; extern const _Placeholder<27> _27; extern const _Placeholder<28> _28; extern const _Placeholder<29> _29; } template struct is_placeholder<_Placeholder<_Num> > : public integral_constant { }; struct _No_tuple_element; template struct _Safe_tuple_element_impl : tuple_element<__i, _Tuple> { }; template struct _Safe_tuple_element_impl<__i, _Tuple, false> { typedef _No_tuple_element type; }; template struct _Safe_tuple_element : _Safe_tuple_element_impl<__i, _Tuple, (__i < tuple_size<_Tuple>::value)> { }; # 953 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template::value, bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> class _Mu; template class _Mu, false, false> { public: typedef _Tp& result_type; template result_type operator()(_CVRef& __arg, _Tuple&) const volatile { return __arg.get(); } }; template class _Mu<_Arg, true, false> { public: template auto operator()(_CVArg& __arg, tuple<_Args...>& __tuple) const volatile -> decltype(__arg(declval<_Args>()...)) { typedef typename _Build_index_tuple::__type _Indexes; return this->__call(__arg, __tuple, _Indexes()); } private: template auto __call(_CVArg& __arg, tuple<_Args...>& __tuple, const _Index_tuple<_Indexes...>&) const volatile -> decltype(__arg(declval<_Args>()...)) { return __arg(std::forward<_Args>(get<_Indexes>(__tuple))...); } }; template class _Mu<_Arg, false, true> { public: template class result; template class result<_CVMu(_CVArg, _Tuple)> { typedef typename _Safe_tuple_element<(is_placeholder<_Arg>::value - 1), _Tuple>::type __base_type; public: typedef typename add_rvalue_reference<__base_type>::type type; }; template typename result<_Mu(_Arg, _Tuple)>::type operator()(const volatile _Arg&, _Tuple& __tuple) const volatile { return std::forward::type>( ::std::get<(is_placeholder<_Arg>::value - 1)>(__tuple)); } }; template class _Mu<_Arg, false, false> { public: template struct result; template struct result<_CVMu(_CVArg, _Tuple)> { typedef typename add_lvalue_reference<_CVArg>::type type; }; template _CVArg&& operator()(_CVArg&& __arg, _Tuple&) const volatile { return std::forward<_CVArg>(__arg); } }; template struct _Maybe_wrap_member_pointer { typedef _Tp type; static const _Tp& __do_wrap(const _Tp& __x) { return __x; } static _Tp&& __do_wrap(_Tp&& __x) { return static_cast<_Tp&&>(__x); } }; template struct _Maybe_wrap_member_pointer<_Tp _Class::*> { typedef _Mem_fn<_Tp _Class::*> type; static type __do_wrap(_Tp _Class::* __pm) { return type(__pm); } }; template<> struct _Maybe_wrap_member_pointer { typedef void type; }; template inline auto __volget(volatile tuple<_Tp...>& __tuple) -> typename tuple_element<_Ind, tuple<_Tp...>>::type volatile& { return std::get<_Ind>(const_cast&>(__tuple)); } template inline auto __volget(const volatile tuple<_Tp...>& __tuple) -> typename tuple_element<_Ind, tuple<_Tp...>>::type const volatile& { return std::get<_Ind>(const_cast&>(__tuple)); } template struct _Bind; template class _Bind<_Functor(_Bound_args...)> : public _Weak_result_type<_Functor> { typedef _Bind __self_type; typedef typename _Build_index_tuple::__type _Bound_indexes; _Functor _M_f; tuple<_Bound_args...> _M_bound_args; template _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) { return _M_f(_Mu<_Bound_args>() (get<_Indexes>(_M_bound_args), __args)...); } template _Result __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const { return _M_f(_Mu<_Bound_args>() (get<_Indexes>(_M_bound_args), __args)...); } template _Result __call_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile { return _M_f(_Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } template _Result __call_c_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const volatile { return _M_f(_Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } public: template explicit _Bind(const _Functor& __f, _Args&&... __args) : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) { } template explicit _Bind(_Functor&& __f, _Args&&... __args) : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) { } _Bind(const _Bind&) = default; _Bind(_Bind&& __b) : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) { } template()( _Mu<_Bound_args>()( std::declval<_Bound_args&>(), std::declval&>() )... ) )> _Result operator()(_Args&&... __args) { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template= 0), typename add_const<_Functor>::type>::type>()( _Mu<_Bound_args>()( std::declval(), std::declval&>() )... ) )> _Result operator()(_Args&&... __args) const { return this->__call_c<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template= 0), typename add_volatile<_Functor>::type>::type>()( _Mu<_Bound_args>()( std::declval(), std::declval&>() )... ) )> _Result operator()(_Args&&... __args) volatile { return this->__call_v<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template= 0), typename add_cv<_Functor>::type>::type>()( _Mu<_Bound_args>()( std::declval(), std::declval&>() )... ) )> _Result operator()(_Args&&... __args) const volatile { return this->__call_c_v<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } }; template struct _Bind_result; template class _Bind_result<_Result, _Functor(_Bound_args...)> { typedef _Bind_result __self_type; typedef typename _Build_index_tuple::__type _Bound_indexes; _Functor _M_f; tuple<_Bound_args...> _M_bound_args; template struct __enable_if_void : enable_if::value, int> { }; template struct __disable_if_void : enable_if::value, int> { }; template _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) { return _M_f(_Mu<_Bound_args>() (get<_Indexes>(_M_bound_args), __args)...); } template void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __enable_if_void<_Res>::type = 0) { _M_f(_Mu<_Bound_args>() (get<_Indexes>(_M_bound_args), __args)...); } template _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) const { return _M_f(_Mu<_Bound_args>() (get<_Indexes>(_M_bound_args), __args)...); } template void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __enable_if_void<_Res>::type = 0) const { _M_f(_Mu<_Bound_args>() (get<_Indexes>(_M_bound_args), __args)...); } template _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) volatile { return _M_f(_Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } template void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __enable_if_void<_Res>::type = 0) volatile { _M_f(_Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } template _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) const volatile { return _M_f(_Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } template void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __enable_if_void<_Res>::type = 0) const volatile { _M_f(_Mu<_Bound_args>() (__volget<_Indexes>(_M_bound_args), __args)...); } public: typedef _Result result_type; template explicit _Bind_result(const _Functor& __f, _Args&&... __args) : _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...) { } template explicit _Bind_result(_Functor&& __f, _Args&&... __args) : _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...) { } _Bind_result(const _Bind_result&) = default; _Bind_result(_Bind_result&& __b) : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args)) { } template result_type operator()(_Args&&... __args) { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template result_type operator()(_Args&&... __args) const { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template result_type operator()(_Args&&... __args) volatile { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } template result_type operator()(_Args&&... __args) const volatile { return this->__call<_Result>( std::forward_as_tuple(std::forward<_Args>(__args)...), _Bound_indexes()); } }; template struct is_bind_expression<_Bind<_Signature> > : public true_type { }; template struct is_bind_expression<_Bind_result<_Result, _Signature> > : public true_type { }; template class __is_socketlike { typedef typename decay<_Tp>::type _Tp2; public: static const bool value = is_integral<_Tp2>::value || is_enum<_Tp2>::value; }; template struct _Bind_helper { typedef _Maybe_wrap_member_pointer::type> __maybe_type; typedef typename __maybe_type::type __func_type; typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type; }; template struct _Bind_helper { }; template inline typename _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type bind(_Func&& __f, _BoundArgs&&... __args) { typedef _Bind_helper __helper_type; typedef typename __helper_type::__maybe_type __maybe_type; typedef typename __helper_type::type __result_type; return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)), std::forward<_BoundArgs>(__args)...); } template struct _Bindres_helper { typedef _Maybe_wrap_member_pointer::type> __maybe_type; typedef typename __maybe_type::type __functor_type; typedef _Bind_result<_Result, __functor_type(typename decay<_BoundArgs>::type...)> type; }; template inline typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type bind(_Func&& __f, _BoundArgs&&... __args) { typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type; typedef typename __helper_type::__maybe_type __maybe_type; typedef typename __helper_type::type __result_type; return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)), std::forward<_BoundArgs>(__args)...); } template struct _Bind_simple; template struct _Bind_simple<_Callable(_Args...)> { typedef typename result_of<_Callable(_Args...)>::type result_type; template::type> explicit _Bind_simple(const _Callable& __callable, _Args2&&... __args) : _M_bound(__callable, std::forward<_Args2>(__args)...) { } template::type> explicit _Bind_simple(_Callable&& __callable, _Args2&&... __args) : _M_bound(std::move(__callable), std::forward<_Args2>(__args)...) { } _Bind_simple(const _Bind_simple&) = default; _Bind_simple(_Bind_simple&&) = default; result_type operator()() { typedef typename _Build_index_tuple::__type _Indices; return _M_invoke(_Indices()); } private: template typename result_of<_Callable(_Args...)>::type _M_invoke(_Index_tuple<_Indices...>) { return std::forward<_Callable>(std::get<0>(_M_bound))( std::forward<_Args>(std::get<_Indices+1>(_M_bound))...); } std::tuple<_Callable, _Args...> _M_bound; }; template struct _Bind_simple_helper { typedef _Maybe_wrap_member_pointer::type> __maybe_type; typedef typename __maybe_type::type __func_type; typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)> __type; }; template typename _Bind_simple_helper<_Callable, _Args...>::__type __bind_simple(_Callable&& __callable, _Args&&... __args) { typedef _Bind_simple_helper<_Callable, _Args...> __helper_type; typedef typename __helper_type::__maybe_type __maybe_type; typedef typename __helper_type::__type __result_type; return __result_type( __maybe_type::__do_wrap( std::forward<_Callable>(__callable)), std::forward<_Args>(__args)...); } class bad_function_call : public std::exception { public: virtual ~bad_function_call() throw(); }; template struct __is_location_invariant : integral_constant::value || is_member_pointer<_Tp>::value)> { }; class _Undefined_class; union _Nocopy_types { void* _M_object; const void* _M_const_object; void (*_M_function_pointer)(); void (_Undefined_class::*_M_member_pointer)(); }; union _Any_data { void* _M_access() { return &_M_pod_data[0]; } const void* _M_access() const { return &_M_pod_data[0]; } template _Tp& _M_access() { return *static_cast<_Tp*>(_M_access()); } template const _Tp& _M_access() const { return *static_cast(_M_access()); } _Nocopy_types _M_unused; char _M_pod_data[sizeof(_Nocopy_types)]; }; enum _Manager_operation { __get_type_info, __get_functor_ptr, __clone_functor, __destroy_functor }; template struct _Simple_type_wrapper { _Simple_type_wrapper(_Tp __value) : __value(__value) { } _Tp __value; }; template struct __is_location_invariant<_Simple_type_wrapper<_Tp> > : __is_location_invariant<_Tp> { }; template inline _Functor& __callable_functor(_Functor& __f) { return __f; } template inline _Mem_fn<_Member _Class::*> __callable_functor(_Member _Class::* &__p) { return mem_fn(__p); } template inline _Mem_fn<_Member _Class::*> __callable_functor(_Member _Class::* const &__p) { return mem_fn(__p); } template class function; class _Function_base { public: static const std::size_t _M_max_size = sizeof(_Nocopy_types); static const std::size_t _M_max_align = __alignof__(_Nocopy_types); template class _Base_manager { protected: static const bool __stored_locally = (__is_location_invariant<_Functor>::value && sizeof(_Functor) <= _M_max_size && __alignof__(_Functor) <= _M_max_align && (_M_max_align % __alignof__(_Functor) == 0)); typedef integral_constant _Local_storage; static _Functor* _M_get_pointer(const _Any_data& __source) { const _Functor* __ptr = __stored_locally? std::__addressof(__source._M_access<_Functor>()) : __source._M_access<_Functor*>(); return const_cast<_Functor*>(__ptr); } static void _M_clone(_Any_data& __dest, const _Any_data& __source, true_type) { new (__dest._M_access()) _Functor(__source._M_access<_Functor>()); } static void _M_clone(_Any_data& __dest, const _Any_data& __source, false_type) { __dest._M_access<_Functor*>() = new _Functor(*__source._M_access<_Functor*>()); } static void _M_destroy(_Any_data& __victim, true_type) { __victim._M_access<_Functor>().~_Functor(); } static void _M_destroy(_Any_data& __victim, false_type) { delete __victim._M_access<_Functor*>(); } public: static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) { switch (__op) { case __get_type_info: __dest._M_access() = &typeid(_Functor); break; case __get_functor_ptr: __dest._M_access<_Functor*>() = _M_get_pointer(__source); break; case __clone_functor: _M_clone(__dest, __source, _Local_storage()); break; case __destroy_functor: _M_destroy(__dest, _Local_storage()); break; } return false; } static void _M_init_functor(_Any_data& __functor, _Functor&& __f) { _M_init_functor(__functor, std::move(__f), _Local_storage()); } template static bool _M_not_empty_function(const function<_Signature>& __f) { return static_cast(__f); } template static bool _M_not_empty_function(const _Tp*& __fp) { return __fp; } template static bool _M_not_empty_function(_Tp _Class::* const& __mp) { return __mp; } template static bool _M_not_empty_function(const _Tp&) { return true; } private: static void _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type) { new (__functor._M_access()) _Functor(std::move(__f)); } static void _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type) { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); } }; template class _Ref_manager : public _Base_manager<_Functor*> { typedef _Function_base::_Base_manager<_Functor*> _Base; public: static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) { switch (__op) { case __get_type_info: __dest._M_access() = &typeid(_Functor); break; case __get_functor_ptr: __dest._M_access<_Functor*>() = *_Base::_M_get_pointer(__source); return is_const<_Functor>::value; break; default: _Base::_M_manager(__dest, __source, __op); } return false; } static void _M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f) { _Base::_M_init_functor(__functor, &__f.get()); } }; _Function_base() : _M_manager(0) { } ~_Function_base() { if (_M_manager) _M_manager(_M_functor, _M_functor, __destroy_functor); } bool _M_empty() const { return !_M_manager; } typedef bool (*_Manager_type)(_Any_data&, const _Any_data&, _Manager_operation); _Any_data _M_functor; _Manager_type _M_manager; }; template class _Function_handler; template class _Function_handler<_Res(_ArgTypes...), _Functor> : public _Function_base::_Base_manager<_Functor> { typedef _Function_base::_Base_manager<_Functor> _Base; public: static _Res _M_invoke(const _Any_data& __functor, _ArgTypes... __args) { return (*_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; template class _Function_handler : public _Function_base::_Base_manager<_Functor> { typedef _Function_base::_Base_manager<_Functor> _Base; public: static void _M_invoke(const _Any_data& __functor, _ArgTypes... __args) { (*_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; template class _Function_handler<_Res(_ArgTypes...), reference_wrapper<_Functor> > : public _Function_base::_Ref_manager<_Functor> { typedef _Function_base::_Ref_manager<_Functor> _Base; public: static _Res _M_invoke(const _Any_data& __functor, _ArgTypes... __args) { return __callable_functor(**_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; template class _Function_handler > : public _Function_base::_Ref_manager<_Functor> { typedef _Function_base::_Ref_manager<_Functor> _Base; public: static void _M_invoke(const _Any_data& __functor, _ArgTypes... __args) { __callable_functor(**_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; template class _Function_handler<_Res(_ArgTypes...), _Member _Class::*> : public _Function_handler { typedef _Function_handler _Base; public: static _Res _M_invoke(const _Any_data& __functor, _ArgTypes... __args) { return mem_fn(_Base::_M_get_pointer(__functor)->__value)( std::forward<_ArgTypes>(__args)...); } }; template class _Function_handler : public _Function_base::_Base_manager< _Simple_type_wrapper< _Member _Class::* > > { typedef _Member _Class::* _Functor; typedef _Simple_type_wrapper<_Functor> _Wrapper; typedef _Function_base::_Base_manager<_Wrapper> _Base; public: static bool _M_manager(_Any_data& __dest, const _Any_data& __source, _Manager_operation __op) { switch (__op) { case __get_type_info: __dest._M_access() = &typeid(_Functor); break; case __get_functor_ptr: __dest._M_access<_Functor*>() = &_Base::_M_get_pointer(__source)->__value; break; default: _Base::_M_manager(__dest, __source, __op); } return false; } static void _M_invoke(const _Any_data& __functor, _ArgTypes... __args) { mem_fn(_Base::_M_get_pointer(__functor)->__value)( std::forward<_ArgTypes>(__args)...); } }; template class function<_Res(_ArgTypes...)> : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, private _Function_base { typedef _Res _Signature_type(_ArgTypes...); struct _Useless { }; public: typedef _Res result_type; function() noexcept : _Function_base() { } function(nullptr_t) noexcept : _Function_base() { } # 2005 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 function(const function& __x); # 2014 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 function(function&& __x) : _Function_base() { __x.swap(*this); } # 2037 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template function(_Functor __f, typename enable_if< !is_integral<_Functor>::value, _Useless>::type = _Useless()); # 2055 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 function& operator=(const function& __x) { function(__x).swap(*this); return *this; } # 2073 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 function& operator=(function&& __x) { function(std::move(__x)).swap(*this); return *this; } # 2087 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 function& operator=(nullptr_t) { if (_M_manager) { _M_manager(_M_functor, _M_functor, __destroy_functor); _M_manager = 0; _M_invoker = 0; } return *this; } # 2115 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template typename enable_if::value, function&>::type operator=(_Functor&& __f) { function(std::forward<_Functor>(__f)).swap(*this); return *this; } template typename enable_if::value, function&>::type operator=(reference_wrapper<_Functor> __f) noexcept { function(__f).swap(*this); return *this; } # 2141 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 void swap(function& __x) { std::swap(_M_functor, __x._M_functor); std::swap(_M_manager, __x._M_manager); std::swap(_M_invoker, __x._M_invoker); } # 2169 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 explicit operator bool() const noexcept { return !_M_empty(); } # 2182 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 _Res operator()(_ArgTypes... __args) const; # 2195 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 const type_info& target_type() const noexcept; # 2206 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template _Functor* target() noexcept; template const _Functor* target() const noexcept; private: typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...); _Invoker_type _M_invoker; }; template function<_Res(_ArgTypes...)>:: function(const function& __x) : _Function_base() { if (static_cast(__x)) { _M_invoker = __x._M_invoker; _M_manager = __x._M_manager; __x._M_manager(_M_functor, __x._M_functor, __clone_functor); } } template template function<_Res(_ArgTypes...)>:: function(_Functor __f, typename enable_if< !is_integral<_Functor>::value, _Useless>::type) : _Function_base() { typedef _Function_handler<_Signature_type, _Functor> _My_handler; if (_My_handler::_M_not_empty_function(__f)) { _M_invoker = &_My_handler::_M_invoke; _M_manager = &_My_handler::_M_manager; _My_handler::_M_init_functor(_M_functor, std::move(__f)); } } template _Res function<_Res(_ArgTypes...)>:: operator()(_ArgTypes... __args) const { if (_M_empty()) __throw_bad_function_call(); return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...); } template const type_info& function<_Res(_ArgTypes...)>:: target_type() const noexcept { if (_M_manager) { _Any_data __typeinfo_result; _M_manager(__typeinfo_result, _M_functor, __get_type_info); return *__typeinfo_result._M_access(); } else return typeid(void); } template template _Functor* function<_Res(_ArgTypes...)>:: target() noexcept { if (typeid(_Functor) == target_type() && _M_manager) { _Any_data __ptr; if (_M_manager(__ptr, _M_functor, __get_functor_ptr) && !is_const<_Functor>::value) return 0; else return __ptr._M_access<_Functor*>(); } else return 0; } template template const _Functor* function<_Res(_ArgTypes...)>:: target() const noexcept { if (typeid(_Functor) == target_type() && _M_manager) { _Any_data __ptr; _M_manager(__ptr, _M_functor, __get_functor_ptr); return __ptr._M_access(); } else return 0; } # 2320 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template inline bool operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept { return !static_cast(__f); } template inline bool operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept { return !static_cast(__f); } # 2338 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template inline bool operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept { return static_cast(__f); } template inline bool operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept { return static_cast(__f); } # 2356 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/functional" 3 template inline void swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) { __x.swap(__y); } } # 69 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c) { if (*__a < *__b) { if (*__b < *__c) std::iter_swap(__a, __b); else if (*__a < *__c) std::iter_swap(__a, __c); } else if (*__a < *__c) return; else if (*__b < *__c) std::iter_swap(__a, __c); else std::iter_swap(__a, __b); } template void __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c, _Compare __comp) { if (__comp(*__a, *__b)) { if (__comp(*__b, *__c)) std::iter_swap(__a, __b); else if (__comp(*__a, *__c)) std::iter_swap(__a, __c); } else if (__comp(*__a, *__c)) return; else if (__comp(*__b, *__c)) std::iter_swap(__a, __c); else std::iter_swap(__a, __b); } template inline _InputIterator __find(_InputIterator __first, _InputIterator __last, const _Tp& __val, input_iterator_tag) { while (__first != __last && !(*__first == __val)) ++__first; return __first; } template inline _InputIterator __find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) { while (__first != __last && !bool(__pred(*__first))) ++__first; return __first; } template _RandomAccessIterator __find(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __val, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIterator>::difference_type __trip_count = (__last - __first) >> 2; for (; __trip_count > 0; --__trip_count) { if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; } switch (__last - __first) { case 3: if (*__first == __val) return __first; ++__first; case 2: if (*__first == __val) return __first; ++__first; case 1: if (*__first == __val) return __first; ++__first; case 0: default: return __last; } } template _RandomAccessIterator __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, _Predicate __pred, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIterator>::difference_type __trip_count = (__last - __first) >> 2; for (; __trip_count > 0; --__trip_count) { if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; } switch (__last - __first) { case 3: if (__pred(*__first)) return __first; ++__first; case 2: if (__pred(*__first)) return __first; ++__first; case 1: if (__pred(*__first)) return __first; ++__first; case 0: default: return __last; } } template inline _InputIterator __find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred, input_iterator_tag) { while (__first != __last && bool(__pred(*__first))) ++__first; return __first; } template _RandomAccessIterator __find_if_not(_RandomAccessIterator __first, _RandomAccessIterator __last, _Predicate __pred, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIterator>::difference_type __trip_count = (__last - __first) >> 2; for (; __trip_count > 0; --__trip_count) { if (!bool(__pred(*__first))) return __first; ++__first; if (!bool(__pred(*__first))) return __first; ++__first; if (!bool(__pred(*__first))) return __first; ++__first; if (!bool(__pred(*__first))) return __first; ++__first; } switch (__last - __first) { case 3: if (!bool(__pred(*__first))) return __first; ++__first; case 2: if (!bool(__pred(*__first))) return __first; ++__first; case 1: if (!bool(__pred(*__first))) return __first; ++__first; case 0: default: return __last; } } # 326 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, std::forward_iterator_tag) { __first = std::find(__first, __last, __val); while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type __n = __count; _ForwardIterator __i = __first; ++__i; while (__i != __last && __n != 1 && *__i == __val) { ++__i; --__n; } if (__n == 1) return __first; if (__i == __last) return __last; __first = std::find(++__i, __last, __val); } return __last; } template _RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last, _Integer __count, const _Tp& __val, std::random_access_iterator_tag) { typedef typename std::iterator_traits<_RandomAccessIter>::difference_type _DistanceType; _DistanceType __tailSize = __last - __first; const _DistanceType __pattSize = __count; if (__tailSize < __pattSize) return __last; const _DistanceType __skipOffset = __pattSize - 1; _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize -= __pattSize; while (1) { while (!(*__lookAhead == __val)) { if (__tailSize < __pattSize) return __last; __lookAhead += __pattSize; __tailSize -= __pattSize; } _DistanceType __remainder = __skipOffset; for (_RandomAccessIter __backTrack = __lookAhead - 1; *__backTrack == __val; --__backTrack) { if (--__remainder == 0) return (__lookAhead - __skipOffset); } if (__remainder > __tailSize) return __last; __lookAhead += __remainder; __tailSize -= __remainder; } } # 411 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator __search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred, std::forward_iterator_tag) { while (__first != __last && !bool(__binary_pred(*__first, __val))) ++__first; while (__first != __last) { typename iterator_traits<_ForwardIterator>::difference_type __n = __count; _ForwardIterator __i = __first; ++__i; while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) { ++__i; --__n; } if (__n == 1) return __first; if (__i == __last) return __last; __first = ++__i; while (__first != __last && !bool(__binary_pred(*__first, __val))) ++__first; } return __last; } template _RandomAccessIter __search_n(_RandomAccessIter __first, _RandomAccessIter __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred, std::random_access_iterator_tag) { typedef typename std::iterator_traits<_RandomAccessIter>::difference_type _DistanceType; _DistanceType __tailSize = __last - __first; const _DistanceType __pattSize = __count; if (__tailSize < __pattSize) return __last; const _DistanceType __skipOffset = __pattSize - 1; _RandomAccessIter __lookAhead = __first + __skipOffset; __tailSize -= __pattSize; while (1) { while (!bool(__binary_pred(*__lookAhead, __val))) { if (__tailSize < __pattSize) return __last; __lookAhead += __pattSize; __tailSize -= __pattSize; } _DistanceType __remainder = __skipOffset; for (_RandomAccessIter __backTrack = __lookAhead - 1; __binary_pred(*__backTrack, __val); --__backTrack) { if (--__remainder == 0) return (__lookAhead - __skipOffset); } if (__remainder > __tailSize) return __last; __lookAhead += __remainder; __tailSize -= __remainder; } } template _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag) { if (__first2 == __last2) return __last1; else { _ForwardIterator1 __result = __last1; while (1) { _ForwardIterator1 __new_result = std::search(__first1, __last1, __first2, __last2); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } } template _ForwardIterator1 __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, forward_iterator_tag, forward_iterator_tag, _BinaryPredicate __comp) { if (__first2 == __last2) return __last1; else { _ForwardIterator1 __result = __last1; while (1) { _ForwardIterator1 __new_result = std::search(__first1, __last1, __first2, __last2, __comp); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } } template _BidirectionalIterator1 __find_end(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag) { typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; _RevIterator1 __rlast1(__first1); _RevIterator2 __rlast2(__first2); _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, _RevIterator2(__last2), __rlast2); if (__rresult == __rlast1) return __last1; else { _BidirectionalIterator1 __result = __rresult.base(); std::advance(__result, -std::distance(__first2, __last2)); return __result; } } template _BidirectionalIterator1 __find_end(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag, _BinaryPredicate __comp) { typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; _RevIterator1 __rlast1(__first1); _RevIterator2 __rlast2(__first2); _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, _RevIterator2(__last2), __rlast2, __comp); if (__rresult == __rlast1) return __last1; else { _BidirectionalIterator1 __result = __rresult.base(); std::advance(__result, -std::distance(__first2, __last2)); return __result; } } # 650 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; return std::__find_end(__first1, __last1, __first2, __last2, std::__iterator_category(__first1), std::__iterator_category(__first2)); } # 697 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __comp) { ; ; return std::__find_end(__first1, __last1, __first2, __last2, std::__iterator_category(__first1), std::__iterator_category(__first2), __comp); } # 732 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline bool all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) { return __last == std::find_if_not(__first, __last, __pred); } # 749 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline bool none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) { return __last == std::find_if(__first, __last, __pred); } # 767 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline bool any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) { return !std::none_of(__first, __last, __pred); } # 782 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _InputIterator find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; return std::__find_if_not(__first, __last, __pred, std::__iterator_category(__first)); } # 806 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline bool is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred) { __first = std::find_if_not(__first, __last, __pred); return std::none_of(__first, __last, __pred); } # 824 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _DistanceType __len = std::distance(__first, __last); _DistanceType __half; _ForwardIterator __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; std::advance(__middle, __half); if (__pred(*__middle)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } # 877 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value) { ; for (; __first != __last; ++__first) if (!(*__first == __value)) { *__result = *__first; ++__result; } return __result; } # 914 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) { ; for (; __first != __last; ++__first) if (!bool(__pred(*__first))) { *__result = *__first; ++__result; } return __result; } # 953 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) { ; for (; __first != __last; ++__first) if (__pred(*__first)) { *__result = *__first; ++__result; } return __result; } template _OutputIterator __copy_n(_InputIterator __first, _Size __n, _OutputIterator __result, input_iterator_tag) { if (__n > 0) { while (true) { *__result = *__first; ++__result; if (--__n > 0) ++__first; else break; } } return __result; } template inline _OutputIterator __copy_n(_RandomAccessIterator __first, _Size __n, _OutputIterator __result, random_access_iterator_tag) { return std::copy(__first, __first + __n, __result); } # 1017 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _OutputIterator copy_n(_InputIterator __first, _Size __n, _OutputIterator __result) { return std::__copy_n(__first, __n, __result, std::__iterator_category(__first)); } # 1045 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template pair<_OutputIterator1, _OutputIterator2> partition_copy(_InputIterator __first, _InputIterator __last, _OutputIterator1 __out_true, _OutputIterator2 __out_false, _Predicate __pred) { ; for (; __first != __last; ++__first) if (__pred(*__first)) { *__out_true = *__first; ++__out_true; } else { *__out_false = *__first; ++__out_false; } return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); } # 1095 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { ; __first = std::find(__first, __last, __value); if(__first == __last) return __first; _ForwardIterator __result = __first; ++__first; for(; __first != __last; ++__first) if(!(*__first == __value)) { *__result = std::move(*__first); ++__result; } return __result; } # 1138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; __first = std::find_if(__first, __last, __pred); if(__first == __last) return __first; _ForwardIterator __result = __first; ++__first; for(; __first != __last; ++__first) if(!bool(__pred(*__first))) { *__result = std::move(*__first); ++__result; } return __result; } # 1178 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last) { ; __first = std::adjacent_find(__first, __last); if (__first == __last) return __last; _ForwardIterator __dest = __first; ++__first; while (++__first != __last) if (!(*__dest == *__first)) *++__dest = std::move(*__first); return ++__dest; } # 1218 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { ; __first = std::adjacent_find(__first, __last, __binary_pred); if (__first == __last) return __last; _ForwardIterator __dest = __first; ++__first; while (++__first != __last) if (!bool(__binary_pred(*__dest, *__first))) *++__dest = std::move(*__first); return ++__dest; } template _OutputIterator __unique_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, forward_iterator_tag, output_iterator_tag) { _ForwardIterator __next = __first; *__result = *__first; while (++__next != __last) if (!(*__first == *__next)) { __first = __next; *++__result = *__first; } return ++__result; } template _OutputIterator __unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, input_iterator_tag, output_iterator_tag) { typename iterator_traits<_InputIterator>::value_type __value = *__first; *__result = __value; while (++__first != __last) if (!(__value == *__first)) { __value = *__first; *++__result = __value; } return ++__result; } template _ForwardIterator __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, input_iterator_tag, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!(*__result == *__first)) *++__result = *__first; return ++__result; } template _OutputIterator __unique_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred, forward_iterator_tag, output_iterator_tag) { _ForwardIterator __next = __first; *__result = *__first; while (++__next != __last) if (!bool(__binary_pred(*__first, *__next))) { __first = __next; *++__result = *__first; } return ++__result; } template _OutputIterator __unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred, input_iterator_tag, output_iterator_tag) { typename iterator_traits<_InputIterator>::value_type __value = *__first; *__result = __value; while (++__first != __last) if (!bool(__binary_pred(__value, *__first))) { __value = *__first; *++__result = __value; } return ++__result; } template _ForwardIterator __unique_copy(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _BinaryPredicate __binary_pred, input_iterator_tag, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!bool(__binary_pred(*__result, *__first))) *++__result = *__first; return ++__result; } template void __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag) { while (true) if (__first == __last || __first == --__last) return; else { std::iter_swap(__first, __last); ++__first; } } template void __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { if (__first == __last) return; --__last; while (__first < __last) { std::iter_swap(__first, __last); ++__first; --__last; } } # 1446 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; std::__reverse(__first, __last, std::__iterator_category(__first)); } # 1473 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) { ; while (__first != __last) { --__last; *__result = *__last; ++__result; } return __result; } template _EuclideanRingElement __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) { while (__n != 0) { _EuclideanRingElement __t = __m % __n; __m = __n; __n = __t; } return __m; } template void __rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, forward_iterator_tag) { if (__first == __middle || __last == __middle) return; _ForwardIterator __first2 = __middle; do { std::iter_swap(__first, __first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; } while (__first2 != __last); __first2 = __middle; while (__first2 != __last) { std::iter_swap(__first, __first2); ++__first; ++__first2; if (__first == __middle) __middle = __first2; else if (__first2 == __last) __first2 = __middle; } } template void __rotate(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, bidirectional_iterator_tag) { if (__first == __middle || __last == __middle) return; std::__reverse(__first, __middle, bidirectional_iterator_tag()); std::__reverse(__middle, __last, bidirectional_iterator_tag()); while (__first != __middle && __middle != __last) { std::iter_swap(__first, --__last); ++__first; } if (__first == __middle) std::__reverse(__middle, __last, bidirectional_iterator_tag()); else std::__reverse(__first, __middle, bidirectional_iterator_tag()); } template void __rotate(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, random_access_iterator_tag) { if (__first == __middle || __last == __middle) return; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; _Distance __n = __last - __first; _Distance __k = __middle - __first; if (__k == __n - __k) { std::swap_ranges(__first, __middle, __middle); return; } _RandomAccessIterator __p = __first; for (;;) { if (__k < __n - __k) { if (__is_pod(_ValueType) && __k == 1) { _ValueType __t = std::move(*__p); std::move(__p + 1, __p + __n, __p); *(__p + __n - 1) = std::move(__t); return; } _RandomAccessIterator __q = __p + __k; for (_Distance __i = 0; __i < __n - __k; ++ __i) { std::iter_swap(__p, __q); ++__p; ++__q; } __n %= __k; if (__n == 0) return; std::swap(__n, __k); __k = __n - __k; } else { __k = __n - __k; if (__is_pod(_ValueType) && __k == 1) { _ValueType __t = std::move(*(__p + __n - 1)); std::move_backward(__p, __p + __n - 1, __p + __n); *__p = std::move(__t); return; } _RandomAccessIterator __q = __p + __n; __p = __q - __k; for (_Distance __i = 0; __i < __n - __k; ++ __i) { --__p; --__q; std::iter_swap(__p, __q); } __n %= __k; if (__n == 0) return; std::swap(__n, __k); } } } # 1679 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last) { ; ; typedef typename iterator_traits<_ForwardIterator>::iterator_category _IterType; std::__rotate(__first, __middle, __last, _IterType()); } # 1715 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) { ; ; return std::copy(__first, __middle, std::copy(__middle, __last, __result)); } template _ForwardIterator __partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, forward_iterator_tag) { if (__first == __last) return __first; while (__pred(*__first)) if (++__first == __last) return __first; _ForwardIterator __next = __first; while (++__next != __last) if (__pred(*__next)) { std::iter_swap(__first, __next); ++__first; } return __first; } template _BidirectionalIterator __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, _Predicate __pred, bidirectional_iterator_tag) { while (true) { while (true) if (__first == __last) return __first; else if (__pred(*__first)) ++__first; else break; --__last; while (true) if (__first == __last) return __first; else if (!bool(__pred(*__last))) --__last; else break; std::iter_swap(__first, __last); ++__first; } } template _ForwardIterator __inplace_stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len) { if (__len == 1) return __pred(*__first) ? __last : __first; _ForwardIterator __middle = __first; std::advance(__middle, __len / 2); _ForwardIterator __begin = std::__inplace_stable_partition(__first, __middle, __pred, __len / 2); _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, __pred, __len - __len / 2); std::rotate(__begin, __middle, __end); std::advance(__begin, std::distance(__middle, __end)); return __begin; } template _ForwardIterator __stable_partition_adaptive(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, _Distance __len, _Pointer __buffer, _Distance __buffer_size) { if (__len <= __buffer_size) { _ForwardIterator __result1 = __first; _Pointer __result2 = __buffer; for (; __first != __last; ++__first) if (__pred(*__first)) { *__result1 = std::move(*__first); ++__result1; } else { *__result2 = std::move(*__first); ++__result2; } std::move(__buffer, __result2, __result1); return __result1; } else { _ForwardIterator __middle = __first; std::advance(__middle, __len / 2); _ForwardIterator __begin = std::__stable_partition_adaptive(__first, __middle, __pred, __len / 2, __buffer, __buffer_size); _ForwardIterator __end = std::__stable_partition_adaptive(__middle, __last, __pred, __len - __len / 2, __buffer, __buffer_size); std::rotate(__begin, __middle, __end); std::advance(__begin, std::distance(__middle, __end)); return __begin; } } # 1873 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; if (__first == __last) return __first; else { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, __last); if (__buf.size() > 0) return std::__stable_partition_adaptive(__first, __last, __pred, _DistanceType(__buf.requested_size()), __buf.begin(), _DistanceType(__buf.size())); else return std::__inplace_stable_partition(__first, __last, __pred, _DistanceType(__buf.requested_size())); } } template void __heap_select(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { std::make_heap(__first, __middle); for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) if (*__i < *__first) std::__pop_heap(__first, __middle, __i); } template void __heap_select(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { std::make_heap(__first, __middle, __comp); for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) if (__comp(*__i, *__first)) std::__pop_heap(__first, __middle, __i, __comp); } # 1955 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _RandomAccessIterator partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last) { typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; if (__result_first == __result_last) return __result_last; _RandomAccessIterator __result_real_last = __result_first; while(__first != __last && __result_real_last != __result_last) { *__result_real_last = *__first; ++__result_real_last; ++__first; } std::make_heap(__result_first, __result_real_last); while (__first != __last) { if (*__first < *__result_first) std::__adjust_heap(__result_first, _DistanceType(0), _DistanceType(__result_real_last - __result_first), _InputValueType(*__first)); ++__first; } std::sort_heap(__result_first, __result_real_last); return __result_real_last; } # 2021 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _RandomAccessIterator partial_sort_copy(_InputIterator __first, _InputIterator __last, _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp) { typedef typename iterator_traits<_InputIterator>::value_type _InputValueType; typedef typename iterator_traits<_RandomAccessIterator>::value_type _OutputValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; ; if (__result_first == __result_last) return __result_last; _RandomAccessIterator __result_real_last = __result_first; while(__first != __last && __result_real_last != __result_last) { *__result_real_last = *__first; ++__result_real_last; ++__first; } std::make_heap(__result_first, __result_real_last, __comp); while (__first != __last) { if (__comp(*__first, *__result_first)) std::__adjust_heap(__result_first, _DistanceType(0), _DistanceType(__result_real_last - __result_first), _InputValueType(*__first), __comp); ++__first; } std::sort_heap(__result_first, __result_real_last, __comp); return __result_real_last; } template void __unguarded_linear_insert(_RandomAccessIterator __last) { typename iterator_traits<_RandomAccessIterator>::value_type __val = std::move(*__last); _RandomAccessIterator __next = __last; --__next; while (__val < *__next) { *__last = std::move(*__next); __last = __next; --__next; } *__last = std::move(__val); } template void __unguarded_linear_insert(_RandomAccessIterator __last, _Compare __comp) { typename iterator_traits<_RandomAccessIterator>::value_type __val = std::move(*__last); _RandomAccessIterator __next = __last; --__next; while (__comp(__val, *__next)) { *__last = std::move(*__next); __last = __next; --__next; } *__last = std::move(__val); } template void __insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { if (*__i < *__first) { typename iterator_traits<_RandomAccessIterator>::value_type __val = std::move(*__i); std::move_backward(__first, __i, __i + 1); *__first = std::move(__val); } else std::__unguarded_linear_insert(__i); } } template void __insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) { if (__comp(*__i, *__first)) { typename iterator_traits<_RandomAccessIterator>::value_type __val = std::move(*__i); std::move_backward(__first, __i, __i + 1); *__first = std::move(__val); } else std::__unguarded_linear_insert(__i, __comp); } } template inline void __unguarded_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; for (_RandomAccessIterator __i = __first; __i != __last; ++__i) std::__unguarded_linear_insert(__i); } template inline void __unguarded_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; for (_RandomAccessIterator __i = __first; __i != __last; ++__i) std::__unguarded_linear_insert(__i, __comp); } enum { _S_threshold = 16 }; template void __final_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__last - __first > int(_S_threshold)) { std::__insertion_sort(__first, __first + int(_S_threshold)); std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); } else std::__insertion_sort(__first, __last); } template void __final_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__last - __first > int(_S_threshold)) { std::__insertion_sort(__first, __first + int(_S_threshold), __comp); std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, __comp); } else std::__insertion_sort(__first, __last, __comp); } template _RandomAccessIterator __unguarded_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __pivot) { while (true) { while (*__first < __pivot) ++__first; --__last; while (__pivot < *__last) --__last; if (!(__first < __last)) return __first; std::iter_swap(__first, __last); ++__first; } } template _RandomAccessIterator __unguarded_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __pivot, _Compare __comp) { while (true) { while (__comp(*__first, __pivot)) ++__first; --__last; while (__comp(__pivot, *__last)) --__last; if (!(__first < __last)) return __first; std::iter_swap(__first, __last); ++__first; } } template inline _RandomAccessIterator __unguarded_partition_pivot(_RandomAccessIterator __first, _RandomAccessIterator __last) { _RandomAccessIterator __mid = __first + (__last - __first) / 2; std::__move_median_first(__first, __mid, (__last - 1)); return std::__unguarded_partition(__first + 1, __last, *__first); } template inline _RandomAccessIterator __unguarded_partition_pivot(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { _RandomAccessIterator __mid = __first + (__last - __first) / 2; std::__move_median_first(__first, __mid, (__last - 1), __comp); return std::__unguarded_partition(__first + 1, __last, *__first, __comp); } template void __introsort_loop(_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit) { while (__last - __first > int(_S_threshold)) { if (__depth_limit == 0) { std::partial_sort(__first, __last, __last); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last); std::__introsort_loop(__cut, __last, __depth_limit); __last = __cut; } } template void __introsort_loop(_RandomAccessIterator __first, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) { while (__last - __first > int(_S_threshold)) { if (__depth_limit == 0) { std::partial_sort(__first, __last, __last, __comp); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last, __comp); std::__introsort_loop(__cut, __last, __depth_limit, __comp); __last = __cut; } } template void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; while (__last - __first > 3) { if (__depth_limit == 0) { std::__heap_select(__first, __nth + 1, __last); std::iter_swap(__first, __nth); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last); if (__cut <= __nth) __first = __cut; else __last = __cut; } std::__insertion_sort(__first, __last); } template void __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Size __depth_limit, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; while (__last - __first > 3) { if (__depth_limit == 0) { std::__heap_select(__first, __nth + 1, __last, __comp); std::iter_swap(__first, __nth); return; } --__depth_limit; _RandomAccessIterator __cut = std::__unguarded_partition_pivot(__first, __last, __comp); if (__cut <= __nth) __first = __cut; else __last = __cut; } std::__insertion_sort(__first, __last, __comp); } # 2405 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } # 2452 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__val < *__middle) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } # 2501 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__comp(__val, *__middle)) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } # 2554 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; ; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__val < *__middle) __len = __half; else { _ForwardIterator __left = std::lower_bound(__first, __middle, __val); std::advance(__first, __len); _ForwardIterator __right = std::upper_bound(++__middle, __first, __val); return pair<_ForwardIterator, _ForwardIterator>(__left, __right); } } return pair<_ForwardIterator, _ForwardIterator>(__first, __first); } # 2616 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; ; ; _DistanceType __len = std::distance(__first, __last); while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__comp(__val, *__middle)) __len = __half; else { _ForwardIterator __left = std::lower_bound(__first, __middle, __val, __comp); std::advance(__first, __len); _ForwardIterator __right = std::upper_bound(++__middle, __first, __val, __comp); return pair<_ForwardIterator, _ForwardIterator>(__left, __right); } } return pair<_ForwardIterator, _ForwardIterator>(__first, __first); } # 2677 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; ; ; _ForwardIterator __i = std::lower_bound(__first, __last, __val); return __i != __last && !(__val < *__i); } # 2710 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val, _Compare __comp) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; ; ; _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); return __i != __last && !bool(__comp(__val, *__i)); } template void __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { while (__first1 != __last1 && __first2 != __last2) { if (*__first2 < *__first1) { *__result = std::move(*__first2); ++__first2; } else { *__result = std::move(*__first1); ++__first1; } ++__result; } if (__first1 != __last1) std::move(__first1, __last1, __result); } template void __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first2, *__first1)) { *__result = std::move(*__first2); ++__first2; } else { *__result = std::move(*__first1); ++__first1; } ++__result; } if (__first1 != __last1) std::move(__first1, __last1, __result); } template void __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result) { if (__first1 == __last1) { std::move_backward(__first2, __last2, __result); return; } else if (__first2 == __last2) return; --__last1; --__last2; while (true) { if (*__last2 < *__last1) { *--__result = std::move(*__last1); if (__first1 == __last1) { std::move_backward(__first2, ++__last2, __result); return; } --__last1; } else { *--__result = std::move(*__last2); if (__first2 == __last2) return; --__last2; } } } template void __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, _BidirectionalIterator1 __last1, _BidirectionalIterator2 __first2, _BidirectionalIterator2 __last2, _BidirectionalIterator3 __result, _Compare __comp) { if (__first1 == __last1) { std::move_backward(__first2, __last2, __result); return; } else if (__first2 == __last2) return; --__last1; --__last2; while (true) { if (__comp(*__last2, *__last1)) { *--__result = std::move(*__last1); if (__first1 == __last1) { std::move_backward(__first2, ++__last2, __result); return; } --__last1; } else { *--__result = std::move(*__last2); if (__first2 == __last2) return; --__last2; } } } template _BidirectionalIterator1 __rotate_adaptive(_BidirectionalIterator1 __first, _BidirectionalIterator1 __middle, _BidirectionalIterator1 __last, _Distance __len1, _Distance __len2, _BidirectionalIterator2 __buffer, _Distance __buffer_size) { _BidirectionalIterator2 __buffer_end; if (__len1 > __len2 && __len2 <= __buffer_size) { if (__len2) { __buffer_end = std::move(__middle, __last, __buffer); std::move_backward(__first, __middle, __last); return std::move(__buffer, __buffer_end, __first); } else return __first; } else if (__len1 <= __buffer_size) { if (__len1) { __buffer_end = std::move(__first, __middle, __buffer); std::move(__middle, __last, __first); return std::move_backward(__buffer, __buffer_end, __last); } else return __last; } else { std::rotate(__first, __middle, __last); std::advance(__first, std::distance(__middle, __last)); return __first; } } template void __merge_adaptive(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = std::move(__first, __middle, __buffer); std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, __first); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = std::move(__middle, __last, __buffer); std::__move_merge_adaptive_backward(__first, __middle, __buffer, __buffer_end, __last); } else { _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut); __len11 = std::distance(__first, __first_cut); } _BidirectionalIterator __new_middle = std::__rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, __len22, __buffer, __buffer_size); std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, __len22, __buffer, __buffer_size); std::__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size); } } template void __merge_adaptive(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = std::move(__first, __middle, __buffer); std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, __first, __comp); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = std::move(__middle, __last, __buffer); std::__move_merge_adaptive_backward(__first, __middle, __buffer, __buffer_end, __last, __comp); } else { _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut, __comp); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut, __comp); __len11 = std::distance(__first, __first_cut); } _BidirectionalIterator __new_middle = std::__rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, __len22, __buffer, __buffer_size); std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, __len22, __buffer, __buffer_size, __comp); std::__merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size, __comp); } } template void __merge_without_buffer(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (*__middle < *__first) std::iter_swap(__first, __middle); return; } _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut); __len11 = std::distance(__first, __first_cut); } std::rotate(__first_cut, __middle, __second_cut); _BidirectionalIterator __new_middle = __first_cut; std::advance(__new_middle, std::distance(__middle, __second_cut)); std::__merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22); std::__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22); } template void __merge_without_buffer(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Distance __len1, _Distance __len2, _Compare __comp) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (__comp(*__middle, *__first)) std::iter_swap(__first, __middle); return; } _BidirectionalIterator __first_cut = __first; _BidirectionalIterator __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; std::advance(__first_cut, __len11); __second_cut = std::lower_bound(__middle, __last, *__first_cut, __comp); __len22 = std::distance(__middle, __second_cut); } else { __len22 = __len2 / 2; std::advance(__second_cut, __len22); __first_cut = std::upper_bound(__first, __middle, *__second_cut, __comp); __len11 = std::distance(__first, __first_cut); } std::rotate(__first_cut, __middle, __second_cut); _BidirectionalIterator __new_middle = __first_cut; std::advance(__new_middle, std::distance(__middle, __second_cut)); std::__merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22, __comp); std::__merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __comp); } # 3134 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last) { typedef typename iterator_traits<_BidirectionalIterator>::value_type _ValueType; typedef typename iterator_traits<_BidirectionalIterator>::difference_type _DistanceType; ; ; if (__first == __middle || __middle == __last) return; _DistanceType __len1 = std::distance(__first, __middle); _DistanceType __len2 = std::distance(__middle, __last); _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); else std::__merge_adaptive(__first, __middle, __last, __len1, __len2, __buf.begin(), _DistanceType(__buf.size())); } # 3189 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template void inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) { typedef typename iterator_traits<_BidirectionalIterator>::value_type _ValueType; typedef typename iterator_traits<_BidirectionalIterator>::difference_type _DistanceType; ; ; if (__first == __middle || __middle == __last) return; const _DistanceType __len1 = std::distance(__first, __middle); const _DistanceType __len2 = std::distance(__middle, __last); _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp); else std::__merge_adaptive(__first, __middle, __last, __len1, __len2, __buf.begin(), _DistanceType(__buf.size()), __comp); } template _OutputIterator __move_merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { while (__first1 != __last1 && __first2 != __last2) { if (*__first2 < *__first1) { *__result = std::move(*__first2); ++__first2; } else { *__result = std::move(*__first1); ++__first1; } ++__result; } return std::move(__first2, __last2, std::move(__first1, __last1, __result)) ; } template _OutputIterator __move_merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first2, *__first1)) { *__result = std::move(*__first2); ++__first2; } else { *__result = std::move(*__first1); ++__first1; } ++__result; } return std::move(__first2, __last2, std::move(__first1, __last1, __result)) ; } template void __merge_sort_loop(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result, _Distance __step_size) { const _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = std::__move_merge(__first, __first + __step_size, __first + __step_size, __first + __two_step, __result); __first += __two_step; } __step_size = std::min(_Distance(__last - __first), __step_size); std::__move_merge(__first, __first + __step_size, __first + __step_size, __last, __result); } template void __merge_sort_loop(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result, _Distance __step_size, _Compare __comp) { const _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = std::__move_merge(__first, __first + __step_size, __first + __step_size, __first + __two_step, __result, __comp); __first += __two_step; } __step_size = std::min(_Distance(__last - __first), __step_size); std::__move_merge(__first,__first + __step_size, __first + __step_size, __last, __result, __comp); } template void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size) { while (__last - __first >= __chunk_size) { std::__insertion_sort(__first, __first + __chunk_size); __first += __chunk_size; } std::__insertion_sort(__first, __last); } template void __chunk_insertion_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance __chunk_size, _Compare __comp) { while (__last - __first >= __chunk_size) { std::__insertion_sort(__first, __first + __chunk_size, __comp); __first += __chunk_size; } std::__insertion_sort(__first, __last, __comp); } enum { _S_chunk_size = 7 }; template void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; const _Distance __len = __last - __first; const _Pointer __buffer_last = __buffer + __len; _Distance __step_size = _S_chunk_size; std::__chunk_insertion_sort(__first, __last, __step_size); while (__step_size < __len) { std::__merge_sort_loop(__first, __last, __buffer, __step_size); __step_size *= 2; std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); __step_size *= 2; } } template void __merge_sort_with_buffer(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance; const _Distance __len = __last - __first; const _Pointer __buffer_last = __buffer + __len; _Distance __step_size = _S_chunk_size; std::__chunk_insertion_sort(__first, __last, __step_size, __comp); while (__step_size < __len) { std::__merge_sort_loop(__first, __last, __buffer, __step_size, __comp); __step_size *= 2; std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp); __step_size *= 2; } } template void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Distance __buffer_size) { const _Distance __len = (__last - __first + 1) / 2; const _RandomAccessIterator __middle = __first + __len; if (__len > __buffer_size) { std::__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size); std::__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size); } else { std::__merge_sort_with_buffer(__first, __middle, __buffer); std::__merge_sort_with_buffer(__middle, __last, __buffer); } std::__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size); } template void __stable_sort_adaptive(_RandomAccessIterator __first, _RandomAccessIterator __last, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { const _Distance __len = (__last - __first + 1) / 2; const _RandomAccessIterator __middle = __first + __len; if (__len > __buffer_size) { std::__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, __comp); std::__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, __comp); } else { std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); } std::__merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size, __comp); } template void __inplace_stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { if (__last - __first < 15) { std::__insertion_sort(__first, __last); return; } _RandomAccessIterator __middle = __first + (__last - __first) / 2; std::__inplace_stable_sort(__first, __middle); std::__inplace_stable_sort(__middle, __last); std::__merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle); } template void __inplace_stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { if (__last - __first < 15) { std::__insertion_sort(__first, __last, __comp); return; } _RandomAccessIterator __middle = __first + (__last - __first) / 2; std::__inplace_stable_sort(__first, __middle, __comp); std::__inplace_stable_sort(__middle, __last, __comp); std::__merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle, __comp); } # 3529 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first2 < *__first1) return false; else if(*__first1 < *__first2) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } # 3579 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first2, *__first1)) return false; else if(__comp(*__first1, *__first2)) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } # 3634 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (*__i < *__ii) { _BidirectionalIterator __j = __last; while (!(*__i < *--__j)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3691 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (__comp(*__i, *__ii)) { _BidirectionalIterator __j = __last; while (!bool(__comp(*__i, *--__j))) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3747 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (*__ii < *__i) { _BidirectionalIterator __j = __last; while (!(*--__j < *__i)) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3804 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) { ; if (__first == __last) return false; _BidirectionalIterator __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIterator __ii = __i; --__i; if (__comp(*__ii, *__i)) { _BidirectionalIterator __j = __last; while (!bool(__comp(*--__j, *__i))) {} std::iter_swap(__i, __j); std::reverse(__ii, __last); return true; } if (__i == __first) { std::reverse(__first, __last); return false; } } } # 3864 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __old_value, const _Tp& __new_value) { ; for (; __first != __last; ++__first, ++__result) if (*__first == __old_value) *__result = __new_value; else *__result = *__first; return __result; } # 3901 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) { ; for (; __first != __last; ++__first, ++__result) if (__pred(*__first)) *__result = __new_value; else *__result = *__first; return __result; } # 3932 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline bool is_sorted(_ForwardIterator __first, _ForwardIterator __last) { return std::is_sorted_until(__first, __last) == __last; } # 3946 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline bool is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { return std::is_sorted_until(__first, __last, __comp) == __last; } # 3960 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator is_sorted_until(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __last; _ForwardIterator __next = __first; for (++__next; __next != __last; __first = __next, ++__next) if (*__next < *__first) return __next; return __next; } # 3989 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; if (__first == __last) return __last; _ForwardIterator __next = __first; for (++__next; __next != __last; __first = __next, ++__next) if (__comp(*__next, *__first)) return __next; return __next; } # 4019 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline pair minmax(const _Tp& __a, const _Tp& __b) { return __b < __a ? pair(__b, __a) : pair(__a, __b); } # 4039 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline pair minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) { return __comp(__b, __a) ? pair(__b, __a) : pair(__a, __b); } # 4058 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) { ; _ForwardIterator __next = __first; if (__first == __last || ++__next == __last) return std::make_pair(__first, __first); _ForwardIterator __min, __max; if (*__next < *__first) { __min = __next; __max = __first; } else { __min = __first; __max = __next; } __first = __next; ++__first; while (__first != __last) { __next = __first; if (++__next == __last) { if (*__first < *__min) __min = __first; else if (!(*__first < *__max)) __max = __first; break; } if (*__next < *__first) { if (*__next < *__min) __min = __next; if (!(*__first < *__max)) __max = __first; } else { if (*__first < *__min) __min = __first; if (!(*__next < *__max)) __max = __next; } __first = __next; ++__first; } return std::make_pair(__min, __max); } # 4134 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; _ForwardIterator __next = __first; if (__first == __last || ++__next == __last) return std::make_pair(__first, __first); _ForwardIterator __min, __max; if (__comp(*__next, *__first)) { __min = __next; __max = __first; } else { __min = __first; __max = __next; } __first = __next; ++__first; while (__first != __last) { __next = __first; if (++__next == __last) { if (__comp(*__first, *__min)) __min = __first; else if (!__comp(*__first, *__max)) __max = __first; break; } if (__comp(*__next, *__first)) { if (__comp(*__next, *__min)) __min = __next; if (!__comp(*__first, *__max)) __max = __first; } else { if (__comp(*__first, *__min)) __min = __first; if (!__comp(*__next, *__max)) __max = __next; } __first = __next; ++__first; } return std::make_pair(__min, __max); } template inline _Tp min(initializer_list<_Tp> __l) { return *std::min_element(__l.begin(), __l.end()); } template inline _Tp min(initializer_list<_Tp> __l, _Compare __comp) { return *std::min_element(__l.begin(), __l.end(), __comp); } template inline _Tp max(initializer_list<_Tp> __l) { return *std::max_element(__l.begin(), __l.end()); } template inline _Tp max(initializer_list<_Tp> __l, _Compare __comp) { return *std::max_element(__l.begin(), __l.end(), __comp); } template inline pair<_Tp, _Tp> minmax(initializer_list<_Tp> __l) { pair __p = std::minmax_element(__l.begin(), __l.end()); return std::make_pair(*__p.first, *__p.second); } template inline pair<_Tp, _Tp> minmax(initializer_list<_Tp> __l, _Compare __comp) { pair __p = std::minmax_element(__l.begin(), __l.end(), __comp); return std::make_pair(*__p.first, *__p.second); } # 4251 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) break; if (__first1 == __last1) return true; _ForwardIterator2 __last2 = __first2; std::advance(__last2, std::distance(__first1, __last1)); for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) { if (__scan != std::find(__first1, __scan, *__scan)) continue; auto __matches = std::count(__first2, __last2, *__scan); if (0 == __matches || std::count(__scan, __last1, *__scan) != __matches) return false; } return true; } # 4296 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template bool is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _BinaryPredicate __pred) { for (; __first1 != __last1; ++__first1, ++__first2) if (!bool(__pred(*__first1, *__first2))) break; if (__first1 == __last1) return true; _ForwardIterator2 __last2 = __first2; std::advance(__last2, std::distance(__first1, __last1)); for (_ForwardIterator1 __scan = __first1; __scan != __last1; ++__scan) { using std::placeholders::_1; if (__scan != std::find_if(__first1, __scan, std::bind(__pred, _1, *__scan))) continue; auto __matches = std::count_if(__first2, __last2, std::bind(__pred, _1, *__scan)); if (0 == __matches || std::count_if(__scan, __last1, std::bind(__pred, _1, *__scan)) != __matches) return false; } return true; } # 4346 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _UniformRandomNumberGenerator&& __g) { ; if (__first == __last) return; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; typedef typename std::make_unsigned<_DistanceType>::type __ud_type; typedef typename std::uniform_int_distribution<__ud_type> __distr_type; typedef typename __distr_type::param_type __p_type; __distr_type __d; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + __d(__g, __p_type(0, __i - __first))); } # 4391 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _Function for_each(_InputIterator __first, _InputIterator __last, _Function __f) { ; for (; __first != __last; ++__first) __f(*__first); return std::move(__f); } # 4412 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _InputIterator find(_InputIterator __first, _InputIterator __last, const _Tp& __val) { ; return std::__find(__first, __last, __val, std::__iterator_category(__first)); } # 4436 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _InputIterator find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; return std::__find_if(__first, __last, __pred, std::__iterator_category(__first)); } # 4466 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _InputIterator find_first_of(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2) { ; ; for (; __first1 != __last1; ++__first1) for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) if (*__first1 == *__iter) return __first1; return __last1; } # 4506 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _InputIterator find_first_of(_InputIterator __first1, _InputIterator __last1, _ForwardIterator __first2, _ForwardIterator __last2, _BinaryPredicate __comp) { ; ; for (; __first1 != __last1; ++__first1) for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) if (__comp(*__first1, *__iter)) return __first1; return __last1; } # 4538 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __last; _ForwardIterator __next = __first; while(++__next != __last) { if (*__first == *__next) return __first; __first = __next; } return __last; } # 4570 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __binary_pred) { ; if (__first == __last) return __last; _ForwardIterator __next = __first; while(++__next != __last) { if (__binary_pred(*__first, *__next)) return __first; __first = __next; } return __last; } # 4602 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template typename iterator_traits<_InputIterator>::difference_type count(_InputIterator __first, _InputIterator __last, const _Tp& __value) { ; typename iterator_traits<_InputIterator>::difference_type __n = 0; for (; __first != __last; ++__first) if (*__first == __value) ++__n; return __n; } # 4627 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template typename iterator_traits<_InputIterator>::difference_type count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { ; typename iterator_traits<_InputIterator>::difference_type __n = 0; for (; __first != __last; ++__first) if (__pred(*__first)) ++__n; return __n; } # 4669 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) { ; ; if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIterator2 __p1(__first2); if (++__p1 == __last2) return std::find(__first1, __last1, *__first2); _ForwardIterator2 __p; _ForwardIterator1 __current = __first1; for (;;) { __first1 = std::find(__first1, __last1, *__first2); if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (*__current == *__p) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } # 4740 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __predicate) { ; ; if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIterator2 __p1(__first2); if (++__p1 == __last2) { while (__first1 != __last1 && !bool(__predicate(*__first1, *__first2))) ++__first1; return __first1; } _ForwardIterator2 __p; _ForwardIterator1 __current = __first1; for (;;) { while (__first1 != __last1 && !bool(__predicate(*__first1, *__first2))) ++__first1; if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (__predicate(*__current, *__p)) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } # 4815 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val) { ; if (__count <= 0) return __first; if (__count == 1) return std::find(__first, __last, __val); return std::__search_n(__first, __last, __count, __val, std::__iterator_category(__first)); } # 4852 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Integer __count, const _Tp& __val, _BinaryPredicate __binary_pred) { ; if (__count <= 0) return __first; if (__count == 1) { while (__first != __last && !bool(__binary_pred(*__first, __val))) ++__first; return __first; } return std::__search_n(__first, __last, __count, __val, __binary_pred, std::__iterator_category(__first)); } # 4894 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __unary_op) { ; for (; __first != __last; ++__first, ++__result) *__result = __unary_op(*__first); return __result; } # 4931 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _OutputIterator __result, _BinaryOperation __binary_op) { ; for (; __first1 != __last1; ++__first1, ++__first2, ++__result) *__result = __binary_op(*__first1, *__first2); return __result; } # 4964 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template void replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value) { ; for (; __first != __last; ++__first) if (*__first == __old_value) *__first = __new_value; } # 4996 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template void replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value) { ; for (; __first != __last; ++__first) if (__pred(*__first)) *__first = __new_value; } # 5028 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template void generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen) { ; for (; __first != __last; ++__first) *__first = __gen(); } # 5059 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator generate_n(_OutputIterator __first, _Size __n, _Generator __gen) { for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, ++__first) *__first = __gen(); return __first; } # 5096 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { ; if (__first == __last) return __result; return std::__unique_copy(__first, __last, __result, std::__iterator_category(__first), std::__iterator_category(__result)); } # 5135 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _OutputIterator unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __binary_pred) { ; if (__first == __last) return __result; return std::__unique_copy(__first, __last, __result, __binary_pred, std::__iterator_category(__first), std::__iterator_category(__result)); } # 5167 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) { ; if (__first != __last) for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); } # 5195 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template void random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomNumberGenerator&& __rand) { ; if (__first == __last) return; for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) std::iter_swap(__i, __first + __rand((__i - __first) + 1)); } # 5231 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline _ForwardIterator partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { ; return std::__partition(__first, __last, __pred, std::__iterator_category(__first)); } # 5265 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; std::__heap_select(__first, __middle, __last); std::sort_heap(__first, __middle); } # 5304 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; std::__heap_select(__first, __middle, __last, __comp); std::sort_heap(__first, __middle, __comp); } # 5342 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2); } # 5381 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; ; if (__first == __last || __nth == __last) return; std::__introselect(__first, __nth, __last, std::__lg(__last - __first) * 2, __comp); } # 5419 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; if (__first != __last) { std::__introsort_loop(__first, __last, std::__lg(__last - __first) * 2); std::__final_insertion_sort(__first, __last); } } # 5455 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; ; if (__first != __last) { std::__introsort_loop(__first, __last, std::__lg(__last - __first) * 2, __comp); std::__final_insertion_sort(__first, __last, __comp); } } # 5497 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5561 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator merge(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5621 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__inplace_stable_sort(__first, __last); else std::__stable_sort_adaptive(__first, __last, __buf.begin(), _DistanceType(__buf.size())); } # 5663 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template inline void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType; typedef typename iterator_traits<_RandomAccessIterator>::difference_type _DistanceType; ; _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, __last); if (__buf.begin() == 0) std::__inplace_stable_sort(__first, __last, __comp); else std::__stable_sort_adaptive(__first, __last, __buf.begin(), _DistanceType(__buf.size()), __comp); } # 5709 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (*__first1 < *__first2) { *__result = *__first1; ++__first1; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5776 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_union(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; } else if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 5843 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) ++__first1; else if (*__first2 < *__first1) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } # 5900 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) ++__first1; else if (__comp(*__first2, *__first1)) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } # 5958 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) ++__first2; else { ++__first1; ++__first2; } return std::copy(__first1, __last1, __result); } # 6019 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(*__first2, *__first1)) ++__first2; else { ++__first1; ++__first2; } return std::copy(__first1, __last1, __result); } # 6077 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 6143 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _OutputIterator set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp) { typedef typename iterator_traits<_InputIterator1>::value_type _ValueType1; typedef typename iterator_traits<_InputIterator2>::value_type _ValueType2; ; ; while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)); } # 6200 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (*__first < *__result) __result = __first; return __result; } # 6228 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (__comp(*__first, *__result)) __result = __first; return __result; } # 6256 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (*__result < *__first) __result = __first; return __result; } # 6284 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_algo.h" 3 template _ForwardIterator max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) { ; if (__first == __last) return __first; _ForwardIterator __result = __first; while (++__first != __last) if (__comp(*__result, *__first)) __result = __first; return __result; } } # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/algorithm" 2 3 # 190 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" 2 # 243 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/config.h" namespace CGAL { typedef const void * Nullptr_t; } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iostream" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iostream" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iostream" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ios" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ios" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ios" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 class locale { public: typedef int category; class facet; class id; class _Impl; friend class facet; friend class _Impl; template friend bool has_facet(const locale&) throw(); template friend const _Facet& use_facet(const locale&); template friend struct __use_cache; # 100 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 static const category none = 0; static const category ctype = 1L << 0; static const category numeric = 1L << 1; static const category collate = 1L << 2; static const category time = 1L << 3; static const category monetary = 1L << 4; static const category messages = 1L << 5; static const category all = (ctype | numeric | collate | time | monetary | messages); # 119 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 locale() throw(); # 128 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 locale(const locale& __other) throw(); # 138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 explicit locale(const char* __s); # 153 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 locale(const locale& __base, const char* __s, category __cat); # 166 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 locale(const locale& __base, const locale& __add, category __cat); # 179 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 template locale(const locale& __other, _Facet* __f); ~locale() throw(); # 193 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 const locale& operator=(const locale& __other) throw(); # 208 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 template locale combine(const locale& __other) const; string name() const; # 227 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 bool operator==(const locale& __other) const throw(); bool operator!=(const locale& __other) const throw() { return !(this->operator==(__other)); } # 255 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 template bool operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, const basic_string<_Char, _Traits, _Alloc>& __s2) const; # 271 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 static locale global(const locale& __loc); static const locale& classic(); private: _Impl* _M_impl; static _Impl* _S_classic; static _Impl* _S_global; static const char* const* const _S_categories; # 306 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 enum { _S_categories_size = 6 + 6 }; static __gthread_once_t _S_once; explicit locale(_Impl*) throw(); static void _S_initialize(); static void _S_initialize_once() throw(); static category _S_normalize_category(category); void _M_coalesce(const locale& __base, const locale& __add, category __cat); }; # 340 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 class locale::facet { private: friend class locale; friend class locale::_Impl; mutable _Atomic_word _M_refcount; static __c_locale _S_c_locale; static const char _S_c_name[2]; static __gthread_once_t _S_once; static void _S_initialize_once(); protected: # 371 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 explicit facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) { } virtual ~facet(); static void _S_create_c_locale(__c_locale& __cloc, const char* __s, __c_locale __old = 0); static __c_locale _S_clone_c_locale(__c_locale& __cloc) throw(); static void _S_destroy_c_locale(__c_locale& __cloc); static __c_locale _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); static __c_locale _S_get_c_locale(); __attribute__ ((__const__)) static const char* _S_get_c_name() throw(); private: void _M_add_reference() const throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } void _M_remove_reference() const throw() { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { ; try { delete this; } catch(...) { } } } facet(const facet&); facet& operator=(const facet&); }; # 438 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 class locale::id { private: friend class locale; friend class locale::_Impl; template friend const _Facet& use_facet(const locale&); template friend bool has_facet(const locale&) throw(); mutable size_t _M_index; static _Atomic_word _S_refcount; void operator=(const id&); id(const id&); public: id() { } size_t _M_id() const throw(); }; class locale::_Impl { public: friend class locale; friend class locale::facet; template friend bool has_facet(const locale&) throw(); template friend const _Facet& use_facet(const locale&); template friend struct __use_cache; private: _Atomic_word _M_refcount; const facet** _M_facets; size_t _M_facets_size; const facet** _M_caches; char** _M_names; static const locale::id* const _S_id_ctype[]; static const locale::id* const _S_id_numeric[]; static const locale::id* const _S_id_collate[]; static const locale::id* const _S_id_time[]; static const locale::id* const _S_id_monetary[]; static const locale::id* const _S_id_messages[]; static const locale::id* const* const _S_facet_categories[]; void _M_add_reference() throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } void _M_remove_reference() throw() { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { ; try { delete this; } catch(...) { } } } _Impl(const _Impl&, size_t); _Impl(const char*, size_t); _Impl(size_t) throw(); ~_Impl() throw(); _Impl(const _Impl&); void operator=(const _Impl&); bool _M_check_same_name() { bool __ret = true; if (_M_names[1]) for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; return __ret; } void _M_replace_categories(const _Impl*, category); void _M_replace_category(const _Impl*, const locale::id* const*); void _M_replace_facet(const _Impl*, const locale::id*); void _M_install_facet(const locale::id*, const facet*); template void _M_init_facet(_Facet* __facet) { _M_install_facet(&_Facet::id, __facet); } void _M_install_cache(const facet*, size_t); }; # 584 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 template bool has_facet(const locale& __loc) throw(); # 601 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 template const _Facet& use_facet(const locale& __loc); # 618 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 template class collate : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: __c_locale _M_c_locale_collate; public: static locale::id id; # 645 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 explicit collate(size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) { } # 659 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 explicit collate(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) { } # 676 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 int compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } # 695 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 string_type transform(const _CharT* __lo, const _CharT* __hi) const { return this->do_transform(__lo, __hi); } # 709 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 long hash(const _CharT* __lo, const _CharT* __hi) const { return this->do_hash(__lo, __hi); } int _M_compare(const _CharT*, const _CharT*) const throw(); size_t _M_transform(_CharT*, const _CharT*, size_t) const throw(); protected: virtual ~collate() { _S_destroy_c_locale(_M_c_locale_collate); } # 738 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 virtual int do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const; # 752 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 virtual string_type do_transform(const _CharT* __lo, const _CharT* __hi) const; # 765 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 3 virtual long do_hash(const _CharT* __lo, const _CharT* __hi) const; }; template locale::id collate<_CharT>::id; template<> int collate::_M_compare(const char*, const char*) const throw(); template<> size_t collate::_M_transform(char*, const char*, size_t) const throw(); template<> int collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); template<> size_t collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); template class collate_byname : public collate<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit collate_byname(const char* __s, size_t __refs = 0) : collate<_CharT>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_collate); this->_S_create_c_locale(this->_M_c_locale_collate, __s); } } protected: virtual ~collate_byname() { } }; } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.tcc" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.tcc" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template locale:: locale(const locale& __other, _Facet* __f) { _M_impl = new _Impl(*__other._M_impl, 1); try { _M_impl->_M_install_facet(&_Facet::id, __f); } catch(...) { _M_impl->_M_remove_reference(); throw; } delete [] _M_impl->_M_names[0]; _M_impl->_M_names[0] = 0; } template locale locale:: combine(const locale& __other) const { _Impl* __tmp = new _Impl(*_M_impl, 1); try { __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); } catch(...) { __tmp->_M_remove_reference(); throw; } return locale(__tmp); } template bool locale:: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, const basic_string<_CharT, _Traits, _Alloc>& __s2) const { typedef std::collate<_CharT> __collate_type; const __collate_type& __collate = use_facet<__collate_type>(*this); return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), __s2.data(), __s2.data() + __s2.length()) < 0); } template bool has_facet(const locale& __loc) throw() { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; return (__i < __loc._M_impl->_M_facets_size && dynamic_cast(__facets[__i])); } template const _Facet& use_facet(const locale& __loc) { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) __throw_bad_cast(); return dynamic_cast(*__facets[__i]); } template int collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () { return 0; } template size_t collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () { return 0; } template int collate<_CharT>:: do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { const string_type __one(__lo1, __hi1); const string_type __two(__lo2, __hi2); const _CharT* __p = __one.c_str(); const _CharT* __pend = __one.data() + __one.length(); const _CharT* __q = __two.c_str(); const _CharT* __qend = __two.data() + __two.length(); for (;;) { const int __res = _M_compare(__p, __q); if (__res) return __res; __p += char_traits<_CharT>::length(__p); __q += char_traits<_CharT>::length(__q); if (__p == __pend && __q == __qend) return 0; else if (__p == __pend) return -1; else if (__q == __qend) return 1; __p++; __q++; } } template typename collate<_CharT>::string_type collate<_CharT>:: do_transform(const _CharT* __lo, const _CharT* __hi) const { string_type __ret; const string_type __str(__lo, __hi); const _CharT* __p = __str.c_str(); const _CharT* __pend = __str.data() + __str.length(); size_t __len = (__hi - __lo) * 2; _CharT* __c = new _CharT[__len]; try { for (;;) { size_t __res = _M_transform(__c, __p, __len); if (__res >= __len) { __len = __res + 1; delete [] __c, __c = 0; __c = new _CharT[__len]; __res = _M_transform(__c, __p, __len); } __ret.append(__c, __res); __p += char_traits<_CharT>::length(__p); if (__p == __pend) break; __p++; __ret.push_back(_CharT()); } } catch(...) { delete [] __c; throw; } delete [] __c; return __ret; } template long collate<_CharT>:: do_hash(const _CharT* __lo, const _CharT* __hi) const { unsigned long __val = 0; for (; __lo < __hi; ++__lo) __val = *__lo + ((__val << 7) | (__val >> (__gnu_cxx::__numeric_traits:: __digits - 7))); return static_cast(__val); } extern template class collate; extern template class collate_byname; extern template const collate& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template class collate; extern template class collate_byname; extern template const collate& use_facet >(const locale&); extern template bool has_facet >(const locale&); } # 823 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_classes.h" 2 3 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { enum _Ios_Fmtflags { _S_boolalpha = 1L << 0, _S_dec = 1L << 1, _S_fixed = 1L << 2, _S_hex = 1L << 3, _S_internal = 1L << 4, _S_left = 1L << 5, _S_oct = 1L << 6, _S_right = 1L << 7, _S_scientific = 1L << 8, _S_showbase = 1L << 9, _S_showpoint = 1L << 10, _S_showpos = 1L << 11, _S_skipws = 1L << 12, _S_unitbuf = 1L << 13, _S_uppercase = 1L << 14, _S_adjustfield = _S_left | _S_right | _S_internal, _S_basefield = _S_dec | _S_oct | _S_hex, _S_floatfield = _S_scientific | _S_fixed, _S_ios_fmtflags_end = 1L << 16 }; inline constexpr _Ios_Fmtflags operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } inline constexpr _Ios_Fmtflags operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } inline constexpr _Ios_Fmtflags operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } inline constexpr _Ios_Fmtflags operator~(_Ios_Fmtflags __a) { return _Ios_Fmtflags(~static_cast(__a)); } inline const _Ios_Fmtflags& operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a | __b; } inline const _Ios_Fmtflags& operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a & __b; } inline const _Ios_Fmtflags& operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a ^ __b; } enum _Ios_Openmode { _S_app = 1L << 0, _S_ate = 1L << 1, _S_bin = 1L << 2, _S_in = 1L << 3, _S_out = 1L << 4, _S_trunc = 1L << 5, _S_ios_openmode_end = 1L << 16 }; inline constexpr _Ios_Openmode operator&(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } inline constexpr _Ios_Openmode operator|(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } inline constexpr _Ios_Openmode operator^(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } inline constexpr _Ios_Openmode operator~(_Ios_Openmode __a) { return _Ios_Openmode(~static_cast(__a)); } inline const _Ios_Openmode& operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a | __b; } inline const _Ios_Openmode& operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a & __b; } inline const _Ios_Openmode& operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a ^ __b; } enum _Ios_Iostate { _S_goodbit = 0, _S_badbit = 1L << 0, _S_eofbit = 1L << 1, _S_failbit = 1L << 2, _S_ios_iostate_end = 1L << 16 }; inline constexpr _Ios_Iostate operator&(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } inline constexpr _Ios_Iostate operator|(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } inline constexpr _Ios_Iostate operator^(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } inline constexpr _Ios_Iostate operator~(_Ios_Iostate __a) { return _Ios_Iostate(~static_cast(__a)); } inline const _Ios_Iostate& operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a | __b; } inline const _Ios_Iostate& operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a & __b; } inline const _Ios_Iostate& operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a ^ __b; } enum _Ios_Seekdir { _S_beg = 0, _S_cur = 1, _S_end = 2, _S_ios_seekdir_end = 1L << 16 }; # 201 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 class ios_base { public: class failure : public exception { public: explicit failure(const string& __str) throw(); virtual ~failure() throw(); virtual const char* what() const throw(); private: string _M_msg; }; # 257 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 typedef _Ios_Fmtflags fmtflags; static const fmtflags boolalpha = _S_boolalpha; static const fmtflags dec = _S_dec; static const fmtflags fixed = _S_fixed; static const fmtflags hex = _S_hex; static const fmtflags internal = _S_internal; static const fmtflags left = _S_left; static const fmtflags oct = _S_oct; static const fmtflags right = _S_right; static const fmtflags scientific = _S_scientific; static const fmtflags showbase = _S_showbase; static const fmtflags showpoint = _S_showpoint; static const fmtflags showpos = _S_showpos; static const fmtflags skipws = _S_skipws; static const fmtflags unitbuf = _S_unitbuf; static const fmtflags uppercase = _S_uppercase; static const fmtflags adjustfield = _S_adjustfield; static const fmtflags basefield = _S_basefield; static const fmtflags floatfield = _S_floatfield; # 332 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 typedef _Ios_Iostate iostate; static const iostate badbit = _S_badbit; static const iostate eofbit = _S_eofbit; static const iostate failbit = _S_failbit; static const iostate goodbit = _S_goodbit; # 363 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 typedef _Ios_Openmode openmode; static const openmode app = _S_app; static const openmode ate = _S_ate; static const openmode binary = _S_bin; static const openmode in = _S_in; static const openmode out = _S_out; static const openmode trunc = _S_trunc; # 395 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 typedef _Ios_Seekdir seekdir; static const seekdir beg = _S_beg; static const seekdir cur = _S_cur; static const seekdir end = _S_end; typedef int io_state; typedef int open_mode; typedef int seek_dir; typedef std::streampos streampos; typedef std::streamoff streamoff; # 421 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 enum event { erase_event, imbue_event, copyfmt_event }; # 438 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 typedef void (*event_callback) (event __e, ios_base& __b, int __i); # 450 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 void register_callback(event_callback __fn, int __index); protected: streamsize _M_precision; streamsize _M_width; fmtflags _M_flags; iostate _M_exception; iostate _M_streambuf_state; struct _Callback_list { _Callback_list* _M_next; ios_base::event_callback _M_fn; int _M_index; _Atomic_word _M_refcount; _Callback_list(ios_base::event_callback __fn, int __index, _Callback_list* __cb) : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } void _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } int _M_remove_reference() { ; int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); if (__res == 0) { ; } return __res; } }; _Callback_list* _M_callbacks; void _M_call_callbacks(event __ev) throw(); void _M_dispose_callbacks(void) throw(); struct _Words { void* _M_pword; long _M_iword; _Words() : _M_pword(0), _M_iword(0) { } }; _Words _M_word_zero; enum { _S_local_word_size = 8 }; _Words _M_local_word[_S_local_word_size]; int _M_word_size; _Words* _M_word; _Words& _M_grow_words(int __index, bool __iword); locale _M_ios_locale; void _M_init() throw(); public: class Init { friend class ios_base; public: Init(); ~Init(); private: static _Atomic_word _S_refcount; static bool _S_synced_with_stdio; }; fmtflags flags() const { return _M_flags; } # 563 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 fmtflags flags(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags = __fmtfl; return __old; } # 579 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 fmtflags setf(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags |= __fmtfl; return __old; } # 596 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 fmtflags setf(fmtflags __fmtfl, fmtflags __mask) { fmtflags __old = _M_flags; _M_flags &= ~__mask; _M_flags |= (__fmtfl & __mask); return __old; } void unsetf(fmtflags __mask) { _M_flags &= ~__mask; } # 622 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 streamsize precision() const { return _M_precision; } streamsize precision(streamsize __prec) { streamsize __old = _M_precision; _M_precision = __prec; return __old; } streamsize width() const { return _M_width; } streamsize width(streamsize __wide) { streamsize __old = _M_width; _M_width = __wide; return __old; } # 673 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 static bool sync_with_stdio(bool __sync = true); # 685 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 locale imbue(const locale& __loc) throw(); # 696 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 locale getloc() const { return _M_ios_locale; } # 707 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 const locale& _M_getloc() const { return _M_ios_locale; } # 726 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 static int xalloc() throw(); # 742 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 long& iword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, true); return __word._M_iword; } # 763 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 void*& pword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, false); return __word._M_pword; } # 780 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ios_base.h" 3 virtual ~ios_base(); protected: ios_base() throw (); private: ios_base(const ios_base&); ios_base& operator=(const ios_base&); }; inline ios_base& boolalpha(ios_base& __base) { __base.setf(ios_base::boolalpha); return __base; } inline ios_base& noboolalpha(ios_base& __base) { __base.unsetf(ios_base::boolalpha); return __base; } inline ios_base& showbase(ios_base& __base) { __base.setf(ios_base::showbase); return __base; } inline ios_base& noshowbase(ios_base& __base) { __base.unsetf(ios_base::showbase); return __base; } inline ios_base& showpoint(ios_base& __base) { __base.setf(ios_base::showpoint); return __base; } inline ios_base& noshowpoint(ios_base& __base) { __base.unsetf(ios_base::showpoint); return __base; } inline ios_base& showpos(ios_base& __base) { __base.setf(ios_base::showpos); return __base; } inline ios_base& noshowpos(ios_base& __base) { __base.unsetf(ios_base::showpos); return __base; } inline ios_base& skipws(ios_base& __base) { __base.setf(ios_base::skipws); return __base; } inline ios_base& noskipws(ios_base& __base) { __base.unsetf(ios_base::skipws); return __base; } inline ios_base& uppercase(ios_base& __base) { __base.setf(ios_base::uppercase); return __base; } inline ios_base& nouppercase(ios_base& __base) { __base.unsetf(ios_base::uppercase); return __base; } inline ios_base& unitbuf(ios_base& __base) { __base.setf(ios_base::unitbuf); return __base; } inline ios_base& nounitbuf(ios_base& __base) { __base.unsetf(ios_base::unitbuf); return __base; } inline ios_base& internal(ios_base& __base) { __base.setf(ios_base::internal, ios_base::adjustfield); return __base; } inline ios_base& left(ios_base& __base) { __base.setf(ios_base::left, ios_base::adjustfield); return __base; } inline ios_base& right(ios_base& __base) { __base.setf(ios_base::right, ios_base::adjustfield); return __base; } inline ios_base& dec(ios_base& __base) { __base.setf(ios_base::dec, ios_base::basefield); return __base; } inline ios_base& hex(ios_base& __base) { __base.setf(ios_base::hex, ios_base::basefield); return __base; } inline ios_base& oct(ios_base& __base) { __base.setf(ios_base::oct, ios_base::basefield); return __base; } inline ios_base& fixed(ios_base& __base) { __base.setf(ios_base::fixed, ios_base::floatfield); return __base; } inline ios_base& scientific(ios_base& __base) { __base.setf(ios_base::scientific, ios_base::floatfield); return __base; } } # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ios" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 # 46 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, basic_streambuf<_CharT, _Traits>*, bool&); # 116 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 template class basic_streambuf { public: typedef _CharT char_type; typedef _Traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_streambuf __streambuf_type; friend class basic_ios; friend class basic_istream; friend class basic_ostream; friend class istreambuf_iterator; friend class ostreambuf_iterator; friend streamsize __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); template friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&); template friend basic_istream<_CharT2, _Traits2>& getline(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); protected: # 182 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 char_type* _M_in_beg; char_type* _M_in_cur; char_type* _M_in_end; char_type* _M_out_beg; char_type* _M_out_cur; char_type* _M_out_end; locale _M_buf_locale; public: virtual ~basic_streambuf() { } # 206 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 locale pubimbue(const locale& __loc) { locale __tmp(this->getloc()); this->imbue(__loc); _M_buf_locale = __loc; return __tmp; } # 223 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 locale getloc() const { return _M_buf_locale; } # 236 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 __streambuf_type* pubsetbuf(char_type* __s, streamsize __n) { return this->setbuf(__s, __n); } # 248 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 pos_type pubseekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekoff(__off, __way, __mode); } # 260 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 pos_type pubseekpos(pos_type __sp, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekpos(__sp, __mode); } int pubsync() { return this->sync(); } # 281 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 streamsize in_avail() { const streamsize __ret = this->egptr() - this->gptr(); return __ret ? __ret : this->showmanyc(); } # 295 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 int_type snextc() { int_type __ret = traits_type::eof(); if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), __ret), true)) __ret = this->sgetc(); return __ret; } # 313 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 int_type sbumpc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } else __ret = this->uflow(); return __ret; } # 335 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 int_type sgetc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) __ret = traits_type::to_int_type(*this->gptr()); else __ret = this->underflow(); return __ret; } # 354 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 streamsize sgetn(char_type* __s, streamsize __n) { return this->xsgetn(__s, __n); } # 369 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 int_type sputbackc(char_type __c) { int_type __ret; const bool __testpos = this->eback() < this->gptr(); if (__builtin_expect(!__testpos || !traits_type::eq(__c, this->gptr()[-1]), false)) __ret = this->pbackfail(traits_type::to_int_type(__c)); else { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } return __ret; } # 394 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 int_type sungetc() { int_type __ret; if (__builtin_expect(this->eback() < this->gptr(), true)) { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } else __ret = this->pbackfail(); return __ret; } # 421 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 int_type sputc(char_type __c) { int_type __ret; if (__builtin_expect(this->pptr() < this->epptr(), true)) { *this->pptr() = __c; this->pbump(1); __ret = traits_type::to_int_type(__c); } else __ret = this->overflow(traits_type::to_int_type(__c)); return __ret; } # 447 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 streamsize sputn(const char_type* __s, streamsize __n) { return this->xsputn(__s, __n); } protected: # 461 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 basic_streambuf() : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), _M_out_end(0), _M_buf_locale(locale()) { } # 479 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 char_type* eback() const { return _M_in_beg; } char_type* gptr() const { return _M_in_cur; } char_type* egptr() const { return _M_in_end; } # 495 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 void gbump(int __n) { _M_in_cur += __n; } # 506 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) { _M_in_beg = __gbeg; _M_in_cur = __gnext; _M_in_end = __gend; } # 526 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 char_type* pbase() const { return _M_out_beg; } char_type* pptr() const { return _M_out_cur; } char_type* epptr() const { return _M_out_end; } # 542 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 void pbump(int __n) { _M_out_cur += __n; } # 552 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 void setp(char_type* __pbeg, char_type* __pend) { _M_out_beg = _M_out_cur = __pbeg; _M_out_end = __pend; } # 573 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual void imbue(const locale& __loc) { } # 588 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual basic_streambuf* setbuf(char_type*, streamsize) { return this; } # 599 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } # 611 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual pos_type seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } # 624 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual int sync() { return 0; } # 646 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual streamsize showmanyc() { return 0; } # 662 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual streamsize xsgetn(char_type* __s, streamsize __n); # 684 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual int_type underflow() { return traits_type::eof(); } # 697 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual int_type uflow() { int_type __ret = traits_type::eof(); const bool __testeof = traits_type::eq_int_type(this->underflow(), __ret); if (!__testeof) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } return __ret; } # 721 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual int_type pbackfail(int_type __c = traits_type::eof()) { return traits_type::eof(); } # 739 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual streamsize xsputn(const char_type* __s, streamsize __n); # 765 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 virtual int_type overflow(int_type __c = traits_type::eof()) { return traits_type::eof(); } public: # 780 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 3 void stossc() { if (this->gptr() < this->egptr()) this->gbump(1); else this->uflow(); } void __safe_gbump(streamsize __n) { _M_in_cur += __n; } void __safe_pbump(streamsize __n) { _M_out_cur += __n; } private: basic_streambuf(const __streambuf_type& __sb) : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), _M_buf_locale(__sb._M_buf_locale) { } __streambuf_type& operator=(const __streambuf_type&) { return *this; }; }; template<> streamsize __copy_streambufs_eof(basic_streambuf* __sbin, basic_streambuf* __sbout, bool& __ineof); template<> streamsize __copy_streambufs_eof(basic_streambuf* __sbin, basic_streambuf* __sbout, bool& __ineof); } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/streambuf.tcc" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/streambuf.tcc" 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/streambuf.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template streamsize basic_streambuf<_CharT, _Traits>:: xsgetn(char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->egptr() - this->gptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(__s, this->gptr(), __len); __ret += __len; __s += __len; this->__safe_gbump(__len); } if (__ret < __n) { const int_type __c = this->uflow(); if (!traits_type::eq_int_type(__c, traits_type::eof())) { traits_type::assign(*__s++, traits_type::to_char_type(__c)); ++__ret; } else break; } } return __ret; } template streamsize basic_streambuf<_CharT, _Traits>:: xsputn(const char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->epptr() - this->pptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(this->pptr(), __s, __len); __ret += __len; __s += __len; this->__safe_pbump(__len); } if (__ret < __n) { int_type __c = this->overflow(traits_type::to_int_type(*__s)); if (!traits_type::eq_int_type(__c, traits_type::eof())) { ++__ret; ++__s; } else break; } } return __ret; } template streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout, bool& __ineof) { streamsize __ret = 0; __ineof = true; typename _Traits::int_type __c = __sbin->sgetc(); while (!_Traits::eq_int_type(__c, _Traits::eof())) { __c = __sbout->sputc(_Traits::to_char_type(__c)); if (_Traits::eq_int_type(__c, _Traits::eof())) { __ineof = false; break; } ++__ret; __c = __sbin->snextc(); } return __ret; } template inline streamsize __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout) { bool __ineof; return __copy_streambufs_eof(__sbin, __sbout, __ineof); } extern template class basic_streambuf; extern template streamsize __copy_streambufs(basic_streambuf*, basic_streambuf*); extern template streamsize __copy_streambufs_eof(basic_streambuf*, basic_streambuf*, bool&); extern template class basic_streambuf; extern template streamsize __copy_streambufs(basic_streambuf*, basic_streambuf*); extern template streamsize __copy_streambufs_eof(basic_streambuf*, basic_streambuf*, bool&); } # 827 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/streambuf" 2 3 # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ios" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 1 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwctype" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwctype" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwctype" 3 # 52 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwctype" 3 # 1 "/usr/include/wctype.h" 1 3 4 # 34 "/usr/include/wctype.h" 3 4 # 1 "/usr/include/wchar.h" 1 3 4 # 35 "/usr/include/wctype.h" 2 3 4 # 50 "/usr/include/wctype.h" 3 4 typedef unsigned long int wctype_t; # 72 "/usr/include/wctype.h" 3 4 enum { __ISwupper = 0, __ISwlower = 1, __ISwalpha = 2, __ISwdigit = 3, __ISwxdigit = 4, __ISwspace = 5, __ISwprint = 6, __ISwgraph = 7, __ISwblank = 8, __ISwcntrl = 9, __ISwpunct = 10, __ISwalnum = 11, _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) }; extern "C" { extern int iswalnum (wint_t __wc) throw (); extern int iswalpha (wint_t __wc) throw (); extern int iswcntrl (wint_t __wc) throw (); extern int iswdigit (wint_t __wc) throw (); extern int iswgraph (wint_t __wc) throw (); extern int iswlower (wint_t __wc) throw (); extern int iswprint (wint_t __wc) throw (); extern int iswpunct (wint_t __wc) throw (); extern int iswspace (wint_t __wc) throw (); extern int iswupper (wint_t __wc) throw (); extern int iswxdigit (wint_t __wc) throw (); extern int iswblank (wint_t __wc) throw (); # 172 "/usr/include/wctype.h" 3 4 extern wctype_t wctype (__const char *__property) throw (); extern int iswctype (wint_t __wc, wctype_t __desc) throw (); typedef __const __int32_t *wctrans_t; extern wint_t towlower (wint_t __wc) throw (); extern wint_t towupper (wint_t __wc) throw (); } # 214 "/usr/include/wctype.h" 3 4 extern "C" { extern wctrans_t wctrans (__const char *__property) throw (); extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); extern wctype_t wctype_l (__const char *__property, __locale_t __locale) throw (); extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) throw (); extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) throw (); extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, __locale_t __locale) throw (); } # 53 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwctype" 2 3 # 82 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwctype" 3 namespace std { using ::wctrans_t; using ::wctype_t; using ::wint_t; using ::iswalnum; using ::iswalpha; using ::iswblank; using ::iswcntrl; using ::iswctype; using ::iswdigit; using ::iswgraph; using ::iswlower; using ::iswprint; using ::iswpunct; using ::iswspace; using ::iswupper; using ::iswxdigit; using ::towctrans; using ::towlower; using ::towupper; using ::wctrans; using ::wctype; } namespace std { using std::iswblank; } # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cctype" 3 # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/ctype_base.h" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/ctype_base.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct ctype_base { typedef const int* __to_type; typedef unsigned short mask; static const mask upper = _ISupper; static const mask lower = _ISlower; static const mask alpha = _ISalpha; static const mask digit = _ISdigit; static const mask xdigit = _ISxdigit; static const mask space = _ISspace; static const mask print = _ISprint; static const mask graph = _ISalpha | _ISdigit | _ISpunct; static const mask cntrl = _IScntrl; static const mask punct = _ISpunct; static const mask alnum = _ISalpha | _ISdigit; }; } # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/streambuf_iterator.h" 1 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/streambuf_iterator.h" 3 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/streambuf_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 51 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/streambuf_iterator.h" 3 template class istreambuf_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef typename _Traits::int_type int_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_istream<_CharT, _Traits> istream_type; template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); private: mutable streambuf_type* _M_sbuf; mutable int_type _M_c; public: constexpr istreambuf_iterator() noexcept : _M_sbuf(0), _M_c(traits_type::eof()) { } istreambuf_iterator(const istreambuf_iterator&) noexcept = default; ~istreambuf_iterator() = default; istreambuf_iterator(istream_type& __s) noexcept : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } istreambuf_iterator(streambuf_type* __s) noexcept : _M_sbuf(__s), _M_c(traits_type::eof()) { } char_type operator*() const { return traits_type::to_char_type(_M_get()); } istreambuf_iterator& operator++() { ; if (_M_sbuf) { _M_sbuf->sbumpc(); _M_c = traits_type::eof(); } return *this; } istreambuf_iterator operator++(int) { ; istreambuf_iterator __old = *this; if (_M_sbuf) { __old._M_c = _M_sbuf->sbumpc(); _M_c = traits_type::eof(); } return __old; } bool equal(const istreambuf_iterator& __b) const { return _M_at_eof() == __b._M_at_eof(); } private: int_type _M_get() const { const int_type __eof = traits_type::eof(); int_type __ret = __eof; if (_M_sbuf) { if (!traits_type::eq_int_type(_M_c, __eof)) __ret = _M_c; else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), __eof)) _M_c = __ret; else _M_sbuf = 0; } return __ret; } bool _M_at_eof() const { const int_type __eof = traits_type::eof(); return traits_type::eq_int_type(_M_get(), __eof); } }; template inline bool operator==(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return __a.equal(__b); } template inline bool operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return !__a.equal(__b); } template class ostreambuf_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_ostream<_CharT, _Traits> ostream_type; template friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); private: streambuf_type* _M_sbuf; bool _M_failed; public: ostreambuf_iterator(ostream_type& __s) noexcept : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } ostreambuf_iterator(streambuf_type* __s) noexcept : _M_sbuf(__s), _M_failed(!_M_sbuf) { } ostreambuf_iterator& operator=(_CharT __c) { if (!_M_failed && _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) _M_failed = true; return *this; } ostreambuf_iterator& operator*() { return *this; } ostreambuf_iterator& operator++(int) { return *this; } ostreambuf_iterator& operator++() { return *this; } bool failed() const noexcept { return _M_failed; } ostreambuf_iterator& _M_put(const _CharT* __ws, streamsize __len) { if (__builtin_expect(!_M_failed, true) && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, false)) _M_failed = true; return *this; } }; template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type copy(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, ostreambuf_iterator<_CharT> __result) { if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) { bool __ineof; __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); if (!__ineof) __result._M_failed = true; } return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(_CharT* __first, _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(const _CharT* __first, const _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, _CharT* __result) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; if (__first._M_sbuf && !__last._M_sbuf) { streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof())) { const streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { traits_type::copy(__result, __sb->gptr(), __n); __sb->__safe_gbump(__n); __result += __n; __c = __sb->underflow(); } else { *__result++ = traits_type::to_char_type(__c); __c = __sb->snextc(); } } } return __result; } template typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, istreambuf_iterator<_CharT> >::__type find(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, const _CharT& __val) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; if (__first._M_sbuf && !__last._M_sbuf) { const int_type __ival = traits_type::to_int_type(__val); streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof()) && !traits_type::eq_int_type(__c, __ival)) { streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { const _CharT* __p = traits_type::find(__sb->gptr(), __n, __val); if (__p) __n = __p - __sb->gptr(); __sb->__safe_gbump(__n); __c = __sb->sgetc(); } else __c = __sb->snextc(); } if (!traits_type::eq_int_type(__c, traits_type::eof())) __first._M_c = __c; else __first._M_sbuf = 0; } return __first; } } # 51 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 66 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template void __convert_to_v(const char*, _Tp&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, float&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, double&, ios_base::iostate&, const __c_locale&) throw(); template<> void __convert_to_v(const char*, long double&, ios_base::iostate&, const __c_locale&) throw(); template struct __pad { static void _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen); }; template _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last); template inline ostreambuf_iterator<_CharT> __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) { __s._M_put(__ws, __len); return __s; } template inline _OutIter __write(_OutIter __s, const _CharT* __ws, int __len) { for (int __j = 0; __j < __len; __j++, ++__s) *__s = __ws[__j]; return __s; } # 144 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template class __ctype_abstract_base : public locale::facet, public ctype_base { public: typedef _CharT char_type; # 163 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 bool is(mask __m, char_type __c) const { return this->do_is(__m, __c); } # 180 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* is(const char_type *__lo, const char_type *__hi, mask *__vec) const { return this->do_is(__lo, __hi, __vec); } # 196 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* scan_is(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_is(__m, __lo, __hi); } # 212 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* scan_not(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_not(__m, __lo, __hi); } # 226 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 241 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 255 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 270 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 287 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type widen(char __c) const { return this->do_widen(__c); } # 306 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char* widen(const char* __lo, const char* __hi, char_type* __to) const { return this->do_widen(__lo, __hi, __to); } # 325 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { return this->do_narrow(__c, __dfault); } # 347 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const { return this->do_narrow(__lo, __hi, __dfault, __to); } protected: explicit __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } virtual ~__ctype_abstract_base() { } # 372 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const = 0; # 391 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const = 0; # 410 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 429 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const = 0; # 447 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type __c) const = 0; # 464 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const = 0; # 480 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type __c) const = 0; # 497 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const = 0; # 516 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const = 0; # 537 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const = 0; # 558 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char __dfault) const = 0; # 583 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const = 0; }; # 606 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template class ctype : public __ctype_abstract_base<_CharT> { public: typedef _CharT char_type; typedef typename __ctype_abstract_base<_CharT>::mask mask; static locale::id id; explicit ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } protected: virtual ~ctype(); virtual bool do_is(mask __m, char_type __c) const; virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; virtual char_type do_toupper(char_type __c) const; virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; virtual char_type do_tolower(char_type __c) const; virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; virtual char_type do_widen(char __c) const; virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; virtual char do_narrow(char_type, char __dfault) const; virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const; }; template locale::id ctype<_CharT>::id; # 675 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template<> class ctype : public locale::facet, public ctype_base { public: typedef char char_type; protected: __c_locale _M_c_locale_ctype; bool _M_del; __to_type _M_toupper; __to_type _M_tolower; const mask* _M_table; mutable char _M_widen_ok; mutable char _M_widen[1 + static_cast(-1)]; mutable char _M_narrow[1 + static_cast(-1)]; mutable char _M_narrow_ok; public: static locale::id id; static const size_t table_size = 1 + static_cast(-1); # 712 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); # 725 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, size_t __refs = 0); # 738 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 inline bool is(mask __m, char __c) const; # 753 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 inline const char* is(const char* __lo, const char* __hi, mask* __vec) const; # 767 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 inline const char* scan_is(mask __m, const char* __lo, const char* __hi) const; # 781 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 inline const char* scan_not(mask __m, const char* __lo, const char* __hi) const; # 796 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type toupper(char_type __c) const { return this->do_toupper(__c); } # 813 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } # 829 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type tolower(char_type __c) const { return this->do_tolower(__c); } # 846 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } # 866 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type widen(char __c) const { if (_M_widen_ok) return _M_widen[static_cast(__c)]; this->_M_widen_init(); return this->do_widen(__c); } # 893 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char* widen(const char* __lo, const char* __hi, char_type* __to) const { if (_M_widen_ok == 1) { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_widen_ok) _M_widen_init(); return this->do_widen(__lo, __hi, __to); } # 924 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char narrow(char_type __c, char __dfault) const { if (_M_narrow[static_cast(__c)]) return _M_narrow[static_cast(__c)]; const char __t = do_narrow(__c, __dfault); if (__t != __dfault) _M_narrow[static_cast(__c)] = __t; return __t; } # 957 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const { if (__builtin_expect(_M_narrow_ok == 1, true)) { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_narrow_ok) _M_narrow_init(); return this->do_narrow(__lo, __hi, __dfault, __to); } const mask* table() const throw() { return _M_table; } static const mask* classic_table() throw(); protected: virtual ~ctype(); # 1006 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type __c) const; # 1023 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1039 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type __c) const; # 1056 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1076 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const { return __c; } # 1099 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } # 1125 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char __dfault) const { return __c; } # 1151 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } private: void _M_narrow_init() const; void _M_widen_init() const; }; # 1176 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template<> class ctype : public __ctype_abstract_base { public: typedef wchar_t char_type; typedef wctype_t __wmask_type; protected: __c_locale _M_c_locale_ctype; bool _M_narrow_ok; char _M_narrow[128]; wint_t _M_widen[1 + static_cast(-1)]; mask _M_bit[16]; __wmask_type _M_wmask[16]; public: static locale::id id; # 1209 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit ctype(size_t __refs = 0); # 1220 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit ctype(__c_locale __cloc, size_t __refs = 0); protected: __wmask_type _M_convert_to_wmask(const mask __m) const throw(); virtual ~ctype(); # 1244 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual bool do_is(mask __m, char_type __c) const; # 1263 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; # 1281 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; # 1299 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; # 1316 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_toupper(char_type __c) const; # 1333 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; # 1349 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_tolower(char_type __c) const; # 1366 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; # 1386 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_widen(char __c) const; # 1408 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __to) const; # 1431 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char do_narrow(char_type __c, char __dfault) const; # 1457 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __to) const; void _M_initialize_ctype() throw(); }; template class ctype_byname : public ctype<_CharT> { public: typedef typename ctype<_CharT>::mask mask; explicit ctype_byname(const char* __s, size_t __refs = 0); protected: virtual ~ctype_byname() { }; }; template<> class ctype_byname : public ctype { public: explicit ctype_byname(const char* __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; template<> class ctype_byname : public ctype { public: explicit ctype_byname(const char* __s, size_t __refs = 0); protected: virtual ~ctype_byname(); }; } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/ctype_inline.h" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/ctype_inline.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { bool ctype:: is(mask __m, char __c) const { return _M_table[static_cast(__c)] & __m; } const char* ctype:: is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) *__vec++ = _M_table[static_cast(*__low++)]; return __high; } const char* ctype:: scan_is(mask __m, const char* __low, const char* __high) const { while (__low < __high && !(_M_table[static_cast(*__low)] & __m)) ++__low; return __low; } const char* ctype:: scan_not(mask __m, const char* __low, const char* __high) const { while (__low < __high && (_M_table[static_cast(*__low)] & __m) != 0) ++__low; return __low; } } # 1514 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { class __num_base { public: enum { _S_ominus, _S_oplus, _S_ox, _S_oX, _S_odigits, _S_odigits_end = _S_odigits + 16, _S_oudigits = _S_odigits_end, _S_oudigits_end = _S_oudigits + 16, _S_oe = _S_odigits + 14, _S_oE = _S_oudigits + 14, _S_oend = _S_oudigits_end }; static const char* _S_atoms_out; static const char* _S_atoms_in; enum { _S_iminus, _S_iplus, _S_ix, _S_iX, _S_izero, _S_ie = _S_izero + 14, _S_iE = _S_izero + 20, _S_iend = 26 }; static void _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); }; template struct __numpunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; const _CharT* _M_truename; size_t _M_truename_size; const _CharT* _M_falsename; size_t _M_falsename_size; _CharT _M_decimal_point; _CharT _M_thousands_sep; _CharT _M_atoms_out[__num_base::_S_oend]; _CharT _M_atoms_in[__num_base::_S_iend]; bool _M_allocated; __numpunct_cache(size_t __refs = 0) : facet(__refs), _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), _M_truename(0), _M_truename_size(0), _M_falsename(0), _M_falsename_size(0), _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), _M_allocated(false) { } ~__numpunct_cache(); void _M_cache(const locale& __loc); private: __numpunct_cache& operator=(const __numpunct_cache&); explicit __numpunct_cache(const __numpunct_cache&); }; template __numpunct_cache<_CharT>::~__numpunct_cache() { if (_M_allocated) { delete [] _M_grouping; delete [] _M_truename; delete [] _M_falsename; } } # 1642 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template class numpunct : public locale::facet { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; typedef __numpunct_cache<_CharT> __cache_type; protected: __cache_type* _M_data; public: static locale::id id; explicit numpunct(size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_numpunct(); } # 1680 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit numpunct(__cache_type* __cache, size_t __refs = 0) : facet(__refs), _M_data(__cache) { _M_initialize_numpunct(); } # 1694 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit numpunct(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_numpunct(__cloc); } # 1708 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type decimal_point() const { return this->do_decimal_point(); } # 1721 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 char_type thousands_sep() const { return this->do_thousands_sep(); } # 1752 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 string grouping() const { return this->do_grouping(); } # 1765 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 string_type truename() const { return this->do_truename(); } # 1778 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 string_type falsename() const { return this->do_falsename(); } protected: virtual ~numpunct(); # 1795 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_decimal_point() const { return _M_data->_M_decimal_point; } # 1807 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual char_type do_thousands_sep() const { return _M_data->_M_thousands_sep; } # 1820 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual string do_grouping() const { return _M_data->_M_grouping; } # 1833 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual string_type do_truename() const { return _M_data->_M_truename; } # 1846 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual string_type do_falsename() const { return _M_data->_M_falsename; } void _M_initialize_numpunct(__c_locale __cloc = 0); }; template locale::id numpunct<_CharT>::id; template<> numpunct::~numpunct(); template<> void numpunct::_M_initialize_numpunct(__c_locale __cloc); template<> numpunct::~numpunct(); template<> void numpunct::_M_initialize_numpunct(__c_locale __cloc); template class numpunct_byname : public numpunct<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit numpunct_byname(const char* __s, size_t __refs = 0) : numpunct<_CharT>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { __c_locale __tmp; this->_S_create_c_locale(__tmp, __s); this->_M_initialize_numpunct(__tmp); this->_S_destroy_c_locale(__tmp); } } protected: virtual ~numpunct_byname() { } }; # 1916 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template class num_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; static locale::id id; # 1937 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit num_get(size_t __refs = 0) : facet(__refs) { } # 1963 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 1999 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2058 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } # 2100 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { return this->do_get(__in, __end, __io, __err, __v); } protected: virtual ~num_get() { } iter_type _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, string&) const; template iter_type _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, _ValueT&) const; template typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type _M_find(const _CharT2*, size_t __len, _CharT2 __c) const { int __ret = -1; if (__len <= 10) { if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) __ret = __c - _CharT2('0'); } else { if (__c >= _CharT2('0') && __c <= _CharT2('9')) __ret = __c - _CharT2('0'); else if (__c >= _CharT2('a') && __c <= _CharT2('f')) __ret = 10 + (__c - _CharT2('a')); else if (__c >= _CharT2('A') && __c <= _CharT2('F')) __ret = 10 + (__c - _CharT2('A')); } return __ret; } template typename __gnu_cxx::__enable_if::__value, int>::__type _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const { int __ret = -1; const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); if (__q) { __ret = __q - __zero; if (__ret > 15) __ret -= 6; } return __ret; } # 2171 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, float&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, double&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long double&) const; virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, void*&) const; # 2234 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 }; template locale::id num_get<_CharT, _InIter>::id; # 2252 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 template class num_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; # 2273 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 explicit num_put(size_t __refs = 0) : facet(__refs) { } # 2291 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const { return this->do_put(__s, __io, __fill, __v); } # 2333 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, long __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, unsigned long __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, unsigned long long __v) const { return this->do_put(__s, __io, __fill, __v); } # 2396 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return this->do_put(__s, __io, __fill, __v); } iter_type put(iter_type __s, ios_base& __io, char_type __fill, long double __v) const { return this->do_put(__s, __io, __fill, __v); } # 2421 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, const void* __v) const { return this->do_put(__s, __io, __fill, __v); } protected: template iter_type _M_insert_float(iter_type, ios_base& __io, char_type __fill, char __mod, _ValueT __v) const; void _M_group_float(const char* __grouping, size_t __grouping_size, char_type __sep, const char_type* __p, char_type* __new, char_type* __cs, int& __len) const; template iter_type _M_insert_int(iter_type, ios_base& __io, char_type __fill, _ValueT __v) const; void _M_group_int(const char* __grouping, size_t __grouping_size, char_type __sep, ios_base& __io, char_type* __new, char_type* __cs, int& __len) const; void _M_pad(char_type __fill, streamsize __w, ios_base& __io, char_type* __new, const char_type* __cs, int& __len) const; virtual ~num_put() { }; # 2469 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 3 virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const; virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } virtual iter_type do_put(iter_type, ios_base&, char_type, double) const; virtual iter_type do_put(iter_type, ios_base&, char_type, long double) const; virtual iter_type do_put(iter_type, ios_base&, char_type, const void*) const; }; template locale::id num_put<_CharT, _OutIter>::id; template inline bool isspace(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::space, __c); } template inline bool isprint(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::print, __c); } template inline bool iscntrl(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::cntrl, __c); } template inline bool isupper(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::upper, __c); } template inline bool islower(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::lower, __c); } template inline bool isalpha(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::alpha, __c); } template inline bool isdigit(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::digit, __c); } template inline bool ispunct(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::punct, __c); } template inline bool isxdigit(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::xdigit, __c); } template inline bool isalnum(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::alnum, __c); } template inline bool isgraph(_CharT __c, const locale& __loc) { return use_facet >(__loc).is(ctype_base::graph, __c); } template inline _CharT toupper(_CharT __c, const locale& __loc) { return use_facet >(__loc).toupper(__c); } template inline _CharT tolower(_CharT __c, const locale& __loc) { return use_facet >(__loc).tolower(__c); } } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 1 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __use_cache { const _Facet* operator() (const locale& __loc) const; }; template struct __use_cache<__numpunct_cache<_CharT> > { const __numpunct_cache<_CharT>* operator() (const locale& __loc) const { const size_t __i = numpunct<_CharT>::id._M_id(); const locale::facet** __caches = __loc._M_impl->_M_caches; if (!__caches[__i]) { __numpunct_cache<_CharT>* __tmp = 0; try { __tmp = new __numpunct_cache<_CharT>; __tmp->_M_cache(__loc); } catch(...) { delete __tmp; throw; } __loc._M_impl->_M_install_cache(__tmp, __i); } return static_cast*>(__caches[__i]); } }; template void __numpunct_cache<_CharT>::_M_cache(const locale& __loc) { _M_allocated = true; const numpunct<_CharT>& __np = use_facet >(__loc); char* __grouping = 0; _CharT* __truename = 0; _CharT* __falsename = 0; try { _M_grouping_size = __np.grouping().size(); __grouping = new char[_M_grouping_size]; __np.grouping().copy(__grouping, _M_grouping_size); _M_grouping = __grouping; _M_use_grouping = (_M_grouping_size && static_cast(_M_grouping[0]) > 0 && (_M_grouping[0] != __gnu_cxx::__numeric_traits::__max)); _M_truename_size = __np.truename().size(); __truename = new _CharT[_M_truename_size]; __np.truename().copy(__truename, _M_truename_size); _M_truename = __truename; _M_falsename_size = __np.falsename().size(); __falsename = new _CharT[_M_falsename_size]; __np.falsename().copy(__falsename, _M_falsename_size); _M_falsename = __falsename; _M_decimal_point = __np.decimal_point(); _M_thousands_sep = __np.thousands_sep(); const ctype<_CharT>& __ct = use_facet >(__loc); __ct.widen(__num_base::_S_atoms_out, __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); __ct.widen(__num_base::_S_atoms_in, __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); } catch(...) { delete [] __grouping; delete [] __truename; delete [] __falsename; throw; } } # 138 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 __attribute__ ((__pure__)) bool __verify_grouping(const char* __grouping, size_t __grouping_size, const string& __grouping_tmp) throw (); template _InIter num_get<_CharT, _InIter>:: _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, string& __xtrc) const { typedef char_traits<_CharT> __traits_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); bool __testeof = __beg == __end; if (!__testeof) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { __xtrc += __plus ? '+' : '-'; if (++__beg != __end) __c = *__beg; else __testeof = true; } } bool __found_mantissa = false; int __sep_pos = 0; while (!__testeof) { if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero]) { if (!__found_mantissa) { __xtrc += '0'; __found_mantissa = true; } ++__sep_pos; if (++__beg != __end) __c = *__beg; else __testeof = true; } else break; } bool __found_dec = false; bool __found_sci = false; string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); const char_type* __lit_zero = __lit + __num_base::_S_izero; if (!__lc->_M_allocated) while (!__testeof) { const int __digit = _M_find(__lit_zero, 10, __c); if (__digit != -1) { __xtrc += '0' + __digit; __found_mantissa = true; } else if (__c == __lc->_M_decimal_point && !__found_dec && !__found_sci) { __xtrc += '.'; __found_dec = true; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { __xtrc += 'e'; __found_sci = true; if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if (__plus || __c == __lit[__num_base::_S_iminus]) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { if (!__found_dec && !__found_sci) { if (__sep_pos) { __found_grouping += static_cast(__sep_pos); __sep_pos = 0; } else { __xtrc.clear(); break; } } else break; } else if (__c == __lc->_M_decimal_point) { if (!__found_dec && !__found_sci) { if (__found_grouping.size()) __found_grouping += static_cast(__sep_pos); __xtrc += '.'; __found_dec = true; } else break; } else { const char_type* __q = __traits_type::find(__lit_zero, 10, __c); if (__q) { __xtrc += '0' + (__q - __lit_zero); __found_mantissa = true; ++__sep_pos; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { if (__found_grouping.size() && !__found_dec) __found_grouping += static_cast(__sep_pos); __xtrc += 'e'; __found_sci = true; if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; } if (++__beg != __end) __c = *__beg; else __testeof = true; } if (__found_grouping.size()) { if (!__found_dec && !__found_sci) __found_grouping += static_cast(__sep_pos); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err = ios_base::failbit; } return __beg; } template template _InIter num_get<_CharT, _InIter>:: _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, _ValueT& __v) const { typedef char_traits<_CharT> __traits_type; using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); const ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield; const bool __oct = __basefield == ios_base::oct; int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); bool __testeof = __beg == __end; bool __negative = false; if (!__testeof) { __c = *__beg; __negative = __c == __lit[__num_base::_S_iminus]; if ((__negative || __c == __lit[__num_base::_S_iplus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { if (++__beg != __end) __c = *__beg; else __testeof = true; } } bool __found_zero = false; int __sep_pos = 0; while (!__testeof) { if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero] && (!__found_zero || __base == 10)) { __found_zero = true; ++__sep_pos; if (__basefield == 0) __base = 8; if (__base == 8) __sep_pos = 0; } else if (__found_zero && (__c == __lit[__num_base::_S_ix] || __c == __lit[__num_base::_S_iX])) { if (__basefield == 0) __base = 16; if (__base == 16) { __found_zero = false; __sep_pos = 0; } else break; } else break; if (++__beg != __end) { __c = *__beg; if (!__found_zero) break; } else __testeof = true; } const size_t __len = (__base == 16 ? __num_base::_S_iend - __num_base::_S_izero : __base); string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); bool __testfail = false; bool __testoverflow = false; const __unsigned_type __max = (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) ? -__gnu_cxx::__numeric_traits<_ValueT>::__min : __gnu_cxx::__numeric_traits<_ValueT>::__max; const __unsigned_type __smax = __max / __base; __unsigned_type __result = 0; int __digit = 0; const char_type* __lit_zero = __lit + __num_base::_S_izero; if (!__lc->_M_allocated) while (!__testeof) { __digit = _M_find(__lit_zero, __len, __c); if (__digit == -1) break; if (__result > __smax) __testoverflow = true; else { __result *= __base; __testoverflow |= __result > __max - __digit; __result += __digit; ++__sep_pos; } if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { if (__sep_pos) { __found_grouping += static_cast(__sep_pos); __sep_pos = 0; } else { __testfail = true; break; } } else if (__c == __lc->_M_decimal_point) break; else { const char_type* __q = __traits_type::find(__lit_zero, __len, __c); if (!__q) break; __digit = __q - __lit_zero; if (__digit > 15) __digit -= 6; if (__result > __smax) __testoverflow = true; else { __result *= __base; __testoverflow |= __result > __max - __digit; __result += __digit; ++__sep_pos; } } if (++__beg != __end) __c = *__beg; else __testeof = true; } if (__found_grouping.size()) { __found_grouping += static_cast(__sep_pos); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err = ios_base::failbit; } if ((!__sep_pos && !__found_zero && !__found_grouping.size()) || __testfail) { __v = 0; __err = ios_base::failbit; } else if (__testoverflow) { if (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; else __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; __err = ios_base::failbit; } else __v = __negative ? -__result : __result; if (__testeof) __err |= ios_base::eofbit; return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { if (!(__io.flags() & ios_base::boolalpha)) { long __l = -1; __beg = _M_extract_int(__beg, __end, __io, __err, __l); if (__l == 0 || __l == 1) __v = bool(__l); else { __v = true; __err = ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; } } else { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); bool __testf = true; bool __testt = true; bool __donef = __lc->_M_falsename_size == 0; bool __donet = __lc->_M_truename_size == 0; bool __testeof = false; size_t __n = 0; while (!__donef || !__donet) { if (__beg == __end) { __testeof = true; break; } const char_type __c = *__beg; if (!__donef) __testf = __c == __lc->_M_falsename[__n]; if (!__testf && __donet) break; if (!__donet) __testt = __c == __lc->_M_truename[__n]; if (!__testt && __donef) break; if (!__testt && !__testf) break; ++__n; ++__beg; __donef = !__testf || __n >= __lc->_M_falsename_size; __donet = !__testt || __n >= __lc->_M_truename_size; } if (__testf && __n == __lc->_M_falsename_size && __n) { __v = false; if (__testt && __n == __lc->_M_truename_size) __err = ios_base::failbit; else __err = __testeof ? ios_base::eofbit : ios_base::goodbit; } else if (__testt && __n == __lc->_M_truename_size && __n) { __v = true; __err = __testeof ? ios_base::eofbit : ios_base::goodbit; } else { __v = false; __err = ios_base::failbit; if (__testeof) __err |= ios_base::eofbit; } } return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } # 732 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { typedef ios_base::fmtflags fmtflags; const fmtflags __fmt = __io.flags(); __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); typedef __gnu_cxx::__conditional_type<(sizeof(void*) <= sizeof(unsigned long)), unsigned long, unsigned long long>::__type _UIntPtrType; _UIntPtrType __ul; __beg = _M_extract_int(__beg, __end, __io, __err, __ul); __io.flags(__fmt); __v = reinterpret_cast(__ul); return __beg; } template void num_put<_CharT, _OutIter>:: _M_pad(_CharT __fill, streamsize __w, ios_base& __io, _CharT* __new, const _CharT* __cs, int& __len) const { __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs, __w, __len); __len = static_cast(__w); } template int __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, ios_base::fmtflags __flags, bool __dec) { _CharT* __buf = __bufend; if (__builtin_expect(__dec, true)) { do { *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; __v /= 10; } while (__v != 0); } else if ((__flags & ios_base::basefield) == ios_base::oct) { do { *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; __v >>= 3; } while (__v != 0); } else { const bool __uppercase = __flags & ios_base::uppercase; const int __case_offset = __uppercase ? __num_base::_S_oudigits : __num_base::_S_odigits; do { *--__buf = __lit[(__v & 0xf) + __case_offset]; __v >>= 4; } while (__v != 0); } return __bufend - __buf; } template void num_put<_CharT, _OutIter>:: _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, ios_base&, _CharT* __new, _CharT* __cs, int& __len) const { _CharT* __p = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __len); __len = __p - __new; } template template _OutIter num_put<_CharT, _OutIter>:: _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, _ValueT __v) const { using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_out; const ios_base::fmtflags __flags = __io.flags(); const int __ilen = 5 * sizeof(_ValueT); _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __ilen)); const ios_base::fmtflags __basefield = __flags & ios_base::basefield; const bool __dec = (__basefield != ios_base::oct && __basefield != ios_base::hex); const __unsigned_type __u = ((__v > 0 || !__dec) ? __unsigned_type(__v) : -__unsigned_type(__v)); int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); __cs += __ilen - __len; if (__lc->_M_use_grouping) { _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__len + 1) * 2)); _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); __cs = __cs2 + 2; } if (__builtin_expect(__dec, true)) { if (__v >= 0) { if (bool(__flags & ios_base::showpos) && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) *--__cs = __lit[__num_base::_S_oplus], ++__len; } else *--__cs = __lit[__num_base::_S_ominus], ++__len; } else if (bool(__flags & ios_base::showbase) && __v) { if (__basefield == ios_base::oct) *--__cs = __lit[__num_base::_S_odigits], ++__len; else { const bool __uppercase = __flags & ios_base::uppercase; *--__cs = __lit[__num_base::_S_ox + __uppercase]; *--__cs = __lit[__num_base::_S_odigits]; __len += 2; } } const streamsize __w = __io.width(); if (__w > static_cast(__len)) { _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __cs3, __cs, __len); __cs = __cs3; } __io.width(0); return std::__write(__s, __cs, __len); } template void num_put<_CharT, _OutIter>:: _M_group_float(const char* __grouping, size_t __grouping_size, _CharT __sep, const _CharT* __p, _CharT* __new, _CharT* __cs, int& __len) const { const int __declen = __p ? __p - __cs : __len; _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __declen); int __newlen = __p2 - __new; if (__p) { char_traits<_CharT>::copy(__p2, __p, __len - __declen); __newlen += __len - __declen; } __len = __newlen; } # 968 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 template template _OutIter num_put<_CharT, _OutIter>:: _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, _ValueT __v) const { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); const int __max_digits = __gnu_cxx::__numeric_traits<_ValueT>::__digits10; int __len; char __fbuf[16]; __num_base::_S_format_float(__io, __fbuf, __mod); int __cs_size = __max_digits * 3; char* __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); if (__len >= __cs_size) { __cs_size = __len + 1; __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); } # 1029 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 const ctype<_CharT>& __ctype = use_facet >(__loc); _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len)); __ctype.widen(__cs, __cs + __len, __ws); _CharT* __wp = 0; const char* __p = char_traits::find(__cs, __len, '.'); if (__p) { __wp = __ws + (__p - __cs); *__wp = __lc->_M_decimal_point; } if (__lc->_M_use_grouping && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' && __cs[1] >= '0' && __cs[2] >= '0'))) { _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len * 2)); streamsize __off = 0; if (__cs[0] == '-' || __cs[0] == '+') { __off = 1; __ws2[0] = __ws[0]; __len -= 1; } _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __wp, __ws2 + __off, __ws + __off, __len); __len += __off; __ws = __ws2; } const streamsize __w = __io.width(); if (__w > static_cast(__len)) { _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __ws3, __ws, __len); __ws = __ws3; } __io.width(0); return std::__write(__s, __ws, __len); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const { const ios_base::fmtflags __flags = __io.flags(); if ((__flags & ios_base::boolalpha) == 0) { const long __l = __v; __s = _M_insert_int(__s, __io, __fill, __l); } else { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __name = __v ? __lc->_M_truename : __lc->_M_falsename; int __len = __v ? __lc->_M_truename_size : __lc->_M_falsename_size; const streamsize __w = __io.width(); if (__w > static_cast(__len)) { const streamsize __plen = __w - __len; _CharT* __ps = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __plen)); char_traits<_CharT>::assign(__ps, __plen, __fill); __io.width(0); if ((__flags & ios_base::adjustfield) == ios_base::left) { __s = std::__write(__s, __name, __len); __s = std::__write(__s, __ps, __plen); } else { __s = std::__write(__s, __ps, __plen); __s = std::__write(__s, __name, __len); } return __s; } __io.width(0); __s = std::__write(__s, __name, __len); } return __s; } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return _M_insert_float(__s, __io, __fill, char(), __v); } # 1154 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, long double __v) const { return _M_insert_float(__s, __io, __fill, 'L', __v); } template _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, const void* __v) const { const ios_base::fmtflags __flags = __io.flags(); const ios_base::fmtflags __fmt = ~(ios_base::basefield | ios_base::uppercase); __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); typedef __gnu_cxx::__conditional_type<(sizeof(const void*) <= sizeof(unsigned long)), unsigned long, unsigned long long>::__type _UIntPtrType; __s = _M_insert_int(__s, __io, __fill, reinterpret_cast<_UIntPtrType>(__v)); __io.flags(__flags); return __s; } # 1191 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.tcc" 3 template void __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen) { const size_t __plen = static_cast(__newlen - __oldlen); const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; if (__adjust == ios_base::left) { _Traits::copy(__news, __olds, __oldlen); _Traits::assign(__news + __oldlen, __plen, __fill); return; } size_t __mod = 0; if (__adjust == ios_base::internal) { const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); if (__ctype.widen('-') == __olds[0] || __ctype.widen('+') == __olds[0]) { __news[0] = __olds[0]; __mod = 1; ++__news; } else if (__ctype.widen('0') == __olds[0] && __oldlen > 1 && (__ctype.widen('x') == __olds[1] || __ctype.widen('X') == __olds[1])) { __news[0] = __olds[0]; __news[1] = __olds[1]; __mod = 2; __news += 2; } } _Traits::assign(__news, __plen, __fill); _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); } template _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last) { size_t __idx = 0; size_t __ctr = 0; while (__last - __first > __gbeg[__idx] && static_cast(__gbeg[__idx]) > 0 && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) { __last -= __gbeg[__idx]; __idx < __gsize - 1 ? ++__idx : ++__ctr; } while (__first != __last) *__s++ = *__first++; while (__ctr--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } while (__idx--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } return __s; } extern template class numpunct; extern template class numpunct_byname; extern template class num_get; extern template class num_put; extern template class ctype_byname; extern template const ctype& use_facet >(const locale&); extern template const numpunct& use_facet >(const locale&); extern template const num_put& use_facet >(const locale&); extern template const num_get& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template class numpunct; extern template class numpunct_byname; extern template class num_get; extern template class num_put; extern template class ctype_byname; extern template const ctype& use_facet >(const locale&); extern template const numpunct& use_facet >(const locale&); extern template const num_put& use_facet >(const locale&); extern template const num_get& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); } # 2608 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets.h" 2 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline const _Facet& __check_facet(const _Facet* __f) { if (!__f) __throw_bad_cast(); return *__f; } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 template class basic_ios : public ios_base { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef ctype<_CharT> __ctype_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; protected: basic_ostream<_CharT, _Traits>* _M_tie; mutable char_type _M_fill; mutable bool _M_fill_init; basic_streambuf<_CharT, _Traits>* _M_streambuf; const __ctype_type* _M_ctype; const __num_put_type* _M_num_put; const __num_get_type* _M_num_get; public: operator void*() const { return this->fail() ? 0 : const_cast(this); } bool operator!() const { return this->fail(); } # 128 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 iostate rdstate() const { return _M_streambuf_state; } # 139 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 void clear(iostate __state = goodbit); void setstate(iostate __state) { this->clear(this->rdstate() | __state); } void _M_setstate(iostate __state) { _M_streambuf_state |= __state; if (this->exceptions() & __state) throw; } bool good() const { return this->rdstate() == 0; } bool eof() const { return (this->rdstate() & eofbit) != 0; } # 192 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 bool fail() const { return (this->rdstate() & (badbit | failbit)) != 0; } bool bad() const { return (this->rdstate() & badbit) != 0; } # 213 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 iostate exceptions() const { return _M_exception; } # 248 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 void exceptions(iostate __except) { _M_exception = __except; this->clear(_M_streambuf_state); } explicit basic_ios(basic_streambuf<_CharT, _Traits>* __sb) : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { this->init(__sb); } virtual ~basic_ios() { } # 286 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 basic_ostream<_CharT, _Traits>* tie() const { return _M_tie; } # 298 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 basic_ostream<_CharT, _Traits>* tie(basic_ostream<_CharT, _Traits>* __tiestr) { basic_ostream<_CharT, _Traits>* __old = _M_tie; _M_tie = __tiestr; return __old; } basic_streambuf<_CharT, _Traits>* rdbuf() const { return _M_streambuf; } # 338 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 basic_streambuf<_CharT, _Traits>* rdbuf(basic_streambuf<_CharT, _Traits>* __sb); # 352 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 basic_ios& copyfmt(const basic_ios& __rhs); char_type fill() const { if (!_M_fill_init) { _M_fill = this->widen(' '); _M_fill_init = true; } return _M_fill; } # 381 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 char_type fill(char_type __ch) { char_type __old = this->fill(); _M_fill = __ch; return __old; } # 401 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 locale imbue(const locale& __loc); # 421 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 char narrow(char_type __c, char __dfault) const { return __check_facet(_M_ctype).narrow(__c, __dfault); } # 440 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 3 char_type widen(char __c) const { return __check_facet(_M_ctype).widen(__c); } protected: basic_ios() : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { } void init(basic_streambuf<_CharT, _Traits>* __sb); void _M_cache_locale(const locale& __loc); }; } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.tcc" 1 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.tcc" 3 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void basic_ios<_CharT, _Traits>::clear(iostate __state) { if (this->rdbuf()) _M_streambuf_state = __state; else _M_streambuf_state = __state | badbit; if (this->exceptions() & this->rdstate()) __throw_ios_failure(("basic_ios::clear")); } template basic_streambuf<_CharT, _Traits>* basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) { basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; _M_streambuf = __sb; this->clear(); return __old; } template basic_ios<_CharT, _Traits>& basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) { if (this != &__rhs) { _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? _M_local_word : new _Words[__rhs._M_word_size]; _Callback_list* __cb = __rhs._M_callbacks; if (__cb) __cb->_M_add_reference(); _M_call_callbacks(erase_event); if (_M_word != _M_local_word) { delete [] _M_word; _M_word = 0; } _M_dispose_callbacks(); _M_callbacks = __cb; for (int __i = 0; __i < __rhs._M_word_size; ++__i) __words[__i] = __rhs._M_word[__i]; _M_word = __words; _M_word_size = __rhs._M_word_size; this->flags(__rhs.flags()); this->width(__rhs.width()); this->precision(__rhs.precision()); this->tie(__rhs.tie()); this->fill(__rhs.fill()); _M_ios_locale = __rhs.getloc(); _M_cache_locale(_M_ios_locale); _M_call_callbacks(copyfmt_event); this->exceptions(__rhs.exceptions()); } return *this; } template locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc) { locale __old(this->getloc()); ios_base::imbue(__loc); _M_cache_locale(__loc); if (this->rdbuf() != 0) this->rdbuf()->pubimbue(__loc); return __old; } template void basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) { ios_base::_M_init(); _M_cache_locale(_M_ios_locale); # 147 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.tcc" 3 _M_fill = _CharT(); _M_fill_init = false; _M_tie = 0; _M_exception = goodbit; _M_streambuf = __sb; _M_streambuf_state = __sb ? goodbit : badbit; } template void basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) { if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) _M_ctype = &use_facet<__ctype_type>(__loc); else _M_ctype = 0; if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) _M_num_put = &use_facet<__num_put_type>(__loc); else _M_num_put = 0; if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) _M_num_get = &use_facet<__num_get_type>(__loc); else _M_num_get = 0; } extern template class basic_ios; extern template class basic_ios; } # 474 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/basic_ios.h" 2 3 # 46 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ios" 2 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 56 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 template class basic_ostream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef ctype<_CharT> __ctype_type; # 83 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 explicit basic_ostream(__streambuf_type* __sb) { this->init(__sb); } virtual ~basic_ostream() { } class sentry; friend class sentry; # 109 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& operator<<(__ostream_type& (*__pf)(__ostream_type&)) { return __pf(*this); } __ostream_type& operator<<(__ios_type& (*__pf)(__ios_type&)) { __pf(*this); return *this; } __ostream_type& operator<<(ios_base& (*__pf) (ios_base&)) { __pf(*this); return *this; } # 166 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& operator<<(long __n) { return _M_insert(__n); } __ostream_type& operator<<(unsigned long __n) { return _M_insert(__n); } __ostream_type& operator<<(bool __n) { return _M_insert(__n); } __ostream_type& operator<<(short __n); __ostream_type& operator<<(unsigned short __n) { return _M_insert(static_cast(__n)); } __ostream_type& operator<<(int __n); __ostream_type& operator<<(unsigned int __n) { return _M_insert(static_cast(__n)); } __ostream_type& operator<<(long long __n) { return _M_insert(__n); } __ostream_type& operator<<(unsigned long long __n) { return _M_insert(__n); } __ostream_type& operator<<(double __f) { return _M_insert(__f); } __ostream_type& operator<<(float __f) { return _M_insert(static_cast(__f)); } __ostream_type& operator<<(long double __f) { return _M_insert(__f); } __ostream_type& operator<<(const void* __p) { return _M_insert(__p); } # 251 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& operator<<(__streambuf_type* __sb); # 284 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& put(char_type __c); void _M_write(const char_type* __s, streamsize __n) { const streamsize __put = this->rdbuf()->sputn(__s, __n); if (__put != __n) this->setstate(ios_base::badbit); } # 312 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& write(const char_type* __s, streamsize __n); # 325 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& flush(); # 336 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 pos_type tellp(); # 347 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& seekp(pos_type); # 359 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 __ostream_type& seekp(off_type, ios_base::seekdir); protected: basic_ostream() { this->init(0); } template __ostream_type& _M_insert(_ValueT __v); }; # 378 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 template class basic_ostream<_CharT, _Traits>::sentry { bool _M_ok; basic_ostream<_CharT, _Traits>& _M_os; public: # 397 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 explicit sentry(basic_ostream<_CharT, _Traits>& __os); # 407 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 ~sentry() { if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) { if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) _M_os.setstate(ios_base::badbit); } } # 426 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 explicit operator bool() const { return _M_ok; } }; # 449 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) { return __ostream_insert(__out, &__c, 1); } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) { return (__out << __out.widen(__c)); } template inline basic_ostream& operator<<(basic_ostream& __out, char __c) { return __ostream_insert(__out, &__c, 1); } template inline basic_ostream& operator<<(basic_ostream& __out, signed char __c) { return (__out << static_cast(__c)); } template inline basic_ostream& operator<<(basic_ostream& __out, unsigned char __c) { return (__out << static_cast(__c)); } # 491 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast(_Traits::length(__s))); return __out; } template basic_ostream<_CharT, _Traits> & operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); template inline basic_ostream& operator<<(basic_ostream& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast(_Traits::length(__s))); return __out; } template inline basic_ostream& operator<<(basic_ostream& __out, const signed char* __s) { return (__out << reinterpret_cast(__s)); } template inline basic_ostream & operator<<(basic_ostream& __out, const unsigned char* __s) { return (__out << reinterpret_cast(__s)); } # 541 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 template inline basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) { return flush(__os.put(__os.widen('\n'))); } template inline basic_ostream<_CharT, _Traits>& ends(basic_ostream<_CharT, _Traits>& __os) { return __os.put(_CharT()); } template inline basic_ostream<_CharT, _Traits>& flush(basic_ostream<_CharT, _Traits>& __os) { return __os.flush(); } # 579 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 3 template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) { return (__os << __x); } } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ostream.tcc" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ostream.tcc" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/ostream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template basic_ostream<_CharT, _Traits>::sentry:: sentry(basic_ostream<_CharT, _Traits>& __os) : _M_ok(false), _M_os(__os) { if (__os.tie() && __os.good()) __os.tie()->flush(); if (__os.good()) _M_ok = true; else __os.setstate(ios_base::failbit); } template template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: _M_insert(_ValueT __v) { sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const __num_put_type& __np = __check_facet(this->_M_num_put); if (__np.put(*this, *this, this->fill(), __v).failed()) __err |= ios_base::badbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(short __n) { const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast(static_cast(__n))); else return _M_insert(static_cast(__n)); } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(int __n) { const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast(static_cast(__n))); else return _M_insert(static_cast(__n)); } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(__streambuf_type* __sbin) { ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this); if (__cerb && __sbin) { try { if (!__copy_streambufs(__sbin, this->rdbuf())) __err |= ios_base::failbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::failbit); } } else if (!__sbin) __err |= ios_base::badbit; if (__err) this->setstate(__err); return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: put(char_type __c) { sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: write(const _CharT* __s, streamsize __n) { sentry __cerb(*this); if (__cerb) { try { _M_write(__s, __n); } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } } return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: flush() { ios_base::iostate __err = ios_base::goodbit; try { if (this->rdbuf() && this->rdbuf()->pubsync() == -1) __err |= ios_base::badbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template typename basic_ostream<_CharT, _Traits>::pos_type basic_ostream<_CharT, _Traits>:: tellp() { pos_type __ret = pos_type(-1); try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } return __ret; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(pos_type __pos) { ios_base::iostate __err = ios_base::goodbit; try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::out); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(off_type __off, ios_base::seekdir __dir) { ios_base::iostate __err = ios_base::goodbit; try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::out); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } template basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else { const size_t __clen = char_traits::length(__s); try { struct __ptr_guard { _CharT *__p; __ptr_guard (_CharT *__ip): __p(__ip) { } ~__ptr_guard() { delete[] __p; } _CharT* __get() { return __p; } } __pg (new _CharT[__clen]); _CharT *__ws = __pg.__get(); for (size_t __i = 0; __i < __clen; ++__i) __ws[__i] = __out.widen(__s[__i]); __ostream_insert(__out, __ws, __clen); } catch(__cxxabiv1::__forced_unwind&) { __out._M_setstate(ios_base::badbit); throw; } catch(...) { __out._M_setstate(ios_base::badbit); } } return __out; } extern template class basic_ostream; extern template ostream& endl(ostream&); extern template ostream& ends(ostream&); extern template ostream& flush(ostream&); extern template ostream& operator<<(ostream&, char); extern template ostream& operator<<(ostream&, unsigned char); extern template ostream& operator<<(ostream&, signed char); extern template ostream& operator<<(ostream&, const char*); extern template ostream& operator<<(ostream&, const unsigned char*); extern template ostream& operator<<(ostream&, const signed char*); extern template ostream& ostream::_M_insert(long); extern template ostream& ostream::_M_insert(unsigned long); extern template ostream& ostream::_M_insert(bool); extern template ostream& ostream::_M_insert(long long); extern template ostream& ostream::_M_insert(unsigned long long); extern template ostream& ostream::_M_insert(double); extern template ostream& ostream::_M_insert(long double); extern template ostream& ostream::_M_insert(const void*); extern template class basic_ostream; extern template wostream& endl(wostream&); extern template wostream& ends(wostream&); extern template wostream& flush(wostream&); extern template wostream& operator<<(wostream&, wchar_t); extern template wostream& operator<<(wostream&, char); extern template wostream& operator<<(wostream&, const wchar_t*); extern template wostream& operator<<(wostream&, const char*); extern template wostream& wostream::_M_insert(long); extern template wostream& wostream::_M_insert(unsigned long); extern template wostream& wostream::_M_insert(bool); extern template wostream& wostream::_M_insert(long long); extern template wostream& wostream::_M_insert(unsigned long long); extern template wostream& wostream::_M_insert(double); extern template wostream& wostream::_M_insert(long double); extern template wostream& wostream::_M_insert(const void*); } # 589 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ostream" 2 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iostream" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 56 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 template class basic_istream : virtual public basic_ios<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; typedef ctype<_CharT> __ctype_type; protected: streamsize _M_gcount; public: # 92 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 explicit basic_istream(__streambuf_type* __sb) : _M_gcount(streamsize(0)) { this->init(__sb); } virtual ~basic_istream() { _M_gcount = streamsize(0); } class sentry; friend class sentry; # 121 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& operator>>(__istream_type& (*__pf)(__istream_type&)) { return __pf(*this); } __istream_type& operator>>(__ios_type& (*__pf)(__ios_type&)) { __pf(*this); return *this; } __istream_type& operator>>(ios_base& (*__pf)(ios_base&)) { __pf(*this); return *this; } # 168 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& operator>>(bool& __n) { return _M_extract(__n); } __istream_type& operator>>(short& __n); __istream_type& operator>>(unsigned short& __n) { return _M_extract(__n); } __istream_type& operator>>(int& __n); __istream_type& operator>>(unsigned int& __n) { return _M_extract(__n); } __istream_type& operator>>(long& __n) { return _M_extract(__n); } __istream_type& operator>>(unsigned long& __n) { return _M_extract(__n); } __istream_type& operator>>(long long& __n) { return _M_extract(__n); } __istream_type& operator>>(unsigned long long& __n) { return _M_extract(__n); } __istream_type& operator>>(float& __f) { return _M_extract(__f); } __istream_type& operator>>(double& __f) { return _M_extract(__f); } __istream_type& operator>>(long double& __f) { return _M_extract(__f); } __istream_type& operator>>(void*& __p) { return _M_extract(__p); } # 240 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& operator>>(__streambuf_type* __sb); # 250 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 streamsize gcount() const { return _M_gcount; } # 282 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 int_type get(); # 296 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& get(char_type& __c); # 323 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& get(char_type* __s, streamsize __n, char_type __delim); # 334 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& get(char_type* __s, streamsize __n) { return this->get(__s, __n, this->widen('\n')); } # 357 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& get(__streambuf_type& __sb, char_type __delim); # 367 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& get(__streambuf_type& __sb) { return this->get(__sb, this->widen('\n')); } # 396 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& getline(char_type* __s, streamsize __n, char_type __delim); # 407 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& getline(char_type* __s, streamsize __n) { return this->getline(__s, __n, this->widen('\n')); } # 431 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& ignore(streamsize __n, int_type __delim); __istream_type& ignore(streamsize __n); __istream_type& ignore(); # 448 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 int_type peek(); # 466 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& read(char_type* __s, streamsize __n); # 485 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 streamsize readsome(char_type* __s, streamsize __n); # 502 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& putback(char_type __c); # 518 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& unget(); # 536 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 int sync(); # 551 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 pos_type tellg(); # 566 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& seekg(pos_type); # 582 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 __istream_type& seekg(off_type, ios_base::seekdir); protected: basic_istream() : _M_gcount(streamsize(0)) { this->init(0); } template __istream_type& _M_extract(_ValueT& __v); }; template<> basic_istream& basic_istream:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream& basic_istream:: ignore(streamsize __n); template<> basic_istream& basic_istream:: ignore(streamsize __n, int_type __delim); template<> basic_istream& basic_istream:: getline(char_type* __s, streamsize __n, char_type __delim); template<> basic_istream& basic_istream:: ignore(streamsize __n); template<> basic_istream& basic_istream:: ignore(streamsize __n, int_type __delim); # 637 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 template class basic_istream<_CharT, _Traits>::sentry { bool _M_ok; public: typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef typename _Traits::int_type __int_type; # 673 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); # 684 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 explicit operator bool() const { return _M_ok; } }; # 703 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); template inline basic_istream& operator>>(basic_istream& __in, unsigned char& __c) { return (__in >> reinterpret_cast(__c)); } template inline basic_istream& operator>>(basic_istream& __in, signed char& __c) { return (__in >> reinterpret_cast(__c)); } # 745 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); template<> basic_istream& operator>>(basic_istream& __in, char* __s); template inline basic_istream& operator>>(basic_istream& __in, unsigned char* __s) { return (__in >> reinterpret_cast(__s)); } template inline basic_istream& operator>>(basic_istream& __in, signed char* __s) { return (__in >> reinterpret_cast(__s)); } # 773 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 template class basic_iostream : public basic_istream<_CharT, _Traits>, public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) : __istream_type(__sb), __ostream_type(__sb) { } virtual ~basic_iostream() { } protected: basic_iostream() : __istream_type(), __ostream_type() { } }; # 834 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 template basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __is); # 850 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 3 template inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) { return (__is >> __x); } } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/istream.tcc" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/istream.tcc" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/istream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template basic_istream<_CharT, _Traits>::sentry:: sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) { ios_base::iostate __err = ios_base::goodbit; if (__in.good()) { if (__in.tie()) __in.tie()->flush(); if (!__noskip && bool(__in.flags() & ios_base::skipws)) { const __int_type __eof = traits_type::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); const __ctype_type& __ct = __check_facet(__in._M_ctype); while (!traits_type::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, traits_type::to_char_type(__c))) __c = __sb->snextc(); if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } } if (__in.good() && __err == ios_base::goodbit) _M_ok = true; else { __err |= ios_base::failbit; __in.setstate(__err); } } template template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: _M_extract(_ValueT& __v) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __v); } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(short& __n) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { long __l; const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __l); if (__l < __gnu_cxx::__numeric_traits::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__min; } else if (__l > __gnu_cxx::__numeric_traits::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__max; } else __n = short(__l); } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(int& __n) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { long __l; const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __l); if (__l < __gnu_cxx::__numeric_traits::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__min; } else if (__l > __gnu_cxx::__numeric_traits::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits::__max; } else __n = int(__l); } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(__streambuf_type* __sbout) { ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, false); if (__cerb && __sbout) { try { bool __ineof; if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) __err |= ios_base::failbit; if (__ineof) __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::failbit); throw; } catch(...) { this->_M_setstate(ios_base::failbit); } } else if (!__sbout) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: get(void) { const int_type __eof = traits_type::eof(); int_type __c = __eof; _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { try { __c = this->rdbuf()->sbumpc(); if (!traits_type::eq_int_type(__c, __eof)) _M_gcount = 1; else __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return __c; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type& __c) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { try { const int_type __cb = this->rdbuf()->sbumpc(); if (!traits_type::eq_int_type(__cb, traits_type::eof())) { _M_gcount = 1; __c = traits_type::to_char_type(__cb); } else __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); ++_M_gcount; __c = __sb->snextc(); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(__streambuf_type& __sb, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __this_sb = this->rdbuf(); int_type __c = __this_sb->sgetc(); char_type __c2 = traits_type::to_char_type(__c); while (!traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim) && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) { ++_M_gcount; __c = __this_sb->snextc(); __c2 = traits_type::to_char_type(__c); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: getline(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { try { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); __c = __sb->snextc(); ++_M_gcount; } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else { if (traits_type::eq_int_type(__c, __idelim)) { __sb->sbumpc(); ++_M_gcount; } else __err |= ios_base::failbit; } } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } } if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(void) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) __err |= ios_base::eofbit; else _M_gcount = 1; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::goodbit; try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); # 515 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/istream.tcc" 3 bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == __gnu_cxx::__numeric_traits::__max && !traits_type::eq_int_type(__c, __eof)) { _M_gcount = __gnu_cxx::__numeric_traits::__min; __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits::__max; if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n, int_type __delim) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::goodbit; try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == __gnu_cxx::__numeric_traits::__max && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { _M_gcount = __gnu_cxx::__numeric_traits::__min; __large_ignore = true; } else break; } if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits::__max; if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else if (traits_type::eq_int_type(__c, __delim)) { if (_M_gcount < __gnu_cxx::__numeric_traits::__max) ++_M_gcount; __sb->sbumpc(); } } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: peek(void) { int_type __c = traits_type::eof(); _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { __c = this->rdbuf()->sgetc(); if (traits_type::eq_int_type(__c, traits_type::eof())) __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __c; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: read(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { _M_gcount = this->rdbuf()->sgetn(__s, __n); if (_M_gcount != __n) __err |= (ios_base::eofbit | ios_base::failbit); } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template streamsize basic_istream<_CharT, _Traits>:: readsome(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const streamsize __num = this->rdbuf()->in_avail(); if (__num > 0) _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); else if (__num == -1) __err |= ios_base::eofbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return _M_gcount; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: putback(char_type __c) { _M_gcount = 0; this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) __err |= ios_base::badbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: unget(void) { _M_gcount = 0; this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sungetc(), __eof)) __err |= ios_base::badbit; } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template int basic_istream<_CharT, _Traits>:: sync(void) { int __ret = -1; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { __streambuf_type* __sb = this->rdbuf(); if (__sb) { if (__sb->pubsync() == -1) __err |= ios_base::badbit; else __ret = 0; } } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __ret; } template typename basic_istream<_CharT, _Traits>::pos_type basic_istream<_CharT, _Traits>:: tellg(void) { pos_type __ret = pos_type(-1); sentry __cerb(*this, true); if (__cerb) { try { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } } return __ret; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(pos_type __pos) { this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::in); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(off_type __off, ios_base::seekdir __dir) { this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { if (!this->fail()) { const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::in); if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } catch(__cxxabiv1::__forced_unwind&) { this->_M_setstate(ios_base::badbit); throw; } catch(...) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::int_type __int_type; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; try { const __int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) __c = _Traits::to_char_type(__cb); else __err |= (ios_base::eofbit | ios_base::failbit); } catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); throw; } catch(...) { __in._M_setstate(ios_base::badbit); } if (__err) __in.setstate(__err); } return __in; } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef typename _Traits::int_type int_type; typedef _CharT char_type; typedef ctype<_CharT> __ctype_type; streamsize __extracted = 0; ios_base::iostate __err = ios_base::goodbit; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { try { streamsize __num = __in.width(); if (__num <= 0) __num = __gnu_cxx::__numeric_traits::__max; const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); int_type __c = __sb->sgetc(); while (__extracted < __num - 1 && !_Traits::eq_int_type(__c, __eof) && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) { *__s++ = _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; *__s = char_type(); __in.width(0); } catch(__cxxabiv1::__forced_unwind&) { __in._M_setstate(ios_base::badbit); throw; } catch(...) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) __err |= ios_base::failbit; if (__err) __in.setstate(__err); return __in; } template basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __in) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef typename __istream_type::int_type __int_type; typedef ctype<_CharT> __ctype_type; const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); while (!_Traits::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) __c = __sb->snextc(); if (_Traits::eq_int_type(__c, __eof)) __in.setstate(ios_base::eofbit); return __in; } extern template class basic_istream; extern template istream& ws(istream&); extern template istream& operator>>(istream&, char&); extern template istream& operator>>(istream&, char*); extern template istream& operator>>(istream&, unsigned char&); extern template istream& operator>>(istream&, signed char&); extern template istream& operator>>(istream&, unsigned char*); extern template istream& operator>>(istream&, signed char*); extern template istream& istream::_M_extract(unsigned short&); extern template istream& istream::_M_extract(unsigned int&); extern template istream& istream::_M_extract(long&); extern template istream& istream::_M_extract(unsigned long&); extern template istream& istream::_M_extract(bool&); extern template istream& istream::_M_extract(long long&); extern template istream& istream::_M_extract(unsigned long long&); extern template istream& istream::_M_extract(float&); extern template istream& istream::_M_extract(double&); extern template istream& istream::_M_extract(long double&); extern template istream& istream::_M_extract(void*&); extern template class basic_iostream; extern template class basic_istream; extern template wistream& ws(wistream&); extern template wistream& operator>>(wistream&, wchar_t&); extern template wistream& operator>>(wistream&, wchar_t*); extern template wistream& wistream::_M_extract(unsigned short&); extern template wistream& wistream::_M_extract(unsigned int&); extern template wistream& wistream::_M_extract(long&); extern template wistream& wistream::_M_extract(unsigned long&); extern template wistream& wistream::_M_extract(bool&); extern template wistream& wistream::_M_extract(long long&); extern template wistream& wistream::_M_extract(unsigned long long&); extern template wistream& wistream::_M_extract(float&); extern template wistream& wistream::_M_extract(double&); extern template wistream& wistream::_M_extract(long double&); extern template wistream& wistream::_M_extract(void*&); extern template class basic_iostream; } # 860 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/istream" 2 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iostream" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iostream" 3 extern istream cin; extern ostream cout; extern ostream cerr; extern ostream clog; extern wistream wcin; extern wostream wcout; extern wostream wcerr; extern wostream wclog; static ios_base::Init __ioinit; } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" namespace CGAL { void assertion_fail ( const char*, const char*, int, const char* = "") __attribute__ ((__noreturn__)); void precondition_fail ( const char*, const char*, int, const char* = "") __attribute__ ((__noreturn__)); void postcondition_fail ( const char*, const char*, int, const char* = "") __attribute__ ((__noreturn__)); void warning_fail( const char*, const char*, int, const char* = ""); template < typename T > class Uncertain; inline bool possibly(bool b); inline bool possibly(Uncertain c); # 307 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/enum.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/enum.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Same_uncertainty.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Same_uncertainty.h" namespace CGAL { template < typename T1, typename T2 > struct Same_uncertainty { typedef T1 type; }; template < typename T > class Uncertain; template < typename T > struct Sgn; template < typename T1, typename T2 > struct Same_uncertainty < T1, Uncertain > { typedef Uncertain type; }; template < typename T1, typename NT > struct Same_uncertainty_nt : Same_uncertainty ::result_type > {}; } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/enum.h" 2 namespace CGAL { enum Sign { NEGATIVE = -1, ZERO = 0, POSITIVE = 1, RIGHT_TURN = -1, LEFT_TURN = 1, CLOCKWISE = -1, COUNTERCLOCKWISE = 1, COLLINEAR = 0, COPLANAR = 0, DEGENERATE = 0, ON_NEGATIVE_SIDE = -1, ON_ORIENTED_BOUNDARY = 0, ON_POSITIVE_SIDE = 1, SMALLER = -1, EQUAL = 0, LARGER = 1 }; typedef Sign Orientation; typedef Sign Oriented_side; typedef Sign Comparison_result; enum Bounded_side { ON_UNBOUNDED_SIDE = -1, ON_BOUNDARY, ON_BOUNDED_SIDE }; enum Angle { OBTUSE = -1, RIGHT, ACUTE }; template inline T opposite(const T& t) { return -t; } inline Sign operator-(Sign o) { return static_cast( - static_cast(o)); } inline Bounded_side opposite(Bounded_side bs) { return static_cast( - static_cast(bs)); } inline Angle opposite(Angle a) { return static_cast( - static_cast(a)); } inline Sign operator* (Sign s1, Sign s2) { return static_cast (static_cast (s1) * static_cast (s2)); } # 112 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/enum.h" template < typename T, typename U > inline T enum_cast(const U& u) { return static_cast(u); } } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Profile_counter.h" 1 # 53 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Profile_counter.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/locale" 1 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/locale" 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/locale" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ctime" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ctime" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ctime" 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ctime" 3 namespace std { using ::clock_t; using ::time_t; using ::tm; using ::clock; using ::difftime; using ::mktime; using ::time; using ::asctime; using ::ctime; using ::gmtime; using ::localtime; using ::strftime; } # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 52 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 class time_base { public: enum dateorder { no_order, dmy, mdy, ymd, ydm }; }; template struct __timepunct_cache : public locale::facet { static const _CharT* _S_timezones[14]; const _CharT* _M_date_format; const _CharT* _M_date_era_format; const _CharT* _M_time_format; const _CharT* _M_time_era_format; const _CharT* _M_date_time_format; const _CharT* _M_date_time_era_format; const _CharT* _M_am; const _CharT* _M_pm; const _CharT* _M_am_pm_format; const _CharT* _M_day1; const _CharT* _M_day2; const _CharT* _M_day3; const _CharT* _M_day4; const _CharT* _M_day5; const _CharT* _M_day6; const _CharT* _M_day7; const _CharT* _M_aday1; const _CharT* _M_aday2; const _CharT* _M_aday3; const _CharT* _M_aday4; const _CharT* _M_aday5; const _CharT* _M_aday6; const _CharT* _M_aday7; const _CharT* _M_month01; const _CharT* _M_month02; const _CharT* _M_month03; const _CharT* _M_month04; const _CharT* _M_month05; const _CharT* _M_month06; const _CharT* _M_month07; const _CharT* _M_month08; const _CharT* _M_month09; const _CharT* _M_month10; const _CharT* _M_month11; const _CharT* _M_month12; const _CharT* _M_amonth01; const _CharT* _M_amonth02; const _CharT* _M_amonth03; const _CharT* _M_amonth04; const _CharT* _M_amonth05; const _CharT* _M_amonth06; const _CharT* _M_amonth07; const _CharT* _M_amonth08; const _CharT* _M_amonth09; const _CharT* _M_amonth10; const _CharT* _M_amonth11; const _CharT* _M_amonth12; bool _M_allocated; __timepunct_cache(size_t __refs = 0) : facet(__refs), _M_date_format(0), _M_date_era_format(0), _M_time_format(0), _M_time_era_format(0), _M_date_time_format(0), _M_date_time_era_format(0), _M_am(0), _M_pm(0), _M_am_pm_format(0), _M_day1(0), _M_day2(0), _M_day3(0), _M_day4(0), _M_day5(0), _M_day6(0), _M_day7(0), _M_aday1(0), _M_aday2(0), _M_aday3(0), _M_aday4(0), _M_aday5(0), _M_aday6(0), _M_aday7(0), _M_month01(0), _M_month02(0), _M_month03(0), _M_month04(0), _M_month05(0), _M_month06(0), _M_month07(0), _M_month08(0), _M_month09(0), _M_month10(0), _M_month11(0), _M_month12(0), _M_amonth01(0), _M_amonth02(0), _M_amonth03(0), _M_amonth04(0), _M_amonth05(0), _M_amonth06(0), _M_amonth07(0), _M_amonth08(0), _M_amonth09(0), _M_amonth10(0), _M_amonth11(0), _M_amonth12(0), _M_allocated(false) { } ~__timepunct_cache(); void _M_cache(const locale& __loc); private: __timepunct_cache& operator=(const __timepunct_cache&); explicit __timepunct_cache(const __timepunct_cache&); }; template __timepunct_cache<_CharT>::~__timepunct_cache() { if (_M_allocated) { } } template<> const char* __timepunct_cache::_S_timezones[14]; template<> const wchar_t* __timepunct_cache::_S_timezones[14]; template const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; template class __timepunct : public locale::facet { public: typedef _CharT __char_type; typedef basic_string<_CharT> __string_type; typedef __timepunct_cache<_CharT> __cache_type; protected: __cache_type* _M_data; __c_locale _M_c_locale_timepunct; const char* _M_name_timepunct; public: static locale::id id; explicit __timepunct(size_t __refs = 0); explicit __timepunct(__cache_type* __cache, size_t __refs = 0); # 210 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); void _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, const tm* __tm) const throw (); void _M_date_formats(const _CharT** __date) const { __date[0] = _M_data->_M_date_format; __date[1] = _M_data->_M_date_era_format; } void _M_time_formats(const _CharT** __time) const { __time[0] = _M_data->_M_time_format; __time[1] = _M_data->_M_time_era_format; } void _M_date_time_formats(const _CharT** __dt) const { __dt[0] = _M_data->_M_date_time_format; __dt[1] = _M_data->_M_date_time_era_format; } void _M_am_pm_format(const _CharT* __ampm) const { __ampm = _M_data->_M_am_pm_format; } void _M_am_pm(const _CharT** __ampm) const { __ampm[0] = _M_data->_M_am; __ampm[1] = _M_data->_M_pm; } void _M_days(const _CharT** __days) const { __days[0] = _M_data->_M_day1; __days[1] = _M_data->_M_day2; __days[2] = _M_data->_M_day3; __days[3] = _M_data->_M_day4; __days[4] = _M_data->_M_day5; __days[5] = _M_data->_M_day6; __days[6] = _M_data->_M_day7; } void _M_days_abbreviated(const _CharT** __days) const { __days[0] = _M_data->_M_aday1; __days[1] = _M_data->_M_aday2; __days[2] = _M_data->_M_aday3; __days[3] = _M_data->_M_aday4; __days[4] = _M_data->_M_aday5; __days[5] = _M_data->_M_aday6; __days[6] = _M_data->_M_aday7; } void _M_months(const _CharT** __months) const { __months[0] = _M_data->_M_month01; __months[1] = _M_data->_M_month02; __months[2] = _M_data->_M_month03; __months[3] = _M_data->_M_month04; __months[4] = _M_data->_M_month05; __months[5] = _M_data->_M_month06; __months[6] = _M_data->_M_month07; __months[7] = _M_data->_M_month08; __months[8] = _M_data->_M_month09; __months[9] = _M_data->_M_month10; __months[10] = _M_data->_M_month11; __months[11] = _M_data->_M_month12; } void _M_months_abbreviated(const _CharT** __months) const { __months[0] = _M_data->_M_amonth01; __months[1] = _M_data->_M_amonth02; __months[2] = _M_data->_M_amonth03; __months[3] = _M_data->_M_amonth04; __months[4] = _M_data->_M_amonth05; __months[5] = _M_data->_M_amonth06; __months[6] = _M_data->_M_amonth07; __months[7] = _M_data->_M_amonth08; __months[8] = _M_data->_M_amonth09; __months[9] = _M_data->_M_amonth10; __months[10] = _M_data->_M_amonth11; __months[11] = _M_data->_M_amonth12; } protected: virtual ~__timepunct(); void _M_initialize_timepunct(__c_locale __cloc = 0); }; template locale::id __timepunct<_CharT>::id; template<> void __timepunct::_M_initialize_timepunct(__c_locale __cloc); template<> void __timepunct::_M_put(char*, size_t, const char*, const tm*) const throw (); template<> void __timepunct::_M_initialize_timepunct(__c_locale __cloc); template<> void __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, const tm*) const throw (); } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/time_members.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/time_members.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template __timepunct<_CharT>::__timepunct(size_t __refs) : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), _M_name_timepunct(_S_get_c_name()) { _M_initialize_timepunct(); } template __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0), _M_name_timepunct(_S_get_c_name()) { _M_initialize_timepunct(); } template __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, size_t __refs) : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), _M_name_timepunct(0) { if (__builtin_strcmp(__s, _S_get_c_name()) != 0) { const size_t __len = __builtin_strlen(__s) + 1; char* __tmp = new char[__len]; __builtin_memcpy(__tmp, __s, __len); _M_name_timepunct = __tmp; } else _M_name_timepunct = _S_get_c_name(); try { _M_initialize_timepunct(__cloc); } catch(...) { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; throw; } } template __timepunct<_CharT>::~__timepunct() { if (_M_name_timepunct != _S_get_c_name()) delete [] _M_name_timepunct; delete _M_data; _S_destroy_c_locale(_M_c_locale_timepunct); } } # 349 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 367 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template class time_get : public locale::facet, public time_base { public: typedef _CharT char_type; typedef _InIter iter_type; typedef basic_string<_CharT> __string_type; static locale::id id; # 389 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit time_get(size_t __refs = 0) : facet (__refs) { } # 406 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 dateorder date_order() const { return this->do_date_order(); } # 430 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type get_time(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_time(__beg, __end, __io, __err, __tm); } # 455 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type get_date(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_date(__beg, __end, __io, __err, __tm); } # 483 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type get_weekday(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } # 512 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type get_monthname(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } # 538 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type get_year(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { return this->do_get_year(__beg, __end, __io, __err, __tm); } protected: virtual ~time_get() { } # 558 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual dateorder do_date_order() const; # 576 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_get_time(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; # 595 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_get_date(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; # 614 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_get_weekday(iter_type __beg, iter_type __end, ios_base&, ios_base::iostate& __err, tm* __tm) const; # 633 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_get_monthname(iter_type __beg, iter_type __end, ios_base&, ios_base::iostate& __err, tm* __tm) const; # 652 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_get_year(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const; iter_type _M_extract_num(iter_type __beg, iter_type __end, int& __member, int __min, int __max, size_t __len, ios_base& __io, ios_base::iostate& __err) const; iter_type _M_extract_name(iter_type __beg, iter_type __end, int& __member, const _CharT** __names, size_t __indexlen, ios_base& __io, ios_base::iostate& __err) const; iter_type _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, const _CharT** __names, size_t __indexlen, ios_base& __io, ios_base::iostate& __err) const; iter_type _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm, const _CharT* __format) const; }; template locale::id time_get<_CharT, _InIter>::id; template class time_get_byname : public time_get<_CharT, _InIter> { public: typedef _CharT char_type; typedef _InIter iter_type; explicit time_get_byname(const char*, size_t __refs = 0) : time_get<_CharT, _InIter>(__refs) { } protected: virtual ~time_get_byname() { } }; # 714 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template class time_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; static locale::id id; # 735 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit time_put(size_t __refs = 0) : facet(__refs) { } # 754 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, const _CharT* __beg, const _CharT* __end) const; # 774 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, char __format, char __mod = 0) const { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } protected: virtual ~time_put() { } # 801 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, char __format, char __mod) const; }; template locale::id time_put<_CharT, _OutIter>::id; template class time_put_byname : public time_put<_CharT, _OutIter> { public: typedef _CharT char_type; typedef _OutIter iter_type; explicit time_put_byname(const char*, size_t __refs = 0) : time_put<_CharT, _OutIter>(__refs) { }; protected: virtual ~time_put_byname() { } }; # 840 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 class money_base { public: enum part { none, space, symbol, sign, value }; struct pattern { char field[4]; }; static const pattern _S_default_pattern; enum { _S_minus, _S_zero, _S_end = 11 }; static const char* _S_atoms; __attribute__ ((__const__)) static pattern _S_construct_pattern(char __precedes, char __space, char __posn) throw (); }; template struct __moneypunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; _CharT _M_decimal_point; _CharT _M_thousands_sep; const _CharT* _M_curr_symbol; size_t _M_curr_symbol_size; const _CharT* _M_positive_sign; size_t _M_positive_sign_size; const _CharT* _M_negative_sign; size_t _M_negative_sign_size; int _M_frac_digits; money_base::pattern _M_pos_format; money_base::pattern _M_neg_format; _CharT _M_atoms[money_base::_S_end]; bool _M_allocated; __moneypunct_cache(size_t __refs = 0) : facet(__refs), _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), _M_curr_symbol(0), _M_curr_symbol_size(0), _M_positive_sign(0), _M_positive_sign_size(0), _M_negative_sign(0), _M_negative_sign_size(0), _M_frac_digits(0), _M_pos_format(money_base::pattern()), _M_neg_format(money_base::pattern()), _M_allocated(false) { } ~__moneypunct_cache(); void _M_cache(const locale& __loc); private: __moneypunct_cache& operator=(const __moneypunct_cache&); explicit __moneypunct_cache(const __moneypunct_cache&); }; template __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() { if (_M_allocated) { delete [] _M_grouping; delete [] _M_curr_symbol; delete [] _M_positive_sign; delete [] _M_negative_sign; } } # 933 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template class moneypunct : public locale::facet, public money_base { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; typedef __moneypunct_cache<_CharT, _Intl> __cache_type; private: __cache_type* _M_data; public: static const bool intl = _Intl; static locale::id id; # 962 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit moneypunct(size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_moneypunct(); } # 975 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit moneypunct(__cache_type* __cache, size_t __refs = 0) : facet(__refs), _M_data(__cache) { _M_initialize_moneypunct(); } # 990 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_moneypunct(__cloc, __s); } # 1004 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 char_type decimal_point() const { return this->do_decimal_point(); } # 1017 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 char_type thousands_sep() const { return this->do_thousands_sep(); } # 1047 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 string grouping() const { return this->do_grouping(); } # 1060 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 string_type curr_symbol() const { return this->do_curr_symbol(); } # 1077 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 string_type positive_sign() const { return this->do_positive_sign(); } # 1094 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 string_type negative_sign() const { return this->do_negative_sign(); } # 1110 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 int frac_digits() const { return this->do_frac_digits(); } # 1146 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 pattern pos_format() const { return this->do_pos_format(); } pattern neg_format() const { return this->do_neg_format(); } protected: virtual ~moneypunct(); # 1168 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual char_type do_decimal_point() const { return _M_data->_M_decimal_point; } # 1180 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual char_type do_thousands_sep() const { return _M_data->_M_thousands_sep; } # 1193 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual string do_grouping() const { return _M_data->_M_grouping; } # 1206 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual string_type do_curr_symbol() const { return _M_data->_M_curr_symbol; } # 1219 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual string_type do_positive_sign() const { return _M_data->_M_positive_sign; } # 1232 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual string_type do_negative_sign() const { return _M_data->_M_negative_sign; } # 1246 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual int do_frac_digits() const { return _M_data->_M_frac_digits; } # 1260 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual pattern do_pos_format() const { return _M_data->_M_pos_format; } # 1274 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual pattern do_neg_format() const { return _M_data->_M_neg_format; } void _M_initialize_moneypunct(__c_locale __cloc = 0, const char* __name = 0); }; template locale::id moneypunct<_CharT, _Intl>::id; template const bool moneypunct<_CharT, _Intl>::intl; template<> moneypunct::~moneypunct(); template<> moneypunct::~moneypunct(); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template<> moneypunct::~moneypunct(); template<> moneypunct::~moneypunct(); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template<> void moneypunct::_M_initialize_moneypunct(__c_locale, const char*); template class moneypunct_byname : public moneypunct<_CharT, _Intl> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; static const bool intl = _Intl; explicit moneypunct_byname(const char* __s, size_t __refs = 0) : moneypunct<_CharT, _Intl>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { __c_locale __tmp; this->_S_create_c_locale(__tmp, __s); this->_M_initialize_moneypunct(__tmp); this->_S_destroy_c_locale(__tmp); } } protected: virtual ~moneypunct_byname() { } }; template const bool moneypunct_byname<_CharT, _Intl>::intl; # 1369 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template class money_get : public locale::facet { public: typedef _CharT char_type; typedef _InIter iter_type; typedef basic_string<_CharT> string_type; static locale::id id; # 1391 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit money_get(size_t __refs = 0) : facet(__refs) { } # 1421 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, long double& __units) const { return this->do_get(__s, __end, __intl, __io, __err, __units); } # 1452 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, string_type& __digits) const { return this->do_get(__s, __end, __intl, __io, __err, __digits); } protected: virtual ~money_get() { } # 1475 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, long double& __units) const; # 1487 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, string_type& __digits) const; # 1498 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template iter_type _M_extract(iter_type __s, iter_type __end, ios_base& __io, ios_base::iostate& __err, string& __digits) const; }; template locale::id money_get<_CharT, _InIter>::id; # 1520 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template class money_put : public locale::facet { public: typedef _CharT char_type; typedef _OutIter iter_type; typedef basic_string<_CharT> string_type; static locale::id id; # 1541 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit money_put(size_t __refs = 0) : facet(__refs) { } # 1561 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, long double __units) const { return this->do_put(__s, __intl, __io, __fill, __units); } # 1584 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 iter_type put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, const string_type& __digits) const { return this->do_put(__s, __intl, __io, __fill, __digits); } protected: virtual ~money_put() { } # 1618 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, long double __units) const; # 1642 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, const string_type& __digits) const; # 1653 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template iter_type _M_insert(iter_type __s, ios_base& __io, char_type __fill, const string_type& __digits) const; }; template locale::id money_put<_CharT, _OutIter>::id; struct messages_base { typedef int catalog; }; # 1694 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 template class messages : public locale::facet, public messages_base { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; protected: __c_locale _M_c_locale_messages; const char* _M_name_messages; public: static locale::id id; # 1722 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit messages(size_t __refs = 0); # 1736 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 explicit messages(__c_locale __cloc, const char* __s, size_t __refs = 0); # 1749 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 catalog open(const basic_string& __s, const locale& __loc) const { return this->do_open(__s, __loc); } # 1767 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 catalog open(const basic_string&, const locale&, const char*) const; # 1785 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 string_type get(catalog __c, int __set, int __msgid, const string_type& __s) const { return this->do_get(__c, __set, __msgid, __s); } # 1796 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 void close(catalog __c) const { return this->do_close(__c); } protected: virtual ~messages(); # 1816 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual catalog do_open(const basic_string&, const locale&) const; # 1835 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 3 virtual string_type do_get(catalog, int, int, const string_type& __dfault) const; virtual void do_close(catalog) const; char* _M_convert_to_char(const string_type& __msg) const { return reinterpret_cast(const_cast<_CharT*>(__msg.c_str())); } string_type _M_convert_from_char(char*) const { return string_type(); } }; template locale::id messages<_CharT>::id; template<> string messages::do_get(catalog, int, int, const string&) const; template<> wstring messages::do_get(catalog, int, int, const wstring&) const; template class messages_byname : public messages<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; explicit messages_byname(const char* __s, size_t __refs = 0); protected: virtual ~messages_byname() { } }; } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/messages_members.h" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/messages_members.h" 3 # 1 "/usr/include/libintl.h" 1 3 4 # 35 "/usr/include/libintl.h" 3 4 extern "C" { extern char *gettext (__const char *__msgid) throw () __attribute__ ((__format_arg__ (1))); extern char *dgettext (__const char *__domainname, __const char *__msgid) throw () __attribute__ ((__format_arg__ (2))); extern char *__dgettext (__const char *__domainname, __const char *__msgid) throw () __attribute__ ((__format_arg__ (2))); extern char *dcgettext (__const char *__domainname, __const char *__msgid, int __category) throw () __attribute__ ((__format_arg__ (2))); extern char *__dcgettext (__const char *__domainname, __const char *__msgid, int __category) throw () __attribute__ ((__format_arg__ (2))); extern char *ngettext (__const char *__msgid1, __const char *__msgid2, unsigned long int __n) throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); extern char *dngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n) throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *dcngettext (__const char *__domainname, __const char *__msgid1, __const char *__msgid2, unsigned long int __n, int __category) throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); extern char *textdomain (__const char *__domainname) throw (); extern char *bindtextdomain (__const char *__domainname, __const char *__dirname) throw (); extern char *bind_textdomain_codeset (__const char *__domainname, __const char *__codeset) throw (); # 122 "/usr/include/libintl.h" 3 4 } # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-linux-gnu/bits/messages_members.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template messages<_CharT>::messages(size_t __refs) : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), _M_name_messages(_S_get_c_name()) { } template messages<_CharT>::messages(__c_locale __cloc, const char* __s, size_t __refs) : facet(__refs), _M_c_locale_messages(0), _M_name_messages(0) { if (__builtin_strcmp(__s, _S_get_c_name()) != 0) { const size_t __len = __builtin_strlen(__s) + 1; char* __tmp = new char[__len]; __builtin_memcpy(__tmp, __s, __len); _M_name_messages = __tmp; } else _M_name_messages = _S_get_c_name(); _M_c_locale_messages = _S_clone_c_locale(__cloc); } template typename messages<_CharT>::catalog messages<_CharT>::open(const basic_string& __s, const locale& __loc, const char* __dir) const { bindtextdomain(__s.c_str(), __dir); return this->do_open(__s, __loc); } template messages<_CharT>::~messages() { if (_M_name_messages != _S_get_c_name()) delete [] _M_name_messages; _S_destroy_c_locale(_M_c_locale_messages); } template typename messages<_CharT>::catalog messages<_CharT>::do_open(const basic_string& __s, const locale&) const { textdomain(__s.c_str()); return 0; } template void messages<_CharT>::do_close(catalog) const { } template messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) : messages<_CharT>(__refs) { if (this->_M_name_messages != locale::facet::_S_get_c_name()) { delete [] this->_M_name_messages; if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0) { const size_t __len = __builtin_strlen(__s) + 1; char* __tmp = new char[__len]; __builtin_memcpy(__tmp, __s, __len); this->_M_name_messages = __tmp; } else this->_M_name_messages = locale::facet::_S_get_c_name(); } if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_messages); this->_S_create_c_locale(this->_M_c_locale_messages, __s); } } } # 1899 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 1 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { class codecvt_base { public: enum result { ok, partial, error, noconv }; }; # 68 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 template class __codecvt_abstract_base : public locale::facet, public codecvt_base { public: typedef codecvt_base::result result; typedef _InternT intern_type; typedef _ExternT extern_type; typedef _StateT state_type; # 116 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 result out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const { return this->do_out(__state, __from, __from_end, __from_next, __to, __to_end, __to_next); } # 155 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 result unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const { return this->do_unshift(__state, __to,__to_end,__to_next); } # 196 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 result in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const { return this->do_in(__state, __from, __from_end, __from_next, __to, __to_end, __to_next); } int encoding() const throw() { return this->do_encoding(); } bool always_noconv() const throw() { return this->do_always_noconv(); } int length(state_type& __state, const extern_type* __from, const extern_type* __end, size_t __max) const { return this->do_length(__state, __from, __end, __max); } int max_length() const throw() { return this->do_max_length(); } protected: explicit __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } virtual ~__codecvt_abstract_base() { } # 237 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const = 0; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const = 0; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const = 0; virtual int do_encoding() const throw() = 0; virtual bool do_always_noconv() const throw() = 0; virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const = 0; virtual int do_max_length() const throw() = 0; }; # 276 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/codecvt.h" 3 template class codecvt : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> { public: typedef codecvt_base::result result; typedef _InternT intern_type; typedef _ExternT extern_type; typedef _StateT state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0) : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs), _M_c_locale_codecvt(0) { } explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt() { } virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template locale::id codecvt<_InternT, _ExternT, _StateT>::id; template<> class codecvt : public __codecvt_abstract_base { public: typedef char intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0); explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template<> class codecvt : public __codecvt_abstract_base { public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; protected: __c_locale _M_c_locale_codecvt; public: static locale::id id; explicit codecvt(size_t __refs = 0); explicit codecvt(__c_locale __cloc, size_t __refs = 0); protected: virtual ~codecvt(); virtual result do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_unshift(state_type& __state, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const; virtual result do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const; virtual int do_encoding() const throw(); virtual bool do_always_noconv() const throw(); virtual int do_length(state_type&, const extern_type* __from, const extern_type* __end, size_t __max) const; virtual int do_max_length() const throw(); }; template class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> { public: explicit codecvt_byname(const char* __s, size_t __refs = 0) : codecvt<_InternT, _ExternT, _StateT>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_codecvt); this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); } } protected: virtual ~codecvt_byname() { } }; extern template class codecvt_byname; extern template const codecvt& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template class codecvt_byname; extern template const codecvt& use_facet >(const locale&); extern template bool has_facet >(const locale&); } # 1902 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.tcc" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.tcc" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct __use_cache<__moneypunct_cache<_CharT, _Intl> > { const __moneypunct_cache<_CharT, _Intl>* operator() (const locale& __loc) const { const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); const locale::facet** __caches = __loc._M_impl->_M_caches; if (!__caches[__i]) { __moneypunct_cache<_CharT, _Intl>* __tmp = 0; try { __tmp = new __moneypunct_cache<_CharT, _Intl>; __tmp->_M_cache(__loc); } catch(...) { delete __tmp; throw; } __loc._M_impl->_M_install_cache(__tmp, __i); } return static_cast< const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); } }; template void __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) { _M_allocated = true; const moneypunct<_CharT, _Intl>& __mp = use_facet >(__loc); _M_decimal_point = __mp.decimal_point(); _M_thousands_sep = __mp.thousands_sep(); _M_frac_digits = __mp.frac_digits(); char* __grouping = 0; _CharT* __curr_symbol = 0; _CharT* __positive_sign = 0; _CharT* __negative_sign = 0; try { _M_grouping_size = __mp.grouping().size(); __grouping = new char[_M_grouping_size]; __mp.grouping().copy(__grouping, _M_grouping_size); _M_grouping = __grouping; _M_use_grouping = (_M_grouping_size && static_cast(_M_grouping[0]) > 0 && (_M_grouping[0] != __gnu_cxx::__numeric_traits::__max)); _M_curr_symbol_size = __mp.curr_symbol().size(); __curr_symbol = new _CharT[_M_curr_symbol_size]; __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); _M_curr_symbol = __curr_symbol; _M_positive_sign_size = __mp.positive_sign().size(); __positive_sign = new _CharT[_M_positive_sign_size]; __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); _M_positive_sign = __positive_sign; _M_negative_sign_size = __mp.negative_sign().size(); __negative_sign = new _CharT[_M_negative_sign_size]; __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); _M_negative_sign = __negative_sign; _M_pos_format = __mp.pos_format(); _M_neg_format = __mp.neg_format(); const ctype<_CharT>& __ct = use_facet >(__loc); __ct.widen(money_base::_S_atoms, money_base::_S_atoms + money_base::_S_end, _M_atoms); } catch(...) { delete [] __grouping; delete [] __curr_symbol; delete [] __positive_sign; delete [] __negative_sign; throw; } } template template _InIter money_get<_CharT, _InIter>:: _M_extract(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, string& __units) const { typedef char_traits<_CharT> __traits_type; typedef typename string_type::size_type size_type; typedef money_base::part part; typedef __moneypunct_cache<_CharT, _Intl> __cache_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); __use_cache<__cache_type> __uc; const __cache_type* __lc = __uc(__loc); const char_type* __lit = __lc->_M_atoms; bool __negative = false; size_type __sign_size = 0; const bool __mandatory_sign = (__lc->_M_positive_sign_size && __lc->_M_negative_sign_size); string __grouping_tmp; if (__lc->_M_use_grouping) __grouping_tmp.reserve(32); int __last_pos = 0; int __n = 0; bool __testvalid = true; bool __testdecfound = false; string __res; __res.reserve(32); const char_type* __lit_zero = __lit + money_base::_S_zero; const money_base::pattern __p = __lc->_M_neg_format; for (int __i = 0; __i < 4 && __testvalid; ++__i) { const part __which = static_cast(__p.field[__i]); switch (__which) { case money_base::symbol: if (__io.flags() & ios_base::showbase || __sign_size > 1 || __i == 0 || (__i == 1 && (__mandatory_sign || (static_cast(__p.field[0]) == money_base::sign) || (static_cast(__p.field[2]) == money_base::space))) || (__i == 2 && ((static_cast(__p.field[3]) == money_base::value) || (__mandatory_sign && (static_cast(__p.field[3]) == money_base::sign))))) { const size_type __len = __lc->_M_curr_symbol_size; size_type __j = 0; for (; __beg != __end && __j < __len && *__beg == __lc->_M_curr_symbol[__j]; ++__beg, ++__j); if (__j != __len && (__j || __io.flags() & ios_base::showbase)) __testvalid = false; } break; case money_base::sign: if (__lc->_M_positive_sign_size && __beg != __end && *__beg == __lc->_M_positive_sign[0]) { __sign_size = __lc->_M_positive_sign_size; ++__beg; } else if (__lc->_M_negative_sign_size && __beg != __end && *__beg == __lc->_M_negative_sign[0]) { __negative = true; __sign_size = __lc->_M_negative_sign_size; ++__beg; } else if (__lc->_M_positive_sign_size && !__lc->_M_negative_sign_size) __negative = true; else if (__mandatory_sign) __testvalid = false; break; case money_base::value: for (; __beg != __end; ++__beg) { const char_type __c = *__beg; const char_type* __q = __traits_type::find(__lit_zero, 10, __c); if (__q != 0) { __res += money_base::_S_atoms[__q - __lit]; ++__n; } else if (__c == __lc->_M_decimal_point && !__testdecfound) { if (__lc->_M_frac_digits <= 0) break; __last_pos = __n; __n = 0; __testdecfound = true; } else if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep && !__testdecfound) { if (__n) { __grouping_tmp += static_cast(__n); __n = 0; } else { __testvalid = false; break; } } else break; } if (__res.empty()) __testvalid = false; break; case money_base::space: if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) ++__beg; else __testvalid = false; case money_base::none: if (__i != 3) for (; __beg != __end && __ctype.is(ctype_base::space, *__beg); ++__beg); break; } } if (__sign_size > 1 && __testvalid) { const char_type* __sign = __negative ? __lc->_M_negative_sign : __lc->_M_positive_sign; size_type __i = 1; for (; __beg != __end && __i < __sign_size && *__beg == __sign[__i]; ++__beg, ++__i); if (__i != __sign_size) __testvalid = false; } if (__testvalid) { if (__res.size() > 1) { const size_type __first = __res.find_first_not_of('0'); const bool __only_zeros = __first == string::npos; if (__first) __res.erase(0, __only_zeros ? __res.size() - 1 : __first); } if (__negative && __res[0] != '0') __res.insert(__res.begin(), '-'); if (__grouping_tmp.size()) { __grouping_tmp += static_cast(__testdecfound ? __last_pos : __n); if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __grouping_tmp)) __err |= ios_base::failbit; } if (__testdecfound && __n != __lc->_M_frac_digits) __testvalid = false; } if (!__testvalid) __err |= ios_base::failbit; else __units.swap(__res); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } # 362 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.tcc" 3 template _InIter money_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, long double& __units) const { string __str; __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) : _M_extract(__beg, __end, __io, __err, __str); std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); return __beg; } template _InIter money_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, ios_base::iostate& __err, string_type& __digits) const { typedef typename string::size_type size_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); string __str; __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) : _M_extract(__beg, __end, __io, __err, __str); const size_type __len = __str.size(); if (__len) { __digits.resize(__len); __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); } return __beg; } template template _OutIter money_put<_CharT, _OutIter>:: _M_insert(iter_type __s, ios_base& __io, char_type __fill, const string_type& __digits) const { typedef typename string_type::size_type size_type; typedef money_base::part part; typedef __moneypunct_cache<_CharT, _Intl> __cache_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); __use_cache<__cache_type> __uc; const __cache_type* __lc = __uc(__loc); const char_type* __lit = __lc->_M_atoms; const char_type* __beg = __digits.data(); money_base::pattern __p; const char_type* __sign; size_type __sign_size; if (!(*__beg == __lit[money_base::_S_minus])) { __p = __lc->_M_pos_format; __sign = __lc->_M_positive_sign; __sign_size = __lc->_M_positive_sign_size; } else { __p = __lc->_M_neg_format; __sign = __lc->_M_negative_sign; __sign_size = __lc->_M_negative_sign_size; if (__digits.size()) ++__beg; } size_type __len = __ctype.scan_not(ctype_base::digit, __beg, __beg + __digits.size()) - __beg; if (__len) { string_type __value; __value.reserve(2 * __len); long __paddec = __len - __lc->_M_frac_digits; if (__paddec > 0) { if (__lc->_M_frac_digits < 0) __paddec = __len; if (__lc->_M_grouping_size) { __value.assign(2 * __paddec, char_type()); _CharT* __vend = std::__add_grouping(&__value[0], __lc->_M_thousands_sep, __lc->_M_grouping, __lc->_M_grouping_size, __beg, __beg + __paddec); __value.erase(__vend - &__value[0]); } else __value.assign(__beg, __paddec); } if (__lc->_M_frac_digits > 0) { __value += __lc->_M_decimal_point; if (__paddec >= 0) __value.append(__beg + __paddec, __lc->_M_frac_digits); else { __value.append(-__paddec, __lit[money_base::_S_zero]); __value.append(__beg, __len); } } const ios_base::fmtflags __f = __io.flags() & ios_base::adjustfield; __len = __value.size() + __sign_size; __len += ((__io.flags() & ios_base::showbase) ? __lc->_M_curr_symbol_size : 0); string_type __res; __res.reserve(2 * __len); const size_type __width = static_cast(__io.width()); const bool __testipad = (__f == ios_base::internal && __len < __width); for (int __i = 0; __i < 4; ++__i) { const part __which = static_cast(__p.field[__i]); switch (__which) { case money_base::symbol: if (__io.flags() & ios_base::showbase) __res.append(__lc->_M_curr_symbol, __lc->_M_curr_symbol_size); break; case money_base::sign: if (__sign_size) __res += __sign[0]; break; case money_base::value: __res += __value; break; case money_base::space: if (__testipad) __res.append(__width - __len, __fill); else __res += __fill; break; case money_base::none: if (__testipad) __res.append(__width - __len, __fill); break; } } if (__sign_size > 1) __res.append(__sign + 1, __sign_size - 1); __len = __res.size(); if (__width > __len) { if (__f == ios_base::left) __res.append(__width - __len, __fill); else __res.insert(0, __width - __len, __fill); __len = __width; } __s = std::__write(__s, __res.data(), __len); } __io.width(0); return __s; } # 567 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.tcc" 3 template _OutIter money_put<_CharT, _OutIter>:: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, long double __units) const { const locale __loc = __io.getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int __cs_size = 64; char* __cs = static_cast(__builtin_alloca(__cs_size)); int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf", 0, __units); if (__len >= __cs_size) { __cs_size = __len + 1; __cs = static_cast(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf", 0, __units); } # 599 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.tcc" 3 string_type __digits(__len, char_type()); __ctype.widen(__cs, __cs + __len, &__digits[0]); return __intl ? _M_insert(__s, __io, __fill, __digits) : _M_insert(__s, __io, __fill, __digits); } template _OutIter money_put<_CharT, _OutIter>:: do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, const string_type& __digits) const { return __intl ? _M_insert(__s, __io, __fill, __digits) : _M_insert(__s, __io, __fill, __digits); } template time_base::dateorder time_get<_CharT, _InIter>::do_date_order() const { return time_base::no_order; } template _InIter time_get<_CharT, _InIter>:: _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm, const _CharT* __format) const { const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); const size_t __len = char_traits<_CharT>::length(__format); ios_base::iostate __tmperr = ios_base::goodbit; size_t __i = 0; for (; __beg != __end && __i < __len && !__tmperr; ++__i) { if (__ctype.narrow(__format[__i], 0) == '%') { char __c = __ctype.narrow(__format[++__i], 0); int __mem = 0; if (__c == 'E' || __c == 'O') __c = __ctype.narrow(__format[++__i], 0); switch (__c) { const char* __cs; _CharT __wcs[10]; case 'a': const char_type* __days1[7]; __tp._M_days_abbreviated(__days1); __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, 7, __io, __tmperr); break; case 'A': const char_type* __days2[7]; __tp._M_days(__days2); __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, 7, __io, __tmperr); break; case 'h': case 'b': const char_type* __months1[12]; __tp._M_months_abbreviated(__months1); __beg = _M_extract_name(__beg, __end, __tm->tm_mon, __months1, 12, __io, __tmperr); break; case 'B': const char_type* __months2[12]; __tp._M_months(__months2); __beg = _M_extract_name(__beg, __end, __tm->tm_mon, __months2, 12, __io, __tmperr); break; case 'c': const char_type* __dt[2]; __tp._M_date_time_formats(__dt); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __dt[0]); break; case 'd': __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, __io, __tmperr); break; case 'e': if (__ctype.is(ctype_base::space, *__beg)) __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, 1, __io, __tmperr); else __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, 2, __io, __tmperr); break; case 'D': __cs = "%m/%d/%y"; __ctype.widen(__cs, __cs + 9, __wcs); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __wcs); break; case 'H': __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, __io, __tmperr); break; case 'I': __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, __io, __tmperr); break; case 'm': __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, __io, __tmperr); if (!__tmperr) __tm->tm_mon = __mem - 1; break; case 'M': __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, __io, __tmperr); break; case 'n': if (__ctype.narrow(*__beg, 0) == '\n') ++__beg; else __tmperr |= ios_base::failbit; break; case 'R': __cs = "%H:%M"; __ctype.widen(__cs, __cs + 6, __wcs); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __wcs); break; case 'S': __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, __io, __tmperr); break; case 't': if (__ctype.narrow(*__beg, 0) == '\t') ++__beg; else __tmperr |= ios_base::failbit; break; case 'T': __cs = "%H:%M:%S"; __ctype.widen(__cs, __cs + 9, __wcs); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __wcs); break; case 'x': const char_type* __dates[2]; __tp._M_date_formats(__dates); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __dates[0]); break; case 'X': const char_type* __times[2]; __tp._M_time_formats(__times); __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, __tm, __times[0]); break; case 'y': case 'C': case 'Y': __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, __io, __tmperr); if (!__tmperr) __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900; break; case 'Z': if (__ctype.is(ctype_base::upper, *__beg)) { int __tmp; __beg = _M_extract_name(__beg, __end, __tmp, __timepunct_cache<_CharT>::_S_timezones, 14, __io, __tmperr); if (__beg != __end && !__tmperr && __tmp == 0 && (*__beg == __ctype.widen('-') || *__beg == __ctype.widen('+'))) { __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, __io, __tmperr); __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, __io, __tmperr); } } else __tmperr |= ios_base::failbit; break; default: __tmperr |= ios_base::failbit; } } else { if (__format[__i] == *__beg) ++__beg; else __tmperr |= ios_base::failbit; } } if (__tmperr || __i != __len) __err |= ios_base::failbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: _M_extract_num(iter_type __beg, iter_type __end, int& __member, int __min, int __max, size_t __len, ios_base& __io, ios_base::iostate& __err) const { const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); ++__min; size_t __i = 0; int __value = 0; for (; __beg != __end && __i < __len; ++__beg, ++__i) { const char __c = __ctype.narrow(*__beg, '*'); if (__c >= '0' && __c <= '9') { __value = __value * 10 + (__c - '0'); const int __valuec = __value * __mult; if (__valuec > __max || __valuec + __mult < __min) break; __mult /= 10; } else break; } if (__i == __len) __member = __value; else if (__len == 4 && __i == 2) __member = __value - 100; else __err |= ios_base::failbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: _M_extract_name(iter_type __beg, iter_type __end, int& __member, const _CharT** __names, size_t __indexlen, ios_base& __io, ios_base::iostate& __err) const { typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int* __matches = static_cast(__builtin_alloca(sizeof(int) * __indexlen)); size_t __nmatches = 0; size_t __pos = 0; bool __testvalid = true; const char_type* __name; if (__beg != __end) { const char_type __c = *__beg; for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) if (__c == __names[__i1][0] || __c == __ctype.toupper(__names[__i1][0])) __matches[__nmatches++] = __i1; } while (__nmatches > 1) { size_t __minlen = __traits_type::length(__names[__matches[0]]); for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) __minlen = std::min(__minlen, __traits_type::length(__names[__matches[__i2]])); ++__beg, ++__pos; if (__pos < __minlen && __beg != __end) for (size_t __i3 = 0; __i3 < __nmatches;) { __name = __names[__matches[__i3]]; if (!(__name[__pos] == *__beg)) __matches[__i3] = __matches[--__nmatches]; else ++__i3; } else break; } if (__nmatches == 1) { ++__beg, ++__pos; __name = __names[__matches[0]]; const size_t __len = __traits_type::length(__name); while (__pos < __len && __beg != __end && __name[__pos] == *__beg) ++__beg, ++__pos; if (__len == __pos) __member = __matches[0]; else __testvalid = false; } else __testvalid = false; if (!__testvalid) __err |= ios_base::failbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, const _CharT** __names, size_t __indexlen, ios_base& __io, ios_base::iostate& __err) const { typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int* __matches = static_cast(__builtin_alloca(2 * sizeof(int) * __indexlen)); size_t __nmatches = 0; size_t* __matches_lengths = 0; size_t __pos = 0; if (__beg != __end) { const char_type __c = *__beg; for (size_t __i = 0; __i < 2 * __indexlen; ++__i) if (__c == __names[__i][0] || __c == __ctype.toupper(__names[__i][0])) __matches[__nmatches++] = __i; } if (__nmatches) { ++__beg, ++__pos; __matches_lengths = static_cast(__builtin_alloca(sizeof(size_t) * __nmatches)); for (size_t __i = 0; __i < __nmatches; ++__i) __matches_lengths[__i] = __traits_type::length(__names[__matches[__i]]); } for (; __beg != __end; ++__beg, ++__pos) { size_t __nskipped = 0; const char_type __c = *__beg; for (size_t __i = 0; __i < __nmatches;) { const char_type* __name = __names[__matches[__i]]; if (__pos >= __matches_lengths[__i]) ++__nskipped, ++__i; else if (!(__name[__pos] == __c)) { --__nmatches; __matches[__i] = __matches[__nmatches]; __matches_lengths[__i] = __matches_lengths[__nmatches]; } else ++__i; } if (__nskipped == __nmatches) break; } if ((__nmatches == 1 && __matches_lengths[0] == __pos) || (__nmatches == 2 && (__matches_lengths[0] == __pos || __matches_lengths[1] == __pos))) __member = (__matches[0] >= __indexlen ? __matches[0] - __indexlen : __matches[0]); else __err |= ios_base::failbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_time(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const char_type* __times[2]; __tp._M_time_formats(__times); __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __times[0]); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_date(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const char_type* __dates[2]; __tp._M_date_formats(__dates); __beg = _M_extract_via_format(__beg, __end, __io, __err, __tm, __dates[0]); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); const char_type* __days[14]; __tp._M_days_abbreviated(__days); __tp._M_days(__days + 7); int __tmpwday; ios_base::iostate __tmperr = ios_base::goodbit; __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7, __io, __tmperr); if (!__tmperr) __tm->tm_wday = __tmpwday; else __err |= ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_monthname(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { typedef char_traits<_CharT> __traits_type; const locale& __loc = __io._M_getloc(); const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); const ctype<_CharT>& __ctype = use_facet >(__loc); const char_type* __months[24]; __tp._M_months_abbreviated(__months); __tp._M_months(__months + 12); int __tmpmon; ios_base::iostate __tmperr = ios_base::goodbit; __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12, __io, __tmperr); if (!__tmperr) __tm->tm_mon = __tmpmon; else __err |= ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _InIter time_get<_CharT, _InIter>:: do_get_year(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, tm* __tm) const { const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet >(__loc); int __tmpyear; ios_base::iostate __tmperr = ios_base::goodbit; __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4, __io, __tmperr); if (!__tmperr) __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900; else __err |= ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; return __beg; } template _OutIter time_put<_CharT, _OutIter>:: put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, const _CharT* __beg, const _CharT* __end) const { const locale& __loc = __io._M_getloc(); ctype<_CharT> const& __ctype = use_facet >(__loc); for (; __beg != __end; ++__beg) if (__ctype.narrow(*__beg, 0) != '%') { *__s = *__beg; ++__s; } else if (++__beg != __end) { char __format; char __mod = 0; const char __c = __ctype.narrow(*__beg, 0); if (__c != 'E' && __c != 'O') __format = __c; else if (++__beg != __end) { __mod = __c; __format = __ctype.narrow(*__beg, 0); } else break; __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); } else break; return __s; } template _OutIter time_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, char __format, char __mod) const { const locale& __loc = __io._M_getloc(); ctype<_CharT> const& __ctype = use_facet >(__loc); __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); const size_t __maxlen = 128; char_type __res[__maxlen]; char_type __fmt[4]; __fmt[0] = __ctype.widen('%'); if (!__mod) { __fmt[1] = __format; __fmt[2] = char_type(); } else { __fmt[1] = __mod; __fmt[2] = __format; __fmt[3] = char_type(); } __tp._M_put(__res, __maxlen, __fmt, __tm); return std::__write(__s, __res, char_traits::length(__res)); } extern template class moneypunct; extern template class moneypunct; extern template class moneypunct_byname; extern template class moneypunct_byname; extern template class money_get; extern template class money_put; extern template class __timepunct; extern template class time_put; extern template class time_put_byname; extern template class time_get; extern template class time_get_byname; extern template class messages; extern template class messages_byname; extern template const moneypunct& use_facet >(const locale&); extern template const moneypunct& use_facet >(const locale&); extern template const money_put& use_facet >(const locale&); extern template const money_get& use_facet >(const locale&); extern template const __timepunct& use_facet<__timepunct >(const locale&); extern template const time_put& use_facet >(const locale&); extern template const time_get& use_facet >(const locale&); extern template const messages& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet<__timepunct >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template class moneypunct; extern template class moneypunct; extern template class moneypunct_byname; extern template class moneypunct_byname; extern template class money_get; extern template class money_put; extern template class __timepunct; extern template class time_put; extern template class time_put_byname; extern template class time_get; extern template class time_get_byname; extern template class messages; extern template class messages_byname; extern template const moneypunct& use_facet >(const locale&); extern template const moneypunct& use_facet >(const locale&); extern template const money_put& use_facet >(const locale&); extern template const money_get& use_facet >(const locale&); extern template const __timepunct& use_facet<__timepunct >(const locale&); extern template const time_put& use_facet >(const locale&); extern template const time_get& use_facet >(const locale&); extern template const messages& use_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet<__timepunct >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); extern template bool has_facet >(const locale&); } # 1904 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/locale_facets_nonio.h" 2 3 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/locale" 2 3 # 46 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { struct _Resetiosflags { ios_base::fmtflags _M_mask; }; # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 inline _Resetiosflags resetiosflags(ios_base::fmtflags __mask) { return { __mask }; } template inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) { __is.setf(ios_base::fmtflags(0), __f._M_mask); return __is; } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Resetiosflags __f) { __os.setf(ios_base::fmtflags(0), __f._M_mask); return __os; } struct _Setiosflags { ios_base::fmtflags _M_mask; }; # 94 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 inline _Setiosflags setiosflags(ios_base::fmtflags __mask) { return { __mask }; } template inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) { __is.setf(__f._M_mask); return __is; } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setiosflags __f) { __os.setf(__f._M_mask); return __os; } struct _Setbase { int _M_base; }; # 125 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 inline _Setbase setbase(int __base) { return { __base }; } template inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) { __is.setf(__f._M_base == 8 ? ios_base::oct : __f._M_base == 10 ? ios_base::dec : __f._M_base == 16 ? ios_base::hex : ios_base::fmtflags(0), ios_base::basefield); return __is; } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setbase __f) { __os.setf(__f._M_base == 8 ? ios_base::oct : __f._M_base == 10 ? ios_base::dec : __f._M_base == 16 ? ios_base::hex : ios_base::fmtflags(0), ios_base::basefield); return __os; } template struct _Setfill { _CharT _M_c; }; # 162 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 template inline _Setfill<_CharT> setfill(_CharT __c) { return { __c }; } template inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) { __is.fill(__f._M_c); return __is; } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setfill<_CharT> __f) { __os.fill(__f._M_c); return __os; } struct _Setprecision { int _M_n; }; # 193 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 inline _Setprecision setprecision(int __n) { return { __n }; } template inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) { __is.precision(__f._M_n); return __is; } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setprecision __f) { __os.precision(__f._M_n); return __os; } struct _Setw { int _M_n; }; # 223 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 inline _Setw setw(int __n) { return { __n }; } template inline basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f) { __is.width(__f._M_n); return __is; } template inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Setw __f) { __os.width(__f._M_n); return __os; } template struct _Get_money { _MoneyT& _M_mon; bool _M_intl; }; # 256 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 template inline _Get_money<_MoneyT> get_money(_MoneyT& __mon, bool __intl = false) { return { __mon, __intl }; } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, _Get_money<_MoneyT> __f) { typedef istreambuf_iterator<_CharT, _Traits> _Iter; typedef money_get<_CharT, _Iter> _MoneyGet; ios_base::iostate __err = ios_base::goodbit; const _MoneyGet& __mg = use_facet<_MoneyGet>(__is.getloc()); __mg.get(_Iter(__is.rdbuf()), _Iter(), __f._M_intl, __is, __err, __f._M_mon); if (ios_base::goodbit != __err) __is.setstate(__err); return __is; } template struct _Put_money { const _MoneyT& _M_mon; bool _M_intl; }; # 292 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iomanip" 3 template inline _Put_money<_MoneyT> put_money(const _MoneyT& __mon, bool __intl = false) { return { __mon, __intl }; } template basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, _Put_money<_MoneyT> __f) { typedef ostreambuf_iterator<_CharT, _Traits> _Iter; typedef money_put<_CharT, _Iter> _MoneyPut; const _MoneyPut& __mp = use_facet<_MoneyPut>(__os.getloc()); const _Iter __end = __mp.put(_Iter(__os.rdbuf()), __f._M_intl, __os, __os.fill(), __f._M_mon); if (__end.failed()) __os.setstate(ios_base::badbit); return __os; } extern template ostream& operator<<(ostream&, _Setfill); extern template ostream& operator<<(ostream&, _Setiosflags); extern template ostream& operator<<(ostream&, _Resetiosflags); extern template ostream& operator<<(ostream&, _Setbase); extern template ostream& operator<<(ostream&, _Setprecision); extern template ostream& operator<<(ostream&, _Setw); extern template istream& operator>>(istream&, _Setfill); extern template istream& operator>>(istream&, _Setiosflags); extern template istream& operator>>(istream&, _Resetiosflags); extern template istream& operator>>(istream&, _Setbase); extern template istream& operator>>(istream&, _Setprecision); extern template istream& operator>>(istream&, _Setw); extern template wostream& operator<<(wostream&, _Setfill); extern template wostream& operator<<(wostream&, _Setiosflags); extern template wostream& operator<<(wostream&, _Resetiosflags); extern template wostream& operator<<(wostream&, _Setbase); extern template wostream& operator<<(wostream&, _Setprecision); extern template wostream& operator<<(wostream&, _Setw); extern template wistream& operator>>(wistream&, _Setfill); extern template wistream& operator>>(wistream&, _Setiosflags); extern template wistream& operator>>(wistream&, _Resetiosflags); extern template wistream& operator>>(wistream&, _Setbase); extern template wistream& operator>>(wistream&, _Setprecision); extern template wistream& operator>>(wistream&, _Setw); } # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Profile_counter.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/map" 1 3 # 58 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/map" 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/map" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 1 3 # 68 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 88 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 3 enum _Rb_tree_color { _S_red = false, _S_black = true }; struct _Rb_tree_node_base { typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; _Rb_tree_color _M_color; _Base_ptr _M_parent; _Base_ptr _M_left; _Base_ptr _M_right; static _Base_ptr _S_minimum(_Base_ptr __x) { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) { while (__x->_M_left != 0) __x = __x->_M_left; return __x; } static _Base_ptr _S_maximum(_Base_ptr __x) { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) { while (__x->_M_right != 0) __x = __x->_M_right; return __x; } }; template struct _Rb_tree_node : public _Rb_tree_node_base { typedef _Rb_tree_node<_Val>* _Link_type; _Val _M_value_field; template _Rb_tree_node(_Args&&... __args) : _Rb_tree_node_base(), _M_value_field(std::forward<_Args>(__args)...) { } }; __attribute__ ((__pure__)) _Rb_tree_node_base* _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); __attribute__ ((__pure__)) const _Rb_tree_node_base* _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); __attribute__ ((__pure__)) _Rb_tree_node_base* _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); __attribute__ ((__pure__)) const _Rb_tree_node_base* _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); template struct _Rb_tree_iterator { typedef _Tp value_type; typedef _Tp& reference; typedef _Tp* pointer; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; typedef _Rb_tree_node<_Tp>* _Link_type; _Rb_tree_iterator() : _M_node() { } explicit _Rb_tree_iterator(_Link_type __x) : _M_node(__x) { } reference operator*() const { return static_cast<_Link_type>(_M_node)->_M_value_field; } pointer operator->() const { return std::__addressof(static_cast<_Link_type> (_M_node)->_M_value_field); } _Self& operator++() { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template struct _Rb_tree_const_iterator { typedef _Tp value_type; typedef const _Tp& reference; typedef const _Tp* pointer; typedef _Rb_tree_iterator<_Tp> iterator; typedef bidirectional_iterator_tag iterator_category; typedef ptrdiff_t difference_type; typedef _Rb_tree_const_iterator<_Tp> _Self; typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; typedef const _Rb_tree_node<_Tp>* _Link_type; _Rb_tree_const_iterator() : _M_node() { } explicit _Rb_tree_const_iterator(_Link_type __x) : _M_node(__x) { } _Rb_tree_const_iterator(const iterator& __it) : _M_node(__it._M_node) { } iterator _M_const_cast() const { return iterator(static_cast (const_cast(_M_node))); } reference operator*() const { return static_cast<_Link_type>(_M_node)->_M_value_field; } pointer operator->() const { return std::__addressof(static_cast<_Link_type> (_M_node)->_M_value_field); } _Self& operator++() { _M_node = _Rb_tree_increment(_M_node); return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _Rb_tree_increment(_M_node); return __tmp; } _Self& operator--() { _M_node = _Rb_tree_decrement(_M_node); return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _Rb_tree_decrement(_M_node); return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } _Base_ptr _M_node; }; template inline bool operator==(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) { return __x._M_node == __y._M_node; } template inline bool operator!=(const _Rb_tree_iterator<_Val>& __x, const _Rb_tree_const_iterator<_Val>& __y) { return __x._M_node != __y._M_node; } void _Rb_tree_insert_and_rebalance(const bool __insert_left, _Rb_tree_node_base* __x, _Rb_tree_node_base* __p, _Rb_tree_node_base& __header) throw (); _Rb_tree_node_base* _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, _Rb_tree_node_base& __header) throw (); template > class _Rb_tree { typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other _Node_allocator; protected: typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; public: typedef _Key key_type; typedef _Val value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef _Rb_tree_node<_Val>* _Link_type; typedef const _Rb_tree_node<_Val>* _Const_Link_type; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; _Node_allocator& _M_get_Node_allocator() noexcept { return *static_cast<_Node_allocator*>(&this->_M_impl); } const _Node_allocator& _M_get_Node_allocator() const noexcept { return *static_cast(&this->_M_impl); } allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Node_allocator()); } protected: _Link_type _M_get_node() { return _M_impl._Node_allocator::allocate(1); } void _M_put_node(_Link_type __p) { _M_impl._Node_allocator::deallocate(__p, 1); } # 398 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 3 template _Link_type _M_create_node(_Args&&... __args) { _Link_type __tmp = _M_get_node(); try { _M_get_Node_allocator().construct(__tmp, std::forward<_Args>(__args)...); } catch(...) { _M_put_node(__tmp); throw; } return __tmp; } void _M_destroy_node(_Link_type __p) { _M_get_Node_allocator().destroy(__p); _M_put_node(__p); } _Link_type _M_clone_node(_Const_Link_type __x) { _Link_type __tmp = _M_create_node(__x->_M_value_field); __tmp->_M_color = __x->_M_color; __tmp->_M_left = 0; __tmp->_M_right = 0; return __tmp; } protected: template struct _Rb_tree_impl : public _Node_allocator { _Key_compare _M_key_compare; _Rb_tree_node_base _M_header; size_type _M_node_count; _Rb_tree_impl() : _Node_allocator(), _M_key_compare(), _M_header(), _M_node_count(0) { _M_initialize(); } _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), _M_node_count(0) { _M_initialize(); } _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) : _Node_allocator(std::move(__a)), _M_key_compare(__comp), _M_header(), _M_node_count(0) { _M_initialize(); } private: void _M_initialize() { this->_M_header._M_color = _S_red; this->_M_header._M_parent = 0; this->_M_header._M_left = &this->_M_header; this->_M_header._M_right = &this->_M_header; } }; _Rb_tree_impl<_Compare> _M_impl; protected: _Base_ptr& _M_root() { return this->_M_impl._M_header._M_parent; } _Const_Base_ptr _M_root() const { return this->_M_impl._M_header._M_parent; } _Base_ptr& _M_leftmost() { return this->_M_impl._M_header._M_left; } _Const_Base_ptr _M_leftmost() const { return this->_M_impl._M_header._M_left; } _Base_ptr& _M_rightmost() { return this->_M_impl._M_header._M_right; } _Const_Base_ptr _M_rightmost() const { return this->_M_impl._M_header._M_right; } _Link_type _M_begin() { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } _Const_Link_type _M_begin() const { return static_cast<_Const_Link_type> (this->_M_impl._M_header._M_parent); } _Link_type _M_end() { return static_cast<_Link_type>(&this->_M_impl._M_header); } _Const_Link_type _M_end() const { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } static const_reference _S_value(_Const_Link_type __x) { return __x->_M_value_field; } static const _Key& _S_key(_Const_Link_type __x) { return _KeyOfValue()(_S_value(__x)); } static _Link_type _S_left(_Base_ptr __x) { return static_cast<_Link_type>(__x->_M_left); } static _Const_Link_type _S_left(_Const_Base_ptr __x) { return static_cast<_Const_Link_type>(__x->_M_left); } static _Link_type _S_right(_Base_ptr __x) { return static_cast<_Link_type>(__x->_M_right); } static _Const_Link_type _S_right(_Const_Base_ptr __x) { return static_cast<_Const_Link_type>(__x->_M_right); } static const_reference _S_value(_Const_Base_ptr __x) { return static_cast<_Const_Link_type>(__x)->_M_value_field; } static const _Key& _S_key(_Const_Base_ptr __x) { return _KeyOfValue()(_S_value(__x)); } static _Base_ptr _S_minimum(_Base_ptr __x) { return _Rb_tree_node_base::_S_minimum(__x); } static _Const_Base_ptr _S_minimum(_Const_Base_ptr __x) { return _Rb_tree_node_base::_S_minimum(__x); } static _Base_ptr _S_maximum(_Base_ptr __x) { return _Rb_tree_node_base::_S_maximum(__x); } static _Const_Base_ptr _S_maximum(_Const_Base_ptr __x) { return _Rb_tree_node_base::_S_maximum(__x); } public: typedef _Rb_tree_iterator iterator; typedef _Rb_tree_const_iterator const_iterator; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; private: template iterator _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, _Arg&& __v); template iterator _M_insert_lower(_Base_ptr __x, _Base_ptr __y, _Arg&& __v); template iterator _M_insert_equal_lower(_Arg&& __x); # 599 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 3 _Link_type _M_copy(_Const_Link_type __x, _Link_type __p); void _M_erase(_Link_type __x); iterator _M_lower_bound(_Link_type __x, _Link_type __y, const _Key& __k); const_iterator _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, const _Key& __k) const; iterator _M_upper_bound(_Link_type __x, _Link_type __y, const _Key& __k); const_iterator _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, const _Key& __k) const; public: _Rb_tree() { } _Rb_tree(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_impl(__comp, _Node_allocator(__a)) { } _Rb_tree(const _Rb_tree& __x) : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) { if (__x._M_root() != 0) { _M_root() = _M_copy(__x._M_begin(), _M_end()); _M_leftmost() = _S_minimum(_M_root()); _M_rightmost() = _S_maximum(_M_root()); _M_impl._M_node_count = __x._M_impl._M_node_count; } } _Rb_tree(_Rb_tree&& __x); ~_Rb_tree() noexcept { _M_erase(_M_begin()); } _Rb_tree& operator=(const _Rb_tree& __x); _Compare key_comp() const { return _M_impl._M_key_compare; } iterator begin() noexcept { return iterator(static_cast<_Link_type> (this->_M_impl._M_header._M_left)); } const_iterator begin() const noexcept { return const_iterator(static_cast<_Const_Link_type> (this->_M_impl._M_header._M_left)); } iterator end() noexcept { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } const_iterator end() const noexcept { return const_iterator(static_cast<_Const_Link_type> (&this->_M_impl._M_header)); } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } bool empty() const noexcept { return _M_impl._M_node_count == 0; } size_type size() const noexcept { return _M_impl._M_node_count; } size_type max_size() const noexcept { return _M_get_Node_allocator().max_size(); } void swap(_Rb_tree& __t); template pair _M_insert_unique(_Arg&& __x); template iterator _M_insert_equal(_Arg&& __x); template iterator _M_insert_unique_(const_iterator __position, _Arg&& __x); template iterator _M_insert_equal_(const_iterator __position, _Arg&& __x); # 743 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 3 template void _M_insert_unique(_InputIterator __first, _InputIterator __last); template void _M_insert_equal(_InputIterator __first, _InputIterator __last); private: void _M_erase_aux(const_iterator __position); void _M_erase_aux(const_iterator __first, const_iterator __last); public: iterator erase(const_iterator __position) { const_iterator __result = __position; ++__result; _M_erase_aux(__position); return __result._M_const_cast(); } # 779 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 3 size_type erase(const key_type& __x); iterator erase(const_iterator __first, const_iterator __last) { _M_erase_aux(__first, __last); return __last._M_const_cast(); } # 800 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_tree.h" 3 void erase(const key_type* __first, const key_type* __last); void clear() noexcept { _M_erase(_M_begin()); _M_leftmost() = _M_end(); _M_root() = 0; _M_rightmost() = _M_end(); _M_impl._M_node_count = 0; } iterator find(const key_type& __k); const_iterator find(const key_type& __k) const; size_type count(const key_type& __k) const; iterator lower_bound(const key_type& __k) { return _M_lower_bound(_M_begin(), _M_end(), __k); } const_iterator lower_bound(const key_type& __k) const { return _M_lower_bound(_M_begin(), _M_end(), __k); } iterator upper_bound(const key_type& __k) { return _M_upper_bound(_M_begin(), _M_end(), __k); } const_iterator upper_bound(const key_type& __k) const { return _M_upper_bound(_M_begin(), _M_end(), __k); } pair equal_range(const key_type& __k); pair equal_range(const key_type& __k) const; bool __rb_verify() const; }; template inline bool operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } template inline bool operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) { __x.swap(__y); } template _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _Rb_tree(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __x) : _M_impl(__x._M_impl._M_key_compare, std::move(__x._M_get_Node_allocator())) { if (__x._M_root() != 0) { _M_root() = __x._M_root(); _M_leftmost() = __x._M_leftmost(); _M_rightmost() = __x._M_rightmost(); _M_root()->_M_parent = _M_end(); __x._M_root() = 0; __x._M_leftmost() = __x._M_end(); __x._M_rightmost() = __x._M_end(); this->_M_impl._M_node_count = __x._M_impl._M_node_count; __x._M_impl._M_node_count = 0; } } template _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) { if (this != &__x) { clear(); _M_impl._M_key_compare = __x._M_impl._M_key_compare; if (__x._M_root() != 0) { _M_root() = _M_copy(__x._M_begin(), _M_end()); _M_leftmost() = _S_minimum(_M_root()); _M_rightmost() = _S_maximum(_M_root()); _M_impl._M_node_count = __x._M_impl._M_node_count; } } return *this; } template template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, _Arg&& __v) { bool __insert_left = (__x != 0 || __p == _M_end() || _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__p))); _Link_type __z = _M_create_node(std::forward<_Arg>(__v)); _Rb_tree_insert_and_rebalance(__insert_left, __z, const_cast<_Base_ptr>(__p), this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_lower(_Base_ptr __x, _Base_ptr __p, _Arg&& __v) { bool __insert_left = (__x != 0 || __p == _M_end() || !_M_impl._M_key_compare(_S_key(__p), _KeyOfValue()(__v))); _Link_type __z = _M_create_node(std::forward<_Arg>(__v)); _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, this->_M_impl._M_header); ++_M_impl._M_node_count; return iterator(__z); } template template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_lower(_Arg&& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) { __y = __x; __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? _S_left(__x) : _S_right(__x); } return _M_insert_lower(__x, __y, std::forward<_Arg>(__v)); } template typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: _M_copy(_Const_Link_type __x, _Link_type __p) { _Link_type __top = _M_clone_node(__x); __top->_M_parent = __p; try { if (__x->_M_right) __top->_M_right = _M_copy(_S_right(__x), __top); __p = __top; __x = _S_left(__x); while (__x != 0) { _Link_type __y = _M_clone_node(__x); __p->_M_left = __y; __y->_M_parent = __p; if (__x->_M_right) __y->_M_right = _M_copy(_S_right(__x), __y); __p = __y; __x = _S_left(__x); } } catch(...) { _M_erase(__top); throw; } return __top; } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_erase(_Link_type __x) { while (__x != 0) { _M_erase(_S_right(__x)); _Link_type __y = _S_left(__x); _M_destroy_node(__x); __x = __y; } } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_lower_bound(_Link_type __x, _Link_type __y, const _Key& __k) { while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return iterator(__y); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, const _Key& __k) const { while (__x != 0) if (!_M_impl._M_key_compare(_S_key(__x), __k)) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return const_iterator(__y); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_upper_bound(_Link_type __x, _Link_type __y, const _Key& __k) { while (__x != 0) if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return iterator(__y); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, const _Key& __k) const { while (__x != 0) if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else __x = _S_right(__x); return const_iterator(__y); } template pair::iterator, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: equal_range(const _Key& __k) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) { if (_M_impl._M_key_compare(_S_key(__x), __k)) __x = _S_right(__x); else if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else { _Link_type __xu(__x), __yu(__y); __y = __x, __x = _S_left(__x); __xu = _S_right(__xu); return pair(_M_lower_bound(__x, __y, __k), _M_upper_bound(__xu, __yu, __k)); } } return pair(iterator(__y), iterator(__y)); } template pair::const_iterator, typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: equal_range(const _Key& __k) const { _Const_Link_type __x = _M_begin(); _Const_Link_type __y = _M_end(); while (__x != 0) { if (_M_impl._M_key_compare(_S_key(__x), __k)) __x = _S_right(__x); else if (_M_impl._M_key_compare(__k, _S_key(__x))) __y = __x, __x = _S_left(__x); else { _Const_Link_type __xu(__x), __yu(__y); __y = __x, __x = _S_left(__x); __xu = _S_right(__xu); return pair(_M_lower_bound(__x, __y, __k), _M_upper_bound(__xu, __yu, __k)); } } return pair(const_iterator(__y), const_iterator(__y)); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) { if (_M_root() == 0) { if (__t._M_root() != 0) { _M_root() = __t._M_root(); _M_leftmost() = __t._M_leftmost(); _M_rightmost() = __t._M_rightmost(); _M_root()->_M_parent = _M_end(); __t._M_root() = 0; __t._M_leftmost() = __t._M_end(); __t._M_rightmost() = __t._M_end(); } } else if (__t._M_root() == 0) { __t._M_root() = _M_root(); __t._M_leftmost() = _M_leftmost(); __t._M_rightmost() = _M_rightmost(); __t._M_root()->_M_parent = __t._M_end(); _M_root() = 0; _M_leftmost() = _M_end(); _M_rightmost() = _M_end(); } else { std::swap(_M_root(),__t._M_root()); std::swap(_M_leftmost(),__t._M_leftmost()); std::swap(_M_rightmost(),__t._M_rightmost()); _M_root()->_M_parent = _M_end(); __t._M_root()->_M_parent = __t._M_end(); } std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); std::__alloc_swap<_Node_allocator>:: _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); } template template pair::iterator, bool> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique(_Arg&& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); bool __comp = true; while (__x != 0) { __y = __x; __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); __x = __comp ? _S_left(__x) : _S_right(__x); } iterator __j = iterator(__y); if (__comp) { if (__j == begin()) return pair (_M_insert_(__x, __y, std::forward<_Arg>(__v)), true); else --__j; } if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) return pair (_M_insert_(__x, __y, std::forward<_Arg>(__v)), true); return pair(__j, false); } template template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal(_Arg&& __v) { _Link_type __x = _M_begin(); _Link_type __y = _M_end(); while (__x != 0) { __y = __x; __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? _S_left(__x) : _S_right(__x); } return _M_insert_(__x, __y, std::forward<_Arg>(__v)); } template template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_unique_(const_iterator __position, _Arg&& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && _M_impl._M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v))) return _M_insert_(0, _M_rightmost(), std::forward<_Arg>(__v)); else return _M_insert_unique(std::forward<_Arg>(__v)).first; } else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) { const_iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert_(_M_leftmost(), _M_leftmost(), std::forward<_Arg>(__v)); else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), _KeyOfValue()(__v))) { if (_S_right(__before._M_node) == 0) return _M_insert_(0, __before._M_node, std::forward<_Arg>(__v)); else return _M_insert_(__position._M_node, __position._M_node, std::forward<_Arg>(__v)); } else return _M_insert_unique(std::forward<_Arg>(__v)).first; } else if (_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { const_iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert_(0, _M_rightmost(), std::forward<_Arg>(__v)); else if (_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((++__after)._M_node))) { if (_S_right(__position._M_node) == 0) return _M_insert_(0, __position._M_node, std::forward<_Arg>(__v)); else return _M_insert_(__after._M_node, __after._M_node, std::forward<_Arg>(__v)); } else return _M_insert_unique(std::forward<_Arg>(__v)).first; } else return __position._M_const_cast(); } template template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_equal_(const_iterator __position, _Arg&& __v) { if (__position._M_node == _M_end()) { if (size() > 0 && !_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost()))) return _M_insert_(0, _M_rightmost(), std::forward<_Arg>(__v)); else return _M_insert_equal(std::forward<_Arg>(__v)); } else if (!_M_impl._M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) { const_iterator __before = __position; if (__position._M_node == _M_leftmost()) return _M_insert_(_M_leftmost(), _M_leftmost(), std::forward<_Arg>(__v)); else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), _S_key((--__before)._M_node))) { if (_S_right(__before._M_node) == 0) return _M_insert_(0, __before._M_node, std::forward<_Arg>(__v)); else return _M_insert_(__position._M_node, __position._M_node, std::forward<_Arg>(__v)); } else return _M_insert_equal(std::forward<_Arg>(__v)); } else { const_iterator __after = __position; if (__position._M_node == _M_rightmost()) return _M_insert_(0, _M_rightmost(), std::forward<_Arg>(__v)); else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), _KeyOfValue()(__v))) { if (_S_right(__position._M_node) == 0) return _M_insert_(0, __position._M_node, std::forward<_Arg>(__v)); else return _M_insert_(__after._M_node, __after._M_node, std::forward<_Arg>(__v)); } else return _M_insert_equal_lower(std::forward<_Arg>(__v)); } } template template void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_unique(_II __first, _II __last) { for (; __first != __last; ++__first) _M_insert_unique_(end(), *__first); } template template void _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: _M_insert_equal(_II __first, _II __last) { for (; __first != __last; ++__first) _M_insert_equal_(end(), *__first); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_erase_aux(const_iterator __position) { _Link_type __y = static_cast<_Link_type>(_Rb_tree_rebalance_for_erase (const_cast<_Base_ptr>(__position._M_node), this->_M_impl._M_header)); _M_destroy_node(__y); --_M_impl._M_node_count; } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_erase_aux(const_iterator __first, const_iterator __last) { if (__first == begin() && __last == end()) clear(); else while (__first != __last) erase(__first++); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key& __x) { pair __p = equal_range(__x); const size_type __old_size = size(); erase(__p.first, __p.second); return __old_size - size(); } template void _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: erase(const _Key* __first, const _Key* __last) { while (__first != __last) erase(*__first++); } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: find(const _Key& __k) { iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); return (__j == end() || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: find(const _Key& __k) const { const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); return (__j == end() || _M_impl._M_key_compare(__k, _S_key(__j._M_node))) ? end() : __j; } template typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: count(const _Key& __k) const { pair __p = equal_range(__k); const size_type __n = std::distance(__p.first, __p.second); return __n; } __attribute__ ((__pure__)) unsigned int _Rb_tree_black_count(const _Rb_tree_node_base* __node, const _Rb_tree_node_base* __root) throw (); template bool _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const { if (_M_impl._M_node_count == 0 || begin() == end()) return _M_impl._M_node_count == 0 && begin() == end() && this->_M_impl._M_header._M_left == _M_end() && this->_M_impl._M_header._M_right == _M_end(); unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); for (const_iterator __it = begin(); __it != end(); ++__it) { _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); _Const_Link_type __L = _S_left(__x); _Const_Link_type __R = _S_right(__x); if (__x->_M_color == _S_red) if ((__L && __L->_M_color == _S_red) || (__R && __R->_M_color == _S_red)) return false; if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) return false; if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) return false; if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) return false; } if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) return false; if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) return false; return true; } } # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/map" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 1 3 # 66 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 88 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 template , typename _Alloc = std::allocator > > class map { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::value_type _Alloc_value_type; public: class value_compare : public std::binary_function { friend class map<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; value_compare(_Compare __c) : comp(__c) { } public: bool operator()(const value_type& __x, const value_type& __y) const { return comp(__x.first, __y.first); } }; private: typedef typename _Alloc::template rebind::other _Pair_alloc_type; typedef _Rb_tree, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Pair_alloc_type::pointer pointer; typedef typename _Pair_alloc_type::const_pointer const_pointer; typedef typename _Pair_alloc_type::reference reference; typedef typename _Pair_alloc_type::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; map() : _M_t() { } explicit map(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { } # 174 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 map(const map& __x) : _M_t(__x._M_t) { } # 185 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 map(map&& __x) noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } # 200 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 map(initializer_list __l, const _Compare& __comp = _Compare(), const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_unique(__l.begin(), __l.end()); } # 217 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 template map(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_unique(__first, __last); } # 234 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 template map(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_unique(__first, __last); } # 257 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 map& operator=(const map& __x) { _M_t = __x._M_t; return *this; } # 272 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 map& operator=(map&& __x) { this->clear(); this->swap(__x); return *this; } # 293 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 map& operator=(initializer_list __l) { this->clear(); this->insert(__l.begin(), __l.end()); return *this; } allocator_type get_allocator() const noexcept { return allocator_type(_M_t.get_allocator()); } iterator begin() noexcept { return _M_t.begin(); } const_iterator begin() const noexcept { return _M_t.begin(); } iterator end() noexcept { return _M_t.end(); } const_iterator end() const noexcept { return _M_t.end(); } reverse_iterator rbegin() noexcept { return _M_t.rbegin(); } const_reverse_iterator rbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator rend() noexcept { return _M_t.rend(); } const_reverse_iterator rend() const noexcept { return _M_t.rend(); } const_iterator cbegin() const noexcept { return _M_t.begin(); } const_iterator cend() const noexcept { return _M_t.end(); } const_reverse_iterator crbegin() const noexcept { return _M_t.rbegin(); } const_reverse_iterator crend() const noexcept { return _M_t.rend(); } bool empty() const noexcept { return _M_t.empty(); } size_type size() const noexcept { return _M_t.size(); } size_type max_size() const noexcept { return _M_t.max_size(); } # 449 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 mapped_type& operator[](const key_type& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __i = insert(__i, value_type(__k, mapped_type())); return (*__i).second; } mapped_type& operator[](key_type&& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __i = insert(__i, std::make_pair(std::move(__k), mapped_type())); return (*__i).second; } # 486 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 mapped_type& at(const key_type& __k) { iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __throw_out_of_range(("map::at")); return (*__i).second; } const mapped_type& at(const key_type& __k) const { const_iterator __i = lower_bound(__k); if (__i == end() || key_comp()(__k, (*__i).first)) __throw_out_of_range(("map::at")); return (*__i).second; } # 521 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 std::pair insert(const value_type& __x) { return _M_t._M_insert_unique(__x); } template::value>::type> std::pair insert(_Pair&& __x) { return _M_t._M_insert_unique(std::forward<_Pair>(__x)); } # 542 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 void insert(std::initializer_list __list) { insert(__list.begin(), __list.end()); } # 570 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 iterator insert(const_iterator __position, const value_type& __x) { return _M_t._M_insert_unique_(__position, __x); } template::value>::type> iterator insert(const_iterator __position, _Pair&& __x) { return _M_t._M_insert_unique_(__position, std::forward<_Pair>(__x)); } # 596 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_unique(__first, __last); } # 617 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 iterator erase(const_iterator __position) { return _M_t.erase(__position); } # 647 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 667 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 iterator erase(const_iterator __first, const_iterator __last) { return _M_t.erase(__first, __last); } # 699 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 void swap(map& __x) { _M_t.swap(__x._M_t); } void clear() noexcept { _M_t.clear(); } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return value_compare(_M_t.key_comp()); } # 742 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } # 757 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } # 769 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 size_type count(const key_type& __x) const { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } # 784 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } # 799 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 838 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } # 857 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator==(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); template friend bool operator<(const map<_K1, _T1, _C1, _A1>&, const map<_K1, _T1, _C1, _A1>&); }; # 882 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 template inline bool operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 899 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_map.h" 3 template inline bool operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template inline bool operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, const map<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(map<_Key, _Tp, _Compare, _Alloc>& __x, map<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/map" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 1 3 # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 87 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 template , typename _Alloc = std::allocator > > class multimap { public: typedef _Key key_type; typedef _Tp mapped_type; typedef std::pair value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::value_type _Alloc_value_type; public: class value_compare : public std::binary_function { friend class multimap<_Key, _Tp, _Compare, _Alloc>; protected: _Compare comp; value_compare(_Compare __c) : comp(__c) { } public: bool operator()(const value_type& __x, const value_type& __y) const { return comp(__x.first, __y.first); } }; private: typedef typename _Alloc::template rebind::other _Pair_alloc_type; typedef _Rb_tree, key_compare, _Pair_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Pair_alloc_type::pointer pointer; typedef typename _Pair_alloc_type::const_pointer const_pointer; typedef typename _Pair_alloc_type::reference reference; typedef typename _Pair_alloc_type::const_reference const_reference; typedef typename _Rep_type::iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; typedef typename _Rep_type::reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; multimap() : _M_t() { } explicit multimap(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { } # 172 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 multimap(const multimap& __x) : _M_t(__x._M_t) { } # 183 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 multimap(multimap&& __x) noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } # 197 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 multimap(initializer_list __l, const _Compare& __comp = _Compare(), const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_equal(__l.begin(), __l.end()); } # 213 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 template multimap(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_equal(__first, __last); } # 229 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 template multimap(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Pair_alloc_type(__a)) { _M_t._M_insert_equal(__first, __last); } # 252 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 multimap& operator=(const multimap& __x) { _M_t = __x._M_t; return *this; } # 267 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 multimap& operator=(multimap&& __x) { this->clear(); this->swap(__x); return *this; } # 288 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 multimap& operator=(initializer_list __l) { this->clear(); this->insert(__l.begin(), __l.end()); return *this; } allocator_type get_allocator() const noexcept { return allocator_type(_M_t.get_allocator()); } iterator begin() noexcept { return _M_t.begin(); } const_iterator begin() const noexcept { return _M_t.begin(); } iterator end() noexcept { return _M_t.end(); } const_iterator end() const noexcept { return _M_t.end(); } reverse_iterator rbegin() noexcept { return _M_t.rbegin(); } const_reverse_iterator rbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator rend() noexcept { return _M_t.rend(); } const_reverse_iterator rend() const noexcept { return _M_t.rend(); } const_iterator cbegin() const noexcept { return _M_t.begin(); } const_iterator cend() const noexcept { return _M_t.end(); } const_reverse_iterator crbegin() const noexcept { return _M_t.rbegin(); } const_reverse_iterator crend() const noexcept { return _M_t.rend(); } bool empty() const noexcept { return _M_t.empty(); } size_type size() const noexcept { return _M_t.size(); } size_type max_size() const noexcept { return _M_t.max_size(); } # 442 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 iterator insert(const value_type& __x) { return _M_t._M_insert_equal(__x); } template::value>::type> iterator insert(_Pair&& __x) { return _M_t._M_insert_equal(std::forward<_Pair>(__x)); } # 475 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 iterator insert(const_iterator __position, const value_type& __x) { return _M_t._M_insert_equal_(__position, __x); } template::value>::type> iterator insert(const_iterator __position, _Pair&& __x) { return _M_t._M_insert_equal_(__position, std::forward<_Pair>(__x)); } # 502 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_equal(__first, __last); } # 515 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 void insert(initializer_list __l) { this->insert(__l.begin(), __l.end()); } # 536 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 iterator erase(const_iterator __position) { return _M_t.erase(__position); } # 566 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 587 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 iterator erase(const_iterator __first, const_iterator __last) { return _M_t.erase(__first, __last); } # 622 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 void swap(multimap& __x) { _M_t.swap(__x._M_t); } void clear() noexcept { _M_t.clear(); } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return value_compare(_M_t.key_comp()); } # 665 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } # 680 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 const_iterator find(const key_type& __x) const { return _M_t.find(__x); } size_type count(const key_type& __x) const { return _M_t.count(__x); } # 704 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } # 719 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 756 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } # 773 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator==(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); template friend bool operator<(const multimap<_K1, _T1, _C1, _A1>&, const multimap<_K1, _T1, _C1, _A1>&); }; # 798 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 template inline bool operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 815 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multimap.h" 3 template inline bool operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template inline bool operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, const multimap<_Key, _Tp, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, multimap<_Key, _Tp, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/map" 2 3 # 56 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Profile_counter.h" 2 namespace CGAL { struct Profile_counter { Profile_counter(const std::string & ss) : i(0), s(ss) {} void operator++() { ++i; } ~Profile_counter() { std::cerr << "[CGAL::Profile_counter] " << std::setw(10) << i << " " << s << std::endl; } private: unsigned int i; const std::string s; }; struct Profile_histogram_counter { Profile_histogram_counter(const std::string & ss) : s(ss) {} void operator()(unsigned i) { ++counters[i]; } ~Profile_histogram_counter() { unsigned total=0; for (Counters::const_iterator it=counters.begin(), end=counters.end(); it != end; ++it) { std::cerr << "[CGAL::Profile_histogram_counter] " << s; std::cerr << " [ " << std::setw(10) << it->first << " : " << std::setw(10) << it->second << " ]" << std::endl; total += it->second; } std::cerr << "[CGAL::Profile_histogram_counter] " << s; std::cerr << " [ " << std::setw(10) << "Total" << " : " << std::setw(10) << total << " ]" << std::endl; } private: typedef std::map Counters; Counters counters; const std::string s; }; struct Profile_branch_counter { Profile_branch_counter(const std::string & ss) : i(0), j(0), s(ss) {} void operator++() { ++i; } void increment_branch() { ++j; } ~Profile_branch_counter() { std::cerr << "[CGAL::Profile_branch_counter] " << std::setw(10) << j << " / " << std::setw(10) << i << " " << s << std::endl; } private: unsigned int i, j; const std::string s; }; struct Profile_branch_counter_3 { Profile_branch_counter_3(const std::string & ss) : i(0), j(0), k(0), s(ss) {} void operator++() { ++i; } void increment_branch_1() { ++j; } void increment_branch_2() { ++k; } ~Profile_branch_counter_3() { std::cerr << "[CGAL::Profile_branch_counter_3] " << std::setw(10) << k << " / " << std::setw(10) << j << " / " << std::setw(10) << i << " " << s << std::endl; } private: unsigned int i, j, k; const std::string s; }; # 180 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Profile_counter.h" } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stdexcept" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stdexcept" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stdexcept" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 56 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stdexcept" 3 class logic_error : public exception { string _M_msg; public: explicit logic_error(const string& __arg); virtual ~logic_error() throw(); virtual const char* what() const throw(); }; class domain_error : public logic_error { public: explicit domain_error(const string& __arg); virtual ~domain_error() throw(); }; class invalid_argument : public logic_error { public: explicit invalid_argument(const string& __arg); virtual ~invalid_argument() throw(); }; class length_error : public logic_error { public: explicit length_error(const string& __arg); virtual ~length_error() throw(); }; class out_of_range : public logic_error { public: explicit out_of_range(const string& __arg); virtual ~out_of_range() throw(); }; class runtime_error : public exception { string _M_msg; public: explicit runtime_error(const string& __arg); virtual ~runtime_error() throw(); virtual const char* what() const throw(); }; class range_error : public runtime_error { public: explicit range_error(const string& __arg); virtual ~range_error() throw(); }; class overflow_error : public runtime_error { public: explicit overflow_error(const string& __arg); virtual ~overflow_error() throw(); }; class underflow_error : public runtime_error { public: explicit underflow_error(const string& __arg); virtual ~underflow_error() throw(); }; } # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" 2 namespace CGAL { namespace internal { template < typename T > struct Minmax_traits; template <> struct Minmax_traits { static const bool min = false; static const bool max = true; }; template <> struct Minmax_traits { static const Sign min = NEGATIVE; static const Sign max = POSITIVE; }; template <> struct Minmax_traits { static const Bounded_side min = ON_UNBOUNDED_SIDE; static const Bounded_side max = ON_BOUNDED_SIDE; }; template <> struct Minmax_traits { static const Angle min = OBTUSE; static const Angle max = ACUTE; }; } class Uncertain_conversion_exception : public std::range_error { public: Uncertain_conversion_exception(const std::string &s) : std::range_error(s) {} ~Uncertain_conversion_exception() throw() {} }; template < typename T > class Uncertain { T _i, _s; public: typedef T value_type; typedef CGAL::Uncertain_conversion_exception Uncertain_conversion_exception; Uncertain() : _i(), _s() {} Uncertain(T t) : _i(t), _s(t) {} Uncertain(T i, T s) : _i(i), _s(s) { (CGAL::possibly(i <= s)?(static_cast(0)): ::CGAL::precondition_fail( "i <= s" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h", 103)); } Uncertain& operator=(T t) { _i = _s = t; return *this; } T inf() const { return _i; } T sup() const { return _s; } bool is_same(Uncertain u) const { return _i == u._i && _s == u._s; } bool is_certain() const { return _i == _s; } T make_certain() const { if (is_certain()) return _i; ; throw Uncertain_conversion_exception( "Undecidable conversion of CGAL::Uncertain"); } operator T() const { return make_certain(); } # 150 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" static Uncertain indeterminate(); }; template < typename T > inline T inf(Uncertain i) { return i.inf(); } template < typename T > inline T sup(Uncertain i) { return i.sup(); } # 179 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" template < typename T > inline bool is_certain(T) { return true; } template < typename T > inline T get_certain(T t) { return t; } template < typename T > inline bool is_certain(Uncertain a) { return a.is_certain(); } template < typename T > inline T get_certain(Uncertain a) { (CGAL::possibly(is_certain(a))?(static_cast(0)): ::CGAL::assertion_fail( "is_certain(a)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h", 205)); return a.inf(); } template < typename T > inline Uncertain Uncertain::indeterminate() { return Uncertain(internal::Minmax_traits::min, internal::Minmax_traits::max); } namespace internal { template < typename T > struct Indeterminate_helper { typedef T result_type; result_type operator()() const { return T(); } }; template < typename T > struct Indeterminate_helper< Uncertain > { typedef Uncertain result_type; result_type operator()() const { return Uncertain::indeterminate(); } }; } template < typename T > inline typename internal::Indeterminate_helper::result_type indeterminate() { return internal::Indeterminate_helper()(); } template < typename T > inline bool is_indeterminate(T) { return false; } template < typename T > inline bool is_indeterminate(Uncertain a) { return ! a.is_certain(); } inline bool certainly(bool b) { return b; } inline bool possibly(bool b) { return b; } inline bool certainly_not(bool b) { return !b; } inline bool possibly_not(bool b) { return !b; } inline bool certainly(Uncertain c) { return is_certain(c) && get_certain(c); } inline bool possibly(Uncertain c) { return !is_certain(c) || get_certain(c); } inline bool certainly_not(Uncertain c) { return is_certain(c) && !get_certain(c); } inline bool possibly_not(Uncertain c) { return !is_certain(c) || !get_certain(c); } inline Uncertain operator!(Uncertain a) { return Uncertain(!a.sup(), !a.inf()); } inline Uncertain operator|(Uncertain a, Uncertain b) { return Uncertain(a.inf() | b.inf(), a.sup() | b.sup()); } inline Uncertain operator|(bool a, Uncertain b) { return Uncertain(a | b.inf(), a | b.sup()); } inline Uncertain operator|(Uncertain a, bool b) { return Uncertain(a.inf() | b, a.sup() | b); } inline Uncertain operator&(Uncertain a, Uncertain b) { return Uncertain(a.inf() & b.inf(), a.sup() & b.sup()); } inline Uncertain operator&(bool a, Uncertain b) { return Uncertain(a & b.inf(), a & b.sup()); } inline Uncertain operator&(Uncertain a, bool b) { return Uncertain(a.inf() & b, a.sup() & b); } # 366 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" template < typename T > inline Uncertain operator==(Uncertain a, Uncertain b) { if (a.sup() < b.inf() || b.sup() < a.inf()) return false; if (is_certain(a) && is_certain(b)) return true; return Uncertain::indeterminate(); } template < typename T > inline Uncertain operator==(Uncertain a, T b) { if (a.sup() < b || b < a.inf()) return false; if (is_certain(a)) return true; return Uncertain::indeterminate(); } template < typename T > inline Uncertain operator==(T a, Uncertain b) { return b == a; } template < typename T > inline Uncertain operator!=(Uncertain a, Uncertain b) { return ! (a == b); } template < typename T > inline Uncertain operator!=(Uncertain a, T b) { return ! (a == b); } template < typename T > inline Uncertain operator!=(T a, Uncertain b) { return ! (a == b); } template < typename T > inline Uncertain operator<(Uncertain a, Uncertain b) { if (a.sup() < b.inf()) return true; if (a.inf() >= b.sup()) return false; return Uncertain::indeterminate(); } template < typename T > inline Uncertain operator<(Uncertain a, T b) { if (a.sup() < b) return true; if (a.inf() >= b) return false; return Uncertain::indeterminate(); } template < typename T > inline Uncertain operator<(T a, Uncertain b) { if (a < b.inf()) return true; if (a >= b.sup()) return false; return Uncertain::indeterminate(); } template < typename T > inline Uncertain operator>(Uncertain a, Uncertain b) { return b < a; } template < typename T > inline Uncertain operator>(Uncertain a, T b) { return b < a; } template < typename T > inline Uncertain operator>(T a, Uncertain b) { return b < a; } template < typename T > inline Uncertain operator<=(Uncertain a, Uncertain b) { return !(b < a); } template < typename T > inline Uncertain operator<=(Uncertain a, T b) { return !(b < a); } template < typename T > inline Uncertain operator<=(T a, Uncertain b) { return !(b < a); } template < typename T > inline Uncertain operator>=(Uncertain a, Uncertain b) { return !(a < b); } template < typename T > inline Uncertain operator>=(Uncertain a, T b) { return !(a < b); } template < typename T > inline Uncertain operator>=(T a, Uncertain b) { return !(a < b); } template < typename T > inline Uncertain make_uncertain(T t) { return Uncertain(t); } template < typename T > inline Uncertain make_uncertain(Uncertain t) { return t; } template < typename T > inline T make_certain(T t) { return t; } template < typename T > inline T make_certain(Uncertain t) { return t.make_certain(); } template < typename T > inline Uncertain operator-(Uncertain u) { return Uncertain(-u.sup(), -u.inf()); } template < typename T > Uncertain operator*(Uncertain a, Uncertain b) { if (a.inf() >= 0) { T aa = a.inf(), bb = a.sup(); if (b.inf() < 0) { aa = bb; if (b.sup() < 0) bb = a.inf(); } return Uncertain(aa * b.inf(), bb * b.sup()); } else if (a.sup()<=0) { T aa = a.sup(), bb = a.inf(); if (b.inf() < 0) { aa=bb; if (b.sup() < 0) bb=a.sup(); } return Uncertain(bb * b.sup(), aa * b.inf()); } else { if (b.inf()>=0) return Uncertain(a.inf() * b.sup(), a.sup() * b.sup()); if (b.sup()<=0) return Uncertain(a.sup() * b.inf(), a.inf() * b.inf()); T tmp1 = a.inf() * b.sup(); T tmp2 = a.sup() * b.inf(); T tmp3 = a.inf() * b.inf(); T tmp4 = a.sup() * b.sup(); return Uncertain((std::min)(tmp1, tmp2), (std::max)(tmp3, tmp4)); } } template < typename T > inline Uncertain operator*(T a, Uncertain b) { return Uncertain(a) * b; } template < typename T > inline Uncertain operator*(Uncertain a, T b) { return a * Uncertain(b); } # 637 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Uncertain.h" template < typename T, typename U > inline Uncertain enum_cast(Uncertain u) { return Uncertain(static_cast(u.inf()), static_cast(u.sup())); } } # 312 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 2 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tags.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tags.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/io_tags.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/io_tags.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/io_tags.h" 2 namespace CGAL { struct io_Read_write{}; struct io_Extract_insert{}; struct io_Operator{}; template struct Io_traits{ typedef io_Operator Io_tag; }; template<> struct Io_traits{ typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits{ typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; template<> struct Io_traits { typedef io_Read_write Io_tag; }; } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tags.h" 2 namespace CGAL { struct Void {}; template struct Boolean_tag { static const bool value = b; }; typedef Boolean_tag Tag_true; typedef Boolean_tag Tag_false; inline bool check_tag( Tag_true) {return true;} inline bool check_tag( Tag_false) {return false;} struct Null_tag {}; struct Null_functor { }; # 66 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tags.h" template struct Assert_tag_class { void match_compile_time_tag( const Base&) const {} }; template inline void Assert_compile_time_tag( const Tag&, const Derived& b) { Assert_tag_class x; x.match_compile_time_tag(b); } template < class T> inline void assert_equal_types( const T&, const T&) {} } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 1 # 48 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 1 # 49 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_same.hpp" 1 # 24 "/localhome/glisse2/include/boost/type_traits/is_same.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/config.hpp" 1 # 16 "/localhome/glisse2/include/boost/type_traits/config.hpp" # 1 "/localhome/glisse2/include/boost/detail/workaround.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/config.hpp" 2 # 25 "/localhome/glisse2/include/boost/type_traits/is_same.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 10 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" # 1 "/localhome/glisse2/include/boost/mpl/int.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/int.hpp" # 1 "/localhome/glisse2/include/boost/mpl/int_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/int_fwd.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/adl_barrier.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/adl_barrier.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/adl.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/config/adl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/msvc.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/config/adl.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/intel.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/config/adl.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/gcc.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/config/adl.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/workaround.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/aux_/config/adl.hpp" 2 # 18 "/localhome/glisse2/include/boost/mpl/aux_/adl_barrier.hpp" 2 # 33 "/localhome/glisse2/include/boost/mpl/aux_/adl_barrier.hpp" namespace mpl_ { namespace aux {} } namespace boost { namespace mpl { using namespace mpl_; namespace aux { using namespace mpl_::aux; } }} # 18 "/localhome/glisse2/include/boost/mpl/int_fwd.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/nttp_decl.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/nttp_decl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/nttp.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/nttp_decl.hpp" 2 # 19 "/localhome/glisse2/include/boost/mpl/int_fwd.hpp" 2 namespace mpl_ { template< int N > struct int_; } namespace boost { namespace mpl { using ::mpl_::int_; } } # 18 "/localhome/glisse2/include/boost/mpl/int.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" 1 # 16 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" # 1 "/localhome/glisse2/include/boost/mpl/integral_c_tag.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/integral_c_tag.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/static_constant.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/integral_c_tag.hpp" 2 namespace mpl_ { struct integral_c_tag { static const int value = 0; }; } namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } # 17 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/static_cast.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/cat.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/cat.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/config/config.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/cat.hpp" 2 # 23 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" 2 # 40 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" namespace mpl_ { template< int N > struct int_ { static const int value = N; typedef int_ type; typedef int value_type; typedef integral_c_tag tag; # 72 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" typedef mpl_::int_< static_cast((value + 1)) > next; typedef mpl_::int_< static_cast((value - 1)) > prior; operator int() const { return static_cast(this->value); } }; template< int N > int const mpl_::int_< N >::value; } # 21 "/localhome/glisse2/include/boost/mpl/int.hpp" 2 # 11 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/template_arity_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/template_arity_fwd.hpp" namespace boost { namespace mpl { namespace aux { template< typename F > struct template_arity; }}} # 12 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/params.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/params.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/preprocessor.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/params.hpp" 2 # 45 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/params.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/comma_if.hpp" 1 # 15 "/localhome/glisse2/include/boost/preprocessor/comma_if.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/punctuation/comma_if.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/punctuation/comma_if.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/control/if.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/control/if.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/control/iif.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/control/if.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/logical/bool.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/control/if.hpp" 2 # 19 "/localhome/glisse2/include/boost/preprocessor/punctuation/comma_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/facilities/empty.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/punctuation/comma_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/punctuation/comma.hpp" 1 # 21 "/localhome/glisse2/include/boost/preprocessor/punctuation/comma_if.hpp" 2 # 16 "/localhome/glisse2/include/boost/preprocessor/comma_if.hpp" 2 # 46 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/params.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/repeat.hpp" 1 # 15 "/localhome/glisse2/include/boost/preprocessor/repeat.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/debug/error.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 21 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/tuple/eat.hpp" 1 # 22 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat.hpp" 2 # 16 "/localhome/glisse2/include/boost/preprocessor/repeat.hpp" 2 # 47 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/params.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/inc.hpp" 1 # 15 "/localhome/glisse2/include/boost/preprocessor/inc.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/arithmetic/inc.hpp" 1 # 16 "/localhome/glisse2/include/boost/preprocessor/inc.hpp" 2 # 48 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/params.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/lambda.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/config/lambda.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/ttp.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/config/lambda.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/ctps.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/config/lambda.hpp" 2 # 14 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/overload_resolution.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/integral_constant.hpp" 1 # 10 "/localhome/glisse2/include/boost/type_traits/integral_constant.hpp" # 1 "/localhome/glisse2/include/boost/mpl/bool.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/bool.hpp" # 1 "/localhome/glisse2/include/boost/mpl/bool_fwd.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/bool_fwd.hpp" namespace mpl_ { template< bool C_ > struct bool_; typedef bool_ true_; typedef bool_ false_; } namespace boost { namespace mpl { using ::mpl_::bool_; } } namespace boost { namespace mpl { using ::mpl_::true_; } } namespace boost { namespace mpl { using ::mpl_::false_; } } # 18 "/localhome/glisse2/include/boost/mpl/bool.hpp" 2 namespace mpl_ { template< bool C_ > struct bool_ { static const bool value = C_; typedef integral_c_tag tag; typedef bool_ type; typedef bool value_type; operator bool() const { return this->value; } }; template< bool C_ > bool const bool_::value; } # 11 "/localhome/glisse2/include/boost/type_traits/integral_constant.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/integral_c.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/integral_c.hpp" # 1 "/localhome/glisse2/include/boost/mpl/integral_c_fwd.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/integral_c_fwd.hpp" namespace mpl_ { template< typename T, T N > struct integral_c; } namespace boost { namespace mpl { using ::mpl_::integral_c; } } # 18 "/localhome/glisse2/include/boost/mpl/integral_c.hpp" 2 # 32 "/localhome/glisse2/include/boost/mpl/integral_c.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" 1 # 40 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" namespace mpl_ { template< typename T, T N > struct integral_c { static const T value = N; typedef integral_c type; typedef T value_type; typedef integral_c_tag tag; # 72 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" typedef integral_c< T, static_cast((value + 1)) > next; typedef integral_c< T, static_cast((value - 1)) > prior; operator T() const { return static_cast(this->value); } }; template< typename T, T N > T const integral_c< T, N >::value; } # 33 "/localhome/glisse2/include/boost/mpl/integral_c.hpp" 2 namespace mpl_ { template< bool C > struct integral_c { static const bool value = C; typedef integral_c_tag tag; typedef integral_c type; typedef bool value_type; operator bool() const { return this->value; } }; } # 12 "/localhome/glisse2/include/boost/type_traits/integral_constant.hpp" 2 namespace boost{ template struct integral_constant : public mpl::integral_c { typedef integral_constant type; }; template<> struct integral_constant : public mpl::true_ { typedef integral_constant type; }; template<> struct integral_constant : public mpl::false_ { typedef integral_constant type; }; typedef integral_constant true_type; typedef integral_constant false_type; } # 16 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/lambda_support.hpp" 1 # 18 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 32 "/localhome/glisse2/include/boost/type_traits/is_same.hpp" 2 namespace boost { template< typename T, typename U > struct is_same : public ::boost::integral_constant { public: }; template< typename T > struct is_same< T,T > : public ::boost::integral_constant { public: }; # 98 "/localhome/glisse2/include/boost/type_traits/is_same.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 101 "/localhome/glisse2/include/boost/type_traits/is_same.hpp" 2 # 52 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient_fwd.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient_fwd.h" namespace CGAL{ template < typename NT > struct Split_double; template class Quotient; } # 55 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/mpl.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/mpl.h" namespace CGAL { template < typename A, typename B, int = 0 > struct First_if_different { typedef A Type; }; template < typename A, int i > struct First_if_different { struct Type{}; }; } # 57 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Coercion_traits.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Coercion_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Coercion_traits.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iterator" 1 3 # 58 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iterator" 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iterator" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stream_iterator.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stream_iterator.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stream_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template, typename _Dist = ptrdiff_t> class istream_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_istream<_CharT, _Traits> istream_type; private: istream_type* _M_stream; _Tp _M_value; bool _M_ok; public: constexpr istream_iterator() : _M_stream(0), _M_value(), _M_ok(false) {} istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); } istream_iterator(const istream_iterator& __obj) : _M_stream(__obj._M_stream), _M_value(__obj._M_value), _M_ok(__obj._M_ok) { } const _Tp& operator*() const { ; return _M_value; } const _Tp* operator->() const { return &(operator*()); } istream_iterator& operator++() { ; _M_read(); return *this; } istream_iterator operator++(int) { ; istream_iterator __tmp = *this; _M_read(); return __tmp; } bool _M_equal(const istream_iterator& __x) const { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } private: void _M_read() { _M_ok = (_M_stream && *_M_stream) ? true : false; if (_M_ok) { *_M_stream >> _M_value; _M_ok = *_M_stream ? true : false; } } }; template inline bool operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return __x._M_equal(__y); } template inline bool operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) { return !__x._M_equal(__y); } # 152 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stream_iterator.h" 3 template > class ostream_iterator : public iterator { public: typedef _CharT char_type; typedef _Traits traits_type; typedef basic_ostream<_CharT, _Traits> ostream_type; private: ostream_type* _M_stream; const _CharT* _M_string; public: ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} # 183 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stream_iterator.h" 3 ostream_iterator(ostream_type& __s, const _CharT* __c) : _M_stream(&__s), _M_string(__c) { } ostream_iterator(const ostream_iterator& __obj) : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } ostream_iterator& operator=(const _Tp& __value) { ; *_M_stream << __value; if (_M_string) *_M_stream << _M_string; return *this; } ostream_iterator& operator*() { return *this; } ostream_iterator& operator++() { return *this; } ostream_iterator& operator++(int) { return *this; } }; } # 67 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/iterator" 2 3 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Coercion_traits.h" 2 # 1 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 1 # 10 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" # 1 "/localhome/glisse2/include/boost/iterator.hpp" 1 # 18 "/localhome/glisse2/include/boost/iterator.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 19 "/localhome/glisse2/include/boost/iterator.hpp" 2 namespace boost { # 39 "/localhome/glisse2/include/boost/iterator.hpp" namespace detail { template struct iterator_base : std::iterator {}; # 51 "/localhome/glisse2/include/boost/iterator.hpp" } template struct iterator : boost::detail::iterator_base {}; } # 11 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/detail/enable_if.hpp" 1 # 11 "/localhome/glisse2/include/boost/iterator/detail/enable_if.hpp" # 1 "/localhome/glisse2/include/boost/mpl/identity.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/identity.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/na_spec.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/na_spec.hpp" # 1 "/localhome/glisse2/include/boost/mpl/lambda_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/lambda_fwd.hpp" # 1 "/localhome/glisse2/include/boost/mpl/void_fwd.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/void_fwd.hpp" namespace mpl_ { struct void_; } namespace boost { namespace mpl { using ::mpl_::void_; } } # 18 "/localhome/glisse2/include/boost/mpl/lambda_fwd.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/na.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/na.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/na_fwd.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/na_fwd.hpp" namespace mpl_ { struct na { typedef na type; enum { value = 0 }; }; } namespace boost { namespace mpl { using ::mpl_::na; } } # 19 "/localhome/glisse2/include/boost/mpl/aux_/na.hpp" 2 namespace boost { namespace mpl { template< typename T > struct is_na : false_ { }; template<> struct is_na : true_ { }; template< typename T > struct is_not_na : true_ { }; template<> struct is_not_na : false_ { }; template< typename T, typename U > struct if_na { typedef T type; }; template< typename U > struct if_na { typedef U type; }; # 93 "/localhome/glisse2/include/boost/mpl/aux_/na.hpp" }} # 19 "/localhome/glisse2/include/boost/mpl/lambda_fwd.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/lambda_arity_param.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/lambda_fwd.hpp" 2 namespace boost { namespace mpl { template< typename T = na , typename Tag = void_ , typename Arity = int_< aux::template_arity::value > > struct lambda; }} # 19 "/localhome/glisse2/include/boost/mpl/aux_/na_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/arity.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/arity.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/dtp.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/arity.hpp" 2 # 23 "/localhome/glisse2/include/boost/mpl/aux_/na_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/enum.hpp" 1 # 28 "/localhome/glisse2/include/boost/mpl/aux_/na_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" # 1 "/localhome/glisse2/include/boost/mpl/limits/arity.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/logical/and.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/logical/and.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/logical/bitand.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/logical/and.hpp" 2 # 23 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/identity.hpp" 1 # 15 "/localhome/glisse2/include/boost/preprocessor/identity.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/facilities/identity.hpp" 1 # 16 "/localhome/glisse2/include/boost/preprocessor/identity.hpp" 2 # 24 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/empty.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 # 66 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/arithmetic/add.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/arithmetic/add.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/arithmetic/dec.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/arithmetic/add.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 21 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/list/fold_left.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/list/fold_left.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/list/fold_left.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 21 "/localhome/glisse2/include/boost/preprocessor/list/fold_left.hpp" 2 # 41 "/localhome/glisse2/include/boost/preprocessor/list/fold_left.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/list/detail/fold_left.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/list/detail/fold_left.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/control/expr_iif.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/list/detail/fold_left.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/list/adt.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/list/adt.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/is_binary.hpp" 1 # 16 "/localhome/glisse2/include/boost/preprocessor/detail/is_binary.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/check.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/detail/is_binary.hpp" 2 # 19 "/localhome/glisse2/include/boost/preprocessor/list/adt.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/logical/compl.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/list/adt.hpp" 2 # 20 "/localhome/glisse2/include/boost/preprocessor/list/detail/fold_left.hpp" 2 # 42 "/localhome/glisse2/include/boost/preprocessor/list/fold_left.hpp" 2 # 22 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/list/fold_right.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/list/fold_right.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 21 "/localhome/glisse2/include/boost/preprocessor/list/fold_right.hpp" 2 # 37 "/localhome/glisse2/include/boost/preprocessor/list/fold_right.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/list/detail/fold_right.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/list/detail/fold_right.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/list/reverse.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/list/detail/fold_right.hpp" 2 # 38 "/localhome/glisse2/include/boost/preprocessor/list/fold_right.hpp" 2 # 23 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" 2 # 48 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/control/detail/while.hpp" 1 # 49 "/localhome/glisse2/include/boost/preprocessor/control/while.hpp" 2 # 21 "/localhome/glisse2/include/boost/preprocessor/arithmetic/add.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/tuple/elem.hpp" 1 # 22 "/localhome/glisse2/include/boost/preprocessor/arithmetic/add.hpp" 2 # 67 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/arithmetic/sub.hpp" 1 # 68 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 # 29 "/localhome/glisse2/include/boost/mpl/aux_/na_spec.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/eti.hpp" 1 # 32 "/localhome/glisse2/include/boost/mpl/aux_/na_spec.hpp" 2 # 18 "/localhome/glisse2/include/boost/mpl/identity.hpp" 2 namespace boost { namespace mpl { template< typename T = na > struct identity { typedef T type; }; template< typename T = na > struct make_identity { typedef identity type; }; template<> struct identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : identity< T1 > { }; }; template< typename Tag > struct lambda< identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef identity< na > result_; typedef identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< identity< T1 > > : int_<1> { }; template<> struct template_arity< identity< na > > : int_<-1> { }; } template<> struct make_identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : make_identity< T1 > { }; }; template< typename Tag > struct lambda< make_identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef make_identity< na > result_; typedef make_identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< make_identity< T1 > > : int_<1> { }; template<> struct template_arity< make_identity< na > > : int_<-1> { }; } }} # 12 "/localhome/glisse2/include/boost/iterator/detail/enable_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/detail/config_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/iterator/detail/enable_if.hpp" 2 namespace boost { namespace iterators { template struct enabled { template struct base { typedef T type; }; }; template<> struct enabled { template struct base { # 62 "/localhome/glisse2/include/boost/iterator/detail/enable_if.hpp" }; }; template struct enable_if : enabled<(Cond::value)>::template base { }; } } # 1 "/localhome/glisse2/include/boost/iterator/detail/config_undef.hpp" 1 # 85 "/localhome/glisse2/include/boost/iterator/detail/enable_if.hpp" 2 # 12 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" 1 # 10 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" # 1 "/localhome/glisse2/include/boost/static_assert.hpp" 1 # 11 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" 2 # 1 "/localhome/glisse2/include/boost/detail/iterator.hpp" 1 # 77 "/localhome/glisse2/include/boost/detail/iterator.hpp" namespace boost { namespace detail { template struct iterator_traits : std::iterator_traits {}; using std::distance; }} # 13 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" 1 # 11 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" # 1 "/localhome/glisse2/include/boost/iterator/detail/config_def.hpp" 1 # 12 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/eval_if.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/eval_if.hpp" # 1 "/localhome/glisse2/include/boost/mpl/if.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/if.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/value_wknd.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/value_wknd.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/integral.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/value_wknd.hpp" 2 # 73 "/localhome/glisse2/include/boost/mpl/aux_/value_wknd.hpp" namespace boost { namespace mpl { namespace aux { template< typename T > struct value_type_wknd { typedef typename T::value_type type; }; # 87 "/localhome/glisse2/include/boost/mpl/aux_/value_wknd.hpp" }}} # 18 "/localhome/glisse2/include/boost/mpl/if.hpp" 2 namespace boost { namespace mpl { template< bool C , typename T1 , typename T2 > struct if_c { typedef T1 type; }; template< typename T1 , typename T2 > struct if_c { typedef T2 type; }; template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; public: typedef typename almost_type_::type type; }; # 131 "/localhome/glisse2/include/boost/mpl/if.hpp" template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } }} # 18 "/localhome/glisse2/include/boost/mpl/eval_if.hpp" 2 namespace boost { namespace mpl { template< typename C = na , typename F1 = na , typename F2 = na > struct eval_if { typedef typename if_::type f_; typedef typename f_::type type; }; template< bool C , typename F1 , typename F2 > struct eval_if_c { typedef typename if_c::type f_; typedef typename f_::type type; }; template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; } }} # 16 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/placeholders.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/placeholders.hpp" # 1 "/localhome/glisse2/include/boost/mpl/arg.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/arg.hpp" # 1 "/localhome/glisse2/include/boost/mpl/arg_fwd.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/arg_fwd.hpp" namespace mpl_ { template< int N > struct arg; } namespace boost { namespace mpl { using ::mpl_::arg; } } # 24 "/localhome/glisse2/include/boost/mpl/arg.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/na_assert.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/na_assert.hpp" # 1 "/localhome/glisse2/include/boost/mpl/assert.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/assert.hpp" # 1 "/localhome/glisse2/include/boost/mpl/not.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/not.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/nested_type_wknd.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/aux_/nested_type_wknd.hpp" namespace boost { namespace mpl { namespace aux { template< typename T > struct nested_type_wknd : T::type { }; }}} # 20 "/localhome/glisse2/include/boost/mpl/not.hpp" 2 namespace boost { namespace mpl { namespace aux { template< long C_ > struct not_impl : bool_ { }; } template< typename T = na > struct not_ : aux::not_impl< ::boost::mpl::aux::nested_type_wknd::value > { }; template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; } }} # 18 "/localhome/glisse2/include/boost/mpl/assert.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/yes_no.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/yes_no.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/arrays.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/yes_no.hpp" 2 namespace boost { namespace mpl { namespace aux { typedef char (&no_tag)[1]; typedef char (&yes_tag)[2]; template< bool C_ > struct yes_no_tag { typedef no_tag type; }; template<> struct yes_no_tag { typedef yes_tag type; }; template< long n > struct weighted_tag { typedef char (&type)[n]; }; # 56 "/localhome/glisse2/include/boost/mpl/aux_/yes_no.hpp" }}} # 21 "/localhome/glisse2/include/boost/mpl/assert.hpp" 2 # 29 "/localhome/glisse2/include/boost/mpl/assert.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/pp_counter.hpp" 1 # 30 "/localhome/glisse2/include/boost/mpl/assert.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 36 "/localhome/glisse2/include/boost/mpl/assert.hpp" 2 # 62 "/localhome/glisse2/include/boost/mpl/assert.hpp" namespace mpl_ { struct failed {}; # 75 "/localhome/glisse2/include/boost/mpl/assert.hpp" template< bool C > struct assert { typedef void* type; }; template<> struct assert { typedef assert type; }; template< bool C > int assertion_failed( typename assert::type ); template< bool C > struct assertion { static int failed( assert ); }; template<> struct assertion { static int failed( void* ); }; struct assert_ { template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; static assert_ const arg; enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; }; # 123 "/localhome/glisse2/include/boost/mpl/assert.hpp" boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); template< assert_::relations r, long x, long y > struct assert_relation {}; template< bool > struct assert_arg_pred_impl { typedef int type; }; template<> struct assert_arg_pred_impl { typedef void* type; }; template< typename P > struct assert_arg_pred { typedef typename P::type p_type; typedef typename assert_arg_pred_impl< p_type::value >::type type; }; template< typename P > struct assert_arg_pred_not { typedef typename P::type p_type; enum { p = !p_type::value }; typedef typename assert_arg_pred_impl

::type type; }; template< typename Pred > failed ************ (Pred::************ assert_arg( void (*)(Pred), typename assert_arg_pred::type ) ); template< typename Pred > failed ************ (boost::mpl::not_::************ assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) ); template< typename Pred > assert assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); template< typename Pred > assert assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); # 212 "/localhome/glisse2/include/boost/mpl/assert.hpp" } # 24 "/localhome/glisse2/include/boost/mpl/aux_/na_assert.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/arg.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/arity_spec.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/arg.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/arg_typedef.hpp" 1 # 28 "/localhome/glisse2/include/boost/mpl/arg.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/use_preprocessed.hpp" 1 # 32 "/localhome/glisse2/include/boost/mpl/arg.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 16 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/compiler.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/stringize.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp" 1 # 13 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp" namespace mpl_ { template<> struct arg< -1 > { static const int value = -1; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; }; }; template<> struct arg<1> { static const int value = 1; typedef arg<2> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; }; }; template<> struct arg<2> { static const int value = 2; typedef arg<3> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; enum { mpl_assertion_in_line_63 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; }; }; template<> struct arg<3> { static const int value = 3; typedef arg<4> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; enum { mpl_assertion_in_line_81 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; }; }; template<> struct arg<4> { static const int value = 4; typedef arg<5> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; enum { mpl_assertion_in_line_99 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; }; }; template<> struct arg<5> { static const int value = 5; typedef arg<6> next; template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; enum { mpl_assertion_in_line_117 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; }; }; } # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 38 "/localhome/glisse2/include/boost/mpl/arg.hpp" 2 # 25 "/localhome/glisse2/include/boost/mpl/placeholders.hpp" 2 # 43 "/localhome/glisse2/include/boost/mpl/placeholders.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" 1 # 13 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" namespace mpl_ { typedef arg< -1 > _; } namespace boost { namespace mpl { using ::mpl_::_; namespace placeholders { using mpl_::_; } }} namespace mpl_ { typedef arg<1> _1; } namespace boost { namespace mpl { using ::mpl_::_1; namespace placeholders { using mpl_::_1; } }} namespace mpl_ { typedef arg<2> _2; } namespace boost { namespace mpl { using ::mpl_::_2; namespace placeholders { using mpl_::_2; } }} namespace mpl_ { typedef arg<3> _3; } namespace boost { namespace mpl { using ::mpl_::_3; namespace placeholders { using mpl_::_3; } }} namespace mpl_ { typedef arg<4> _4; } namespace boost { namespace mpl { using ::mpl_::_4; namespace placeholders { using mpl_::_4; } }} namespace mpl_ { typedef arg<5> _5; } namespace boost { namespace mpl { using ::mpl_::_5; namespace placeholders { using mpl_::_5; } }} namespace mpl_ { typedef arg<6> _6; } namespace boost { namespace mpl { using ::mpl_::_6; namespace placeholders { using mpl_::_6; } }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 44 "/localhome/glisse2/include/boost/mpl/placeholders.hpp" 2 # 18 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/intrinsics.hpp" 1 # 190 "/localhome/glisse2/include/boost/type_traits/intrinsics.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_reference.hpp" 1 # 16 "/localhome/glisse2/include/boost/type_traits/is_reference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_lvalue_reference.hpp" 1 # 32 "/localhome/glisse2/include/boost/type_traits/is_lvalue_reference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 33 "/localhome/glisse2/include/boost/type_traits/is_lvalue_reference.hpp" 2 namespace boost { template< typename T > struct is_lvalue_reference : public ::boost::integral_constant { public: }; template< typename T > struct is_lvalue_reference< T& > : public ::boost::integral_constant { public: }; # 113 "/localhome/glisse2/include/boost/type_traits/is_lvalue_reference.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 116 "/localhome/glisse2/include/boost/type_traits/is_lvalue_reference.hpp" 2 # 17 "/localhome/glisse2/include/boost/type_traits/is_reference.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_rvalue_reference.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/is_rvalue_reference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/is_rvalue_reference.hpp" 2 namespace boost { template< typename T > struct is_rvalue_reference : public ::boost::integral_constant { public: }; template< typename T > struct is_rvalue_reference< T&& > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 27 "/localhome/glisse2/include/boost/type_traits/is_rvalue_reference.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/is_reference.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/ice.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/ice.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/yes_no_type.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/yes_no_type.hpp" namespace boost { namespace type_traits { typedef char yes_type; struct no_type { char padding[8]; }; } } # 15 "/localhome/glisse2/include/boost/type_traits/ice.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/ice_or.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/detail/ice_or.hpp" namespace boost { namespace type_traits { template struct ice_or; template struct ice_or { static const bool value = true; }; template <> struct ice_or { static const bool value = false; }; } } # 16 "/localhome/glisse2/include/boost/type_traits/ice.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/ice_and.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/ice_and.hpp" namespace boost { namespace type_traits { template struct ice_and; template struct ice_and { static const bool value = false; }; template <> struct ice_and { static const bool value = true; }; } } # 17 "/localhome/glisse2/include/boost/type_traits/ice.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/ice_not.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/detail/ice_not.hpp" namespace boost { namespace type_traits { template struct ice_not { static const bool value = true; }; template <> struct ice_not { static const bool value = false; }; } } # 18 "/localhome/glisse2/include/boost/type_traits/ice.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/ice_eq.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/detail/ice_eq.hpp" namespace boost { namespace type_traits { template struct ice_eq { static const bool value = (b1 == b2); }; template struct ice_ne { static const bool value = (b1 != b2); }; template bool const ice_eq::value; template bool const ice_ne::value; } } # 19 "/localhome/glisse2/include/boost/type_traits/ice.hpp" 2 # 19 "/localhome/glisse2/include/boost/type_traits/is_reference.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/is_reference.hpp" 2 namespace boost { namespace detail { template struct is_reference_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_lvalue_reference::value, ::boost::is_rvalue_reference::value >::value) ; }; } template< typename T > struct is_reference : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/is_reference.hpp" 2 # 191 "/localhome/glisse2/include/boost/type_traits/intrinsics.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_volatile.hpp" 1 # 28 "/localhome/glisse2/include/boost/type_traits/is_volatile.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/cv_traits_impl.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/cv_traits_impl.hpp" namespace boost { namespace detail { template struct cv_traits_imp {}; template struct cv_traits_imp { static const bool is_const = false; static const bool is_volatile = false; typedef T unqualified_type; }; template struct cv_traits_imp { static const bool is_const = true; static const bool is_volatile = false; typedef T unqualified_type; }; template struct cv_traits_imp { static const bool is_const = false; static const bool is_volatile = true; typedef T unqualified_type; }; template struct cv_traits_imp { static const bool is_const = true; static const bool is_volatile = true; typedef T unqualified_type; }; # 92 "/localhome/glisse2/include/boost/type_traits/detail/cv_traits_impl.hpp" } } # 29 "/localhome/glisse2/include/boost/type_traits/is_volatile.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/is_volatile.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 41 "/localhome/glisse2/include/boost/type_traits/is_volatile.hpp" 2 namespace boost { namespace detail{ template struct is_volatile_rval_filter { static const bool value = ::boost::detail::cv_traits_imp::is_volatile; }; template struct is_volatile_rval_filter { static const bool value = false; }; } template< typename T > struct is_volatile : public ::boost::integral_constant::value> { public: }; template< typename T > struct is_volatile< T& > : public ::boost::integral_constant { public: }; # 148 "/localhome/glisse2/include/boost/type_traits/is_volatile.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 151 "/localhome/glisse2/include/boost/type_traits/is_volatile.hpp" 2 # 192 "/localhome/glisse2/include/boost/type_traits/intrinsics.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_array.hpp" 1 # 24 "/localhome/glisse2/include/boost/type_traits/is_array.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 25 "/localhome/glisse2/include/boost/type_traits/is_array.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 28 "/localhome/glisse2/include/boost/type_traits/is_array.hpp" 2 namespace boost { template< typename T > struct is_array : public ::boost::integral_constant { public: }; template< typename T, std::size_t N > struct is_array< T[N] > : public ::boost::integral_constant { public: }; template< typename T, std::size_t N > struct is_array< T const[N] > : public ::boost::integral_constant { public: }; template< typename T, std::size_t N > struct is_array< T volatile[N] > : public ::boost::integral_constant { public: }; template< typename T, std::size_t N > struct is_array< T const volatile[N] > : public ::boost::integral_constant { public: }; template< typename T > struct is_array< T[] > : public ::boost::integral_constant { public: }; template< typename T > struct is_array< T const[] > : public ::boost::integral_constant { public: }; template< typename T > struct is_array< T volatile[] > : public ::boost::integral_constant { public: }; template< typename T > struct is_array< T const volatile[] > : public ::boost::integral_constant { public: }; # 87 "/localhome/glisse2/include/boost/type_traits/is_array.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 90 "/localhome/glisse2/include/boost/type_traits/is_array.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/add_reference.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/add_reference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/add_reference.hpp" 2 namespace boost { namespace detail { # 59 "/localhome/glisse2/include/boost/type_traits/add_reference.hpp" template struct add_reference_rvalue_layer { typedef T& type; }; template struct add_reference_rvalue_layer { typedef T&& type; }; template struct add_reference_impl { typedef typename add_reference_rvalue_layer::type type; }; template< typename T > struct add_reference_impl { public: typedef T& type; }; template<> struct add_reference_impl { public: typedef void type; }; template<> struct add_reference_impl { public: typedef void const type; }; template<> struct add_reference_impl { public: typedef void volatile type; }; template<> struct add_reference_impl { public: typedef void const volatile type; }; } template< typename T > struct add_reference { public: typedef typename boost::detail::add_reference_impl::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 106 "/localhome/glisse2/include/boost/type_traits/add_reference.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_arithmetic.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/is_arithmetic.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_integral.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/is_integral.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/is_integral.hpp" 2 namespace boost { template< typename T > struct is_integral : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned char > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned char const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned char volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned char const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned short > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned short const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned short volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned short const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned int > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned int const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned int volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned int const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned long > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned long const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned long volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned long const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed char > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed char const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed char volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed char const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed short > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed short const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed short volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed short const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed int > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed int const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed int volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed int const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed long > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed long const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed long volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed long const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< bool > : public ::boost::integral_constant { public: }; template<> struct is_integral< bool const > : public ::boost::integral_constant { public: }; template<> struct is_integral< bool volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< bool const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< char > : public ::boost::integral_constant { public: }; template<> struct is_integral< char const > : public ::boost::integral_constant { public: }; template<> struct is_integral< char volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< char const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< wchar_t > : public ::boost::integral_constant { public: }; template<> struct is_integral< wchar_t const > : public ::boost::integral_constant { public: }; template<> struct is_integral< wchar_t volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< wchar_t const volatile > : public ::boost::integral_constant { public: }; # 65 "/localhome/glisse2/include/boost/type_traits/is_integral.hpp" template<> struct is_integral< ::boost::ulong_long_type > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::ulong_long_type const > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::ulong_long_type volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::long_long_type > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::long_long_type const > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::long_long_type volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::long_long_type const volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 77 "/localhome/glisse2/include/boost/type_traits/is_integral.hpp" 2 # 14 "/localhome/glisse2/include/boost/type_traits/is_arithmetic.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_float.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/is_float.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 14 "/localhome/glisse2/include/boost/type_traits/is_float.hpp" 2 namespace boost { template< typename T > struct is_float : public ::boost::integral_constant { public: }; template<> struct is_float< float > : public ::boost::integral_constant { public: }; template<> struct is_float< float const > : public ::boost::integral_constant { public: }; template<> struct is_float< float volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< float const volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< double > : public ::boost::integral_constant { public: }; template<> struct is_float< double const > : public ::boost::integral_constant { public: }; template<> struct is_float< double volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< double const volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< long double > : public ::boost::integral_constant { public: }; template<> struct is_float< long double const > : public ::boost::integral_constant { public: }; template<> struct is_float< long double volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< long double const volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 26 "/localhome/glisse2/include/boost/type_traits/is_float.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/is_arithmetic.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits/is_arithmetic.hpp" 2 namespace boost { namespace detail { template< typename T > struct is_arithmetic_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) ; }; } template< typename T > struct is_arithmetic : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 50 "/localhome/glisse2/include/boost/type_traits/is_arithmetic.hpp" 2 # 23 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_void.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/is_void.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/is_void.hpp" 2 namespace boost { template< typename T > struct is_void : public ::boost::integral_constant { public: }; template<> struct is_void< void > : public ::boost::integral_constant { public: }; template<> struct is_void< void const > : public ::boost::integral_constant { public: }; template<> struct is_void< void volatile > : public ::boost::integral_constant { public: }; template<> struct is_void< void const volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 37 "/localhome/glisse2/include/boost/type_traits/is_void.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_abstract.hpp" 1 # 62 "/localhome/glisse2/include/boost/type_traits/is_abstract.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 63 "/localhome/glisse2/include/boost/type_traits/is_abstract.hpp" 2 namespace boost { namespace detail{ template struct is_abstract_imp { static const bool value = __is_abstract(T); }; # 141 "/localhome/glisse2/include/boost/type_traits/is_abstract.hpp" } template< typename T > struct is_abstract : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 152 "/localhome/glisse2/include/boost/type_traits/is_abstract.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/add_rvalue_reference.hpp" 1 # 19 "/localhome/glisse2/include/boost/type_traits/add_rvalue_reference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/add_rvalue_reference.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/add_rvalue_reference.hpp" namespace boost { namespace type_traits_detail { template struct add_rvalue_reference_helper { typedef T type; }; template struct add_rvalue_reference_helper { typedef T&& type; }; template struct add_rvalue_reference_imp { typedef typename boost::type_traits_detail::add_rvalue_reference_helper ::value && !is_reference::value) >::type type; }; } template< typename T > struct add_rvalue_reference { public: typedef typename boost::type_traits_detail::add_rvalue_reference_imp::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 64 "/localhome/glisse2/include/boost/type_traits/add_rvalue_reference.hpp" 2 # 28 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 37 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 38 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 namespace boost { # 53 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" namespace detail { # 120 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" struct any_conversion { template any_conversion(const volatile T&); template any_conversion(T&); }; template struct checker { static boost::type_traits::no_type _m_check(any_conversion ...); static boost::type_traits::yes_type _m_check(T, int); }; template struct is_convertible_basic_impl { static typename add_rvalue_reference::type _m_from; static bool const value = sizeof( boost::detail::checker::_m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type); }; # 292 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" template struct is_convertible_impl { typedef typename add_reference::type ref_type; static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value >::value) # 306 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" ; }; template struct is_convertible_impl_select { template struct rebind { typedef is_convertible_impl type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef true_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template struct is_convertible_impl_dispatch_base { typedef is_convertible_impl_select< ::boost::is_arithmetic::value, ::boost::is_arithmetic::value, ::boost::is_abstract::value > selector; typedef typename selector::template rebind isc_binder; typedef typename isc_binder::type type; }; template struct is_convertible_impl_dispatch : public is_convertible_impl_dispatch_base::type {}; # 395 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" template<> struct is_convertible_impl< void,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { public: static const bool value = (true); }; # 405 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" template< typename To > struct is_convertible_impl< void,To > { public: static const bool value = (false); }; template< typename From > struct is_convertible_impl< From,void > { public: static const bool value = (false); }; template< typename To > struct is_convertible_impl< void const,To > { public: static const bool value = (false); }; template< typename To > struct is_convertible_impl< void volatile,To > { public: static const bool value = (false); }; template< typename To > struct is_convertible_impl< void const volatile,To > { public: static const bool value = (false); }; template< typename From > struct is_convertible_impl< From,void const > { public: static const bool value = (false); }; template< typename From > struct is_convertible_impl< From,void volatile > { public: static const bool value = (false); }; template< typename From > struct is_convertible_impl< From,void const volatile > { public: static const bool value = (false); }; } template< typename From, typename To > struct is_convertible : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 430 "/localhome/glisse2/include/boost/type_traits/is_convertible.hpp" 2 # 21 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" 2 namespace boost { struct no_traversal_tag {}; struct incrementable_traversal_tag : no_traversal_tag { }; struct single_pass_traversal_tag : incrementable_traversal_tag { }; struct forward_traversal_tag : single_pass_traversal_tag { }; struct bidirectional_traversal_tag : forward_traversal_tag { }; struct random_access_traversal_tag : bidirectional_traversal_tag { }; namespace detail { template struct old_category_to_traversal : mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , void > > > > > {}; # 108 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" template struct pure_traversal_tag : mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , void > > > > > { }; # 142 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" } template struct iterator_category_to_traversal : mpl::eval_if< is_convertible , mpl::identity , boost::detail::old_category_to_traversal > {}; template struct iterator_traversal : iterator_category_to_traversal< typename boost::detail::iterator_traits::iterator_category > {}; # 184 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" } # 1 "/localhome/glisse2/include/boost/iterator/detail/config_undef.hpp" 1 # 187 "/localhome/glisse2/include/boost/iterator/iterator_categories.hpp" 2 # 15 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 1 # 11 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" # 1 "/localhome/glisse2/include/boost/iterator/interoperable.hpp" 1 # 11 "/localhome/glisse2/include/boost/iterator/interoperable.hpp" # 1 "/localhome/glisse2/include/boost/mpl/or.hpp" 1 # 43 "/localhome/glisse2/include/boost/mpl/or.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/or.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/or.hpp" namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< ::boost::mpl::aux::nested_type_wknd::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } template< typename T1 = na , typename T2 = na , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< ::boost::mpl::aux::nested_type_wknd::value , T2, T3, T4, T5 > { }; template<> struct or_< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : or_< T1 , T2 > { }; }; template< typename Tag > struct lambda< or_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef or_< na , na > result_; typedef or_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< or_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< or_< na , na > > : int_<-1> { }; } }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 44 "/localhome/glisse2/include/boost/mpl/or.hpp" 2 # 12 "/localhome/glisse2/include/boost/iterator/interoperable.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/detail/config_def.hpp" 1 # 16 "/localhome/glisse2/include/boost/iterator/interoperable.hpp" 2 namespace boost { # 34 "/localhome/glisse2/include/boost/iterator/interoperable.hpp" template struct is_interoperable : mpl::or_< is_convertible< A, B > , is_convertible< B, A > > { }; } # 1 "/localhome/glisse2/include/boost/iterator/detail/config_undef.hpp" 1 # 49 "/localhome/glisse2/include/boost/iterator/interoperable.hpp" 2 # 12 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/iterator_traits.hpp" 1 # 11 "/localhome/glisse2/include/boost/iterator/iterator_traits.hpp" namespace boost { # 27 "/localhome/glisse2/include/boost/iterator/iterator_traits.hpp" template struct iterator_value { typedef typename boost::detail::iterator_traits::value_type type; }; template struct iterator_reference { typedef typename boost::detail::iterator_traits::reference type; }; template struct iterator_pointer { typedef typename boost::detail::iterator_traits::pointer type; }; template struct iterator_difference { typedef typename boost::detail::iterator_traits::difference_type type; }; template struct iterator_category { typedef typename boost::detail::iterator_traits::iterator_category type; }; # 90 "/localhome/glisse2/include/boost/iterator/iterator_traits.hpp" } # 13 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" 1 # 10 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" # 1 "/localhome/glisse2/include/boost/mpl/and.hpp" 1 # 42 "/localhome/glisse2/include/boost/mpl/and.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/and.hpp" namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< ::boost::mpl::aux::nested_type_wknd::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } template< typename T1 = na , typename T2 = na , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< ::boost::mpl::aux::nested_type_wknd::value , T2, T3, T4, T5 > { }; template<> struct and_< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : and_< T1 , T2 > { }; }; template< typename Tag > struct lambda< and_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef and_< na , na > result_; typedef and_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< and_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< and_< na , na > > : int_<-1> { }; } }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 43 "/localhome/glisse2/include/boost/mpl/and.hpp" 2 # 11 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_const.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/is_const.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 44 "/localhome/glisse2/include/boost/type_traits/is_const.hpp" 2 namespace boost { namespace detail{ template struct is_const_rvalue_filter { static const bool value = ::boost::detail::cv_traits_imp::is_const; }; template struct is_const_rvalue_filter { static const bool value = false; }; } template< typename T > struct is_const : public ::boost::integral_constant::value> { public: }; template< typename T > struct is_const< T& > : public ::boost::integral_constant { public: }; # 160 "/localhome/glisse2/include/boost/type_traits/is_const.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 163 "/localhome/glisse2/include/boost/type_traits/is_const.hpp" 2 # 18 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/detail/config_def.hpp" 1 # 24 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" 2 # 1 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" 1 # 1 "/localhome/glisse2/include/boost/type_traits/is_function.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/is_function.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/false_result.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/false_result.hpp" namespace boost { namespace type_traits { struct false_result { template struct result_ { static const bool value = false; }; }; }} # 16 "/localhome/glisse2/include/boost/type_traits/is_function.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/is_function_ptr_helper.hpp" 1 # 26 "/localhome/glisse2/include/boost/type_traits/detail/is_function_ptr_helper.hpp" namespace boost { namespace type_traits { template struct is_function_ptr_helper { static const bool value = false; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; template struct is_function_ptr_helper { static const bool value = true; }; # 203 "/localhome/glisse2/include/boost/type_traits/detail/is_function_ptr_helper.hpp" } } # 20 "/localhome/glisse2/include/boost/type_traits/is_function.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits/is_function.hpp" 2 namespace boost { namespace detail { template struct is_function_chooser : public ::boost::type_traits::false_result { }; template <> struct is_function_chooser { template< typename T > struct result_ : public ::boost::type_traits::is_function_ptr_helper { }; }; template struct is_function_impl : public is_function_chooser< ::boost::is_reference::value > ::template result_ { }; # 90 "/localhome/glisse2/include/boost/type_traits/is_function.hpp" } template< typename T > struct is_function : public ::boost::integral_constant::value> { public: }; template< typename T > struct is_function< T&& > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 105 "/localhome/glisse2/include/boost/type_traits/is_function.hpp" 2 # 8 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" 1 # 24 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" 1 # 28 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" 1 # 24 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" namespace boost { namespace type_traits { template struct is_mem_fun_pointer_impl { static const bool value = false; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; template struct is_mem_fun_pointer_impl { static const bool value = true; }; # 776 "/localhome/glisse2/include/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" } } # 25 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/remove_cv.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/remove_cv.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/broken_compiler_spec.hpp" 1 # 95 "/localhome/glisse2/include/boost/type_traits/broken_compiler_spec.hpp" # 15 "/localhome/glisse2/include/boost/type_traits/remove_cv.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 20 "/localhome/glisse2/include/boost/type_traits/remove_cv.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits/remove_cv.hpp" 2 namespace boost { namespace detail{ template struct rvalue_ref_filter_rem_cv { typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; template struct rvalue_ref_filter_rem_cv { typedef T&& type; }; } template< typename T > struct remove_cv { public: typedef typename boost::detail::rvalue_ref_filter_rem_cv::type type; }; template< typename T > struct remove_cv { public: typedef T& type; }; template< typename T, std::size_t N > struct remove_cv { public: typedef T type[N]; }; template< typename T, std::size_t N > struct remove_cv { public: typedef T type[N]; }; template< typename T, std::size_t N > struct remove_cv { public: typedef T type[N]; }; # 80 "/localhome/glisse2/include/boost/type_traits/remove_cv.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 83 "/localhome/glisse2/include/boost/type_traits/remove_cv.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" 2 # 36 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 37 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" 2 namespace boost { template< typename T > struct is_member_function_pointer : public ::boost::integral_constant::type>::value> { public: }; # 132 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 135 "/localhome/glisse2/include/boost/type_traits/is_member_function_pointer.hpp" 2 # 29 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" 2 # 39 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" 2 namespace boost { # 50 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" template< typename T > struct is_member_pointer : public ::boost::integral_constant::value> { public: }; template< typename T, typename U > struct is_member_pointer< U T::* > : public ::boost::integral_constant { public: }; template< typename T, typename U > struct is_member_pointer< U T::*const > : public ::boost::integral_constant { public: }; template< typename T, typename U > struct is_member_pointer< U T::*volatile > : public ::boost::integral_constant { public: }; template< typename T, typename U > struct is_member_pointer< U T::*const volatile > : public ::boost::integral_constant { public: }; # 112 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 115 "/localhome/glisse2/include/boost/type_traits/is_member_pointer.hpp" 2 # 25 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" 2 # 41 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 42 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" 2 namespace boost { namespace detail { template< typename T > struct is_pointer_helper { static const bool value = false; }; # 63 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" template< typename T > struct is_pointer_helper { static const bool value = true; }; template< typename T > struct is_pointer_impl { # 80 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ; }; } template< typename T > struct is_pointer : public ::boost::integral_constant::value> { public: }; # 158 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 161 "/localhome/glisse2/include/boost/type_traits/is_pointer.hpp" 2 # 10 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_class.hpp" 1 # 37 "/localhome/glisse2/include/boost/type_traits/is_class.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 38 "/localhome/glisse2/include/boost/type_traits/is_class.hpp" 2 namespace boost { namespace detail { # 120 "/localhome/glisse2/include/boost/type_traits/is_class.hpp" template struct is_class_impl { static const bool value = __is_class(T); }; } template< typename T > struct is_class : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 139 "/localhome/glisse2/include/boost/type_traits/is_class.hpp" 2 # 11 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/remove_reference.hpp" 1 # 21 "/localhome/glisse2/include/boost/type_traits/remove_reference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/remove_reference.hpp" 2 namespace boost { namespace detail{ template struct remove_rvalue_ref { typedef T type; }; template struct remove_rvalue_ref { typedef T type; }; } template< typename T > struct remove_reference { public: typedef typename boost::detail::remove_rvalue_ref::type type; }; template< typename T > struct remove_reference { public: typedef T type; }; # 66 "/localhome/glisse2/include/boost/type_traits/remove_reference.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 69 "/localhome/glisse2/include/boost/type_traits/remove_reference.hpp" 2 # 17 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/remove_pointer.hpp" 1 # 26 "/localhome/glisse2/include/boost/type_traits/remove_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits/remove_pointer.hpp" 2 namespace boost { # 76 "/localhome/glisse2/include/boost/type_traits/remove_pointer.hpp" template< typename T > struct remove_pointer { public: typedef T type; }; template< typename T > struct remove_pointer { public: typedef T type; }; template< typename T > struct remove_pointer { public: typedef T type; }; template< typename T > struct remove_pointer { public: typedef T type; }; template< typename T > struct remove_pointer { public: typedef T type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 91 "/localhome/glisse2/include/boost/type_traits/remove_pointer.hpp" 2 # 18 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" 2 # 33 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" namespace boost { namespace detail { namespace indirect_traits { template struct is_reference_to_const : mpl::false_ { }; template struct is_reference_to_const : mpl::true_ { }; # 55 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" template struct is_reference_to_function : mpl::false_ { }; template struct is_reference_to_function : is_function { }; template struct is_pointer_to_function : mpl::false_ { }; template struct is_pointer_to_function : is_function { }; template struct is_reference_to_member_function_pointer_impl : mpl::false_ { }; template struct is_reference_to_member_function_pointer_impl : is_member_function_pointer::type> { }; template struct is_reference_to_member_function_pointer : is_reference_to_member_function_pointer_impl { }; template struct is_reference_to_function_pointer_aux : mpl::and_< is_reference , is_pointer_to_function< typename remove_cv< typename remove_reference::type >::type > > { }; template struct is_reference_to_function_pointer : mpl::if_< is_reference_to_function , mpl::false_ , is_reference_to_function_pointer_aux >::type { }; template struct is_reference_to_non_const : mpl::and_< is_reference , mpl::not_< is_reference_to_const > > { }; template struct is_reference_to_volatile : mpl::false_ { }; template struct is_reference_to_volatile : mpl::true_ { }; # 149 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" template struct is_reference_to_pointer : mpl::false_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_class : mpl::and_< is_reference , is_class< typename remove_cv< typename remove_reference::type >::type > > { }; template struct is_pointer_to_class : mpl::and_< is_pointer , is_class< typename remove_cv< typename remove_pointer::type >::type > > { }; # 481 "/localhome/glisse2/include/boost/detail/indirect_traits.hpp" } using namespace indirect_traits; }} # 27 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" 2 namespace boost { struct use_default; } namespace boost { namespace detail { struct input_output_iterator_tag : std::input_iterator_tag { operator std::output_iterator_tag() const { return std::output_iterator_tag(); } }; template struct iterator_writability_disabled : mpl::or_< is_const , boost::detail::indirect_traits::is_reference_to_const , is_const > {}; # 86 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" template struct iterator_facade_default_category : mpl::eval_if< mpl::and_< is_reference , is_convertible > , mpl::eval_if< is_convertible , mpl::identity , mpl::if_< is_convertible , std::bidirectional_iterator_tag , std::forward_iterator_tag > > , typename mpl::eval_if< mpl::and_< is_convertible , is_convertible > , mpl::identity , mpl::identity > > { }; template struct is_iterator_category : mpl::or_< is_convertible , is_convertible > { }; template struct is_iterator_traversal : is_convertible {}; template struct iterator_category_with_traversal : Category, Traversal { enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) ( is_convertible< typename iterator_category_to_traversal::type , Traversal >))0, 1 ) ) ) } ; enum { mpl_assertion_in_line_151 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; enum { mpl_assertion_in_line_152 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; enum { mpl_assertion_in_line_153 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; enum { mpl_assertion_in_line_155 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; }; template struct facade_iterator_category_impl { enum { mpl_assertion_in_line_166 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; typedef typename iterator_facade_default_category< Traversal,ValueParam,Reference >::type category; typedef typename mpl::if_< is_same< Traversal , typename iterator_category_to_traversal::type > , category , iterator_category_with_traversal >::type type; }; template struct facade_iterator_category : mpl::eval_if< is_iterator_category , mpl::identity , facade_iterator_category_impl > { }; }} # 1 "/localhome/glisse2/include/boost/iterator/detail/config_undef.hpp" 1 # 199 "/localhome/glisse2/include/boost/iterator/detail/facade_iterator_category.hpp" 2 # 15 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/implicit_cast.hpp" 1 # 10 "/localhome/glisse2/include/boost/implicit_cast.hpp" namespace boost { template inline T implicit_cast (typename mpl::identity::type x) { return x; } } # 18 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/add_const.hpp" 1 # 16 "/localhome/glisse2/include/boost/type_traits/add_const.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 17 "/localhome/glisse2/include/boost/type_traits/add_const.hpp" 2 namespace boost { # 33 "/localhome/glisse2/include/boost/type_traits/add_const.hpp" template< typename T > struct add_const { public: typedef T const type; }; template< typename T > struct add_const { public: typedef T& type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 46 "/localhome/glisse2/include/boost/type_traits/add_const.hpp" 2 # 22 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/add_pointer.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/add_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/add_pointer.hpp" 2 namespace boost { namespace detail { # 55 "/localhome/glisse2/include/boost/type_traits/add_pointer.hpp" template struct add_pointer_impl { typedef typename remove_reference::type no_ref_type; typedef no_ref_type* type; }; } template< typename T > struct add_pointer { public: typedef typename boost::detail::add_pointer_impl::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 71 "/localhome/glisse2/include/boost/type_traits/add_pointer.hpp" 2 # 23 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/remove_const.hpp" 1 # 20 "/localhome/glisse2/include/boost/type_traits/remove_const.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 21 "/localhome/glisse2/include/boost/type_traits/remove_const.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 28 "/localhome/glisse2/include/boost/type_traits/remove_const.hpp" 2 namespace boost { namespace detail { template struct remove_const_helper { typedef T type; }; template struct remove_const_helper { typedef T volatile type; }; template struct remove_const_impl { typedef typename remove_const_helper< typename cv_traits_imp::unqualified_type , ::boost::is_volatile::value >::type type; }; template struct remove_const_impl { typedef T&& type; }; } template< typename T > struct remove_const { public: typedef typename boost::detail::remove_const_impl::type type; }; template< typename T > struct remove_const { public: typedef T& type; }; template< typename T, std::size_t N > struct remove_const { public: typedef T type[N]; }; template< typename T, std::size_t N > struct remove_const { public: typedef T volatile type[N]; }; # 86 "/localhome/glisse2/include/boost/type_traits/remove_const.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 89 "/localhome/glisse2/include/boost/type_traits/remove_const.hpp" 2 # 24 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_pod.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/is_pod.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_scalar.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/is_scalar.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_enum.hpp" 1 # 32 "/localhome/glisse2/include/boost/type_traits/is_enum.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 33 "/localhome/glisse2/include/boost/type_traits/is_enum.hpp" 2 namespace boost { # 181 "/localhome/glisse2/include/boost/type_traits/is_enum.hpp" template< typename T > struct is_enum : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 188 "/localhome/glisse2/include/boost/type_traits/is_enum.hpp" 2 # 14 "/localhome/glisse2/include/boost/type_traits/is_scalar.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits/is_scalar.hpp" 2 namespace boost { namespace detail { template struct is_scalar_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_enum::value, ::boost::is_pointer::value, ::boost::is_member_pointer::value >::value) ; }; template <> struct is_scalar_impl{ static const bool value = false; }; template <> struct is_scalar_impl{ static const bool value = false; }; template <> struct is_scalar_impl{ static const bool value = false; }; template <> struct is_scalar_impl{ static const bool value = false; }; } template< typename T > struct is_scalar : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 54 "/localhome/glisse2/include/boost/type_traits/is_scalar.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/is_pod.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 19 "/localhome/glisse2/include/boost/type_traits/is_pod.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/is_pod.hpp" 2 namespace boost { template< typename T > struct is_POD; namespace detail { template struct is_pod_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, __is_pod(T) >::value) ; }; template struct is_pod_impl : public is_pod_impl { }; # 124 "/localhome/glisse2/include/boost/type_traits/is_pod.hpp" template<> struct is_pod_impl< void > { public: static const bool value = (true); }; template<> struct is_pod_impl< void const > { public: static const bool value = (true); }; template<> struct is_pod_impl< void volatile > { public: static const bool value = (true); }; template<> struct is_pod_impl< void const volatile > { public: static const bool value = (true); }; } template< typename T > struct is_POD : public ::boost::integral_constant::value> { public: }; template< typename T > struct is_pod : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 140 "/localhome/glisse2/include/boost/type_traits/is_pod.hpp" 2 # 27 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/always.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/always.hpp" namespace boost { namespace mpl { template< typename Value > struct always { template< typename T , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply { typedef Value type; }; }; }} # 34 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/apply.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_fwd.hpp" 1 # 31 "/localhome/glisse2/include/boost/mpl/apply_fwd.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 32 "/localhome/glisse2/include/boost/mpl/apply_fwd.hpp" 2 # 23 "/localhome/glisse2/include/boost/mpl/apply.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/has_apply.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/has_apply.hpp" # 1 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/type_wrapper.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/type_wrapper.hpp" namespace boost { namespace mpl { namespace aux { template< typename T > struct type_wrapper { typedef T type; }; template< typename T > struct wrapped_type; template< typename T > struct wrapped_type< type_wrapper > { typedef T type; }; }}} # 22 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/has_xxx.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/msvc_typename.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/array/elem.hpp" 1 # 15 "/localhome/glisse2/include/boost/preprocessor/array/elem.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/array/data.hpp" 1 # 16 "/localhome/glisse2/include/boost/preprocessor/array/elem.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/array/size.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/array/elem.hpp" 2 # 31 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/enum_params.hpp" 1 # 34 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/enum_trailing_params.hpp" 1 # 35 "/localhome/glisse2/include/boost/mpl/has_xxx.hpp" 2 # 18 "/localhome/glisse2/include/boost/mpl/aux_/has_apply.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/has_apply.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/has_apply.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_apply { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; }}} # 24 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/msvc_never_true.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 2 # 34 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 35 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 2 # 24 "/localhome/glisse2/include/boost/mpl/apply.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/placeholders.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/apply.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/lambda.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/lambda.hpp" # 1 "/localhome/glisse2/include/boost/mpl/bind.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/bind.hpp" # 1 "/localhome/glisse2/include/boost/mpl/bind_fwd.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/bind_fwd.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/bind.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/bind_fwd.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 33 "/localhome/glisse2/include/boost/mpl/bind_fwd.hpp" 2 # 24 "/localhome/glisse2/include/boost/mpl/bind.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/placeholders.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/bind.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/next.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/next.hpp" # 1 "/localhome/glisse2/include/boost/mpl/next_prior.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/next_prior.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/common_name_wknd.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/next_prior.hpp" 2 namespace boost { namespace mpl { template< typename T = na > struct next { typedef typename T::next type; }; template< typename T = na > struct prior { typedef typename T::prior type; }; template<> struct next< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : next< T1 > { }; }; template< typename Tag > struct lambda< next< na > , Tag , int_<-1> > { typedef false_ is_le; typedef next< na > result_; typedef next< na > type; }; namespace aux { template< typename T1 > struct template_arity< next< T1 > > : int_<1> { }; template<> struct template_arity< next< na > > : int_<-1> { }; } template<> struct prior< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : prior< T1 > { }; }; template< typename Tag > struct lambda< prior< na > , Tag , int_<-1> > { typedef false_ is_le; typedef prior< na > result_; typedef prior< na > type; }; namespace aux { template< typename T1 > struct template_arity< prior< T1 > > : int_<1> { }; template<> struct template_arity< prior< na > > : int_<-1> { }; } }} # 18 "/localhome/glisse2/include/boost/mpl/next.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/bind.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/protect.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/protect.hpp" namespace boost { namespace mpl { template< typename T = na , int not_le_ = 0 > struct protect : T { typedef protect type; }; # 48 "/localhome/glisse2/include/boost/mpl/protect.hpp" template<> struct protect< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : protect< T1 > { }; }; namespace aux { template< typename T1 > struct template_arity< protect< T1 > > : int_<1> { }; template<> struct template_arity< protect< na > > : int_<-1> { }; } }} # 27 "/localhome/glisse2/include/boost/mpl/bind.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 28 "/localhome/glisse2/include/boost/mpl/bind.hpp" 2 # 50 "/localhome/glisse2/include/boost/mpl/bind.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp" 1 # 13 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp" namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 > struct template_arity< bind0< T1> > : int_<1> { }; } template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 > struct template_arity< bind1< T1 , T2> > : int_<2> { }; } template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< bind2< T1 , T2 , T3> > : int_<3> { }; } template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< bind3< T1 , T2 , T3 , T4> > : int_<4> { }; } template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bind4< T1 , T2 , T3 , T4 , T5> > : int_<5> { }; } template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< bind5< T1 , T2 , T3 , T4 , T5 , T6> > : int_<6> { }; } template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 51 "/localhome/glisse2/include/boost/mpl/bind.hpp" 2 # 19 "/localhome/glisse2/include/boost/mpl/lambda.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" # 1 "/localhome/glisse2/include/boost/mpl/bind_fwd.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/quote.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/quote.hpp" # 1 "/localhome/glisse2/include/boost/mpl/void.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/void.hpp" namespace mpl_ { struct void_ { typedef void_ type; }; } namespace boost { namespace mpl { template< typename T > struct is_void_ : false_ { }; template<> struct is_void_ : true_ { }; template< typename T > struct is_not_void_ : true_ { }; template<> struct is_not_void_ : false_ { }; template<> struct is_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_void_< T1 > { }; }; template< typename Tag > struct lambda< is_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_void_< na > result_; typedef is_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_void_< na > > : int_<-1> { }; } template<> struct is_not_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_not_void_< T1 > { }; }; template< typename Tag > struct lambda< is_not_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_not_void_< na > result_; typedef is_not_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_not_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_not_void_< na > > : int_<-1> { }; } }} # 23 "/localhome/glisse2/include/boost/mpl/quote.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/has_type.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/has_type.hpp" namespace boost { namespace mpl { namespace aux { template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; }}} # 24 "/localhome/glisse2/include/boost/mpl/quote.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/bcc.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/quote.hpp" 2 # 45 "/localhome/glisse2/include/boost/mpl/quote.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp" namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl { typedef typename T::type type; }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 46 "/localhome/glisse2/include/boost/mpl/quote.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/arg.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/template_arity.hpp" 1 # 43 "/localhome/glisse2/include/boost/mpl/aux_/template_arity.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" namespace boost { namespace mpl { namespace aux { template< int N > struct arity_tag { typedef char (&type)[N + 1]; }; template< int C1, int C2, int C3, int C4, int C5, int C6 > struct max_arity { static const int value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) ; }; arity_tag<0>::type arity_helper(...); template< template< typename P1 > class F , typename T1 > typename arity_tag<1>::type arity_helper(type_wrapper< F >, arity_tag<1>); template< template< typename P1, typename P2 > class F , typename T1, typename T2 > typename arity_tag<2>::type arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 > typename arity_tag<3>::type arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 > typename arity_tag<4>::type arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 > typename arity_tag<5>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6 > typename arity_tag<6>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); template< typename F, int N > struct template_arity_impl { static const int value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper(), arity_tag())) - 1 ; }; template< typename F > struct template_arity { static const int value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value ) ; typedef mpl::int_ type; }; }}} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 44 "/localhome/glisse2/include/boost/mpl/aux_/template_arity.hpp" 2 # 30 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" 2 # 44 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template<> struct lambda< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : lambda< T1 , T2 > { }; }; template< typename Tag > struct lambda< lambda< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef lambda< na , na > result_; typedef lambda< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< lambda< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< lambda< na , na > > : int_<-1> { }; } }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 45 "/localhome/glisse2/include/boost/mpl/aux_/full_lambda.hpp" 2 # 23 "/localhome/glisse2/include/boost/mpl/lambda.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/apply.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/apply.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/apply.hpp" namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 37 "/localhome/glisse2/include/boost/mpl/apply.hpp" 2 # 35 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/detail/config_def.hpp" 1 # 38 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 namespace boost { template class iterator_facade; namespace detail { struct always_bool2 { template struct apply { typedef bool type; }; }; template < class Facade1 , class Facade2 , class Return > struct enable_if_interoperable # 80 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" : ::boost::iterators::enable_if< mpl::or_< is_convertible , is_convertible > , Return > {}; template < class ValueParam , class CategoryOrTraversal , class Reference , class Difference > struct iterator_facade_types { typedef typename facade_iterator_category< CategoryOrTraversal, ValueParam, Reference >::type iterator_category; typedef typename remove_const::type value_type; typedef typename mpl::eval_if< boost::detail::iterator_writability_disabled , add_pointer , add_pointer >::type pointer; # 131 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" }; template class postfix_increment_proxy { typedef typename iterator_value::type value_type; public: explicit postfix_increment_proxy(Iterator const& x) : stored_value(*x) {} value_type& operator*() const { return this->stored_value; } private: mutable value_type stored_value; }; template class writable_postfix_increment_proxy { typedef typename iterator_value::type value_type; public: explicit writable_postfix_increment_proxy(Iterator const& x) : stored_value(*x) , stored_iterator(x) {} writable_postfix_increment_proxy const& operator*() const { return *this; } operator value_type&() const { return stored_value; } template T const& operator=(T const& x) const { *this->stored_iterator = x; return x; } template T& operator=(T& x) const { *this->stored_iterator = x; return x; } operator Iterator const&() const { return stored_iterator; } private: mutable value_type stored_value; Iterator stored_iterator; }; # 245 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" template struct is_non_proxy_reference : is_convertible< typename remove_reference::type const volatile* , Value const volatile* > {}; # 270 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" template struct postfix_increment_result : mpl::eval_if< mpl::and_< is_convertible , mpl::not_< is_convertible< typename iterator_category_to_traversal::type , forward_traversal_tag > > > , mpl::if_< is_non_proxy_reference , postfix_increment_proxy , writable_postfix_increment_proxy > , mpl::identity > {}; template struct operator_arrow_proxy { operator_arrow_proxy(T const* px) : m_value(*px) {} T* operator->() const { return &m_value; } operator T*() const { return &m_value; } mutable T m_value; }; template struct operator_arrow_result { typedef typename mpl::if_< is_reference , Pointer , operator_arrow_proxy >::type type; static type make(Reference x) { return boost::implicit_cast(&x); } }; # 343 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" template class operator_brackets_proxy { typedef typename Iterator::reference reference; typedef typename Iterator::value_type value_type; public: operator_brackets_proxy(Iterator const& iter) : m_iter(iter) {} operator reference() const { return *m_iter; } operator_brackets_proxy& operator=(value_type const& val) { *m_iter = val; return *this; } private: Iterator m_iter; }; template struct use_operator_brackets_proxy : mpl::not_< mpl::and_< boost::is_POD , iterator_writability_disabled > > {}; template struct operator_brackets_result { typedef typename mpl::if_< use_operator_brackets_proxy , operator_brackets_proxy , Value >::type type; }; template operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) { return operator_brackets_proxy(iter); } template typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) { return *iter; } struct choose_difference_type { template struct apply : # 421 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" mpl::eval_if< is_convertible , iterator_difference , iterator_difference > {}; }; } # 472 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" class iterator_core_access { template friend class iterator_facade; template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs); template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) ; template friend inline Derived operator+ (iterator_facade const& , typename Derived::difference_type) ; template friend inline Derived operator+ (typename Derived::difference_type , iterator_facade const&) ; template static typename Facade::reference dereference(Facade const& f) { return f.dereference(); } template static void increment(Facade& f) { f.increment(); } template static void decrement(Facade& f) { f.decrement(); } template static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) { return f1.equal(f2); } template static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) { return f2.equal(f1); } template static void advance(Facade& f, typename Facade::difference_type n) { f.advance(n); } template static typename Facade1::difference_type distance_from( Facade1 const& f1, Facade2 const& f2, mpl::true_) { return -f1.distance_to(f2); } template static typename Facade2::difference_type distance_from( Facade1 const& f1, Facade2 const& f2, mpl::false_) { return f2.distance_to(f1); } template static I& derived(iterator_facade& facade) { return *static_cast(&facade); } template static I const& derived(iterator_facade const& facade) { return *static_cast(&facade); } private: iterator_core_access(); }; template < class Derived , class Value , class CategoryOrTraversal , class Reference = Value& , class Difference = std::ptrdiff_t > class iterator_facade { private: Derived& derived() { return *static_cast(this); } Derived const& derived() const { return *static_cast(this); } typedef boost::detail::iterator_facade_types< Value, CategoryOrTraversal, Reference, Difference > associated_types; typedef boost::detail::operator_arrow_result< typename associated_types::value_type , Reference , typename associated_types::pointer > pointer_; protected: typedef iterator_facade iterator_facade_; public: typedef typename associated_types::value_type value_type; typedef Reference reference; typedef Difference difference_type; typedef typename pointer_::type pointer; typedef typename associated_types::iterator_category iterator_category; reference operator*() const { return iterator_core_access::dereference(this->derived()); } pointer operator->() const { return pointer_::make(*this->derived()); } typename boost::detail::operator_brackets_result::type operator[](difference_type n) const { typedef boost::detail::use_operator_brackets_proxy use_proxy; return boost::detail::make_operator_brackets_result( this->derived() + n , use_proxy() ); } Derived& operator++() { iterator_core_access::increment(this->derived()); return this->derived(); } # 679 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" Derived& operator--() { iterator_core_access::decrement(this->derived()); return this->derived(); } Derived operator--(int) { Derived tmp(this->derived()); --*this; return tmp; } Derived& operator+=(difference_type n) { iterator_core_access::advance(this->derived(), n); return this->derived(); } Derived& operator-=(difference_type n) { iterator_core_access::advance(this->derived(), -n); return this->derived(); } Derived operator-(difference_type x) const { Derived result(this->derived()); return result -= x; } # 721 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" }; template inline typename boost::detail::postfix_increment_result::type operator++( iterator_facade& i , int ) { typename boost::detail::postfix_increment_result::type tmp(*static_cast(&i)); ++i; return tmp; } # 836 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return ! iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return 0 > iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return 0 < iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return 0 >= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return 0 <= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) { static_assert(( is_interoperable< Derived1, Derived2 >::value ), "( is_interoperable< Derived1, Derived2 >::value )"); return iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } # 862 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" template inline Derived operator+ ( iterator_facade const& i , typename Derived::difference_type n ) { Derived tmp(static_cast(i)); return tmp += n; } template inline Derived operator+ ( typename Derived::difference_type n , iterator_facade const& i ) { Derived tmp(static_cast(i)); return tmp += n; } } # 1 "/localhome/glisse2/include/boost/iterator/detail/config_undef.hpp" 1 # 877 "/localhome/glisse2/include/boost/iterator/iterator_facade.hpp" 2 # 16 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" 2 # 30 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" # 1 "/localhome/glisse2/include/boost/iterator/detail/config_def.hpp" 1 # 31 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" 2 namespace boost { struct use_default; template struct is_convertible : mpl::false_ {}; namespace detail { # 60 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" struct enable_type; } # 142 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" template struct enable_if_convertible : iterators::enable_if< is_convertible , boost::detail::enable_type > {}; namespace detail { template struct ia_dflt_help : mpl::eval_if< is_same , DefaultNullaryFn , mpl::identity > { }; template < class Derived , class Base , class Value , class Traversal , class Reference , class Difference > struct iterator_adaptor_base { typedef iterator_facade< Derived , typename boost::detail::ia_dflt_help< Value , mpl::eval_if< is_same , iterator_value , remove_reference > >::type , typename boost::detail::ia_dflt_help< Traversal , iterator_traversal >::type , typename boost::detail::ia_dflt_help< Reference , mpl::eval_if< is_same , iterator_reference , add_reference > >::type , typename boost::detail::ia_dflt_help< Difference, iterator_difference >::type > type; }; template inline void iterator_adaptor_assert_traversal () { static_assert((is_convertible::value), "(is_convertible::value)"); } } # 253 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" template < class Derived , class Base , class Value = use_default , class Traversal = use_default , class Reference = use_default , class Difference = use_default > class iterator_adaptor : public boost::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type { friend class iterator_core_access; protected: typedef typename boost::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type super_t; public: iterator_adaptor() {} explicit iterator_adaptor(Base const &iter) : m_iterator(iter) { } typedef Base base_type; Base const& base() const { return m_iterator; } protected: typedef iterator_adaptor iterator_adaptor_; Base const& base_reference() const { return m_iterator; } Base& base_reference() { return m_iterator; } private: typename super_t::reference dereference() const { return *m_iterator; } template < class OtherDerived, class OtherIterator, class V, class C, class R, class D > bool equal(iterator_adaptor const& x) const { return m_iterator == x.base(); } typedef typename iterator_category_to_traversal< typename super_t::iterator_category >::type my_traversal; void advance(typename super_t::difference_type n) { boost::detail::iterator_adaptor_assert_traversal(); m_iterator += n; } void increment() { ++m_iterator; } void decrement() { boost::detail::iterator_adaptor_assert_traversal(); --m_iterator; } template < class OtherDerived, class OtherIterator, class V, class C, class R, class D > typename super_t::difference_type distance_to( iterator_adaptor const& y) const { boost::detail::iterator_adaptor_assert_traversal(); return y.base() - m_iterator; } private: Base m_iterator; }; } # 1 "/localhome/glisse2/include/boost/iterator/detail/config_undef.hpp" 1 # 364 "/localhome/glisse2/include/boost/iterator/iterator_adaptor.hpp" 2 # 13 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/function_traits.hpp" 1 # 16 "/localhome/glisse2/include/boost/type_traits/function_traits.hpp" namespace boost { namespace detail { template struct function_traits_helper; template struct function_traits_helper { static const unsigned arity = 0; typedef R result_type; }; template struct function_traits_helper { static const unsigned arity = 1; typedef R result_type; typedef T1 arg1_type; typedef T1 argument_type; }; template struct function_traits_helper { static const unsigned arity = 2; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T1 first_argument_type; typedef T2 second_argument_type; }; template struct function_traits_helper { static const unsigned arity = 3; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; }; template struct function_traits_helper { static const unsigned arity = 4; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; }; template struct function_traits_helper { static const unsigned arity = 5; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; }; template struct function_traits_helper { static const unsigned arity = 6; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; }; template struct function_traits_helper { static const unsigned arity = 7; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; }; template struct function_traits_helper { static const unsigned arity = 8; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; }; template struct function_traits_helper { static const unsigned arity = 9; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; }; template struct function_traits_helper { static const unsigned arity = 10; typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; typedef T10 arg10_type; }; } template struct function_traits : public boost::detail::function_traits_helper::type> { }; # 234 "/localhome/glisse2/include/boost/type_traits/function_traits.hpp" } # 17 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/result_of.hpp" 1 # 13 "/localhome/glisse2/include/boost/utility/result_of.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/iteration/iterate.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/iteration/iterate.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/slot/slot.hpp" 1 # 16 "/localhome/glisse2/include/boost/preprocessor/slot/slot.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/slot/detail/def.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/slot/slot.hpp" 2 # 21 "/localhome/glisse2/include/boost/preprocessor/iteration/iterate.hpp" 2 # 14 "/localhome/glisse2/include/boost/utility/result_of.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/enum_shifted_params.hpp" 1 # 17 "/localhome/glisse2/include/boost/utility/result_of.hpp" 2 # 30 "/localhome/glisse2/include/boost/utility/result_of.hpp" namespace boost { template struct result_of; template struct tr1_result_of; namespace detail { template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_result_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; template struct tr1_result_of_impl; template struct cpp0x_result_of_impl; template struct result_of_void_impl { typedef void type; }; template struct result_of_void_impl { typedef R type; }; template struct result_of_void_impl { typedef R type; }; template struct result_of_pointer : tr1_result_of_impl::type, FArgs, false> { }; template struct tr1_result_of_impl { typedef typename F::result_type type; }; template struct is_function_with_no_args : mpl::false_ {}; template struct is_function_with_no_args : mpl::true_ {}; template struct result_of_nested_result : F::template result {}; template struct tr1_result_of_impl : mpl::if_, result_of_void_impl, result_of_nested_result >::type {}; } # 1 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 # 24 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 # 12 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/slot/detail/shared.hpp" 1 # 13 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 # 25 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 # 12 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/slot/detail/shared.hpp" 1 # 13 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 # 27 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 47 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type(), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F(), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 48 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 53 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 58 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 63 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2 , T3), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2 , T3), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 68 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2 , T3 , T4), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2 , T3 , T4), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 73 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2 , T3 , T4 , T5), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 78 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2 , T3 , T4 , T5 , T6), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 83 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 88 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 93 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), (boost::detail::has_result_type::value)> >::type { }; # 78 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" template struct result_of : tr1_result_of { }; # 90 "/localhome/glisse2/include/boost/utility/detail/result_of_iterate.hpp" namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; } # 98 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 93 "/localhome/glisse2/include/boost/utility/result_of.hpp" 2 } # 24 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/iterator/detail/config_def.hpp" 1 # 31 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 2 namespace boost { template class transform_iterator; namespace detail { template struct transform_iterator_base { private: typedef typename ia_dflt_help< Reference , result_of::reference)> >::type reference; typedef typename ia_dflt_help< Value , remove_reference >::type cv_value_type; public: typedef iterator_adaptor< transform_iterator , Iterator , cv_value_type , use_default , reference > type; }; } template class transform_iterator : public boost::detail::transform_iterator_base::type { typedef typename boost::detail::transform_iterator_base::type super_t; friend class iterator_core_access; public: transform_iterator() { } transform_iterator(Iterator const& x, UnaryFunc f) : super_t(x), m_f(f) { } explicit transform_iterator(Iterator const& x) : super_t(x) { static_assert(is_class::value, "is_class::value"); } template < class OtherUnaryFunction , class OtherIterator , class OtherReference , class OtherValue> transform_iterator( transform_iterator const& t , typename enable_if_convertible::type* = 0 , typename enable_if_convertible::type* = 0 ) : super_t(t.base()), m_f(t.functor()) {} UnaryFunc functor() const { return m_f; } private: typename super_t::reference dereference() const { return m_f(*this->base()); } UnaryFunc m_f; }; template transform_iterator make_transform_iterator(Iterator it, UnaryFunc fun) { return transform_iterator(it, fun); } # 142 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" template typename iterators::enable_if< is_class , transform_iterator >::type make_transform_iterator(Iterator it) { return transform_iterator(it, UnaryFunc()); } # 168 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" } # 1 "/localhome/glisse2/include/boost/iterator/detail/config_undef.hpp" 1 # 171 "/localhome/glisse2/include/boost/iterator/transform_iterator.hpp" 2 # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Coercion_traits.h" 2 # 135 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Coercion_traits.h" namespace CGAL { namespace INTERN_CT{ template< class FROM, class TO >struct Cast_from_to{ typedef TO result_type; TO operator()(const TO& x) const {return x;} TO operator()(const FROM& x) const {return TO(x);} }; template< class TO> struct Cast_from_to{ typedef TO result_type; TO operator()(const TO& x) const {return x;} }; } template struct Coercion_traits; template struct Coercion_traits_for_level; template <> struct Coercion_traits< short , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef int Type; struct Cast{ typedef Type result_type; Type operator()(const int& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef int Type; struct Cast{ typedef Type result_type; Type operator()(const int& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long Type; struct Cast{ typedef Type result_type; Type operator()(const long& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long Type; struct Cast{ typedef Type result_type; Type operator()(const long& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , long long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long long Type; struct Cast{ typedef Type result_type; Type operator()(const long long& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long long , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long long Type; struct Cast{ typedef Type result_type; Type operator()(const long long& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , long double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long double , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long Type; struct Cast{ typedef Type result_type; Type operator()(const long& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long Type; struct Cast{ typedef Type result_type; Type operator()(const long& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , long long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long long Type; struct Cast{ typedef Type result_type; Type operator()(const long long& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long long , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long long Type; struct Cast{ typedef Type result_type; Type operator()(const long long& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , long double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long double , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , long long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long long Type; struct Cast{ typedef Type result_type; Type operator()(const long long& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long long , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long long Type; struct Cast{ typedef Type result_type; Type operator()(const long long& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , long double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long double , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long long , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const long long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , long long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} Type operator()(const long long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long long , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const long long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , long long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const long long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long long , long double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const long long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long double , long long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const long long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , long double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long double , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , long double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const double& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long double , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} Type operator()(const double& x) const { return Type(x);} }; }; template struct Coercion_traits{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef A Type; struct Cast{ typedef Type result_type; Type inline operator()(const A& x) const { return x; } }; }; template <> struct Coercion_traits< short , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef short Type; struct Cast{ typedef Type result_type; Type operator()(const short& x) const { return x;} }; }; template <> struct Coercion_traits< int , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef int Type; struct Cast{ typedef Type result_type; Type operator()(const int& x) const { return x;} }; }; template <> struct Coercion_traits< long , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long Type; struct Cast{ typedef Type result_type; Type operator()(const long& x) const { return x;} }; }; template <> struct Coercion_traits< long long , long long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long long Type; struct Cast{ typedef Type result_type; Type operator()(const long long& x) const { return x;} }; }; template <> struct Coercion_traits< float , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef float Type; struct Cast{ typedef Type result_type; Type operator()(const float& x) const { return x;} }; }; template <> struct Coercion_traits< double , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef double Type; struct Cast{ typedef Type result_type; Type operator()(const double& x) const { return x;} }; }; template <> struct Coercion_traits< long double , long double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef long double Type; struct Cast{ typedef Type result_type; Type operator()(const long double& x) const { return x;} }; }; enum COERCION_TRAITS_LEVEL { CTL_TOP = 4, CTL_POLYNOMIAL = 4, CTL_COMPLEX = 3, CTL_INTERVAL = 2, CTL_SQRT_EXT = 1 }; template struct Coercion_traits_for_level: public Coercion_traits_for_level{}; template struct Coercion_traits_for_level { typedef Tag_false Are_explicit_interoperable; typedef Tag_false Are_implicit_interoperable; typedef Null_functor Cast; }; template struct Coercion_traits :public Coercion_traits_for_level{}; } # 61 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/type_traits.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/type_traits.h" # 1 "/localhome/glisse2/include/boost/type_traits/is_base_and_derived.hpp" 1 # 24 "/localhome/glisse2/include/boost/type_traits/is_base_and_derived.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 25 "/localhome/glisse2/include/boost/type_traits/is_base_and_derived.hpp" 2 namespace boost { namespace detail { # 222 "/localhome/glisse2/include/boost/type_traits/is_base_and_derived.hpp" template struct is_base_and_derived_impl { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; static const bool value = ((__is_base_of(B,D) && !is_same::value) && ! ::boost::is_same::value); }; } template< typename Base, typename Derived > struct is_base_and_derived : public ::boost::integral_constant::value)> { public: }; template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived > : public ::boost::integral_constant { public: }; template< typename Base, typename Derived > struct is_base_and_derived< Base,Derived& > : public ::boost::integral_constant { public: }; template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived& > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 253 "/localhome/glisse2/include/boost/type_traits/is_base_and_derived.hpp" 2 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/type_traits.h" 2 namespace CGAL { template< class Base, class Derived > struct is_same_or_derived : public ::boost::mpl::or_< ::boost::is_same< Base, Derived >, ::boost::is_base_and_derived< Base, Derived > >::type {}; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" 2 namespace CGAL { # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" struct Integral_domain_without_division_tag {}; struct Integral_domain_tag : public Integral_domain_without_division_tag {}; struct Unique_factorization_domain_tag : public Integral_domain_tag {}; struct Euclidean_ring_tag : public Unique_factorization_domain_tag {}; struct Field_tag : public Integral_domain_tag {}; struct Field_with_sqrt_tag : public Field_tag {}; struct Field_with_kth_root_tag : public Field_with_sqrt_tag {}; struct Field_with_root_of_tag : public Field_with_kth_root_tag {}; template< class Type_ > class Algebraic_structure_traits { public: typedef Type_ Type; typedef Null_tag Algebraic_category; typedef Null_tag Is_exact; typedef Null_tag Is_numerical_sensitive; typedef Null_functor Simplify; typedef Null_functor Unit_part; typedef Null_functor Integral_division; typedef Null_functor Is_square; typedef Null_functor Gcd; typedef Null_functor Div_mod; typedef Null_functor Div; typedef Null_functor Mod; typedef Null_functor Square; typedef Null_functor Is_zero; typedef Null_functor Is_one; typedef Null_functor Sqrt; typedef Null_functor Kth_root; typedef Null_functor Root_of; typedef Null_functor Divides; typedef Null_functor Inverse; }; template< class Type, class Algebra_type > class Algebraic_structure_traits_base; template< class Type_ > class Algebraic_structure_traits_base< Type_, Null_tag > { public: typedef Type_ Type; typedef Null_tag Algebraic_category; typedef Tag_false Is_exact; typedef Null_tag Is_numerical_sensitive; typedef Null_tag Boolean; class Simplify : public std::unary_function< Type&, void > { public: void operator()( Type& ) const {} }; typedef Null_functor Unit_part; typedef Null_functor Integral_division; typedef Null_functor Is_square; typedef Null_functor Gcd; typedef Null_functor Div_mod; typedef Null_functor Div; typedef Null_functor Mod; typedef Null_functor Square; typedef Null_functor Is_zero; typedef Null_functor Is_one; typedef Null_functor Sqrt; typedef Null_functor Kth_root; typedef Null_functor Root_of; typedef Null_functor Divides; typedef Null_functor Inverse; }; template< class Type_ > class Algebraic_structure_traits_base< Type_, Integral_domain_without_division_tag > : public Algebraic_structure_traits_base< Type_, Null_tag > { public: typedef Type_ Type; typedef Integral_domain_without_division_tag Algebraic_category; typedef bool Boolean; class Unit_part : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return( x < Type(0)) ? Type(-1) : Type(1); } }; class Square : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return x*x; } }; class Is_zero : public std::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { return x == Type(0); } }; class Is_one : public std::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { return x == Type(1); } }; }; # 190 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" template< class Type_ > class Algebraic_structure_traits_base< Type_, Integral_domain_tag > : public Algebraic_structure_traits_base< Type_, Integral_domain_without_division_tag > { public: typedef Type_ Type; typedef Integral_domain_tag Algebraic_category; }; # 207 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" template< class Type_ > class Algebraic_structure_traits_base< Type_, Unique_factorization_domain_tag > : public Algebraic_structure_traits_base< Type_, Integral_domain_tag > { public: typedef Type_ Type; typedef Unique_factorization_domain_tag Algebraic_category; class Divides : public std::binary_function{ public: bool operator()( const Type& x, const Type& y) const { typedef CGAL::Algebraic_structure_traits AST; typename AST::Gcd gcd; typename AST::Unit_part unit_part; typename AST::Integral_division idiv; return gcd(y,x) == idiv(x,unit_part(x)); } bool operator()( const Type& x, const Type& y, Type& q) const { typedef CGAL::Algebraic_structure_traits AST; typename AST::Integral_division idiv; bool result = (*this)(x,y); if( result == true ) q = idiv(x,y); return result; } template < class CT_Type_1, class CT_Type_2 > bool operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; template< class Type_ > class Algebraic_structure_traits_base< Type_, Euclidean_ring_tag > : public Algebraic_structure_traits_base< Type_, Unique_factorization_domain_tag > { public: typedef Type_ Type; typedef Euclidean_ring_tag Algebraic_category; class Integral_division : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { typedef Algebraic_structure_traits AST; typedef typename AST::Is_exact Is_exact; typename AST::Div actual_div; (CGAL::possibly(!Is_exact::value || actual_div( x, y) * y == x)?(static_cast(0)): ::CGAL::precondition_fail( "!Is_exact::value || actual_div( x, y) * y == x" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" # 265 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" , 268 # 265 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" , "'x' must be divisible by 'y' in " "Algebraic_structure_traits<...>::Integral_div()(x,y)")) ; return actual_div( x, y); } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class Gcd : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { typedef Algebraic_structure_traits AST; typename AST::Mod mod; typename AST::Unit_part unit_part; typename AST::Integral_division integral_div; if (x == Type(0)) { if (y == Type(0)) return Type(0); return integral_div( y, unit_part(y) ); } if (y == Type(0)) return integral_div(x, unit_part(x) ); Type u = integral_div( x, unit_part(x) ); Type v = integral_div( y, unit_part(y) ); if (u < v) { v = mod(v,u); if ( v == Type(0) ) return u; } # 316 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" Type w; do { w = mod(u,v); if ( w == Type(0)) return v; u = mod(v,w); if ( u == Type(0)) return w; v = mod(w,u); } while (v != Type(0)); return u; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class Div_mod { public: typedef Type first_argument_type; typedef Type second_argument_type; typedef Type& third_argument_type; typedef Type& fourth_argument_type; typedef void result_type; void operator()( const Type& x, const Type& y, Type& q, Type& r) const { typedef Algebraic_structure_traits Traits; typename Traits::Div actual_div; typename Traits::Mod actual_mod; q = actual_div( x, y ); r = actual_mod( x, y ); return; } template < class NT1, class NT2 > void operator()( const NT1& x, const NT2& y, Type& q, Type& r ) const { typedef Coercion_traits< NT1, NT2 > CT; typedef typename CT::Type Type; static_assert(( ::boost::is_same::value), "( ::boost::is_same::value)") ; typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); } }; class Div : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { typename Algebraic_structure_traits ::Div_mod actual_div_mod; Type q; Type r; actual_div_mod( x, y, q, r ); return q; }; template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class Mod : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { typename Algebraic_structure_traits ::Div_mod actual_div_mod; Type q; Type r; actual_div_mod( x, y, q, r ); return r; }; template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class Divides : public std::binary_function{ public: bool operator()( const Type& x, const Type& y) const { typedef Algebraic_structure_traits AST; typename AST::Mod mod; (CGAL::possibly(typename AST::Is_zero()(x) == false)?(static_cast(0)): ::CGAL::precondition_fail( "typename AST::Is_zero()(x) == false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h", 409)); return typename AST::Is_zero()(mod(y,x)); } bool operator()( const Type& x, const Type& y, Type& q) const { typedef Algebraic_structure_traits AST; typename AST::Div_mod div_mod; (CGAL::possibly(typename AST::Is_zero()(x) == false)?(static_cast(0)): ::CGAL::precondition_fail( "typename AST::Is_zero()(x) == false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h", 416)); Type r; div_mod(y,x,q,r); return (typename AST::Is_zero()(r)); } template < class CT_Type_1, class CT_Type_2 > bool operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; # 434 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" template< class Type_ > class Algebraic_structure_traits_base< Type_, Field_tag > : public Algebraic_structure_traits_base< Type_, Integral_domain_tag > { public: typedef Type_ Type; typedef Field_tag Algebraic_category; class Unit_part : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return( x == Type(0)) ? Type(1) : x; } }; class Integral_division : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { typedef Algebraic_structure_traits AST; typedef typename AST::Is_exact Is_exact; bool ie = Is_exact::value; (CGAL::possibly(!ie || (x / y) * y == x)?(static_cast(0)): ::CGAL::precondition_fail( "!ie || (x / y) * y == x" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" # 460 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" , 462 # 460 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" , "'x' must be divisible by 'y' in " "Algebraic_structure_traits<...>::Integral_div()(x,y)")) ; return x / y; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class Inverse : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return Type(1)/x; } }; class Divides : public std::binary_function< Type, Type, bool > { public: bool operator()( const Type& x, const Type& ) const { typedef Algebraic_structure_traits AST; (CGAL::possibly(typename AST::Is_zero()(x) == false)?(static_cast(0)): ::CGAL::precondition_fail( "typename AST::Is_zero()(x) == false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h", 486)); return true; } bool operator()( const Type& x, const Type& y, Type& q) const { typedef Algebraic_structure_traits AST; (CGAL::possibly(typename AST::Is_zero()(x) == false)?(static_cast(0)): ::CGAL::precondition_fail( "typename AST::Is_zero()(x) == false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h", 492)); q = y/x; return true; } template < class CT_Type_1, class CT_Type_2 > bool operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; # 508 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" template< class Type_ > class Algebraic_structure_traits_base< Type_, Field_with_sqrt_tag> : public Algebraic_structure_traits_base< Type_, Field_tag> { public: typedef Type_ Type; typedef Field_with_sqrt_tag Algebraic_category; struct Is_square :public std::binary_function { bool operator()(const Type& ) const {return true;} bool operator()( const Type& x, Type & result) const { typename Algebraic_structure_traits::Sqrt sqrt; result = sqrt(x); return true; } }; }; # 538 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" template< class Type_ > class Algebraic_structure_traits_base< Type_, Field_with_kth_root_tag> : public Algebraic_structure_traits_base< Type_, Field_with_sqrt_tag> { public: typedef Type_ Type; typedef Field_with_kth_root_tag Algebraic_category; }; # 561 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_structure_traits.h" template< class Type_ > class Algebraic_structure_traits_base< Type_, Field_with_root_of_tag > : public Algebraic_structure_traits_base< Type_, Field_with_kth_root_tag > { public: typedef Type_ Type; typedef Field_with_root_of_tag Algebraic_category; }; namespace INTERN_AST { template< class Type > class Div_per_operator : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { return x / y; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; template< class Type > class Mod_per_operator : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { return x % y; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; template< class Type > class Is_square_per_sqrt : public std::binary_function< Type, Type&, bool > { public: bool operator()( const Type& x, Type& y ) const { typename Algebraic_structure_traits< Type >::Sqrt actual_sqrt; y = actual_sqrt( x ); return y * y == x; } bool operator()( const Type& x) const { Type dummy; return operator()(x,dummy); } }; } } # 62 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Real_embeddable_traits.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Real_embeddable_traits.h" namespace CGAL { namespace INTERN_RET { template< class T, class AST_is_zero > struct Is_zero_selector{ typedef AST_is_zero Type; }; template< class T > struct Is_zero_selector< T, Null_functor > { struct Type : public std::unary_function< T, bool >{ bool operator()( const T& x ) const { return x == T(0); } }; }; template < class Type_ , class Is_real_embeddable_ > class Real_embeddable_traits_base{ public: typedef Type_ Type; typedef Is_real_embeddable_ Is_real_embeddable; typedef Null_tag Boolean; typedef Null_tag Sign; typedef Null_tag Comparison_result; typedef Null_functor Abs; typedef Null_functor Sgn; typedef Null_functor Is_finite; typedef Null_functor Is_positive; typedef Null_functor Is_negative; typedef Null_functor Is_zero; typedef Null_functor Compare; typedef Null_functor To_double; typedef Null_functor To_interval; }; template< class Type_ > class Real_embeddable_traits_base { public: typedef Type_ Type; typedef Tag_true Is_real_embeddable; typedef bool Boolean; typedef CGAL::Sign Sign; typedef CGAL::Comparison_result Comparison_result; private: typedef typename Algebraic_structure_traits< Type >::Is_zero AST_Is_zero; public: typedef typename INTERN_RET::Is_zero_selector< Type, AST_Is_zero >::Type Is_zero; class Is_finite : public std::unary_function< Type, Boolean > { public: Boolean operator()( const Type& ) const { return true; } }; class Abs : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return( x < Type(0) ) ? -x : x; } }; class Sgn : public std::unary_function< Type, ::CGAL::Sign > { public: ::CGAL::Sign operator()( const Type& x ) const { if ( x < Type(0)) return NEGATIVE; if ( x > Type(0)) return POSITIVE; return ZERO; } }; class Is_positive : public std::unary_function< Type, Boolean > { public: Boolean operator()( const Type& x ) const { return x > Type(0); } }; class Is_negative : public std::unary_function< Type, Boolean > { public: Boolean operator()( const Type& x ) const { return x < Type(0); } }; class Compare : public std::binary_function< Type, Type, Comparison_result > { public: Comparison_result operator()( const Type& x, const Type& y) const { if( x < y ) return SMALLER; if( x > y ) return LARGER; return EQUAL; } template < class CT_Type_1, class CT_Type_2 > Comparison_result operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class To_double : public std::unary_function< Type, double > { public: double operator()( const Type& x ) const { return static_cast(x); } }; class To_interval : public std::unary_function< Type, std::pair > { public: std::pair operator()( const Type& x ) const { double dx(static_cast(x)); return std::make_pair(dx,dx); } }; }; } template< class Type_ > class Real_embeddable_traits : public INTERN_RET::Real_embeddable_traits_base {}; } # 63 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Fraction_traits.h" 1 # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Fraction_traits.h" namespace CGAL { # 53 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Fraction_traits.h" template class Fraction_traits { public: typedef Type_ Type; typedef Tag_false Is_fraction; typedef Null_tag Numerator_type; typedef Null_tag Denominator_type; typedef Null_functor Common_factor; typedef Null_functor Decompose; typedef Null_functor Compose; }; } # 65 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Rational_traits.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Rational_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/is_convertible.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/is_convertible.h" # 1 "/usr/include/gmpxx.h" 1 3 4 # 37 "/usr/include/gmpxx.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 1 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 4 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 1 "/usr/include/string.h" 1 3 4 # 29 "/usr/include/string.h" 3 4 extern "C" { # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 35 "/usr/include/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern void *memchr (void *__s, int __c, size_t __n) throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const void *memchr (__const void *__s, int __c, size_t __n) throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * memchr (void *__s, int __c, size_t __n) throw () { return __builtin_memchr (__s, __c, __n); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * memchr (__const void *__s, int __c, size_t __n) throw () { return __builtin_memchr (__s, __c, __n); } } extern "C++" void *rawmemchr (void *__s, int __c) throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const void *rawmemchr (__const void *__s, int __c) throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" void *memrchr (void *__s, int __c, size_t __n) throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); # 165 "/usr/include/string.h" 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 210 "/usr/include/string.h" 3 4 extern "C++" { extern char *strchr (char *__s, int __c) throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *strchr (__const char *__s, int __c) throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strchr (char *__s, int __c) throw () { return __builtin_strchr (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strchr (__const char *__s, int __c) throw () { return __builtin_strchr (__s, __c); } } extern "C++" { extern char *strrchr (char *__s, int __c) throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *strrchr (__const char *__s, int __c) throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strrchr (char *__s, int __c) throw () { return __builtin_strrchr (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strrchr (__const char *__s, int __c) throw () { return __builtin_strrchr (__s, __c); } } extern "C++" char *strchrnul (char *__s, int __c) throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern "C++" __const char *strchrnul (__const char *__s, int __c) throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern char *strpbrk (char *__s, __const char *__accept) throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __const char *strpbrk (__const char *__s, __const char *__accept) throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strpbrk (char *__s, __const char *__accept) throw () { return __builtin_strpbrk (__s, __accept); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strpbrk (__const char *__s, __const char *__accept) throw () { return __builtin_strpbrk (__s, __accept); } } extern "C++" { extern char *strstr (char *__haystack, __const char *__needle) throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __const char *strstr (__const char *__haystack, __const char *__needle) throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * strstr (char *__haystack, __const char *__needle) throw () { return __builtin_strstr (__haystack, __needle); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * strstr (__const char *__haystack, __const char *__needle) throw () { return __builtin_strstr (__haystack, __needle); } } extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern "C++" char *strcasestr (char *__haystack, __const char *__needle) throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" __const char *strcasestr (__const char *__haystack, __const char *__needle) throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); # 382 "/usr/include/string.h" 3 4 extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); # 438 "/usr/include/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern char *strerror_l (int __errnum, __locale_t __l) throw (); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern "C++" { extern char *index (char *__s, int __c) throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *index (__const char *__s, int __c) throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * index (char *__s, int __c) throw () { return __builtin_index (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * index (__const char *__s, int __c) throw () { return __builtin_index (__s, __c); } } extern "C++" { extern char *rindex (char *__s, int __c) throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __const char *rindex (__const char *__s, int __c) throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * rindex (char *__s, int __c) throw () { return __builtin_rindex (__s, __c); } extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * rindex (__const char *__s, int __c) throw () { return __builtin_rindex (__s, __c); } } extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern "C++" char *basename (char *__filename) throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); extern "C++" __const char *basename (__const char *__filename) throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); # 646 "/usr/include/string.h" 3 4 } # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 2 3 # 73 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 namespace std __attribute__ ((__visibility__ ("default"))) { using ::memchr; using ::memcmp; using ::memcpy; using ::memmove; using ::memset; using ::strcat; using ::strcmp; using ::strcoll; using ::strcpy; using ::strcspn; using ::strerror; using ::strlen; using ::strncat; using ::strncmp; using ::strncpy; using ::strspn; using ::strtok; using ::strxfrm; using ::strchr; using ::strpbrk; using ::strrchr; using ::strstr; # 122 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 } # 38 "/usr/include/gmpxx.h" 2 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cfloat" 1 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cfloat" 3 4 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cfloat" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/float.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cfloat" 2 3 # 41 "/usr/include/gmpxx.h" 2 3 4 # 1 "/usr/include/gmp.h" 1 3 4 # 67 "/usr/include/gmp.h" 3 4 # 1 "/usr/include/gmp-x86_64.h" 1 3 4 # 25 "/usr/include/gmp-x86_64.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 1 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 4 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 26 "/usr/include/gmp-x86_64.h" 2 3 4 # 50 "/usr/include/gmp-x86_64.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 4 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 51 "/usr/include/gmp-x86_64.h" 2 3 4 # 193 "/usr/include/gmp-x86_64.h" 3 4 typedef unsigned long int mp_limb_t; typedef long int mp_limb_signed_t; typedef unsigned long int mp_bitcnt_t; typedef struct { int _mp_alloc; int _mp_size; mp_limb_t *_mp_d; } __mpz_struct; typedef __mpz_struct MP_INT; typedef __mpz_struct mpz_t[1]; typedef mp_limb_t * mp_ptr; typedef const mp_limb_t * mp_srcptr; typedef long int mp_size_t; typedef long int mp_exp_t; typedef struct { __mpz_struct _mp_num; __mpz_struct _mp_den; } __mpq_struct; typedef __mpq_struct MP_RAT; typedef __mpq_struct mpq_t[1]; typedef struct { int _mp_prec; int _mp_size; mp_exp_t _mp_exp; mp_limb_t *_mp_d; } __mpf_struct; typedef __mpf_struct mpf_t[1]; typedef enum { GMP_RAND_ALG_DEFAULT = 0, GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT } gmp_randalg_t; typedef struct { mpz_t _mp_seed; gmp_randalg_t _mp_alg; union { void *_mp_lc; } _mp_algdata; } __gmp_randstate_struct; typedef __gmp_randstate_struct gmp_randstate_t[1]; typedef const __mpz_struct *mpz_srcptr; typedef __mpz_struct *mpz_ptr; typedef const __mpf_struct *mpf_srcptr; typedef __mpf_struct *mpf_ptr; typedef const __mpq_struct *mpq_srcptr; typedef __mpq_struct *mpq_ptr; # 537 "/usr/include/gmp-x86_64.h" 3 4 extern "C" { using std::FILE; void __gmp_set_memory_functions (void *(*) (size_t), void *(*) (void *, size_t, size_t), void (*) (void *, size_t)) throw (); void __gmp_get_memory_functions (void *(**) (size_t), void *(**) (void *, size_t, size_t), void (**) (void *, size_t)) throw (); extern const int __gmp_bits_per_limb; extern int __gmp_errno; extern const char * const __gmp_version; void __gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); void __gmp_randinit_default (gmp_randstate_t); void __gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t) ; int __gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); void __gmp_randinit_mt (gmp_randstate_t); void __gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); void __gmp_randseed (gmp_randstate_t, mpz_srcptr); void __gmp_randseed_ui (gmp_randstate_t, unsigned long int); void __gmp_randclear (gmp_randstate_t); unsigned long __gmp_urandomb_ui (gmp_randstate_t, unsigned long); unsigned long __gmp_urandomm_ui (gmp_randstate_t, unsigned long); int __gmp_asprintf (char **, const char *, ...); int __gmp_fprintf (FILE *, const char *, ...); # 621 "/usr/include/gmp-x86_64.h" 3 4 int __gmp_printf (const char *, ...); int __gmp_snprintf (char *, size_t, const char *, ...); int __gmp_sprintf (char *, const char *, ...); # 659 "/usr/include/gmp-x86_64.h" 3 4 int __gmp_fscanf (FILE *, const char *, ...); int __gmp_scanf (const char *, ...); int __gmp_sscanf (const char *, const char *, ...); # 688 "/usr/include/gmp-x86_64.h" 3 4 void *__gmpz_realloc (mpz_ptr, mp_size_t); void __gmpz_abs (mpz_ptr, mpz_srcptr); void __gmpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_array_init (mpz_ptr, mp_size_t, mp_size_t); void __gmpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); void __gmpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); unsigned long int __gmpz_cdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpz_clear (mpz_ptr); void __gmpz_clears (mpz_ptr, ...); void __gmpz_clrbit (mpz_ptr, mp_bitcnt_t); int __gmpz_cmp (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__)); int __gmpz_cmp_d (mpz_srcptr, double) __attribute__ ((__pure__)); int __gmpz_cmp_si (mpz_srcptr, signed long int) throw () __attribute__ ((__pure__)); int __gmpz_cmp_ui (mpz_srcptr, unsigned long int) throw () __attribute__ ((__pure__)); int __gmpz_cmpabs (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__)); int __gmpz_cmpabs_d (mpz_srcptr, double) __attribute__ ((__pure__)); int __gmpz_cmpabs_ui (mpz_srcptr, unsigned long int) throw () __attribute__ ((__pure__)); void __gmpz_com (mpz_ptr, mpz_srcptr); void __gmpz_combit (mpz_ptr, mp_bitcnt_t); int __gmpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__)); int __gmpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __attribute__ ((__pure__)); void __gmpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); int __gmpz_divisible_p (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_divisible_ui_p (mpz_srcptr, unsigned long) __attribute__ ((__pure__)); int __gmpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__)); void __gmpz_dump (mpz_srcptr); void *__gmpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); void __gmpz_fac_ui (mpz_ptr, unsigned long int); void __gmpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); unsigned long int __gmpz_fdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpz_fib_ui (mpz_ptr, unsigned long int); void __gmpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); int __gmpz_fits_sint_p (mpz_srcptr) throw () __attribute__ ((__pure__)); int __gmpz_fits_slong_p (mpz_srcptr) throw () __attribute__ ((__pure__)); int __gmpz_fits_sshort_p (mpz_srcptr) throw () __attribute__ ((__pure__)); int __gmpz_fits_uint_p (mpz_srcptr) throw () __attribute__ ((__pure__)); int __gmpz_fits_ulong_p (mpz_srcptr) throw () __attribute__ ((__pure__)); int __gmpz_fits_ushort_p (mpz_srcptr) throw () __attribute__ ((__pure__)); void __gmpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); double __gmpz_get_d (mpz_srcptr) __attribute__ ((__pure__)); double __gmpz_get_d_2exp (signed long int *, mpz_srcptr); long int __gmpz_get_si (mpz_srcptr) throw () __attribute__ ((__pure__)); char *__gmpz_get_str (char *, int, mpz_srcptr); unsigned long int __gmpz_get_ui (mpz_srcptr) throw () __attribute__ ((__pure__)); mp_limb_t __gmpz_getlimbn (mpz_srcptr, mp_size_t) throw () __attribute__ ((__pure__)); mp_bitcnt_t __gmpz_hamdist (mpz_srcptr, mpz_srcptr) throw () __attribute__ ((__pure__)); void __gmpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); void __gmpz_init (mpz_ptr); void __gmpz_init2 (mpz_ptr, mp_bitcnt_t); void __gmpz_inits (mpz_ptr, ...); void __gmpz_init_set (mpz_ptr, mpz_srcptr); void __gmpz_init_set_d (mpz_ptr, double); void __gmpz_init_set_si (mpz_ptr, signed long int); int __gmpz_init_set_str (mpz_ptr, const char *, int); void __gmpz_init_set_ui (mpz_ptr, unsigned long int); size_t __gmpz_inp_raw (mpz_ptr, FILE *); size_t __gmpz_inp_str (mpz_ptr, FILE *, int); int __gmpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); int __gmpz_jacobi (mpz_srcptr, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_kronecker_si (mpz_srcptr, long) __attribute__ ((__pure__)); int __gmpz_kronecker_ui (mpz_srcptr, unsigned long) __attribute__ ((__pure__)); int __gmpz_si_kronecker (long, mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_ui_kronecker (unsigned long, mpz_srcptr) __attribute__ ((__pure__)); void __gmpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); void __gmpz_lucnum_ui (mpz_ptr, unsigned long int); void __gmpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); int __gmpz_millerrabin (mpz_srcptr, int) __attribute__ ((__pure__)); void __gmpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); void __gmpz_mul_si (mpz_ptr, mpz_srcptr, long int); void __gmpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_neg (mpz_ptr, mpz_srcptr); void __gmpz_nextprime (mpz_ptr, mpz_srcptr); size_t __gmpz_out_raw (FILE *, mpz_srcptr); size_t __gmpz_out_str (FILE *, int, mpz_srcptr); int __gmpz_perfect_power_p (mpz_srcptr) __attribute__ ((__pure__)); int __gmpz_perfect_square_p (mpz_srcptr) __attribute__ ((__pure__)); mp_bitcnt_t __gmpz_popcount (mpz_srcptr) throw () __attribute__ ((__pure__)); void __gmpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); void __gmpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); void __gmpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); int __gmpz_probab_prime_p (mpz_srcptr, int) __attribute__ ((__pure__)); void __gmpz_random (mpz_ptr, mp_size_t); void __gmpz_random2 (mpz_ptr, mp_size_t); void __gmpz_realloc2 (mpz_ptr, mp_bitcnt_t); mp_bitcnt_t __gmpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); int __gmpz_root (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_rootrem (mpz_ptr,mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); mp_bitcnt_t __gmpz_scan0 (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__)); mp_bitcnt_t __gmpz_scan1 (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__)); void __gmpz_set (mpz_ptr, mpz_srcptr); void __gmpz_set_d (mpz_ptr, double); void __gmpz_set_f (mpz_ptr, mpf_srcptr); void __gmpz_set_q (mpz_ptr, mpq_srcptr); void __gmpz_set_si (mpz_ptr, signed long int); int __gmpz_set_str (mpz_ptr, const char *, int); void __gmpz_set_ui (mpz_ptr, unsigned long int); void __gmpz_setbit (mpz_ptr, mp_bitcnt_t); size_t __gmpz_size (mpz_srcptr) throw () __attribute__ ((__pure__)); size_t __gmpz_sizeinbase (mpz_srcptr, int) throw () __attribute__ ((__pure__)); void __gmpz_sqrt (mpz_ptr, mpz_srcptr); void __gmpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); void __gmpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); void __gmpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_swap (mpz_ptr, mpz_ptr) throw (); unsigned long int __gmpz_tdiv_ui (mpz_srcptr, unsigned long int) __attribute__ ((__pure__)); void __gmpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); unsigned long int __gmpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); void __gmpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); unsigned long int __gmpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); int __gmpz_tstbit (mpz_srcptr, mp_bitcnt_t) throw () __attribute__ ((__pure__)); void __gmpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); void __gmpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); void __gmpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); void __gmpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); void __gmpq_abs (mpq_ptr, mpq_srcptr); void __gmpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_canonicalize (mpq_ptr); void __gmpq_clear (mpq_ptr); void __gmpq_clears (mpq_ptr, ...); int __gmpq_cmp (mpq_srcptr, mpq_srcptr) __attribute__ ((__pure__)); int __gmpq_cmp_si (mpq_srcptr, long, unsigned long) __attribute__ ((__pure__)); int __gmpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __attribute__ ((__pure__)); void __gmpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); int __gmpq_equal (mpq_srcptr, mpq_srcptr) throw () __attribute__ ((__pure__)); void __gmpq_get_num (mpz_ptr, mpq_srcptr); void __gmpq_get_den (mpz_ptr, mpq_srcptr); double __gmpq_get_d (mpq_srcptr) __attribute__ ((__pure__)); char *__gmpq_get_str (char *, int, mpq_srcptr); void __gmpq_init (mpq_ptr); void __gmpq_inits (mpq_ptr, ...); size_t __gmpq_inp_str (mpq_ptr, FILE *, int); void __gmpq_inv (mpq_ptr, mpq_srcptr); void __gmpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); void __gmpq_neg (mpq_ptr, mpq_srcptr); size_t __gmpq_out_str (FILE *, int, mpq_srcptr); void __gmpq_set (mpq_ptr, mpq_srcptr); void __gmpq_set_d (mpq_ptr, double); void __gmpq_set_den (mpq_ptr, mpz_srcptr); void __gmpq_set_f (mpq_ptr, mpf_srcptr); void __gmpq_set_num (mpq_ptr, mpz_srcptr); void __gmpq_set_si (mpq_ptr, signed long int, unsigned long int); int __gmpq_set_str (mpq_ptr, const char *, int); void __gmpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); void __gmpq_set_z (mpq_ptr, mpz_srcptr); void __gmpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); void __gmpq_swap (mpq_ptr, mpq_ptr) throw (); void __gmpf_abs (mpf_ptr, mpf_srcptr); void __gmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_ceil (mpf_ptr, mpf_srcptr); void __gmpf_clear (mpf_ptr); void __gmpf_clears (mpf_ptr, ...); int __gmpf_cmp (mpf_srcptr, mpf_srcptr) throw () __attribute__ ((__pure__)); int __gmpf_cmp_d (mpf_srcptr, double) __attribute__ ((__pure__)); int __gmpf_cmp_si (mpf_srcptr, signed long int) throw () __attribute__ ((__pure__)); int __gmpf_cmp_ui (mpf_srcptr, unsigned long int) throw () __attribute__ ((__pure__)); void __gmpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); void __gmpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_dump (mpf_srcptr); int __gmpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); int __gmpf_fits_sint_p (mpf_srcptr) throw () __attribute__ ((__pure__)); int __gmpf_fits_slong_p (mpf_srcptr) throw () __attribute__ ((__pure__)); int __gmpf_fits_sshort_p (mpf_srcptr) throw () __attribute__ ((__pure__)); int __gmpf_fits_uint_p (mpf_srcptr) throw () __attribute__ ((__pure__)); int __gmpf_fits_ulong_p (mpf_srcptr) throw () __attribute__ ((__pure__)); int __gmpf_fits_ushort_p (mpf_srcptr) throw () __attribute__ ((__pure__)); void __gmpf_floor (mpf_ptr, mpf_srcptr); double __gmpf_get_d (mpf_srcptr) __attribute__ ((__pure__)); double __gmpf_get_d_2exp (signed long int *, mpf_srcptr); mp_bitcnt_t __gmpf_get_default_prec (void) throw () __attribute__ ((__pure__)); mp_bitcnt_t __gmpf_get_prec (mpf_srcptr) throw () __attribute__ ((__pure__)); long __gmpf_get_si (mpf_srcptr) throw () __attribute__ ((__pure__)); char *__gmpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); unsigned long __gmpf_get_ui (mpf_srcptr) throw () __attribute__ ((__pure__)); void __gmpf_init (mpf_ptr); void __gmpf_init2 (mpf_ptr, mp_bitcnt_t); void __gmpf_inits (mpf_ptr, ...); void __gmpf_init_set (mpf_ptr, mpf_srcptr); void __gmpf_init_set_d (mpf_ptr, double); void __gmpf_init_set_si (mpf_ptr, signed long int); int __gmpf_init_set_str (mpf_ptr, const char *, int); void __gmpf_init_set_ui (mpf_ptr, unsigned long int); size_t __gmpf_inp_str (mpf_ptr, FILE *, int); int __gmpf_integer_p (mpf_srcptr) throw () __attribute__ ((__pure__)); void __gmpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); void __gmpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_neg (mpf_ptr, mpf_srcptr); size_t __gmpf_out_str (FILE *, int, size_t, mpf_srcptr); void __gmpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); void __gmpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_set (mpf_ptr, mpf_srcptr); void __gmpf_set_d (mpf_ptr, double); void __gmpf_set_default_prec (mp_bitcnt_t) throw (); void __gmpf_set_prec (mpf_ptr, mp_bitcnt_t); void __gmpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) throw (); void __gmpf_set_q (mpf_ptr, mpq_srcptr); void __gmpf_set_si (mpf_ptr, signed long int); int __gmpf_set_str (mpf_ptr, const char *, int); void __gmpf_set_ui (mpf_ptr, unsigned long int); void __gmpf_set_z (mpf_ptr, mpz_srcptr); size_t __gmpf_size (mpf_srcptr) throw () __attribute__ ((__pure__)); void __gmpf_sqrt (mpf_ptr, mpf_srcptr); void __gmpf_sqrt_ui (mpf_ptr, unsigned long int); void __gmpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); void __gmpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); void __gmpf_swap (mpf_ptr, mpf_ptr) throw (); void __gmpf_trunc (mpf_ptr, mpf_srcptr); void __gmpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); void __gmpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); void __gmpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); # 1501 "/usr/include/gmp-x86_64.h" 3 4 mp_limb_t __gmpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t); mp_limb_t __gmpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) throw (); mp_limb_t __gmpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); int __gmpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__)); mp_limb_t __gmpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); mp_limb_t __gmpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); mp_limb_t __gmpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); mp_limb_t __gmpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); mp_size_t __gmpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); mp_limb_t __gmpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__)); mp_limb_t __gmpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); mp_size_t __gmpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); size_t __gmpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); mp_bitcnt_t __gmpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__)); mp_limb_t __gmpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); mp_limb_t __gmpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __attribute__ ((__pure__)); mp_limb_t __gmpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); mp_limb_t __gmpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); void __gmpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_sqr (mp_ptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_neg (mp_ptr, mp_srcptr, mp_size_t); void __gmpn_com (mp_ptr, mp_srcptr, mp_size_t); int __gmpn_perfect_square_p (mp_srcptr, mp_size_t) __attribute__ ((__pure__)); int __gmpn_perfect_power_p (mp_srcptr, mp_size_t) __attribute__ ((__pure__)); mp_bitcnt_t __gmpn_popcount (mp_srcptr, mp_size_t) throw () __attribute__ ((__pure__)); mp_size_t __gmpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); mp_limb_t __gmpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __attribute__ ((__pure__)); void __gmpn_random (mp_ptr, mp_size_t); void __gmpn_random2 (mp_ptr, mp_size_t); mp_limb_t __gmpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); mp_bitcnt_t __gmpn_scan0 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); mp_bitcnt_t __gmpn_scan1 (mp_srcptr, mp_bitcnt_t) __attribute__ ((__pure__)); mp_size_t __gmpn_set_str (mp_ptr, const unsigned char *, size_t, int); mp_size_t __gmpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t); mp_limb_t __gmpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) throw (); mp_limb_t __gmpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); mp_limb_t __gmpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); void __gmpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); void __gmpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); void __gmpn_copyi (mp_ptr, mp_srcptr, mp_size_t); void __gmpn_copyd (mp_ptr, mp_srcptr, mp_size_t); void __gmpn_zero (mp_ptr, mp_size_t); # 1681 "/usr/include/gmp-x86_64.h" 3 4 extern __inline__ __attribute__ ((__gnu_inline__)) void __gmpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpz_set (__gmp_w, __gmp_u); __gmp_w->_mp_size = ((__gmp_w->_mp_size) >= 0 ? (__gmp_w->_mp_size) : -(__gmp_w->_mp_size)); } # 1705 "/usr/include/gmp-x86_64.h" 3 4 extern __inline__ __attribute__ ((__gnu_inline__)) int __gmpz_fits_uint_p (mpz_srcptr __gmp_z) throw () { mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned) 0)));; } extern __inline__ __attribute__ ((__gnu_inline__)) int __gmpz_fits_ulong_p (mpz_srcptr __gmp_z) throw () { mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= (~ (unsigned long) 0)));; } extern __inline__ __attribute__ ((__gnu_inline__)) int __gmpz_fits_ushort_p (mpz_srcptr __gmp_z) throw () { mp_size_t __gmp_n = __gmp_z->_mp_size; mp_ptr __gmp_p = __gmp_z->_mp_d; return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= ((unsigned short) ~0)));; } extern __inline__ __attribute__ ((__gnu_inline__)) unsigned long __gmpz_get_ui (mpz_srcptr __gmp_z) throw () { mp_ptr __gmp_p = __gmp_z->_mp_d; mp_size_t __gmp_n = __gmp_z->_mp_size; mp_limb_t __gmp_l = __gmp_p[0]; return (__gmp_n != 0 ? __gmp_l : 0); # 1761 "/usr/include/gmp-x86_64.h" 3 4 } extern __inline__ __attribute__ ((__gnu_inline__)) mp_limb_t __gmpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) throw () { mp_limb_t __gmp_result = 0; if (__builtin_expect ((__gmp_n >= 0 && __gmp_n < ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size))) != 0, 1)) __gmp_result = __gmp_z->_mp_d[__gmp_n]; return __gmp_result; } extern __inline__ __attribute__ ((__gnu_inline__)) void __gmpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpz_set (__gmp_w, __gmp_u); __gmp_w->_mp_size = - __gmp_w->_mp_size; } extern __inline__ __attribute__ ((__gnu_inline__)) int __gmpz_perfect_square_p (mpz_srcptr __gmp_a) { mp_size_t __gmp_asize; int __gmp_result; __gmp_asize = __gmp_a->_mp_size; __gmp_result = (__gmp_asize >= 0); if (__builtin_expect ((__gmp_asize > 0) != 0, 1)) __gmp_result = __gmpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); return __gmp_result; } extern __inline__ __attribute__ ((__gnu_inline__)) mp_bitcnt_t __gmpz_popcount (mpz_srcptr __gmp_u) throw () { mp_size_t __gmp_usize; mp_bitcnt_t __gmp_result; __gmp_usize = __gmp_u->_mp_size; __gmp_result = (__gmp_usize < 0 ? (~ (unsigned long) 0) : 0); if (__builtin_expect ((__gmp_usize > 0) != 0, 1)) __gmp_result = __gmpn_popcount (__gmp_u->_mp_d, __gmp_usize); return __gmp_result; } extern __inline__ __attribute__ ((__gnu_inline__)) void __gmpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) { __gmpz_tdiv_q (__gmp_w, (&((__gmp_u)->_mp_num)), (&((__gmp_u)->_mp_den))); } extern __inline__ __attribute__ ((__gnu_inline__)) size_t __gmpz_size (mpz_srcptr __gmp_z) throw () { return ((__gmp_z->_mp_size) >= 0 ? (__gmp_z->_mp_size) : -(__gmp_z->_mp_size)); } extern __inline__ __attribute__ ((__gnu_inline__)) void __gmpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpq_set (__gmp_w, __gmp_u); __gmp_w->_mp_num._mp_size = ((__gmp_w->_mp_num._mp_size) >= 0 ? (__gmp_w->_mp_num._mp_size) : -(__gmp_w->_mp_num._mp_size)); } extern __inline__ __attribute__ ((__gnu_inline__)) void __gmpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) { if (__gmp_w != __gmp_u) __gmpq_set (__gmp_w, __gmp_u); __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; } # 2103 "/usr/include/gmp-x86_64.h" 3 4 extern __inline__ __attribute__ ((__gnu_inline__)) mp_limb_t __gmpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_add_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x + 1) & ((~ (static_cast (0))) >> 0)) == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0); return __gmp_c; } extern __inline__ __attribute__ ((__gnu_inline__)) mp_limb_t __gmpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) throw () { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x + (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_r) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x + 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_r) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0); return __gmp_c; } extern __inline__ __attribute__ ((__gnu_inline__)) int __gmpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) throw () { int __gmp_result; do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_y; (__gmp_result) = 0; __gmp_i = (__gmp_size); while (--__gmp_i >= 0) { __gmp_x = (__gmp_xp)[__gmp_i]; __gmp_y = (__gmp_yp)[__gmp_i]; if (__gmp_x != __gmp_y) { (__gmp_result) = (__gmp_x > __gmp_y ? 1 : -1); break; } } } while (0); return __gmp_result; } extern __inline__ __attribute__ ((__gnu_inline__)) mp_limb_t __gmpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x; __gmp_i = (__gmp_ysize); if (__gmp_i != 0) { if (__gmpn_sub_n (__gmp_wp, __gmp_xp, __gmp_yp, __gmp_i)) { do { if (__gmp_i >= (__gmp_xsize)) { (__gmp_c) = 1; goto __gmp_done; } __gmp_x = (__gmp_xp)[__gmp_i]; } while ((((__gmp_wp)[__gmp_i++] = (__gmp_x - 1) & ((~ (static_cast (0))) >> 0)), __gmp_x == 0)); } } if ((__gmp_wp) != (__gmp_xp)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_xsize); __gmp_j++) (__gmp_wp)[__gmp_j] = (__gmp_xp)[__gmp_j]; } while (0); (__gmp_c) = 0; __gmp_done: ; } while (0); return __gmp_c; } extern __inline__ __attribute__ ((__gnu_inline__)) mp_limb_t __gmpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) throw () { mp_limb_t __gmp_c; do { mp_size_t __gmp_i; mp_limb_t __gmp_x, __gmp_r; __gmp_x = (__gmp_src)[0]; __gmp_r = __gmp_x - (__gmp_n); (__gmp_dst)[0] = __gmp_r; if (((__gmp_x) < ((__gmp_n)))) { (__gmp_c) = 1; for (__gmp_i = 1; __gmp_i < (__gmp_size);) { __gmp_x = (__gmp_src)[__gmp_i]; __gmp_r = __gmp_x - 1; (__gmp_dst)[__gmp_i] = __gmp_r; ++__gmp_i; if (!((__gmp_x) < (1))) { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (__gmp_i); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; break; } } } else { if ((__gmp_src) != (__gmp_dst)) do { mp_size_t __gmp_j; ; for (__gmp_j = (1); __gmp_j < (__gmp_size); __gmp_j++) (__gmp_dst)[__gmp_j] = (__gmp_src)[__gmp_j]; } while (0); (__gmp_c) = 0; } } while (0); return __gmp_c; } extern __inline__ __attribute__ ((__gnu_inline__)) mp_limb_t __gmpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) { mp_limb_t __gmp_ul, __gmp_cy; __gmp_cy = 0; do { __gmp_ul = *__gmp_up++; *__gmp_rp++ = -__gmp_ul - __gmp_cy; __gmp_cy |= __gmp_ul != 0; } while (--__gmp_n != 0); return __gmp_cy; } } # 2229 "/usr/include/gmp-x86_64.h" 3 4 std::ostream& operator<< (std::ostream &, mpz_srcptr); std::ostream& operator<< (std::ostream &, mpq_srcptr); std::ostream& operator<< (std::ostream &, mpf_srcptr); std::istream& operator>> (std::istream &, mpz_ptr); std::istream& operator>> (std::istream &, mpq_ptr); std::istream& operator>> (std::istream &, mpf_ptr); # 2260 "/usr/include/gmp-x86_64.h" 3 4 enum { GMP_ERROR_NONE = 0, GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, GMP_ERROR_DIVISION_BY_ZERO = 2, GMP_ERROR_SQRT_OF_NEGATIVE = 4, GMP_ERROR_INVALID_ARGUMENT = 8 }; # 68 "/usr/include/gmp.h" 2 3 4 # 42 "/usr/include/gmpxx.h" 2 3 4 # 50 "/usr/include/gmpxx.h" 3 4 struct __gmp_unary_plus { static void eval(mpz_ptr z, mpz_srcptr w) { __gmpz_set(z, w); } static void eval(mpq_ptr q, mpq_srcptr r) { __gmpq_set(q, r); } static void eval(mpf_ptr f, mpf_srcptr g) { __gmpf_set(f, g); } }; struct __gmp_unary_minus { static void eval(mpz_ptr z, mpz_srcptr w) { __gmpz_neg(z, w); } static void eval(mpq_ptr q, mpq_srcptr r) { __gmpq_neg(q, r); } static void eval(mpf_ptr f, mpf_srcptr g) { __gmpf_neg(f, g); } }; struct __gmp_unary_com { static void eval(mpz_ptr z, mpz_srcptr w) { __gmpz_com(z, w); } }; struct __gmp_binary_plus { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_add(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { __gmpz_add_ui(z, w, l); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { __gmpz_add_ui(z, w, l); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { if (l >= 0) __gmpz_add_ui(z, w, l); else __gmpz_sub_ui(z, w, -l); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { if (l >= 0) __gmpz_add_ui(z, w, l); else __gmpz_sub_ui(z, w, -l); } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_add(z, w, temp); __gmpz_clear(temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_add(z, temp, w); __gmpz_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, mpq_srcptr s) { __gmpq_add(q, r, s); } static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l) { __gmpq_set(q, r); __gmpz_addmul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); } static void eval(mpq_ptr q, unsigned long int l, mpq_srcptr r) { __gmpq_set(q, r); __gmpz_addmul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); } static void eval(mpq_ptr q, mpq_srcptr r, signed long int l) { __gmpq_set(q, r); if (l >= 0) __gmpz_addmul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); else __gmpz_submul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), -l); } static void eval(mpq_ptr q, signed long int l, mpq_srcptr r) { __gmpq_set(q, r); if (l >= 0) __gmpz_addmul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); else __gmpz_submul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), -l); } static void eval(mpq_ptr q, mpq_srcptr r, double d) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_add(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, double d, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_add(q, temp, r); __gmpq_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, mpz_srcptr z) { __gmpq_set(q, r); __gmpz_addmul((&((q)->_mp_num)), (&((q)->_mp_den)), z); } static void eval(mpq_ptr q, mpz_srcptr z, mpq_srcptr r) { __gmpq_set(q, r); __gmpz_addmul((&((q)->_mp_num)), (&((q)->_mp_den)), z); } static void eval(mpf_ptr f, mpf_srcptr g, mpf_srcptr h) { __gmpf_add(f, g, h); } static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l) { __gmpf_add_ui(f, g, l); } static void eval(mpf_ptr f, unsigned long int l, mpf_srcptr g) { __gmpf_add_ui(f, g, l); } static void eval(mpf_ptr f, mpf_srcptr g, signed long int l) { if (l >= 0) __gmpf_add_ui(f, g, l); else __gmpf_sub_ui(f, g, -l); } static void eval(mpf_ptr f, signed long int l, mpf_srcptr g) { if (l >= 0) __gmpf_add_ui(f, g, l); else __gmpf_sub_ui(f, g, -l); } static void eval(mpf_ptr f, mpf_srcptr g, double d) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_add(f, g, temp); __gmpf_clear(temp); } static void eval(mpf_ptr f, double d, mpf_srcptr g) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_add(f, temp, g); __gmpf_clear(temp); } }; struct __gmp_binary_minus { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_sub(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { __gmpz_sub_ui(z, w, l); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { __gmpz_ui_sub(z, l, w); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { if (l >= 0) __gmpz_sub_ui(z, w, l); else __gmpz_add_ui(z, w, -l); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { if (l >= 0) __gmpz_ui_sub(z, l, w); else { __gmpz_add_ui(z, w, -l); __gmpz_neg(z, z); } } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_sub(z, w, temp); __gmpz_clear(temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_sub(z, temp, w); __gmpz_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, mpq_srcptr s) { __gmpq_sub(q, r, s); } static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l) { __gmpq_set(q, r); __gmpz_submul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); } static void eval(mpq_ptr q, unsigned long int l, mpq_srcptr r) { __gmpq_neg(q, r); __gmpz_addmul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); } static void eval(mpq_ptr q, mpq_srcptr r, signed long int l) { __gmpq_set(q, r); if (l >= 0) __gmpz_submul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); else __gmpz_addmul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), -l); } static void eval(mpq_ptr q, signed long int l, mpq_srcptr r) { __gmpq_neg(q, r); if (l >= 0) __gmpz_addmul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), l); else __gmpz_submul_ui((&((q)->_mp_num)), (&((q)->_mp_den)), -l); } static void eval(mpq_ptr q, mpq_srcptr r, double d) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_sub(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, double d, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_sub(q, temp, r); __gmpq_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, mpz_srcptr z) { __gmpq_set(q, r); __gmpz_submul((&((q)->_mp_num)), (&((q)->_mp_den)), z); } static void eval(mpq_ptr q, mpz_srcptr z, mpq_srcptr r) { __gmpq_neg(q, r); __gmpz_addmul((&((q)->_mp_num)), (&((q)->_mp_den)), z); } static void eval(mpf_ptr f, mpf_srcptr g, mpf_srcptr h) { __gmpf_sub(f, g, h); } static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l) { __gmpf_sub_ui(f, g, l); } static void eval(mpf_ptr f, unsigned long int l, mpf_srcptr g) { __gmpf_ui_sub(f, l, g); } static void eval(mpf_ptr f, mpf_srcptr g, signed long int l) { if (l >= 0) __gmpf_sub_ui(f, g, l); else __gmpf_add_ui(f, g, -l); } static void eval(mpf_ptr f, signed long int l, mpf_srcptr g) { if (l >= 0) __gmpf_sub_ui(f, g, l); else __gmpf_add_ui(f, g, -l); __gmpf_neg(f, f); } static void eval(mpf_ptr f, mpf_srcptr g, double d) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_sub(f, g, temp); __gmpf_clear(temp); } static void eval(mpf_ptr f, double d, mpf_srcptr g) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_sub(f, temp, g); __gmpf_clear(temp); } }; struct __gmp_binary_multiplies { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_mul(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { __gmpz_mul_ui(z, w, l); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { __gmpz_mul_ui(z, w, l); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { __gmpz_mul_si (z, w, l); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { __gmpz_mul_si (z, w, l); } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_mul(z, w, temp); __gmpz_clear(temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_mul(z, temp, w); __gmpz_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, mpq_srcptr s) { __gmpq_mul(q, r, s); } static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l) { mpq_t temp; __gmpq_init(temp); __gmpq_set_ui(temp, l, 1); __gmpq_mul(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, unsigned long int l, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_ui(temp, l, 1); __gmpq_mul(q, temp, r); __gmpq_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, signed long int l) { mpq_t temp; __gmpq_init(temp); __gmpq_set_si(temp, l, 1); __gmpq_mul(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, signed long int l, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_si(temp, l, 1); __gmpq_mul(q, temp, r); __gmpq_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, double d) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_mul(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, double d, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_mul(q, temp, r); __gmpq_clear(temp); } static void eval(mpf_ptr f, mpf_srcptr g, mpf_srcptr h) { __gmpf_mul(f, g, h); } static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l) { __gmpf_mul_ui(f, g, l); } static void eval(mpf_ptr f, unsigned long int l, mpf_srcptr g) { __gmpf_mul_ui(f, g, l); } static void eval(mpf_ptr f, mpf_srcptr g, signed long int l) { if (l >= 0) __gmpf_mul_ui(f, g, l); else { __gmpf_mul_ui(f, g, -l); __gmpf_neg(f, f); } } static void eval(mpf_ptr f, signed long int l, mpf_srcptr g) { if (l >= 0) __gmpf_mul_ui(f, g, l); else { __gmpf_mul_ui(f, g, -l); __gmpf_neg(f, f); } } static void eval(mpf_ptr f, mpf_srcptr g, double d) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_mul(f, g, temp); __gmpf_clear(temp); } static void eval(mpf_ptr f, double d, mpf_srcptr g) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_mul(f, temp, g); __gmpf_clear(temp); } }; struct __gmp_binary_divides { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_tdiv_q(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { __gmpz_tdiv_q_ui(z, w, l); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { if (((w)->_mp_size < 0 ? -1 : (w)->_mp_size > 0) >= 0) { if (__gmpz_fits_ulong_p(w)) __gmpz_set_ui(z, l / __gmpz_get_ui(w)); else __gmpz_set_ui(z, 0); } else { __gmpz_neg(z, w); if (__gmpz_fits_ulong_p(z)) { __gmpz_set_ui(z, l / __gmpz_get_ui(z)); __gmpz_neg(z, z); } else __gmpz_set_ui(z, 0); } } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { if (l >= 0) __gmpz_tdiv_q_ui(z, w, l); else { __gmpz_tdiv_q_ui(z, w, -l); __gmpz_neg(z, z); } } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { if (__gmpz_fits_slong_p(w)) __gmpz_set_si(z, l / __gmpz_get_si(w)); else { __gmpz_set_si (z, (__gmpz_cmpabs_ui (w, (l >= 0 ? l : -l)) == 0 ? -1 : 0)); } } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_tdiv_q(z, w, temp); __gmpz_clear(temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_tdiv_q(z, temp, w); __gmpz_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, mpq_srcptr s) { __gmpq_div(q, r, s); } static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l) { mpq_t temp; __gmpq_init(temp); __gmpq_set_ui(temp, l, 1); __gmpq_div(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, unsigned long int l, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_ui(temp, l, 1); __gmpq_div(q, temp, r); __gmpq_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, signed long int l) { mpq_t temp; __gmpq_init(temp); __gmpq_set_si(temp, l, 1); __gmpq_div(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, signed long int l, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_si(temp, l, 1); __gmpq_div(q, temp, r); __gmpq_clear(temp); } static void eval(mpq_ptr q, mpq_srcptr r, double d) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_div(q, r, temp); __gmpq_clear(temp); } static void eval(mpq_ptr q, double d, mpq_srcptr r) { mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); __gmpq_div(q, temp, r); __gmpq_clear(temp); } static void eval(mpf_ptr f, mpf_srcptr g, mpf_srcptr h) { __gmpf_div(f, g, h); } static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l) { __gmpf_div_ui(f, g, l); } static void eval(mpf_ptr f, unsigned long int l, mpf_srcptr g) { __gmpf_ui_div(f, l, g); } static void eval(mpf_ptr f, mpf_srcptr g, signed long int l) { if (l >= 0) __gmpf_div_ui(f, g, l); else { __gmpf_div_ui(f, g, -l); __gmpf_neg(f, f); } } static void eval(mpf_ptr f, signed long int l, mpf_srcptr g) { if (l >= 0) __gmpf_ui_div(f, l, g); else { __gmpf_ui_div(f, -l, g); __gmpf_neg(f, f); } } static void eval(mpf_ptr f, mpf_srcptr g, double d) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_div(f, g, temp); __gmpf_clear(temp); } static void eval(mpf_ptr f, double d, mpf_srcptr g) { mpf_t temp; __gmpf_init2(temp, 8*sizeof(double)); __gmpf_set_d(temp, d); __gmpf_div(f, temp, g); __gmpf_clear(temp); } }; struct __gmp_binary_modulus { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_tdiv_r(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { __gmpz_tdiv_r_ui(z, w, l); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { if (((w)->_mp_size < 0 ? -1 : (w)->_mp_size > 0) >= 0) { if (__gmpz_fits_ulong_p(w)) __gmpz_set_ui(z, l % __gmpz_get_ui(w)); else __gmpz_set_ui(z, l); } else { __gmpz_neg(z, w); if (__gmpz_fits_ulong_p(z)) __gmpz_set_ui(z, l % __gmpz_get_ui(z)); else __gmpz_set_ui(z, l); } } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { __gmpz_tdiv_r_ui (z, w, (l >= 0 ? l : -l)); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { if (__gmpz_fits_slong_p(w)) __gmpz_set_si(z, l % __gmpz_get_si(w)); else { __gmpz_set_si (z, __gmpz_cmpabs_ui (w, (l >= 0 ? l : -l)) == 0 ? 0 : l); } } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_tdiv_r(z, w, temp); __gmpz_clear(temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; __gmpz_init_set_d(temp, d); __gmpz_tdiv_r(z, temp, w); __gmpz_clear(temp); } }; # 682 "/usr/include/gmpxx.h" 3 4 struct __gmp_binary_and { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_and(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_ui (temp, l); __gmpz_and (z, w, temp); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_ui (temp, l); __gmpz_and (z, w, temp); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_si (temp, l); __gmpz_and (z, w, temp); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_si (temp, l); __gmpz_and (z, w, temp); } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; mp_limb_t limbs[(2 + 1024 / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (2 + 1024 / (64 - 0)); __gmpz_set_d (temp, d); __gmpz_and (z, w, temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(2 + 1024 / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (2 + 1024 / (64 - 0)); __gmpz_set_d (temp, d); __gmpz_and (z, w, temp); } }; struct __gmp_binary_ior { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_ior(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_ui (temp, l); __gmpz_ior (z, w, temp); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_ui (temp, l); __gmpz_ior (z, w, temp); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_si (temp, l); __gmpz_ior (z, w, temp); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_si (temp, l); __gmpz_ior (z, w, temp); } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; mp_limb_t limbs[(2 + 1024 / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (2 + 1024 / (64 - 0)); __gmpz_set_d (temp, d); __gmpz_ior (z, w, temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(2 + 1024 / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (2 + 1024 / (64 - 0)); __gmpz_set_d (temp, d); __gmpz_ior (z, w, temp); } }; struct __gmp_binary_xor { static void eval(mpz_ptr z, mpz_srcptr w, mpz_srcptr v) { __gmpz_xor(z, w, v); } static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_ui (temp, l); __gmpz_xor (z, w, temp); } static void eval(mpz_ptr z, unsigned long int l, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_ui (temp, l); __gmpz_xor (z, w, temp); } static void eval(mpz_ptr z, mpz_srcptr w, signed long int l) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_si (temp, l); __gmpz_xor (z, w, temp); } static void eval(mpz_ptr z, signed long int l, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(1 + (8 * sizeof (long) - 1) / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (1 + (8 * sizeof (long) - 1) / (64 - 0)); __gmpz_set_si (temp, l); __gmpz_xor (z, w, temp); } static void eval(mpz_ptr z, mpz_srcptr w, double d) { mpz_t temp; mp_limb_t limbs[(2 + 1024 / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (2 + 1024 / (64 - 0)); __gmpz_set_d (temp, d); __gmpz_xor (z, w, temp); } static void eval(mpz_ptr z, double d, mpz_srcptr w) { mpz_t temp; mp_limb_t limbs[(2 + 1024 / (64 - 0))]; temp->_mp_d = limbs; temp->_mp_alloc = (2 + 1024 / (64 - 0)); __gmpz_set_d (temp, d); __gmpz_xor (z, w, temp); } }; struct __gmp_binary_lshift { static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { __gmpz_mul_2exp(z, w, l); } static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l) { __gmpq_mul_2exp(q, r, l); } static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l) { __gmpf_mul_2exp(f, g, l); } }; struct __gmp_binary_rshift { static void eval(mpz_ptr z, mpz_srcptr w, unsigned long int l) { __gmpz_fdiv_q_2exp(z, w, l); } static void eval(mpq_ptr q, mpq_srcptr r, unsigned long int l) { __gmpq_div_2exp(q, r, l); } static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l) { __gmpf_div_2exp(f, g, l); } }; struct __gmp_binary_equal { static bool eval(mpz_srcptr z, mpz_srcptr w) { return __gmpz_cmp(z, w) == 0; } static bool eval(mpz_srcptr z, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) == 0; } static bool eval(unsigned long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) == 0; } static bool eval(mpz_srcptr z, signed long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) == 0; } static bool eval(signed long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) == 0; } static bool eval(mpz_srcptr z, double d) { return __gmpz_cmp_d(z, d) == 0; } static bool eval(double d, mpz_srcptr z) { return __gmpz_cmp_d(z, d) == 0; } static bool eval(mpq_srcptr q, mpq_srcptr r) { return __gmpq_equal(q, r) != 0; } static bool eval(mpq_srcptr q, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) == 0; } static bool eval(unsigned long int l, mpq_srcptr q) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) == 0; } static bool eval(mpq_srcptr q, signed long int l) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) == 0; } static bool eval(signed long int l, mpq_srcptr q) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) == 0; } static bool eval(mpq_srcptr q, double d) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_equal(q, temp) != 0); __gmpq_clear(temp); return b; } static bool eval(double d, mpq_srcptr q) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_equal(temp, q) != 0); __gmpq_clear(temp); return b; } static bool eval(mpf_srcptr f, mpf_srcptr g) { return __gmpf_cmp(f, g) == 0; } static bool eval(mpf_srcptr f, unsigned long int l) { return __gmpf_cmp_ui(f, l) == 0; } static bool eval(unsigned long int l, mpf_srcptr f) { return __gmpf_cmp_ui(f, l) == 0; } static bool eval(mpf_srcptr f, signed long int l) { return __gmpf_cmp_si(f, l) == 0; } static bool eval(signed long int l, mpf_srcptr f) { return __gmpf_cmp_si(f, l) == 0; } static bool eval(mpf_srcptr f, double d) { return __gmpf_cmp_d(f, d) == 0; } static bool eval(double d, mpf_srcptr f) { return __gmpf_cmp_d(f, d) == 0; } }; struct __gmp_binary_not_equal { static bool eval(mpz_srcptr z, mpz_srcptr w) { return __gmpz_cmp(z, w) != 0; } static bool eval(mpz_srcptr z, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) != 0; } static bool eval(unsigned long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) != 0; } static bool eval(mpz_srcptr z, signed long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) != 0; } static bool eval(signed long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) != 0; } static bool eval(mpz_srcptr z, double d) { return __gmpz_cmp_d(z, d) != 0; } static bool eval(double d, mpz_srcptr z) { return __gmpz_cmp_d(z, d) != 0; } static bool eval(mpq_srcptr q, mpq_srcptr r) { return __gmpq_equal(q, r) == 0; } static bool eval(mpq_srcptr q, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) != 0; } static bool eval(unsigned long int l, mpq_srcptr q) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) != 0; } static bool eval(mpq_srcptr q, signed long int l) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) != 0; } static bool eval(signed long int l, mpq_srcptr q) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) != 0; } static bool eval(mpq_srcptr q, double d) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_equal(q, temp) == 0); __gmpq_clear(temp); return b; } static bool eval(double d, mpq_srcptr q) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_equal(temp, q) == 0); __gmpq_clear(temp); return b; } static bool eval(mpf_srcptr f, mpf_srcptr g) { return __gmpf_cmp(f, g) != 0; } static bool eval(mpf_srcptr f, unsigned long int l) { return __gmpf_cmp_ui(f, l) != 0; } static bool eval(unsigned long int l, mpf_srcptr f) { return __gmpf_cmp_ui(f, l) != 0; } static bool eval(mpf_srcptr f, signed long int l) { return __gmpf_cmp_si(f, l) != 0; } static bool eval(signed long int l, mpf_srcptr f) { return __gmpf_cmp_si(f, l) != 0; } static bool eval(mpf_srcptr f, double d) { return __gmpf_cmp_d(f, d) != 0; } static bool eval(double d, mpf_srcptr f) { return __gmpf_cmp_d(f, d) != 0; } }; struct __gmp_binary_less { static bool eval(mpz_srcptr z, mpz_srcptr w) { return __gmpz_cmp(z, w) < 0; } static bool eval(mpz_srcptr z, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) < 0; } static bool eval(unsigned long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) > 0; } static bool eval(mpz_srcptr z, signed long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) < 0; } static bool eval(signed long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) > 0; } static bool eval(mpz_srcptr z, double d) { return __gmpz_cmp_d(z, d) < 0; } static bool eval(double d, mpz_srcptr z) { return __gmpz_cmp_d(z, d) > 0; } static bool eval(mpq_srcptr q, mpq_srcptr r) { return __gmpq_cmp(q, r) < 0; } static bool eval(mpq_srcptr q, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) < 0; } static bool eval(unsigned long int l, mpq_srcptr q) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) > 0; } static bool eval(mpq_srcptr q, signed long int l) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) < 0; } static bool eval(signed long int l, mpq_srcptr q) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) > 0; } static bool eval(mpq_srcptr q, double d) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(q, temp) < 0); __gmpq_clear(temp); return b; } static bool eval(double d, mpq_srcptr q) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(temp, q) < 0); __gmpq_clear(temp); return b; } static bool eval(mpf_srcptr f, mpf_srcptr g) { return __gmpf_cmp(f, g) < 0; } static bool eval(mpf_srcptr f, unsigned long int l) { return __gmpf_cmp_ui(f, l) < 0; } static bool eval(unsigned long int l, mpf_srcptr f) { return __gmpf_cmp_ui(f, l) > 0; } static bool eval(mpf_srcptr f, signed long int l) { return __gmpf_cmp_si(f, l) < 0; } static bool eval(signed long int l, mpf_srcptr f) { return __gmpf_cmp_si(f, l) > 0; } static bool eval(mpf_srcptr f, double d) { return __gmpf_cmp_d(f, d) < 0; } static bool eval(double d, mpf_srcptr f) { return __gmpf_cmp_d(f, d) > 0; } }; struct __gmp_binary_less_equal { static bool eval(mpz_srcptr z, mpz_srcptr w) { return __gmpz_cmp(z, w) <= 0; } static bool eval(mpz_srcptr z, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) <= 0; } static bool eval(unsigned long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) >= 0; } static bool eval(mpz_srcptr z, signed long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) <= 0; } static bool eval(signed long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) >= 0; } static bool eval(mpz_srcptr z, double d) { return __gmpz_cmp_d(z, d) <= 0; } static bool eval(double d, mpz_srcptr z) { return __gmpz_cmp_d(z, d) >= 0; } static bool eval(mpq_srcptr q, mpq_srcptr r) { return __gmpq_cmp(q, r) <= 0; } static bool eval(mpq_srcptr q, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) <= 0; } static bool eval(unsigned long int l, mpq_srcptr q) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) >= 0; } static bool eval(mpq_srcptr q, signed long int l) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) <= 0; } static bool eval(signed long int l, mpq_srcptr q) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) >= 0; } static bool eval(mpq_srcptr q, double d) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(q, temp) <= 0); __gmpq_clear(temp); return b; } static bool eval(double d, mpq_srcptr q) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(temp, q) <= 0); __gmpq_clear(temp); return b; } static bool eval(mpf_srcptr f, mpf_srcptr g) { return __gmpf_cmp(f, g) <= 0; } static bool eval(mpf_srcptr f, unsigned long int l) { return __gmpf_cmp_ui(f, l) <= 0; } static bool eval(unsigned long int l, mpf_srcptr f) { return __gmpf_cmp_ui(f, l) >= 0; } static bool eval(mpf_srcptr f, signed long int l) { return __gmpf_cmp_si(f, l) <= 0; } static bool eval(signed long int l, mpf_srcptr f) { return __gmpf_cmp_si(f, l) >= 0; } static bool eval(mpf_srcptr f, double d) { return __gmpf_cmp_d(f, d) <= 0; } static bool eval(double d, mpf_srcptr f) { return __gmpf_cmp_d(f, d) >= 0; } }; struct __gmp_binary_greater { static bool eval(mpz_srcptr z, mpz_srcptr w) { return __gmpz_cmp(z, w) > 0; } static bool eval(mpz_srcptr z, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) > 0; } static bool eval(unsigned long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) < 0; } static bool eval(mpz_srcptr z, signed long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) > 0; } static bool eval(signed long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) < 0; } static bool eval(mpz_srcptr z, double d) { return __gmpz_cmp_d(z, d) > 0; } static bool eval(double d, mpz_srcptr z) { return __gmpz_cmp_d(z, d) < 0; } static bool eval(mpq_srcptr q, mpq_srcptr r) { return __gmpq_cmp(q, r) > 0; } static bool eval(mpq_srcptr q, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) > 0; } static bool eval(unsigned long int l, mpq_srcptr q) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) < 0; } static bool eval(mpq_srcptr q, signed long int l) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) > 0; } static bool eval(signed long int l, mpq_srcptr q) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) < 0; } static bool eval(mpq_srcptr q, double d) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(q, temp) > 0); __gmpq_clear(temp); return b; } static bool eval(double d, mpq_srcptr q) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(temp, q) > 0); __gmpq_clear(temp); return b; } static bool eval(mpf_srcptr f, mpf_srcptr g) { return __gmpf_cmp(f, g) > 0; } static bool eval(mpf_srcptr f, unsigned long int l) { return __gmpf_cmp_ui(f, l) > 0; } static bool eval(unsigned long int l, mpf_srcptr f) { return __gmpf_cmp_ui(f, l) < 0; } static bool eval(mpf_srcptr f, signed long int l) { return __gmpf_cmp_si(f, l) > 0; } static bool eval(signed long int l, mpf_srcptr f) { return __gmpf_cmp_si(f, l) < 0; } static bool eval(mpf_srcptr f, double d) { return __gmpf_cmp_d(f, d) > 0; } static bool eval(double d, mpf_srcptr f) { return __gmpf_cmp_d(f, d) < 0; } }; struct __gmp_binary_greater_equal { static bool eval(mpz_srcptr z, mpz_srcptr w) { return __gmpz_cmp(z, w) >= 0; } static bool eval(mpz_srcptr z, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) >= 0; } static bool eval(unsigned long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)) <= 0; } static bool eval(mpz_srcptr z, signed long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) >= 0; } static bool eval(signed long int l, mpz_srcptr z) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)) <= 0; } static bool eval(mpz_srcptr z, double d) { return __gmpz_cmp_d(z, d) >= 0; } static bool eval(double d, mpz_srcptr z) { return __gmpz_cmp_d(z, d) <= 0; } static bool eval(mpq_srcptr q, mpq_srcptr r) { return __gmpq_cmp(q, r) >= 0; } static bool eval(mpq_srcptr q, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) >= 0; } static bool eval(unsigned long int l, mpq_srcptr q) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)) <= 0; } static bool eval(mpq_srcptr q, signed long int l) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) >= 0; } static bool eval(signed long int l, mpq_srcptr q) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)) <= 0; } static bool eval(mpq_srcptr q, double d) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(q, temp) >= 0); __gmpq_clear(temp); return b; } static bool eval(double d, mpq_srcptr q) { bool b; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); b = (__gmpq_cmp(temp, q) >= 0); __gmpq_clear(temp); return b; } static bool eval(mpf_srcptr f, mpf_srcptr g) { return __gmpf_cmp(f, g) >= 0; } static bool eval(mpf_srcptr f, unsigned long int l) { return __gmpf_cmp_ui(f, l) >= 0; } static bool eval(unsigned long int l, mpf_srcptr f) { return __gmpf_cmp_ui(f, l) <= 0; } static bool eval(mpf_srcptr f, signed long int l) { return __gmpf_cmp_si(f, l) >= 0; } static bool eval(signed long int l, mpf_srcptr f) { return __gmpf_cmp_si(f, l) <= 0; } static bool eval(mpf_srcptr f, double d) { return __gmpf_cmp_d(f, d) >= 0; } static bool eval(double d, mpf_srcptr f) { return __gmpf_cmp_d(f, d) <= 0; } }; struct __gmp_unary_increment { static void eval(mpz_ptr z) { __gmpz_add_ui(z, z, 1); } static void eval(mpq_ptr q) { __gmpz_add((&((q)->_mp_num)), (&((q)->_mp_num)), (&((q)->_mp_den))); } static void eval(mpf_ptr f) { __gmpf_add_ui(f, f, 1); } }; struct __gmp_unary_decrement { static void eval(mpz_ptr z) { __gmpz_sub_ui(z, z, 1); } static void eval(mpq_ptr q) { __gmpz_sub((&((q)->_mp_num)), (&((q)->_mp_num)), (&((q)->_mp_den))); } static void eval(mpf_ptr f) { __gmpf_sub_ui(f, f, 1); } }; struct __gmp_abs_function { static void eval(mpz_ptr z, mpz_srcptr w) { __gmpz_abs(z, w); } static void eval(mpq_ptr q, mpq_srcptr r) { __gmpq_abs(q, r); } static void eval(mpf_ptr f, mpf_srcptr g) { __gmpf_abs(f, g); } }; struct __gmp_trunc_function { static void eval(mpf_ptr f, mpf_srcptr g) { __gmpf_trunc(f, g); } }; struct __gmp_floor_function { static void eval(mpf_ptr f, mpf_srcptr g) { __gmpf_floor(f, g); } }; struct __gmp_ceil_function { static void eval(mpf_ptr f, mpf_srcptr g) { __gmpf_ceil(f, g); } }; struct __gmp_sqrt_function { static void eval(mpz_ptr z, mpz_srcptr w) { __gmpz_sqrt(z, w); } static void eval(mpf_ptr f, mpf_srcptr g) { __gmpf_sqrt(f, g); } }; struct __gmp_hypot_function { static void eval(mpf_ptr f, mpf_srcptr g, mpf_srcptr h) { mpf_t temp; __gmpf_init2(temp, __gmpf_get_prec(f)); __gmpf_mul(temp, g, g); __gmpf_mul(f, h, h); __gmpf_add(f, f, temp); __gmpf_sqrt(f, f); __gmpf_clear(temp); } static void eval(mpf_ptr f, mpf_srcptr g, unsigned long int l) { mpf_t temp; __gmpf_init2(temp, __gmpf_get_prec(f)); __gmpf_mul(temp, g, g); __gmpf_set_ui(f, l); __gmpf_mul(f, f, f); __gmpf_add(f, f, temp); __gmpf_sqrt(f, f); __gmpf_clear(temp); } static void eval(mpf_ptr f, unsigned long int l, mpf_srcptr g) { mpf_t temp; __gmpf_init2(temp, __gmpf_get_prec(f)); __gmpf_mul(temp, g, g); __gmpf_set_ui(f, l); __gmpf_mul(f, f, f); __gmpf_add(f, f, temp); __gmpf_sqrt(f, f); __gmpf_clear(temp); } static void eval(mpf_ptr f, mpf_srcptr g, signed long int l) { mpf_t temp; __gmpf_init2(temp, __gmpf_get_prec(f)); __gmpf_mul(temp, g, g); __gmpf_set_si(f, l); __gmpf_mul(f, f, f); __gmpf_add(f, f, temp); __gmpf_sqrt(f, f); __gmpf_clear(temp); } static void eval(mpf_ptr f, signed long int l, mpf_srcptr g) { mpf_t temp; __gmpf_init2(temp, __gmpf_get_prec(f)); __gmpf_mul(temp, g, g); __gmpf_set_si(f, l); __gmpf_mul(f, f, f); __gmpf_add(f, f, temp); __gmpf_sqrt(f, f); __gmpf_clear(temp); } static void eval(mpf_ptr f, mpf_srcptr g, double d) { mpf_t temp; __gmpf_init2(temp, __gmpf_get_prec(f)); __gmpf_mul(temp, g, g); __gmpf_set_d(f, d); __gmpf_mul(f, f, f); __gmpf_add(f, f, temp); __gmpf_sqrt(f, f); __gmpf_clear(temp); } static void eval(mpf_ptr f, double d, mpf_srcptr g) { mpf_t temp; __gmpf_init2(temp, __gmpf_get_prec(f)); __gmpf_mul(temp, g, g); __gmpf_set_d(f, d); __gmpf_mul(f, f, f); __gmpf_add(f, f, temp); __gmpf_sqrt(f, f); __gmpf_clear(temp); } }; struct __gmp_sgn_function { static int eval(mpz_srcptr z) { return ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0); } static int eval(mpq_srcptr q) { return ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0); } static int eval(mpf_srcptr f) { return ((f)->_mp_size < 0 ? -1 : (f)->_mp_size > 0); } }; struct __gmp_cmp_function { static int eval(mpz_srcptr z, mpz_srcptr w) { return __gmpz_cmp(z, w); } static int eval(mpz_srcptr z, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)); } static int eval(unsigned long int l, mpz_srcptr z) { return -(__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __gmpz_cmp_ui (z,l)); } static int eval(mpz_srcptr z, signed long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)); } static int eval(signed long int l, mpz_srcptr z) { return -(__builtin_constant_p (l) && (l) == 0 ? ((z)->_mp_size < 0 ? -1 : (z)->_mp_size > 0) : __builtin_constant_p (l) && (l) > 0 ? __gmpz_cmp_ui (z, (static_cast (l))) : __gmpz_cmp_si (z,l)); } static int eval(mpz_srcptr z, double d) { return __gmpz_cmp_d(z, d); } static int eval(double d, mpz_srcptr z) { return -__gmpz_cmp_d(z, d); } static int eval(mpq_srcptr q, mpq_srcptr r) { return __gmpq_cmp(q, r); } static int eval(mpq_srcptr q, unsigned long int l) { return (__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)); } static int eval(unsigned long int l, mpq_srcptr q) { return -(__builtin_constant_p (l) && (l) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,l,1)); } static int eval(mpq_srcptr q, signed long int l) { return (__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)); } static int eval(signed long int l, mpq_srcptr q) { return -(__builtin_constant_p ((l) >= 0) && (l) >= 0 ? (__builtin_constant_p ((static_cast (l))) && ((static_cast (l))) == 0 ? ((q)->_mp_num._mp_size < 0 ? -1 : (q)->_mp_num._mp_size > 0) : __gmpq_cmp_ui (q,(static_cast (l)),1)) : __gmpq_cmp_si (q, l, 1)); } static int eval(mpq_srcptr q, double d) { int i; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); i = __gmpq_cmp(q, temp); __gmpq_clear(temp); return i; } static int eval(double d, mpq_srcptr q) { int i; mpq_t temp; __gmpq_init(temp); __gmpq_set_d(temp, d); i = __gmpq_cmp(temp, q); __gmpq_clear(temp); return i; } static int eval(mpf_srcptr f, mpf_srcptr g) { return __gmpf_cmp(f, g); } static int eval(mpf_srcptr f, unsigned long int l) { return __gmpf_cmp_ui(f, l); } static int eval(unsigned long int l, mpf_srcptr f) { return -__gmpf_cmp_ui(f, l); } static int eval(mpf_srcptr f, signed long int l) { return __gmpf_cmp_si(f, l); } static int eval(signed long int l, mpf_srcptr f) { return -__gmpf_cmp_si(f, l); } static int eval(mpf_srcptr f, double d) { return __gmpf_cmp_d(f, d); } static int eval(double d, mpf_srcptr f) { return -__gmpf_cmp_d(f, d); } }; struct __gmp_rand_function { static void eval(mpz_ptr z, gmp_randstate_t s, unsigned long int l) { __gmpz_urandomb(z, s, l); } static void eval(mpz_ptr z, gmp_randstate_t s, mpz_srcptr w) { __gmpz_urandomm(z, s, w); } static void eval(mpf_ptr f, gmp_randstate_t s, mp_bitcnt_t prec) { __gmpf_urandomb(f, s, prec); } }; # 1356 "/usr/include/gmpxx.h" 3 4 extern "C" { typedef void (*__gmp_freefunc_t) (void *, size_t); } struct __gmp_alloc_cstring { char *str; __gmp_alloc_cstring(char *s) { str = s; } ~__gmp_alloc_cstring() { __gmp_freefunc_t freefunc; __gmp_get_memory_functions (__null, __null, &freefunc); (*freefunc) (str, std::strlen(str)+1); } }; template class __gmp_expr; template struct __gmp_resolve_ref { typedef T ref_type; }; template struct __gmp_resolve_ref<__gmp_expr > { typedef const __gmp_expr & ref_type; }; template struct __gmp_resolve_expr; template <> struct __gmp_resolve_expr { typedef mpz_t value_type; typedef mpz_ptr ptr_type; }; template <> struct __gmp_resolve_expr { typedef mpq_t value_type; typedef mpq_ptr ptr_type; }; template <> struct __gmp_resolve_expr { typedef mpf_t value_type; typedef mpf_ptr ptr_type; }; template <> struct __gmp_resolve_expr { typedef mpq_t value_type; }; template <> struct __gmp_resolve_expr { typedef mpq_t value_type; }; template <> struct __gmp_resolve_expr { typedef mpf_t value_type; }; template <> struct __gmp_resolve_expr { typedef mpf_t value_type; }; template <> struct __gmp_resolve_expr { typedef mpf_t value_type; }; template <> struct __gmp_resolve_expr { typedef mpf_t value_type; }; template struct __gmp_resolve_temp { typedef __gmp_expr temp_type; }; template struct __gmp_resolve_temp { typedef const __gmp_expr & temp_type; }; template struct __gmp_unary_expr { const T &val; __gmp_unary_expr(const T &v) : val(v) { } private: __gmp_unary_expr(); }; template struct __gmp_binary_expr { typename __gmp_resolve_ref::ref_type val1; typename __gmp_resolve_ref::ref_type val2; __gmp_binary_expr(const T &v1, const U &v2) : val1(v1), val2(v2) { } private: __gmp_binary_expr(); }; template void __gmp_set_expr(mpz_ptr, const __gmp_expr &); template void __gmp_set_expr(mpq_ptr, const __gmp_expr &); template void __gmp_set_expr(mpf_ptr, const __gmp_expr &); # 1533 "/usr/include/gmpxx.h" 3 4 template <> class __gmp_expr { private: typedef mpz_t value_type; value_type mp; public: mp_bitcnt_t get_prec() const { return __gmpf_get_default_prec(); } __gmp_expr() { __gmpz_init(mp); } __gmp_expr(const __gmp_expr &z) { __gmpz_init_set(mp, z.mp); } template __gmp_expr(const __gmp_expr &expr) { __gmpz_init(mp); __gmp_set_expr(mp, expr); } __gmp_expr(signed char c) { __gmpz_init_set_si(mp, c); } __gmp_expr(unsigned char c) { __gmpz_init_set_ui(mp, c); } __gmp_expr(signed int i) { __gmpz_init_set_si(mp, i); } __gmp_expr(unsigned int i) { __gmpz_init_set_ui(mp, i); } __gmp_expr(signed short int s) { __gmpz_init_set_si(mp, s); } __gmp_expr(unsigned short int s) { __gmpz_init_set_ui(mp, s); } __gmp_expr(signed long int l) { __gmpz_init_set_si(mp, l); } __gmp_expr(unsigned long int l) { __gmpz_init_set_ui(mp, l); } __gmp_expr(float f) { __gmpz_init_set_d(mp, f); } __gmp_expr(double d) { __gmpz_init_set_d(mp, d); } explicit __gmp_expr(const char *s) { if (__gmpz_init_set_str (mp, s, 0) != 0) { __gmpz_clear (mp); throw std::invalid_argument ("mpz_set_str"); } } __gmp_expr(const char *s, int base) { if (__gmpz_init_set_str (mp, s, base) != 0) { __gmpz_clear (mp); throw std::invalid_argument ("mpz_set_str"); } } explicit __gmp_expr(const std::string &s) { if (__gmpz_init_set_str (mp, s.c_str(), 0) != 0) { __gmpz_clear (mp); throw std::invalid_argument ("mpz_set_str"); } } __gmp_expr(const std::string &s, int base) { if (__gmpz_init_set_str(mp, s.c_str(), base) != 0) { __gmpz_clear (mp); throw std::invalid_argument ("mpz_set_str"); } } explicit __gmp_expr(mpz_srcptr z) { __gmpz_init_set(mp, z); } ~__gmp_expr() { __gmpz_clear(mp); } __gmp_expr & operator=(const __gmp_expr &z) { __gmpz_set(mp, z.mp); return *this; } template __gmp_expr & operator=(const __gmp_expr &expr) { __gmp_set_expr(mp, expr); return *this; } __gmp_expr & operator=(signed char c) { __gmpz_set_si(mp, c); return *this; } __gmp_expr & operator=(unsigned char c) { __gmpz_set_ui(mp, c); return *this; } __gmp_expr & operator=(signed int i) { __gmpz_set_si(mp, i); return *this; } __gmp_expr & operator=(unsigned int i) { __gmpz_set_ui(mp, i); return *this; } __gmp_expr & operator=(signed short int s) { __gmpz_set_si(mp, s); return *this; } __gmp_expr & operator=(unsigned short int s) { __gmpz_set_ui(mp, s); return *this; } __gmp_expr & operator=(signed long int l) { __gmpz_set_si(mp, l); return *this; } __gmp_expr & operator=(unsigned long int l) { __gmpz_set_ui(mp, l); return *this; } __gmp_expr & operator=(float f) { __gmpz_set_d(mp, f); return *this; } __gmp_expr & operator=(double d) { __gmpz_set_d(mp, d); return *this; } __gmp_expr & operator=(const char *s) { if (__gmpz_set_str (mp, s, 0) != 0) throw std::invalid_argument ("mpz_set_str"); return *this; } __gmp_expr & operator=(const std::string &s) { if (__gmpz_set_str(mp, s.c_str(), 0) != 0) throw std::invalid_argument ("mpz_set_str"); return *this; } int set_str(const char *s, int base) { return __gmpz_set_str(mp, s, base); } int set_str(const std::string &s, int base) { return __gmpz_set_str(mp, s.c_str(), base); } std::string get_str(int base = 10) const { __gmp_alloc_cstring temp(__gmpz_get_str(0, base, mp)); return std::string(temp.str); } mpz_srcptr __get_mp() const { return mp; } mpz_ptr __get_mp() { return mp; } mpz_srcptr get_mpz_t() const { return mp; } mpz_ptr get_mpz_t() { return mp; } signed long int get_si() const { return __gmpz_get_si(mp); } unsigned long int get_ui() const { return __gmpz_get_ui(mp); } double get_d() const { return __gmpz_get_d(mp); } bool fits_sint_p() const { return __gmpz_fits_sint_p(mp); } bool fits_uint_p() const { return __gmpz_fits_uint_p(mp); } bool fits_sshort_p() const { return __gmpz_fits_sshort_p(mp); } bool fits_ushort_p() const { return __gmpz_fits_ushort_p(mp); } bool fits_slong_p() const { return __gmpz_fits_slong_p(mp); } bool fits_ulong_p() const { return __gmpz_fits_ulong_p(mp); } template __gmp_expr & operator+=(const __gmp_expr &); __gmp_expr & operator+=(signed char); __gmp_expr & operator+=(unsigned char); __gmp_expr & operator+=(signed int); __gmp_expr & operator+=(unsigned int); __gmp_expr & operator+=(signed short int); __gmp_expr & operator+=(unsigned short int); __gmp_expr & operator+=(signed long int); __gmp_expr & operator+=(unsigned long int); __gmp_expr & operator+=(float); __gmp_expr & operator+=(double); __gmp_expr & operator+=(long double); template __gmp_expr & operator-=(const __gmp_expr &); __gmp_expr & operator-=(signed char); __gmp_expr & operator-=(unsigned char); __gmp_expr & operator-=(signed int); __gmp_expr & operator-=(unsigned int); __gmp_expr & operator-=(signed short int); __gmp_expr & operator-=(unsigned short int); __gmp_expr & operator-=(signed long int); __gmp_expr & operator-=(unsigned long int); __gmp_expr & operator-=(float); __gmp_expr & operator-=(double); __gmp_expr & operator-=(long double); template __gmp_expr & operator*=(const __gmp_expr &); __gmp_expr & operator*=(signed char); __gmp_expr & operator*=(unsigned char); __gmp_expr & operator*=(signed int); __gmp_expr & operator*=(unsigned int); __gmp_expr & operator*=(signed short int); __gmp_expr & operator*=(unsigned short int); __gmp_expr & operator*=(signed long int); __gmp_expr & operator*=(unsigned long int); __gmp_expr & operator*=(float); __gmp_expr & operator*=(double); __gmp_expr & operator*=(long double); template __gmp_expr & operator/=(const __gmp_expr &); __gmp_expr & operator/=(signed char); __gmp_expr & operator/=(unsigned char); __gmp_expr & operator/=(signed int); __gmp_expr & operator/=(unsigned int); __gmp_expr & operator/=(signed short int); __gmp_expr & operator/=(unsigned short int); __gmp_expr & operator/=(signed long int); __gmp_expr & operator/=(unsigned long int); __gmp_expr & operator/=(float); __gmp_expr & operator/=(double); __gmp_expr & operator/=(long double); template __gmp_expr & operator%=(const __gmp_expr &); __gmp_expr & operator%=(signed char); __gmp_expr & operator%=(unsigned char); __gmp_expr & operator%=(signed int); __gmp_expr & operator%=(unsigned int); __gmp_expr & operator%=(signed short int); __gmp_expr & operator%=(unsigned short int); __gmp_expr & operator%=(signed long int); __gmp_expr & operator%=(unsigned long int); __gmp_expr & operator%=(float); __gmp_expr & operator%=(double); __gmp_expr & operator%=(long double); template __gmp_expr & operator&=(const __gmp_expr &); __gmp_expr & operator&=(signed char); __gmp_expr & operator&=(unsigned char); __gmp_expr & operator&=(signed int); __gmp_expr & operator&=(unsigned int); __gmp_expr & operator&=(signed short int); __gmp_expr & operator&=(unsigned short int); __gmp_expr & operator&=(signed long int); __gmp_expr & operator&=(unsigned long int); __gmp_expr & operator&=(float); __gmp_expr & operator&=(double); __gmp_expr & operator&=(long double); template __gmp_expr & operator|=(const __gmp_expr &); __gmp_expr & operator|=(signed char); __gmp_expr & operator|=(unsigned char); __gmp_expr & operator|=(signed int); __gmp_expr & operator|=(unsigned int); __gmp_expr & operator|=(signed short int); __gmp_expr & operator|=(unsigned short int); __gmp_expr & operator|=(signed long int); __gmp_expr & operator|=(unsigned long int); __gmp_expr & operator|=(float); __gmp_expr & operator|=(double); __gmp_expr & operator|=(long double); template __gmp_expr & operator^=(const __gmp_expr &); __gmp_expr & operator^=(signed char); __gmp_expr & operator^=(unsigned char); __gmp_expr & operator^=(signed int); __gmp_expr & operator^=(unsigned int); __gmp_expr & operator^=(signed short int); __gmp_expr & operator^=(unsigned short int); __gmp_expr & operator^=(signed long int); __gmp_expr & operator^=(unsigned long int); __gmp_expr & operator^=(float); __gmp_expr & operator^=(double); __gmp_expr & operator^=(long double); __gmp_expr & operator<<=(unsigned long int); __gmp_expr & operator>>=(unsigned long int); inline __gmp_expr & operator++(); inline __gmp_expr operator++(int); inline __gmp_expr & operator--(); inline __gmp_expr operator--(int); }; typedef __gmp_expr mpz_class; template <> class __gmp_expr { private: typedef mpq_t value_type; value_type mp; public: mp_bitcnt_t get_prec() const { return __gmpf_get_default_prec(); } void canonicalize() { __gmpq_canonicalize(mp); } __gmp_expr() { __gmpq_init(mp); } __gmp_expr(const __gmp_expr &q) { __gmpq_init(mp); __gmpq_set(mp, q.mp); } template __gmp_expr(const __gmp_expr &expr) { __gmpq_init(mp); __gmp_set_expr(mp, expr); } __gmp_expr(signed char c) { __gmpq_init(mp); __gmpq_set_si(mp, c, 1); } __gmp_expr(unsigned char c) { __gmpq_init(mp); __gmpq_set_ui(mp, c, 1); } __gmp_expr(signed int i) { __gmpq_init(mp); __gmpq_set_si(mp, i, 1); } __gmp_expr(unsigned int i) { __gmpq_init(mp); __gmpq_set_ui(mp, i, 1); } __gmp_expr(signed short int s) { __gmpq_init(mp); __gmpq_set_si(mp, s, 1); } __gmp_expr(unsigned short int s) { __gmpq_init(mp); __gmpq_set_ui(mp, s, 1); } __gmp_expr(signed long int l) { __gmpq_init(mp); __gmpq_set_si(mp, l, 1); } __gmp_expr(unsigned long int l) { __gmpq_init(mp); __gmpq_set_ui(mp, l, 1); } __gmp_expr(float f) { __gmpq_init(mp); __gmpq_set_d(mp, f); } __gmp_expr(double d) { __gmpq_init(mp); __gmpq_set_d(mp, d); } explicit __gmp_expr(const char *s) { __gmpq_init (mp); if (__gmpq_set_str (mp, s, 0) != 0) { __gmpq_clear (mp); throw std::invalid_argument ("mpq_set_str"); } } __gmp_expr(const char *s, int base) { __gmpq_init (mp); if (__gmpq_set_str(mp, s, base) != 0) { __gmpq_clear (mp); throw std::invalid_argument ("mpq_set_str"); } } explicit __gmp_expr(const std::string &s) { __gmpq_init (mp); if (__gmpq_set_str (mp, s.c_str(), 0) != 0) { __gmpq_clear (mp); throw std::invalid_argument ("mpq_set_str"); } } __gmp_expr(const std::string &s, int base) { __gmpq_init(mp); if (__gmpq_set_str (mp, s.c_str(), base) != 0) { __gmpq_clear (mp); throw std::invalid_argument ("mpq_set_str"); } } explicit __gmp_expr(mpq_srcptr q) { __gmpq_init(mp); __gmpq_set(mp, q); } __gmp_expr(const mpz_class &num, const mpz_class &den) { __gmpq_init(mp); __gmpz_set((&((mp)->_mp_num)), num.get_mpz_t()); __gmpz_set((&((mp)->_mp_den)), den.get_mpz_t()); } ~__gmp_expr() { __gmpq_clear(mp); } __gmp_expr & operator=(const __gmp_expr &q) { __gmpq_set(mp, q.mp); return *this; } template __gmp_expr & operator=(const __gmp_expr &expr) { __gmp_set_expr(mp, expr); return *this; } __gmp_expr & operator=(signed char c) { __gmpq_set_si(mp, c, 1); return *this; } __gmp_expr & operator=(unsigned char c) { __gmpq_set_ui(mp, c, 1); return *this; } __gmp_expr & operator=(signed int i) { __gmpq_set_si(mp, i, 1); return *this; } __gmp_expr & operator=(unsigned int i) { __gmpq_set_ui(mp, i, 1); return *this; } __gmp_expr & operator=(signed short int s) { __gmpq_set_si(mp, s, 1); return *this; } __gmp_expr & operator=(unsigned short int s) { __gmpq_set_ui(mp, s, 1); return *this; } __gmp_expr & operator=(signed long int l) { __gmpq_set_si(mp, l, 1); return *this; } __gmp_expr & operator=(unsigned long int l) { __gmpq_set_ui(mp, l, 1); return *this; } __gmp_expr & operator=(float f) { __gmpq_set_d(mp, f); return *this; } __gmp_expr & operator=(double d) { __gmpq_set_d(mp, d); return *this; } __gmp_expr & operator=(const char *s) { if (__gmpq_set_str (mp, s, 0) != 0) throw std::invalid_argument ("mpq_set_str"); return *this; } __gmp_expr & operator=(const std::string &s) { if (__gmpq_set_str(mp, s.c_str(), 0) != 0) throw std::invalid_argument ("mpq_set_str"); return *this; } int set_str(const char *s, int base) { return __gmpq_set_str(mp, s, base); } int set_str(const std::string &s, int base) { return __gmpq_set_str(mp, s.c_str(), base); } std::string get_str(int base = 10) const { __gmp_alloc_cstring temp(__gmpq_get_str(0, base, mp)); return std::string(temp.str); } const mpz_class & get_num() const { return reinterpret_cast(*(&((mp)->_mp_num))); } mpz_class & get_num() { return reinterpret_cast(*(&((mp)->_mp_num))); } const mpz_class & get_den() const { return reinterpret_cast(*(&((mp)->_mp_den))); } mpz_class & get_den() { return reinterpret_cast(*(&((mp)->_mp_den))); } mpq_srcptr __get_mp() const { return mp; } mpq_ptr __get_mp() { return mp; } mpq_srcptr get_mpq_t() const { return mp; } mpq_ptr get_mpq_t() { return mp; } mpz_srcptr get_num_mpz_t() const { return (&((mp)->_mp_num)); } mpz_ptr get_num_mpz_t() { return (&((mp)->_mp_num)); } mpz_srcptr get_den_mpz_t() const { return (&((mp)->_mp_den)); } mpz_ptr get_den_mpz_t() { return (&((mp)->_mp_den)); } double get_d() const { return __gmpq_get_d(mp); } template __gmp_expr & operator+=(const __gmp_expr &); __gmp_expr & operator+=(signed char); __gmp_expr & operator+=(unsigned char); __gmp_expr & operator+=(signed int); __gmp_expr & operator+=(unsigned int); __gmp_expr & operator+=(signed short int); __gmp_expr & operator+=(unsigned short int); __gmp_expr & operator+=(signed long int); __gmp_expr & operator+=(unsigned long int); __gmp_expr & operator+=(float); __gmp_expr & operator+=(double); __gmp_expr & operator+=(long double); template __gmp_expr & operator-=(const __gmp_expr &); __gmp_expr & operator-=(signed char); __gmp_expr & operator-=(unsigned char); __gmp_expr & operator-=(signed int); __gmp_expr & operator-=(unsigned int); __gmp_expr & operator-=(signed short int); __gmp_expr & operator-=(unsigned short int); __gmp_expr & operator-=(signed long int); __gmp_expr & operator-=(unsigned long int); __gmp_expr & operator-=(float); __gmp_expr & operator-=(double); __gmp_expr & operator-=(long double); template __gmp_expr & operator*=(const __gmp_expr &); __gmp_expr & operator*=(signed char); __gmp_expr & operator*=(unsigned char); __gmp_expr & operator*=(signed int); __gmp_expr & operator*=(unsigned int); __gmp_expr & operator*=(signed short int); __gmp_expr & operator*=(unsigned short int); __gmp_expr & operator*=(signed long int); __gmp_expr & operator*=(unsigned long int); __gmp_expr & operator*=(float); __gmp_expr & operator*=(double); __gmp_expr & operator*=(long double); template __gmp_expr & operator/=(const __gmp_expr &); __gmp_expr & operator/=(signed char); __gmp_expr & operator/=(unsigned char); __gmp_expr & operator/=(signed int); __gmp_expr & operator/=(unsigned int); __gmp_expr & operator/=(signed short int); __gmp_expr & operator/=(unsigned short int); __gmp_expr & operator/=(signed long int); __gmp_expr & operator/=(unsigned long int); __gmp_expr & operator/=(float); __gmp_expr & operator/=(double); __gmp_expr & operator/=(long double); __gmp_expr & operator<<=(unsigned long int); __gmp_expr & operator>>=(unsigned long int); inline __gmp_expr & operator++(); inline __gmp_expr operator++(int); inline __gmp_expr & operator--(); inline __gmp_expr operator--(int); }; typedef __gmp_expr mpq_class; template <> class __gmp_expr { private: typedef mpf_t value_type; value_type mp; public: mp_bitcnt_t get_prec() const { return __gmpf_get_prec(mp); } void set_prec(mp_bitcnt_t prec) { __gmpf_set_prec(mp, prec); } void set_prec_raw(mp_bitcnt_t prec) { __gmpf_set_prec_raw(mp, prec); } __gmp_expr() { __gmpf_init(mp); } __gmp_expr(const __gmp_expr &f) { __gmpf_init2(mp, f.get_prec()); __gmpf_set(mp, f.mp); } __gmp_expr(const __gmp_expr &f, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set(mp, f.mp); } template __gmp_expr(const __gmp_expr &expr) { __gmpf_init2(mp, expr.get_prec()); __gmp_set_expr(mp, expr); } template __gmp_expr(const __gmp_expr &expr, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmp_set_expr(mp, expr); } __gmp_expr(signed char c) { __gmpf_init_set_si(mp, c); } __gmp_expr(signed char c, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_si(mp, c); } __gmp_expr(unsigned char c) { __gmpf_init_set_ui(mp, c); } __gmp_expr(unsigned char c, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_ui(mp, c); } __gmp_expr(signed int i) { __gmpf_init_set_si(mp, i); } __gmp_expr(signed int i, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_si(mp, i); } __gmp_expr(unsigned int i) { __gmpf_init_set_ui(mp, i); } __gmp_expr(unsigned int i, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_ui(mp, i); } __gmp_expr(signed short int s) { __gmpf_init_set_si(mp, s); } __gmp_expr(signed short int s, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_si(mp, s); } __gmp_expr(unsigned short int s) { __gmpf_init_set_ui(mp, s); } __gmp_expr(unsigned short int s, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_ui(mp, s); } __gmp_expr(signed long int l) { __gmpf_init_set_si(mp, l); } __gmp_expr(signed long int l, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_si(mp, l); } __gmp_expr(unsigned long int l) { __gmpf_init_set_ui(mp, l); } __gmp_expr(unsigned long int l, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_ui(mp, l); } __gmp_expr(float f) { __gmpf_init_set_d(mp, f); } __gmp_expr(float f, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_d(mp, f); } __gmp_expr(double d) { __gmpf_init_set_d(mp, d); } __gmp_expr(double d, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set_d(mp, d); } explicit __gmp_expr(const char *s) { if (__gmpf_init_set_str (mp, s, 0) != 0) { __gmpf_clear (mp); throw std::invalid_argument ("mpf_set_str"); } } __gmp_expr(const char *s, mp_bitcnt_t prec, int base = 0) { __gmpf_init2(mp, prec); if (__gmpf_set_str(mp, s, base) != 0) { __gmpf_clear (mp); throw std::invalid_argument ("mpf_set_str"); } } explicit __gmp_expr(const std::string &s) { if (__gmpf_init_set_str(mp, s.c_str(), 0) != 0) { __gmpf_clear (mp); throw std::invalid_argument ("mpf_set_str"); } } __gmp_expr(const std::string &s, mp_bitcnt_t prec, int base = 0) { __gmpf_init2(mp, prec); if (__gmpf_set_str(mp, s.c_str(), base) != 0) { __gmpf_clear (mp); throw std::invalid_argument ("mpf_set_str"); } } explicit __gmp_expr(mpf_srcptr f) { __gmpf_init2(mp, __gmpf_get_prec(f)); __gmpf_set(mp, f); } __gmp_expr(mpf_srcptr f, mp_bitcnt_t prec) { __gmpf_init2(mp, prec); __gmpf_set(mp, f); } ~__gmp_expr() { __gmpf_clear(mp); } __gmp_expr & operator=(const __gmp_expr &f) { __gmpf_set(mp, f.mp); return *this; } template __gmp_expr & operator=(const __gmp_expr &expr) { __gmp_set_expr(mp, expr); return *this; } __gmp_expr & operator=(signed char c) { __gmpf_set_si(mp, c); return *this; } __gmp_expr & operator=(unsigned char c) { __gmpf_set_ui(mp, c); return *this; } __gmp_expr & operator=(signed int i) { __gmpf_set_si(mp, i); return *this; } __gmp_expr & operator=(unsigned int i) { __gmpf_set_ui(mp, i); return *this; } __gmp_expr & operator=(signed short int s) { __gmpf_set_si(mp, s); return *this; } __gmp_expr & operator=(unsigned short int s) { __gmpf_set_ui(mp, s); return *this; } __gmp_expr & operator=(signed long int l) { __gmpf_set_si(mp, l); return *this; } __gmp_expr & operator=(unsigned long int l) { __gmpf_set_ui(mp, l); return *this; } __gmp_expr & operator=(float f) { __gmpf_set_d(mp, f); return *this; } __gmp_expr & operator=(double d) { __gmpf_set_d(mp, d); return *this; } __gmp_expr & operator=(const char *s) { if (__gmpf_set_str (mp, s, 0) != 0) throw std::invalid_argument ("mpf_set_str"); return *this; } __gmp_expr & operator=(const std::string &s) { if (__gmpf_set_str(mp, s.c_str(), 0) != 0) throw std::invalid_argument ("mpf_set_str"); return *this; } int set_str(const char *s, int base) { return __gmpf_set_str(mp, s, base); } int set_str(const std::string &s, int base) { return __gmpf_set_str(mp, s.c_str(), base); } std::string get_str(mp_exp_t &expo, int base = 10, size_t size = 0) const { __gmp_alloc_cstring temp(__gmpf_get_str(0, &expo, base, size, mp)); return std::string(temp.str); } mpf_srcptr __get_mp() const { return mp; } mpf_ptr __get_mp() { return mp; } mpf_srcptr get_mpf_t() const { return mp; } mpf_ptr get_mpf_t() { return mp; } signed long int get_si() const { return __gmpf_get_si(mp); } unsigned long int get_ui() const { return __gmpf_get_ui(mp); } double get_d() const { return __gmpf_get_d(mp); } bool fits_sint_p() const { return __gmpf_fits_sint_p(mp); } bool fits_uint_p() const { return __gmpf_fits_uint_p(mp); } bool fits_sshort_p() const { return __gmpf_fits_sshort_p(mp); } bool fits_ushort_p() const { return __gmpf_fits_ushort_p(mp); } bool fits_slong_p() const { return __gmpf_fits_slong_p(mp); } bool fits_ulong_p() const { return __gmpf_fits_ulong_p(mp); } template __gmp_expr & operator+=(const __gmp_expr &); __gmp_expr & operator+=(signed char); __gmp_expr & operator+=(unsigned char); __gmp_expr & operator+=(signed int); __gmp_expr & operator+=(unsigned int); __gmp_expr & operator+=(signed short int); __gmp_expr & operator+=(unsigned short int); __gmp_expr & operator+=(signed long int); __gmp_expr & operator+=(unsigned long int); __gmp_expr & operator+=(float); __gmp_expr & operator+=(double); __gmp_expr & operator+=(long double); template __gmp_expr & operator-=(const __gmp_expr &); __gmp_expr & operator-=(signed char); __gmp_expr & operator-=(unsigned char); __gmp_expr & operator-=(signed int); __gmp_expr & operator-=(unsigned int); __gmp_expr & operator-=(signed short int); __gmp_expr & operator-=(unsigned short int); __gmp_expr & operator-=(signed long int); __gmp_expr & operator-=(unsigned long int); __gmp_expr & operator-=(float); __gmp_expr & operator-=(double); __gmp_expr & operator-=(long double); template __gmp_expr & operator*=(const __gmp_expr &); __gmp_expr & operator*=(signed char); __gmp_expr & operator*=(unsigned char); __gmp_expr & operator*=(signed int); __gmp_expr & operator*=(unsigned int); __gmp_expr & operator*=(signed short int); __gmp_expr & operator*=(unsigned short int); __gmp_expr & operator*=(signed long int); __gmp_expr & operator*=(unsigned long int); __gmp_expr & operator*=(float); __gmp_expr & operator*=(double); __gmp_expr & operator*=(long double); template __gmp_expr & operator/=(const __gmp_expr &); __gmp_expr & operator/=(signed char); __gmp_expr & operator/=(unsigned char); __gmp_expr & operator/=(signed int); __gmp_expr & operator/=(unsigned int); __gmp_expr & operator/=(signed short int); __gmp_expr & operator/=(unsigned short int); __gmp_expr & operator/=(signed long int); __gmp_expr & operator/=(unsigned long int); __gmp_expr & operator/=(float); __gmp_expr & operator/=(double); __gmp_expr & operator/=(long double); __gmp_expr & operator<<=(unsigned long int); __gmp_expr & operator>>=(unsigned long int); inline __gmp_expr & operator++(); inline __gmp_expr operator++(int); inline __gmp_expr & operator--(); inline __gmp_expr operator--(int); }; typedef __gmp_expr mpf_class; template inline std::ostream & operator<< (std::ostream &o, const __gmp_expr &expr) { return o << expr.__get_mp(); } template inline std::ostream & operator<< (std::ostream &o, const __gmp_expr &expr) { __gmp_expr temp(expr); return o << temp.__get_mp(); } template inline std::istream & operator>>(std::istream &i, __gmp_expr &expr) { return i >> expr.__get_mp(); } inline std::istream & operator>>(std::istream &i, mpq_class &q) { i >> q.get_mpq_t(); return i; } template <> inline void __gmp_set_expr(mpz_ptr z, const mpz_class &w) { __gmpz_set(z, w.get_mpz_t()); } template inline void __gmp_set_expr(mpz_ptr z, const __gmp_expr &expr) { expr.eval(z); } template <> inline void __gmp_set_expr(mpz_ptr z, const mpq_class &q) { __gmpz_set_q(z, q.get_mpq_t()); } template inline void __gmp_set_expr(mpz_ptr z, const __gmp_expr &expr) { mpq_class temp(expr); __gmpz_set_q(z, temp.get_mpq_t()); } template inline void __gmp_set_expr(mpz_ptr z, const mpf_class &f) { __gmpz_set_f(z, f.get_mpf_t()); } template inline void __gmp_set_expr(mpz_ptr z, const __gmp_expr &expr) { mpf_class temp(expr); __gmpz_set_f(z, temp.get_mpf_t()); } template <> inline void __gmp_set_expr(mpq_ptr q, const mpz_class &z) { __gmpq_set_z(q, z.get_mpz_t()); } template inline void __gmp_set_expr(mpq_ptr q, const __gmp_expr &expr) { mpz_class temp(expr); __gmpq_set_z(q, temp.get_mpz_t()); } template <> inline void __gmp_set_expr(mpq_ptr q, const mpq_class &r) { __gmpq_set(q, r.get_mpq_t()); } template inline void __gmp_set_expr(mpq_ptr q, const __gmp_expr &expr) { expr.eval(q); } template inline void __gmp_set_expr(mpq_ptr q, const mpf_class &f) { __gmpq_set_f(q, f.get_mpf_t()); } template inline void __gmp_set_expr(mpq_ptr q, const __gmp_expr &expr) { mpf_class temp(expr); __gmpq_set_f(q, temp.get_mpf_t()); } template inline void __gmp_set_expr(mpf_ptr f, const mpz_class &z) { __gmpf_set_z(f, z.get_mpz_t()); } template inline void __gmp_set_expr(mpf_ptr f, const __gmp_expr &expr) { mpz_class temp(expr); __gmpf_set_z(f, temp.get_mpz_t()); } template inline void __gmp_set_expr(mpf_ptr f, const mpq_class &q) { __gmpf_set_q(f, q.get_mpq_t()); } template inline void __gmp_set_expr(mpf_ptr f, const __gmp_expr &expr) { mpq_class temp(expr); __gmpf_set_q(f, temp.get_mpq_t()); } template <> inline void __gmp_set_expr(mpf_ptr f, const mpf_class &g) { __gmpf_set(f, g.get_mpf_t()); } template inline void __gmp_set_expr(mpf_ptr f, const __gmp_expr &expr) { expr.eval(f, __gmpf_get_prec(f)); } # 2247 "/usr/include/gmpxx.h" 3 4 template class __gmp_expr, Op> > { private: typedef __gmp_expr val_type; __gmp_unary_expr expr; public: __gmp_expr(const val_type &val) : expr(val) { } void eval(typename __gmp_resolve_expr::ptr_type p, unsigned long int = 0) const { Op::eval(p, expr.val.__get_mp()); } const val_type & get_val() const { return expr.val; } unsigned long int get_prec() const { return expr.val.get_prec(); } }; template class __gmp_expr, Op> > { private: typedef __gmp_expr val_type; __gmp_unary_expr expr; public: __gmp_expr(const val_type &val) : expr(val) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val); Op::eval(p, temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp(expr.val, prec); Op::eval(p, temp.__get_mp()); } const val_type & get_val() const { return expr.val; } unsigned long int get_prec() const { return expr.val.get_prec(); } }; # 2297 "/usr/include/gmpxx.h" 3 4 template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p, unsigned long int = 0) const { Op::eval(p, expr.val1.__get_mp(), expr.val2.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; template class __gmp_expr, U, Op> > { private: typedef __gmp_expr val1_type; typedef U val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p, unsigned long int = 0) const { Op::eval(p, expr.val1.__get_mp(), expr.val2); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return expr.val1.get_prec(); } }; template class __gmp_expr, Op> > { private: typedef U val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p, unsigned long int = 0) const { Op::eval(p, expr.val1, expr.val2.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return expr.val2.get_prec(); } }; template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val2); Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp(expr.val2, prec); Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val1); Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp(expr.val1, prec); Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val2); Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp(expr.val2, prec); Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val1); Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp(expr.val1, prec); Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; template class __gmp_expr, V, Op> > { private: typedef __gmp_expr val1_type; typedef V val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val1); Op::eval(p, temp.__get_mp(), expr.val2); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp(expr.val1, prec); Op::eval(p, temp.__get_mp(), expr.val2); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return expr.val1.get_prec(); } }; template class __gmp_expr, Op> > { private: typedef U val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val2); Op::eval(p, expr.val1, temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp(expr.val2, prec); Op::eval(p, expr.val1, temp.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return expr.val2.get_prec(); } }; template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp1(expr.val1), temp2(expr.val2); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp1(expr.val1, prec), temp2(expr.val2, prec); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp1(expr.val1), temp2(expr.val2); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp1(expr.val1, prec), temp2(expr.val2, prec); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; template class __gmp_expr , __gmp_expr, Op> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp1(expr.val1), temp2(expr.val2); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, mp_bitcnt_t prec) const { __gmp_expr temp1(expr.val1, prec), temp2(expr.val2, prec); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } }; # 2838 "/usr/include/gmpxx.h" 3 4 template <> class __gmp_expr > { private: typedef mpz_class val1_type; typedef mpq_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { __gmp_binary_plus::eval(q, expr.val1.get_mpz_t(), expr.val2.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template <> class __gmp_expr > { private: typedef mpq_class val1_type; typedef mpz_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { __gmp_binary_plus::eval(q, expr.val1.get_mpq_t(), expr.val2.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , __gmp_binary_plus> > { private: typedef mpz_class val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpq_class temp(expr.val2); __gmp_binary_plus::eval(q, expr.val1.get_mpz_t(), temp.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , __gmp_binary_plus> > { private: typedef mpq_class val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpz_class temp(expr.val2); __gmp_binary_plus::eval(q, expr.val1.get_mpq_t(), temp.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , mpq_class, __gmp_binary_plus> > { private: typedef __gmp_expr val1_type; typedef mpq_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpz_class temp(expr.val1); __gmp_binary_plus::eval(q, temp.get_mpz_t(), expr.val2.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , mpz_class, __gmp_binary_plus> > { private: typedef __gmp_expr val1_type; typedef mpz_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpq_class temp(expr.val1); __gmp_binary_plus::eval(q, temp.get_mpq_t(), expr.val2.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr, __gmp_expr, __gmp_binary_plus> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpz_class temp1(expr.val1); mpq_class temp2(expr.val2); __gmp_binary_plus::eval(q, temp1.get_mpz_t(), temp2.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr, __gmp_expr, __gmp_binary_plus> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpq_class temp1(expr.val1); mpz_class temp2(expr.val2); __gmp_binary_plus::eval(q, temp1.get_mpq_t(), temp2.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template <> class __gmp_expr > { private: typedef mpz_class val1_type; typedef mpq_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { __gmp_binary_minus::eval(q, expr.val1.get_mpz_t(), expr.val2.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template <> class __gmp_expr > { private: typedef mpq_class val1_type; typedef mpz_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { __gmp_binary_minus::eval(q, expr.val1.get_mpq_t(), expr.val2.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , __gmp_binary_minus> > { private: typedef mpz_class val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpq_class temp(expr.val2); __gmp_binary_minus::eval(q, expr.val1.get_mpz_t(), temp.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , __gmp_binary_minus> > { private: typedef mpq_class val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpz_class temp(expr.val2); __gmp_binary_minus::eval(q, expr.val1.get_mpq_t(), temp.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , mpq_class, __gmp_binary_minus> > { private: typedef __gmp_expr val1_type; typedef mpq_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpz_class temp(expr.val1); __gmp_binary_minus::eval(q, temp.get_mpz_t(), expr.val2.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr , mpz_class, __gmp_binary_minus> > { private: typedef __gmp_expr val1_type; typedef mpz_class val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpq_class temp(expr.val1); __gmp_binary_minus::eval(q, temp.get_mpq_t(), expr.val2.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr, __gmp_expr, __gmp_binary_minus> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpz_class temp1(expr.val1); mpq_class temp2(expr.val2); __gmp_binary_minus::eval(q, temp1.get_mpz_t(), temp2.get_mpq_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template class __gmp_expr, __gmp_expr, __gmp_binary_minus> > { private: typedef __gmp_expr val1_type; typedef __gmp_expr val2_type; __gmp_binary_expr expr; public: __gmp_expr(const val1_type &val1, const val2_type &val2) : expr(val1, val2) { } void eval(mpq_ptr q) const { mpq_class temp1(expr.val1); mpz_class temp2(expr.val2); __gmp_binary_minus::eval(q, temp1.get_mpq_t(), temp2.get_mpz_t()); } const val1_type & get_val1() const { return expr.val1; } const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; # 3132 "/usr/include/gmpxx.h" 3 4 template inline __gmp_expr, __gmp_unary_plus> > operator+(const __gmp_expr &expr) { return __gmp_expr, __gmp_unary_plus> >(expr); } template inline __gmp_expr, __gmp_unary_minus> > operator-(const __gmp_expr &expr) { return __gmp_expr, __gmp_unary_minus> >(expr); } template inline __gmp_expr, __gmp_unary_com> > operator~(const __gmp_expr &expr) { return __gmp_expr, __gmp_unary_com> >(expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_plus> > operator+(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_plus> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_plus> > operator+(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_plus> > operator+(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_plus> > operator+(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_plus> > operator+(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_plus> >(expr, t); } template inline __gmp_expr , __gmp_binary_plus> > operator+(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_plus> >(t, expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_minus> > operator-(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_minus> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_minus> > operator-(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_minus> > operator-(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_minus> > operator-(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_minus> > operator-(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_minus> >(expr, t); } template inline __gmp_expr , __gmp_binary_minus> > operator-(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_minus> >(t, expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_multiplies> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_multiplies> > operator*(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_multiplies> >(expr, t); } template inline __gmp_expr , __gmp_binary_multiplies> > operator*(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_multiplies> >(t, expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_divides> > operator/(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_divides> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_divides> > operator/(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_divides> > operator/(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_divides> > operator/(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_divides> > operator/(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_divides> >(expr, t); } template inline __gmp_expr , __gmp_binary_divides> > operator/(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_divides> >(t, expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_modulus> > operator%(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_modulus> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_modulus> > operator%(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_modulus> >(expr, t); } template inline __gmp_expr , __gmp_binary_modulus> > operator%(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_modulus> >(t, expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_and> > operator&(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_and> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_and> > operator&(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_and> > operator&(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_and> > operator&(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_and> > operator&(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_and> >(expr, t); } template inline __gmp_expr , __gmp_binary_and> > operator&(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_and> >(t, expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_ior> > operator|(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_ior> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_ior> > operator|(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_ior> > operator|(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_ior> > operator|(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_ior> > operator|(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_ior> >(expr, t); } template inline __gmp_expr , __gmp_binary_ior> > operator|(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_ior> >(t, expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_xor> > operator^(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_binary_xor> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_xor> > operator^(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_xor> > operator^(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , double, __gmp_binary_xor> > operator^(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , long double, __gmp_binary_xor> > operator^(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_binary_xor> >(expr, t); } template inline __gmp_expr , __gmp_binary_xor> > operator^(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_binary_xor> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_binary_lshift> > operator<<(const __gmp_expr &expr, unsigned long int l) { return __gmp_expr, unsigned long int, __gmp_binary_lshift> >(expr, l); } template inline __gmp_expr , unsigned long int, __gmp_binary_rshift> > operator>>(const __gmp_expr &expr, unsigned long int l) { return __gmp_expr, unsigned long int, __gmp_binary_rshift> >(expr, l); } template inline bool operator==(const __gmp_expr &expr1, const __gmp_expr &expr2) { typedef typename __gmp_resolve_expr::value_type eval_type; typename __gmp_resolve_temp::temp_type temp1(expr1); typename __gmp_resolve_temp::temp_type temp2(expr2); return __gmp_binary_equal::eval(temp1.__get_mp(), temp2.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, signed char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(signed char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, unsigned char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(unsigned char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, signed int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(signed int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, unsigned int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(unsigned int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, signed short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(signed short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, unsigned short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(unsigned short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, signed long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(signed long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, unsigned long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(unsigned long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, float t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(float t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator==(const __gmp_expr &expr, long double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator==(long double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr1, const __gmp_expr &expr2) { typedef typename __gmp_resolve_expr::value_type eval_type; typename __gmp_resolve_temp::temp_type temp1(expr1); typename __gmp_resolve_temp::temp_type temp2(expr2); return __gmp_binary_not_equal::eval(temp1.__get_mp(), temp2.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, signed char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(signed char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, unsigned char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(unsigned char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, signed int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(signed int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, unsigned int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(unsigned int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, signed short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(signed short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, unsigned short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(unsigned short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, signed long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(signed long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, unsigned long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(unsigned long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, float t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(float t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator!=(const __gmp_expr &expr, long double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator!=(long double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_not_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr1, const __gmp_expr &expr2) { typedef typename __gmp_resolve_expr::value_type eval_type; typename __gmp_resolve_temp::temp_type temp1(expr1); typename __gmp_resolve_temp::temp_type temp2(expr2); return __gmp_binary_less::eval(temp1.__get_mp(), temp2.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, signed char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(signed char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, unsigned char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(unsigned char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, signed int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(signed int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, unsigned int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(unsigned int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, signed short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(signed short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, unsigned short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(unsigned short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, signed long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(signed long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, unsigned long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(unsigned long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, float t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(float t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<(const __gmp_expr &expr, long double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<(long double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr1, const __gmp_expr &expr2) { typedef typename __gmp_resolve_expr::value_type eval_type; typename __gmp_resolve_temp::temp_type temp1(expr1); typename __gmp_resolve_temp::temp_type temp2(expr2); return __gmp_binary_less_equal::eval(temp1.__get_mp(), temp2.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, signed char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(signed char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, unsigned char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(unsigned char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, signed int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(signed int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, unsigned int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(unsigned int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, signed short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(signed short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, unsigned short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(unsigned short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, signed long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(signed long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, unsigned long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(unsigned long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, float t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(float t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator<=(const __gmp_expr &expr, long double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator<=(long double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_less_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr1, const __gmp_expr &expr2) { typedef typename __gmp_resolve_expr::value_type eval_type; typename __gmp_resolve_temp::temp_type temp1(expr1); typename __gmp_resolve_temp::temp_type temp2(expr2); return __gmp_binary_greater::eval(temp1.__get_mp(), temp2.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, signed char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(signed char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, unsigned char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(unsigned char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, signed int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(signed int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, unsigned int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(unsigned int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, signed short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(signed short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, unsigned short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(unsigned short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, signed long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(signed long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, unsigned long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(unsigned long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, float t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(float t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>(const __gmp_expr &expr, long double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>(long double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr1, const __gmp_expr &expr2) { typedef typename __gmp_resolve_expr::value_type eval_type; typename __gmp_resolve_temp::temp_type temp1(expr1); typename __gmp_resolve_temp::temp_type temp2(expr2); return __gmp_binary_greater_equal::eval(temp1.__get_mp(), temp2.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, signed char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(signed char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, unsigned char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(unsigned char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, signed int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(signed int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, unsigned int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(unsigned int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, signed short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(signed short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, unsigned short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(unsigned short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, signed long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(signed long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, unsigned long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(unsigned long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, float t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(float t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline bool operator>=(const __gmp_expr &expr, long double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(temp.__get_mp(), static_cast(t)); } template inline bool operator>=(long double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_binary_greater_equal::eval(static_cast(t), temp.__get_mp()); } template inline __gmp_expr, __gmp_abs_function> > abs(const __gmp_expr &expr) { return __gmp_expr, __gmp_abs_function> >(expr); } template inline __gmp_expr, __gmp_trunc_function> > trunc(const __gmp_expr &expr) { return __gmp_expr, __gmp_trunc_function> >(expr); } template inline __gmp_expr, __gmp_floor_function> > floor(const __gmp_expr &expr) { return __gmp_expr, __gmp_floor_function> >(expr); } template inline __gmp_expr, __gmp_ceil_function> > ceil(const __gmp_expr &expr) { return __gmp_expr, __gmp_ceil_function> >(expr); } template inline __gmp_expr, __gmp_sqrt_function> > sqrt(const __gmp_expr &expr) { return __gmp_expr, __gmp_sqrt_function> >(expr); } template inline __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_hypot_function> > hypot(const __gmp_expr &expr1, const __gmp_expr &expr2) { return __gmp_expr::value_type, __gmp_binary_expr<__gmp_expr, __gmp_expr, __gmp_hypot_function> > (expr1, expr2); } template inline __gmp_expr , signed long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, signed char t) { return __gmp_expr , signed long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(signed char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, unsigned char t) { return __gmp_expr , unsigned long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(unsigned char t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, signed int t) { return __gmp_expr , signed long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(signed int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, unsigned int t) { return __gmp_expr , unsigned long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(unsigned int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, signed short int t) { return __gmp_expr , signed long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(signed short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, unsigned short int t) { return __gmp_expr , unsigned long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(unsigned short int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , signed long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, signed long int t) { return __gmp_expr , signed long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(signed long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , unsigned long int, __gmp_hypot_function> > hypot(const __gmp_expr &expr, unsigned long int t) { return __gmp_expr , unsigned long int, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(unsigned long int t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , double, __gmp_hypot_function> > hypot(const __gmp_expr &expr, float t) { return __gmp_expr , double, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(float t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , double, __gmp_hypot_function> > hypot(const __gmp_expr &expr, double t) { return __gmp_expr , double, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline __gmp_expr , long double, __gmp_hypot_function> > hypot(const __gmp_expr &expr, long double t) { return __gmp_expr , long double, __gmp_hypot_function> >(expr, t); } template inline __gmp_expr , __gmp_hypot_function> > hypot(long double t, const __gmp_expr &expr) { return __gmp_expr , __gmp_hypot_function> >(t, expr); } template inline int sgn(const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_sgn_function::eval(temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr1, const __gmp_expr &expr2) { typedef typename __gmp_resolve_expr::value_type eval_type; typename __gmp_resolve_temp::temp_type temp1(expr1); typename __gmp_resolve_temp::temp_type temp2(expr2); return __gmp_cmp_function::eval(temp1.__get_mp(), temp2.__get_mp()); } template inline int cmp(const __gmp_expr &expr, signed char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(signed char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, unsigned char t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(unsigned char t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, signed int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(signed int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, unsigned int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(unsigned int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, signed short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(signed short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, unsigned short int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(unsigned short int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, signed long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(signed long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, unsigned long int t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(unsigned long int t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, float t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(float t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline int cmp(const __gmp_expr &expr, long double t) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(temp.__get_mp(), static_cast(t)); } template inline int cmp(long double t, const __gmp_expr &expr) { typename __gmp_resolve_temp::temp_type temp(expr); return __gmp_cmp_function::eval(static_cast(t), temp.__get_mp()); } template inline mpz_class & mpz_class::operator+=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_plus> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator+=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator+=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpz_class & mpz_class::operator-=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_minus> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator-=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator-=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpz_class & mpz_class::operator*=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_multiplies> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator*=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator*=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpz_class & mpz_class::operator/=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_divides> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator/=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator/=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpz_class & mpz_class::operator%=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_modulus> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator%=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator%=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpz_class & mpz_class::operator&=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_and> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator&=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator&=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpz_class & mpz_class::operator|=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_ior> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator|=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator|=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpz_class & mpz_class::operator^=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_xor> >(*this, expr)); return *this; } inline mpz_class & mpz_class::operator^=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator^=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpz_class & mpz_class::operator<<=(unsigned long int l) { __gmp_set_expr(mp, __gmp_expr >(*this, l)); return *this; } inline mpz_class & mpz_class::operator>>=(unsigned long int l) { __gmp_set_expr(mp, __gmp_expr >(*this, l)); return *this; } inline mpz_class & mpz_class::operator++() { __gmp_unary_increment::eval(mp); return *this; } inline mpz_class mpz_class::operator++(int) { mpz_class temp(*this); __gmp_unary_increment::eval(mp); return temp; } inline mpz_class & mpz_class::operator--() { __gmp_unary_decrement::eval(mp); return *this; } inline mpz_class mpz_class::operator--(int) { mpz_class temp(*this); __gmp_unary_decrement::eval(mp); return temp; } template inline mpq_class & mpq_class::operator+=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_plus> >(*this, expr)); return *this; } inline mpq_class & mpq_class::operator+=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator+=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpq_class & mpq_class::operator-=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_minus> >(*this, expr)); return *this; } inline mpq_class & mpq_class::operator-=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator-=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpq_class & mpq_class::operator*=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_multiplies> >(*this, expr)); return *this; } inline mpq_class & mpq_class::operator*=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator*=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpq_class & mpq_class::operator/=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_divides> >(*this, expr)); return *this; } inline mpq_class & mpq_class::operator/=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator/=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpq_class & mpq_class::operator<<=(unsigned long int l) { __gmp_set_expr(mp, __gmp_expr >(*this, l)); return *this; } inline mpq_class & mpq_class::operator>>=(unsigned long int l) { __gmp_set_expr(mp, __gmp_expr >(*this, l)); return *this; } inline mpq_class & mpq_class::operator++() { __gmp_unary_increment::eval(mp); return *this; } inline mpq_class mpq_class::operator++(int) { mpq_class temp(*this); __gmp_unary_increment::eval(mp); return temp; } inline mpq_class & mpq_class::operator--() { __gmp_unary_decrement::eval(mp); return *this; } inline mpq_class mpq_class::operator--(int) { mpq_class temp(*this); __gmp_unary_decrement::eval(mp); return temp; } template inline mpf_class & mpf_class::operator+=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_plus> >(*this, expr)); return *this; } inline mpf_class & mpf_class::operator+=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator+=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpf_class & mpf_class::operator-=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_minus> >(*this, expr)); return *this; } inline mpf_class & mpf_class::operator-=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator-=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpf_class & mpf_class::operator*=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_multiplies> >(*this, expr)); return *this; } inline mpf_class & mpf_class::operator*=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator*=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } template inline mpf_class & mpf_class::operator/=(const __gmp_expr &expr) { __gmp_set_expr(mp, __gmp_expr, __gmp_binary_divides> >(*this, expr)); return *this; } inline mpf_class & mpf_class::operator/=(signed char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(unsigned char t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(signed int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(unsigned int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(signed short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(unsigned short int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(signed long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(unsigned long int t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(float t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator/=(double t) { __gmp_set_expr(mp, __gmp_expr >(*this, t)); return *this; } inline mpf_class & mpf_class::operator<<=(unsigned long int l) { __gmp_set_expr(mp, __gmp_expr >(*this, l)); return *this; } inline mpf_class & mpf_class::operator>>=(unsigned long int l) { __gmp_set_expr(mp, __gmp_expr >(*this, l)); return *this; } inline mpf_class & mpf_class::operator++() { __gmp_unary_increment::eval(mp); return *this; } inline mpf_class mpf_class::operator++(int) { mpf_class temp(*this); __gmp_unary_increment::eval(mp); return temp; } inline mpf_class & mpf_class::operator--() { __gmp_unary_decrement::eval(mp); return *this; } inline mpf_class mpf_class::operator--(int) { mpf_class temp(*this); __gmp_unary_decrement::eval(mp); return temp; } class __gmp_urandomb_value { }; class __gmp_urandomm_value { }; template <> class __gmp_expr { private: __gmp_randstate_struct *state; unsigned long int bits; public: __gmp_expr(gmp_randstate_t s, unsigned long int l) : state(s), bits(l) { } void eval(mpz_ptr z) const { __gmp_rand_function::eval(z, state, bits); } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template <> class __gmp_expr { private: __gmp_randstate_struct *state; mpz_class range; public: __gmp_expr(gmp_randstate_t s, const mpz_class &z) : state(s), range(z) { } void eval(mpz_ptr z) const { __gmp_rand_function::eval(z, state, range.get_mpz_t()); } unsigned long int get_prec() const { return __gmpf_get_default_prec(); } }; template <> class __gmp_expr { private: __gmp_randstate_struct *state; unsigned long int bits; public: __gmp_expr(gmp_randstate_t s, unsigned long int l) : state(s), bits(l) { } void eval(mpf_ptr f, mp_bitcnt_t prec) const { __gmp_rand_function::eval(f, state, (bits>0) ? get_prec() : prec); } unsigned long int get_prec() const { if (bits == 0) return __gmpf_get_default_prec(); else return bits; } }; extern "C" { typedef void __gmp_randinit_default_t (gmp_randstate_t); typedef void __gmp_randinit_lc_2exp_t (gmp_randstate_t, mpz_srcptr, unsigned long int, unsigned long int); typedef int __gmp_randinit_lc_2exp_size_t (gmp_randstate_t, unsigned long int); } class gmp_randclass { private: gmp_randstate_t state; gmp_randclass(const gmp_randclass &); void operator=(const gmp_randclass &); public: gmp_randclass(gmp_randalg_t alg, unsigned long int size) { switch (alg) { case GMP_RAND_ALG_LC: default: __gmp_randinit(state, alg, size); break; } } gmp_randclass(__gmp_randinit_default_t* f) { f(state); } gmp_randclass(__gmp_randinit_lc_2exp_t* f, mpz_class z, unsigned long int l1, unsigned long int l2) { f(state, z.get_mpz_t(), l1, l2); } gmp_randclass(__gmp_randinit_lc_2exp_size_t* f, unsigned long int size) { if (f (state, size) == 0) throw std::length_error ("gmp_randinit_lc_2exp_size"); } ~gmp_randclass() { __gmp_randclear(state); } void seed(); void seed(unsigned long int s) { __gmp_randseed_ui(state, s); } void seed(const mpz_class &z) { __gmp_randseed(state, z.get_mpz_t()); } __gmp_expr get_z_bits(unsigned long int l) { return __gmp_expr(state, l); } __gmp_expr get_z_bits(const mpz_class &z) { return get_z_bits(z.get_ui()); } __gmp_expr get_z_range(const mpz_class &z) { return __gmp_expr(state, z); } __gmp_expr get_f(mp_bitcnt_t prec = 0) { return __gmp_expr(state, prec); } }; # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/is_convertible.h" 2 namespace CGAL { templatestruct is_implicit_convertible : boost::is_convertible {}; templatestruct is_implicit_convertible<__gmp_expr,mpz_class> : boost::false_type {}; } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Rational_traits.h" 2 # 1 "/localhome/glisse2/include/boost/utility/enable_if.hpp" 1 # 24 "/localhome/glisse2/include/boost/utility/enable_if.hpp" namespace boost { template struct enable_if_c { typedef T type; }; template struct enable_if_c {}; template struct enable_if : public enable_if_c {}; template struct lazy_enable_if_c { typedef typename T::type type; }; template struct lazy_enable_if_c {}; template struct lazy_enable_if : public lazy_enable_if_c {}; template struct disable_if_c { typedef T type; }; template struct disable_if_c {}; template struct disable_if : public disable_if_c {}; template struct lazy_disable_if_c { typedef typename T::type type; }; template struct lazy_disable_if_c {}; template struct lazy_disable_if : public lazy_disable_if_c {}; } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Rational_traits.h" 2 namespace CGAL { namespace internal{ template struct Rational_traits_base { typedef Rational RT; const RT& numerator (const Rational& r) const { return r; } RT denominator (const Rational&) const { return RT(1); } Rational make_rational(const RT & n, const RT & d) const { return n / d; } }; template struct Rational_traits_base { private: typedef Fraction_traits FT; typedef typename FT::Decompose Decomose; typedef typename FT::Compose Compose; public: typedef typename FT::Numerator_type RT; RT numerator (const Rational& r) const { RT num,den; Decomose()(r,num,den); return num; } RT denominator (const Rational& r) const { RT num,den; Decomose()(r,num,den); return den; } template Rational make_rational(const N& n, const D& d,typename boost::enable_if_c::value&&is_implicit_convertible::value,int>::type=0) const { return Compose()(n,d); } template Rational make_rational(const N& n, const D& d,typename boost::enable_if_c::value||!is_implicit_convertible::value,int>::type=0) const { return n/d; } }; } template class Rational_traits : public internal::Rational_traits_base::Is_fraction,Tag_true>::value && ::boost::is_same< typename Fraction_traits::Numerator_type, typename Fraction_traits::Denominator_type >::value > {}; } # 66 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Scalar_factor_traits.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Scalar_factor_traits.h" namespace CGAL { # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Scalar_factor_traits.h" template< class NT > class Scalar_factor_traits { public: typedef NT Type; typedef NT Scalar; class Scalar_factor { static Scalar scalar_factor(const NT& a, Integral_domain_tag) { typename Algebraic_structure_traits::Unit_part upart; typename Algebraic_structure_traits::Integral_division idiv; return idiv(a, upart(a)); } static Scalar scalar_factor(const NT& a, Field_tag) { return (a == NT(0)) ? NT(0) : NT(1); } static Scalar scalar_factor(const NT& a, const Scalar& d, Integral_domain_tag) { return Scalar(1); } static Scalar scalar_factor(const NT& a, const Scalar& d, Field_tag) { return (a == NT(0) && d == Scalar(0)) ? NT(0) : NT(1); } static Scalar scalar_factor(const NT& a, const Scalar& d, Unique_factorization_domain_tag) { if( d == Scalar(0)) { return a; } else { typename Algebraic_structure_traits::Gcd gcd; return gcd(a,d); } } public: typedef NT argument_type; typedef NT first_argument_type; typedef Scalar second_argument_type; typedef Scalar result_type; Scalar operator () (const NT& a) { static_assert(( ::boost::is_same< NT,Scalar >::value), "( ::boost::is_same< NT,Scalar >::value)"); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a, SAT()); } Scalar operator () (const NT& a, const Scalar& d) { static_assert(( ::boost::is_same< NT,Scalar >::value), "( ::boost::is_same< NT,Scalar >::value)"); typedef typename Algebraic_structure_traits::Algebraic_category SAT; return scalar_factor(a,d,SAT()); } }; class Scalar_div { public: typedef NT& first_argument_type; typedef Scalar second_argument_type; typedef void result_type; void operator () (NT& a, const Scalar& b) { (CGAL::possibly(b != Scalar(0))?(static_cast(0)): ::CGAL::precondition_fail( "b != Scalar(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Scalar_factor_traits.h", 117)); typename Algebraic_structure_traits::Integral_division idiv; a = idiv(a, b); } }; }; template void remove_scalar_factor(NT& x){ typedef CGAL::Scalar_factor_traits SFT; typedef typename SFT::Scalar Scalar; typename SFT::Scalar_factor sfac; typename SFT::Scalar_div sdiv; Scalar scalar=sfac(x); if(scalar != Scalar(0)) sdiv(x,scalar); } template inline typename CGAL::Scalar_factor_traits::Scalar scalar_factor(const NT& x){ typename CGAL::Scalar_factor_traits::Scalar_factor scalar_factor; return scalar_factor(x); } template inline typename CGAL::Scalar_factor_traits::Scalar scalar_factor(const NT& x, const typename CGAL::Scalar_factor_traits::Scalar& d) { typename CGAL::Scalar_factor_traits::Scalar_factor scalar_factor; return scalar_factor(x,d); } } # 68 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_extension_traits.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_extension_traits.h" namespace CGAL { template< class T > class Algebraic_extension_traits { public: typedef T Type; typedef CGAL::Tag_false Is_extended; class Normalization_factor : public std::unary_function { private: static Type normalization_factor(const Type&,Integral_domain_without_division_tag){ return Type(1); } static Type normalization_factor(const Type& a, Field_tag){ return Type(1)/a; } public: Type operator () (const Type& a) { (CGAL::possibly(a != Type(0))?(static_cast(0)): ::CGAL::precondition_fail( "a != Type(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_extension_traits.h", 60)); typedef typename Algebraic_structure_traits::Algebraic_category Tag; return normalization_factor(a, Tag()); } }; class Denominator_for_algebraic_integers : public std::unary_function { public: Type operator () (const Type&) { return Type(1); } template Type operator () (InputIterator, InputIterator) { return Type(1); } }; }; } # 69 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Needs_parens_as_product.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Needs_parens_as_product.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/io.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/io.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/Color.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/Color.h" namespace CGAL { class Color { public: Color() {} Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = 120) : _red(red), _green(green), _blue(blue), _alpha(alpha) {} unsigned char r() const {return _red;} unsigned char g() const {return _green;} unsigned char b() const {return _blue;} unsigned char red() const {return _red;} unsigned char green() const {return _green;} unsigned char blue() const {return _blue;} unsigned char alpha() const {return _alpha;} void set_alpha(unsigned char a) {_alpha=a;} bool operator==(const Color &c) const { return ( (red() == c.red()) && (green() == c.green()) && (blue() == c.blue()) ); } bool operator!=(const Color &c) const { return !( (*this) == c); } Color& operator=(const Color &c) { _red = c.red(); _green = c.green(); _blue = c.blue(); _alpha = c.alpha(); return *this; } private: unsigned char _red; unsigned char _green; unsigned char _blue; unsigned char _alpha; }; extern const Color BLACK ; extern const Color WHITE ; extern const Color GRAY ; extern const Color RED ; extern const Color GREEN ; extern const Color DEEPBLUE ; extern const Color BLUE ; extern const Color PURPLE ; extern const Color VIOLET ; extern const Color ORANGE ; extern const Color YELLOW ; } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/io.h" 2 namespace CGAL { class IO { public: static int mode; enum Mode {ASCII = 0, PRETTY, BINARY}; }; template class Output_rep { const T& t; public: Output_rep( const T& tt) : t(tt) {} std::ostream& operator()( std::ostream& out) const { return (out << t); } }; template std::ostream& operator<<( std::ostream& out, Output_rep rep) { return rep( out); } template Output_rep oformat( const T& t) { return Output_rep(t); } template Output_rep oformat( const T& t, F) { return Output_rep(t); } # 81 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/io.h" template class Input_rep { T& t; public: Input_rep( T& tt) : t(tt) {} std::istream& operator()( std::istream& in) const { return (in >> t); } }; template std::istream& operator>>( std::istream& in, Input_rep rep) { return rep( in); } template Input_rep iformat( T& t) { return Input_rep(t); } template class Benchmark_rep { const T& t; public: Benchmark_rep( const T& tt) : t(tt) {} std::ostream& operator()( std::ostream& out) const { return out << t; } static std::string get_benchmark_name() { return ""; } }; template std::ostream& operator<<( std::ostream& out, Benchmark_rep rep) { return rep( out); } template Benchmark_rep bmformat( const T& t) { return Benchmark_rep(t); } template Benchmark_rep bmformat( const T& t, F) { return Benchmark_rep(t); } IO::Mode get_mode(std::ios& i); IO::Mode set_ascii_mode(std::ios& i); IO::Mode set_binary_mode(std::ios& i); IO::Mode set_pretty_mode(std::ios& i); IO::Mode set_mode(std::ios& i, IO::Mode m); bool is_pretty(std::ios& i); bool is_ascii(std::ios& i); bool is_binary(std::ios& i); template < class T > inline void write(std::ostream& os, const T& t, const io_Read_write&) { os.write(reinterpret_cast(&t), sizeof(t)); } template < class T > inline void write(std::ostream& os, const T& t, const io_Operator&) { os << oformat(t); } template < class T > inline void write(std::ostream& os, const T& t, const io_Extract_insert&) { insert(os, t); } template < class T > inline void write(std::ostream& os, const T& t) { write(os, t, typename Io_traits::Io_tag()); } template < class T > inline void read(std::istream& is, T& t, const io_Read_write&) { is.read(reinterpret_cast(&t), sizeof(t)); } template < class T > inline void read(std::istream& is, T& t, const io_Operator&) { is >> iformat(t); } template < class T > inline void read(std::istream& is, T& t, const io_Extract_insert&) { extract(is, t); } template < class T > inline void read(std::istream& is, T& t) { read(is, t, typename Io_traits::Io_tag()); } inline std::ostream& operator<<( std::ostream& out, const Color& col) { switch(out.iword(IO::mode)) { case IO::ASCII : return out << static_cast(col.red()) << ' ' << static_cast(col.green()) << ' ' << static_cast(col.blue()); case IO::BINARY : write(out, static_cast(col.red())); write(out, static_cast(col.green())); write(out, static_cast(col.blue())); return out; default: return out << "Color(" << static_cast(col.red()) << ", " << static_cast(col.green()) << ", " << static_cast(col.blue()) << ')'; } } inline std::istream &operator>>(std::istream &is, Color& col) { int r, g, b; switch(is.iword(IO::mode)) { case IO::ASCII : is >> r >> g >> b; break; case IO::BINARY : read(is, r); read(is, g); read(is, b); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } col = Color(r,g,b); return is; } const char* mode_name( IO::Mode m ); void swallow(std::istream &is, char d); void swallow(std::istream &is, const std::string& s ); } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Needs_parens_as_product.h" 2 namespace CGAL { class Parens_as_product_tag {}; template struct Needs_parens_as_product{ bool operator()(const NT&){ return true; } }; template inline bool needs_parens_as_product(const NT& x){ typedef Needs_parens_as_product NPAP; return NPAP()(x); } template class Output_rep { const T& t; public: Output_rep(const T& tt) : t(tt) {} std::ostream& operator () (std::ostream& out) const { if ( needs_parens_as_product(t)) { return out << "(" << oformat(t) << ")"; } else { return out << oformat(t); } } }; template <> struct Needs_parens_as_product{ bool operator()(const short& x){return x < short(0);} }; template <> struct Needs_parens_as_product{ bool operator()(const int& x){return x < int(0);} }; template <> struct Needs_parens_as_product{ bool operator()(const long& x){return x < long(0);} }; template <> struct Needs_parens_as_product{ bool operator()(const long long& x){return x < (long long)(0);} }; template <> struct Needs_parens_as_product{ bool operator()(const float& x){return x < float(0);} }; template <> struct Needs_parens_as_product{ bool operator()(const double& x){return x < double(0);} }; template <> struct Needs_parens_as_product{ bool operator()(const long double& x){return x < (long double)(0);} }; } # 71 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/utils_classes.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/utils_classes.h" namespace CGAL { template < class A, class B = A > struct Equal_to : public std::binary_function< A, B, bool > { bool operator()( const A& x, const B& y) const { return x == y; } }; template < class A, class B = A > struct Not_equal_to : public std::binary_function< A, B, bool > { bool operator()( const A& x, const B& y) const { return x != y; } }; template < class A, class B = A > struct Greater : public std::binary_function< A, B, bool > { bool operator()( const A& x, const B& y) const { return x > y; } }; template < class A, class B = A > struct Less : public std::binary_function< A, B, bool > { bool operator()( const A& x, const B& y) const { return x < y; } }; template < class A, class B = A > struct Greater_equal : public std::binary_function< A, B, bool > { bool operator()( const A& x, const B& y) const { return x >= y; } }; template < class A, class B = A > struct Less_equal : public std::binary_function< A, B, bool > { bool operator()( const A& x, const B& y) const { return x <= y; } }; template < class NT, class Less = std::less< NT > > struct Min :public std::binary_function< NT, NT, NT > { Min() {} Min(const Less& c_) : c(c_) {} NT operator()( const NT& x, const NT& y) const { return (std::min)( x, y, c); } protected: Less c; }; template < class NT, class Less = std::less< NT > > struct Max :public std::binary_function< NT, NT, NT > { Max() {} Max(const Less& c_) : c(c_) {} NT operator()( const NT& x, const NT& y) const { return (std::max)( x, y, c); } protected: Less c; }; # 199 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/utils_classes.h" template <> struct Max :public std::binary_function< double, double, double > { Max() {} double operator()( const double& x, const double& y) const { return (std::max)( x, y); } double operator()( double x, double y, double z) const { return (std::max)((std::max)( x, y), z); } double operator()( double w,double x, double y, double z) const { return (std::max)((std::max)( x, y), (std::max)(w,z)); } }; template <> struct Min :public std::binary_function< double, double, double > { Min() {} double operator()( const double& x, const double& y) const { return (std::min)( x, y); } double operator()( double x, double y, double z) const { return (std::min)((std::min)( x, y), z); } double operator()( double w,double x, double y, double z) const { return (std::min)((std::min)( x, y), (std::min)(w,z)); } }; template< class T > class Is_valid : public std::unary_function< T, bool > { public: bool operator()( const T& ) const { return true; }; }; } # 73 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/utils.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/utils.h" namespace CGAL { template< class T > inline T min ( const T& x , const T& y) { return Min()( x , y ); } template< class T , class Compare > inline T min ( const T& x , const T& y, const Compare& c) { return Min(c)( x , y ); } template< class T > inline T max ( const T& x , const T& y) { return Max()( x , y ); } template< class T , class Compare > inline T max ( const T& x , const T& y, const Compare& c) { return Max(c)( x , y ); } template< class T > inline bool is_valid( const T& x ) { return Is_valid< T >()( x ); } } # 74 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_utils.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_utils.h" namespace CGAL { template< class AS > inline void simplify( AS& x ) { typename Algebraic_structure_traits< AS >::Simplify simplify; simplify( x ); } template< class AS > inline typename Algebraic_structure_traits< AS >::Unit_part::result_type unit_part( const AS& x ) { typename Algebraic_structure_traits< AS >::Unit_part unit_part; return unit_part( x ); } template< class AS > inline typename Algebraic_structure_traits< AS >::Is_square::result_type is_square( const AS& x, typename Algebraic_structure_traits< AS >::Is_square::second_argument_type y ) { typename Algebraic_structure_traits< AS >::Is_square is_square; return is_square( x, y ); } template< class AS > inline typename Algebraic_structure_traits< AS >::Is_square::result_type is_square( const AS& x){ typename Algebraic_structure_traits< AS >::Is_square is_square; return is_square( x ); } template< class AS > inline typename Algebraic_structure_traits< AS >::Square::result_type square( const AS& x ) { typename Algebraic_structure_traits< AS >::Square square; return square( x ); } template< class AS > inline typename Algebraic_structure_traits< AS >::Inverse::result_type inverse( const AS& x ) { typename Algebraic_structure_traits< AS >::Inverse inverse; return inverse( x ); } template< class AS > inline typename Algebraic_structure_traits::Is_one::result_type is_one( const AS& x ) { typename Algebraic_structure_traits< AS >::Is_one is_one; return is_one( x ); } template< class AS > inline typename Algebraic_structure_traits< AS >::Sqrt::result_type sqrt( const AS& x ) { typename Algebraic_structure_traits< AS >::Sqrt sqrt; return sqrt( x ); } template< class A, class B > inline typename Algebraic_structure_traits< typename Coercion_traits::Type> ::Integral_division::result_type integral_division( const A& x, const B& y ) { typedef typename Coercion_traits::Type Type; typename Algebraic_structure_traits< Type >::Integral_division integral_division; return integral_division( x, y ); } template< class A, class B > inline typename Algebraic_structure_traits< typename Coercion_traits::Type> ::Divides::result_type divides( const A& x, const B& y ) { typedef typename Coercion_traits::Type Type; typename Algebraic_structure_traits< Type >::Divides divides; return divides( x, y ); } template< class Type > inline typename Algebraic_structure_traits::Divides::result_type divides( const Type& x, const Type& y, Type& q ) { typename Algebraic_structure_traits< Type >::Divides divides; return divides( x, y, q); } template< class A, class B > inline typename Algebraic_structure_traits< typename Coercion_traits::Type > ::Gcd::result_type gcd( const A& x, const B& y ) { typedef typename Coercion_traits::Type Type; typename Algebraic_structure_traits< Type >::Gcd gcd; return gcd( x, y ); } template< class A, class B > inline typename Algebraic_structure_traits< typename Coercion_traits::Type > ::Mod::result_type mod( const A& x, const B& y ) { typedef typename Coercion_traits::Type Type; typename Algebraic_structure_traits::Mod mod; return mod( x, y ); } template< class A, class B > inline typename Algebraic_structure_traits< typename Coercion_traits::Type>::Div::result_type div( const A& x, const B& y ) { typedef typename Coercion_traits::Type Type; typename Algebraic_structure_traits::Div div; return div( x, y ); } template< class A, class B > inline void div_mod( const A& x, const B& y, typename Coercion_traits::Type& q, typename Coercion_traits::Type& r ) { typedef typename Coercion_traits::Type Type; typename Algebraic_structure_traits< Type >::Div_mod div_mod; div_mod( x, y, q, r ); } template< class AS > inline typename Algebraic_structure_traits< AS >::Kth_root::result_type kth_root( int k, const AS& x ) { typename Algebraic_structure_traits< AS >::Kth_root kth_root; return kth_root( k, x ); } template< class Input_iterator > inline typename Algebraic_structure_traits< typename std::iterator_traits::value_type > ::Root_of::result_type root_of( int k, Input_iterator begin, Input_iterator end ) { typedef typename std::iterator_traits::value_type AS; return typename Algebraic_structure_traits::Root_of()( k, begin, end ); } template< class Number_type > inline typename boost::mpl::if_c< ::boost::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero, Null_functor >::value , typename Real_embeddable_traits< Number_type >::Is_zero, typename Algebraic_structure_traits< Number_type >::Is_zero >::type::result_type is_zero( const Number_type& x ) { typename ::boost::mpl::if_c< ::boost::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero, Null_functor >::value , typename Real_embeddable_traits< Number_type >::Is_zero, typename Algebraic_structure_traits< Number_type >::Is_zero >::type is_zero; return is_zero( x ); } template inline typename Real_embeddable_traits< typename Coercion_traits::Type > ::Compare::result_type compare(const A& a, const B& b) { typedef typename Coercion_traits::Type Type; typename Real_embeddable_traits::Compare compare; return compare (a,b); } template< class Real_embeddable > inline typename Real_embeddable_traits< Real_embeddable >::Abs::result_type abs( const Real_embeddable& x ) { typename Real_embeddable_traits< Real_embeddable >::Abs abs; return abs( x ); } template< class Real_embeddable > inline typename Real_embeddable_traits< Real_embeddable >::Sgn::result_type sign( const Real_embeddable& x ) { typename Real_embeddable_traits< Real_embeddable >::Sgn sgn; return sgn( x ); } template< class Real_embeddable > inline typename Real_embeddable_traits< Real_embeddable >::Is_finite::result_type is_finite( const Real_embeddable& x ) { return typename Real_embeddable_traits< Real_embeddable >::Is_finite()( x ); } template< class Real_embeddable > inline typename Real_embeddable_traits< Real_embeddable >::Is_positive::result_type is_positive( const Real_embeddable& x ) { typename Real_embeddable_traits< Real_embeddable >::Is_positive is_positive; return is_positive( x ); } template< class Real_embeddable > inline typename Real_embeddable_traits< Real_embeddable >::Is_negative::result_type is_negative( const Real_embeddable& x ) { typename Real_embeddable_traits< Real_embeddable >::Is_negative is_negative; return is_negative( x ); } # 293 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_utils.h" template< class Real_embeddable > inline typename Real_embeddable_traits< Real_embeddable >::To_double::result_type to_double( const Real_embeddable& x ) { typename Real_embeddable_traits< Real_embeddable >::To_double to_double; return to_double( x ); } template< class Real_embeddable > inline typename Real_embeddable_traits< Real_embeddable >::To_interval::result_type to_interval( const Real_embeddable& x) { typename Real_embeddable_traits< Real_embeddable >::To_interval to_interval; return to_interval( x ); } } # 75 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_utils_classes.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_utils_classes.h" namespace CGAL { # 53 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_utils_classes.h" template < class NT > struct Is_negative : Real_embeddable_traits::Is_negative {}; template < class NT > struct Is_positive : Real_embeddable_traits::Is_positive {}; template < class NT > struct Abs : Real_embeddable_traits::Abs{}; template < class NT > struct To_double : Real_embeddable_traits::To_double{}; template < class NT > struct To_interval : Real_embeddable_traits::To_interval{}; template < class NT > struct Sgn : Real_embeddable_traits::Sgn {}; template < class NT > struct Square : Algebraic_structure_traits::Square{}; template < class NT > struct Sqrt : Algebraic_structure_traits::Sqrt {}; template < class NT > struct Div : Algebraic_structure_traits::Div{}; template < class NT > struct Gcd : Algebraic_structure_traits::Gcd{}; template < class NT > struct Is_one : Algebraic_structure_traits::Is_one {}; namespace internal{ template struct Is_zero_base : AST_Is_zero {} ; template struct Is_zero_base : RET_Is_zero {} ; } template < class NT > struct Is_zero : internal::Is_zero_base ::Is_zero, typename Real_embeddable_traits::Is_zero>{}; namespace internal { template struct Compare_base: public Compare {}; template struct Compare_base :public std::binary_function< NT, NT, Comparison_result > { Comparison_result operator()( const NT& x, const NT& y) const { if (x < y) return SMALLER; if (x > y) return LARGER; (CGAL::possibly(x == y)?(static_cast(0)): ::CGAL::postcondition_fail( "x == y" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_utils_classes.h", 108)); return EQUAL; } }; } template < class NT > struct Compare :public internal::Compare_base ::Compare>{}; } # 76 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" 2 # 60 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/fenv.h" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/fenv.h" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/fenv.h" 3 # 1 "/usr/include/fenv.h" 1 3 4 # 58 "/usr/include/fenv.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/fenv.h" 1 3 4 # 23 "/usr/include/x86_64-linux-gnu/bits/fenv.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 24 "/usr/include/x86_64-linux-gnu/bits/fenv.h" 2 3 4 enum { FE_INVALID = 0x01, __FE_DENORM = 0x02, FE_DIVBYZERO = 0x04, FE_OVERFLOW = 0x08, FE_UNDERFLOW = 0x10, FE_INEXACT = 0x20 }; enum { FE_TONEAREST = 0, FE_DOWNWARD = 0x400, FE_UPWARD = 0x800, FE_TOWARDZERO = 0xc00 }; typedef unsigned short int fexcept_t; typedef struct { unsigned short int __control_word; unsigned short int __unused1; unsigned short int __status_word; unsigned short int __unused2; unsigned short int __tags; unsigned short int __unused3; unsigned int __eip; unsigned short int __cs_selector; unsigned int __opcode:11; unsigned int __unused4:5; unsigned int __data_offset; unsigned short int __data_selector; unsigned short int __unused5; unsigned int __mxcsr; } fenv_t; # 59 "/usr/include/fenv.h" 2 3 4 extern "C" { extern int feclearexcept (int __excepts) throw (); extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) throw (); extern int feraiseexcept (int __excepts) throw (); extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) throw (); extern int fetestexcept (int __excepts) throw (); extern int fegetround (void) throw (); extern int fesetround (int __rounding_direction) throw (); extern int fegetenv (fenv_t *__envp) throw (); extern int feholdexcept (fenv_t *__envp) throw (); extern int fesetenv (__const fenv_t *__envp) throw (); extern int feupdateenv (__const fenv_t *__envp) throw (); # 1 "/usr/include/x86_64-linux-gnu/bits/fenvinline.h" 1 3 4 # 116 "/usr/include/fenv.h" 2 3 4 extern int feenableexcept (int __excepts) throw (); extern int fedisableexcept (int __excepts) throw (); extern int fegetexcept (void) throw (); } # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/fenv.h" 2 3 # 55 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/fenv.h" 3 namespace std { using ::fenv_t; using ::fexcept_t; using ::feclearexcept; using ::fegetexceptflag; using ::feraiseexcept; using ::fesetexceptflag; using ::fetestexcept; using ::fegetround; using ::fesetround; using ::fegetenv; using ::feholdexcept; using ::fesetenv; using ::feupdateenv; } # 61 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" 2 # 88 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 1 3 4 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/mmintrin.h" 1 3 4 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/mmintrin.h" 3 4 typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__)); typedef int __v2si __attribute__ ((__vector_size__ (8))); typedef short __v4hi __attribute__ ((__vector_size__ (8))); typedef char __v8qi __attribute__ ((__vector_size__ (8))); typedef long long __v1di __attribute__ ((__vector_size__ (8))); typedef float __v2sf __attribute__ ((__vector_size__ (8))); extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_empty (void) { __builtin_ia32_emms (); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_empty (void) { _mm_empty (); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi32_si64 (int __i) { return (__m64) __builtin_ia32_vec_init_v2si (__i, 0); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_from_int (int __i) { return _mm_cvtsi32_si64 (__i); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_from_int64 (long long __i) { return (__m64) __i; } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64_m64 (long long __i) { return (__m64) __i; } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64x_si64 (long long __i) { return (__m64) __i; } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_pi64x (long long __i) { return (__m64) __i; } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64_si32 (__m64 __i) { return __builtin_ia32_vec_ext_v2si ((__v2si)__i, 0); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_to_int (__m64 __i) { return _mm_cvtsi64_si32 (__i); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_to_int64 (__m64 __i) { return (long long)__i; } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtm64_si64 (__m64 __i) { return (long long)__i; } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64_si64x (__m64 __i) { return (long long)__i; } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_packs_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_packsswb ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_packsswb (__m64 __m1, __m64 __m2) { return _mm_packs_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_packs_pi32 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_packssdw ((__v2si)__m1, (__v2si)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_packssdw (__m64 __m1, __m64 __m2) { return _mm_packs_pi32 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_packs_pu16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_packuswb ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_packuswb (__m64 __m1, __m64 __m2) { return _mm_packs_pu16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_punpckhbw ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_punpckhbw (__m64 __m1, __m64 __m2) { return _mm_unpackhi_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_punpckhwd ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_punpckhwd (__m64 __m1, __m64 __m2) { return _mm_unpackhi_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_pi32 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_punpckhdq ((__v2si)__m1, (__v2si)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_punpckhdq (__m64 __m1, __m64 __m2) { return _mm_unpackhi_pi32 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_punpcklbw ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_punpcklbw (__m64 __m1, __m64 __m2) { return _mm_unpacklo_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_punpcklwd ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_punpcklwd (__m64 __m1, __m64 __m2) { return _mm_unpacklo_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_pi32 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_punpckldq ((__v2si)__m1, (__v2si)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_punpckldq (__m64 __m1, __m64 __m2) { return _mm_unpacklo_pi32 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_paddb (__m64 __m1, __m64 __m2) { return _mm_add_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_paddw (__m64 __m1, __m64 __m2) { return _mm_add_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_pi32 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddd ((__v2si)__m1, (__v2si)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_paddd (__m64 __m1, __m64 __m2) { return _mm_add_pi32 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_si64 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddq ((__v1di)__m1, (__v1di)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddsb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_paddsb (__m64 __m1, __m64 __m2) { return _mm_adds_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddsw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_paddsw (__m64 __m1, __m64 __m2) { return _mm_adds_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_pu8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddusb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_paddusb (__m64 __m1, __m64 __m2) { return _mm_adds_pu8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_pu16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_paddusw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_paddusw (__m64 __m1, __m64 __m2) { return _mm_adds_pu16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psubb (__m64 __m1, __m64 __m2) { return _mm_sub_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psubw (__m64 __m1, __m64 __m2) { return _mm_sub_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_pi32 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubd ((__v2si)__m1, (__v2si)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psubd (__m64 __m1, __m64 __m2) { return _mm_sub_pi32 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_si64 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubq ((__v1di)__m1, (__v1di)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubsb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psubsb (__m64 __m1, __m64 __m2) { return _mm_subs_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubsw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psubsw (__m64 __m1, __m64 __m2) { return _mm_subs_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_pu8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubusb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psubusb (__m64 __m1, __m64 __m2) { return _mm_subs_pu8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_pu16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_psubusw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psubusw (__m64 __m1, __m64 __m2) { return _mm_subs_pu16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_madd_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pmaddwd ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pmaddwd (__m64 __m1, __m64 __m2) { return _mm_madd_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mulhi_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pmulhw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pmulhw (__m64 __m1, __m64 __m2) { return _mm_mulhi_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mullo_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pmullw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pmullw (__m64 __m1, __m64 __m2) { return _mm_mullo_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sll_pi16 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_psllw ((__v4hi)__m, (__v4hi)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psllw (__m64 __m, __m64 __count) { return _mm_sll_pi16 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_slli_pi16 (__m64 __m, int __count) { return (__m64) __builtin_ia32_psllwi ((__v4hi)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psllwi (__m64 __m, int __count) { return _mm_slli_pi16 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sll_pi32 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_pslld ((__v2si)__m, (__v2si)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pslld (__m64 __m, __m64 __count) { return _mm_sll_pi32 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_slli_pi32 (__m64 __m, int __count) { return (__m64) __builtin_ia32_pslldi ((__v2si)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pslldi (__m64 __m, int __count) { return _mm_slli_pi32 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sll_si64 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_psllq ((__v1di)__m, (__v1di)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psllq (__m64 __m, __m64 __count) { return _mm_sll_si64 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_slli_si64 (__m64 __m, int __count) { return (__m64) __builtin_ia32_psllqi ((__v1di)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psllqi (__m64 __m, int __count) { return _mm_slli_si64 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sra_pi16 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_psraw ((__v4hi)__m, (__v4hi)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psraw (__m64 __m, __m64 __count) { return _mm_sra_pi16 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srai_pi16 (__m64 __m, int __count) { return (__m64) __builtin_ia32_psrawi ((__v4hi)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrawi (__m64 __m, int __count) { return _mm_srai_pi16 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sra_pi32 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_psrad ((__v2si)__m, (__v2si)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrad (__m64 __m, __m64 __count) { return _mm_sra_pi32 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srai_pi32 (__m64 __m, int __count) { return (__m64) __builtin_ia32_psradi ((__v2si)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psradi (__m64 __m, int __count) { return _mm_srai_pi32 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srl_pi16 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_psrlw ((__v4hi)__m, (__v4hi)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrlw (__m64 __m, __m64 __count) { return _mm_srl_pi16 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srli_pi16 (__m64 __m, int __count) { return (__m64) __builtin_ia32_psrlwi ((__v4hi)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrlwi (__m64 __m, int __count) { return _mm_srli_pi16 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srl_pi32 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_psrld ((__v2si)__m, (__v2si)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrld (__m64 __m, __m64 __count) { return _mm_srl_pi32 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srli_pi32 (__m64 __m, int __count) { return (__m64) __builtin_ia32_psrldi ((__v2si)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrldi (__m64 __m, int __count) { return _mm_srli_pi32 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srl_si64 (__m64 __m, __m64 __count) { return (__m64) __builtin_ia32_psrlq ((__v1di)__m, (__v1di)__count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrlq (__m64 __m, __m64 __count) { return _mm_srl_si64 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srli_si64 (__m64 __m, int __count) { return (__m64) __builtin_ia32_psrlqi ((__v1di)__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psrlqi (__m64 __m, int __count) { return _mm_srli_si64 (__m, __count); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_and_si64 (__m64 __m1, __m64 __m2) { return __builtin_ia32_pand (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pand (__m64 __m1, __m64 __m2) { return _mm_and_si64 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_andnot_si64 (__m64 __m1, __m64 __m2) { return __builtin_ia32_pandn (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pandn (__m64 __m1, __m64 __m2) { return _mm_andnot_si64 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_or_si64 (__m64 __m1, __m64 __m2) { return __builtin_ia32_por (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_por (__m64 __m1, __m64 __m2) { return _mm_or_si64 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_xor_si64 (__m64 __m1, __m64 __m2) { return __builtin_ia32_pxor (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pxor (__m64 __m1, __m64 __m2) { return _mm_xor_si64 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pcmpeqb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pcmpeqb (__m64 __m1, __m64 __m2) { return _mm_cmpeq_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_pi8 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pcmpgtb ((__v8qi)__m1, (__v8qi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pcmpgtb (__m64 __m1, __m64 __m2) { return _mm_cmpgt_pi8 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pcmpeqw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pcmpeqw (__m64 __m1, __m64 __m2) { return _mm_cmpeq_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_pi16 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pcmpgtw ((__v4hi)__m1, (__v4hi)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pcmpgtw (__m64 __m1, __m64 __m2) { return _mm_cmpgt_pi16 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_pi32 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pcmpeqd ((__v2si)__m1, (__v2si)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pcmpeqd (__m64 __m1, __m64 __m2) { return _mm_cmpeq_pi32 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_pi32 (__m64 __m1, __m64 __m2) { return (__m64) __builtin_ia32_pcmpgtd ((__v2si)__m1, (__v2si)__m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pcmpgtd (__m64 __m1, __m64 __m2) { return _mm_cmpgt_pi32 (__m1, __m2); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setzero_si64 (void) { return (__m64)0LL; } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_pi32 (int __i1, int __i0) { return (__m64) __builtin_ia32_vec_init_v2si (__i0, __i1); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_pi16 (short __w3, short __w2, short __w1, short __w0) { return (__m64) __builtin_ia32_vec_init_v4hi (__w0, __w1, __w2, __w3); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_pi8 (char __b7, char __b6, char __b5, char __b4, char __b3, char __b2, char __b1, char __b0) { return (__m64) __builtin_ia32_vec_init_v8qi (__b0, __b1, __b2, __b3, __b4, __b5, __b6, __b7); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_pi32 (int __i0, int __i1) { return _mm_set_pi32 (__i1, __i0); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_pi16 (short __w0, short __w1, short __w2, short __w3) { return _mm_set_pi16 (__w3, __w2, __w1, __w0); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_pi8 (char __b0, char __b1, char __b2, char __b3, char __b4, char __b5, char __b6, char __b7) { return _mm_set_pi8 (__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_pi32 (int __i) { return _mm_set_pi32 (__i, __i); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_pi16 (short __w) { return _mm_set_pi16 (__w, __w, __w, __w); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_pi8 (char __b) { return _mm_set_pi8 (__b, __b, __b, __b, __b, __b, __b, __b); } # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 2 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/mm_malloc.h" 1 3 4 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/mm_malloc.h" 3 4 extern "C" int posix_memalign (void **, size_t, size_t) throw (); static __inline void * _mm_malloc (size_t size, size_t alignment) { void *ptr; if (alignment == 1) return malloc (size); if (alignment == 2 || (sizeof (void *) == 8 && alignment == 4)) alignment = sizeof (void *); if (posix_memalign (&ptr, alignment, size) == 0) return ptr; else return __null; } static __inline void _mm_free (void * ptr) { free (ptr); } # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 2 3 4 typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); typedef float __v4sf __attribute__ ((__vector_size__ (16))); enum _mm_hint { _MM_HINT_T0 = 3, _MM_HINT_T1 = 2, _MM_HINT_T2 = 1, _MM_HINT_NTA = 0 }; # 89 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 3 4 extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setzero_ps (void) { return __extension__ (__m128){ 0.0f, 0.0f, 0.0f, 0.0f }; } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_addss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_subss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mul_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_mulss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_div_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_divss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sqrt_ss (__m128 __A) { return (__m128) __builtin_ia32_sqrtss ((__v4sf)__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_rcp_ss (__m128 __A) { return (__m128) __builtin_ia32_rcpss ((__v4sf)__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_rsqrt_ss (__m128 __A) { return (__m128) __builtin_ia32_rsqrtss ((__v4sf)__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_minss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_maxss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_addps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_subps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mul_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_mulps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_div_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_divps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sqrt_ps (__m128 __A) { return (__m128) __builtin_ia32_sqrtps ((__v4sf)__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_rcp_ps (__m128 __A) { return (__m128) __builtin_ia32_rcpps ((__v4sf)__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_rsqrt_ps (__m128 __A) { return (__m128) __builtin_ia32_rsqrtps ((__v4sf)__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_minps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_maxps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_and_ps (__m128 __A, __m128 __B) { return __builtin_ia32_andps (__A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_andnot_ps (__m128 __A, __m128 __B) { return __builtin_ia32_andnps (__A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_or_ps (__m128 __A, __m128 __B) { return __builtin_ia32_orps (__A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_xor_ps (__m128 __A, __m128 __B) { return __builtin_ia32_xorps (__A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpeqss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmplt_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpltss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmple_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpless ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_movss ((__v4sf) __A, (__v4sf) __builtin_ia32_cmpltss ((__v4sf) __B, (__v4sf) __A)); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpge_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_movss ((__v4sf) __A, (__v4sf) __builtin_ia32_cmpless ((__v4sf) __B, (__v4sf) __A)); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpneq_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpneqss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnlt_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpnltss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnle_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpnless ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpngt_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_movss ((__v4sf) __A, (__v4sf) __builtin_ia32_cmpnltss ((__v4sf) __B, (__v4sf) __A)); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnge_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_movss ((__v4sf) __A, (__v4sf) __builtin_ia32_cmpnless ((__v4sf) __B, (__v4sf) __A)); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpord_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpordss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpunord_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpunordss ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpeqps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmplt_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpltps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmple_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpleps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpgtps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpge_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpgeps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpneq_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpneqps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnlt_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpnltps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnle_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpnleps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpngt_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpngtps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnge_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpngeps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpord_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpordps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpunord_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_cmpunordps ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comieq_ss (__m128 __A, __m128 __B) { return __builtin_ia32_comieq ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comilt_ss (__m128 __A, __m128 __B) { return __builtin_ia32_comilt ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comile_ss (__m128 __A, __m128 __B) { return __builtin_ia32_comile ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comigt_ss (__m128 __A, __m128 __B) { return __builtin_ia32_comigt ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comige_ss (__m128 __A, __m128 __B) { return __builtin_ia32_comige ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comineq_ss (__m128 __A, __m128 __B) { return __builtin_ia32_comineq ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomieq_ss (__m128 __A, __m128 __B) { return __builtin_ia32_ucomieq ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomilt_ss (__m128 __A, __m128 __B) { return __builtin_ia32_ucomilt ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomile_ss (__m128 __A, __m128 __B) { return __builtin_ia32_ucomile ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomigt_ss (__m128 __A, __m128 __B) { return __builtin_ia32_ucomigt ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomige_ss (__m128 __A, __m128 __B) { return __builtin_ia32_ucomige ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomineq_ss (__m128 __A, __m128 __B) { return __builtin_ia32_ucomineq ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtss_si32 (__m128 __A) { return __builtin_ia32_cvtss2si ((__v4sf) __A); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvt_ss2si (__m128 __A) { return _mm_cvtss_si32 (__A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtss_si64 (__m128 __A) { return __builtin_ia32_cvtss2si64 ((__v4sf) __A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtss_si64x (__m128 __A) { return __builtin_ia32_cvtss2si64 ((__v4sf) __A); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtps_pi32 (__m128 __A) { return (__m64) __builtin_ia32_cvtps2pi ((__v4sf) __A); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvt_ps2pi (__m128 __A) { return _mm_cvtps_pi32 (__A); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttss_si32 (__m128 __A) { return __builtin_ia32_cvttss2si ((__v4sf) __A); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtt_ss2si (__m128 __A) { return _mm_cvttss_si32 (__A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttss_si64 (__m128 __A) { return __builtin_ia32_cvttss2si64 ((__v4sf) __A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttss_si64x (__m128 __A) { return __builtin_ia32_cvttss2si64 ((__v4sf) __A); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttps_pi32 (__m128 __A) { return (__m64) __builtin_ia32_cvttps2pi ((__v4sf) __A); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtt_ps2pi (__m128 __A) { return _mm_cvttps_pi32 (__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi32_ss (__m128 __A, int __B) { return (__m128) __builtin_ia32_cvtsi2ss ((__v4sf) __A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvt_si2ss (__m128 __A, int __B) { return _mm_cvtsi32_ss (__A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64_ss (__m128 __A, long long __B) { return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64x_ss (__m128 __A, long long __B) { return (__m128) __builtin_ia32_cvtsi642ss ((__v4sf) __A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpi32_ps (__m128 __A, __m64 __B) { return (__m128) __builtin_ia32_cvtpi2ps ((__v4sf) __A, (__v2si)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvt_pi2ps (__m128 __A, __m64 __B) { return _mm_cvtpi32_ps (__A, __B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpi16_ps (__m64 __A) { __v4hi __sign; __v2si __hisi, __losi; __v4sf __zero, __ra, __rb; __sign = __builtin_ia32_pcmpgtw ((__v4hi)0LL, (__v4hi)__A); __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, __sign); __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, __sign); __zero = (__v4sf) _mm_setzero_ps (); __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); return (__m128) __builtin_ia32_movlhps (__ra, __rb); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpu16_ps (__m64 __A) { __v2si __hisi, __losi; __v4sf __zero, __ra, __rb; __losi = (__v2si) __builtin_ia32_punpcklwd ((__v4hi)__A, (__v4hi)0LL); __hisi = (__v2si) __builtin_ia32_punpckhwd ((__v4hi)__A, (__v4hi)0LL); __zero = (__v4sf) _mm_setzero_ps (); __ra = __builtin_ia32_cvtpi2ps (__zero, __losi); __rb = __builtin_ia32_cvtpi2ps (__ra, __hisi); return (__m128) __builtin_ia32_movlhps (__ra, __rb); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpi8_ps (__m64 __A) { __v8qi __sign; __sign = __builtin_ia32_pcmpgtb ((__v8qi)0LL, (__v8qi)__A); __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, __sign); return _mm_cvtpi16_ps(__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpu8_ps(__m64 __A) { __A = (__m64) __builtin_ia32_punpcklbw ((__v8qi)__A, (__v8qi)0LL); return _mm_cvtpu16_ps(__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpi32x2_ps(__m64 __A, __m64 __B) { __v4sf __zero = (__v4sf) _mm_setzero_ps (); __v4sf __sfa = __builtin_ia32_cvtpi2ps (__zero, (__v2si)__A); __v4sf __sfb = __builtin_ia32_cvtpi2ps (__sfa, (__v2si)__B); return (__m128) __builtin_ia32_movlhps (__sfa, __sfb); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtps_pi16(__m128 __A) { __v4sf __hisf = (__v4sf)__A; __v4sf __losf = __builtin_ia32_movhlps (__hisf, __hisf); __v2si __hisi = __builtin_ia32_cvtps2pi (__hisf); __v2si __losi = __builtin_ia32_cvtps2pi (__losf); return (__m64) __builtin_ia32_packssdw (__hisi, __losi); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtps_pi8(__m128 __A) { __v4hi __tmp = (__v4hi) _mm_cvtps_pi16 (__A); return (__m64) __builtin_ia32_packsswb (__tmp, (__v4hi)0LL); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_shuffle_ps (__m128 __A, __m128 __B, int const __mask) { return (__m128) __builtin_ia32_shufps ((__v4sf)__A, (__v4sf)__B, __mask); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_unpckhps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_unpcklps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadh_pi (__m128 __A, __m64 const *__P) { return (__m128) __builtin_ia32_loadhps ((__v4sf)__A, (const __v2sf *)__P); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storeh_pi (__m64 *__P, __m128 __A) { __builtin_ia32_storehps ((__v2sf *)__P, (__v4sf)__A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movehl_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_movhlps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movelh_ps (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_movlhps ((__v4sf)__A, (__v4sf)__B); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadl_pi (__m128 __A, __m64 const *__P) { return (__m128) __builtin_ia32_loadlps ((__v4sf)__A, (const __v2sf *)__P); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storel_pi (__m64 *__P, __m128 __A) { __builtin_ia32_storelps ((__v2sf *)__P, (__v4sf)__A); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movemask_ps (__m128 __A) { return __builtin_ia32_movmskps ((__v4sf)__A); } extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_getcsr (void) { return __builtin_ia32_stmxcsr (); } extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_GET_EXCEPTION_STATE (void) { return _mm_getcsr() & 0x003f; } extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_GET_EXCEPTION_MASK (void) { return _mm_getcsr() & 0x1f80; } extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_GET_ROUNDING_MODE (void) { return _mm_getcsr() & 0x6000; } extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_GET_FLUSH_ZERO_MODE (void) { return _mm_getcsr() & 0x8000; } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setcsr (unsigned int __I) { __builtin_ia32_ldmxcsr (__I); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_SET_EXCEPTION_STATE(unsigned int __mask) { _mm_setcsr((_mm_getcsr() & ~0x003f) | __mask); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_SET_EXCEPTION_MASK (unsigned int __mask) { _mm_setcsr((_mm_getcsr() & ~0x1f80) | __mask); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_SET_ROUNDING_MODE (unsigned int __mode) { _mm_setcsr((_mm_getcsr() & ~0x6000) | __mode); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _MM_SET_FLUSH_ZERO_MODE (unsigned int __mode) { _mm_setcsr((_mm_getcsr() & ~0x8000) | __mode); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_ss (float __F) { return __extension__ (__m128)(__v4sf){ __F, 0.0f, 0.0f, 0.0f }; } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_ps (float __F) { return __extension__ (__m128)(__v4sf){ __F, __F, __F, __F }; } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_ps1 (float __F) { return _mm_set1_ps (__F); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_ss (float const *__P) { return _mm_set_ss (*__P); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load1_ps (float const *__P) { return _mm_set1_ps (*__P); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_ps1 (float const *__P) { return _mm_load1_ps (__P); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_ps (float const *__P) { return (__m128) *(__v4sf *)__P; } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadu_ps (float const *__P) { return (__m128) __builtin_ia32_loadups (__P); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadr_ps (float const *__P) { __v4sf __tmp = *(__v4sf *)__P; return (__m128) __builtin_ia32_shufps (__tmp, __tmp, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_ps (const float __Z, const float __Y, const float __X, const float __W) { return __extension__ (__m128)(__v4sf){ __W, __X, __Y, __Z }; } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_ps (float __Z, float __Y, float __X, float __W) { return __extension__ (__m128)(__v4sf){ __Z, __Y, __X, __W }; } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_ss (float *__P, __m128 __A) { *__P = __builtin_ia32_vec_ext_v4sf ((__v4sf)__A, 0); } extern __inline float __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtss_f32 (__m128 __A) { return __builtin_ia32_vec_ext_v4sf ((__v4sf)__A, 0); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_ps (float *__P, __m128 __A) { *(__v4sf *)__P = (__v4sf)__A; } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storeu_ps (float *__P, __m128 __A) { __builtin_ia32_storeups (__P, (__v4sf)__A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store1_ps (float *__P, __m128 __A) { __v4sf __va = (__v4sf)__A; __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((0) << 4) | ((0) << 2) | (0))); _mm_storeu_ps (__P, __tmp); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_ps1 (float *__P, __m128 __A) { _mm_store1_ps (__P, __A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storer_ps (float *__P, __m128 __A) { __v4sf __va = (__v4sf)__A; __v4sf __tmp = __builtin_ia32_shufps (__va, __va, (((0) << 6) | ((1) << 4) | ((2) << 2) | (3))); _mm_store_ps (__P, __tmp); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_move_ss (__m128 __A, __m128 __B) { return (__m128) __builtin_ia32_movss ((__v4sf)__A, (__v4sf)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_extract_pi16 (__m64 const __A, int const __N) { return __builtin_ia32_vec_ext_v4hi ((__v4hi)__A, __N); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pextrw (__m64 const __A, int const __N) { return _mm_extract_pi16 (__A, __N); } # 1012 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 3 4 extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_insert_pi16 (__m64 const __A, int const __D, int const __N) { return (__m64) __builtin_ia32_vec_set_v4hi ((__v4hi)__A, __D, __N); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pinsrw (__m64 const __A, int const __D, int const __N) { return _mm_insert_pi16 (__A, __D, __N); } # 1032 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 3 4 extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_pi16 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_pmaxsw ((__v4hi)__A, (__v4hi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pmaxsw (__m64 __A, __m64 __B) { return _mm_max_pi16 (__A, __B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_pu8 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_pmaxub ((__v8qi)__A, (__v8qi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pmaxub (__m64 __A, __m64 __B) { return _mm_max_pu8 (__A, __B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_pi16 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_pminsw ((__v4hi)__A, (__v4hi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pminsw (__m64 __A, __m64 __B) { return _mm_min_pi16 (__A, __B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_pu8 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_pminub ((__v8qi)__A, (__v8qi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pminub (__m64 __A, __m64 __B) { return _mm_min_pu8 (__A, __B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movemask_pi8 (__m64 __A) { return __builtin_ia32_pmovmskb ((__v8qi)__A); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pmovmskb (__m64 __A) { return _mm_movemask_pi8 (__A); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mulhi_pu16 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_pmulhuw ((__v4hi)__A, (__v4hi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pmulhuw (__m64 __A, __m64 __B) { return _mm_mulhi_pu16 (__A, __B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_shuffle_pi16 (__m64 __A, int const __N) { return (__m64) __builtin_ia32_pshufw ((__v4hi)__A, __N); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pshufw (__m64 __A, int const __N) { return _mm_shuffle_pi16 (__A, __N); } # 1134 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 3 4 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_maskmove_si64 (__m64 __A, __m64 __N, char *__P) { __builtin_ia32_maskmovq ((__v8qi)__A, (__v8qi)__N, __P); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_maskmovq (__m64 __A, __m64 __N, char *__P) { _mm_maskmove_si64 (__A, __N, __P); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_avg_pu8 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_pavgb ((__v8qi)__A, (__v8qi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pavgb (__m64 __A, __m64 __B) { return _mm_avg_pu8 (__A, __B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_avg_pu16 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_pavgw ((__v4hi)__A, (__v4hi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_pavgw (__m64 __A, __m64 __B) { return _mm_avg_pu16 (__A, __B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sad_pu8 (__m64 __A, __m64 __B) { return (__m64) __builtin_ia32_psadbw ((__v8qi)__A, (__v8qi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _m_psadbw (__m64 __A, __m64 __B) { return _mm_sad_pu8 (__A, __B); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_prefetch (const void *__P, enum _mm_hint __I) { __builtin_prefetch (__P, 0, __I); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_stream_pi (__m64 *__P, __m64 __A) { __builtin_ia32_movntq ((unsigned long long *)__P, (unsigned long long)__A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_stream_ps (float *__P, __m128 __A) { __builtin_ia32_movntps (__P, (__v4sf)__A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sfence (void) { __builtin_ia32_sfence (); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_pause (void) { __asm__ __volatile__ ("rep; nop" : : ); } # 1247 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/emmintrin.h" 1 3 4 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/emmintrin.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 1 3 4 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/emmintrin.h" 2 3 4 typedef double __v2df __attribute__ ((__vector_size__ (16))); typedef long long __v2di __attribute__ ((__vector_size__ (16))); typedef int __v4si __attribute__ ((__vector_size__ (16))); typedef short __v8hi __attribute__ ((__vector_size__ (16))); typedef char __v16qi __attribute__ ((__vector_size__ (16))); typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); typedef double __m128d __attribute__ ((__vector_size__ (16), __may_alias__)); extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_sd (double __F) { return __extension__ (__m128d){ __F, 0.0 }; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_pd (double __F) { return __extension__ (__m128d){ __F, __F }; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_pd1 (double __F) { return _mm_set1_pd (__F); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_pd (double __W, double __X) { return __extension__ (__m128d){ __X, __W }; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_pd (double __W, double __X) { return __extension__ (__m128d){ __W, __X }; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setzero_pd (void) { return __extension__ (__m128d){ 0.0, 0.0 }; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_move_sd (__m128d __A, __m128d __B) { return (__m128d) __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_pd (double const *__P) { return *(__m128d *)__P; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadu_pd (double const *__P) { return __builtin_ia32_loadupd (__P); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load1_pd (double const *__P) { return _mm_set1_pd (*__P); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_sd (double const *__P) { return _mm_set_sd (*__P); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_pd1 (double const *__P) { return _mm_load1_pd (__P); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadr_pd (double const *__P) { __m128d __tmp = _mm_load_pd (__P); return __builtin_ia32_shufpd (__tmp, __tmp, (((0) << 1) | (1))); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_pd (double *__P, __m128d __A) { *(__m128d *)__P = __A; } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storeu_pd (double *__P, __m128d __A) { __builtin_ia32_storeupd (__P, __A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_sd (double *__P, __m128d __A) { *__P = __builtin_ia32_vec_ext_v2df (__A, 0); } extern __inline double __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsd_f64 (__m128d __A) { return __builtin_ia32_vec_ext_v2df (__A, 0); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storel_pd (double *__P, __m128d __A) { _mm_store_sd (__P, __A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storeh_pd (double *__P, __m128d __A) { *__P = __builtin_ia32_vec_ext_v2df (__A, 1); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store1_pd (double *__P, __m128d __A) { _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (0)))); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_pd1 (double *__P, __m128d __A) { _mm_store1_pd (__P, __A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storer_pd (double *__P, __m128d __A) { _mm_store_pd (__P, __builtin_ia32_shufpd (__A, __A, (((0) << 1) | (1)))); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi128_si32 (__m128i __A) { return __builtin_ia32_vec_ext_v4si ((__v4si)__A, 0); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi128_si64 (__m128i __A) { return __builtin_ia32_vec_ext_v2di ((__v2di)__A, 0); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi128_si64x (__m128i __A) { return __builtin_ia32_vec_ext_v2di ((__v2di)__A, 0); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_addpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_addsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_subpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_subsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mul_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_mulpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mul_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_mulsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_div_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_divpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_div_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_divsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sqrt_pd (__m128d __A) { return (__m128d)__builtin_ia32_sqrtpd ((__v2df)__A); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sqrt_sd (__m128d __A, __m128d __B) { __v2df __tmp = __builtin_ia32_movsd ((__v2df)__A, (__v2df)__B); return (__m128d)__builtin_ia32_sqrtsd ((__v2df)__tmp); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_minpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_minsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_maxpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_maxsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_and_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_andpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_andnot_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_andnpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_or_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_orpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_xor_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_xorpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpeqpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmplt_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpltpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmple_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmplepd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpgtpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpge_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpgepd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpneq_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpneqpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnlt_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpnltpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnle_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpnlepd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpngt_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpngtpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnge_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpngepd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpord_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpordpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpunord_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpunordpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpeqsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmplt_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpltsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmple_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmplesd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_sd (__m128d __A, __m128d __B) { return (__m128d) __builtin_ia32_movsd ((__v2df) __A, (__v2df) __builtin_ia32_cmpltsd ((__v2df) __B, (__v2df) __A)); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpge_sd (__m128d __A, __m128d __B) { return (__m128d) __builtin_ia32_movsd ((__v2df) __A, (__v2df) __builtin_ia32_cmplesd ((__v2df) __B, (__v2df) __A)); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpneq_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpneqsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnlt_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpnltsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnle_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpnlesd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpngt_sd (__m128d __A, __m128d __B) { return (__m128d) __builtin_ia32_movsd ((__v2df) __A, (__v2df) __builtin_ia32_cmpnltsd ((__v2df) __B, (__v2df) __A)); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpnge_sd (__m128d __A, __m128d __B) { return (__m128d) __builtin_ia32_movsd ((__v2df) __A, (__v2df) __builtin_ia32_cmpnlesd ((__v2df) __B, (__v2df) __A)); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpord_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpordsd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpunord_sd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_cmpunordsd ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comieq_sd (__m128d __A, __m128d __B) { return __builtin_ia32_comisdeq ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comilt_sd (__m128d __A, __m128d __B) { return __builtin_ia32_comisdlt ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comile_sd (__m128d __A, __m128d __B) { return __builtin_ia32_comisdle ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comigt_sd (__m128d __A, __m128d __B) { return __builtin_ia32_comisdgt ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comige_sd (__m128d __A, __m128d __B) { return __builtin_ia32_comisdge ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_comineq_sd (__m128d __A, __m128d __B) { return __builtin_ia32_comisdneq ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomieq_sd (__m128d __A, __m128d __B) { return __builtin_ia32_ucomisdeq ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomilt_sd (__m128d __A, __m128d __B) { return __builtin_ia32_ucomisdlt ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomile_sd (__m128d __A, __m128d __B) { return __builtin_ia32_ucomisdle ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomigt_sd (__m128d __A, __m128d __B) { return __builtin_ia32_ucomisdgt ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomige_sd (__m128d __A, __m128d __B) { return __builtin_ia32_ucomisdge ((__v2df)__A, (__v2df)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_ucomineq_sd (__m128d __A, __m128d __B) { return __builtin_ia32_ucomisdneq ((__v2df)__A, (__v2df)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_epi64x (long long __q1, long long __q0) { return __extension__ (__m128i)(__v2di){ __q0, __q1 }; } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_epi64 (__m64 __q1, __m64 __q0) { return _mm_set_epi64x ((long long)__q1, (long long)__q0); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_epi32 (int __q3, int __q2, int __q1, int __q0) { return __extension__ (__m128i)(__v4si){ __q0, __q1, __q2, __q3 }; } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_epi16 (short __q7, short __q6, short __q5, short __q4, short __q3, short __q2, short __q1, short __q0) { return __extension__ (__m128i)(__v8hi){ __q0, __q1, __q2, __q3, __q4, __q5, __q6, __q7 }; } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set_epi8 (char __q15, char __q14, char __q13, char __q12, char __q11, char __q10, char __q09, char __q08, char __q07, char __q06, char __q05, char __q04, char __q03, char __q02, char __q01, char __q00) { return __extension__ (__m128i)(__v16qi){ __q00, __q01, __q02, __q03, __q04, __q05, __q06, __q07, __q08, __q09, __q10, __q11, __q12, __q13, __q14, __q15 }; } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_epi64x (long long __A) { return _mm_set_epi64x (__A, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_epi64 (__m64 __A) { return _mm_set_epi64 (__A, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_epi32 (int __A) { return _mm_set_epi32 (__A, __A, __A, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_epi16 (short __A) { return _mm_set_epi16 (__A, __A, __A, __A, __A, __A, __A, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_set1_epi8 (char __A) { return _mm_set_epi8 (__A, __A, __A, __A, __A, __A, __A, __A, __A, __A, __A, __A, __A, __A, __A, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_epi64 (__m64 __q0, __m64 __q1) { return _mm_set_epi64 (__q1, __q0); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_epi32 (int __q0, int __q1, int __q2, int __q3) { return _mm_set_epi32 (__q3, __q2, __q1, __q0); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_epi16 (short __q0, short __q1, short __q2, short __q3, short __q4, short __q5, short __q6, short __q7) { return _mm_set_epi16 (__q7, __q6, __q5, __q4, __q3, __q2, __q1, __q0); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setr_epi8 (char __q00, char __q01, char __q02, char __q03, char __q04, char __q05, char __q06, char __q07, char __q08, char __q09, char __q10, char __q11, char __q12, char __q13, char __q14, char __q15) { return _mm_set_epi8 (__q15, __q14, __q13, __q12, __q11, __q10, __q09, __q08, __q07, __q06, __q05, __q04, __q03, __q02, __q01, __q00); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_si128 (__m128i const *__P) { return *__P; } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadu_si128 (__m128i const *__P) { return (__m128i) __builtin_ia32_loaddqu ((char const *)__P); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadl_epi64 (__m128i const *__P) { return _mm_set_epi64 ((__m64)0LL, *(__m64 *)__P); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_store_si128 (__m128i *__P, __m128i __B) { *__P = __B; } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storeu_si128 (__m128i *__P, __m128i __B) { __builtin_ia32_storedqu ((char *)__P, (__v16qi)__B); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_storel_epi64 (__m128i *__P, __m128i __B) { *(long long *)__P = __builtin_ia32_vec_ext_v2di ((__v2di)__B, 0); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movepi64_pi64 (__m128i __B) { return (__m64) __builtin_ia32_vec_ext_v2di ((__v2di)__B, 0); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movpi64_epi64 (__m64 __A) { return _mm_set_epi64 ((__m64)0LL, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_move_epi64 (__m128i __A) { return (__m128i)__builtin_ia32_movq128 ((__v2di) __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_setzero_si128 (void) { return __extension__ (__m128i)(__v4si){ 0, 0, 0, 0 }; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtepi32_pd (__m128i __A) { return (__m128d)__builtin_ia32_cvtdq2pd ((__v4si) __A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtepi32_ps (__m128i __A) { return (__m128)__builtin_ia32_cvtdq2ps ((__v4si) __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpd_epi32 (__m128d __A) { return (__m128i)__builtin_ia32_cvtpd2dq ((__v2df) __A); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpd_pi32 (__m128d __A) { return (__m64)__builtin_ia32_cvtpd2pi ((__v2df) __A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpd_ps (__m128d __A) { return (__m128)__builtin_ia32_cvtpd2ps ((__v2df) __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttpd_epi32 (__m128d __A) { return (__m128i)__builtin_ia32_cvttpd2dq ((__v2df) __A); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttpd_pi32 (__m128d __A) { return (__m64)__builtin_ia32_cvttpd2pi ((__v2df) __A); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtpi32_pd (__m64 __A) { return (__m128d)__builtin_ia32_cvtpi2pd ((__v2si) __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtps_epi32 (__m128 __A) { return (__m128i)__builtin_ia32_cvtps2dq ((__v4sf) __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttps_epi32 (__m128 __A) { return (__m128i)__builtin_ia32_cvttps2dq ((__v4sf) __A); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtps_pd (__m128 __A) { return (__m128d)__builtin_ia32_cvtps2pd ((__v4sf) __A); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsd_si32 (__m128d __A) { return __builtin_ia32_cvtsd2si ((__v2df) __A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsd_si64 (__m128d __A) { return __builtin_ia32_cvtsd2si64 ((__v2df) __A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsd_si64x (__m128d __A) { return __builtin_ia32_cvtsd2si64 ((__v2df) __A); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttsd_si32 (__m128d __A) { return __builtin_ia32_cvttsd2si ((__v2df) __A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttsd_si64 (__m128d __A) { return __builtin_ia32_cvttsd2si64 ((__v2df) __A); } extern __inline long long __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvttsd_si64x (__m128d __A) { return __builtin_ia32_cvttsd2si64 ((__v2df) __A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsd_ss (__m128 __A, __m128d __B) { return (__m128)__builtin_ia32_cvtsd2ss ((__v4sf) __A, (__v2df) __B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi32_sd (__m128d __A, int __B) { return (__m128d)__builtin_ia32_cvtsi2sd ((__v2df) __A, __B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64_sd (__m128d __A, long long __B) { return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64x_sd (__m128d __A, long long __B) { return (__m128d)__builtin_ia32_cvtsi642sd ((__v2df) __A, __B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtss_sd (__m128d __A, __m128 __B) { return (__m128d)__builtin_ia32_cvtss2sd ((__v2df) __A, (__v4sf)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_shuffle_pd(__m128d __A, __m128d __B, const int __mask) { return (__m128d)__builtin_ia32_shufpd ((__v2df)__A, (__v2df)__B, __mask); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_unpckhpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_pd (__m128d __A, __m128d __B) { return (__m128d)__builtin_ia32_unpcklpd ((__v2df)__A, (__v2df)__B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadh_pd (__m128d __A, double const *__B) { return (__m128d)__builtin_ia32_loadhpd ((__v2df)__A, __B); } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_loadl_pd (__m128d __A, double const *__B) { return (__m128d)__builtin_ia32_loadlpd ((__v2df)__A, __B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movemask_pd (__m128d __A) { return __builtin_ia32_movmskpd ((__v2df)__A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_packs_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_packsswb128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_packs_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_packssdw128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_packus_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_packuswb128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpckhbw128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpckhwd128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpckhdq128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpackhi_epi64 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpckhqdq128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpcklbw128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpcklwd128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpckldq128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_unpacklo_epi64 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_punpcklqdq128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddd128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_add_epi64 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddq128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddsb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddsw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_epu8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddusb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_adds_epu16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_paddusw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubd128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sub_epi64 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubq128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubsb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubsw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_epu8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubusb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_subs_epu16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psubusw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_madd_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pmaddwd128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mulhi_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pmulhw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mullo_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pmullw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mul_su32 (__m64 __A, __m64 __B) { return (__m64)__builtin_ia32_pmuludq ((__v2si)__A, (__v2si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mul_epu32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pmuludq128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_slli_epi16 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_psllwi128 ((__v8hi)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_slli_epi32 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_pslldi128 ((__v4si)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_slli_epi64 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_psllqi128 ((__v2di)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srai_epi16 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_psrawi128 ((__v8hi)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srai_epi32 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_psradi128 ((__v4si)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srli_si128 (__m128i __A, const int __N) { return (__m128i)__builtin_ia32_psrldqi128 (__A, __N * 8); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_slli_si128 (__m128i __A, const int __N) { return (__m128i)__builtin_ia32_pslldqi128 (__A, __N * 8); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srli_epi16 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_psrlwi128 ((__v8hi)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srli_epi32 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_psrldi128 ((__v4si)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srli_epi64 (__m128i __A, int __B) { return (__m128i)__builtin_ia32_psrlqi128 ((__v2di)__A, __B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sll_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psllw128((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sll_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pslld128((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sll_epi64 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psllq128((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sra_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psraw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sra_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psrad128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srl_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psrlw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srl_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psrld128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_srl_epi64 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psrlq128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_and_si128 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pand128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_andnot_si128 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pandn128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_or_si128 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_por128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_xor_si128 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pxor128 ((__v2di)__A, (__v2di)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpeqb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpeqw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpeq_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpeqd128 ((__v4si)__A, (__v4si)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmplt_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__B, (__v16qi)__A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmplt_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__B, (__v8hi)__A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmplt_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__B, (__v4si)__A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_epi8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpgtb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpgtw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cmpgt_epi32 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pcmpgtd128 ((__v4si)__A, (__v4si)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_extract_epi16 (__m128i const __A, int const __N) { return (unsigned short) __builtin_ia32_vec_ext_v8hi ((__v8hi)__A, __N); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_insert_epi16 (__m128i const __A, int const __D, int const __N) { return (__m128i) __builtin_ia32_vec_set_v8hi ((__v8hi)__A, __D, __N); } # 1328 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/emmintrin.h" 3 4 extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pmaxsw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_max_epu8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pmaxub128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_epi16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pminsw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_min_epu8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pminub128 ((__v16qi)__A, (__v16qi)__B); } extern __inline int __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_movemask_epi8 (__m128i __A) { return __builtin_ia32_pmovmskb128 ((__v16qi)__A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mulhi_epu16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pmulhuw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_shufflehi_epi16 (__m128i __A, const int __mask) { return (__m128i)__builtin_ia32_pshufhw ((__v8hi)__A, __mask); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_shufflelo_epi16 (__m128i __A, const int __mask) { return (__m128i)__builtin_ia32_pshuflw ((__v8hi)__A, __mask); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_shuffle_epi32 (__m128i __A, const int __mask) { return (__m128i)__builtin_ia32_pshufd ((__v4si)__A, __mask); } # 1391 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/emmintrin.h" 3 4 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_maskmoveu_si128 (__m128i __A, __m128i __B, char *__C) { __builtin_ia32_maskmovdqu ((__v16qi)__A, (__v16qi)__B, __C); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_avg_epu8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pavgb128 ((__v16qi)__A, (__v16qi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_avg_epu16 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_pavgw128 ((__v8hi)__A, (__v8hi)__B); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_sad_epu8 (__m128i __A, __m128i __B) { return (__m128i)__builtin_ia32_psadbw128 ((__v16qi)__A, (__v16qi)__B); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_stream_si32 (int *__A, int __B) { __builtin_ia32_movnti (__A, __B); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_stream_si128 (__m128i *__A, __m128i __B) { __builtin_ia32_movntdq ((__v2di *)__A, (__v2di)__B); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_stream_pd (double *__A, __m128d __B) { __builtin_ia32_movntpd (__A, (__v2df)__B); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_clflush (void const *__A) { __builtin_ia32_clflush (__A); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_lfence (void) { __builtin_ia32_lfence (); } extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_mfence (void) { __builtin_ia32_mfence (); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi32_si128 (int __A) { return _mm_set_epi32 (0, 0, 0, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64_si128 (long long __A) { return _mm_set_epi64x (0, __A); } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_cvtsi64x_si128 (long long __A) { return _mm_set_epi64x (0, __A); } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_castpd_ps(__m128d __A) { return (__m128) __A; } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_castpd_si128(__m128d __A) { return (__m128i) __A; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_castps_pd(__m128 __A) { return (__m128d) __A; } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_castps_si128(__m128 __A) { return (__m128i) __A; } extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_castsi128_ps(__m128i __A) { return (__m128) __A; } extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_castsi128_pd(__m128i __A) { return (__m128d) __A; } # 1248 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/xmmintrin.h" 2 3 4 # 89 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" 2 # 107 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" namespace CGAL { namespace internal { # 118 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" const double infinity = (__builtin_huge_val()); } inline double IA_force_to_double(double x) { asm("" : "=m"(x) : "m"(x)); return x; } # 301 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" typedef int FPU_CW_t; # 310 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" inline FPU_CW_t FPU_get_cw (void) { FPU_CW_t cw; cw = fegetround(); return cw; } inline void FPU_set_cw (FPU_CW_t cw) { fesetround(cw); } inline FPU_CW_t FPU_get_and_set_cw (FPU_CW_t cw) { FPU_CW_t old = FPU_get_cw(); FPU_set_cw(cw); return old; } template struct Protect_FPU_rounding; template <> struct Protect_FPU_rounding { Protect_FPU_rounding(FPU_CW_t r = FE_UPWARD) : backup( FPU_get_and_set_cw(r) ) {} ~Protect_FPU_rounding() { FPU_set_cw(backup); } private: FPU_CW_t backup; }; template <> struct Protect_FPU_rounding { Protect_FPU_rounding() {} Protect_FPU_rounding(FPU_CW_t ) {} }; template struct Checked_protect_FPU_rounding : Protect_FPU_rounding { Checked_protect_FPU_rounding() { (static_cast(0)); } Checked_protect_FPU_rounding(FPU_CW_t r) : Protect_FPU_rounding(r) { (static_cast(0)); } }; # 392 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/FPU.h" struct Set_ieee_double_precision { Set_ieee_double_precision() {} }; inline void force_ieee_double_precision() { } } # 78 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/float.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/float.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/float.h" 2 namespace CGAL { # 74 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/float.h" template<> class Is_valid< float > : public std::unary_function< float, bool > { public : bool operator()( const float& x ) const { return (x == x); } }; template <> class Algebraic_structure_traits< float > : public Algebraic_structure_traits_base< float, Field_with_kth_root_tag > { public: typedef Tag_false Is_exact; typedef Tag_true Is_numerical_sensitive; class Sqrt : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return std::sqrt( x ); } }; class Kth_root : public std::binary_function { public: Type operator()( int k, const Type& x) const { (CGAL::possibly(k > 0)?(static_cast(0)): ::CGAL::precondition_fail( "k > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/float.h", 104, "'k' must be positive for k-th roots")); return (Type) std::pow(double(x), 1.0 / double(k)); }; }; }; template <> class Real_embeddable_traits< float > : public INTERN_RET::Real_embeddable_traits_base< float , CGAL::Tag_true> { public: class Is_finite : public std::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { return (x == x) && (is_valid(x-x)); } }; }; } # 80 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h" 2 # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h" namespace CGAL { # 84 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h" template<> class Is_valid< double > : public std::unary_function< double, bool > { public : bool operator()( const double& x ) const { return (x == x); } }; template <> class Algebraic_structure_traits< double > : public Algebraic_structure_traits_base< double, Field_with_kth_root_tag > { public: typedef Tag_false Is_exact; typedef Tag_true Is_numerical_sensitive; class Sqrt : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return std::sqrt( x ); } }; class Kth_root : public std::binary_function { public: Type operator()( int k, const Type& x) const { (CGAL::possibly(k > 0)?(static_cast(0)): ::CGAL::precondition_fail( "k > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h", 119, "'k' must be positive for k-th roots")); return std::pow(x, 1.0 / double(k)); } }; }; # 145 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h" template <> class Real_embeddable_traits< double > : public INTERN_RET::Real_embeddable_traits_base< double , CGAL::Tag_true> { public: class Abs : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return std::fabs( x ); } }; class Is_finite : public std::unary_function< Type, bool > { public : bool operator()( const Type& x ) const { return (x != std::numeric_limits::infinity()) && (-x != std::numeric_limits::infinity()) && is_valid(x); } }; }; inline double nextafter(double d1, double d2) { return ::nextafter(d1,d2); } inline bool is_integer(double d) { return CGAL::is_finite(d) && (std::ceil(d) == d); } inline std::pair split_numerator_denominator(double d) { double num = d; double den = 1.0; while (std::ceil(num) != num) { num *= 2.0; den *= 2.0; } (CGAL::possibly(d == num/den)?(static_cast(0)): ::CGAL::postcondition_fail( "d == num/den" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/double.h", 216)); return std::make_pair(num, den); } } # 81 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_traits.h" 1 # 56 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_traits.h" namespace CGAL { namespace internal{ template class Interval_traits_base{ public: typedef Interval_traits_base Self; typedef T Type; typedef CGAL::Tag_false Is_interval; typedef CGAL::Tag_false With_empty_interval; typedef CGAL::Null_functor Lower; typedef CGAL::Null_functor Upper; typedef CGAL::Null_functor Width; typedef CGAL::Null_functor Median; typedef CGAL::Null_functor Norm; typedef CGAL::Null_functor Empty; typedef CGAL::Null_functor Singleton; typedef CGAL::Null_functor In; typedef CGAL::Null_functor Zero_in; typedef CGAL::Null_functor Equal; typedef CGAL::Null_functor Overlap; typedef CGAL::Null_functor Subset; typedef CGAL::Null_functor Proper_Subset; typedef CGAL::Null_functor Intersection; typedef CGAL::Null_functor Hull; }; } template class Interval_traits : public internal::Interval_traits_base{}; class Exception_intersection_is_empty{}; template inline typename Interval_traits::Bound lower(const Interval& interval) { typename Interval_traits::Lower lower; return lower(interval); } template inline typename Interval_traits::Bound upper(const Interval& interval) { typename Interval_traits::Upper upper; return upper(interval); } template inline typename Interval_traits::Bound width(Interval interval) { typename Interval_traits::Width width; return width(interval); } template inline typename Interval_traits::Bound median(Interval interval) { typename Interval_traits::Median median; return median(interval); } template inline typename Interval_traits::Bound norm(Interval interval) { typename Interval_traits::Norm norm; return norm(interval); } template inline typename Interval_traits::Empty::result_type empty(Interval interval) { typename Interval_traits::Empty empty; return empty(interval); } template inline typename Interval_traits::Singleton::result_type singleton(Interval interval) { typename Interval_traits::Singleton singleton; return singleton(interval); } template inline typename Interval_traits::In::result_type in(typename Interval_traits::Bound x, Interval interval) { typename Interval_traits::In in; return in(x,interval); } template inline typename Interval_traits::Zero_in::result_type zero_in(Interval interval) { typename Interval_traits::Zero_in zero_in; return zero_in(interval); } template inline typename Interval_traits::Zero_in::result_type in_zero(Interval interval) { typename Interval_traits::Zero_in zero_in; return zero_in(interval); } template inline typename Interval_traits::Equal::result_type equal(Interval interval1,Interval interval2) { typename Interval_traits::Equal equal; return equal(interval1,interval2); } template inline typename Interval_traits::Overlap::result_type overlap(Interval interval1, Interval interval2) { typename Interval_traits::Overlap overlap; return overlap(interval1, interval2); } template inline typename Interval_traits::Subset::result_type subset(Interval interval1, Interval interval2) { typename Interval_traits::Subset subset; return subset(interval1, interval2); } template inline typename Interval_traits::Proper_subset::result_type proper_subset(Interval interval1, Interval interval2) { typename Interval_traits::Proper_subset proper_subset; return proper_subset(interval1, interval2); } template inline typename Interval_traits::Intersection::result_type intersection(Interval interval1, Interval interval2) { typename Interval_traits::Intersection intersection; return intersection(interval1, interval2); } template inline typename Interval_traits::Hull::result_type hull(Interval interval1, Interval interval2) { typename Interval_traits::Hull hull; return hull(interval1, interval2); } } # 46 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" 2 namespace CGAL { template class Interval_nt { typedef Interval_nt IA; typedef std::pair Pair; public: typedef double value_type; typedef Uncertain_conversion_exception unsafe_comparison; typedef Checked_protect_FPU_rounding Internal_protector; typedef Protect_FPU_rounding Protector; Interval_nt() : _inf(1), _sup(0) {} Interval_nt(int i) : _inf(i), _sup(i) {} Interval_nt(double d) : _inf(d), _sup(d) { (CGAL::possibly(is_finite(d))?(static_cast(0)): ::CGAL::assertion_fail( "is_finite(d)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h", 75)); } # 84 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" Interval_nt(double i, double s) : _inf(i), _sup(s) { (CGAL::possibly(!(i>s))?(static_cast(0)): ::CGAL::assertion_fail( "!(i>s)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" # 89 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" , 90 # 89 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" , " Variable used before being initialized (or CGAL bug)")) ; (void) tester; } Interval_nt(const Pair & p) : _inf(p.first), _sup(p.second) {} IA operator-() const { return IA (-sup(), -inf()); } IA & operator+= (const IA &d) { return *this = *this + d; } IA & operator-= (const IA &d) { return *this = *this - d; } IA & operator*= (const IA &d) { return *this = *this * d; } IA & operator/= (const IA &d) { return *this = *this / d; } bool is_point() const { return sup() == inf(); } bool is_same (const IA & d) const { return inf() == d.inf() && sup() == d.sup(); } bool do_overlap (const IA & d) const { return !(d.inf() > sup() || d.sup() < inf()); } const double & inf() const { return _inf; } const double & sup() const { return _sup; } std::pair pair() const { return std::pair(inf(), sup()); } static IA largest() { return IA(-internal::infinity, internal::infinity); } static IA smallest() { return IA(-std::numeric_limits::denorm_min(), std::numeric_limits::denorm_min()); } # 147 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" private: double _inf, _sup; struct Test_runtime_rounding_modes { Test_runtime_rounding_modes() { typename Interval_nt<>::Internal_protector P; (CGAL::possibly(-((-1.1)*CGAL::IA_force_to_double(10.1)) != ((1.1)*CGAL::IA_force_to_double(10.1)))?(static_cast(0)): ::CGAL::assertion_fail( "-CGAL_IA_MUL(-1.1, 10.1) != CGAL_IA_MUL(1.1, 10.1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" # 159 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" , 160 # 159 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" , "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?")) ; (CGAL::possibly(-((-1.)/CGAL::IA_force_to_double(10)) != ((1.)/CGAL::IA_force_to_double(10)))?(static_cast(0)): ::CGAL::assertion_fail( "-CGAL_IA_DIV(-1., 10) != CGAL_IA_DIV(1., 10)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" # 161 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" , 162 # 161 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" , "Wrong rounding: did you forget the -frounding-math option if you use GCC (or -fp-model strict for Intel)?")) ; } }; static Test_runtime_rounding_modes tester; }; template typename Interval_nt::Test_runtime_rounding_modes Interval_nt::tester; template inline Uncertain operator<(const Interval_nt &a, const Interval_nt &b) { if (a.sup() < b.inf()) return true; if (a.inf() >= b.sup()) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>(const Interval_nt &a, const Interval_nt &b) { return b < a; } template inline Uncertain operator<=(const Interval_nt &a, const Interval_nt &b) { if (a.sup() <= b.inf()) return true; if (a.inf() > b.sup()) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>=(const Interval_nt &a, const Interval_nt &b) { return b <= a; } template inline Uncertain operator==(const Interval_nt &a, const Interval_nt &b) { if (b.inf() > a.sup() || b.sup() < a.inf()) return false; if (b.inf() == a.sup() && b.sup() == a.inf()) return true; return Uncertain::indeterminate(); } template inline Uncertain operator!=(const Interval_nt &a, const Interval_nt &b) { return ! (a == b); } template inline Uncertain operator<(int a, const Interval_nt &b) { if (a < b.inf()) return true; if (a >= b.sup()) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>(int a, const Interval_nt &b) { return b < a; } template inline Uncertain operator<=(int a, const Interval_nt &b) { if (a <= b.inf()) return true; if (a > b.sup()) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>=(int a, const Interval_nt &b) { return b <= a; } template inline Uncertain operator==(int a, const Interval_nt &b) { if (b.inf() > a || b.sup() < a) return false; if (b.inf() == a && b.sup() == a) return true; return Uncertain::indeterminate(); } template inline Uncertain operator!=(int a, const Interval_nt &b) { return ! (a == b); } template inline Uncertain operator<(const Interval_nt &a, int b) { if (a.sup() < b) return true; if (a.inf() >= b) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>(const Interval_nt &a, int b) { return b < a; } template inline Uncertain operator<=(const Interval_nt &a, int b) { if (a.sup() <= b) return true; if (a.inf() > b) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>=(const Interval_nt &a, int b) { return b <= a; } template inline Uncertain operator==(const Interval_nt &a, int b) { if (b > a.sup() || b < a.inf()) return false; if (b == a.sup() && b == a.inf()) return true; return Uncertain::indeterminate(); } template inline Uncertain operator!=(const Interval_nt &a, int b) { return ! (a == b); } template inline Uncertain operator<(double a, const Interval_nt &b) { if (a < b.inf()) return true; if (a >= b.sup()) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>(double a, const Interval_nt &b) { return b < a; } template inline Uncertain operator<=(double a, const Interval_nt &b) { if (a <= b.inf()) return true; if (a > b.sup()) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>=(double a, const Interval_nt &b) { return b <= a; } template inline Uncertain operator==(double a, const Interval_nt &b) { if (b.inf() > a || b.sup() < a) return false; if (b.inf() == a && b.sup() == a) return true; return Uncertain::indeterminate(); } template inline Uncertain operator!=(double a, const Interval_nt &b) { return ! (a == b); } template inline Uncertain operator<(const Interval_nt &a, double b) { if (a.sup() < b) return true; if (a.inf() >= b) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>(const Interval_nt &a, double b) { return b < a; } template inline Uncertain operator<=(const Interval_nt &a, double b) { if (a.sup() <= b) return true; if (a.inf() > b) return false; return Uncertain::indeterminate(); } template inline Uncertain operator>=(const Interval_nt &a, double b) { return b <= a; } template inline Uncertain operator==(const Interval_nt &a, double b) { if (b > a.sup() || b < a.inf()) return false; if (b == a.sup() && b == a.inf()) return true; return Uncertain::indeterminate(); } template inline Uncertain operator!=(const Interval_nt &a, double b) { return ! (a == b); } template inline bool fit_in_double (const Interval_nt & d, double &r) { bool b = d.is_point(); if (b) r = d.inf(); return b; } template inline bool is_singleton (const Interval_nt & d) { return d.is_point(); } template inline double magnitude (const Interval_nt & d) { return (std::max)(CGAL::abs(d.inf()), CGAL::abs(d.sup())); } template inline double width (const Interval_nt & d) { return d.sup() - d.inf(); } template inline double radius (const Interval_nt & d) { return width(d)/2; } template inline bool has_smaller_relative_precision(const Interval_nt & d, double prec) { return magnitude(d) == 0 || radius(d) < prec * magnitude(d); } template double relative_precision(const Interval_nt & d) { if (magnitude(d) == 0.0) return 0.0; return radius(d) / magnitude(d); } template< bool Protected > class Is_valid< Interval_nt > : public std::unary_function< Interval_nt, bool > { public : bool operator()( const Interval_nt& x ) const { return is_valid(x.inf()) && is_valid(x.sup()) && x.inf() <= x.sup(); } }; template std::ostream & operator<< (std::ostream &os, const Interval_nt & I ) { return os << "[" << I.inf() << ";" << I.sup() << "]"; } # 522 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" template std::istream & operator>> (std::istream &is, Interval_nt & I) { char c; do c = is.get(); while (isspace(c)); is.putback(c); if(c == '['){ double inf,sup; { char c; do c = is.get(); while (isspace(c)); if (c != '[') { is.setstate(std::ios_base::failbit); } }; is >> iformat(inf); { char c; do c = is.get(); while (isspace(c)); if (c != ';') { is.setstate(std::ios_base::failbit); } }; is >> iformat(sup); { char c; do c = is.get(); while (isspace(c)); if (c != ']') { is.setstate(std::ios_base::failbit); } }; I = Interval_nt(inf,sup); }else{ double d; is >> d; I = d; } return is; } typedef Interval_nt Interval_nt_advanced; template inline Interval_nt operator+ (const Interval_nt &a, const Interval_nt & b) { typename Interval_nt::Internal_protector P; return Interval_nt (-((-a.inf())-CGAL::IA_force_to_double(b.inf())), ((a.sup())+CGAL::IA_force_to_double(b.sup()))); } template inline Interval_nt operator+ (double a, const Interval_nt & b) { return Interval_nt(a)+b; } template inline Interval_nt operator+ (const Interval_nt & a, double b) { return a+Interval_nt(b); } template inline Interval_nt operator+ (int a, const Interval_nt & b) { return Interval_nt(a)+b; } template inline Interval_nt operator+ (const Interval_nt & a, int b) { return a+Interval_nt(b); } template< bool Protected > inline Interval_nt operator+( const Interval_nt& a ) { return a; } template inline Interval_nt operator- (const Interval_nt &a, const Interval_nt & b) { typename Interval_nt::Internal_protector P; return Interval_nt(-((b.sup())-CGAL::IA_force_to_double(a.inf())), ((a.sup())-CGAL::IA_force_to_double(b.inf()))); } template inline Interval_nt operator- (double a, const Interval_nt & b) { return Interval_nt(a)-b; } template inline Interval_nt operator- (const Interval_nt & a, double b) { return a-Interval_nt(b); } template inline Interval_nt operator- (int a, const Interval_nt & b) { return Interval_nt(a)-b; } template inline Interval_nt operator- (const Interval_nt & a, int b) { return a-Interval_nt(b); } template inline Interval_nt operator* (const Interval_nt &a, const Interval_nt & b) { typedef Interval_nt IA; typename Interval_nt::Internal_protector P; if (a.inf() >= 0.0) { double aa = a.inf(), bb = a.sup(); if (b.inf() < 0.0) { aa = bb; if (b.sup() < 0.0) bb = a.inf(); } return IA(-((aa)*CGAL::IA_force_to_double(-b.inf())), ((bb)*CGAL::IA_force_to_double(b.sup()))); } else if (a.sup()<=0.0) { double aa = a.sup(), bb = a.inf(); if (b.inf() < 0.0) { aa=bb; if (b.sup() < 0.0) bb=a.sup(); } return IA(-((bb)*CGAL::IA_force_to_double(-b.sup())), ((aa)*CGAL::IA_force_to_double(b.inf()))); } else { if (b.inf()>=0.0) return IA(-((a.inf())*CGAL::IA_force_to_double(-b.sup())), ((a.sup())*CGAL::IA_force_to_double(b.sup()))); if (b.sup()<=0.0) return IA(-((a.sup())*CGAL::IA_force_to_double(-b.inf())), ((a.inf())*CGAL::IA_force_to_double(b.inf()))); double tmp1 = ((a.inf())*CGAL::IA_force_to_double(-b.sup())); double tmp2 = ((a.sup())*CGAL::IA_force_to_double(-b.inf())); double tmp3 = ((a.inf())*CGAL::IA_force_to_double(b.inf())); double tmp4 = ((a.sup())*CGAL::IA_force_to_double(b.sup())); return IA(-(std::max)(tmp1,tmp2), (std::max)(tmp3,tmp4)); } } template inline Interval_nt operator* (double a, const Interval_nt & b) { return Interval_nt(a)*b; } template inline Interval_nt operator* (const Interval_nt & a, double b) { return a*Interval_nt(b); } template inline Interval_nt operator* (int a, const Interval_nt & b) { return Interval_nt(a)*b; } template inline Interval_nt operator* (const Interval_nt & a, int b) { return a*Interval_nt(b); } template inline Interval_nt operator/ (const Interval_nt &a, const Interval_nt & b) { typedef Interval_nt IA; typename Interval_nt::Internal_protector P; if (b.inf() > 0.0) { double aa = b.sup(), bb = b.inf(); if (a.inf() < 0.0) { aa = bb; if (a.sup() < 0.0) bb = b.sup(); } return IA(-((a.inf())/CGAL::IA_force_to_double(-aa)), ((a.sup())/CGAL::IA_force_to_double(bb))); } else if (b.sup()<0.0) { double aa = b.sup(), bb = b.inf(); if (a.inf() < 0.0) { bb = aa; if (a.sup() < 0.0) aa = b.inf(); } return IA(-((a.sup())/CGAL::IA_force_to_double(-aa)), ((a.inf())/CGAL::IA_force_to_double(bb))); } else return IA::largest(); } template inline Interval_nt operator/ (double a, const Interval_nt & b) { return Interval_nt(a)/b; } template inline Interval_nt operator/ (const Interval_nt & a, double b) { return a/Interval_nt(b); } template inline Interval_nt operator/ (int a, const Interval_nt & b) { return Interval_nt(a)/b; } template inline Interval_nt operator/ (const Interval_nt & a, int b) { return a/Interval_nt(b); } template struct Min > : public std::binary_function, Interval_nt, Interval_nt > { Interval_nt operator()( const Interval_nt& d, const Interval_nt& e) const { return Interval_nt( (std::min)(d.inf(), e.inf()), (std::min)(d.sup(), e.sup())); } }; template struct Max > : public std::binary_function, Interval_nt, Interval_nt > { Interval_nt operator()( const Interval_nt& d, const Interval_nt& e) const { return Interval_nt( (std::max)(d.inf(), e.inf()), (std::max)(d.sup(), e.sup())); } }; template inline Interval_nt min ( const Interval_nt & x, const Interval_nt & y){ return CGAL::Min > ()(x,y); } template inline Interval_nt max ( const Interval_nt & x, const Interval_nt & y){ return CGAL::Max > ()(x,y); } template < bool b > Interval_nt ldexp(const Interval_nt &i, int e) { double scale = std::ldexp(1.0, e); Interval_nt scale_interval ( ::CGAL:: is_finite(scale) ? scale : (std::numeric_limits::max)(), scale == 0 ? std::numeric_limits::denorm_min() : scale); return i * scale_interval; } template < bool b > struct Equal_to < Interval_nt, Interval_nt > : public std::binary_function< Interval_nt, Interval_nt, Uncertain > { Uncertain operator()( const Interval_nt& x, const Interval_nt& y) const { return x == y; } }; template < bool b > struct Not_equal_to < Interval_nt, Interval_nt > : public std::binary_function< Interval_nt, Interval_nt, Uncertain > { Uncertain operator()( const Interval_nt& x, const Interval_nt& y) const { return x != y; } }; template < bool b > struct Greater < Interval_nt, Interval_nt > : public std::binary_function< Interval_nt, Interval_nt, Uncertain > { Uncertain operator()( const Interval_nt& x, const Interval_nt& y) const { return x > y; } }; template < bool b > struct Less < Interval_nt, Interval_nt > : public std::binary_function< Interval_nt, Interval_nt, Uncertain > { Uncertain operator()( const Interval_nt& x, const Interval_nt& y) const { return x < y; } }; template < bool b > struct Greater_equal < Interval_nt, Interval_nt > : public std::binary_function< Interval_nt, Interval_nt, Uncertain > { Uncertain operator()( const Interval_nt& x, const Interval_nt& y) const { return x >= y; } }; template < bool b > struct Less_equal < Interval_nt, Interval_nt > : public std::binary_function< Interval_nt, Interval_nt, Uncertain > { Uncertain operator()( const Interval_nt& x, const Interval_nt& y) const { return x <= y; } }; # 923 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h" namespace INTERN_INTERVAL_NT { template inline double to_double (const Interval_nt & d) { return (d.sup() + d.inf()) * 0.5; } template inline std::pair to_interval (const Interval_nt & d) { return d.pair(); } template inline Interval_nt sqrt (const Interval_nt & d) { typename Interval_nt::Internal_protector P; FPU_set_cw(FE_DOWNWARD); double i = (d.inf() > 0.0) ? (__builtin_sqrt(CGAL::IA_force_to_double(d.inf()))) : 0.0; FPU_set_cw(FE_UPWARD); return Interval_nt(i, (__builtin_sqrt(CGAL::IA_force_to_double(d.sup())))); } template inline Interval_nt square (const Interval_nt & d) { typename Interval_nt::Internal_protector P; if (d.inf()>=0.0) return Interval_nt(-((d.inf())*CGAL::IA_force_to_double(-d.inf())), ((d.sup())*CGAL::IA_force_to_double(d.sup()))); if (d.sup()<=0.0) return Interval_nt(-((d.sup())*CGAL::IA_force_to_double(-d.sup())), ((d.inf())*CGAL::IA_force_to_double(d.inf()))); return Interval_nt(0.0, (((std::max)(-d.inf(), d.sup()))*CGAL::IA_force_to_double((std::max)(-d.inf(), d.sup()))) ); } template inline Interval_nt abs (const Interval_nt & d) { if (d.inf() >= 0.0) return d; if (d.sup() <= 0.0) return -d; return Interval_nt(0.0, (std::max)(-d.inf(), d.sup())); } template inline Uncertain sign (const Interval_nt & d) { if (d.inf() > 0.0) return POSITIVE; if (d.sup() < 0.0) return NEGATIVE; if (d.inf() == d.sup()) return ZERO; return Uncertain::indeterminate(); } template inline Uncertain compare (const Interval_nt & d, const Interval_nt & e) { if (d.inf() > e.sup()) return LARGER; if (e.inf() > d.sup()) return SMALLER; if (e.inf() == d.sup() && d.inf() == e.sup()) return EQUAL; return Uncertain::indeterminate(); } template inline Uncertain is_zero (const Interval_nt & d) { if (d.inf() > 0.0) return false; if (d.sup() < 0.0) return false; if (d.inf() == d.sup()) return true; return Uncertain::indeterminate(); } template inline Uncertain is_one (const Interval_nt & d) { if (d.inf() > 1) return false; if (d.sup() < 1) return false; if (d.inf() == d.sup()) return true; return Uncertain::indeterminate(); } template inline Uncertain is_positive (const Interval_nt & d) { if (d.inf() > 0.0) return true; if (d.sup() <= 0.0) return false; return Uncertain::indeterminate(); } template inline Uncertain is_negative (const Interval_nt & d) { if (d.inf() >= 0.0) return false; if (d.sup() < 0.0) return true; return Uncertain::indeterminate(); } inline std::pair to_interval (const long & l) { if (sizeof(double) > sizeof(long)) { Protect_FPU_rounding P(FE_TONEAREST); Interval_nt approx ((double) l); FPU_set_cw(FE_UPWARD); approx += Interval_nt::smallest(); return approx.pair(); } else return std::pair(l,l); } } template< bool B > class Real_embeddable_traits< Interval_nt > : public INTERN_RET::Real_embeddable_traits_base< Interval_nt , CGAL::Tag_true> { public: typedef Interval_nt Type; typedef Uncertain Sign; typedef Uncertain Boolean; typedef Uncertain Comparison_result; class Abs : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return INTERN_INTERVAL_NT::abs( x ); } }; class Sgn : public std::unary_function< Type, Uncertain< ::CGAL::Sign > > { public: Uncertain< ::CGAL::Sign > operator()( const Type& x ) const { return INTERN_INTERVAL_NT::sign( x ); } }; class Is_positive : public std::unary_function< Type, Uncertain > { public: Uncertain operator()( const Type& x ) const { return INTERN_INTERVAL_NT::is_positive( x ); } }; class Is_negative : public std::unary_function< Type, Uncertain > { public: Uncertain operator()( const Type& x ) const { return INTERN_INTERVAL_NT::is_negative( x ); } }; class Compare : public std::binary_function< Type, Type, Comparison_result > { public: Comparison_result operator()( const Type& x, const Type& y ) const { return INTERN_INTERVAL_NT::compare( x, y ); } template < class CT_Type_1, class CT_Type_2 > Comparison_result operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class To_double : public std::unary_function< Type, double > { public: double operator()( const Type& x ) const { return INTERN_INTERVAL_NT::to_double( x ); } }; class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { return INTERN_INTERVAL_NT::to_interval( x ); } }; class Is_finite : public std::unary_function< Type, Boolean > { public : Boolean operator()( const Type& x ) const { return ::CGAL:: is_finite( x.inf() ) && ::CGAL:: is_finite( x.sup() ); } }; }; template< bool B > class Algebraic_structure_traits< Interval_nt > : public Algebraic_structure_traits_base< Interval_nt, Field_with_sqrt_tag > { public: typedef Interval_nt Type; typedef Tag_false Is_exact; typedef Tag_true Is_numerical_sensitive; typedef Uncertain Boolean; class Is_zero : public std::unary_function< Type, Boolean > { public: Boolean operator()( const Type& x ) const { return INTERN_INTERVAL_NT::is_zero( x ); } }; class Is_one : public std::unary_function< Type, Boolean > { public: Boolean operator()( const Type& x ) const { return INTERN_INTERVAL_NT::is_one( x ); } }; class Square : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return INTERN_INTERVAL_NT::square( x ); } }; class Sqrt : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return INTERN_INTERVAL_NT::sqrt( x ); } }; struct Is_square :public std::binary_function,Interval_nt&,Boolean > { Boolean operator()(const Interval_nt& x) const { return INTERN_INTERVAL_NT::is_positive( x ); } Boolean operator()( const Interval_nt& x, Interval_nt & result) const { Boolean is_positive = INTERN_INTERVAL_NT::is_positive( x ); if ( is_positive.inf() == true ){ typename Algebraic_structure_traits >::Sqrt sqrt; result = sqrt(x); }else{ typename Real_embeddable_traits >::Abs abs; typename Algebraic_structure_traits >::Sqrt sqrt; result = sqrt(abs(x)); } return is_positive; } }; class Divides : public std::binary_function< Type, Type, Boolean > { public: Boolean operator()( const Type& x, const Type&) const { return ! Is_zero()(x); } Boolean operator()( const Type& x, const Type& y, Type& q) const { if (! Is_zero()(x) ) q = y/x ; return Boolean(true); } }; }; template < class A, class B , int > struct Coercion_traits_for_level; template < class A, class B, class C> struct Coercion_traits_interval_nt; template struct Coercion_traits_for_level,CTL_INTERVAL> :public Coercion_traits_interval_nt, typename Real_embeddable_traits::Is_real_embeddable>{}; template struct Coercion_traits_for_level,A,CTL_INTERVAL> :public Coercion_traits_for_level, CTL_INTERVAL>{}; template struct Coercion_traits_interval_nt,Tag_false> :public Coercion_traits_for_level,0>{}; template struct Coercion_traits_interval_nt, Tag_true>{ typedef Tag_true Are_explicit_interoperable; typedef Tag_false Are_implicit_interoperable; typedef Interval_nt

Type; struct Cast { typedef Interval_nt

result_type; Interval_nt

inline operator()(const Interval_nt

& x ) const { return x; } Interval_nt

inline operator()(const A& x ) const { return typename Real_embeddable_traits::To_interval()(x); } }; }; template< bool B > class Interval_traits< Interval_nt > : public internal::Interval_traits_base< Interval_nt > { public: typedef Interval_traits > Self; typedef Interval_nt Interval; typedef double Bound; typedef CGAL::Tag_false With_empty_interval; typedef CGAL::Tag_true Is_interval; struct Construct :public std::binary_function{ Interval operator()( const Bound& l,const Bound& r) const { (CGAL::possibly(l < r)?(static_cast(0)): ::CGAL::precondition_fail( "l < r" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_nt.h", 1273)); return Interval(l,r); } }; struct Lower :public std::unary_function{ Bound operator()( const Interval& a ) const { return a.inf(); } }; struct Upper :public std::unary_function{ Bound operator()( const Interval& a ) const { return a.sup(); } }; struct Width :public std::unary_function{ Bound operator()( const Interval& a ) const { return width(a); } }; struct Median :public std::unary_function{ Bound operator()( const Interval& a ) const { return (Lower()(a)+Upper()(a))/2.0; } }; struct Norm :public std::unary_function{ Bound operator()( const Interval& a ) const { return magnitude(a); } }; struct Singleton :public std::unary_function{ bool operator()( const Interval& a ) const { return Lower()(a) == Upper()(a); } }; struct Zero_in :public std::unary_function{ bool operator()( const Interval& a ) const { return Lower()(a) <= 0 && 0 <= Upper()(a); } }; struct In :public std::binary_function{ bool operator()( Bound x, const Interval& a ) const { return Lower()(a) <= x && x <= Upper()(a); } }; struct Equal :public std::binary_function{ bool operator()( const Interval& a, const Interval& b ) const { return a.is_same(b); } }; struct Overlap :public std::binary_function{ bool operator()( const Interval& a, const Interval& b ) const { return a.do_overlap(b); } }; struct Subset :public std::binary_function{ bool operator()( const Interval& a, const Interval& b ) const { return Lower()(b) <= Lower()(a) && Upper()(a) <= Upper()(b) ; } }; struct Proper_subset :public std::binary_function{ bool operator()( const Interval& a, const Interval& b ) const { return Subset()(a,b) && ! Equal()(a,b); } }; struct Hull :public std::binary_function{ Interval operator()( const Interval& a, const Interval& b ) const { using std::max; using std::min; return Interval( std::make_pair( min (Lower()(a),b.inf()), max (Upper()(a),b.sup()))); } }; struct Intersection :public std::binary_function{ Interval operator()( const Interval& a, const Interval& b ) const { using std::max; using std::min; Bound l(max (Lower()(a),Lower()(b))); Bound u(min (Upper()(a),Upper()(b))); if(u < l ) throw Exception_intersection_is_empty(); return Construct()(l,u); } }; }; } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" 2 namespace CGAL { # 77 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" template<> class Is_valid< long double > : public std::unary_function< long double, bool > { public : bool operator()( const long double& x ) const { return (x == x); } }; template <> class Algebraic_structure_traits< long double > : public Algebraic_structure_traits_base< long double, Field_with_kth_root_tag > { public: typedef Tag_false Is_exact; typedef Tag_true Is_numerical_sensitive; class Sqrt : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return std::sqrt( x ); } }; class Kth_root :public std::binary_function { public: Type operator()( int k, const Type& x) const { (CGAL::possibly(k > 0)?(static_cast(0)): ::CGAL::precondition_fail( "k > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" # 111 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" , 112 # 111 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" , "'k' must be positive for k-th roots")) ; return std::pow(x, (long double)1.0 / (long double)(k)); }; }; }; template <> class Real_embeddable_traits< long double > : public INTERN_RET::Real_embeddable_traits_base< long double , CGAL::Tag_true > { public: class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { return (Interval_nt<>((double)x)+Interval_nt<>::smallest()).pair(); # 144 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_double.h" } }; class Is_finite : public std::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { return (x == x) && (is_valid(x-x)); } }; }; } # 82 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/int.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/int.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_traits.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Residue.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Residue.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cfloat" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cfloat" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cfloat" 3 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h" 2 # 1 "/localhome/glisse2/include/boost/operators.hpp" 1 # 97 "/localhome/glisse2/include/boost/operators.hpp" namespace boost { namespace detail { template class empty_base { }; } } # 120 "/localhome/glisse2/include/boost/operators.hpp" namespace boost { template > struct less_than_comparable2 : B { friend bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } friend bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } friend bool operator>(const U& x, const T& y) { return y < x; } friend bool operator<(const U& x, const T& y) { return y > x; } friend bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } friend bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } }; template > struct less_than_comparable1 : B { friend bool operator>(const T& x, const T& y) { return y < x; } friend bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } friend bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } }; template > struct equality_comparable2 : B { friend bool operator==(const U& y, const T& x) { return x == y; } friend bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } friend bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } }; template > struct equality_comparable1 : B { friend bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } }; # 256 "/localhome/glisse2/include/boost/operators.hpp" template > struct multipliable2 : B { friend T operator *( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } friend T operator *( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv *= lhs; return nrv; } }; template > struct multipliable1 : B { friend T operator *( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } }; template > struct addable2 : B { friend T operator +( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } friend T operator +( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv += lhs; return nrv; } }; template > struct addable1 : B { friend T operator +( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } }; template > struct subtractable2 : B { friend T operator -( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable2_left : B { friend T operator -( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable1 : B { friend T operator -( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct dividable2 : B { friend T operator /( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable2_left : B { friend T operator /( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable1 : B { friend T operator /( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct modable2 : B { friend T operator %( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable2_left : B { friend T operator %( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable1 : B { friend T operator %( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct xorable2 : B { friend T operator ^( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } friend T operator ^( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv ^= lhs; return nrv; } }; template > struct xorable1 : B { friend T operator ^( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } }; template > struct andable2 : B { friend T operator &( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } friend T operator &( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv &= lhs; return nrv; } }; template > struct andable1 : B { friend T operator &( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } }; template > struct orable2 : B { friend T operator |( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } friend T operator |( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv |= lhs; return nrv; } }; template > struct orable1 : B { friend T operator |( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } }; template > struct incrementable : B { friend T operator++(T& x, int) { incrementable_type nrv(x); ++x; return nrv; } private: typedef T incrementable_type; }; template > struct decrementable : B { friend T operator--(T& x, int) { decrementable_type nrv(x); --x; return nrv; } private: typedef T decrementable_type; }; template > struct dereferenceable : B { P operator->() const { return &*static_cast(*this); } }; template > struct indexable : B { R operator[](I n) const { return *(static_cast(*this) + n); } }; # 354 "/localhome/glisse2/include/boost/operators.hpp" template > struct left_shiftable2 : B { friend T operator <<( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; template > struct left_shiftable1 : B { friend T operator <<( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; template > struct right_shiftable2 : B { friend T operator >>( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; template > struct right_shiftable1 : B { friend T operator >>( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; template > struct equivalent2 : B { friend bool operator==(const T& x, const U& y) { return !static_cast(x < y) && !static_cast(x > y); } }; template > struct equivalent1 : B { friend bool operator==(const T&x, const T&y) { return !static_cast(x < y) && !static_cast(y < x); } }; template > struct partially_ordered2 : B { friend bool operator<=(const T& x, const U& y) { return static_cast(x < y) || static_cast(x == y); } friend bool operator>=(const T& x, const U& y) { return static_cast(x > y) || static_cast(x == y); } friend bool operator>(const U& x, const T& y) { return y < x; } friend bool operator<(const U& x, const T& y) { return y > x; } friend bool operator<=(const U& x, const T& y) { return static_cast(y > x) || static_cast(y == x); } friend bool operator>=(const U& x, const T& y) { return static_cast(y < x) || static_cast(y == x); } }; template > struct partially_ordered1 : B { friend bool operator>(const T& x, const T& y) { return y < x; } friend bool operator<=(const T& x, const T& y) { return static_cast(x < y) || static_cast(x == y); } friend bool operator>=(const T& x, const T& y) { return static_cast(y < x) || static_cast(x == y); } }; template > struct totally_ordered2 : less_than_comparable2 > {}; template > struct totally_ordered1 : less_than_comparable1 > {}; template > struct additive2 : addable2 > {}; template > struct additive1 : addable1 > {}; template > struct multiplicative2 : multipliable2 > {}; template > struct multiplicative1 : multipliable1 > {}; template > struct integer_multiplicative2 : multiplicative2 > {}; template > struct integer_multiplicative1 : multiplicative1 > {}; template > struct arithmetic2 : additive2 > {}; template > struct arithmetic1 : additive1 > {}; template > struct integer_arithmetic2 : additive2 > {}; template > struct integer_arithmetic1 : additive1 > {}; template > struct bitwise2 : xorable2 > > {}; template > struct bitwise1 : xorable1 > > {}; template > struct unit_steppable : incrementable > {}; template > struct shiftable2 : left_shiftable2 > {}; template > struct shiftable1 : left_shiftable1 > {}; template > struct ring_operators2 : additive2 > > {}; template > struct ring_operators1 : additive1 > {}; template > struct ordered_ring_operators2 : ring_operators2 > {}; template > struct ordered_ring_operators1 : ring_operators1 > {}; template > struct field_operators2 : ring_operators2 > > {}; template > struct field_operators1 : ring_operators1 > {}; template > struct ordered_field_operators2 : field_operators2 > {}; template > struct ordered_field_operators1 : field_operators1 > {}; template > struct euclidian_ring_operators2 : ring_operators2 > > > > {}; template > struct euclidian_ring_operators1 : ring_operators1 > > {}; template > struct ordered_euclidian_ring_operators2 : totally_ordered2 > {}; template > struct ordered_euclidian_ring_operators1 : totally_ordered1 > {}; template > struct euclidean_ring_operators2 : ring_operators2 > > > > {}; template > struct euclidean_ring_operators1 : ring_operators1 > > {}; template > struct ordered_euclidean_ring_operators2 : totally_ordered2 > {}; template > struct ordered_euclidean_ring_operators1 : totally_ordered1 > {}; template > struct input_iteratable : equality_comparable1 > > {}; template > struct output_iteratable : incrementable {}; template > struct forward_iteratable : input_iteratable {}; template > struct bidirectional_iteratable : forward_iteratable > {}; template > struct random_access_iteratable : bidirectional_iteratable > > > {}; } # 720 "/localhome/glisse2/include/boost/operators.hpp" namespace boost { namespace detail { struct true_t {}; struct false_t {}; } template struct is_chained_base { typedef ::boost::detail::false_t value; }; } # 831 "/localhome/glisse2/include/boost/operators.hpp" namespace boost { template ,class O = typename is_chained_base::value > struct less_than_comparable : less_than_comparable2 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct is_chained_base< ::boost::less_than_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct equality_comparable : equality_comparable2 {}; template struct equality_comparable : equality_comparable1 {}; template struct equality_comparable : equality_comparable1 {}; template struct is_chained_base< ::boost::equality_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct multipliable : multipliable2 {}; template struct multipliable : multipliable1 {}; template struct multipliable : multipliable1 {}; template struct is_chained_base< ::boost::multipliable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct addable : addable2 {}; template struct addable : addable1 {}; template struct addable : addable1 {}; template struct is_chained_base< ::boost::addable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct subtractable : subtractable2 {}; template struct subtractable : subtractable1 {}; template struct subtractable : subtractable1 {}; template struct is_chained_base< ::boost::subtractable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable1 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable2_left > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct dividable : dividable2 {}; template struct dividable : dividable1 {}; template struct dividable : dividable1 {}; template struct is_chained_base< ::boost::dividable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable1 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable2_left > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct modable : modable2 {}; template struct modable : modable1 {}; template struct modable : modable1 {}; template struct is_chained_base< ::boost::modable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable1 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable2_left > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct xorable : xorable2 {}; template struct xorable : xorable1 {}; template struct xorable : xorable1 {}; template struct is_chained_base< ::boost::xorable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct andable : andable2 {}; template struct andable : andable1 {}; template struct andable : andable1 {}; template struct is_chained_base< ::boost::andable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct orable : orable2 {}; template struct orable : orable1 {}; template struct orable : orable1 {}; template struct is_chained_base< ::boost::orable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable1 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::incrementable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::decrementable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dereferenceable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::indexable > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct left_shiftable : left_shiftable2 {}; template struct left_shiftable : left_shiftable1 {}; template struct left_shiftable : left_shiftable1 {}; template struct is_chained_base< ::boost::left_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct right_shiftable : right_shiftable2 {}; template struct right_shiftable : right_shiftable1 {}; template struct right_shiftable : right_shiftable1 {}; template struct is_chained_base< ::boost::right_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct equivalent : equivalent2 {}; template struct equivalent : equivalent1 {}; template struct equivalent : equivalent1 {}; template struct is_chained_base< ::boost::equivalent > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct partially_ordered : partially_ordered2 {}; template struct partially_ordered : partially_ordered1 {}; template struct partially_ordered : partially_ordered1 {}; template struct is_chained_base< ::boost::partially_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct totally_ordered : totally_ordered2 {}; template struct totally_ordered : totally_ordered1 {}; template struct totally_ordered : totally_ordered1 {}; template struct is_chained_base< ::boost::totally_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct additive : additive2 {}; template struct additive : additive1 {}; template struct additive : additive1 {}; template struct is_chained_base< ::boost::additive > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct multiplicative : multiplicative2 {}; template struct multiplicative : multiplicative1 {}; template struct multiplicative : multiplicative1 {}; template struct is_chained_base< ::boost::multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct integer_multiplicative : integer_multiplicative2 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct is_chained_base< ::boost::integer_multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct arithmetic : arithmetic2 {}; template struct arithmetic : arithmetic1 {}; template struct arithmetic : arithmetic1 {}; template struct is_chained_base< ::boost::arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct integer_arithmetic : integer_arithmetic2 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct is_chained_base< ::boost::integer_arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct bitwise : bitwise2 {}; template struct bitwise : bitwise1 {}; template struct bitwise : bitwise1 {}; template struct is_chained_base< ::boost::bitwise > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise1 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::unit_steppable > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct shiftable : shiftable2 {}; template struct shiftable : shiftable1 {}; template struct shiftable : shiftable1 {}; template struct is_chained_base< ::boost::shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct ring_operators : ring_operators2 {}; template struct ring_operators : ring_operators1 {}; template struct ring_operators : ring_operators1 {}; template struct is_chained_base< ::boost::ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct ordered_ring_operators : ordered_ring_operators2 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct field_operators : field_operators2 {}; template struct field_operators : field_operators1 {}; template struct field_operators : field_operators1 {}; template struct is_chained_base< ::boost::field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct ordered_field_operators : ordered_field_operators2 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct is_chained_base< ::boost::ordered_field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct euclidian_ring_operators : euclidian_ring_operators2 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators2 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct euclidean_ring_operators : euclidean_ring_operators2 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; template ,class O = typename is_chained_base::value > struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators2 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::input_iteratable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::output_iteratable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::forward_iteratable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bidirectional_iteratable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::random_access_iteratable > { typedef ::boost::detail::true_t value; }; # 893 "/localhome/glisse2/include/boost/operators.hpp" template struct operators2 : totally_ordered2 > > {}; template struct operators : operators2 {}; template struct operators : totally_ordered > > > {}; template struct input_iterator_helper : input_iteratable > {}; template struct output_iterator_helper : output_iteratable > { T& operator*() { return static_cast(*this); } T& operator++() { return static_cast(*this); } }; template struct forward_iterator_helper : forward_iteratable > {}; template struct bidirectional_iterator_helper : bidirectional_iteratable > {}; template struct random_access_iterator_helper : random_access_iteratable > { friend D requires_difference_operator(const T& x, const T& y) { return x - y; } }; } # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h" 2 namespace CGAL { class Residue; Residue operator + (const Residue&); Residue operator - (const Residue&); std::ostream& operator << (std::ostream& os, const Residue& p); std::istream& operator >> (std::istream& is, Residue& p); # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h" class Residue: boost::ordered_field_operators1< Residue, boost::ordered_field_operators2< Residue, int > >{ public: typedef Residue Self; typedef Residue NT; private: static const double CST_CUT; # 97 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h" static int prime_int; static double prime; static double prime_inv; static int get_prime_int(){ return prime_int;} static double get_prime() { return prime;} static double get_prime_inv(){ return prime_inv;} static inline double RES_round (double a){ (CGAL::possibly(FPU_get_cw() == FE_TONEAREST)?(static_cast(0)): ::CGAL::assertion_fail( "FPU_get_cw() == CGAL_FE_TONEAREST" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h", 110)); return ( (a + CST_CUT) - CST_CUT); } static inline double RES_reduce (double a){ double result = a - get_prime() * RES_round(a * get_prime_inv()); (CGAL::possibly(2*result < get_prime())?(static_cast(0)): ::CGAL::postcondition_fail( "2*result < get_prime()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h", 118)); (CGAL::possibly(2*result > -get_prime())?(static_cast(0)): ::CGAL::postcondition_fail( "2*result > -get_prime()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h", 119)); return result; } static inline double RES_soft_reduce (double a){ double p = get_prime(); double b = 2*a; return (b>p) ? a-p : ((b<-p) ? a+p : a); } static inline double RES_negate(double a){ return RES_soft_reduce(-a); } static inline double RES_mul (double a, double b){ double c = a*b; return RES_reduce(c); } static inline double RES_add (double a, double b){ double c = a+b; return RES_soft_reduce(c); } static inline double RES_inv (double ri1){ double bi = 0.0; double bi1 = 1.0; double ri = get_prime(); double p, tmp, tmp2; Real_embeddable_traits::Abs double_abs; while (double_abs(ri1) != 1.0) { p = RES_round(ri/ri1); tmp = bi - p * bi1; tmp2 = ri - p * ri1; bi = bi1; ri = ri1; bi1 = tmp; ri1 = tmp2; }; return ri1 * RES_soft_reduce(bi1); } static inline double RES_div (double a, double b){ return RES_mul(a, RES_inv(b)); } public: static int set_current_prime(int p){ int old_prime = get_prime_int(); prime_int = p; prime = double(p); prime_inv = 1.0 / prime; return old_prime; } static int get_current_prime(){ return get_prime_int(); } int get_value() const{ (CGAL::possibly(2*x_ < get_prime())?(static_cast(0)): ::CGAL::precondition_fail( "2*x_ < get_prime()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h", 214)); (CGAL::possibly(2*x_ > -get_prime())?(static_cast(0)): ::CGAL::precondition_fail( "2*x_ > -get_prime()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h", 215)); return int(x_); } private: double x_; public: Residue(int n = 0){ x_= RES_reduce(n); } Residue(long n){ x_= RES_reduce(n); } const double& x() const { return x_; } double& x() { return x_; } Self& operator += (const Self& p2) { x() = RES_add(x(),p2.x()); return (*this); } Self& operator -= (const Self& p2){ x() = RES_add(x(),RES_negate(p2.x())); return (*this); } Self& operator *= (const Self& p2){ x() = RES_mul(x(),p2.x()); return (*this); } Self& operator /= (const Self& p2) { x() = RES_div(x(),p2.x()); return (*this); } Self& operator += (int p2) { x() = RES_add(x(),Residue(p2).x()); return (*this); } Self& operator -= (int p2){ x() = RES_add(x(),Residue(-p2).x()); return (*this); } Self& operator *= (int p2){ x() = RES_mul(x(),Residue(p2).x()); return (*this); } Self& operator /= (int p2) { x() = RES_div(x(),Residue(p2).x()); return (*this); } friend Self operator + (const Self&); friend Self operator - (const Self&); }; inline Residue operator + (const Residue& p1) { return p1; } inline Residue operator - (const Residue& p1){ typedef Residue RES; Residue r; r.x() = RES::RES_negate(p1.x()); return r; } inline bool operator == (const Residue& p1, const Residue& p2) { return ( p1.x()==p2.x() ); } inline bool operator == (const Residue& p1, int p2) { return ( p1 == Residue(p2) ); } inline bool operator < (const Residue& p1, const Residue& p2) { return ( p1.x() < p2.x() ); } inline bool operator < (const Residue& p1, int p2) { return ( p1.x() < Residue(p2).x() ); } inline std::ostream& operator << (std::ostream& os, const Residue& p) { typedef Residue RES; os <<"("<< int(p.x())<<"%"<> (std::istream& is, Residue& p) { typedef Residue RES; char ch; int prime; is >> p.x(); is >> ch; is >> prime; (CGAL::possibly(prime==RES::get_current_prime())?(static_cast(0)): ::CGAL::precondition_fail( "prime==RES::get_current_prime()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_arithmetic/Residue_type.h", 316)); return is; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Residue.h" 2 namespace CGAL { template <> class Algebraic_structure_traits : public Algebraic_structure_traits_base< Residue ,Field_tag >{ public: typedef CGAL::Tag_true Is_exact; }; template <> struct Coercion_traits< short , CGAL::Residue >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef CGAL::Residue Type; struct Cast{ typedef Type result_type; Type operator()(const CGAL::Residue& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< CGAL::Residue , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef CGAL::Residue Type; struct Cast{ typedef Type result_type; Type operator()(const CGAL::Residue& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , CGAL::Residue >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef CGAL::Residue Type; struct Cast{ typedef Type result_type; Type operator()(const CGAL::Residue& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< CGAL::Residue , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef CGAL::Residue Type; struct Cast{ typedef Type result_type; Type operator()(const CGAL::Residue& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , CGAL::Residue >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef CGAL::Residue Type; struct Cast{ typedef Type result_type; Type operator()(const CGAL::Residue& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< CGAL::Residue , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef CGAL::Residue Type; struct Cast{ typedef Type result_type; Type operator()(const CGAL::Residue& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_traits.h" 2 namespace CGAL { # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Modular_traits.h" template class Modular_traits{ public: typedef NT_ NT; typedef ::CGAL::Tag_false Is_modularizable; typedef ::CGAL::Null_functor Residue_type; typedef ::CGAL::Null_functor Modular_image; typedef ::CGAL::Null_functor Modular_image_representative; }; template inline typename CGAL::Modular_traits::Residue_type modular_image(const NT& x){ typename CGAL::Modular_traits::Modular_image modular_image; return modular_image(x); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/int.h" 2 namespace CGAL { namespace INTERN_INT { template< class Type > class Is_square_per_double_conversion : public std::binary_function< Type, Type&, bool > { public: bool operator()( const Type& x, Type& y ) const { y = (Type) std::sqrt( (double)x ); return x == y * y; } bool operator()( const Type& x ) const { Type y = (Type) std::sqrt( (double)x ); return x == y * y; } }; } template<> class Algebraic_structure_traits< int > : public Algebraic_structure_traits_base< int, Euclidean_ring_tag > { public: typedef Tag_false Is_exact; typedef Tag_true Is_numerical_sensitive; typedef INTERN_AST::Div_per_operator< Type > Div; typedef INTERN_AST::Mod_per_operator< Type > Mod; typedef INTERN_INT:: Is_square_per_double_conversion< Type > Is_square; }; template <> class Real_embeddable_traits< int > : public INTERN_RET::Real_embeddable_traits_base< int , CGAL::Tag_true > {}; template<> class Modular_traits{ public: typedef int NT; typedef ::CGAL::Tag_true Is_modularizable; typedef Residue Residue_type; struct Modular_image{ Residue_type operator()(int i){ return Residue_type(i); } }; struct Modular_image_representative{ NT operator()(const Residue_type& x){ return x.get_value(); } }; }; template<> class Algebraic_structure_traits< long int > : public Algebraic_structure_traits_base< long int, Euclidean_ring_tag > { public: typedef Tag_false Is_exact; typedef Tag_true Is_numerical_sensitive; typedef INTERN_AST::Div_per_operator< Type > Div; typedef INTERN_AST::Mod_per_operator< Type > Mod; typedef INTERN_INT:: Is_square_per_double_conversion< Type > Is_square; }; template <> class Real_embeddable_traits< long int > : public INTERN_RET::Real_embeddable_traits_base< long int , CGAL::Tag_true > {}; template<> class Modular_traits{ public: typedef long NT; typedef ::CGAL::Tag_true Is_modularizable; typedef Residue Residue_type; struct Modular_image{ Residue_type operator()(long i){ return Residue_type(i); } }; struct Modular_image_representative{ NT operator()(const Residue_type& x){ return NT(x.get_value()); } }; }; template<> class Algebraic_structure_traits< short int > : public Algebraic_structure_traits_base< short int, Euclidean_ring_tag > { public: typedef Tag_false Is_exact; typedef Tag_true Is_numerical_sensitive; class Integral_division : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { Algebraic_structure_traits::Div actual_div; (CGAL::possibly(actual_div( x, y) * y == x)?(static_cast(0)): ::CGAL::precondition_fail( "actual_div( x, y) * y == x" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/int.h" # 160 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/int.h" , 162 # 160 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/int.h" , "'x' must be divisible by 'y' in " "Algebraic_structure_traits<...>::Integral_div()(x,y)")) ; return actual_div( x, y); } }; class Gcd : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { Algebraic_structure_traits::Mod mod; Algebraic_structure_traits::Unit_part unit_part; Algebraic_structure_traits::Integral_division integral_div; if (x == Type(0)) { if (y == Type(0)) return Type(0); return integral_div( y, unit_part(y) ); } if (y == Type(0)) return integral_div(x, unit_part(x) ); Type u = integral_div( x, unit_part(x) ); Type v = integral_div( y, unit_part(y) ); if (u < v) { v = mod(v,u); if ( v == Type(0) ) return u; } Type w; do { w = mod(u,v); if ( w == Type(0)) return v; u = mod(v,w); if ( u == Type(0)) return w; v = mod(w,u); } while (v != Type(0)); return u; } }; class Div_mod { public: typedef Type first_argument_type; typedef Type second_argument_type; typedef Type& third_argument_type; typedef Type& fourth_argument_type; typedef void result_type; void operator()( const Type& x, const Type& y, Type& q, Type& r) const { q = x / y; r = x % y; return; } }; class Div : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { return x / y; }; }; class Mod : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y) const { return x % y; }; }; typedef INTERN_INT:: Is_square_per_double_conversion< Type > Is_square; }; template <> class Real_embeddable_traits< short int > : public INTERN_RET::Real_embeddable_traits_base< short int , CGAL::Tag_true > {}; } # 83 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_long.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/long_long.h" namespace CGAL { template<> class Algebraic_structure_traits< long long int > : public Algebraic_structure_traits_base< long long int, Euclidean_ring_tag > { public: typedef Tag_true Is_exact; typedef Tag_false Is_numerical_sensitive; typedef INTERN_AST::Div_per_operator< Type > Div; typedef INTERN_AST::Mod_per_operator< Type > Mod; class Is_square : public std::binary_function< Type, Type&, bool > { public: bool operator()( const Type& x, Type& y ) const { y = (Type) std::sqrt( (double)x ); return x == y * y; } bool operator()( const Type& x) const { Type y = (Type) std::sqrt( (double)x ); return x == y * y; } }; }; template <> class Real_embeddable_traits< long long int > : public INTERN_RET::Real_embeddable_traits_base< long long int , CGAL::Tag_true > { public: class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { Protect_FPU_rounding P(FE_TONEAREST); Interval_nt approx ((double) x); FPU_set_cw(FE_UPWARD); approx += Interval_nt::smallest(); return approx.pair(); } }; }; } # 87 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx.h" 1 # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx.h" 2 # 1 "/usr/include/gmpxx.h" 1 3 4 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx_coercion_traits.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx_coercion_traits.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx_coercion_traits.h" 2 # 1 "/usr/include/gmpxx.h" 1 3 4 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx_coercion_traits.h" 2 # 1 "/usr/include/mpfr.h" 1 3 4 # 45 "/usr/include/mpfr.h" 3 4 typedef void mpfr_void; typedef int mpfr_int; typedef unsigned int mpfr_uint; typedef long mpfr_long; typedef unsigned long mpfr_ulong; typedef size_t mpfr_size_t; # 67 "/usr/include/mpfr.h" 3 4 typedef enum { MPFR_RNDN=0, MPFR_RNDZ, MPFR_RNDU, MPFR_RNDD, MPFR_RNDA, MPFR_RNDF, MPFR_RNDNA=-1 } mpfr_rnd_t; # 116 "/usr/include/mpfr.h" 3 4 typedef long mpfr_prec_t; typedef unsigned long mpfr_uprec_t; # 129 "/usr/include/mpfr.h" 3 4 typedef int mpfr_sign_t; # 140 "/usr/include/mpfr.h" 3 4 typedef long mpfr_exp_t; typedef unsigned long mpfr_uexp_t; # 165 "/usr/include/mpfr.h" 3 4 typedef struct { mpfr_prec_t _mpfr_prec; mpfr_sign_t _mpfr_sign; mpfr_exp_t _mpfr_exp; mp_limb_t *_mpfr_d; } __mpfr_struct; # 191 "/usr/include/mpfr.h" 3 4 typedef __mpfr_struct mpfr_t[1]; typedef __mpfr_struct *mpfr_ptr; typedef const __mpfr_struct *mpfr_srcptr; # 204 "/usr/include/mpfr.h" 3 4 typedef enum { MPFR_NAN_KIND = 0, MPFR_INF_KIND = 1, MPFR_ZERO_KIND = 2, MPFR_REGULAR_KIND = 3 } mpfr_kind_t; # 264 "/usr/include/mpfr.h" 3 4 extern "C" { const char * mpfr_get_version (void); const char * mpfr_get_patches (void); int mpfr_buildopt_tls_p (void); int mpfr_buildopt_decimal_p (void); int mpfr_buildopt_gmpinternals_p (void); const char * mpfr_buildopt_tune_case (void); mpfr_exp_t mpfr_get_emin (void); int mpfr_set_emin (mpfr_exp_t); mpfr_exp_t mpfr_get_emin_min (void); mpfr_exp_t mpfr_get_emin_max (void); mpfr_exp_t mpfr_get_emax (void); int mpfr_set_emax (mpfr_exp_t); mpfr_exp_t mpfr_get_emax_min (void); mpfr_exp_t mpfr_get_emax_max (void); void mpfr_set_default_rounding_mode (mpfr_rnd_t); mpfr_rnd_t mpfr_get_default_rounding_mode (void); const char * mpfr_print_rnd_mode (mpfr_rnd_t); void mpfr_clear_flags (void); void mpfr_clear_underflow (void); void mpfr_clear_overflow (void); void mpfr_clear_divby0 (void); void mpfr_clear_nanflag (void); void mpfr_clear_inexflag (void); void mpfr_clear_erangeflag (void); void mpfr_set_underflow (void); void mpfr_set_overflow (void); void mpfr_set_divby0 (void); void mpfr_set_nanflag (void); void mpfr_set_inexflag (void); void mpfr_set_erangeflag (void); int mpfr_underflow_p (void); int mpfr_overflow_p (void); int mpfr_divby0_p (void); int mpfr_nanflag_p (void); int mpfr_inexflag_p (void); int mpfr_erangeflag_p (void); int mpfr_check_range (mpfr_ptr, int, mpfr_rnd_t); void mpfr_init2 (mpfr_ptr, mpfr_prec_t); void mpfr_init (mpfr_ptr); void mpfr_clear (mpfr_ptr); void mpfr_inits2 (mpfr_prec_t, mpfr_ptr, ...) __attribute__ ((sentinel)); void mpfr_inits (mpfr_ptr, ...) __attribute__ ((sentinel)); void mpfr_clears (mpfr_ptr, ...) __attribute__ ((sentinel)); int mpfr_prec_round (mpfr_ptr, mpfr_prec_t, mpfr_rnd_t); int mpfr_can_round (mpfr_srcptr, mpfr_exp_t, mpfr_rnd_t, mpfr_rnd_t, mpfr_prec_t) ; mpfr_prec_t mpfr_min_prec (mpfr_srcptr); mpfr_exp_t mpfr_get_exp (mpfr_srcptr); int mpfr_set_exp (mpfr_ptr, mpfr_exp_t); mpfr_prec_t mpfr_get_prec (mpfr_srcptr); void mpfr_set_prec (mpfr_ptr, mpfr_prec_t); void mpfr_set_prec_raw (mpfr_ptr, mpfr_prec_t); void mpfr_set_default_prec (mpfr_prec_t); mpfr_prec_t mpfr_get_default_prec (void); int mpfr_set_d (mpfr_ptr, double, mpfr_rnd_t); int mpfr_set_flt (mpfr_ptr, float, mpfr_rnd_t); int mpfr_set_ld (mpfr_ptr, long double, mpfr_rnd_t); int mpfr_set_z (mpfr_ptr, mpz_srcptr, mpfr_rnd_t); int mpfr_set_z_2exp (mpfr_ptr, mpz_srcptr, mpfr_exp_t, mpfr_rnd_t); void mpfr_set_nan (mpfr_ptr); void mpfr_set_inf (mpfr_ptr, int); void mpfr_set_zero (mpfr_ptr, int); int mpfr_set_f (mpfr_ptr, mpf_srcptr, mpfr_rnd_t); int mpfr_get_f (mpf_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_set_si (mpfr_ptr, long, mpfr_rnd_t); int mpfr_set_ui (mpfr_ptr, unsigned long, mpfr_rnd_t); int mpfr_set_si_2exp (mpfr_ptr, long, mpfr_exp_t, mpfr_rnd_t); int mpfr_set_ui_2exp (mpfr_ptr,unsigned long,mpfr_exp_t,mpfr_rnd_t); int mpfr_set_q (mpfr_ptr, mpq_srcptr, mpfr_rnd_t); int mpfr_set_str (mpfr_ptr, const char *, int, mpfr_rnd_t); int mpfr_init_set_str (mpfr_ptr, const char *, int, mpfr_rnd_t) ; int mpfr_set4 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t, int); int mpfr_abs (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_set (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_neg (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_signbit (mpfr_srcptr); int mpfr_setsign (mpfr_ptr, mpfr_srcptr, int, mpfr_rnd_t); int mpfr_copysign (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t); mpfr_exp_t mpfr_get_z_2exp (mpz_ptr, mpfr_srcptr); float mpfr_get_flt (mpfr_srcptr, mpfr_rnd_t); double mpfr_get_d (mpfr_srcptr, mpfr_rnd_t); long double mpfr_get_ld (mpfr_srcptr, mpfr_rnd_t) ; double mpfr_get_d1 (mpfr_srcptr); double mpfr_get_d_2exp (long*, mpfr_srcptr, mpfr_rnd_t) ; long double mpfr_get_ld_2exp (long*, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_frexp (mpfr_exp_t*, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; long mpfr_get_si (mpfr_srcptr, mpfr_rnd_t); unsigned long mpfr_get_ui (mpfr_srcptr, mpfr_rnd_t) ; char*mpfr_get_str (char*, mpfr_exp_t*, int, size_t, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_get_z (mpz_ptr z, mpfr_srcptr f, mpfr_rnd_t) ; void mpfr_free_str (char *); int mpfr_urandom (mpfr_ptr, gmp_randstate_t, mpfr_rnd_t) ; int mpfr_grandom (mpfr_ptr, mpfr_ptr, gmp_randstate_t, mpfr_rnd_t) ; int mpfr_urandomb (mpfr_ptr, gmp_randstate_t); void mpfr_nextabove (mpfr_ptr); void mpfr_nextbelow (mpfr_ptr); void mpfr_nexttoward (mpfr_ptr, mpfr_srcptr); int mpfr_printf (const char*, ...); int mpfr_asprintf (char**, const char*, ...) ; int mpfr_sprintf (char*, const char*, ...) ; int mpfr_snprintf (char*, size_t, const char*, ...) ; int mpfr_pow (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_pow_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t) ; int mpfr_pow_ui (mpfr_ptr, mpfr_srcptr, unsigned long int, mpfr_rnd_t) ; int mpfr_ui_pow_ui (mpfr_ptr, unsigned long int, unsigned long int, mpfr_rnd_t) ; int mpfr_ui_pow (mpfr_ptr, unsigned long int, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_pow_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t) ; int mpfr_sqrt (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_sqrt_ui (mpfr_ptr, unsigned long, mpfr_rnd_t) ; int mpfr_rec_sqrt (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_add (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_sub (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_mul (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_div (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_add_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_sub_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_ui_sub (mpfr_ptr, unsigned long, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_mul_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_div_ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_ui_div (mpfr_ptr, unsigned long, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_add_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t) ; int mpfr_sub_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t) ; int mpfr_si_sub (mpfr_ptr, long int, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_mul_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t) ; int mpfr_div_si (mpfr_ptr, mpfr_srcptr, long int, mpfr_rnd_t) ; int mpfr_si_div (mpfr_ptr, long int, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_add_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t) ; int mpfr_sub_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t) ; int mpfr_d_sub (mpfr_ptr, double, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_mul_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t) ; int mpfr_div_d (mpfr_ptr, mpfr_srcptr, double, mpfr_rnd_t) ; int mpfr_d_div (mpfr_ptr, double, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_sqr (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_const_pi (mpfr_ptr, mpfr_rnd_t); int mpfr_const_log2 (mpfr_ptr, mpfr_rnd_t); int mpfr_const_euler (mpfr_ptr, mpfr_rnd_t); int mpfr_const_catalan (mpfr_ptr, mpfr_rnd_t); int mpfr_agm (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_log (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_log2 (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_log10 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_log1p (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_exp (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_exp2 (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_exp10 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_expm1 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_eint (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_li2 (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_cmp (mpfr_srcptr, mpfr_srcptr); int mpfr_cmp3 (mpfr_srcptr, mpfr_srcptr, int); int mpfr_cmp_d (mpfr_srcptr, double); int mpfr_cmp_ld (mpfr_srcptr, long double); int mpfr_cmpabs (mpfr_srcptr, mpfr_srcptr); int mpfr_cmp_ui (mpfr_srcptr, unsigned long); int mpfr_cmp_si (mpfr_srcptr, long); int mpfr_cmp_ui_2exp (mpfr_srcptr, unsigned long, mpfr_exp_t) ; int mpfr_cmp_si_2exp (mpfr_srcptr, long, mpfr_exp_t) ; void mpfr_reldiff (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_eq (mpfr_srcptr, mpfr_srcptr, unsigned long) ; int mpfr_sgn (mpfr_srcptr); int mpfr_mul_2exp (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_div_2exp (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_mul_2ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_div_2ui (mpfr_ptr, mpfr_srcptr, unsigned long, mpfr_rnd_t) ; int mpfr_mul_2si (mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t) ; int mpfr_div_2si (mpfr_ptr, mpfr_srcptr, long, mpfr_rnd_t) ; int mpfr_rint (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t); int mpfr_round (mpfr_ptr, mpfr_srcptr); int mpfr_trunc (mpfr_ptr, mpfr_srcptr); int mpfr_ceil (mpfr_ptr, mpfr_srcptr); int mpfr_floor (mpfr_ptr, mpfr_srcptr); int mpfr_rint_round (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_rint_trunc (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_rint_ceil (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_rint_floor (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_frac (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_modf (mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_remquo (mpfr_ptr, long*, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_remainder (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_fmod (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_fits_ulong_p (mpfr_srcptr, mpfr_rnd_t); int mpfr_fits_slong_p (mpfr_srcptr, mpfr_rnd_t); int mpfr_fits_uint_p (mpfr_srcptr, mpfr_rnd_t); int mpfr_fits_sint_p (mpfr_srcptr, mpfr_rnd_t); int mpfr_fits_ushort_p (mpfr_srcptr, mpfr_rnd_t); int mpfr_fits_sshort_p (mpfr_srcptr, mpfr_rnd_t); int mpfr_fits_uintmax_p (mpfr_srcptr,mpfr_rnd_t); int mpfr_fits_intmax_p (mpfr_srcptr, mpfr_rnd_t); void mpfr_extract (mpz_ptr, mpfr_srcptr, unsigned int) ; void mpfr_swap (mpfr_ptr, mpfr_ptr); void mpfr_dump (mpfr_srcptr); int mpfr_nan_p (mpfr_srcptr); int mpfr_inf_p (mpfr_srcptr); int mpfr_number_p (mpfr_srcptr); int mpfr_integer_p (mpfr_srcptr); int mpfr_zero_p (mpfr_srcptr); int mpfr_regular_p (mpfr_srcptr); int mpfr_greater_p (mpfr_srcptr, mpfr_srcptr); int mpfr_greaterequal_p (mpfr_srcptr, mpfr_srcptr) ; int mpfr_less_p (mpfr_srcptr, mpfr_srcptr); int mpfr_lessequal_p (mpfr_srcptr, mpfr_srcptr); int mpfr_lessgreater_p (mpfr_srcptr,mpfr_srcptr); int mpfr_equal_p (mpfr_srcptr, mpfr_srcptr); int mpfr_unordered_p (mpfr_srcptr, mpfr_srcptr); int mpfr_atanh (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_acosh (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_asinh (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_cosh (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t); int mpfr_sinh (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t); int mpfr_tanh (mpfr_ptr,mpfr_srcptr, mpfr_rnd_t); int mpfr_sinh_cosh (mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_sech (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_csch (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_coth (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_acos (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_asin (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_atan (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_sin (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_sin_cos (mpfr_ptr, mpfr_ptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_cos (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_tan (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_atan2 (mpfr_ptr,mpfr_srcptr,mpfr_srcptr, mpfr_rnd_t) ; int mpfr_sec (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_csc (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_cot (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_hypot (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_erf (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_erfc (mpfr_ptr, mpfr_srcptr,mpfr_rnd_t); int mpfr_cbrt (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_root (mpfr_ptr,mpfr_srcptr,unsigned long,mpfr_rnd_t); int mpfr_gamma (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_lngamma (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_lgamma (mpfr_ptr,int*,mpfr_srcptr,mpfr_rnd_t); int mpfr_digamma (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_zeta (mpfr_ptr,mpfr_srcptr,mpfr_rnd_t); int mpfr_zeta_ui (mpfr_ptr,unsigned long,mpfr_rnd_t); int mpfr_fac_ui (mpfr_ptr, unsigned long int, mpfr_rnd_t) ; int mpfr_j0 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_j1 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_jn (mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_y0 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_y1 (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_yn (mpfr_ptr, long, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_ai (mpfr_ptr, mpfr_srcptr, mpfr_rnd_t); int mpfr_min (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_max (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_dim (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_mul_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t) ; int mpfr_div_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t) ; int mpfr_add_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t) ; int mpfr_sub_z (mpfr_ptr, mpfr_srcptr, mpz_srcptr, mpfr_rnd_t) ; int mpfr_z_sub (mpfr_ptr, mpz_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_cmp_z (mpfr_srcptr, mpz_srcptr); int mpfr_mul_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t) ; int mpfr_div_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t) ; int mpfr_add_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t) ; int mpfr_sub_q (mpfr_ptr, mpfr_srcptr, mpq_srcptr, mpfr_rnd_t) ; int mpfr_cmp_q (mpfr_srcptr, mpq_srcptr); int mpfr_cmp_f (mpfr_srcptr, mpf_srcptr); int mpfr_fma (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_fms (mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, mpfr_rnd_t) ; int mpfr_sum (mpfr_ptr, mpfr_ptr *const, unsigned long, mpfr_rnd_t) ; void mpfr_free_cache (void); int mpfr_subnormalize (mpfr_ptr, int, mpfr_rnd_t) ; int mpfr_strtofr (mpfr_ptr, const char *, char **, int, mpfr_rnd_t) ; size_t mpfr_custom_get_size (mpfr_prec_t); void mpfr_custom_init (void *, mpfr_prec_t); void * mpfr_custom_get_significand (mpfr_srcptr); mpfr_exp_t mpfr_custom_get_exp (mpfr_srcptr); void mpfr_custom_move (mpfr_ptr, void *); void mpfr_custom_init_set (mpfr_ptr, int, mpfr_exp_t, mpfr_prec_t, void *) ; int mpfr_custom_get_kind (mpfr_srcptr); } # 946 "/usr/include/mpfr.h" 3 4 extern "C" { # 955 "/usr/include/mpfr.h" 3 4 int __gmpfr_set_sj (mpfr_t, intmax_t, mpfr_rnd_t); int __gmpfr_set_sj_2exp (mpfr_t, intmax_t, intmax_t, mpfr_rnd_t); int __gmpfr_set_uj (mpfr_t, uintmax_t, mpfr_rnd_t); int __gmpfr_set_uj_2exp (mpfr_t, uintmax_t, intmax_t, mpfr_rnd_t); intmax_t __gmpfr_mpfr_get_sj (mpfr_srcptr, mpfr_rnd_t); uintmax_t __gmpfr_mpfr_get_uj (mpfr_srcptr, mpfr_rnd_t); } # 978 "/usr/include/mpfr.h" 3 4 extern "C" { size_t __gmpfr_inp_str (mpfr_ptr, FILE*, int, mpfr_rnd_t) ; size_t __gmpfr_out_str (FILE*, int, size_t, mpfr_srcptr, mpfr_rnd_t) ; int __gmpfr_fprintf (FILE*, const char*, ...) ; } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx_coercion_traits.h" 2 namespace CGAL { template struct Coercion_traits< ::__gmp_expr< T , U>,::__gmp_expr< T , U> >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef ::__gmp_expr Type; struct Cast{ typedef Type result_type; template Type operator()(const ::__gmp_expr< T , U3>& x) const { return x; } }; }; template struct Coercion_traits< ::__gmp_expr< T , U1>,::__gmp_expr< T , U2> >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef ::__gmp_expr< T , T > Type; struct Cast{ typedef Type result_type; template Type operator()(const ::__gmp_expr< T , U3>& x) const { return x; } }; }; template struct Coercion_traits< ::__gmp_expr< T1 , U1>,::__gmp_expr< T2 , U2> >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef mpq_class Type; struct Cast{ typedef Type result_type; template Type operator()(const ::__gmp_expr< T , U>& x) const { return Type(x); } }; }; template struct Coercion_traits< ::__gmp_expr< T , U >, int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef ::__gmp_expr< T , T > Type; struct Cast{ typedef Type result_type; template Type operator()(const ::__gmp_expr< T , U3>& x) const { return x; } Type operator()(int x) const { return Type(x); } }; }; template struct Coercion_traits< int , ::__gmp_expr< T , U> > :public Coercion_traits< ::__gmp_expr< T , U>, int >{}; } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" 2 # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" namespace CGAL { template<> class Algebraic_structure_traits< mpz_class > :public Algebraic_structure_traits_base< mpz_class , Euclidean_ring_tag > { public: typedef mpz_class Type; typedef Euclidean_ring_tag Algebraic_category; typedef Tag_true Is_exact; typedef Tag_false Is_numerical_sensitive; struct Is_zero: public std::unary_function< mpz_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) == 0; } }; struct Is_one: public std::unary_function< mpz_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return x == 1; } }; struct Simplify: public std::unary_function< mpz_class , void > { template void operator()( const ::__gmp_expr< T ,U >&) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; } }; struct Square: public std::unary_function< mpz_class , mpz_class > { mpz_class operator()( const mpz_class& x) const { return x*x; } }; struct Unit_part: public std::unary_function< mpz_class , mpz_class > { mpz_class operator()( const mpz_class& x) const { return (x < 0) ? -1 : 1; } }; struct Integral_division: public std::binary_function< mpz_class , mpz_class, mpz_class > { template mpz_class operator()( const ::__gmp_expr< T , U1 >& x, const ::__gmp_expr< T , U2 >& y) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; mpz_class result = x / y; (CGAL::possibly(result * y == x)?(static_cast(0)): ::CGAL::precondition_fail( "result * y == x" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" # 105 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" , 107 # 105 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" , "'x' must be divisible by 'y' in " "Algebraic_structure_traits::Integral_div()(x,y)")) ; return result; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; struct Gcd : public std::binary_function< mpz_class, mpz_class, mpz_class > { mpz_class operator()( const mpz_class& x, const mpz_class& y) const { mpz_class c; __gmpz_gcd(c.get_mpz_t(),x.get_mpz_t(), y.get_mpz_t() ); return c; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; struct Div : public std::binary_function< mpz_class, mpz_class, mpz_class > { template mpz_class operator()( const ::__gmp_expr< T , U1 >& x, const ::__gmp_expr< T , U2 >& y) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return x / y; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; struct Mod : public std::binary_function< mpz_class, mpz_class, mpz_class > { template mpz_class operator()( const ::__gmp_expr< T , U1 >& x, const ::__gmp_expr< T , U2 >& y) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return x % y; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; struct Div_mod { typedef mpz_class first_argument_type; typedef mpz_class second_argument_type; typedef mpz_class& third_argument_type; typedef mpz_class& fourth_argument_type; typedef void result_type; void operator()( const mpz_class& x, const mpz_class& y, mpz_class& q, mpz_class& r ) const { typedef Algebraic_structure_traits Traits; Traits::Div actual_div; Traits::Mod actual_mod; q = actual_div( x, y ); r = actual_mod( x, y ); return; } }; struct Sqrt: public std::unary_function< mpz_class , mpz_class > { template mpz_class operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sqrt(x); } }; # 191 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpz_class.h" }; template<> class Real_embeddable_traits< mpz_class > : public INTERN_RET::Real_embeddable_traits_base< mpz_class , CGAL::Tag_true > { public: struct Is_zero: public std::unary_function< mpz_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) == 0; } }; struct Is_finite: public std::unary_function { template bool operator()( const ::__gmp_expr< T , U >& ) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return true; } }; struct Is_positive: public std::unary_function< mpz_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) > 0; } }; struct Is_negative: public std::unary_function< mpz_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) < 0; } }; struct Abs: public std::unary_function< mpz_class , mpz_class > { template mpz_class operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::abs(x); } }; struct Sgn : public std::unary_function< mpz_class, ::CGAL::Sign > { public: template ::CGAL::Sign operator()( const ::__gmp_expr< T , U >& x ) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return (::CGAL::Sign) ::sgn( x ); } }; struct Compare : public std::binary_function< mpz_class, mpz_class, Comparison_result > { template Comparison_result operator()( const ::__gmp_expr< T , U1 >& x, const ::__gmp_expr< T , U2 >& y ) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return (Comparison_result) ::CGAL:: sign( ::cmp(x, y) ); } template < class CT_Type_1, class CT_Type_2 > Comparison_result operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; struct To_double : public std::unary_function< mpz_class, double > { double operator()( const mpz_class& x ) const { return x.get_d(); } }; struct To_interval : public std::unary_function< mpz_class, std::pair< double, double > > { std::pair operator()( const mpz_class& x ) const { mpfr_t y; mpfr_init2 (y, 53); mpfr_set_z (y, x.get_mpz_t(), MPFR_RNDD); double i = mpfr_get_d (y, MPFR_RNDD); mpfr_set_z (y, x.get_mpz_t(), MPFR_RNDU); double s = mpfr_get_d (y, MPFR_RNDU); mpfr_clear (y); return std::pair(i, s); } }; }; template<> class Modular_traits< mpz_class > { public: typedef mpz_class NT; typedef CGAL::Tag_true Is_modularizable; typedef Residue Residue_type; struct Modular_image{ Residue_type operator()(const mpz_class& a){ NT tmp(CGAL::mod(a,NT(Residue::get_current_prime()))); return CGAL::Residue(int(__gmpz_get_si(tmp.get_mpz_t()))); } }; struct Modular_image_representative{ NT operator()(const Residue_type& x){ return NT(x.get_value()); } }; }; template <> struct Split_double { void operator()(double d, mpz_class &num, mpz_class &den) const { std::pair p = split_numerator_denominator(d); num = mpz_class(p.first); den = mpz_class(p.second); } }; } # 48 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpq_class.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpq_class.h" namespace CGAL { template<> class Algebraic_structure_traits< mpq_class > : public Algebraic_structure_traits_base< mpq_class , Field_tag > { public: typedef mpq_class Type; typedef Field_tag Algebraic_category; typedef Tag_true Is_exact; typedef Tag_false Is_numerical_sensitive; struct Is_zero: public std::unary_function< mpq_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) == 0; } }; struct Is_one: public std::unary_function< mpq_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return x == 1; } }; struct Simplify: public std::unary_function< mpq_class , void > { void operator()( mpq_class& x) const { x.canonicalize(); } }; struct Square: public std::unary_function< mpq_class , mpq_class > { mpq_class operator()( const mpq_class& x) const { return x*x; } }; struct Unit_part: public std::unary_function< mpq_class , mpq_class > { mpq_class operator()( const mpq_class& x) const { return( x == 0) ? mpq_class(1) : x; } }; struct Integral_division : public std::binary_function< mpq_class , mpq_class, mpq_class > { template mpq_class operator()( const ::__gmp_expr< T , U1 >& x, const ::__gmp_expr< T , U2 > & y) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; mpq_class result = x / y; (CGAL::possibly(result * y == x)?(static_cast(0)): ::CGAL::precondition_fail( "result * y == x" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpq_class.h" # 101 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpq_class.h" , 103 # 101 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/mpq_class.h" , "'x' must be divisible by 'y' in " "Algebraic_structure_traits::Integral_div()(x,y)")) ; return result; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class Is_square : public std::binary_function< mpq_class, mpq_class&, bool > { public: bool operator()( const mpq_class& x, mpq_class& y ) const { y = mpq_class (::sqrt( x.get_num() ), ::sqrt( x.get_den() )) ; return y*y == x; } bool operator()( const mpq_class& x ) const { mpq_class y; return operator()(x,y); } }; }; template < > class Real_embeddable_traits< mpq_class > : public INTERN_RET::Real_embeddable_traits_base< mpq_class , CGAL::Tag_true > { public: struct Is_zero: public std::unary_function< mpq_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) == 0; } }; struct Is_finite: public std::unary_function { template bool operator()( const ::__gmp_expr< T , U >&) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return true; } }; struct Is_positive: public std::unary_function< mpq_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) > 0; } }; struct Is_negative: public std::unary_function< mpq_class , bool > { template bool operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::sgn(x) < 0; } }; struct Abs: public std::unary_function< mpq_class , mpq_class > { template mpq_class operator()( const ::__gmp_expr< T , U >& x) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return ::abs(x); } }; struct Sgn : public std::unary_function< mpq_class, ::CGAL::Sign > { public: template ::CGAL::Sign operator()( const ::__gmp_expr< T , U >& x ) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return (::CGAL::Sign) ::sgn( x ); } }; struct Compare : public std::binary_function< mpq_class, mpq_class, Comparison_result> { template Comparison_result operator()( const ::__gmp_expr< T , U1 >& x, const ::__gmp_expr< T , U2 >& y ) const { static_assert((::boost::is_same< ::__gmp_expr< T , T >,Type>::value ), "(::boost::is_same< ::__gmp_expr< T , T >,Type>::value )");; return (Comparison_result) ::CGAL:: sign( ::cmp(x, y) ); } template < class CT_Type_1, class CT_Type_2 > Comparison_result operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; struct To_double : public std::unary_function< mpq_class, double > { double operator()( const mpq_class& x ) const { return x.get_d(); } }; struct To_interval : public std::unary_function< mpq_class, std::pair< double, double > > { std::pair operator()( const mpq_class& x ) const { mpfr_t y; mpfr_init2 (y, 53); mpfr_set_q (y, x.get_mpq_t(), MPFR_RNDD); double i = mpfr_get_d (y, MPFR_RNDD); mpfr_set_q (y, x.get_mpq_t(), MPFR_RNDU); double s = mpfr_get_d (y, MPFR_RNDU); mpfr_clear (y); return std::pair(i, s); } }; }; template <> class Fraction_traits< mpq_class > { public: typedef mpq_class Type; typedef ::CGAL::Tag_true Is_fraction; typedef mpz_class Numerator_type; typedef mpz_class Denominator_type; typedef Algebraic_structure_traits< mpz_class >::Gcd Common_factor; class Decompose { public: typedef mpq_class first_argument_type; typedef mpz_class& second_argument_type; typedef mpz_class& third_argument_type; void operator () ( const mpq_class& rat, mpz_class& num, mpz_class& den) { num = rat.get_num(); den = rat.get_den(); } }; class Compose { public: typedef mpz_class first_argument_type; typedef mpz_class second_argument_type; typedef mpq_class result_type; mpq_class operator ()( const mpz_class& num , const mpz_class& den ) { mpq_class result(num, den); result.canonicalize(); return result; } }; }; } # 49 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmpxx.h" 2 namespace CGAL { template < typename T, typename U > class Algebraic_structure_traits< ::__gmp_expr > : public Algebraic_structure_traits< ::__gmp_expr >{}; template < typename T, typename U > class Real_embeddable_traits< ::__gmp_expr > : public Real_embeddable_traits< ::__gmp_expr >{}; } # 94 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/number_type_basic.h" 2 # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_basic.h" 1 # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_basic.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/aff_transformation_tags.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/aff_transformation_tags.h" namespace CGAL { class Translation {}; class Rotation {}; class Scaling {}; class Reflection {}; class Identity_transformation {}; extern Translation TRANSLATION; extern Rotation ROTATION; extern Scaling SCALING; extern Reflection REFLECTION; extern Identity_transformation IDENTITY; } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Object.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Object.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for_virtual.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for_virtual.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for_virtual.h" 2 namespace CGAL { class Ref_counted_virtual { public: Ref_counted_virtual() : count(1) {} Ref_counted_virtual(const Ref_counted_virtual&) : count(1) {} void add_reference() { ++count; } void remove_reference() { --count; } bool is_referenced() const { return (count != 0); } bool is_shared() const { return (count > 1); } virtual const std::type_info & type() const { return typeid(void); } virtual const void * object_ptr() const { return __null; } virtual ~Ref_counted_virtual() {} protected: unsigned int count; }; template class Handle_for_virtual { public: typedef std::ptrdiff_t Id_type ; Handle_for_virtual(const RefCounted& rc) { ptr = new RefCounted(rc); } Handle_for_virtual() { ptr = __null; } Handle_for_virtual( const Handle_for_virtual& h) { ptr = h.ptr; ptr->add_reference(); } ~Handle_for_virtual() { ptr->remove_reference(); if ( !ptr->is_referenced() ) delete ptr; } Handle_for_virtual& operator=( const Handle_for_virtual& h) { h.ptr->add_reference(); ptr->remove_reference(); if ( !ptr->is_referenced() ) delete ptr; ptr = h.ptr; return *this; } Handle_for_virtual& operator=( Handle_for_virtual && h) { swap(h); return *this; } typedef RefCounted element_type; template void initialize_with( const T& rc) { ptr = new T(rc); } Id_type id() const { return Ptr() - static_cast(0); } bool identical( const Handle_for_virtual& h) const { return Ptr() == h.Ptr(); } void swap(Handle_for_virtual & h) { std::swap(h.ptr, ptr); } const RefCounted * Ptr() const { return ptr; } const void * object_ptr() const { return ptr->object_ptr(); } # 166 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for_virtual.h" protected: # 175 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for_virtual.h" RefCounted * ptr; }; template inline bool identical(const Handle_for_virtual &h1, const Handle_for_virtual &h2) { return h1.identical(h2); } } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Object.h" 2 namespace CGAL { template class Wrapper : public Ref_counted_virtual { Wrapper(const Wrapper&); public: Wrapper(const T& object) : _object(object) {} Wrapper(T && object) : _object(std::move(object)) {} ~Wrapper() {} const T& get() const { return _object; } virtual const std::type_info & type() const { return typeid(T); } virtual const void * object_ptr() const { return & _object; } private: T _object; }; class Object : public Handle_for_virtual { struct Empty {}; typedef Handle_for_virtual base; public: struct private_tag{}; Object() { typedef Wrapper Wrap; ptr = new Wrap(Empty()); } template Object(T && t, private_tag) { typedef Wrapper< typename std::remove_cv< typename std::remove_reference::type >::type > Wrap; ptr = new Wrap(std::forward(t)); } # 101 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Object.h" template bool assign(T &t) const { const Wrapper *wp = dynamic_cast *>(Ptr()); if (wp == __null) return false; t = wp->get(); return true; } bool empty() const { Empty E; return assign(E); } bool is_empty() const { return empty(); } template bool is() const { return __null != dynamic_cast *>(Ptr()); } const std::type_info & type() const { return empty() ? typeid(void) : Ptr()->type(); } bool operator==(Nullptr_t n) const { (CGAL::possibly(n == 0)?(static_cast(0)): ::CGAL::assertion_fail( "n == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Object.h", 149)); return empty(); } bool operator!=(Nullptr_t n) const { (CGAL::possibly(n == 0)?(static_cast(0)): ::CGAL::assertion_fail( "n == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Object.h", 151)); return !empty(); } }; template inline Object make_object(T && t) { return Object(std::forward(t), Object::private_tag()); } # 175 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Object.h" template inline bool assign(T& t, const Object& o) { return o.assign(t); } struct Bad_object_cast : public std::bad_cast { virtual const char * what() const throw() { return "CGAL::bad_object_cast: " "failed conversion using CGAL::object_cast"; } }; template inline const T * object_cast(const Object * o) { const Wrapper *wp = dynamic_cast *>(o->Ptr()); if (wp == __null) return __null; return static_cast(wp->object_ptr()); } template inline T object_cast(const Object & o) { const T * result = object_cast(&o); if (!result) throw Bad_object_cast(); return *result; } } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Qualified_result_of.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Qualified_result_of.h" # 1 "/localhome/glisse2/include/boost/type_traits.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/add_cv.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/add_cv.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/add_cv.hpp" 2 namespace boost { # 34 "/localhome/glisse2/include/boost/type_traits/add_cv.hpp" template< typename T > struct add_cv { public: typedef T const volatile type; }; template< typename T > struct add_cv { public: typedef T& type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 47 "/localhome/glisse2/include/boost/type_traits/add_cv.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/add_lvalue_reference.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/add_lvalue_reference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/add_lvalue_reference.hpp" 2 namespace boost{ template< typename T > struct add_lvalue_reference { public: typedef typename boost::add_reference::type type; }; template< typename T > struct add_lvalue_reference { public: typedef T& type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/add_lvalue_reference.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/add_volatile.hpp" 1 # 16 "/localhome/glisse2/include/boost/type_traits/add_volatile.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 17 "/localhome/glisse2/include/boost/type_traits/add_volatile.hpp" 2 namespace boost { # 33 "/localhome/glisse2/include/boost/type_traits/add_volatile.hpp" template< typename T > struct add_volatile { public: typedef T volatile type; }; template< typename T > struct add_volatile { public: typedef T& type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 46 "/localhome/glisse2/include/boost/type_traits/add_volatile.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/aligned_storage.hpp" 1 # 11 "/localhome/glisse2/include/boost/type_traits/aligned_storage.hpp" # 1 "/localhome/glisse2/include/boost/aligned_storage.hpp" 1 # 16 "/localhome/glisse2/include/boost/aligned_storage.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 17 "/localhome/glisse2/include/boost/aligned_storage.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 14 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/size_t.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/size_t.hpp" # 1 "/localhome/glisse2/include/boost/mpl/size_t_fwd.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/size_t_fwd.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 20 "/localhome/glisse2/include/boost/mpl/size_t_fwd.hpp" 2 namespace mpl_ { template< std::size_t N > struct size_t; } namespace boost { namespace mpl { using ::mpl_::size_t; } } # 18 "/localhome/glisse2/include/boost/mpl/size_t.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" 1 # 40 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" namespace mpl_ { template< std::size_t N > struct size_t { static const std::size_t value = N; typedef size_t type; typedef std::size_t value_type; typedef integral_c_tag tag; # 72 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" typedef mpl_::size_t< static_cast((value + 1)) > next; typedef mpl_::size_t< static_cast((value - 1)) > prior; operator std::size_t() const { return static_cast(this->value); } }; template< std::size_t N > std::size_t const mpl_::size_t< N >::value; } # 24 "/localhome/glisse2/include/boost/mpl/size_t.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 20 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" namespace boost { template struct alignment_of; namespace detail { template struct alignment_of_hack { char c; T t; alignment_of_hack(); }; template struct alignment_logic { static const std::size_t value = A < S ? A : S; }; template< typename T > struct alignment_of_impl { # 83 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" static const std::size_t value = __alignof__(T); }; } template< typename T > struct alignment_of : public ::boost::integral_constant::value> { public: }; template struct alignment_of : public alignment_of { }; # 109 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" template<> struct alignment_of : public ::boost::integral_constant { public: }; template<> struct alignment_of : public ::boost::integral_constant { public: }; template<> struct alignment_of : public ::boost::integral_constant { public: }; template<> struct alignment_of : public ::boost::integral_constant { public: }; } # 125 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_undef.hpp" 1 # 126 "/localhome/glisse2/include/boost/type_traits/alignment_of.hpp" 2 # 21 "/localhome/glisse2/include/boost/aligned_storage.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/list/for_each_i.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/list/for_each_i.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/for.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/repetition/for.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/repetition/for.hpp" 2 # 42 "/localhome/glisse2/include/boost/preprocessor/repetition/for.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/detail/for.hpp" 1 # 43 "/localhome/glisse2/include/boost/preprocessor/repetition/for.hpp" 2 # 21 "/localhome/glisse2/include/boost/preprocessor/list/for_each_i.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/tuple/rem.hpp" 1 # 23 "/localhome/glisse2/include/boost/preprocessor/list/for_each_i.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/tuple/to_list.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/list/transform.hpp" 1 # 16 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/list/append.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 2 namespace boost { namespace detail { class alignment_dummy; typedef void (*function_ptr)(); typedef int (alignment_dummy::*member_ptr); typedef int (alignment_dummy::*member_function_ptr)(); # 101 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" template struct lower_alignment_helper { typedef char type; enum { value = true }; }; template struct lower_alignment_helper { enum { value = (alignment_of::value == target) }; typedef typename mpl::if_c::type type; }; # 127 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" template struct has_one_T { T data; }; template union lower_alignment { enum { found0 = false }; typename lower_alignment_helper< found0,target,char >::type t0; enum { found1 = lower_alignment_helper::value }; typename lower_alignment_helper< found1,target,short >::type t1; enum { found2 = lower_alignment_helper::value }; typename lower_alignment_helper< found2,target,int >::type t2; enum { found3 = lower_alignment_helper::value }; typename lower_alignment_helper< found3,target,long >::type t3; enum { found4 = lower_alignment_helper::value }; typename lower_alignment_helper< found4,target,::boost::long_long_type >::type t4; enum { found5 = lower_alignment_helper::value }; typename lower_alignment_helper< found5,target,float >::type t5; enum { found6 = lower_alignment_helper::value }; typename lower_alignment_helper< found6,target,double >::type t6; enum { found7 = lower_alignment_helper::value }; typename lower_alignment_helper< found7,target,long double >::type t7; enum { found8 = lower_alignment_helper::value }; typename lower_alignment_helper< found8,target,void* >::type t8; enum { found9 = lower_alignment_helper::value }; typename lower_alignment_helper< found9,target,function_ptr >::type t9; enum { found10 = lower_alignment_helper::value }; typename lower_alignment_helper< found10,target,member_ptr >::type t10; enum { found11 = lower_alignment_helper::value }; typename lower_alignment_helper< found11,target,member_function_ptr >::type t11; enum { found12 = lower_alignment_helper::value }; typename lower_alignment_helper< found12,target,boost::detail::has_one_T< char > >::type t12; enum { found13 = lower_alignment_helper >::value }; typename lower_alignment_helper< found13,target,boost::detail::has_one_T< short > >::type t13; enum { found14 = lower_alignment_helper >::value }; typename lower_alignment_helper< found14,target,boost::detail::has_one_T< int > >::type t14; enum { found15 = lower_alignment_helper >::value }; typename lower_alignment_helper< found15,target,boost::detail::has_one_T< long > >::type t15; enum { found16 = lower_alignment_helper >::value }; typename lower_alignment_helper< found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::type t16; enum { found17 = lower_alignment_helper >::value }; typename lower_alignment_helper< found17,target,boost::detail::has_one_T< float > >::type t17; enum { found18 = lower_alignment_helper >::value }; typename lower_alignment_helper< found18,target,boost::detail::has_one_T< double > >::type t18; enum { found19 = lower_alignment_helper >::value }; typename lower_alignment_helper< found19,target,boost::detail::has_one_T< long double > >::type t19; enum { found20 = lower_alignment_helper >::value }; typename lower_alignment_helper< found20,target,boost::detail::has_one_T< void* > >::type t20; enum { found21 = lower_alignment_helper >::value }; typename lower_alignment_helper< found21,target,boost::detail::has_one_T< function_ptr > >::type t21; enum { found22 = lower_alignment_helper >::value }; typename lower_alignment_helper< found22,target,boost::detail::has_one_T< member_ptr > >::type t22; enum { found23 = lower_alignment_helper >::value }; typename lower_alignment_helper< found23,target,boost::detail::has_one_T< member_function_ptr > >::type t23; enum { found24 = lower_alignment_helper >::value }; }; union max_align { char t0; short t1; int t2; long t3; ::boost::long_long_type t4; float t5; double t6; long double t7; void* t8; function_ptr t9; member_ptr t10; member_function_ptr t11; boost::detail::has_one_T< char > t12; boost::detail::has_one_T< short > t13; boost::detail::has_one_T< int > t14; boost::detail::has_one_T< long > t15; boost::detail::has_one_T< ::boost::long_long_type > t16; boost::detail::has_one_T< float > t17; boost::detail::has_one_T< double > t18; boost::detail::has_one_T< long double > t19; boost::detail::has_one_T< void* > t20; boost::detail::has_one_T< function_ptr > t21; boost::detail::has_one_T< member_ptr > t22; boost::detail::has_one_T< member_function_ptr > t23; }; # 161 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" template struct is_aligned { static const bool value = (TAlign >= Align) & (TAlign % Align == 0) ; }; # 180 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" } template struct is_pod< ::boost::detail::lower_alignment > { static const std::size_t value = true; }; namespace detail{ template class type_with_alignment_imp { typedef ::boost::detail::lower_alignment t1; typedef typename mpl::if_c< ::boost::detail::is_aligned< ::boost::alignment_of::value,Align >::value , t1 , ::boost::detail::max_align >::type align_t; static const std::size_t found = alignment_of::value; static_assert(found >= Align, "found >= Align"); static_assert(found % Align == 0, "found % Align == 0"); public: typedef align_t type; }; } template class type_with_alignment : public ::boost::detail::type_with_alignment_imp { }; namespace align { struct __attribute__((__aligned__(2))) a2 {}; struct __attribute__((__aligned__(4))) a4 {}; struct __attribute__((__aligned__(8))) a8 {}; struct __attribute__((__aligned__(16))) a16 {}; struct __attribute__((__aligned__(32))) a32 {}; } template<> class type_with_alignment<1> { public: typedef char type; }; template<> class type_with_alignment<2> { public: typedef align::a2 type; }; template<> class type_with_alignment<4> { public: typedef align::a4 type; }; template<> class type_with_alignment<8> { public: typedef align::a8 type; }; template<> class type_with_alignment<16> { public: typedef align::a16 type; }; template<> class type_with_alignment<32> { public: typedef align::a32 type; }; namespace detail { template<> struct is_pod_impl< ::boost::align::a2 > { public: static const bool value = (true); }; template<> struct is_pod_impl< ::boost::align::a4 > { public: static const bool value = (true); }; template<> struct is_pod_impl< ::boost::align::a8 > { public: static const bool value = (true); }; template<> struct is_pod_impl< ::boost::align::a16 > { public: static const bool value = (true); }; template<> struct is_pod_impl< ::boost::align::a32 > { public: static const bool value = (true); }; } # 383 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 390 "/localhome/glisse2/include/boost/type_traits/type_with_alignment.hpp" 2 # 22 "/localhome/glisse2/include/boost/aligned_storage.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 28 "/localhome/glisse2/include/boost/aligned_storage.hpp" 2 namespace boost { namespace detail { namespace aligned_storage { static const std::size_t alignment_of_max_align = ::boost::alignment_of::value ; template < std::size_t size_ , std::size_t alignment_ > struct aligned_storage_imp { union data_t { char buf[size_]; typename mpl::eval_if_c< alignment_ == std::size_t(-1) , mpl::identity , type_with_alignment >::type align_; } data_; void* address() const { return const_cast(this); } }; template< std::size_t alignment_ > struct aligned_storage_imp<0u,alignment_> { void* address() const { return 0; } }; }} template < std::size_t size_ , std::size_t alignment_ = std::size_t(-1) > class aligned_storage : private detail::aligned_storage::aligned_storage_imp { public: typedef detail::aligned_storage::aligned_storage_imp type; static const std::size_t size = size_ ; static const std::size_t alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ ) ; private: aligned_storage(const aligned_storage&); aligned_storage& operator=(const aligned_storage&); # 118 "/localhome/glisse2/include/boost/aligned_storage.hpp" public: aligned_storage() { } ~aligned_storage() { } public: void* address() { return static_cast(this)->address(); } const void* address() const { return static_cast(this)->address(); } }; # 168 "/localhome/glisse2/include/boost/aligned_storage.hpp" template struct is_pod > : public ::boost::integral_constant { }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 180 "/localhome/glisse2/include/boost/aligned_storage.hpp" 2 # 12 "/localhome/glisse2/include/boost/type_traits/aligned_storage.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/common_type.hpp" 1 # 54 "/localhome/glisse2/include/boost/type_traits/common_type.hpp" # 1 "/localhome/glisse2/include/boost/utility/declval.hpp" 1 # 37 "/localhome/glisse2/include/boost/utility/declval.hpp" namespace boost { template typename add_rvalue_reference::type declval(); } # 55 "/localhome/glisse2/include/boost/type_traits/common_type.hpp" 2 # 66 "/localhome/glisse2/include/boost/type_traits/common_type.hpp" namespace boost { template struct common_type; # 83 "/localhome/glisse2/include/boost/type_traits/common_type.hpp" template struct common_type { static_assert(sizeof(T) > 0,"must be complete type"); public: typedef T type; }; namespace type_traits_detail { template struct common_type_2 { private: static_assert(sizeof(T) > 0,"must be complete type"); static_assert(sizeof(U) > 0,"must be complete type"); static bool declval_bool(); static typename add_rvalue_reference::type declval_T(); static typename add_rvalue_reference::type declval_U(); static typename add_rvalue_reference::type declval_b(); public: typedef decltype(declval() ? declval() : declval()) type; # 128 "/localhome/glisse2/include/boost/type_traits/common_type.hpp" }; template struct common_type_2 { typedef T type; }; } template struct common_type : public type_traits_detail::common_type_2 { }; template struct common_type { public: typedef typename common_type::type, V...>::type type; }; } # 23 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/conditional.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/conditional.hpp" namespace boost { template struct conditional : public mpl::if_c { }; } # 24 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/decay.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/decay.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/remove_bounds.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/remove_bounds.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 14 "/localhome/glisse2/include/boost/type_traits/remove_bounds.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/remove_bounds.hpp" 2 namespace boost { template< typename T > struct remove_bounds { public: typedef T type; }; template< typename T, std::size_t N > struct remove_bounds { public: typedef T type; }; template< typename T, std::size_t N > struct remove_bounds { public: typedef T const type; }; template< typename T, std::size_t N > struct remove_bounds { public: typedef T volatile type; }; template< typename T, std::size_t N > struct remove_bounds { public: typedef T const volatile type; }; template< typename T > struct remove_bounds { public: typedef T type; }; template< typename T > struct remove_bounds { public: typedef T const type; }; template< typename T > struct remove_bounds { public: typedef T volatile type; }; template< typename T > struct remove_bounds { public: typedef T const volatile type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 47 "/localhome/glisse2/include/boost/type_traits/remove_bounds.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/decay.hpp" 2 namespace boost { template< class T > struct decay { private: typedef typename remove_reference::type Ty; public: typedef typename mpl::eval_if< is_array, mpl::identity::type*>, typename mpl::eval_if< is_function, add_pointer, mpl::identity > >::type type; }; } # 25 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/extent.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/extent.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 20 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/extent.hpp" 2 namespace boost { namespace detail{ # 29 "/localhome/glisse2/include/boost/type_traits/extent.hpp" template struct extent_imp { static const std::size_t value = 0; }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = R; }; template struct extent_imp { static const std::size_t value = R; }; template struct extent_imp { static const std::size_t value = R; }; template struct extent_imp { static const std::size_t value = R; }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = (::boost::detail::extent_imp::value); }; template struct extent_imp { static const std::size_t value = 0; }; template struct extent_imp { static const std::size_t value = 0; }; template struct extent_imp { static const std::size_t value = 0; }; template struct extent_imp { static const std::size_t value = 0; }; } template struct extent : public ::boost::integral_constant::value> { }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_undef.hpp" 1 # 144 "/localhome/glisse2/include/boost/type_traits/extent.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/floating_point_promotion.hpp" 1 # 21 "/localhome/glisse2/include/boost/type_traits/floating_point_promotion.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/floating_point_promotion.hpp" 2 namespace boost { namespace type_traits { namespace detail { template struct floating_point_promotion { typedef T type; }; template<> struct floating_point_promotion { typedef double type; }; template<> struct floating_point_promotion { typedef double const type; }; template<> struct floating_point_promotion { typedef double volatile type; }; template<> struct floating_point_promotion { typedef double const volatile type; }; # 78 "/localhome/glisse2/include/boost/type_traits/floating_point_promotion.hpp" } } template< typename T > struct floating_point_promotion { public: typedef typename boost::type_traits::detail::floating_point_promotion::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 89 "/localhome/glisse2/include/boost/type_traits/floating_point_promotion.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_new_operator.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/has_new_operator.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 14 "/localhome/glisse2/include/boost/type_traits/has_new_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/has_new_operator.hpp" 2 namespace boost { namespace detail { template struct test; template struct has_new_operator_impl { template static type_traits::yes_type check_sig1( U*, test< void *(*)(std::size_t), &U::operator new >* = __null ); template static type_traits::no_type check_sig1(...); template static type_traits::yes_type check_sig2( U*, test< void *(*)(std::size_t, const std::nothrow_t&), &U::operator new >* = __null ); template static type_traits::no_type check_sig2(...); template static type_traits::yes_type check_sig3( U*, test< void *(*)(std::size_t, void*), &U::operator new >* = __null ); template static type_traits::no_type check_sig3(...); template static type_traits::yes_type check_sig4( U*, test< void *(*)(std::size_t), &U::operator new[] >* = __null ); template static type_traits::no_type check_sig4(...); template static type_traits::yes_type check_sig5( U*, test< void *(*)(std::size_t, const std::nothrow_t&), &U::operator new[] >* = __null ); template static type_traits::no_type check_sig5(...); template static type_traits::yes_type check_sig6( U*, test< void *(*)(std::size_t, void*), &U::operator new[] >* = __null ); template static type_traits::no_type check_sig6(...); static const unsigned s1 = sizeof(has_new_operator_impl::template check_sig1(0)); static const unsigned s2 = sizeof(has_new_operator_impl::template check_sig2(0)); static const unsigned s3 = sizeof(has_new_operator_impl::template check_sig3(0)); static const unsigned s4 = sizeof(has_new_operator_impl::template check_sig4(0)); static const unsigned s5 = sizeof(has_new_operator_impl::template check_sig5(0)); static const unsigned s6 = sizeof(has_new_operator_impl::template check_sig6(0)); # 121 "/localhome/glisse2/include/boost/type_traits/has_new_operator.hpp" static const bool value = (::boost::type_traits::ice_or< (s1 == sizeof(type_traits::yes_type)), (s2 == sizeof(type_traits::yes_type)), (s3 == sizeof(type_traits::yes_type)), (s4 == sizeof(type_traits::yes_type)), (s5 == sizeof(type_traits::yes_type)), (s6 == sizeof(type_traits::yes_type)) >::value) # 130 "/localhome/glisse2/include/boost/type_traits/has_new_operator.hpp" ; }; } template< typename T > struct has_new_operator : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 139 "/localhome/glisse2/include/boost/type_traits/has_new_operator.hpp" 2 # 30 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_nothrow_assign.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/has_nothrow_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/has_trivial_assign.hpp" 1 # 22 "/localhome/glisse2/include/boost/type_traits/has_trivial_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 23 "/localhome/glisse2/include/boost/type_traits/has_trivial_assign.hpp" 2 namespace boost { namespace detail { template struct has_trivial_assign_impl { static const bool value = ((__has_trivial_assign(T) ) && ! ::boost::is_volatile::value && ! ::boost::is_const::value); # 41 "/localhome/glisse2/include/boost/type_traits/has_trivial_assign.hpp" }; } template< typename T > struct has_trivial_assign : public ::boost::integral_constant::value> { public: }; template<> struct has_trivial_assign< void > : public ::boost::integral_constant { public: }; template<> struct has_trivial_assign< void const > : public ::boost::integral_constant { public: }; template<> struct has_trivial_assign< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_trivial_assign< void volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 56 "/localhome/glisse2/include/boost/type_traits/has_trivial_assign.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/has_nothrow_assign.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/has_nothrow_assign.hpp" 2 namespace boost { namespace detail{ template struct has_nothrow_assign_imp{ static const bool value = ((__has_nothrow_assign(T) ) && !is_volatile::value && !is_const::value); }; } template< typename T > struct has_nothrow_assign : public ::boost::integral_constant::value> { public: }; template<> struct has_nothrow_assign< void > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_assign< void const > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_assign< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_assign< void volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_nothrow_assign.hpp" 2 # 32 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_nothrow_constructor.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/has_nothrow_constructor.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/has_trivial_constructor.hpp" 1 # 18 "/localhome/glisse2/include/boost/type_traits/has_trivial_constructor.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 19 "/localhome/glisse2/include/boost/type_traits/has_trivial_constructor.hpp" 2 namespace boost { namespace detail { template struct has_trivial_ctor_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod::value, ((__has_trivial_constructor(T) ) && ! ::boost::is_volatile::value) >::value) ; }; } template< typename T > struct has_trivial_constructor : public ::boost::integral_constant::value> { public: }; template< typename T > struct has_trivial_default_constructor : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 50 "/localhome/glisse2/include/boost/type_traits/has_trivial_constructor.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/has_nothrow_constructor.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/has_nothrow_constructor.hpp" 2 namespace boost { namespace detail{ template struct has_nothrow_constructor_imp{ static const bool value = (__has_nothrow_constructor(T) ); }; } template< typename T > struct has_nothrow_constructor : public ::boost::integral_constant::value> { public: }; template< typename T > struct has_nothrow_default_constructor : public ::boost::integral_constant::value> { public: }; template<> struct has_nothrow_constructor< void > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_constructor< void const > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_constructor< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_constructor< void volatile > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_default_constructor< void > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_default_constructor< void const > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_default_constructor< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_default_constructor< void volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 52 "/localhome/glisse2/include/boost/type_traits/has_nothrow_constructor.hpp" 2 # 33 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_nothrow_copy.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/has_nothrow_copy.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/has_trivial_copy.hpp" 1 # 21 "/localhome/glisse2/include/boost/type_traits/has_trivial_copy.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/has_trivial_copy.hpp" 2 namespace boost { namespace detail { template struct has_trivial_copy_impl { static const bool value = ((__has_trivial_copy(T) ) && !is_reference::value && ! ::boost::is_volatile::value); }; } template< typename T > struct has_trivial_copy : public ::boost::integral_constant::value> { public: }; template< typename T > struct has_trivial_copy_constructor : public ::boost::integral_constant::value> { public: }; template<> struct has_trivial_copy< void > : public ::boost::integral_constant { public: }; template<> struct has_trivial_copy< void const > : public ::boost::integral_constant { public: }; template<> struct has_trivial_copy< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_trivial_copy< void volatile > : public ::boost::integral_constant { public: }; template<> struct has_trivial_copy_constructor< void > : public ::boost::integral_constant { public: }; template<> struct has_trivial_copy_constructor< void const > : public ::boost::integral_constant { public: }; template<> struct has_trivial_copy_constructor< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_trivial_copy_constructor< void volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 63 "/localhome/glisse2/include/boost/type_traits/has_trivial_copy.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/has_nothrow_copy.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/has_nothrow_copy.hpp" 2 namespace boost { namespace detail{ template struct has_nothrow_copy_imp{ static const bool value = ((__has_nothrow_copy(T) ) && !is_volatile::value && !is_reference::value); }; } template< typename T > struct has_nothrow_copy : public ::boost::integral_constant::value> { public: }; template< typename T > struct has_nothrow_copy_constructor : public ::boost::integral_constant::value> { public: }; template<> struct has_nothrow_copy< void > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_copy< void const > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_copy< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_copy< void volatile > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_copy_constructor< void > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_copy_constructor< void const > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_copy_constructor< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_nothrow_copy_constructor< void volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 52 "/localhome/glisse2/include/boost/type_traits/has_nothrow_copy.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_nothrow_destructor.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/has_nothrow_destructor.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/has_trivial_destructor.hpp" 1 # 18 "/localhome/glisse2/include/boost/type_traits/has_trivial_destructor.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 19 "/localhome/glisse2/include/boost/type_traits/has_trivial_destructor.hpp" 2 namespace boost { namespace detail { template struct has_trivial_dtor_impl { static const bool value = (__has_trivial_destructor(T) ); }; } template< typename T > struct has_trivial_destructor : public ::boost::integral_constant::value> { public: }; template<> struct has_trivial_destructor< void > : public ::boost::integral_constant { public: }; template<> struct has_trivial_destructor< void const > : public ::boost::integral_constant { public: }; template<> struct has_trivial_destructor< void const volatile > : public ::boost::integral_constant { public: }; template<> struct has_trivial_destructor< void volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 48 "/localhome/glisse2/include/boost/type_traits/has_trivial_destructor.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/has_nothrow_destructor.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/has_nothrow_destructor.hpp" 2 namespace boost { template< typename T > struct has_nothrow_destructor : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 24 "/localhome/glisse2/include/boost/type_traits/has_nothrow_destructor.hpp" 2 # 35 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/has_bit_and.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_bit_and.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/is_base_of.hpp" 1 # 19 "/localhome/glisse2/include/boost/type_traits/is_base_of.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/is_base_of.hpp" 2 namespace boost { namespace detail{ template struct is_base_of_imp { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; static const bool value = (::boost::type_traits::ice_or< (::boost::detail::is_base_and_derived_impl::value), (::boost::type_traits::ice_and< ::boost::is_same::value, ::boost::is_class::value>::value)>::value) ; }; } template< typename Base, typename Derived > struct is_base_of : public ::boost::integral_constant::value)> { public: }; template< typename Base, typename Derived > struct is_base_of< Base&,Derived > : public ::boost::integral_constant { public: }; template< typename Base, typename Derived > struct is_base_of< Base,Derived& > : public ::boost::integral_constant { public: }; template< typename Base, typename Derived > struct is_base_of< Base&,Derived& > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 50 "/localhome/glisse2/include/boost/type_traits/is_base_of.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_fundamental.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/is_fundamental.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/is_fundamental.hpp" 2 namespace boost { namespace detail { template struct is_fundamental_impl : public ::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_void::value > { }; } template< typename T > struct is_fundamental : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 44 "/localhome/glisse2/include/boost/type_traits/is_fundamental.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_bit_and_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator & (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() & make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() & make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() & make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_bit_and_impl::dont_care > struct has_bit_and : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_bit_and.hpp" 2 # 13 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_bit_and_assign.hpp" 1 # 49 "/localhome/glisse2/include/boost/type_traits/has_bit_and_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_bit_and_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator &= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() &= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() &= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() &= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_bit_and_assign_impl::dont_care > struct has_bit_and_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 50 "/localhome/glisse2/include/boost/type_traits/has_bit_and_assign.hpp" 2 # 14 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_bit_or.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_bit_or.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_bit_or_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator | (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() | make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() | make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() | make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_bit_or_impl::dont_care > struct has_bit_or : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_bit_or.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_bit_or_assign.hpp" 1 # 49 "/localhome/glisse2/include/boost/type_traits/has_bit_or_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_bit_or_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator |= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() |= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() |= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() |= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_bit_or_assign_impl::dont_care > struct has_bit_or_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 50 "/localhome/glisse2/include/boost/type_traits/has_bit_or_assign.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_bit_xor.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_bit_xor.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_bit_xor_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator ^ (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() ^ make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() ^ make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() ^ make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_bit_xor_impl::dont_care > struct has_bit_xor : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_bit_xor.hpp" 2 # 17 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_bit_xor_assign.hpp" 1 # 49 "/localhome/glisse2/include/boost/type_traits/has_bit_xor_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_bit_xor_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator ^= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() ^= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() ^= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() ^= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_bit_xor_assign_impl::dont_care > struct has_bit_xor_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 50 "/localhome/glisse2/include/boost/type_traits/has_bit_xor_assign.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_complement.hpp" 1 # 26 "/localhome/glisse2/include/boost/type_traits/has_complement.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_complement_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator ~ (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((~ make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(~ make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((~ make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_complement_impl::dont_care > struct has_complement : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 27 "/localhome/glisse2/include/boost/type_traits/has_complement.hpp" 2 # 19 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_dereference.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/has_dereference.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_dereference_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator * (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((* make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(* make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((* make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_void< Rhs_noptr >::value >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_dereference_impl::dont_care > struct has_dereference : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 26 "/localhome/glisse2/include/boost/type_traits/has_dereference.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_divides.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_divides.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_divides_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator / (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() / make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() / make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() / make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_divides_impl::dont_care > struct has_divides : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_divides.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_divides_assign.hpp" 1 # 41 "/localhome/glisse2/include/boost/type_traits/has_divides_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_divides_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator /= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() /= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() /= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() /= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_const< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_divides_assign_impl::dont_care > struct has_divides_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 42 "/localhome/glisse2/include/boost/type_traits/has_divides_assign.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_equal_to.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_equal_to.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_equal_to_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator == (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() == make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() == make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() == make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::type_traits::ice_or< ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value, ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value, ::boost::is_same< Lhs_noptr, Rhs_noptr >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_void< Rhs_noptr >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_equal_to_impl::dont_care > struct has_equal_to : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_equal_to.hpp" 2 # 23 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_greater.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_greater.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_greater_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator > (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() > make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() > make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() > make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::type_traits::ice_or< ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value, ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value, ::boost::is_same< Lhs_noptr, Rhs_noptr >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_void< Rhs_noptr >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_greater_impl::dont_care > struct has_greater : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_greater.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_greater_equal.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_greater_equal.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_greater_equal_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator >= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() >= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() >= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() >= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::type_traits::ice_or< ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value, ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value, ::boost::is_same< Lhs_noptr, Rhs_noptr >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_void< Rhs_noptr >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_greater_equal_impl::dont_care > struct has_greater_equal : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_greater_equal.hpp" 2 # 25 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_left_shift.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_left_shift.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_left_shift_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator << (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() << make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() << make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() << make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_left_shift_impl::dont_care > struct has_left_shift : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_left_shift.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_left_shift_assign.hpp" 1 # 49 "/localhome/glisse2/include/boost/type_traits/has_left_shift_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_left_shift_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator <<= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() <<= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() <<= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() <<= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_left_shift_assign_impl::dont_care > struct has_left_shift_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 50 "/localhome/glisse2/include/boost/type_traits/has_left_shift_assign.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_less.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_less.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_less_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator < (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() < make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() < make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() < make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::type_traits::ice_or< ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value, ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value, ::boost::is_same< Lhs_noptr, Rhs_noptr >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_void< Rhs_noptr >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_less_impl::dont_care > struct has_less : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_less.hpp" 2 # 28 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_less_equal.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_less_equal.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_less_equal_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator <= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() <= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() <= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() <= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::type_traits::ice_or< ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value, ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value, ::boost::is_same< Lhs_noptr, Rhs_noptr >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_void< Rhs_noptr >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_less_equal_impl::dont_care > struct has_less_equal : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_less_equal.hpp" 2 # 29 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_logical_and.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_logical_and.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_logical_and_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator && (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() && make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() && make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() && make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_convertible< Rhs_nocv, bool >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_convertible< Lhs_nocv, bool >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_logical_and_impl::dont_care > struct has_logical_and : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_logical_and.hpp" 2 # 30 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_logical_not.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/has_logical_not.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_logical_not_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator ! (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((! make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(! make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((! make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, false >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_logical_not_impl::dont_care > struct has_logical_not : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 18 "/localhome/glisse2/include/boost/type_traits/has_logical_not.hpp" 2 # 31 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_logical_or.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_logical_or.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_logical_or_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator || (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() || make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() || make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() || make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_convertible< Rhs_nocv, bool >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_convertible< Lhs_nocv, bool >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_logical_or_impl::dont_care > struct has_logical_or : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_logical_or.hpp" 2 # 32 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_minus.hpp" 1 # 54 "/localhome/glisse2/include/boost/type_traits/has_minus.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_minus_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator - (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() - make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() - make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() - make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_void< Rhs_noptr >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, Rhs_nocv >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_minus_impl::dont_care > struct has_minus : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 55 "/localhome/glisse2/include/boost/type_traits/has_minus.hpp" 2 # 33 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_minus_assign.hpp" 1 # 59 "/localhome/glisse2/include/boost/type_traits/has_minus_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_minus_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator -= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() -= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() -= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() -= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_void< Rhs_noptr >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_minus_assign_impl::dont_care > struct has_minus_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 60 "/localhome/glisse2/include/boost/type_traits/has_minus_assign.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_modulus.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_modulus.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_modulus_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator % (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() % make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() % make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() % make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_modulus_impl::dont_care > struct has_modulus : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_modulus.hpp" 2 # 35 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_modulus_assign.hpp" 1 # 49 "/localhome/glisse2/include/boost/type_traits/has_modulus_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_modulus_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator %= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() %= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() %= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() %= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_modulus_assign_impl::dont_care > struct has_modulus_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 50 "/localhome/glisse2/include/boost/type_traits/has_modulus_assign.hpp" 2 # 36 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_multiplies.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_multiplies.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_multiplies_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator * (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() * make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() * make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() * make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_multiplies_impl::dont_care > struct has_multiplies : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_multiplies.hpp" 2 # 37 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_multiplies_assign.hpp" 1 # 41 "/localhome/glisse2/include/boost/type_traits/has_multiplies_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_multiplies_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator *= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() *= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() *= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() *= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_const< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_multiplies_assign_impl::dont_care > struct has_multiplies_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 42 "/localhome/glisse2/include/boost/type_traits/has_multiplies_assign.hpp" 2 # 38 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_negate.hpp" 1 # 19 "/localhome/glisse2/include/boost/type_traits/has_negate.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_negate_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator - (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((- make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(- make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((- make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, ::boost::is_pointer< Rhs_noref >::value >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_negate_impl::dont_care > struct has_negate : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 20 "/localhome/glisse2/include/boost/type_traits/has_negate.hpp" 2 # 39 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_not_equal_to.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_not_equal_to.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_not_equal_to_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator != (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() != make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() != make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() != make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value, ::boost::type_traits::ice_not< ::boost::type_traits::ice_or< ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value, ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value, ::boost::is_same< Lhs_noptr, Rhs_noptr >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_void< Rhs_noptr >::value >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_not_equal_to_impl::dont_care > struct has_not_equal_to : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_not_equal_to.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_plus.hpp" 1 # 48 "/localhome/glisse2/include/boost/type_traits/has_plus.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_plus_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator + (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() + make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() + make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() + make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_void< Rhs_noptr >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_plus_impl::dont_care > struct has_plus : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 49 "/localhome/glisse2/include/boost/type_traits/has_plus.hpp" 2 # 41 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_plus_assign.hpp" 1 # 60 "/localhome/glisse2/include/boost/type_traits/has_plus_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_plus_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator += (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() += make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() += make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() += make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_void< Lhs_noptr >::value, ::boost::is_fundamental< Rhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_void< Rhs_noptr >::value, ::boost::is_fundamental< Lhs_nocv >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_fundamental< Lhs_nocv >::value, ::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, bool >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_plus_assign_impl::dont_care > struct has_plus_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 61 "/localhome/glisse2/include/boost/type_traits/has_plus_assign.hpp" 2 # 42 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_post_decrement.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_post_decrement.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 1 # 22 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 namespace boost { namespace detail { namespace has_post_decrement_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator -- (const any&, int); # 68 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() --,returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs > struct operator_returns_Ret < Lhs, dont_care, true > { static const bool value = true; }; template < typename Lhs > struct operator_returns_Ret < Lhs, dont_care, false > { static const bool value = true; }; template < typename Lhs > struct operator_returns_Ret < Lhs, void, true > { static const bool value = true; }; template < typename Lhs > struct operator_returns_Ret < Lhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct operator_returns_Ret < Lhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Ret > struct operator_returns_Ret < Lhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() --))==sizeof(::boost::type_traits::yes_type)); }; # 136 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() --),make())))==sizeof(::boost::type_traits::yes_type)); }; # 155 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 template < typename Lhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs >::value, operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::is_same< bool, Lhs_nocv >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_void< Lhs_noptr >::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Ret=::boost::detail::has_post_decrement_impl::dont_care > struct has_post_decrement : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 202 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_post_decrement.hpp" 2 # 43 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_post_increment.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_post_increment.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 1 # 22 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 2 # 27 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 namespace boost { namespace detail { namespace has_post_increment_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator ++ (const any&, int); # 68 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() ++,returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs > struct operator_returns_Ret < Lhs, dont_care, true > { static const bool value = true; }; template < typename Lhs > struct operator_returns_Ret < Lhs, dont_care, false > { static const bool value = true; }; template < typename Lhs > struct operator_returns_Ret < Lhs, void, true > { static const bool value = true; }; template < typename Lhs > struct operator_returns_Ret < Lhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct operator_returns_Ret < Lhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Ret > struct operator_returns_Ret < Lhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() ++))==sizeof(::boost::type_traits::yes_type)); }; # 136 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() ++),make())))==sizeof(::boost::type_traits::yes_type)); }; # 155 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 3 template < typename Lhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs >::value, operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::is_same< bool, Lhs_nocv >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_void< Lhs_noptr >::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Ret=::boost::detail::has_post_increment_impl::dont_care > struct has_post_increment : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 202 "/localhome/glisse2/include/boost/type_traits/detail/has_postfix_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_post_increment.hpp" 2 # 44 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_pre_decrement.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_pre_decrement.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_pre_decrement_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator -- (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((-- make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(-- make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((-- make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::is_same< bool, Rhs_nocv >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_void< Rhs_noptr >::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::is_const< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_pre_decrement_impl::dont_care > struct has_pre_decrement : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_pre_decrement.hpp" 2 # 45 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_pre_increment.hpp" 1 # 34 "/localhome/glisse2/include/boost/type_traits/has_pre_increment.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_pre_increment_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator ++ (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((++ make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(++ make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((++ make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::is_same< bool, Rhs_nocv >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Rhs_noref >::value, ::boost::is_void< Rhs_noptr >::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::is_const< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_pre_increment_impl::dont_care > struct has_pre_increment : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 35 "/localhome/glisse2/include/boost/type_traits/has_pre_increment.hpp" 2 # 46 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_right_shift.hpp" 1 # 43 "/localhome/glisse2/include/boost/type_traits/has_right_shift.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_right_shift_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator >> (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() >> make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() >> make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() >> make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_right_shift_impl::dont_care > struct has_right_shift : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 44 "/localhome/glisse2/include/boost/type_traits/has_right_shift.hpp" 2 # 47 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_right_shift_assign.hpp" 1 # 49 "/localhome/glisse2/include/boost/type_traits/has_right_shift_assign.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 1 # 25 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 26 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 # 40 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" # 41 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 namespace boost { namespace detail { namespace has_right_shift_assign_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator >>= (const any&, const any&); # 82 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Lhs, typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() >>= make(),returns_void_t())))); }; struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { static const bool value = true; }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(make() >>= make()))==sizeof(::boost::type_traits::yes_type)); }; # 150 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((make() >>= make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 169 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 3 template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ; }; template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { static const bool value = false; }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { static const bool value = false; }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::type_traits::ice_or< ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value, ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_pointer< Lhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_pointer< Lhs_noref >::value, ::boost::is_pointer< Rhs_noref >::value >::value, ::boost::type_traits::ice_and< ::boost::is_fundamental< Lhs_nocv >::value, ::boost::is_fundamental< Rhs_nocv >::value, ::boost::is_const< Lhs_noref >::value >::value >::value >::value); }; } } template< typename Lhs, typename Rhs=Lhs, typename Ret=::boost::detail::has_right_shift_assign_impl::dont_care > struct has_right_shift_assign : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 229 "/localhome/glisse2/include/boost/type_traits/detail/has_binary_operator.hpp" 2 3 # 50 "/localhome/glisse2/include/boost/type_traits/has_right_shift_assign.hpp" 2 # 48 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_unary_minus.hpp" 1 # 19 "/localhome/glisse2/include/boost/type_traits/has_unary_minus.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_unary_minus_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator - (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((- make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(- make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((- make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, ::boost::is_pointer< Rhs_noref >::value >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_unary_minus_impl::dont_care > struct has_unary_minus : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 20 "/localhome/glisse2/include/boost/type_traits/has_unary_minus.hpp" 2 # 49 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_unary_plus.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/has_unary_plus.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 1 # 23 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 24 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 # 34 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" # 35 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 namespace boost { namespace detail { namespace has_unary_plus_impl { template T &make(); struct no_operator { }; struct any { template any(T const&); }; no_operator operator + (const any&); # 76 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); template < typename Rhs > struct operator_returns_void { static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); static const bool value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((+ make(),returns_void_t())))); }; struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { static const bool value = true; }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); static ::boost::type_traits::no_type is_convertible_to_Ret(...); static const bool value = (sizeof(is_convertible_to_Ret(+ make()))==sizeof(::boost::type_traits::yes_type)); }; # 144 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); static ::boost::type_traits::no_type check(no_operator); static const bool value = (sizeof(check(((+ make()),make())))==sizeof(::boost::type_traits::yes_type)); }; # 163 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 3 template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { static const bool value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ; }; template < typename Ret > struct trait_impl1 < void, Ret, false > { static const bool value = false; }; template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; static const bool value = (trait_impl1 < Rhs_noref, Ret, false >::value); }; } } template< typename Rhs, typename Ret=::boost::detail::has_unary_plus_impl::dont_care > struct has_unary_plus : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 210 "/localhome/glisse2/include/boost/type_traits/detail/has_prefix_operator.hpp" 2 3 # 18 "/localhome/glisse2/include/boost/type_traits/has_unary_plus.hpp" 2 # 50 "/localhome/glisse2/include/boost/type_traits/has_operator.hpp" 2 # 36 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/has_virtual_destructor.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/has_virtual_destructor.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 16 "/localhome/glisse2/include/boost/type_traits/has_virtual_destructor.hpp" 2 namespace boost { template< typename T > struct has_virtual_destructor : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 28 "/localhome/glisse2/include/boost/type_traits/has_virtual_destructor.hpp" 2 # 41 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_complex.hpp" 1 # 12 "/localhome/glisse2/include/boost/type_traits/is_complex.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 1 3 # 37 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 # 38 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 template class basic_stringbuf : public basic_streambuf<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_streambuf __streambuf_type; typedef basic_string __string_type; typedef typename __string_type::size_type __size_type; protected: ios_base::openmode _M_mode; __string_type _M_string; public: # 93 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) : __streambuf_type(), _M_mode(__mode), _M_string() { } # 106 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_stringbuf(const __string_type& __str, ios_base::openmode __mode = ios_base::in | ios_base::out) : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size()) { _M_stringbuf_init(__mode); } # 121 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 __string_type str() const { __string_type __ret; if (this->pptr()) { if (this->pptr() > this->egptr()) __ret = __string_type(this->pbase(), this->pptr()); else __ret = __string_type(this->pbase(), this->egptr()); } else __ret = _M_string; return __ret; } # 145 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 void str(const __string_type& __s) { _M_string.assign(__s.data(), __s.size()); _M_stringbuf_init(_M_mode); } protected: void _M_stringbuf_init(ios_base::openmode __mode) { _M_mode = __mode; __size_type __len = 0; if (_M_mode & (ios_base::ate | ios_base::app)) __len = _M_string.size(); _M_sync(const_cast(_M_string.data()), 0, __len); } virtual streamsize showmanyc() { streamsize __ret = -1; if (_M_mode & ios_base::in) { _M_update_egptr(); __ret = this->egptr() - this->gptr(); } return __ret; } virtual int_type underflow(); virtual int_type pbackfail(int_type __c = traits_type::eof()); virtual int_type overflow(int_type __c = traits_type::eof()); # 197 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 virtual __streambuf_type* setbuf(char_type* __s, streamsize __n) { if (__s && __n >= 0) { _M_string.clear(); _M_sync(__s, __n, 0); } return this; } virtual pos_type seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode = ios_base::in | ios_base::out); virtual pos_type seekpos(pos_type __sp, ios_base::openmode __mode = ios_base::in | ios_base::out); void _M_sync(char_type* __base, __size_type __i, __size_type __o); void _M_update_egptr() { const bool __testin = _M_mode & ios_base::in; if (this->pptr() && this->pptr() > this->egptr()) { if (__testin) this->setg(this->eback(), this->gptr(), this->pptr()); else this->setg(this->pptr(), this->pptr(), this->pptr()); } } void _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off); }; # 262 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 template class basic_istringstream : public basic_istream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_istream __istream_type; private: __stringbuf_type _M_stringbuf; public: # 298 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_istringstream(ios_base::openmode __mode = ios_base::in) : __istream_type(), _M_stringbuf(__mode | ios_base::in) { this->init(&_M_stringbuf); } # 316 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_istringstream(const __string_type& __str, ios_base::openmode __mode = ios_base::in) : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) { this->init(&_M_stringbuf); } ~basic_istringstream() { } # 338 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 __stringbuf_type* rdbuf() const { return const_cast<__stringbuf_type*>(&_M_stringbuf); } __string_type str() const { return _M_stringbuf.str(); } void str(const __string_type& __s) { _M_stringbuf.str(__s); } }; # 372 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 template class basic_ostringstream : public basic_ostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_ostream __ostream_type; private: __stringbuf_type _M_stringbuf; public: # 408 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_ostringstream(ios_base::openmode __mode = ios_base::out) : __ostream_type(), _M_stringbuf(__mode | ios_base::out) { this->init(&_M_stringbuf); } # 426 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_ostringstream(const __string_type& __str, ios_base::openmode __mode = ios_base::out) : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) { this->init(&_M_stringbuf); } ~basic_ostringstream() { } # 448 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 __stringbuf_type* rdbuf() const { return const_cast<__stringbuf_type*>(&_M_stringbuf); } __string_type str() const { return _M_stringbuf.str(); } void str(const __string_type& __s) { _M_stringbuf.str(__s); } }; # 482 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 template class basic_stringstream : public basic_iostream<_CharT, _Traits> { public: typedef _CharT char_type; typedef _Traits traits_type; typedef _Alloc allocator_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; typedef basic_iostream __iostream_type; private: __stringbuf_type _M_stringbuf; public: # 517 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) : __iostream_type(), _M_stringbuf(__m) { this->init(&_M_stringbuf); } # 533 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 explicit basic_stringstream(const __string_type& __str, ios_base::openmode __m = ios_base::out | ios_base::in) : __iostream_type(), _M_stringbuf(__str, __m) { this->init(&_M_stringbuf); } ~basic_stringstream() { } # 555 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 3 __stringbuf_type* rdbuf() const { return const_cast<__stringbuf_type*>(&_M_stringbuf); } __string_type str() const { return _M_stringbuf.str(); } void str(const __string_type& __s) { _M_stringbuf.str(__s); } }; } # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/sstream.tcc" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/sstream.tcc" 3 # 40 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/sstream.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type basic_stringbuf<_CharT, _Traits, _Alloc>:: pbackfail(int_type __c) { int_type __ret = traits_type::eof(); if (this->eback() < this->gptr()) { const bool __testeof = traits_type::eq_int_type(__c, __ret); if (!__testeof) { const bool __testeq = traits_type::eq(traits_type:: to_char_type(__c), this->gptr()[-1]); const bool __testout = this->_M_mode & ios_base::out; if (__testeq || __testout) { this->gbump(-1); if (!__testeq) *this->gptr() = traits_type::to_char_type(__c); __ret = __c; } } else { this->gbump(-1); __ret = traits_type::not_eof(__c); } } return __ret; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type basic_stringbuf<_CharT, _Traits, _Alloc>:: overflow(int_type __c) { const bool __testout = this->_M_mode & ios_base::out; if (__builtin_expect(!__testout, false)) return traits_type::eof(); const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); if (__builtin_expect(__testeof, false)) return traits_type::not_eof(__c); const __size_type __capacity = _M_string.capacity(); const __size_type __max_size = _M_string.max_size(); const bool __testput = this->pptr() < this->epptr(); if (__builtin_expect(!__testput && __capacity == __max_size, false)) return traits_type::eof(); const char_type __conv = traits_type::to_char_type(__c); if (!__testput) { # 112 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/sstream.tcc" 3 const __size_type __opt_len = std::max(__size_type(2 * __capacity), __size_type(512)); const __size_type __len = std::min(__opt_len, __max_size); __string_type __tmp; __tmp.reserve(__len); if (this->pbase()) __tmp.assign(this->pbase(), this->epptr() - this->pbase()); __tmp.push_back(__conv); _M_string.swap(__tmp); _M_sync(const_cast(_M_string.data()), this->gptr() - this->eback(), this->pptr() - this->pbase()); } else *this->pptr() = __conv; this->pbump(1); return __c; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type basic_stringbuf<_CharT, _Traits, _Alloc>:: underflow() { int_type __ret = traits_type::eof(); const bool __testin = this->_M_mode & ios_base::in; if (__testin) { _M_update_egptr(); if (this->gptr() < this->egptr()) __ret = traits_type::to_int_type(*this->gptr()); } return __ret; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type basic_stringbuf<_CharT, _Traits, _Alloc>:: seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) { pos_type __ret = pos_type(off_type(-1)); bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; const bool __testboth = __testin && __testout && __way != ios_base::cur; __testin &= !(__mode & ios_base::out); __testout &= !(__mode & ios_base::in); const char_type* __beg = __testin ? this->eback() : this->pbase(); if ((__beg || !__off) && (__testin || __testout || __testboth)) { _M_update_egptr(); off_type __newoffi = __off; off_type __newoffo = __newoffi; if (__way == ios_base::cur) { __newoffi += this->gptr() - __beg; __newoffo += this->pptr() - __beg; } else if (__way == ios_base::end) __newoffo = __newoffi += this->egptr() - __beg; if ((__testin || __testboth) && __newoffi >= 0 && this->egptr() - __beg >= __newoffi) { this->setg(this->eback(), this->eback() + __newoffi, this->egptr()); __ret = pos_type(__newoffi); } if ((__testout || __testboth) && __newoffo >= 0 && this->egptr() - __beg >= __newoffo) { _M_pbump(this->pbase(), this->epptr(), __newoffo); __ret = pos_type(__newoffo); } } return __ret; } template typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type basic_stringbuf<_CharT, _Traits, _Alloc>:: seekpos(pos_type __sp, ios_base::openmode __mode) { pos_type __ret = pos_type(off_type(-1)); const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; const char_type* __beg = __testin ? this->eback() : this->pbase(); if ((__beg || !off_type(__sp)) && (__testin || __testout)) { _M_update_egptr(); const off_type __pos(__sp); const bool __testpos = (0 <= __pos && __pos <= this->egptr() - __beg); if (__testpos) { if (__testin) this->setg(this->eback(), this->eback() + __pos, this->egptr()); if (__testout) _M_pbump(this->pbase(), this->epptr(), __pos); __ret = __sp; } } return __ret; } template void basic_stringbuf<_CharT, _Traits, _Alloc>:: _M_sync(char_type* __base, __size_type __i, __size_type __o) { const bool __testin = _M_mode & ios_base::in; const bool __testout = _M_mode & ios_base::out; char_type* __endg = __base + _M_string.size(); char_type* __endp = __base + _M_string.capacity(); if (__base != _M_string.data()) { __endg += __i; __i = 0; __endp = __endg; } if (__testin) this->setg(__base, __base + __i, __endg); if (__testout) { _M_pbump(__base, __endp, __o); if (!__testin) this->setg(__endg, __endg, __endg); } } template void basic_stringbuf<_CharT, _Traits, _Alloc>:: _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off) { this->setp(__pbeg, __pend); while (__off > __gnu_cxx::__numeric_traits::__max) { this->pbump(__gnu_cxx::__numeric_traits::__max); __off -= __gnu_cxx::__numeric_traits::__max; } this->pbump(__off); } extern template class basic_stringbuf; extern template class basic_istringstream; extern template class basic_ostringstream; extern template class basic_stringstream; extern template class basic_stringbuf; extern template class basic_istringstream; extern template class basic_ostringstream; extern template class basic_stringstream; } # 582 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/sstream" 2 3 # 48 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template class complex; template<> class complex; template<> class complex; template<> class complex; template _Tp abs(const complex<_Tp>&); template _Tp arg(const complex<_Tp>&); template _Tp norm(const complex<_Tp>&); template complex<_Tp> conj(const complex<_Tp>&); template complex<_Tp> polar(const _Tp&, const _Tp& = 0); template complex<_Tp> cos(const complex<_Tp>&); template complex<_Tp> cosh(const complex<_Tp>&); template complex<_Tp> exp(const complex<_Tp>&); template complex<_Tp> log(const complex<_Tp>&); template complex<_Tp> log10(const complex<_Tp>&); template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); template complex<_Tp> pow(const complex<_Tp>&, const complex<_Tp>&); template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); template complex<_Tp> sin(const complex<_Tp>&); template complex<_Tp> sinh(const complex<_Tp>&); template complex<_Tp> sqrt(const complex<_Tp>&); template complex<_Tp> tan(const complex<_Tp>&); template complex<_Tp> tanh(const complex<_Tp>&); # 123 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template struct complex { typedef _Tp value_type; constexpr complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) : _M_real(__r), _M_imag(__i) { } template constexpr complex(const complex<_Up>& __z) : _M_real(__z.real()), _M_imag(__z.imag()) { } constexpr _Tp real() { return _M_real; } constexpr _Tp imag() { return _M_imag; } # 169 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 void real(_Tp __val) { _M_real = __val; } void imag(_Tp __val) { _M_imag = __val; } complex<_Tp>& operator=(const _Tp&); complex<_Tp>& operator+=(const _Tp& __t) { _M_real += __t; return *this; } complex<_Tp>& operator-=(const _Tp& __t) { _M_real -= __t; return *this; } complex<_Tp>& operator*=(const _Tp&); complex<_Tp>& operator/=(const _Tp&); template complex<_Tp>& operator=(const complex<_Up>&); template complex<_Tp>& operator+=(const complex<_Up>&); template complex<_Tp>& operator-=(const complex<_Up>&); template complex<_Tp>& operator*=(const complex<_Up>&); template complex<_Tp>& operator/=(const complex<_Up>&); constexpr complex __rep() const { return *this; } private: _Tp _M_real; _Tp _M_imag; }; template complex<_Tp>& complex<_Tp>::operator=(const _Tp& __t) { _M_real = __t; _M_imag = _Tp(); return *this; } template complex<_Tp>& complex<_Tp>::operator*=(const _Tp& __t) { _M_real *= __t; _M_imag *= __t; return *this; } template complex<_Tp>& complex<_Tp>::operator/=(const _Tp& __t) { _M_real /= __t; _M_imag /= __t; return *this; } template template complex<_Tp>& complex<_Tp>::operator=(const complex<_Up>& __z) { _M_real = __z.real(); _M_imag = __z.imag(); return *this; } template template complex<_Tp>& complex<_Tp>::operator+=(const complex<_Up>& __z) { _M_real += __z.real(); _M_imag += __z.imag(); return *this; } template template complex<_Tp>& complex<_Tp>::operator-=(const complex<_Up>& __z) { _M_real -= __z.real(); _M_imag -= __z.imag(); return *this; } template template complex<_Tp>& complex<_Tp>::operator*=(const complex<_Up>& __z) { const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); _M_real = __r; return *this; } template template complex<_Tp>& complex<_Tp>::operator/=(const complex<_Up>& __z) { const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); const _Tp __n = std::norm(__z); _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; _M_real = __r / __n; return *this; } template inline complex<_Tp> operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r += __y; return __r; } template inline complex<_Tp> operator+(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r += __y; return __r; } template inline complex<_Tp> operator+(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __y; __r += __x; return __r; } template inline complex<_Tp> operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r -= __y; return __r; } template inline complex<_Tp> operator-(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r -= __y; return __r; } template inline complex<_Tp> operator-(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r(__x, -__y.imag()); __r -= __y.real(); return __r; } template inline complex<_Tp> operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r *= __y; return __r; } template inline complex<_Tp> operator*(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r *= __y; return __r; } template inline complex<_Tp> operator*(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __y; __r *= __x; return __r; } template inline complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r /= __y; return __r; } template inline complex<_Tp> operator/(const complex<_Tp>& __x, const _Tp& __y) { complex<_Tp> __r = __x; __r /= __y; return __r; } template inline complex<_Tp> operator/(const _Tp& __x, const complex<_Tp>& __y) { complex<_Tp> __r = __x; __r /= __y; return __r; } template inline complex<_Tp> operator+(const complex<_Tp>& __x) { return __x; } template inline complex<_Tp> operator-(const complex<_Tp>& __x) { return complex<_Tp>(-__x.real(), -__x.imag()); } template inline constexpr bool operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __x.real() == __y.real() && __x.imag() == __y.imag(); } template inline constexpr bool operator==(const complex<_Tp>& __x, const _Tp& __y) { return __x.real() == __y && __x.imag() == _Tp(); } template inline constexpr bool operator==(const _Tp& __x, const complex<_Tp>& __y) { return __x == __y.real() && _Tp() == __y.imag(); } template inline constexpr bool operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __x.real() != __y.real() || __x.imag() != __y.imag(); } template inline constexpr bool operator!=(const complex<_Tp>& __x, const _Tp& __y) { return __x.real() != __y || __x.imag() != _Tp(); } template inline constexpr bool operator!=(const _Tp& __x, const complex<_Tp>& __y) { return __x != __y.real() || _Tp() != __y.imag(); } template basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) { _Tp __re_x, __im_x; _CharT __ch; __is >> __ch; if (__ch == '(') { __is >> __re_x >> __ch; if (__ch == ',') { __is >> __im_x >> __ch; if (__ch == ')') __x = complex<_Tp>(__re_x, __im_x); else __is.setstate(ios_base::failbit); } else if (__ch == ')') __x = __re_x; else __is.setstate(ios_base::failbit); } else { __is.putback(__ch); __is >> __re_x; __x = __re_x; } return __is; } template basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) { basic_ostringstream<_CharT, _Traits> __s; __s.flags(__os.flags()); __s.imbue(__os.getloc()); __s.precision(__os.precision()); __s << '(' << __x.real() << ',' << __x.imag() << ')'; return __os << __s.str(); } template constexpr _Tp real(const complex<_Tp>& __z) { return __z.real(); } template constexpr _Tp imag(const complex<_Tp>& __z) { return __z.imag(); } # 565 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline _Tp __complex_abs(const complex<_Tp>& __z) { _Tp __x = __z.real(); _Tp __y = __z.imag(); const _Tp __s = std::max(abs(__x), abs(__y)); if (__s == _Tp()) return __s; __x /= __s; __y /= __s; return __s * sqrt(__x * __x + __y * __y); } inline float __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } inline double __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } inline long double __complex_abs(const __complex__ long double& __z) { return __builtin_cabsl(__z); } template inline _Tp abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } # 601 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline _Tp __complex_arg(const complex<_Tp>& __z) { return atan2(__z.imag(), __z.real()); } inline float __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } inline double __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } inline long double __complex_arg(const __complex__ long double& __z) { return __builtin_cargl(__z); } template inline _Tp arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } # 631 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template struct _Norm_helper { template static inline _Tp _S_do_it(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return __x * __x + __y * __y; } }; template<> struct _Norm_helper { template static inline _Tp _S_do_it(const complex<_Tp>& __z) { _Tp __res = std::abs(__z); return __res * __res; } }; template inline _Tp norm(const complex<_Tp>& __z) { return _Norm_helper<__is_floating<_Tp>::__value && !0>::_S_do_it(__z); } template inline complex<_Tp> polar(const _Tp& __rho, const _Tp& __theta) { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } template inline complex<_Tp> conj(const complex<_Tp>& __z) { return complex<_Tp>(__z.real(), -__z.imag()); } template inline complex<_Tp> __complex_cos(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); } inline __complex__ float __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } inline __complex__ double __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } inline __complex__ long double __complex_cos(const __complex__ long double& __z) { return __builtin_ccosl(__z); } template inline complex<_Tp> cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } template inline complex<_Tp> __complex_cosh(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); } inline __complex__ float __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } inline __complex__ double __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } inline __complex__ long double __complex_cosh(const __complex__ long double& __z) { return __builtin_ccoshl(__z); } template inline complex<_Tp> cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } template inline complex<_Tp> __complex_exp(const complex<_Tp>& __z) { return std::polar(exp(__z.real()), __z.imag()); } inline __complex__ float __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } inline __complex__ double __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } inline __complex__ long double __complex_exp(const __complex__ long double& __z) { return __builtin_cexpl(__z); } template inline complex<_Tp> exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } # 762 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline complex<_Tp> __complex_log(const complex<_Tp>& __z) { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } inline __complex__ float __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } inline __complex__ double __complex_log(__complex__ double __z) { return __builtin_clog(__z); } inline __complex__ long double __complex_log(const __complex__ long double& __z) { return __builtin_clogl(__z); } template inline complex<_Tp> log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } template inline complex<_Tp> log10(const complex<_Tp>& __z) { return std::log(__z) / log(_Tp(10.0)); } template inline complex<_Tp> __complex_sin(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); } inline __complex__ float __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } inline __complex__ double __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } inline __complex__ long double __complex_sin(const __complex__ long double& __z) { return __builtin_csinl(__z); } template inline complex<_Tp> sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } template inline complex<_Tp> __complex_sinh(const complex<_Tp>& __z) { const _Tp __x = __z.real(); const _Tp __y = __z.imag(); return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); } inline __complex__ float __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } inline __complex__ double __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } inline __complex__ long double __complex_sinh(const __complex__ long double& __z) { return __builtin_csinhl(__z); } template inline complex<_Tp> sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } # 854 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template complex<_Tp> __complex_sqrt(const complex<_Tp>& __z) { _Tp __x = __z.real(); _Tp __y = __z.imag(); if (__x == _Tp()) { _Tp __t = sqrt(abs(__y) / 2); return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); } else { _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); _Tp __u = __t / 2; return __x > _Tp() ? complex<_Tp>(__u, __y / __t) : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); } } inline __complex__ float __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } inline __complex__ double __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } inline __complex__ long double __complex_sqrt(const __complex__ long double& __z) { return __builtin_csqrtl(__z); } template inline complex<_Tp> sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } # 898 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline complex<_Tp> __complex_tan(const complex<_Tp>& __z) { return std::sin(__z) / std::cos(__z); } inline __complex__ float __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } inline __complex__ double __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } inline __complex__ long double __complex_tan(const __complex__ long double& __z) { return __builtin_ctanl(__z); } template inline complex<_Tp> tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } # 926 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline complex<_Tp> __complex_tanh(const complex<_Tp>& __z) { return std::sinh(__z) / std::cosh(__z); } inline __complex__ float __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } inline __complex__ double __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } inline __complex__ long double __complex_tanh(const __complex__ long double& __z) { return __builtin_ctanhl(__z); } template inline complex<_Tp> tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } # 984 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template complex<_Tp> pow(const complex<_Tp>& __x, const _Tp& __y) { if (__x.imag() == _Tp() && __x.real() > _Tp()) return pow(__x.real(), __y); complex<_Tp> __t = std::log(__x); return std::polar(exp(__y * __t.real()), __y * __t.imag()); } template inline complex<_Tp> __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } inline __complex__ float __complex_pow(__complex__ float __x, __complex__ float __y) { return __builtin_cpowf(__x, __y); } inline __complex__ double __complex_pow(__complex__ double __x, __complex__ double __y) { return __builtin_cpow(__x, __y); } inline __complex__ long double __complex_pow(const __complex__ long double& __x, const __complex__ long double& __y) { return __builtin_cpowl(__x, __y); } template inline complex<_Tp> pow(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __complex_pow(__x.__rep(), __y.__rep()); } template inline complex<_Tp> pow(const _Tp& __x, const complex<_Tp>& __y) { return __x > _Tp() ? std::polar(pow(__x, __y.real()), __y.imag() * log(__x)) : std::pow(complex<_Tp>(__x), __y); } template<> struct complex { typedef float value_type; typedef __complex__ float _ComplexT; constexpr complex(_ComplexT __z) : _M_value(__z) { } constexpr complex(float __r = 0.0f, float __i = 0.0f) : _M_value{ __r, __i } { } explicit constexpr complex(const complex&); explicit constexpr complex(const complex&); constexpr float real() { return __real__ _M_value; } constexpr float imag() { return __imag__ _M_value; } # 1085 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 void real(float __val) { __real__ _M_value = __val; } void imag(float __val) { __imag__ _M_value = __val; } complex& operator=(float __f) { _M_value = __f; return *this; } complex& operator+=(float __f) { _M_value += __f; return *this; } complex& operator-=(float __f) { _M_value -= __f; return *this; } complex& operator*=(float __f) { _M_value *= __f; return *this; } complex& operator/=(float __f) { _M_value /= __f; return *this; } template complex& operator=(const complex<_Tp>& __z) { __real__ _M_value = __z.real(); __imag__ _M_value = __z.imag(); return *this; } template complex& operator+=(const complex<_Tp>& __z) { __real__ _M_value += __z.real(); __imag__ _M_value += __z.imag(); return *this; } template complex& operator-=(const complex<_Tp>& __z) { __real__ _M_value -= __z.real(); __imag__ _M_value -= __z.imag(); return *this; } template complex& operator*=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value *= __t; return *this; } template complex& operator/=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value /= __t; return *this; } constexpr _ComplexT __rep() const { return _M_value; } private: _ComplexT _M_value; }; template<> struct complex { typedef double value_type; typedef __complex__ double _ComplexT; constexpr complex(_ComplexT __z) : _M_value(__z) { } constexpr complex(double __r = 0.0, double __i = 0.0) : _M_value{ __r, __i } { } constexpr complex(const complex& __z) : _M_value(__z.__rep()) { } explicit constexpr complex(const complex&); constexpr double real() { return __real__ _M_value; } constexpr double imag() { return __imag__ _M_value; } # 1234 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 void real(double __val) { __real__ _M_value = __val; } void imag(double __val) { __imag__ _M_value = __val; } complex& operator=(double __d) { _M_value = __d; return *this; } complex& operator+=(double __d) { _M_value += __d; return *this; } complex& operator-=(double __d) { _M_value -= __d; return *this; } complex& operator*=(double __d) { _M_value *= __d; return *this; } complex& operator/=(double __d) { _M_value /= __d; return *this; } template complex& operator=(const complex<_Tp>& __z) { __real__ _M_value = __z.real(); __imag__ _M_value = __z.imag(); return *this; } template complex& operator+=(const complex<_Tp>& __z) { __real__ _M_value += __z.real(); __imag__ _M_value += __z.imag(); return *this; } template complex& operator-=(const complex<_Tp>& __z) { __real__ _M_value -= __z.real(); __imag__ _M_value -= __z.imag(); return *this; } template complex& operator*=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value *= __t; return *this; } template complex& operator/=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value /= __t; return *this; } constexpr _ComplexT __rep() const { return _M_value; } private: _ComplexT _M_value; }; template<> struct complex { typedef long double value_type; typedef __complex__ long double _ComplexT; constexpr complex(_ComplexT __z) : _M_value(__z) { } constexpr complex(long double __r = 0.0L, long double __i = 0.0L) : _M_value{ __r, __i } { } constexpr complex(const complex& __z) : _M_value(__z.__rep()) { } constexpr complex(const complex& __z) : _M_value(__z.__rep()) { } constexpr long double real() { return __real__ _M_value; } constexpr long double imag() { return __imag__ _M_value; } # 1384 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 void real(long double __val) { __real__ _M_value = __val; } void imag(long double __val) { __imag__ _M_value = __val; } complex& operator=(long double __r) { _M_value = __r; return *this; } complex& operator+=(long double __r) { _M_value += __r; return *this; } complex& operator-=(long double __r) { _M_value -= __r; return *this; } complex& operator*=(long double __r) { _M_value *= __r; return *this; } complex& operator/=(long double __r) { _M_value /= __r; return *this; } template complex& operator=(const complex<_Tp>& __z) { __real__ _M_value = __z.real(); __imag__ _M_value = __z.imag(); return *this; } template complex& operator+=(const complex<_Tp>& __z) { __real__ _M_value += __z.real(); __imag__ _M_value += __z.imag(); return *this; } template complex& operator-=(const complex<_Tp>& __z) { __real__ _M_value -= __z.real(); __imag__ _M_value -= __z.imag(); return *this; } template complex& operator*=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value *= __t; return *this; } template complex& operator/=(const complex<_Tp>& __z) { _ComplexT __t; __real__ __t = __z.real(); __imag__ __t = __z.imag(); _M_value /= __t; return *this; } constexpr _ComplexT __rep() const { return _M_value; } private: _ComplexT _M_value; }; inline constexpr complex::complex(const complex& __z) : _M_value(__z.__rep()) { } inline constexpr complex::complex(const complex& __z) : _M_value(__z.__rep()) { } inline constexpr complex::complex(const complex& __z) : _M_value(__z.__rep()) { } extern template istream& operator>>(istream&, complex&); extern template ostream& operator<<(ostream&, const complex&); extern template istream& operator>>(istream&, complex&); extern template ostream& operator<<(ostream&, const complex&); extern template istream& operator>>(istream&, complex&); extern template ostream& operator<<(ostream&, const complex&); extern template wistream& operator>>(wistream&, complex&); extern template wostream& operator<<(wostream&, const complex&); extern template wistream& operator>>(wistream&, complex&); extern template wostream& operator<<(wostream&, const complex&); extern template wistream& operator>>(wistream&, complex&); extern template wostream& operator<<(wostream&, const complex&); } namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template struct __promote_2, _Up> { public: typedef std::complex::__type> __type; }; template struct __promote_2<_Tp, std::complex<_Up> > { public: typedef std::complex::__type> __type; }; template struct __promote_2, std::complex<_Up> > { public: typedef std::complex::__type> __type; }; } namespace std __attribute__ ((__visibility__ ("default"))) { template std::complex<_Tp> acos(const std::complex<_Tp>&); template std::complex<_Tp> asin(const std::complex<_Tp>&); template std::complex<_Tp> atan(const std::complex<_Tp>&); template std::complex<_Tp> acosh(const std::complex<_Tp>&); template std::complex<_Tp> asinh(const std::complex<_Tp>&); template std::complex<_Tp> atanh(const std::complex<_Tp>&); template _Tp fabs(const std::complex<_Tp>&); template inline std::complex<_Tp> __complex_acos(const std::complex<_Tp>& __z) { const std::complex<_Tp> __t = std::asin(__z); const _Tp __pi_2 = 1.5707963267948966192313216916397514L; return std::complex<_Tp>(__pi_2 - __t.real(), -__t.imag()); } inline __complex__ float __complex_acos(__complex__ float __z) { return __builtin_cacosf(__z); } inline __complex__ double __complex_acos(__complex__ double __z) { return __builtin_cacos(__z); } inline __complex__ long double __complex_acos(const __complex__ long double& __z) { return __builtin_cacosl(__z); } template inline std::complex<_Tp> acos(const std::complex<_Tp>& __z) { return __complex_acos(__z.__rep()); } # 1605 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline std::complex<_Tp> __complex_asin(const std::complex<_Tp>& __z) { std::complex<_Tp> __t(-__z.imag(), __z.real()); __t = std::asinh(__t); return std::complex<_Tp>(__t.imag(), -__t.real()); } inline __complex__ float __complex_asin(__complex__ float __z) { return __builtin_casinf(__z); } inline __complex__ double __complex_asin(__complex__ double __z) { return __builtin_casin(__z); } inline __complex__ long double __complex_asin(const __complex__ long double& __z) { return __builtin_casinl(__z); } template inline std::complex<_Tp> asin(const std::complex<_Tp>& __z) { return __complex_asin(__z.__rep()); } # 1641 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template std::complex<_Tp> __complex_atan(const std::complex<_Tp>& __z) { const _Tp __r2 = __z.real() * __z.real(); const _Tp __x = _Tp(1.0) - __r2 - __z.imag() * __z.imag(); _Tp __num = __z.imag() + _Tp(1.0); _Tp __den = __z.imag() - _Tp(1.0); __num = __r2 + __num * __num; __den = __r2 + __den * __den; return std::complex<_Tp>(_Tp(0.5) * atan2(_Tp(2.0) * __z.real(), __x), _Tp(0.25) * log(__num / __den)); } inline __complex__ float __complex_atan(__complex__ float __z) { return __builtin_catanf(__z); } inline __complex__ double __complex_atan(__complex__ double __z) { return __builtin_catan(__z); } inline __complex__ long double __complex_atan(const __complex__ long double& __z) { return __builtin_catanl(__z); } template inline std::complex<_Tp> atan(const std::complex<_Tp>& __z) { return __complex_atan(__z.__rep()); } # 1685 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template std::complex<_Tp> __complex_acosh(const std::complex<_Tp>& __z) { return _Tp(2.0) * std::log(std::sqrt(_Tp(0.5) * (__z + _Tp(1.0))) + std::sqrt(_Tp(0.5) * (__z - _Tp(1.0)))); } inline __complex__ float __complex_acosh(__complex__ float __z) { return __builtin_cacoshf(__z); } inline __complex__ double __complex_acosh(__complex__ double __z) { return __builtin_cacosh(__z); } inline __complex__ long double __complex_acosh(const __complex__ long double& __z) { return __builtin_cacoshl(__z); } template inline std::complex<_Tp> acosh(const std::complex<_Tp>& __z) { return __complex_acosh(__z.__rep()); } # 1721 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template std::complex<_Tp> __complex_asinh(const std::complex<_Tp>& __z) { std::complex<_Tp> __t((__z.real() - __z.imag()) * (__z.real() + __z.imag()) + _Tp(1.0), _Tp(2.0) * __z.real() * __z.imag()); __t = std::sqrt(__t); return std::log(__t + __z); } inline __complex__ float __complex_asinh(__complex__ float __z) { return __builtin_casinhf(__z); } inline __complex__ double __complex_asinh(__complex__ double __z) { return __builtin_casinh(__z); } inline __complex__ long double __complex_asinh(const __complex__ long double& __z) { return __builtin_casinhl(__z); } template inline std::complex<_Tp> asinh(const std::complex<_Tp>& __z) { return __complex_asinh(__z.__rep()); } # 1760 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template std::complex<_Tp> __complex_atanh(const std::complex<_Tp>& __z) { const _Tp __i2 = __z.imag() * __z.imag(); const _Tp __x = _Tp(1.0) - __i2 - __z.real() * __z.real(); _Tp __num = _Tp(1.0) + __z.real(); _Tp __den = _Tp(1.0) - __z.real(); __num = __i2 + __num * __num; __den = __i2 + __den * __den; return std::complex<_Tp>(_Tp(0.25) * (log(__num) - log(__den)), _Tp(0.5) * atan2(_Tp(2.0) * __z.imag(), __x)); } inline __complex__ float __complex_atanh(__complex__ float __z) { return __builtin_catanhf(__z); } inline __complex__ double __complex_atanh(__complex__ double __z) { return __builtin_catanh(__z); } inline __complex__ long double __complex_atanh(const __complex__ long double& __z) { return __builtin_catanhl(__z); } template inline std::complex<_Tp> atanh(const std::complex<_Tp>& __z) { return __complex_atanh(__z.__rep()); } # 1804 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline _Tp fabs(const std::complex<_Tp>& __z) { return std::abs(__z); } template inline typename __gnu_cxx::__promote<_Tp>::__type arg(_Tp __x) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L) : __type(); } template inline typename __gnu_cxx::__promote<_Tp>::__type imag(_Tp) { return _Tp(); } template inline typename __gnu_cxx::__promote<_Tp>::__type norm(_Tp __x) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __type(__x) * __type(__x); } template inline typename __gnu_cxx::__promote<_Tp>::__type real(_Tp __x) { return __x; } template inline std::complex::__type> pow(const std::complex<_Tp>& __x, const _Up& __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return std::pow(std::complex<__type>(__x), __type(__y)); } template inline std::complex::__type> pow(const _Tp& __x, const std::complex<_Up>& __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return std::pow(__type(__x), std::complex<__type>(__y)); } template inline std::complex::__type> pow(const std::complex<_Tp>& __x, const std::complex<_Up>& __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return std::pow(std::complex<__type>(__x), std::complex<__type>(__y)); } template std::complex<_Tp> proj(const std::complex<_Tp>&); template std::complex<_Tp> __complex_proj(const std::complex<_Tp>& __z) { const _Tp __den = (__z.real() * __z.real() + __z.imag() * __z.imag() + _Tp(1.0)); return std::complex<_Tp>((_Tp(2.0) * __z.real()) / __den, (_Tp(2.0) * __z.imag()) / __den); } inline __complex__ float __complex_proj(__complex__ float __z) { return __builtin_cprojf(__z); } inline __complex__ double __complex_proj(__complex__ double __z) { return __builtin_cproj(__z); } inline __complex__ long double __complex_proj(const __complex__ long double& __z) { return __builtin_cprojl(__z); } template inline std::complex<_Tp> proj(const std::complex<_Tp>& __z) { return __complex_proj(__z.__rep()); } # 1909 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/complex" 3 template inline typename __gnu_cxx::__promote<_Tp>::__type proj(_Tp __x) { return __x; } template inline typename __gnu_cxx::__promote<_Tp>::__type conj(_Tp __x) { return __x; } } # 13 "/localhome/glisse2/include/boost/type_traits/is_complex.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/is_complex.hpp" 2 namespace boost { namespace detail{ struct is_convertible_from_tester { template is_convertible_from_tester(const std::complex&); }; } template< typename T > struct is_complex : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 33 "/localhome/glisse2/include/boost/type_traits/is_complex.hpp" 2 # 48 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_compound.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/is_compound.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/is_compound.hpp" 2 namespace boost { namespace detail { template struct is_compound_impl { static const bool value = (::boost::type_traits::ice_not< ::boost::is_fundamental::value >::value) ; }; } template< typename T > struct is_compound : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 45 "/localhome/glisse2/include/boost/type_traits/is_compound.hpp" 2 # 49 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_empty.hpp" 1 # 32 "/localhome/glisse2/include/boost/type_traits/is_empty.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 33 "/localhome/glisse2/include/boost/type_traits/is_empty.hpp" 2 namespace boost { namespace detail { # 51 "/localhome/glisse2/include/boost/type_traits/is_empty.hpp" template struct empty_helper_t1 : public T { empty_helper_t1(); int i[256]; private: empty_helper_t1(const empty_helper_t1&); empty_helper_t1& operator=(const empty_helper_t1&); }; struct empty_helper_t2 { int i[256]; }; template struct empty_helper { static const bool value = false; }; template struct empty_helper { static const bool value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) ; }; template struct is_empty_impl { typedef typename remove_cv::type cvt; static const bool value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper::value>::value , false >::value ) ; }; # 211 "/localhome/glisse2/include/boost/type_traits/is_empty.hpp" template<> struct is_empty_impl< void > { public: static const bool value = (false); }; template<> struct is_empty_impl< void const > { public: static const bool value = (false); }; template<> struct is_empty_impl< void volatile > { public: static const bool value = (false); }; template<> struct is_empty_impl< void const volatile > { public: static const bool value = (false); }; } template< typename T > struct is_empty : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 225 "/localhome/glisse2/include/boost/type_traits/is_empty.hpp" 2 # 52 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_floating_point.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/is_floating_point.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 14 "/localhome/glisse2/include/boost/type_traits/is_floating_point.hpp" 2 namespace boost { template< typename T > struct is_floating_point : public ::boost::integral_constant { public: }; template<> struct is_floating_point< float > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< float const > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< float volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< float const volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< double > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< double const > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< double volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< double const volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< long double > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< long double const > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< long double volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< long double const volatile > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 26 "/localhome/glisse2/include/boost/type_traits/is_floating_point.hpp" 2 # 55 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_member_object_pointer.hpp" 1 # 20 "/localhome/glisse2/include/boost/type_traits/is_member_object_pointer.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits/is_member_object_pointer.hpp" 2 namespace boost { namespace detail{ template struct is_member_object_pointer_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::is_member_pointer::value, ::boost::type_traits::ice_not< ::boost::is_member_function_pointer::value >::value >::value ) ; }; } template< typename T > struct is_member_object_pointer : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 45 "/localhome/glisse2/include/boost/type_traits/is_member_object_pointer.hpp" 2 # 61 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_object.hpp" 1 # 20 "/localhome/glisse2/include/boost/type_traits/is_object.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits/is_object.hpp" 2 namespace boost { namespace detail { template struct is_object_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value, ::boost::type_traits::ice_not< ::boost::is_function::value>::value >::value) ; }; } template< typename T > struct is_object : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 52 "/localhome/glisse2/include/boost/type_traits/is_object.hpp" 2 # 63 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_polymorphic.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/is_polymorphic.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/is_polymorphic.hpp" 2 namespace boost{ # 106 "/localhome/glisse2/include/boost/type_traits/is_polymorphic.hpp" template< typename T > struct is_polymorphic : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 113 "/localhome/glisse2/include/boost/type_traits/is_polymorphic.hpp" 2 # 65 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_signed.hpp" 1 # 19 "/localhome/glisse2/include/boost/type_traits/is_signed.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/is_signed.hpp" 2 namespace boost { namespace detail{ template struct is_signed_values { typedef typename remove_cv::type no_cv_t; static const no_cv_t minus_one = (static_cast(-1)); static const no_cv_t zero = (static_cast(0)); }; template struct is_signed_helper { typedef typename remove_cv::type no_cv_t; static const bool value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero)); }; template struct is_signed_select_helper { template struct rebind { typedef is_signed_helper type; }; }; template <> struct is_signed_select_helper { template struct rebind { typedef false_type type; }; }; template struct is_signed_imp { typedef is_signed_select_helper< ::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value > selector; typedef typename selector::template rebind binder; typedef typename binder::type type; static const bool value = type::value; }; # 126 "/localhome/glisse2/include/boost/type_traits/is_signed.hpp" } template< typename T > struct is_signed : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 139 "/localhome/glisse2/include/boost/type_traits/is_signed.hpp" 2 # 69 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_stateless.hpp" 1 # 21 "/localhome/glisse2/include/boost/type_traits/is_stateless.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/is_stateless.hpp" 2 namespace boost { namespace detail { template struct is_stateless_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::has_trivial_constructor::value, ::boost::has_trivial_copy::value, ::boost::has_trivial_destructor::value, ::boost::is_class::value, ::boost::is_empty::value >::value) ; }; } template< typename T > struct is_stateless : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 47 "/localhome/glisse2/include/boost/type_traits/is_stateless.hpp" 2 # 72 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_union.hpp" 1 # 19 "/localhome/glisse2/include/boost/type_traits/is_union.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/is_union.hpp" 2 namespace boost { namespace detail { # 40 "/localhome/glisse2/include/boost/type_traits/is_union.hpp" template struct is_union_impl { static const bool value = __is_union(T); }; } template< typename T > struct is_union : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 56 "/localhome/glisse2/include/boost/type_traits/is_union.hpp" 2 # 73 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_unsigned.hpp" 1 # 19 "/localhome/glisse2/include/boost/type_traits/is_unsigned.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 20 "/localhome/glisse2/include/boost/type_traits/is_unsigned.hpp" 2 namespace boost { namespace detail{ template struct is_unsigned_values { typedef typename remove_cv::type no_cv_t; static const no_cv_t minus_one = (static_cast(-1)); static const no_cv_t zero = (static_cast(0)); }; template struct is_ununsigned_helper { static const bool value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero); }; template struct is_ununsigned_select_helper { template struct rebind { typedef is_ununsigned_helper type; }; }; template <> struct is_ununsigned_select_helper { template struct rebind { typedef false_type type; }; }; template struct is_unsigned_imp { typedef is_ununsigned_select_helper< ::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value > selector; typedef typename selector::template rebind binder; typedef typename binder::type type; static const bool value = type::value; }; # 121 "/localhome/glisse2/include/boost/type_traits/is_unsigned.hpp" } template< typename T > struct is_unsigned : public ::boost::integral_constant::value> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 # 134 "/localhome/glisse2/include/boost/type_traits/is_unsigned.hpp" 2 # 74 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/is_virtual_base_of.hpp" 1 # 17 "/localhome/glisse2/include/boost/type_traits/is_virtual_base_of.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_def.hpp" 2 # 18 "/localhome/glisse2/include/boost/type_traits/is_virtual_base_of.hpp" 2 namespace boost { namespace detail { # 28 "/localhome/glisse2/include/boost/type_traits/is_virtual_base_of.hpp" 3 template struct is_virtual_base_of_impl { static const bool value = false; }; template struct is_virtual_base_of_impl { # 55 "/localhome/glisse2/include/boost/type_traits/is_virtual_base_of.hpp" 3 struct boost_type_traits_internal_struct_X : public Derived, virtual Base { boost_type_traits_internal_struct_X(); boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&); boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&); ~boost_type_traits_internal_struct_X()throw(); }; struct boost_type_traits_internal_struct_Y : public Derived { boost_type_traits_internal_struct_Y(); boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&); boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&); ~boost_type_traits_internal_struct_Y()throw(); }; static const bool value = (sizeof(boost_type_traits_internal_struct_X)==sizeof(boost_type_traits_internal_struct_Y)); }; template struct is_virtual_base_of_impl2 { typedef typename mpl::and_, mpl::not_ > >::type tag_type; typedef is_virtual_base_of_impl imp; static const bool value = imp::value; }; } template< typename Base, typename Derived > struct is_virtual_base_of : public ::boost::integral_constant::value)> { public: }; template< typename Base, typename Derived > struct is_virtual_base_of< Base&,Derived > : public ::boost::integral_constant { public: }; template< typename Base, typename Derived > struct is_virtual_base_of< Base,Derived& > : public ::boost::integral_constant { public: }; template< typename Base, typename Derived > struct is_virtual_base_of< Base&,Derived& > : public ::boost::integral_constant { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/bool_trait_undef.hpp" 1 3 # 103 "/localhome/glisse2/include/boost/type_traits/is_virtual_base_of.hpp" 2 3 # 76 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/make_unsigned.hpp" 1 # 29 "/localhome/glisse2/include/boost/type_traits/make_unsigned.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 30 "/localhome/glisse2/include/boost/type_traits/make_unsigned.hpp" 2 namespace boost { namespace detail { template struct make_unsigned_imp { static_assert((::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value), "(::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)") ; static_assert((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value), "(::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)") ; typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_unsigned::value, ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), T, typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value> ::value), typename mpl::if_< is_same, unsigned char, typename mpl::if_< is_same, unsigned short, typename mpl::if_< is_same, unsigned int, typename mpl::if_< is_same, unsigned long, boost::ulong_long_type >::type >::type >::type >::type, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned char), unsigned char, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned short), unsigned short, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned int), unsigned int, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned long), unsigned long, boost::ulong_long_type >::type >::type >::type >::type >::type >::type base_integer_type; typedef typename mpl::if_< is_const, typename add_const::type, base_integer_type >::type const_base_integer_type; typedef typename mpl::if_< is_volatile, typename add_volatile::type, const_base_integer_type >::type type; }; } template< typename T > struct make_unsigned { public: typedef typename boost::detail::make_unsigned_imp::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 135 "/localhome/glisse2/include/boost/type_traits/make_unsigned.hpp" 2 # 78 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/make_signed.hpp" 1 # 29 "/localhome/glisse2/include/boost/type_traits/make_signed.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 30 "/localhome/glisse2/include/boost/type_traits/make_signed.hpp" 2 namespace boost { namespace detail { template struct make_signed_imp { static_assert((::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value), "(::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)") ; static_assert((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value), "(::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)") ; typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_signed::value, ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), T, typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value> ::value), typename mpl::if_< is_same, signed char, typename mpl::if_< is_same, signed short, typename mpl::if_< is_same, int, typename mpl::if_< is_same, long, boost::long_long_type >::type >::type >::type >::type, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned char), signed char, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned short), signed short, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned int), int, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned long), long, boost::long_long_type >::type >::type >::type >::type >::type >::type base_integer_type; typedef typename mpl::if_< is_const, typename add_const::type, base_integer_type >::type const_base_integer_type; typedef typename mpl::if_< is_volatile, typename add_volatile::type, const_base_integer_type >::type type; }; } template< typename T > struct make_signed { public: typedef typename boost::detail::make_signed_imp::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 135 "/localhome/glisse2/include/boost/type_traits/make_signed.hpp" 2 # 79 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/rank.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/rank.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 20 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_def.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/rank.hpp" 2 namespace boost { namespace detail{ template struct rank_imp { static const std::size_t value = N; }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; template struct rank_imp { static const std::size_t value = (::boost::detail::rank_imp::value); }; } template< typename T > struct rank : public ::boost::integral_constant::value)> { public: }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/size_t_trait_undef.hpp" 1 # 88 "/localhome/glisse2/include/boost/type_traits/rank.hpp" 2 # 80 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/remove_extent.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/remove_extent.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 15 "/localhome/glisse2/include/boost/type_traits/remove_extent.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/remove_extent.hpp" 2 namespace boost { template< typename T > struct remove_extent { public: typedef T type; }; template< typename T, std::size_t N > struct remove_extent { public: typedef T type; }; template< typename T, std::size_t N > struct remove_extent { public: typedef T const type; }; template< typename T, std::size_t N > struct remove_extent { public: typedef T volatile type; }; template< typename T, std::size_t N > struct remove_extent { public: typedef T const volatile type; }; template< typename T > struct remove_extent { public: typedef T type; }; template< typename T > struct remove_extent { public: typedef T const type; }; template< typename T > struct remove_extent { public: typedef T volatile type; }; template< typename T > struct remove_extent { public: typedef T const volatile type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 47 "/localhome/glisse2/include/boost/type_traits/remove_extent.hpp" 2 # 82 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/remove_all_extents.hpp" 1 # 13 "/localhome/glisse2/include/boost/type_traits/remove_all_extents.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 14 "/localhome/glisse2/include/boost/type_traits/remove_all_extents.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 22 "/localhome/glisse2/include/boost/type_traits/remove_all_extents.hpp" 2 namespace boost { template< typename T > struct remove_all_extents { public: typedef T type; }; template< typename T, std::size_t N > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; template< typename T, std::size_t N > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; template< typename T, std::size_t N > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; template< typename T, std::size_t N > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; template< typename T > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; template< typename T > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; template< typename T > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; template< typename T > struct remove_all_extents { public: typedef typename boost::remove_all_extents::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 47 "/localhome/glisse2/include/boost/type_traits/remove_all_extents.hpp" 2 # 83 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/remove_volatile.hpp" 1 # 20 "/localhome/glisse2/include/boost/type_traits/remove_volatile.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 21 "/localhome/glisse2/include/boost/type_traits/remove_volatile.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 28 "/localhome/glisse2/include/boost/type_traits/remove_volatile.hpp" 2 namespace boost { namespace detail { template struct remove_volatile_helper { typedef T type; }; template struct remove_volatile_helper { typedef T const type; }; template struct remove_volatile_impl { typedef typename remove_volatile_helper< typename cv_traits_imp::unqualified_type , ::boost::is_const::value >::type type; }; template struct remove_volatile_impl { typedef T&& type; }; } template< typename T > struct remove_volatile { public: typedef typename boost::detail::remove_volatile_impl::type type; }; template< typename T > struct remove_volatile { public: typedef T& type; }; template< typename T, std::size_t N > struct remove_volatile { public: typedef T type[N]; }; template< typename T, std::size_t N > struct remove_volatile { public: typedef T const type[N]; }; # 84 "/localhome/glisse2/include/boost/type_traits/remove_volatile.hpp" } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 87 "/localhome/glisse2/include/boost/type_traits/remove_volatile.hpp" 2 # 88 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" 1 # 20 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 21 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" 2 namespace boost { namespace type_traits { namespace detail { template struct need_promotion : public boost::is_enum {}; template<> struct need_promotion : public true_type {}; template<> struct need_promotion : public true_type {}; template<> struct need_promotion : public true_type {}; template<> struct need_promotion : public true_type {}; template<> struct need_promotion : public true_type {}; # 63 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" template<> struct need_promotion : public integral_constant {}; template<> struct need_promotion : public integral_constant {}; # 75 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" template<> struct need_promotion : public true_type {}; template<> struct need_promotion : public true_type {}; template struct promote_from_index; # 95 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" template<> struct promote_from_index<1,0,0> { typedef int type; }; template<> struct promote_from_index<1,0,1> { typedef int volatile type; }; template<> struct promote_from_index<1,1,0> { typedef int const type; }; template<> struct promote_from_index<1,1,1> { typedef int const volatile type; }; template<> struct promote_from_index<2,0,0> { typedef unsigned int type; }; template<> struct promote_from_index<2,0,1> { typedef unsigned int volatile type; }; template<> struct promote_from_index<2,1,0> { typedef unsigned int const type; }; template<> struct promote_from_index<2,1,1> { typedef unsigned int const volatile type; }; template<> struct promote_from_index<3,0,0> { typedef long type; }; template<> struct promote_from_index<3,0,1> { typedef long volatile type; }; template<> struct promote_from_index<3,1,0> { typedef long const type; }; template<> struct promote_from_index<3,1,1> { typedef long const volatile type; }; template<> struct promote_from_index<4,0,0> { typedef unsigned long type; }; template<> struct promote_from_index<4,0,1> { typedef unsigned long volatile type; }; template<> struct promote_from_index<4,1,0> { typedef unsigned long const type; }; template<> struct promote_from_index<4,1,1> { typedef unsigned long const volatile type; }; # 107 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" template<> struct promote_from_index<5,0,0> { typedef boost::long_long_type type; }; template<> struct promote_from_index<5,0,1> { typedef boost::long_long_type volatile type; }; template<> struct promote_from_index<5,1,0> { typedef boost::long_long_type const type; }; template<> struct promote_from_index<5,1,1> { typedef boost::long_long_type const volatile type; }; template<> struct promote_from_index<6,0,0> { typedef boost::ulong_long_type type; }; template<> struct promote_from_index<6,0,1> { typedef boost::ulong_long_type volatile type; }; template<> struct promote_from_index<6,1,0> { typedef boost::ulong_long_type const type; }; template<> struct promote_from_index<6,1,1> { typedef boost::ulong_long_type const volatile type; }; # 120 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" template struct sized_type_for_promotion { typedef char (&type)[N]; }; # 136 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" sized_type_for_promotion<1>::type promoted_index_tester(int); sized_type_for_promotion<2>::type promoted_index_tester(unsigned int); sized_type_for_promotion<3>::type promoted_index_tester(long); sized_type_for_promotion<4>::type promoted_index_tester(unsigned long); sized_type_for_promotion<5>::type promoted_index_tester(boost::long_long_type); sized_type_for_promotion<6>::type promoted_index_tester(boost::ulong_long_type); # 154 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" template struct promoted_index { static T testee; static const int value = sizeof(promoted_index_tester(+testee)); }; template struct integral_promotion_impl { typedef typename promote_from_index< (boost::type_traits::detail::promoted_index::value) , (boost::is_const::value) , (boost::is_volatile::value) >::type type; }; template struct integral_promotion : public boost::mpl::eval_if< need_promotion::type> , integral_promotion_impl , boost::mpl::identity > { }; } } template< typename T > struct integral_promotion { public: typedef typename boost::type_traits::detail::integral_promotion::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 193 "/localhome/glisse2/include/boost/type_traits/integral_promotion.hpp" 2 # 91 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/type_traits/promote.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/promote.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 1 # 14 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/detail/template_arity_spec.hpp" 1 # 15 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_def.hpp" 2 # 15 "/localhome/glisse2/include/boost/type_traits/promote.hpp" 2 namespace boost { namespace detail { template struct promote_impl : public integral_promotion< typename floating_point_promotion::type > { }; } template< typename T > struct promote { public: typedef typename boost::detail::promote_impl::type type; }; } # 1 "/localhome/glisse2/include/boost/type_traits/detail/type_trait_undef.hpp" 1 # 38 "/localhome/glisse2/include/boost/type_traits/promote.hpp" 2 # 92 "/localhome/glisse2/include/boost/type_traits.hpp" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Qualified_result_of.h" 2 namespace CGAL { struct Has_qrt {}; template < typename F, bool b > struct qrt_or_not { typedef typename F::result_type type; }; template < typename F > struct qrt_or_not { typedef const typename F::result_type & type; }; template struct Qualified_result_of : qrt_or_not::value> {}; } # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_basic.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel_traits.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel_traits.h" namespace CGAL { template struct Kernel_traits { typedef typename T::R Kernel; }; } # 46 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_basic.h" 2 # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic.h" 2 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic_classes.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic_classes.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Origin.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Origin.h" namespace CGAL { class Origin {}; extern const Origin ORIGIN; class Null_vector {}; extern const Null_vector NULL_VECTOR; } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Dimension.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Dimension.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/syslimits.h" 1 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 169 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 3 4 # 1 "/usr/include/limits.h" 1 3 4 # 145 "/usr/include/limits.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4 # 157 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4 # 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4 # 1 "/usr/include/linux/limits.h" 1 3 4 # 40 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4 # 158 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4 # 146 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4 # 150 "/usr/include/limits.h" 2 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 1 3 4 # 34 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 # 35 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 2 3 4 # 154 "/usr/include/limits.h" 2 3 4 # 170 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 2 3 4 # 8 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/syslimits.h" 2 3 4 # 35 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 2 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Dimension.h" 2 namespace CGAL { template < int dim > struct Dimension_tag { static const int value = dim; }; struct Dynamic_dimension_tag {}; namespace internal { template < typename D > struct Dim_value { static const int value = D::value; }; template <> struct Dim_value {}; } template < typename T, typename K = typename Kernel_traits::Kernel > struct Ambient_dimension : public internal::Dim_value< typename K::template Ambient_dimension::type > { typedef typename K::template Ambient_dimension::type type; }; template < typename T, typename K = typename Kernel_traits::Kernel > struct Feature_dimension : public internal::Dim_value< typename K::template Feature_dimension::type > { typedef typename K::template Feature_dimension::type type; }; } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/array.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/array.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/array" 1 3 # 32 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/array" 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/array" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/array" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/array" 3 template struct array { typedef _Tp value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef value_type* iterator; typedef const value_type* const_iterator; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; value_type _M_instance[_Nm ? _Nm : 1]; void fill(const value_type& __u) { std::fill_n(begin(), size(), __u); } void swap(array& __other) noexcept(noexcept(swap(std::declval<_Tp&>(), std::declval<_Tp&>()))) { std::swap_ranges(begin(), end(), __other.begin()); } iterator begin() noexcept { return iterator(data()); } const_iterator begin() const noexcept { return const_iterator(data()); } iterator end() noexcept { return iterator(data() + _Nm); } const_iterator end() const noexcept { return const_iterator(data() + _Nm); } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } const_iterator cbegin() const noexcept { return const_iterator(std::__addressof(_M_instance[0])); } const_iterator cend() const noexcept { return const_iterator(std::__addressof(_M_instance[_Nm])); } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } constexpr size_type size() const noexcept { return _Nm; } constexpr size_type max_size() const noexcept { return _Nm; } constexpr bool empty() const noexcept { return size() == 0; } reference operator[](size_type __n) { return _M_instance[__n]; } constexpr const_reference operator[](size_type __n) const noexcept { return _M_instance[__n]; } reference at(size_type __n) { if (__n >= _Nm) std::__throw_out_of_range(("array::at")); return _M_instance[__n]; } constexpr const_reference at(size_type __n) const { return __n < _Nm ? _M_instance[__n] : throw out_of_range(("array::at")); } # 182 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/array" 3 reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { return _Nm ? *(end() - 1) : *end(); } const_reference back() const { return _Nm ? *(end() - 1) : *end(); } pointer data() noexcept { return std::__addressof(_M_instance[0]); } const_pointer data() const noexcept { return std::__addressof(_M_instance[0]); } }; template inline bool operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return std::equal(__one.begin(), __one.end(), __two.begin()); } template inline bool operator!=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one == __two); } template inline bool operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b) { return std::lexicographical_compare(__a.begin(), __a.end(), __b.begin(), __b.end()); } template inline bool operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return __two < __one; } template inline bool operator<=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one > __two); } template inline bool operator>=(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two) { return !(__one < __two); } template inline void swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) noexcept(noexcept(__one.swap(__two))) { __one.swap(__two); } template class tuple_size; template struct tuple_size> : public integral_constant { }; template class tuple_element; template struct tuple_element<_Int, array<_Tp, _Nm> > { typedef _Tp type; }; template constexpr _Tp& get(array<_Tp, _Nm>& __arr) noexcept { return __arr._M_instance[_Int]; } template constexpr _Tp&& get(array<_Tp, _Nm>&& __arr) noexcept { return std::move(get<_Int>(__arr)); } template constexpr const _Tp& get(const array<_Tp, _Nm>& __arr) noexcept { return __arr._M_instance[_Int]; } } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/array.h" 2 namespace CGAL { namespace cpp0x { using std::array; } using cpp0x::array; # 81 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/array.h" template< typename T, typename... Args > inline cpp0x::array< T, 1 + sizeof...(Args) > make_array(const T & t, const Args & ... args) { cpp0x::array< T, 1 + sizeof...(Args) > a = { { t, static_cast(args)... } }; return a; } # 143 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/array.h" } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_2.h" 2 namespace CGAL { template < typename T > struct Simple_cartesian; class Bbox_2 { typedef cpp0x::array BBox_rep_2; BBox_rep_2 rep; public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<2> Feature_dimension; typedef Simple_cartesian R; Bbox_2() {} Bbox_2(double x_min, double y_min, double x_max, double y_max) : rep(CGAL::make_array(x_min, y_min, x_max, y_max)) {} inline bool operator==(const Bbox_2 &b) const; inline bool operator!=(const Bbox_2 &b) const; inline int dimension() const; inline double xmin() const; inline double ymin() const; inline double xmax() const; inline double ymax() const; inline double max (int i) const; inline double min (int i) const; inline Bbox_2 operator+(const Bbox_2 &b) const; }; inline double Bbox_2::xmin() const { return rep[0]; } inline double Bbox_2::ymin() const { return rep[1]; } inline double Bbox_2::xmax() const { return rep[2]; } inline double Bbox_2::ymax() const { return rep[3]; } inline bool Bbox_2::operator==(const Bbox_2 &b) const { return xmin() == b.xmin() && xmax() == b.xmax() && ymin() == b.ymin() && ymax() == b.ymax(); } inline bool Bbox_2::operator!=(const Bbox_2 &b) const { return ! (b == *this); } inline int Bbox_2::dimension() const { return 2; } inline double Bbox_2::min (int i) const { (CGAL::possibly((i == 0 ) || ( i == 1 ))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0 ) || ( i == 1 )" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_2.h", 117)); if(i == 0) { return xmin(); } return ymin(); } inline double Bbox_2::max (int i) const { (CGAL::possibly((i == 0 ) || ( i == 1 ))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0 ) || ( i == 1 )" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_2.h", 126)); if(i == 0) { return xmax(); } return ymax(); } inline Bbox_2 Bbox_2::operator+(const Bbox_2 &b) const { return Bbox_2((std::min)(xmin(), b.xmin()), (std::min)(ymin(), b.ymin()), (std::max)(xmax(), b.xmax()), (std::max)(ymax(), b.ymax())); } inline bool do_overlap(const Bbox_2 &bb1, const Bbox_2 &bb2) { if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin()) return false; if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin()) return false; return true; } inline std::ostream& operator<<(std::ostream &os, const Bbox_2 &b) { switch(os.iword(IO::mode)) { case IO::ASCII : os << b.xmin() << ' ' << b.ymin() << ' ' << b.xmax() << ' ' << b.ymax(); break; case IO::BINARY : write(os, b.xmin()); write(os, b.ymin()); write(os, b.xmax()); write(os, b.ymax()); break; default: os << "Bbox_2(" << b.xmin() << ", " << b.ymin() << ", " << b.xmax() << ", " << b.ymax() << ")"; break; } return os; } inline std::istream& operator>>(std::istream &is, Bbox_2 &b) { double xmin, ymin, xmax, ymax; switch(is.iword(IO::mode)) { case IO::ASCII : is >> xmin >> ymin >> xmax >> ymax; break; case IO::BINARY : read(is, xmin); read(is, ymin); read(is, xmax); read(is, ymax); break; } if (is) b = Bbox_2(xmin, ymin, xmax, ymax); return is; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_3.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_3.h" namespace CGAL { template < typename T > struct Simple_cartesian; class Bbox_3 { cpp0x::array rep; public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<3> Feature_dimension; typedef Simple_cartesian R; Bbox_3() {} Bbox_3(double x_min, double y_min, double z_min, double x_max, double y_max, double z_max) : rep(CGAL::make_array(x_min, y_min, z_min, x_max, y_max, z_max)) {} inline bool operator==(const Bbox_3 &b) const; inline bool operator!=(const Bbox_3 &b) const; inline int dimension() const; double xmin() const; double ymin() const; double zmin() const; double xmax() const; double ymax() const; double zmax() const; inline double min (int i) const; inline double max (int i) const; Bbox_3 operator+(const Bbox_3& b) const; }; inline double Bbox_3::xmin() const { return rep[0]; } inline double Bbox_3::ymin() const { return rep[1]; } inline double Bbox_3::zmin() const { return rep[2]; } inline double Bbox_3::xmax() const { return rep[3]; } inline double Bbox_3::ymax() const { return rep[4]; } inline double Bbox_3::zmax() const { return rep[5]; } inline bool Bbox_3::operator==(const Bbox_3 &b) const { return xmin() == b.xmin() && xmax() == b.xmax() && ymin() == b.ymin() && ymax() == b.ymax() && zmin() == b.zmin() && zmax() == b.zmax(); } inline bool Bbox_3::operator!=(const Bbox_3 &b) const { return ! (b == *this); } inline int Bbox_3::dimension() const { return 3; } inline double Bbox_3::min (int i) const { (CGAL::possibly((i == 0 ) || ( i == 1 ) || ( i == 2))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0 ) || ( i == 1 ) || ( i == 2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_3.h", 126)); if (i == 0) { return xmin(); } if (i == 1) { return ymin(); } return zmin(); } inline double Bbox_3::max (int i) const { (CGAL::possibly((i == 0 ) || ( i == 1 ) || ( i == 2 ))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0 ) || ( i == 1 ) || ( i == 2 )" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Bbox_3.h", 136)); if (i == 0) { return xmax(); } if (i == 1) { return ymax(); } return zmax(); } inline Bbox_3 Bbox_3::operator+(const Bbox_3& b) const { return Bbox_3((std::min)(xmin(), b.xmin()), (std::min)(ymin(), b.ymin()), (std::min)(zmin(), b.zmin()), (std::max)(xmax(), b.xmax()), (std::max)(ymax(), b.ymax()), (std::max)(zmax(), b.zmax())); } inline bool do_overlap(const Bbox_3& bb1, const Bbox_3& bb2) { if (bb1.xmax() < bb2.xmin() || bb2.xmax() < bb1.xmin()) return false; if (bb1.ymax() < bb2.ymin() || bb2.ymax() < bb1.ymin()) return false; if (bb1.zmax() < bb2.zmin() || bb2.zmax() < bb1.zmin()) return false; return true; } inline std::ostream& operator<<(std::ostream &os, const Bbox_3& b) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << b.xmin() << ' ' << b.ymin() << ' ' << b.zmin() << ' ' << b.xmax() << ' ' << b.ymax() << ' ' << b.zmax(); case IO::BINARY : write(os, b.xmin()); write(os, b.ymin()); write(os, b.zmin()); write(os, b.xmax()); write(os, b.ymax()); write(os, b.zmax()); return os; default: os << "Bbox_3((" << b.xmin() << ", " << b.ymin() << ", " << b.zmin() << "), ("; os << b.xmax() << ", " << b.ymax() << ", " << b.zmax() << "))"; return os; } } inline std::istream& operator>>(std::istream &is, Bbox_3& b) { double xmin, ymin, zmin, xmax, ymax, zmax; switch(is.iword(IO::mode)) { case IO::ASCII : is >> xmin >> ymin >> zmin >> xmax >> ymax >> zmax; break; case IO::BINARY : read(is, xmin); read(is, ymin); read(is, zmin); read(is, xmax); read(is, ymax); read(is, zmax); break; } if (is) b = Bbox_3(xmin, ymin, zmin, xmax, ymax, zmax); return is; } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/representation_tags.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/representation_tags.h" namespace CGAL { class Cartesian_tag {}; class Homogeneous_tag {}; } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/basic_classes.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_2.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Return_base_tag.h" 1 # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Return_base_tag.h" namespace CGAL { struct Return_base_tag {}; } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2.h" 2 namespace CGAL { template class Point_2 : public R_::Kernel_base::Point_2 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Kernel_base::Point_2 RPoint_2; typedef Point_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<0> Feature_dimension; typedef RPoint_2 Rep; typedef typename R_::Cartesian_const_iterator_2 Cartesian_const_iterator; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Point_2() {} Point_2(const Origin& o) : RPoint_2(typename R::Construct_point_2()(Return_base_tag(), o)) {} Point_2(const RPoint_2& p) : RPoint_2(p) {} template < typename T1, typename T2 > Point_2(const T1 &x, const T2 &y) : Rep(typename R::Construct_point_2()(Return_base_tag(), x, y)) {} Point_2(const RT& hx, const RT& hy, const RT& hw) : RPoint_2(typename R::Construct_point_2()(Return_base_tag(), hx, hy, hw)) {} typename Qualified_result_of::type x() const { return typename R::Compute_x_2()(*this); } typename Qualified_result_of::type y() const { return typename R::Compute_y_2()(*this); } typename Qualified_result_of::type cartesian(int i) const { (CGAL::possibly((i == 0) || (i == 1))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0) || (i == 1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2.h", 103)); return (i==0) ? x() : y(); } typename Qualified_result_of::type operator[](int i) const { return cartesian(i); } Cartesian_const_iterator cartesian_begin() const { return typename R::Construct_cartesian_const_iterator_2()(*this); } Cartesian_const_iterator cartesian_end() const { return typename R::Construct_cartesian_const_iterator_2()(*this,2); } typename Qualified_result_of::type hx() const { return typename R::Compute_hx_2()(*this); } typename Qualified_result_of::type hy() const { return typename R::Compute_hy_2()(*this); } typename Qualified_result_of::type hw() const { return typename R::Compute_hw_2()(*this); } int dimension() const { return 2; } typename Qualified_result_of::type homogeneous(int i) const { (CGAL::possibly((i >= 0) || (i <= 2))?(static_cast(0)): ::CGAL::precondition_fail( "(i >= 0) || (i <= 2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2.h", 151)); return (i==0) ? hx() : (i==1)? hy() : hw(); } Bbox_2 bbox() const { return R().construct_bbox_2_object()(*this); } Point_2 transform(const Aff_transformation_2 &t) const { return t.transform(*this); } }; template std::ostream& insert(std::ostream& os, const Point_2& p,const Cartesian_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << p.x() << ' ' << p.y(); case IO::BINARY : write(os, p.x()); write(os, p.y()); return os; default: return os << "PointC2(" << p.x() << ", " << p.y() << ')'; } } template std::ostream& insert(std::ostream& os, const Point_2& p,const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << p.hx() << ' ' << p.hy() << ' ' << p.hw(); case IO::BINARY : write(os, p.hx()); write(os, p.hy()); write(os, p.hw()); return os; default: return os << "PointH2(" << p.hx() << ", " << p.hy() << ", " << p.hw() << ')'; } } template < class R > std::ostream& operator<<(std::ostream& os, const Point_2& p) { return insert(os, p, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Point_2& p, const Cartesian_tag&) { typename R::FT x, y; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y; break; case IO::BINARY : read(is, x); read(is, y); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) p = Point_2(x, y); return is; } template std::istream& extract(std::istream& is, Point_2& p, const Homogeneous_tag&) { typename R::RT hx, hy, hw; switch(is.iword(IO::mode)) { case IO::ASCII : is >> hx >> hy >> hw; break; case IO::BINARY : read(is, hx); read(is, hy); read(is, hw); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) p = Point_2(hx, hy, hw); return is; } template < class R > std::istream& operator>>(std::istream& is, Point_2& p) { return extract(is, p, typename R::Kernel_tag() ); } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_2.h" 2 namespace CGAL { template class Vector_2 : public R_::Kernel_base::Vector_2 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Segment_2 Segment_2; typedef typename R_::Ray_2 Ray_2; typedef typename R_::Line_2 Line_2; typedef typename R_::Point_2 Point_2; typedef typename R_::Direction_2 Direction_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Kernel_base::Vector_2 RVector_2; typedef Vector_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<0> Feature_dimension; typedef RVector_2 Rep; typedef typename R_::Cartesian_const_iterator_2 Cartesian_const_iterator; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Vector_2() {} Vector_2(const RVector_2& v) : RVector_2(v) {} Vector_2(const Point_2& a, const Point_2& b) : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), a, b)) {} explicit Vector_2(const Segment_2 &s) : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), s)) {} explicit Vector_2(const Ray_2 &r) : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), r)) {} explicit Vector_2(const Line_2 &l) : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), l)) {} Vector_2(const Null_vector &v) : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), v)) {} template < typename T1, typename T2 > Vector_2(const T1 &x, const T2 &y) : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y)) {} Vector_2(const RT &x, const RT &y, const RT &w) : RVector_2(typename R::Construct_vector_2()(Return_base_tag(), x,y,w)) {} typename Qualified_result_of::type x() const { return R().compute_x_2_object()(*this); } typename Qualified_result_of::type y() const { return R().compute_y_2_object()(*this); } typename Qualified_result_of::type cartesian(int i) const { (CGAL::possibly((i == 0) || (i == 1))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0) || (i == 1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_2.h", 117)); return (i==0) ? x() : y(); } typename Qualified_result_of::type operator[](int i) const { return cartesian(i); } Cartesian_const_iterator cartesian_begin() const { return typename R::Construct_cartesian_const_iterator_2()(*this); } Cartesian_const_iterator cartesian_end() const { return typename R::Construct_cartesian_const_iterator_2()(*this,2); } typename Qualified_result_of::type hx() const { return R().compute_hx_2_object()(*this); } typename Qualified_result_of::type hy() const { return R().compute_hy_2_object()(*this); } typename Qualified_result_of::type hw() const { return R().compute_hw_2_object()(*this); } typename Qualified_result_of::type homogeneous(int i) const { (CGAL::possibly((i >= 0) || (i <= 2))?(static_cast(0)): ::CGAL::precondition_fail( "(i >= 0) || (i <= 2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_2.h", 159)); return (i==0) ? hx() : (i==1)? hy() : hw(); } int dimension() const { return 2; } Vector_2 operator-() const { return R().construct_opposite_vector_2_object()(*this); } Vector_2 operator-(const Vector_2& v) const { return R().construct_difference_of_vectors_2_object()(*this,v); } Vector_2 operator+(const Vector_2& v) const { return R().construct_sum_of_vectors_2_object()(*this,v); } Vector_2 operator/(const RT& c) const { return R().construct_divided_vector_2_object()(*this,c); } Vector_2 operator/(const typename First_if_different::Type & c) const { return R().construct_divided_vector_2_object()(*this,c); } FT squared_length() const { return R().compute_squared_length_2_object()(*this); } Direction_2 direction() const { return R().construct_direction_2_object()(*this); } Vector_2 perpendicular(const Orientation &o) const { return R().construct_perpendicular_vector_2_object()(*this,o); } Vector_2 transform(const Aff_transformation_2 &t) const { return t.transform(*this); } }; template < class R > inline bool operator==(const Vector_2 &v, const Null_vector &n) { return R().equal_2_object()(v, n); } template < class R > inline bool operator==(const Null_vector &n, const Vector_2 &v) { return v == n; } template < class R > inline bool operator!=(const Vector_2 &v, const Null_vector &n) { return !(v == n); } template < class R > inline bool operator!=(const Null_vector &n, const Vector_2 &v) { return !(v == n); } template std::ostream& insert(std::ostream& os, const Vector_2& v, const Cartesian_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << v.x() << ' ' << v.y(); case IO::BINARY : write(os, v.x()); write(os, v.y()); return os; default: return os << "VectorC2(" << v.x() << ", " << v.y() << ')'; } } template std::ostream& insert(std::ostream& os, const Vector_2& v, const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << v.hx() << ' ' << v.hy() << ' ' << v.hw(); case IO::BINARY : write(os, v.hx()); write(os, v.hy()); write(os, v.hw()); return os; default: return os << "VectorH2(" << v.hx() << ", " << v.hy() << ", " << v.hw() << ')'; } } template < class R > std::ostream& operator<<(std::ostream& os, const Vector_2& v) { return insert(os, v, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Vector_2& v, const Cartesian_tag&) { typename R::FT x, y; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y; break; case IO::BINARY : read(is, x); read(is, y); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) v = Vector_2(x, y); return is; } template std::istream& extract(std::istream& is, Vector_2& v, const Homogeneous_tag&) { typename R::RT hx, hy, hw; switch(is.iword(IO::mode)) { case IO::ASCII : is >> hx >> hy >> hw; break; case IO::BINARY : read(is, hx); read(is, hy); read(is, hw); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } v = Vector_2(hx, hy, hw); return is; } template < class R > std::istream& operator>>(std::istream& is, Vector_2& v) { return extract(is, v, typename R::Kernel_tag() ); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_2.h" 2 namespace CGAL { template class Direction_2 : public R_::Kernel_base::Direction_2 { typedef typename R_::RT RT; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Line_2 Line_2; typedef typename R_::Ray_2 Ray_2; typedef typename R_::Segment_2 Segment_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Kernel_base::Direction_2 RDirection_2; typedef Direction_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<0> Feature_dimension; typedef RDirection_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Direction_2() {} Direction_2(const RDirection_2& d) : RDirection_2(d) {} explicit Direction_2(const Vector_2& v) : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), v)) {} explicit Direction_2(const Line_2& l) : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), l)) {} explicit Direction_2(const Ray_2& r) : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), r)) {} explicit Direction_2(const Segment_2& s) : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), s)) {} Direction_2(const RT &x, const RT &y) : RDirection_2(typename R::Construct_direction_2()(Return_base_tag(), x,y)) {} typename R::Boolean counterclockwise_in_between(const Direction_2 &d1, const Direction_2 &d2) const { return R().counterclockwise_in_between_2_object()(*this, d1, d2); } Direction_2 perpendicular(const Orientation &o) const { return R().construct_perpendicular_direction_2_object()(*this,o); } typename Qualified_result_of::type dx() const { return R().compute_dx_2_object()(*this); } typename Qualified_result_of::type dy() const { return R().compute_dy_2_object()(*this); } typename Qualified_result_of::type delta(int i) const { (CGAL::possibly(( i == 0 ) || ( i == 1 ))?(static_cast(0)): ::CGAL::precondition_fail( "( i == 0 ) || ( i == 1 )" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_2.h", 116)); return (i==0) ? dx() : dy(); } typename R::Boolean operator<(const Direction_2 &d) const { return R().compare_angle_with_x_axis_2_object()(*this, d) == SMALLER; } typename R::Boolean operator>(const Direction_2 &d) const { return d < *this; } typename R::Boolean operator>=(const Direction_2 &d) const { return R().compare_angle_with_x_axis_2_object()(*this, d) != SMALLER; } typename R::Boolean operator<=(const Direction_2 &d) const { return R().compare_angle_with_x_axis_2_object()(*this, d) != LARGER; } Direction_2 operator-() const { return R().construct_opposite_direction_2_object()(*this); } Vector_2 vector() const { return R().construct_vector_2_object()(*this); } Vector_2 to_vector() const { return this->vector(); } typename R::Boolean operator==(const Direction_2& d) const { return R().equal_2_object()(*this, d); } typename R::Boolean operator!=(const Direction_2& d) const { return !(*this == d); } Direction_2 transform(const Aff_transformation_2 &t) const { return t.transform(*this); } }; template std::ostream& insert(std::ostream& os, const Direction_2& d, const Cartesian_tag&) { typename R::Vector_2 v = d.to_vector(); switch(os.iword(IO::mode)) { case IO::ASCII : return os << v.x() << ' ' << v.y(); case IO::BINARY : write(os, v.x()); write(os, v.y()); return os; default: return os << "DirectionC2(" << v.x() << ", " << v.y() << ')'; } } template std::ostream& insert(std::ostream& os, const Direction_2& d, const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << d.dx() << ' ' << d.dy(); case IO::BINARY : write(os, d.dx()); write(os, d.dy()); return os; default: return os << "DirectionH2(" << d.dx() << ", " << d.dy() << ')'; } } template < class R > std::ostream& operator<<(std::ostream& os, const Direction_2& d) { return insert(os, d, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Direction_2& d, const Cartesian_tag&) { typename R::FT x, y; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y; break; case IO::BINARY : read(is, x); read(is, y); break; default: std::cerr << std::endl << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) d = Direction_2(x, y); return is; } template std::istream& extract(std::istream& is, Direction_2& d, const Homogeneous_tag&) { typename R::RT x, y; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y; break; case IO::BINARY : read(is, x); read(is, y); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } d = Direction_2(x, y); return is; } template < class R > std::istream& operator>>(std::istream& is, Direction_2& d) { return extract(is, d, typename R::Kernel_tag() ); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2.h" 2 namespace CGAL { template class Line_2 : public R_::Kernel_base::Line_2 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Segment_2 Segment_2; typedef typename R_::Ray_2 Ray_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Direction_2 Direction_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Kernel_base::Line_2 RLine_2; typedef Line_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef RLine_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Line_2() {} Line_2(const RLine_2& l) : RLine_2(l) {} Line_2(const Point_2 &p, const Point_2 &q) : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,q)) {} Line_2(const RT &a, const RT &b, const RT &c) : RLine_2(typename R::Construct_line_2()(Return_base_tag(), a,b,c)) {} explicit Line_2(const Segment_2& s) : RLine_2(typename R::Construct_line_2()(Return_base_tag(), s)) {} explicit Line_2(const Ray_2& r) : RLine_2(typename R::Construct_line_2()(Return_base_tag(), r)) {} Line_2(const Point_2 &p, const Direction_2 &d) : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,d)) {} Line_2(const Point_2 &p, const Vector_2 &v) : RLine_2(typename R::Construct_line_2()(Return_base_tag(), p,v)) {} RT a() const { return R().compute_a_2_object()(*this); } RT b() const { return R().compute_b_2_object()(*this); } RT c() const { return R().compute_c_2_object()(*this); } Line_2 transform(const Aff_transformation_2 &t) const { return Line_2(t.transform(point(0)), t.transform(direction())); } Line_2 opposite() const { return R().construct_opposite_line_2_object()(*this); } Direction_2 direction() const { return R().construct_direction_2_object()(*this); } Vector_2 to_vector() const { return R().construct_vector_2_object()(*this); } Line_2 perpendicular(const Point_2 &p) const { return R().construct_perpendicular_line_2_object()(*this,p); } Point_2 projection(const Point_2& p) const { return R().construct_projected_point_2_object()(*this,p); } typename R::Boolean is_horizontal() const { return R().is_horizontal_2_object()(*this); } typename R::Boolean is_vertical() const { return R().is_vertical_2_object()(*this); } typename R::Boolean is_degenerate() const { return R().is_degenerate_2_object()(*this); } typename R::Oriented_side oriented_side(const Point_2 &p) const { return R().oriented_side_2_object()(*this,p); } typename R::Boolean has_on_boundary(const Point_2 &p) const { return oriented_side(p) == ON_ORIENTED_BOUNDARY; } typename R::Boolean has_on_positive_side(const Point_2 &p) const { return oriented_side(p) == ON_POSITIVE_SIDE; } typename R::Boolean has_on_negative_side(const Point_2 &p) const { return oriented_side(p) == ON_NEGATIVE_SIDE; } typename R::Boolean has_on(const Point_2 &p) const { return has_on_boundary(p); } FT x_at_y(const FT &y) const { return R().compute_x_at_y_2_object()(*this, y); } FT y_at_x(const FT &y) const { return R().compute_y_at_x_2_object()(*this, y); } Point_2 point() const { return R().construct_point_2_object()(*this); } Point_2 point(int i) const { return R().construct_point_2_object()(*this,i); } typename R::Boolean operator==(const Line_2 &l) const { return R().equal_2_object()(*this, l); } typename R::Boolean operator!=(const Line_2 &l) const { return !(*this == l); } }; template std::ostream& insert(std::ostream& os, const Line_2& l) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << l.a() << ' ' << l.b() << ' ' << l.c(); case IO::BINARY : write(os, l.a()); write(os, l.b()); write(os, l.c()); return os; default: return os << "Line_2(" << l.a() << ", " << l.b() << ", " << l.c() <<')'; } } template < class R > std::ostream & operator<<(std::ostream &os, const Line_2 &l) { return insert(os, l); } template std::istream& extract(std::istream& is, Line_2& l) { typename R::RT a, b, c; switch(is.iword(IO::mode)) { case IO::ASCII : is >> a >> b >> c; break; case IO::BINARY : read(is, a); read(is, b); read(is, c); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) l = Line_2(a, b, c); return is; } template < class R > std::istream & operator>>(std::istream &is, Line_2 &l) { return extract(is, l); } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2.h" 2 namespace CGAL { template class Ray_2 : public R_::Kernel_base::Ray_2 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Direction_2 Direction_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Line_2 Line_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Kernel_base::Ray_2 RRay_2; typedef Ray_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef RRay_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Ray_2() {} Ray_2(const RRay_2& r) : RRay_2(r) {} Ray_2(const Point_2 &sp, const Point_2 &secondp) : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, secondp)) {} Ray_2(const Point_2 &sp, const Direction_2 &d) : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, d)) {} Ray_2(const Point_2 &sp, const Vector_2 &v) : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, v)) {} Ray_2(const Point_2 &sp, const Line_2 &l) : RRay_2(typename R::Construct_ray_2()(Return_base_tag(), sp, l)) {} typename Qualified_result_of::type source() const { return R().construct_source_2_object()(*this); } typename Qualified_result_of::type second_point() const { return R().construct_second_point_2_object()(*this); } Point_2 point(int i) const { (CGAL::possibly(i >= 0)?(static_cast(0)): ::CGAL::precondition_fail( "i >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2.h", 105)); typename R::Construct_vector_2 construct_vector; typename R::Construct_scaled_vector_2 construct_scaled_vector; typename R::Construct_translated_point_2 construct_translated_point; if (i == 0) return source(); if (i == 1) return second_point(); return construct_translated_point(source(), construct_scaled_vector(construct_vector(source(), second_point()), FT(i))); } typename Qualified_result_of::type start() const { return source(); } bool is_horizontal() const { return R().equal_y_2_object()(source(), second_point()); } bool is_vertical() const { return R().equal_x_2_object()(source(), second_point()); } bool is_degenerate() const { return R().is_degenerate_2_object()(*this); } Direction_2 direction() const { typename R::Construct_vector_2 construct_vector; typename R::Construct_direction_2 construct_direction; return construct_direction( construct_vector(source(), second_point()) ); } Vector_2 to_vector() const { typename R::Construct_vector_2 construct_vector; return construct_vector(source(), second_point()); } bool has_on(const Point_2 &p) const { typename R::Construct_vector_2 construct_vector; return p == source() || ( R().collinear_2_object()(source(), p, second_point()) && Direction_2(construct_vector( source(), p)) == direction() ); } bool collinear_has_on(const Point_2 &p) const { return R().collinear_has_on_2_object()(*this, p); } Ray_2 opposite() const { return Ray_2( source(), - direction() ); } Line_2 supporting_line() const { return R().construct_line_2_object()(source(), second_point()); } bool operator==(const Ray_2& r) const { return R().equal_2_object()(*this, r); } bool operator!=(const Ray_2& r) const { return !(*this == r); } Ray_2 transform(const Aff_transformation_2 &t) const { return Ray_2(t.transform(source()), t.transform(second_point())); } }; template std::ostream& insert(std::ostream& os, const Ray_2& r, const Cartesian_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << r.source() << ' ' << r.second_point(); case IO::BINARY : return os << r.source() << r.second_point(); default: return os << "RayC2(" << r.source() << ", " << r.second_point() << ")"; } } template std::ostream& insert(std::ostream& os, const Ray_2& r, const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << r.source() << ' ' << r.second_point(); case IO::BINARY : return os << r.source() << r.second_point(); default: return os << "RayH2(" << r.source() << ", " << r.second_point() << ")"; } } template < class R > std::ostream& operator<<(std::ostream& os, const Ray_2& r) { return insert(os, r, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Ray_2& r, const Cartesian_tag&) { typename R::Point_2 p, q; is >> p >> q; if (is) r = Ray_2(p, q); return is; } template std::istream& extract(std::istream& is, Ray_2& r, const Homogeneous_tag&) { typename R::Point_2 p, q; is >> p >> q; if (is) r = Ray_2(p, q); return is; } template < class R > std::istream& operator>>(std::istream& is, Ray_2& r) { return extract(is, r, typename R::Kernel_tag() ); } } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2.h" 2 namespace CGAL { template class Segment_2 : public R_::Kernel_base::Segment_2 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Direction_2 Direction_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Line_2 Line_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Kernel_base::Segment_2 RSegment_2; typedef Segment_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef RSegment_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Segment_2() {} Segment_2(const RSegment_2& s) : RSegment_2(s) {} Segment_2(const Point_2 &sp, const Point_2 &ep) : RSegment_2(typename R::Construct_segment_2()(Return_base_tag(), sp,ep)) {} typename Qualified_result_of::type source() const { return R_().construct_source_2_object()(*this); } typename Qualified_result_of::type target() const { return R_().construct_target_2_object()(*this); } typename Qualified_result_of::type start() const { return source(); } typename Qualified_result_of::type end() const { return target(); } typename Qualified_result_of::type min () const; typename Qualified_result_of::type max () const; typename Qualified_result_of::type vertex(int i) const; typename Qualified_result_of::type point(int i) const; typename Qualified_result_of::type operator[](int i) const; bool is_horizontal() const; bool is_vertical() const; bool has_on(const Point_2 &p) const; bool collinear_has_on(const Point_2 &p) const; FT squared_length() const; bool is_degenerate() const; Bbox_2 bbox() const { return R().construct_bbox_2_object()(*this); } bool operator==(const Segment_2 &s) const { return R().equal_2_object()(*this, s); } bool operator!=(const Segment_2 &s) const { return !(*this == s); } Direction_2 direction() const { typename R::Construct_vector_2 construct_vector; return Direction_2( construct_vector( source(), target())); } Vector_2 to_vector() const { typename R::Construct_vector_2 construct_vector; return construct_vector( source(), target()); } Line_2 supporting_line() const { typename R::Construct_line_2 construct_line; return construct_line(*this); } Segment_2 opposite() const { return R().construct_opposite_segment_2_object()(*this); } Segment_2 transform(const Aff_transformation_2 &t) const { return Segment_2(t.transform(source()), t.transform(target())); } }; template < class R_ > inline typename Qualified_result_of >::type Segment_2::min () const { typename R_::Less_xy_2 less_xy; return less_xy(source(),target()) ? source() : target(); } template < class R_ > inline typename Qualified_result_of >::type Segment_2::max () const { typename R_::Less_xy_2 less_xy; return less_xy(source(),target()) ? target() : source(); } template < class R_ > inline typename Qualified_result_of, int >::type Segment_2::vertex(int i) const { return (i%2 == 0) ? source() : target(); } template < class R_ > inline typename Qualified_result_of, int >::type Segment_2::point(int i) const { return vertex(i); } template < class R_ > inline typename Qualified_result_of, int >::type Segment_2::operator[](int i) const { return vertex(i); } template < class R_ > inline bool Segment_2::is_horizontal() const { return R_().equal_y_2_object()(source(), target()); } template < class R_ > inline bool Segment_2::is_vertical() const { return R_().equal_x_2_object()(source(), target()); } template < class R_ > inline bool Segment_2:: has_on(const typename R_::Point_2 &p) const { return R_().are_ordered_along_line_2_object()(source(), p, target()); } template < class R_ > inline bool Segment_2:: collinear_has_on(const typename R_::Point_2 &p) const { return R_().collinear_has_on_2_object() (*this, p); } template < class R_ > inline typename Segment_2::FT Segment_2::squared_length() const { return R_().compute_squared_length_2_object()(*this); } template < class R_ > inline bool Segment_2::is_degenerate() const { return R().is_degenerate_2_object()(*this); } template < class R > std::ostream & operator<<(std::ostream &os, const Segment_2 &s) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << s.source() << ' ' << s.target(); case IO::BINARY : return os << s.source() << s.target(); default: return os << "Segment_2(" << s.source() << ", " << s.target() << ")"; } } template < class R > std::istream & operator>>(std::istream &is, Segment_2 &s) { typename R::Point_2 p, q; is >> p >> q; if (is) s = Segment_2(p, q); return is; } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2.h" 2 namespace CGAL { template class Triangle_2 : public R_::Kernel_base::Triangle_2 { typedef typename R_::Point_2 Point_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef typename R_::Kernel_base::Triangle_2 RTriangle_2; typedef Triangle_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<2> Feature_dimension; typedef RTriangle_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; typedef typename R::FT FT; Triangle_2() {} Triangle_2(const RTriangle_2& t) : RTriangle_2(t) {} Triangle_2(const Point_2 &p, const Point_2 &q, const Point_2 &r) : RTriangle_2(typename R::Construct_triangle_2()(Return_base_tag(), p,q,r)) {} FT area() const { return R().compute_area_2_object()(vertex(0), vertex(1), vertex(2)); } typename R::Orientation orientation() const { return R().orientation_2_object()(vertex(0), vertex(1), vertex(2)); } typename R::Bounded_side bounded_side(const Point_2 &p) const { return R().bounded_side_2_object()(*this,p); } typename R::Oriented_side oriented_side(const Point_2 &p) const { return R().oriented_side_2_object()(*this,p); } typename R::Boolean operator==(const Triangle_2 &t) const { return R().equal_2_object()(*this,t); } typename R::Boolean operator!=(const Triangle_2 &t) const { return !(*this == t); } typename Qualified_result_of::type vertex(int i) const { return R().construct_vertex_2_object()(*this,i); } typename Qualified_result_of::type operator[](int i) const { return vertex(i); } typename R::Boolean has_on_bounded_side(const Point_2 &p) const { return bounded_side(p) == ON_BOUNDED_SIDE; } typename R::Boolean has_on_unbounded_side(const Point_2 &p) const { return bounded_side(p) == ON_UNBOUNDED_SIDE; } typename R::Boolean has_on_boundary(const Point_2 &p) const { return bounded_side(p) == ON_BOUNDARY; } typename R::Boolean has_on_negative_side(const Point_2 &p) const { return oriented_side(p) == ON_NEGATIVE_SIDE; } typename R::Boolean has_on_positive_side(const Point_2 &p) const { return oriented_side(p) == ON_POSITIVE_SIDE; } typename R::Boolean is_degenerate() const { return R().collinear_2_object()(vertex(0), vertex(1), vertex(2)); } Bbox_2 bbox() const { return R().construct_bbox_2_object()(*this); } Triangle_2 opposite() const { return R().construct_opposite_triangle_2_object()(*this); } Triangle_2 transform(const Aff_transformation_2 &t) const { return Triangle_2(t.transform(vertex(0)), t.transform(vertex(1)), t.transform(vertex(2))); } }; template < class R > std::ostream & operator<<(std::ostream &os, const Triangle_2 &t) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << t[0] << ' ' << t[1] << ' ' << t[2]; case IO::BINARY : return os << t[0] << t[1] << t[2]; default: return os<< "Triangle_2(" << t[0] << ", " << t[1] << ", " << t[2] <<")"; } } template < class R > std::istream & operator>>(std::istream &is, Triangle_2 &t) { typename R::Point_2 p, q, r; is >> p >> q >> r; if (is) t = Triangle_2(p, q, r); return is; } } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_rectangle_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_rectangle_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_rectangle_2.h" 2 namespace CGAL { template class Iso_rectangle_2 : public R_::Kernel_base::Iso_rectangle_2 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Iso_rectangle_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<2> Feature_dimension; typedef typename R_::Kernel_base::Iso_rectangle_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Iso_rectangle_2() {} Iso_rectangle_2(const Rep& r) : Rep(r) {} Iso_rectangle_2(const Point_2 &p, const Point_2 &q, int) : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), p, q, 0)) {} Iso_rectangle_2(const Point_2 &p, const Point_2 &q) : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), p, q)) {} Iso_rectangle_2(const Point_2 &left, const Point_2 &right, const Point_2 &bottom, const Point_2 &top) : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), left, right, bottom, top)) {} Iso_rectangle_2(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy) : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy)) {} Iso_rectangle_2(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy, const RT& hw) : Rep(typename R::Construct_iso_rectangle_2()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy, hw)) {} typename Qualified_result_of::type min () const { return R().construct_min_vertex_2_object()(*this); } typename Qualified_result_of::type max () const { return R().construct_max_vertex_2_object()(*this); } bool operator==(const Iso_rectangle_2 &i) const { return R().equal_2_object()(*this, i); } bool operator!=(const Iso_rectangle_2 &i) const { return ! (*this == i); } typename Qualified_result_of::type vertex(int i) const { return R().construct_vertex_2_object()(*this,i); } typename Qualified_result_of::type operator[](int i) const { return R().construct_vertex_2_object()(*this,i); } typename Qualified_result_of::type xmin() const { return R().compute_xmin_2_object()(*this); } typename Qualified_result_of::type xmax() const { return R().compute_xmax_2_object()(*this); } typename Qualified_result_of::type ymin() const { return R().compute_ymin_2_object()(*this); } typename Qualified_result_of::type ymax() const { return R().compute_ymax_2_object()(*this); } typename Qualified_result_of::type min_coord(int i) const { (CGAL::possibly(i == 0 || i == 1)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_rectangle_2.h", 154)); if (i == 0) return xmin(); else return ymin(); } typename Qualified_result_of::type max_coord(int i) const { (CGAL::possibly(i == 0 || i == 1)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_rectangle_2.h", 164)); if (i == 0) return xmax(); else return ymax(); } FT area() const { return R().compute_area_2_object()(*this); } bool has_on_boundary(const Point_2 &p) const { return R().has_on_boundary_2_object()(*this,p); } bool has_on_bounded_side(const Point_2 &p) const { return R().has_on_bounded_side_2_object()(*this,p); } bool has_on_unbounded_side(const Point_2 &p) const { return R().has_on_unbounded_side_2_object()(*this,p); } Bounded_side bounded_side(const Point_2 &p) const { return R().bounded_side_2_object()(*this,p); } bool is_degenerate() const { return R().is_degenerate_2_object()(*this); } Bbox_2 bbox() const { return R().construct_bbox_2_object()(*this); } Iso_rectangle_2 transform(const Aff_transformation_2 &t) const { return Iso_rectangle_2(t.transform(min ()), t.transform(max ())); } }; template < class R > std::ostream & operator<<(std::ostream &os, const Iso_rectangle_2 &r) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << (r.min)() << ' ' << (r.max)(); case IO::BINARY : return os << (r.min)() << (r.max)(); default: return os << "Iso_rectangle_2(" << (r.min)() << ", " << (r.max)() << ")"; } } template < class R > std::istream & operator>>(std::istream &is, Iso_rectangle_2 &r) { typename R::Point_2 p, q; is >> p >> q; if (is) r = Iso_rectangle_2(p, q); return is; } } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_2.h" 2 namespace CGAL { template class Circle_2 : public R_::Kernel_base::Circle_2 { typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Kernel_base::Circle_2 RCircle_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; typedef Circle_2 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef RCircle_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Circle_2() {} Circle_2(const RCircle_2& t) : RCircle_2(t) {} Circle_2(const Point_2 ¢er, const FT &squared_radius, const Orientation &orientation) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, squared_radius, orientation)) {} Circle_2(const Point_2 ¢er, const FT &squared_radius) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, squared_radius, COUNTERCLOCKWISE)) {} Circle_2(const Point_2 &p, const Point_2 &q, const Point_2 &r) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, r)) {} Circle_2(const Point_2 & p, const Point_2 & q, const Orientation &orientation) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, orientation)) {} Circle_2(const Point_2 & p, const Point_2 & q) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, COUNTERCLOCKWISE)) {} Circle_2(const Point_2 & p, const Point_2 & q, const FT &bulge) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), p, q, bulge)) {} Circle_2(const Point_2 & center, const Orientation& orientation) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), orientation)) {} Circle_2(const Point_2 & center) : RCircle_2(typename R::Construct_circle_2()(Return_base_tag(), center, FT(0), COUNTERCLOCKWISE)) {} typename Qualified_result_of::type center() const { return R().construct_center_2_object()(*this); } typename Qualified_result_of::type squared_radius() const { return R().compute_squared_radius_2_object()(*this); } Orientation orientation() const { return make_certain(R().orientation_2_object()(*this)); } typename R::Bounded_side bounded_side(const Point_2 &p) const { return R().bounded_side_2_object()(*this, p); } typename R::Oriented_side oriented_side(const Point_2 &p) const { return R().oriented_side_2_object()(*this, p); } typename R::Boolean has_on_boundary(const Point_2 &p) const { return bounded_side(p) == ON_BOUNDARY; } typename R::Boolean has_on_bounded_side(const Point_2 &p) const { return bounded_side(p) == ON_BOUNDED_SIDE; } typename R::Boolean has_on_unbounded_side(const Point_2 &p) const { return bounded_side(p) == ON_UNBOUNDED_SIDE; } typename R::Boolean has_on_negative_side(const Point_2 &p) const { if (orientation() == COUNTERCLOCKWISE) return has_on_unbounded_side(p); return has_on_bounded_side(p); } typename R::Boolean has_on_positive_side(const Point_2 &p) const { if (orientation() == COUNTERCLOCKWISE) return has_on_bounded_side(p); return has_on_unbounded_side(p); } typename R::Boolean is_degenerate() const { return ::CGAL:: is_zero(squared_radius()); } Circle_2 opposite() const { return Circle_2(center(), squared_radius(), CGAL::opposite(orientation()) ); } Bbox_2 bbox() const { return R().construct_bbox_2_object()(*this); } typename R::Boolean operator==(const Circle_2 &c) const { return R().equal_2_object()(*this, c); } typename R::Boolean operator!=(const Circle_2 &c) const { return !(*this == c); } Circle_2 transform(const Aff_transformation_2 &t) const { return t.transform(*this); } Circle_2 orthogonal_transform(const Aff_transformation_2 &t) const; }; template Circle_2 Circle_2:: orthogonal_transform(const typename R_::Aff_transformation_2& t) const { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Vector_2 Vector_2; Vector_2 vec(RT(1), RT(0) ); vec = vec.transform(t); FT sq_scale = vec.squared_length(); return Circle_2(t.transform(center()), sq_scale * squared_radius(), t.is_even() ? orientation() : CGAL::opposite(orientation())); } template std::ostream& insert(std::ostream& os, const Circle_2& c) { switch(os.iword(IO::mode)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' << static_cast(c.orientation()); break; case IO::BINARY : os << c.center(); write(os, c.squared_radius()); write(os, static_cast(c.orientation())); break; default: os << "Circle_2(" << c.center() << ", " << c.squared_radius() ; switch (c.orientation()) { case CLOCKWISE: os << ", clockwise)"; break; case COUNTERCLOCKWISE: os << ", counterclockwise)"; break; default: os << ", collinear)"; break; } break; } return os; } template < class R > std::ostream & operator<<(std::ostream &os, const Circle_2 &c) { return insert(os, c); } template std::istream& extract(std::istream& is, Circle_2& c) { typename R::Point_2 center; typename R::FT squared_radius; int o; switch(is.iword(IO::mode)) { case IO::ASCII : is >> center >> squared_radius >> o; break; case IO::BINARY : is >> center; read(is, squared_radius); is >> o; break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) c = Circle_2(center, squared_radius, static_cast(o)); return is; } template < class R > std::istream & operator>>(std::istream &is, Circle_2 &c) { return extract(is,c); } } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_misc.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_misc.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_misc.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_misc.h" 2 namespace CGAL { template < class R> class Conic_2; enum Conic_type { HYPERBOLA = -1, PARABOLA, ELLIPSE }; typedef CGAL::Bounded_side Convex_side; const Convex_side ON_CONVEX_SIDE = CGAL::ON_BOUNDED_SIDE; const Convex_side ON_NONCONVEX_SIDE = CGAL::ON_UNBOUNDED_SIDE; template < class NT > NT best_value (NT *values, int nr_values, NT a2, NT a1, NT a0, NT b3, NT b2, NT b1, NT b0) { bool det_positive = false; NT d, q, max_det = 0, det, best = -1; for (int i=0; i max_det)) { max_det = det; best = x; det_positive = true; } } (CGAL::possibly(det_positive)?(static_cast(0)): ::CGAL::precondition_fail( "det_positive" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_misc.h", 77)); return best; } template < class NT > int solve_cubic (NT c3, NT c2, NT c1, NT c0, NT& r1, NT& r2, NT& r3) { if (c3 == 0.0) { if (c2 == 0) { (CGAL::possibly(c1 != 0)?(static_cast(0)): ::CGAL::precondition_fail( "c1 != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_misc.h", 90)); r1 = -c0/c1; return 1; } NT D = c1*c1-4*c2*c0; if (D < 0.0) return 0; if (D == 0.0) { r1 = -c1/(2.0*c2); return 1; } r1 = (-c1 + ::CGAL:: sqrt(D))/(2.0*c2); r2 = (-c1 - ::CGAL:: sqrt(D))/(2.0*c2); return 2; } NT g2 = c2/c3, g1 = c1/c3, g0 = c0/c3; NT a = g1 - g2*g2/3.0, b = 2.0*g2*g2*g2/27.0 - g1*g2/3.0 + g0; if (a == 0) { r1 = exp(log(-b)/3.0) - g2/3.0; return 1; } NT D = a*a*a/27.0 + b*b/4.0; if (D >= 0.0) { NT u = exp(log(-b/2.0 + ::CGAL:: sqrt(D))), alpha = 1.0 - a/(3.0*u*u); if (D == 0) { r1 = u*alpha - g2/3.0; r2 = -0.5*alpha*u - g2/3.0; return 2; } r1 = u*alpha - g2/3.0; return 1; } NT r_prime = ::CGAL:: sqrt(-a/3), phi_prime = acos (-b/(2.0*r_prime*r_prime*r_prime))/3.0, u_R = r_prime * cos (phi_prime), u_I = r_prime * sin (phi_prime); r1 = 2.0*u_R - g2/3.0; r2 = -u_R + u_I*std::sqrt(3.0) - g2/3.0; r3 = -u_R - u_I*std::sqrt(3.0) - g2/3.0; return 3; } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Conic_2.h" 2 namespace CGAL { template < class R_ > class Optimisation_ellipse_2; template < class R_> class Conic_2 : public R_::Kernel_base::Conic_2 { friend class Optimisation_ellipse_2; public: typedef Dimension_tag<2> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef R_ R; typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Kernel_base::Conic_2 _Conic_2; Conic_2 () {} Conic_2 (RT r, RT s, RT t, RT u, RT v, RT w) : _Conic_2 (r, s, t, u, v, w) {} RT r () const { return _Conic_2::r(); } RT s () const { return _Conic_2::s(); } RT t () const { return _Conic_2::t(); } RT u () const { return _Conic_2::u(); } RT v () const { return _Conic_2::v(); } RT w () const { return _Conic_2::w(); } CGAL::Point_2 center () const { return _Conic_2::center(); } Conic_type conic_type () const { return _Conic_2::conic_type(); } bool is_hyperbola () const { return _Conic_2::is_hyperbola(); } bool is_parabola () const { return _Conic_2::is_parabola(); } bool is_ellipse () const { return _Conic_2::is_ellipse(); } bool is_circle () const { return _Conic_2::is_circle(); } bool is_empty () const { return _Conic_2::is_empty(); } bool is_trivial () const { return _Conic_2::is_trivial(); } bool is_degenerate () const { return _Conic_2::is_degenerate(); } CGAL::Orientation orientation () const { return _Conic_2::orientation (); } CGAL::Oriented_side oriented_side (const CGAL::Point_2& p) const { return _Conic_2::oriented_side (p); } bool has_on_positive_side (const CGAL::Point_2& p) const { return _Conic_2::has_on_positive_side (p); } bool has_on_negative_side (const CGAL::Point_2& p) const { return _Conic_2::has_on_negative_side (p); } bool has_on_boundary (const CGAL::Point_2& p) const { return _Conic_2::has_on_boundary (p); } bool has_on (const CGAL::Point_2& p) const { return _Conic_2::has_on (p); } Convex_side convex_side (const CGAL::Point_2& p) const { return _Conic_2::convex_side (p); } bool has_on_convex_side (const CGAL::Point_2& p) const { return _Conic_2::has_on_convex_side (p); } bool has_on_nonconvex_side (const CGAL::Point_2& p) const { return _Conic_2::has_on_nonconvex_side (p); } bool operator == ( const Conic_2& c) const { return _Conic_2::operator == ( (Conic_2)c); } bool operator != ( const Conic_2& c) const { return( ! operator == ( c)); } void set (RT r, RT s, RT t, RT u, RT v, RT w) { _Conic_2::set (r, s, t, u, v, w); } void set_opposite () { _Conic_2::set_opposite(); } void set_circle (const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& p3) { _Conic_2::set_circle(p1, p2, p3); } void set_linepair (const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& p3, const CGAL::Point_2& p4) { _Conic_2::set_linepair (p1, p2, p3, p4); } void set_ellipse (const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& p3) { _Conic_2::set_ellipse (p1, p2, p3); } void set_ellipse (const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& p3, const CGAL::Point_2& p4, CGAL::Orientation o = POSITIVE) { _Conic_2::set_ellipse (p1, p2, p3, p4, o); } void set (const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& p3, const CGAL::Point_2& p4, const CGAL::Point_2& p5, CGAL::Orientation o = POSITIVE) { _Conic_2::set (p1, p2, p3, p4, p5, o); } private: void set_linear_combination ( const RT& a1, const Conic_2& c1, const RT& a2, const Conic_2& c2) { _Conic_2::set_linear_combination (a1, c1, a2, c2); } static void set_two_linepairs (const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& p3, const CGAL::Point_2& p4, Conic_2& pair1, Conic_2& pair2) { _Conic_2::set_two_linepairs (p1, p2, p3, p4, pair1, pair2); } void set_ellipse (const Conic_2& pair1, const Conic_2& pair2) { _Conic_2::set_ellipse (pair1, pair2); } void set (const Conic_2& c1, const Conic_2& c2, const CGAL::Point_2& p) { _Conic_2::set( c1, c2, p); this->analyse(); } CGAL::Sign vol_derivative (RT dr, RT ds, RT dt, RT du, RT dv, RT dw) const { return _Conic_2::vol_derivative (dr, ds, dt, du, dv, dw); } double vol_minimum (RT dr, RT ds, RT dt, RT du, RT dv, RT dw) const { return _Conic_2::vol_minimum (dr, ds, dt, du, dv, dw); } }; template< class R_> std::ostream& operator << ( std::ostream& os, const Conic_2& c) { return( os << c.r() << ' ' << c.s() << ' ' << c.t() << ' ' << c.u() << ' ' << c.v() << ' ' << c.w()); } } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Aff_transformation_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Aff_transformation_2.h" namespace CGAL { template class Aff_transformation_2 : public R_::Kernel_base::Aff_transformation_2 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Line_2 Line_2; typedef typename R_::Direction_2 Direction_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Kernel_base::Aff_transformation_2 RAff_transformation_2; public: typedef CGAL::Dimension_tag<2> Ambient_dimension; typedef R_ R; Aff_transformation_2() {} Aff_transformation_2(const RAff_transformation_2& t) : RAff_transformation_2(t) {} Aff_transformation_2(const Identity_transformation tag) : RAff_transformation_2(tag) {} Aff_transformation_2(const Translation tag, const Vector_2 &v) : RAff_transformation_2(tag, v) {} Aff_transformation_2(const Rotation tag, const Direction_2 &d, const RT &num, const RT &den = RT(1)) : RAff_transformation_2(tag, d, num, den) {} Aff_transformation_2(const Rotation tag, const RT &sin, const RT &cos, const RT &den = RT(1)) : RAff_transformation_2(tag, sin, cos, den) {} Aff_transformation_2(const Reflection tag, const Line_2& l ) : RAff_transformation_2(tag, l) {} Aff_transformation_2(const Scaling tag, const RT &s, const RT &w= RT(1)) : RAff_transformation_2(tag, s, w) {} Aff_transformation_2(const RT & m11, const RT & m12, const RT & m13, const RT & m21, const RT & m22, const RT & m23, const RT &w= RT(1)) : RAff_transformation_2(m11, m12, m13, m21, m22, m23, w) {} Aff_transformation_2(const RT & m11, const RT & m12, const RT & m21, const RT & m22, const RT &w = RT(1)) : RAff_transformation_2(m11, m12, m21, m22, w) {} }; template < class R > std::ostream & operator<<(std::ostream &os, const CGAL::Aff_transformation_2 &t) { typedef typename R::Kernel_base::Aff_transformation_2 RAff_transformation_2; return os << static_cast(t); } template < class R > std::istream & operator>>(std::istream &is, CGAL::Aff_transformation_2 &t) { typedef typename R::Kernel_base::Aff_transformation_2 RAff_transformation_2; return is >> static_cast(t); } } # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_3.h" 2 namespace CGAL { template class Point_3 : public R_::Kernel_base::Point_3 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Point_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<0> Feature_dimension; typedef typename R_::Kernel_base::Point_3 Rep; typedef typename R_::Cartesian_const_iterator_3 Cartesian_const_iterator; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Point_3() {} Point_3(const Origin& o) : Rep(typename R::Construct_point_3()(Return_base_tag(), o)) {} Point_3(const Rep& p) : Rep(p) {} template < typename T1, typename T2, typename T3 > Point_3(const T1& x, const T2& y, const T3& z) : Rep(typename R::Construct_point_3()(Return_base_tag(), x, y, z)) {} Point_3(const RT& hx, const RT& hy, const RT& hz, const RT& hw) : Rep(typename R::Construct_point_3()(Return_base_tag(), hx, hy, hz, hw)) {} typename Qualified_result_of::type x() const { return typename R::Compute_x_3()(*this); } typename Qualified_result_of::type y() const { return typename R::Compute_y_3()(*this); } typename Qualified_result_of::type z() const { return typename R::Compute_z_3()(*this); } typename Qualified_result_of::type hx() const { return R().compute_hx_3_object()(*this); } typename Qualified_result_of::type hy() const { return R().compute_hy_3_object()(*this); } typename Qualified_result_of::type hz() const { return R().compute_hz_3_object()(*this); } typename Qualified_result_of::type hw() const { return R().compute_hw_3_object()(*this); } typename Qualified_result_of::type cartesian(int i) const { (CGAL::possibly((i == 0) || (i == 1) || (i == 2))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0) || (i == 1) || (i == 2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_3.h", 133)); if (i==0) return x(); if (i==1) return y(); return z(); } RT homogeneous(int i) const { (CGAL::possibly((i >= 0) || (i <= 3))?(static_cast(0)): ::CGAL::precondition_fail( "(i >= 0) || (i <= 3)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_3.h", 142)); if (i==0) return hx(); if (i==1) return hy(); if (i==2) return hz(); return hw(); } typename Qualified_result_of::type operator[](int i) const { return cartesian(i); } Cartesian_const_iterator cartesian_begin() const { return typename R::Construct_cartesian_const_iterator_3()(*this); } Cartesian_const_iterator cartesian_end() const { return typename R::Construct_cartesian_const_iterator_3()(*this,3); } int dimension() const { return 3; } Bbox_3 bbox() const { return R().construct_bbox_3_object()(*this); } Point_3 transform(const Aff_transformation_3 &t) const { return t.transform(*this); } }; template inline bool operator==(const Origin& o, const Point_3& p) { return p == o; } template inline bool operator!=(const Origin& o, const Point_3& p) { return p != o; } template std::ostream& insert(std::ostream& os, const Point_3& p,const Cartesian_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << p.x() << ' ' << p.y() << ' ' << p.z(); case IO::BINARY : write(os, p.x()); write(os, p.y()); write(os, p.z()); return os; default: return os << "PointC3(" << p.x() << ", " << p.y() << ", " << p.z() << ')'; } } template std::ostream& insert(std::ostream& os, const Point_3& p,const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << p.hx() << ' ' << p.hy() << ' ' << p.hz() << ' ' << p.hw(); case IO::BINARY : write(os, p.hx()); write(os, p.hy()); write(os, p.hz()); write(os, p.hw()); return os; default: return os << "PointH3(" << p.hx() << ", " << p.hy() << ", " << p.hz() << ", " << p.hw() << ')'; } } template < class R > std::ostream& operator<<(std::ostream& os, const Point_3& p) { return insert(os, p, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Point_3& p, const Cartesian_tag&) { typename R::FT x, y, z; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y >> z; break; case IO::BINARY : read(is, x); read(is, y); read(is, z); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) p = Point_3(x, y, z); return is; } template std::istream& extract(std::istream& is, Point_3& p, const Homogeneous_tag&) { typename R::RT hx, hy, hz, hw; switch(is.iword(IO::mode)) { case IO::ASCII : is >> hx >> hy >> hz >> hw; break; case IO::BINARY : read(is, hx); read(is, hy); read(is, hz); read(is, hw); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) p = Point_3(hx, hy, hz, hw); return is; } template < class R > std::istream& operator>>(std::istream& is, Point_3& p) { return extract(is, p, typename R::Kernel_tag() ); } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Plane_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Plane_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Plane_3.h" 2 namespace CGAL { template class Plane_3 : public R_::Kernel_base::Plane_3 { typedef typename R_::RT RT; typedef typename R_::Point_2 Point_2; typedef typename R_::Point_3 Point_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Segment_3 Segment_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Circle_3 Circle_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Plane_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<2> Feature_dimension; typedef typename R_::Kernel_base::Plane_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Plane_3() {} Plane_3(const Rep& p) : Rep(p) {} Plane_3(const Point_3& p, const Point_3& q, const Point_3& r) : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, q, r)) {} Plane_3(const Point_3& p, const Direction_3& d) : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, d)) {} Plane_3(const Point_3& p, const Vector_3& v) : Rep(typename R::Construct_plane_3()(Return_base_tag(), p, v)) {} Plane_3(const RT& a, const RT& b, const RT& c, const RT& d) : Rep(typename R::Construct_plane_3()(Return_base_tag(), a, b, c, d)) {} Plane_3(const Line_3& l, const Point_3& p) : Rep(typename R::Construct_plane_3()(Return_base_tag(), l, p)) {} Plane_3(const Segment_3& s, const Point_3& p) : Rep(typename R::Construct_plane_3()(Return_base_tag(), s, p)) {} Plane_3(const Ray_3& r, const Point_3& p) : Rep(typename R::Construct_plane_3()(Return_base_tag(), r, p)) {} explicit Plane_3(const Circle_3& c) : Rep(typename R::Construct_plane_3()(c)) {} Plane_3 transform(const Aff_transformation_3 &t) const { return t.transform(*this); } Plane_3 opposite() const { return R().construct_opposite_plane_3_object()(*this); } Direction_3 orthogonal_direction() const { return Direction_3(a(), b(), c()); } typename Qualified_result_of::type a() const { return R().compute_a_3_object()(*this); } typename Qualified_result_of::type b() const { return R().compute_b_3_object()(*this); } typename Qualified_result_of::type c() const { return R().compute_c_3_object()(*this); } typename Qualified_result_of::type d() const { return R().compute_d_3_object()(*this); } bool has_on(const Point_3 &p) const { return R().has_on_3_object()(*this, p); } bool has_on(const Circle_3 &c) const { return R().has_on_3_object()(*this, c); } bool has_on(const Line_3 &l) const { return R().has_on_3_object()(*this, l); } Line_3 perpendicular_line(const Point_3 &p) const { return R().construct_perpendicular_line_3_object()(*this, p); } Point_3 projection(const Point_3 &p) const { return R().construct_projected_point_3_object()(*this, p); } Point_3 point() const { return R().construct_point_on_3_object()(*this); } Vector_3 base1() const { return R().construct_base_vector_3_object()(*this, 1); } Vector_3 base2() const { return R().construct_base_vector_3_object()(*this, 2); } Vector_3 orthogonal_vector() const { return R().construct_orthogonal_vector_3_object()(*this); } Point_2 to_2d(const Point_3 &p) const { return R().construct_projected_xy_point_2_object()(*this, p); } Point_3 to_3d(const Point_2 &p) const { return R().construct_lifted_point_3_object()(*this, p); } Oriented_side oriented_side(const Point_3 &p) const { return R().oriented_side_3_object()(*this, p); } bool has_on_positive_side(const Point_3 &p) const { return R().has_on_positive_side_3_object()(*this, p); } bool has_on_negative_side(const Point_3 &p) const { return R().has_on_negative_side_3_object()(*this, p); } # 226 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Plane_3.h" bool is_degenerate() const { return R().is_degenerate_3_object()(*this); } }; template < class R > std::ostream & operator<<(std::ostream &os, const Plane_3 &p) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << p.a() << ' ' << p.b() << ' ' << p.c() << ' ' << p.d(); case IO::BINARY : write(os, p.a()); write(os, p.b()); write(os, p.c()); write(os, p.d()); return os; default: os << "Plane_3(" << p.a() << ", " << p.b() << ", "; os << p.c() << ", " << p.d() <<")"; return os; } } template < class R > std::istream & operator>>(std::istream &is, Plane_3 &p) { typename R::RT a, b, c, d; switch(is.iword(IO::mode)) { case IO::ASCII : is >> a >> b >> c >> d; break; case IO::BINARY : read(is, a); read(is, b); read(is, c); read(is, d); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) p = Plane_3(a, b, c, d); return is; } } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_3.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_3.h" 2 namespace CGAL { template class Vector_3 : public R_::Kernel_base::Vector_3 { typedef typename R_::RT RT; typedef typename R_::FT FT_; typedef typename R_::Segment_3 Segment_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Point_3 Point_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Vector_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<0> Feature_dimension; typedef typename R_::Cartesian_const_iterator_3 Cartesian_const_iterator; typedef typename R_::Kernel_base::Vector_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Vector_3() {} Vector_3(const Rep& v) : Rep(v) {} Vector_3(const Point_3& a, const Point_3& b) : Rep(typename R::Construct_vector_3()(Return_base_tag(), a, b)) {} explicit Vector_3(const Segment_3& s) : Rep(typename R::Construct_vector_3()(Return_base_tag(), s)) {} explicit Vector_3(const Ray_3& r) : Rep(typename R::Construct_vector_3()(Return_base_tag(), r)) {} explicit Vector_3(const Line_3& l) : Rep(typename R::Construct_vector_3()(Return_base_tag(), l)) {} Vector_3(const Null_vector& v) : Rep(typename R::Construct_vector_3()(Return_base_tag(), v)) {} template < typename T1, typename T2, typename T3 > Vector_3(const T1 &x, const T2 &y, const T3 &z) : Rep(typename R::Construct_vector_3()(Return_base_tag(), x, y, z)) {} Vector_3(const RT& x, const RT& y, const RT& z, const RT& w) : Rep(typename R::Construct_vector_3()(Return_base_tag(), x, y, z, w)) {} Direction_3 direction() const { return R().construct_direction_3_object()(*this); } Vector_3 transform(const Aff_transformation_3 &t) const { return t.transform(*this); } Vector_3 operator-() const { return R().construct_opposite_vector_3_object()(*this); } Vector_3 operator-(const Vector_3& v) const { return R().construct_difference_of_vectors_3_object()(*this,v); } Vector_3 operator+(const Vector_3& v) const { return R().construct_sum_of_vectors_3_object()(*this,v); } Vector_3 operator/(const RT& c) const { return R().construct_divided_vector_3_object()(*this,c); } Vector_3 operator/(const typename First_if_different::Type & c) const { return R().construct_divided_vector_3_object()(*this,c); } typename Qualified_result_of::type x() const { return R().compute_x_3_object()(*this); } typename Qualified_result_of::type y() const { return R().compute_y_3_object()(*this); } typename Qualified_result_of::type z() const { return R().compute_z_3_object()(*this); } typename Qualified_result_of::type hx() const { return R().compute_hx_3_object()(*this); } typename Qualified_result_of::type hy() const { return R().compute_hy_3_object()(*this); } typename Qualified_result_of::type hz() const { return R().compute_hz_3_object()(*this); } typename Qualified_result_of::type hw() const { return R().compute_hw_3_object()(*this); } typename Qualified_result_of::type cartesian(int i) const { (CGAL::possibly((i == 0) || (i == 1) || (i == 2))?(static_cast(0)): ::CGAL::precondition_fail( "(i == 0) || (i == 1) || (i == 2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_3.h", 181)); if (i==0) return x(); if (i==1) return y(); return z(); } typename Qualified_result_of::type homogeneous(int i) const { (CGAL::possibly((i >= 0) || (i <= 3))?(static_cast(0)): ::CGAL::precondition_fail( "(i >= 0) || (i <= 3)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Vector_3.h", 190)); if (i==0) return hx(); if (i==1) return hy(); if (i==2) return hz(); return hw(); } int dimension() const { return 3; } typename Qualified_result_of::type operator[](int i) const { return cartesian(i); } Cartesian_const_iterator cartesian_begin() const { return typename R::Construct_cartesian_const_iterator_3()(*this); } Cartesian_const_iterator cartesian_end() const { return typename R::Construct_cartesian_const_iterator_3()(*this,3); } typename Qualified_result_of::type squared_length() const { return R().compute_squared_length_3_object()(*this); } }; template std::ostream& insert(std::ostream& os, const Vector_3& v, const Cartesian_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << v.x() << ' ' << v.y() << ' ' << v.z(); case IO::BINARY : write(os, v.x()); write(os, v.y()); write(os, v.z()); return os; default: os << "VectorC3(" << v.x() << ", " << v.y() << ", " << v.z() << ")"; return os; } } template std::ostream& insert(std::ostream& os, const Vector_3& v, const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << v.hx() << ' ' << v.hy() << ' ' << v.hz() << ' ' << v.hw(); case IO::BINARY : write(os, v.hx()); write(os, v.hy()); write(os, v.hz()); write(os, v.hw()); return os; default: return os << "VectorH3(" << v.hx() << ", " << v.hy() << ", " << v.hz() << ", " << v.hw() << ')'; } } template < class R > std::ostream& operator<<(std::ostream& os, const Vector_3& v) { return insert(os, v, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Vector_3& v, const Cartesian_tag&) { typename R::FT x, y, z; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y >> z; break; case IO::BINARY : read(is, x); read(is, y); read(is, z); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) v = Vector_3(x, y, z); return is; } template std::istream& extract(std::istream& is, Vector_3& v, const Homogeneous_tag&) { typename R::RT hx, hy, hz, hw; switch(is.iword(IO::mode)) { case IO::ASCII : is >> hx >> hy >> hz >> hw; break; case IO::BINARY : read(is, hx); read(is, hy); read(is, hz); read(is, hw); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) v = Vector_3(hx, hy, hz, hw); return is; } template < class R > std::istream& operator>>(std::istream& is, Vector_3& v) { return extract(is, v, typename R::Kernel_tag() ); } } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_3.h" 2 namespace CGAL { template class Direction_3 : public R_::Kernel_base::Direction_3 { typedef typename R_::RT RT; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Segment_3 Segment_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Direction_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<0> Feature_dimension; typedef typename R_::Kernel_base::Direction_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Direction_3() {} Direction_3(const Rep& d) : Rep(d) {} explicit Direction_3(const Vector_3& v) : Rep(typename R::Construct_direction_3()(Return_base_tag(), v)) {} explicit Direction_3(const Line_3& l) : Rep(typename R::Construct_direction_3()(Return_base_tag(), l)) {} explicit Direction_3(const Ray_3& r) : Rep(typename R::Construct_direction_3()(Return_base_tag(), r)) {} explicit Direction_3(const Segment_3& s) : Rep(typename R::Construct_direction_3()(Return_base_tag(), s)) {} Direction_3(const RT& hx, const RT& hy, const RT& hz) : Rep(typename R::Construct_direction_3()(Return_base_tag(), hx, hy, hz)) {} Direction_3 transform(const Aff_transformation_3 &t) const { return t.transform(*this); } Direction_3 operator-() const { return R().construct_opposite_direction_3_object()(*this); } Vector_3 to_vector() const { return R().construct_vector_3_object()(*this); } Vector_3 vector() const { return to_vector(); } typename Qualified_result_of::type dx() const { return R().compute_dx_3_object()(*this); } typename Qualified_result_of::type dy() const { return R().compute_dy_3_object()(*this); } typename Qualified_result_of::type dz() const { return R().compute_dz_3_object()(*this); } typename Qualified_result_of::type delta(int i) const { (CGAL::possibly(i >= 0 && i <= 2)?(static_cast(0)): ::CGAL::precondition_fail( "i >= 0 && i <= 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Direction_3.h", 128)); if (i==0) return dx(); if (i==1) return dy(); return dz(); } }; template std::ostream& insert(std::ostream& os, const Direction_3& d, const Cartesian_tag&) { typename R::Vector_3 v = d.to_vector(); switch(os.iword(IO::mode)) { case IO::ASCII : return os << v.x() << ' ' << v.y() << ' ' << v.z(); case IO::BINARY : write(os, v.x()); write(os, v.y()); write(os, v.z()); return os; default: os << "DirectionC3(" << v.x() << ", " << v.y() << ", " << v.z() << ")"; return os; } } template std::ostream& insert(std::ostream& os, const Direction_3& d, const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << d.dx() << ' ' << d.dy() << ' ' << d.dz(); case IO::BINARY : write(os, d.dx()); write(os, d.dy()); write(os, d.dz()); return os; default: return os << "DirectionH3(" << d.dx() << ", " << d.dy() << ", " << d.dz() << ')'; } } template < class R > std::ostream& operator<<(std::ostream& os, const Direction_3& d) { return insert(os, d, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Direction_3& d, const Cartesian_tag&) { typename R::FT x, y, z; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y >> z; break; case IO::BINARY : read(is, x); read(is, y); read(is, z); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) d = Direction_3(x, y, z); return is; } template std::istream& extract(std::istream& is, Direction_3& d, const Homogeneous_tag&) { typename R::RT x, y, z; switch(is.iword(IO::mode)) { case IO::ASCII : is >> x >> y >> z; break; case IO::BINARY : read(is, x); read(is, y); read(is, z); break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) d = Direction_3(x, y, z); return is; } template < class R > std::istream& operator>>(std::istream& is, Direction_3& d) { return extract(is, d, typename R::Kernel_tag() ); } } # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_3.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_3.h" 2 namespace CGAL { template class Line_3 : public R_::Kernel_base::Line_3 { typedef typename R_::RT RT; typedef typename R_::Point_3 Point_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Segment_3 Segment_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Line_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef typename R_::Kernel_base::Line_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Line_3() {} Line_3(const Rep& l) : Rep(l) {} Line_3(const Point_3 & p, const Point_3 & q) : Rep(typename R::Construct_line_3()(Return_base_tag(), p, q)) {} explicit Line_3(const Segment_3 & s) : Rep(typename R::Construct_line_3()(Return_base_tag(), s)) {} explicit Line_3(const Ray_3 & r) : Rep(typename R::Construct_line_3()(Return_base_tag(), r)) {} Line_3(const Point_3 & p, const Direction_3 & d) : Rep(typename R::Construct_line_3()(Return_base_tag(), p, d)) {} Line_3(const Point_3 & p, const Vector_3 & v) : Rep(typename R::Construct_line_3()(Return_base_tag(), p, v)) {} Line_3 transform(const Aff_transformation_3 &t) const { return Line_3(t.transform(this->point()), t.transform(this->direction())); } Vector_3 to_vector() const { return R().construct_vector_3_object()(*this); } Direction_3 direction() const { return R().construct_direction_3_object()(*this); } bool has_on(const Point_3 &p) const { return R().has_on_3_object()(*this, p); } Point_3 point() const { return R().construct_point_on_3_object()(*this, 0); } Point_3 point(int i) const { return R().construct_point_on_3_object()(*this, i); } Line_3 opposite() const { return R().construct_opposite_line_3_object()(*this); } Plane_3 perpendicular_plane(const Point_3 &p) const { return R().construct_perpendicular_plane_3_object()(*this, p); } Point_3 projection(const Point_3 &p) const { return R().construct_projected_point_3_object()(*this, p); } bool is_degenerate() const { return R().is_degenerate_3_object()(*this); } }; template < class R > std::ostream & operator<<(std::ostream &os, const Line_3 &l) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << l.point(0) << ' ' << l.point(1); case IO::BINARY : return os << l.point(0) << l.point(1); default: return os << "Line_3(" << l.point(0) << ", " << l.point(1) << ")"; } } template < class R > std::istream & operator>>(std::istream &is, Line_3 &l) { typename R::Point_3 p, q; is >> p >> q; if (is) l = Line_3(p, q); return is; } } # 46 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_3.h" 2 namespace CGAL { template class Ray_3 : public R_::Kernel_base::Ray_3 { typedef typename R_::RT RT; typedef typename R_::Point_3 Point_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Ray_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef typename R_::Kernel_base::Ray_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Ray_3() {} Ray_3(const Rep& r) : Rep(r) {} Ray_3(const Point_3& sp, const Point_3& secondp) : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, secondp)) {} Ray_3(const Point_3& sp, const Vector_3& v) : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, v)) {} Ray_3(const Point_3& sp, const Direction_3& d) : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, d)) {} Ray_3(const Point_3& sp, const Line_3& l) : Rep(typename R::Construct_ray_3()(Return_base_tag(), sp, l)) {} Ray_3 transform(const Aff_transformation_3 &t) const { return Ray_3(t.transform(this->source()), t.transform(this->second_point())); } # 108 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_3.h" Point_3 point(int i) const { return R().construct_point_on_3_object()(*this, i); } Point_3 source() const { return R().construct_source_3_object()(*this); } Point_3 second_point() const { return R().construct_second_point_3_object()(*this); } Point_3 start() const { return source(); } bool has_on(const Point_3 &p) const { return R().has_on_3_object()(*this, p); } Direction_3 direction() const { typename R::Construct_vector_3 construct_vector; typename R::Construct_direction_3 construct_direction; return construct_direction( construct_vector(source(), second_point()) ); } Ray_3 opposite() const { return Ray_3( source(), - direction() ); } Vector_3 to_vector() const { typename R::Construct_vector_3 construct_vector; return construct_vector(source(), second_point()); } Line_3 supporting_line() const { return R().construct_line_3_object()(source(), second_point()); } bool is_degenerate() const { return R().is_degenerate_3_object()(*this); } }; template std::ostream& insert(std::ostream& os, const Ray_3& r, const Cartesian_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << r.start() << ' ' << r.direction(); case IO::BINARY : return os<< r.start() << r.direction(); default: return os << "RayC3(" << r.start() << ", " << r.direction() << ")"; } } template std::ostream& insert(std::ostream& os, const Ray_3& r, const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << r.start() << ' ' << r.direction(); case IO::BINARY : return os<< r.start() << r.direction(); default: return os << "RayH3(" << r.start() << ", " << r.direction() << ")"; } } template < class R > std::ostream& operator<<(std::ostream& os, const Ray_3& r) { return insert(os, r, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Ray_3& r, const Cartesian_tag&) { typename R::Point_3 p; typename R::Direction_3 d; is >> p >> d; if (is) r = Ray_3(p, d); return is; } template std::istream& extract(std::istream& is, Ray_3& r, const Homogeneous_tag&) { typename R::Point_3 p; typename R::Direction_3 d; is >> p >> d; if (is) r = Ray_3(p, d); return is; } template < class R > std::istream& operator>>(std::istream& is, Ray_3& r) { return extract(is, r, typename R::Kernel_tag() ); } } # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_3.h" 2 namespace CGAL { template class Segment_3 : public R_::Kernel_base::Segment_3 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Segment_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef typename R_::Kernel_base::Segment_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Segment_3() {} Segment_3(const Rep& s) : Rep(s) {} Segment_3(const Point_3& sp, const Point_3& ep) : Rep(typename R::Construct_segment_3()(Return_base_tag(), sp, ep)) {} Point_3 source() const { return R_().construct_source_3_object()(*this); } Point_3 target() const { return R_().construct_target_3_object()(*this); } Point_3 start() const { return source(); } Point_3 end() const { return target(); } Point_3 min () const; Point_3 max () const; Point_3 vertex(int i) const; Point_3 point(int i) const { return vertex(i); } Point_3 operator[](int i) const { return vertex(i); } Segment_3 transform(const Aff_transformation_3 &t) const { return Segment_3(t.transform(this->source()), t.transform(this->target())); } FT squared_length() const { return squared_distance(this->target(), this->source()); } Vector_3 to_vector() const { return R().construct_vector_3_object()(*this); } bool has_on(const Point_3 &p) const { return R_().are_ordered_along_line_3_object()(source(), p, target()); } Segment_3 opposite() const { return R().construct_opposite_segment_3_object()(*this); } Direction_3 direction() const { typename R::Construct_vector_3 construct_vector; return Direction_3( construct_vector( source(), target())); } bool is_degenerate() const { return R().is_degenerate_3_object()(*this); } Bbox_3 bbox() const { return R().construct_bbox_3_object()(*this); } Line_3 supporting_line() const { return R().construct_line_3_object()(*this); } }; template < class R_ > inline typename R_::Point_3 Segment_3::min () const { typename R_::Less_xyz_3 less_xyz; return less_xyz(source(),target()) ? source() : target(); } template < class R_ > inline typename R_::Point_3 Segment_3::max () const { typename R_::Less_xyz_3 less_xyz; return less_xyz(source(),target()) ? target() : source(); } template < class R_ > inline typename R_::Point_3 Segment_3::vertex(int i) const { return (i%2 == 0) ? source() : target(); } template < class R > std::ostream & operator<<(std::ostream &os, const Segment_3 &s) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << s.source() << ' ' << s.target(); case IO::BINARY : return os << s.source() << s.target(); default: return os << "Segment_3(" << s.source() << ", " << s.target() << ")"; } } template < class R > std::istream & operator>>(std::istream &is, Segment_3 &s) { typename R::Point_3 p, q; is >> p >> q; if (is) s = Segment_3(p, q); return is; } } # 48 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3.h" 2 namespace CGAL { template class Triangle_3 : public R_::Kernel_base::Triangle_3 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Triangle_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<2> Feature_dimension; typedef typename R_::Kernel_base::Triangle_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Triangle_3() {} Triangle_3(const Rep& t) : Rep(t) {} Triangle_3(const Point_3& p, const Point_3& q, const Point_3& r) : Rep(typename R::Construct_triangle_3()(Return_base_tag(), p, q, r)) {} Triangle_3 transform(const Aff_transformation_3 &t) const { return Triangle_3(t.transform(this->vertex(0)), t.transform(this->vertex(1)), t.transform(this->vertex(2))); } Plane_3 supporting_plane() const { return R().construct_supporting_plane_3_object()(*this); } bool has_on(const Point_3 &p) const { return R().has_on_3_object()(*this, p); } typename Qualified_result_of::type vertex(int i) const { return R().construct_vertex_3_object()(*this, i); } typename Qualified_result_of::type operator[](int i) const { return vertex(i); } bool is_degenerate() const { return R().is_degenerate_3_object()(*this); } Bbox_3 bbox() const { return R().construct_bbox_3_object()(*this); } FT squared_area() const { return R().compute_squared_area_3_object()(*this); } }; template < class R > std::ostream & operator<<(std::ostream &os, const Triangle_3 &t) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << t[0] << ' ' << t[1] << ' ' << t[2]; case IO::BINARY : return os << t[0] << t[1] << t[2]; default: os << "Triangle_3(" << t[0] << ", " << t[1] << ", " << t[2] <<")"; return os; } } template < class R > std::istream & operator>>(std::istream &is, Triangle_3 &t) { typename R::Point_3 p, q, r; is >> p >> q >> r; if (is) t = Triangle_3(p, q, r); return is; } } # 49 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Tetrahedron_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Tetrahedron_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Tetrahedron_3.h" 2 namespace CGAL { template class Tetrahedron_3 : public R_::Kernel_base::Tetrahedron_3 { typedef typename R_::Point_3 Point_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Tetrahedron_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<3> Feature_dimension; typedef typename R_::Kernel_base::Tetrahedron_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Tetrahedron_3() {} Tetrahedron_3(const Rep& t) : Rep(t) {} Tetrahedron_3(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) : Rep(typename R::Construct_tetrahedron_3()(Return_base_tag(), p, q, r, s)) {} Tetrahedron_3 transform(const Aff_transformation_3 &t) const { return Tetrahedron_3(t.transform(this->vertex(0)), t.transform(this->vertex(1)), t.transform(this->vertex(2)), t.transform(this->vertex(3))); } Point_3 vertex(int i) const { return R().construct_vertex_3_object()(*this,i); } Point_3 operator[](int i) const { return vertex(i); } bool is_degenerate() const { return R().is_degenerate_3_object()(*this); } Orientation orientation() const { return R().orientation_3_object()(*this); } Bounded_side bounded_side(const Point_3 &p) const { return R().bounded_side_3_object()(*this, p); } Oriented_side oriented_side(const Point_3 &p) const { return R().oriented_side_3_object()(*this, p); } bool has_on_positive_side(const Point_3 &p) const { return R().has_on_positive_side_3_object()(*this, p); } bool has_on_negative_side(const Point_3 &p) const { return R().has_on_negative_side_3_object()(*this, p); } bool has_on_boundary(const Point_3 &p) const { return R().has_on_boundary_3_object()(*this, p); } bool has_on_bounded_side(const Point_3 &p) const { return R().has_on_bounded_side_3_object()(*this, p); } bool has_on_unbounded_side(const Point_3 &p) const { return R().has_on_unbounded_side_3_object()(*this, p); } typename Qualified_result_of::type volume() const { return R().compute_volume_3_object()(*this); } Bbox_3 bbox() const { return R().construct_bbox_3_object()(*this); } }; template < class R > std::ostream & operator<<(std::ostream &os, const Tetrahedron_3 &t) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3]; case IO::BINARY : return os << t[0] << t[1] << t[2] << t[3]; default: os << "Tetrahedron_3(" << t[0] << ", " << t[1] << ", " << t[2]; os << ", " << t[3] << ")"; return os; } } template < class R > std::istream & operator>>(std::istream &is, Tetrahedron_3 &t) { typename R::Point_3 p, q, r, s; is >> p >> q >> r >> s; if (is) t = Tetrahedron_3(p, q, r, s); return is; } } # 50 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_cuboid_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_cuboid_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_cuboid_3.h" 2 namespace CGAL { template class Iso_cuboid_3 : public R_::Kernel_base::Iso_cuboid_3 { typedef typename R_::RT RT; typedef typename R_::Point_3 Point_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Iso_cuboid_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<3> Feature_dimension; typedef typename R_::Kernel_base::Iso_cuboid_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Iso_cuboid_3() {} Iso_cuboid_3(const Rep& r) : Rep(r) {} Iso_cuboid_3(const Point_3& p, const Point_3& q) : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), p,q)) {} Iso_cuboid_3(const Point_3& p, const Point_3& q, int) : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), p, q, 0)) {} Iso_cuboid_3(const Point_3 &left, const Point_3 &right, const Point_3 &bottom, const Point_3 &top, const Point_3 &far_, const Point_3 &close) : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), left, right, bottom, top, far_, close)) {} Iso_cuboid_3(const RT& min_hx, const RT& min_hy, const RT& min_hz, const RT& max_hx, const RT& max_hy, const RT& max_hz, const RT& hw) : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz, max_hx, max_hy, max_hz, hw)) {} Iso_cuboid_3(const RT& min_hx, const RT& min_hy, const RT& min_hz, const RT& max_hx, const RT& max_hy, const RT& max_hz) : Rep(typename R::Construct_iso_cuboid_3()(Return_base_tag(), min_hx, min_hy, min_hz, max_hx, max_hy, max_hz)) {} Point_3 min () const { return R().construct_min_vertex_3_object()(*this); } Point_3 max () const { return R().construct_max_vertex_3_object()(*this); } Point_3 vertex(int i) const { return R().construct_vertex_3_object()(*this,i); } Point_3 operator[](int i) const { return R().construct_vertex_3_object()(*this,i); } typename Qualified_result_of::type xmin() const { return R().compute_xmin_3_object()(*this); } typename Qualified_result_of::type xmax() const { return R().compute_xmax_3_object()(*this); } typename Qualified_result_of::type ymin() const { return R().compute_ymin_3_object()(*this); } typename Qualified_result_of::type ymax() const { return R().compute_ymax_3_object()(*this); } typename Qualified_result_of::type zmin() const { return R().compute_zmin_3_object()(*this); } typename Qualified_result_of::type zmax() const { return R().compute_zmax_3_object()(*this); } typename Qualified_result_of::type min_coord(int i) const { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_cuboid_3.h", 164)); if (i == 0) return xmin(); else if (i == 1) return ymin(); else return zmin(); } typename Qualified_result_of::type max_coord(int i) const { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_cuboid_3.h", 176)); if (i == 0) return xmax(); else if (i == 1) return ymax(); else return zmax(); } bool has_on_bounded_side(const Point_3 &p) const { return R().has_on_bounded_side_3_object()(*this,p); } bool has_on_unbounded_side(const Point_3 &p) const { return R().has_on_unbounded_side_3_object()(*this,p); } bool has_on_boundary(const Point_3 &p) const { return R().has_on_boundary_3_object()(*this,p); } bool has_on(const Point_3 &p) const { return has_on_boundary(p); } Bounded_side bounded_side(const Point_3 &p) const { return R().bounded_side_3_object()(*this,p); } bool is_degenerate() const { return R().is_degenerate_3_object()(*this); } typename Qualified_result_of::type volume() const { return R().compute_volume_3_object()(*this); } Bbox_3 bbox() const { return R().construct_bbox_3_object()(*this); } Iso_cuboid_3 transform(const Aff_transformation_3 &t) const { return Iso_cuboid_3(t.transform((this->min)()), t.transform((this->max)())); } }; template < class R > std::ostream & operator<<(std::ostream& os, const Iso_cuboid_3& r) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << (r.min)() << ' ' << (r.max)(); case IO::BINARY : return os << (r.min)() << (r.max)(); default: return os << "Iso_cuboid_3(" << (r.min)() << ", " << (r.max)() << ")"; } } template < class R > std::istream & operator>>(std::istream& is, Iso_cuboid_3& r) { typename R::Point_3 p, q; is >> p >> q; if (is) r = Iso_cuboid_3(p, q); return is; } } # 51 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sphere_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sphere_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sphere_3.h" 2 namespace CGAL { template class Sphere_3 : public R_::Kernel_base::Sphere_3 { typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3_; typedef typename R_::Circle_3 Circle_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef Sphere_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<2> Feature_dimension; typedef typename R_::Kernel_base::Sphere_3 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } typedef R_ R; Sphere_3() {} Sphere_3(const Rep& s) : Rep(s) {} Sphere_3(const Point_3_& p, const FT& sq_rad, const Orientation& o = COUNTERCLOCKWISE) : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, sq_rad, o)) {} Sphere_3(const Point_3_& p, const Point_3_& q, const Point_3_& r, const Point_3_& u) : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, r, u)) {} Sphere_3(const Point_3_& p, const Point_3_& q, const Point_3_& r, const Orientation& o = COUNTERCLOCKWISE) : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, r, o)) {} Sphere_3(const Point_3_& p, const Point_3_& q, const Orientation& o = COUNTERCLOCKWISE) : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, q, o)) {} explicit Sphere_3(const Point_3_& p, const Orientation& o = COUNTERCLOCKWISE) : Rep(typename R::Construct_sphere_3()(Return_base_tag(), p, o)) {} explicit Sphere_3(const Circle_3& c) : Rep(typename R::Construct_sphere_3()(c)) {} Sphere_3 orthogonal_transform(const Aff_transformation_3 &t) const; Point_3_ center() const { return R().construct_center_3_object()(*this); } FT squared_radius() const { return R().compute_squared_radius_3_object()(*this); } Sphere_3 opposite() const { return R().construct_opposite_sphere_3_object()(*this); } typename R::Orientation orientation() const { return R().orientation_3_object()(*this); } typename R::Bounded_side bounded_side(const Point_3_ &p) const { return R().bounded_side_3_object()(*this, p); } typename R::Oriented_side oriented_side(const Point_3_ &p) const { return R().oriented_side_3_object()(*this, p); } typename R::Boolean has_on(const Point_3_ &p) const { return R().has_on_3_object()(*this, p); } typename R::Boolean has_on(const Circle_3 &c) const { return R().has_on_3_object()(*this, c); } typename R::Boolean has_on_boundary(const Point_3_ &p) const { return R().has_on_boundary_3_object()(*this, p); } typename R::Boolean has_on_bounded_side(const Point_3_ &p) const { return bounded_side(p) == ON_BOUNDED_SIDE; } typename R::Boolean has_on_unbounded_side(const Point_3_ &p) const { return bounded_side(p) == ON_UNBOUNDED_SIDE; } typename R::Boolean has_on_negative_side(const Point_3_ &p) const { if (orientation() == COUNTERCLOCKWISE) return has_on_unbounded_side(p); return has_on_bounded_side(p); } typename R::Boolean has_on_positive_side(const Point_3_ &p) const { if (orientation() == COUNTERCLOCKWISE) return has_on_bounded_side(p); return has_on_unbounded_side(p); } typename R::Boolean is_degenerate() const { return R().is_degenerate_3_object()(*this); } Bbox_3 bbox() const { return R().construct_bbox_3_object()(*this); } }; template Sphere_3 Sphere_3:: orthogonal_transform(const typename R_::Aff_transformation_3& t) const { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Vector_3 Vector_3; Vector_3 vec(RT(1), RT(0), RT(0)); vec = vec.transform(t); FT sq_scale = vec.squared_length(); return Sphere_3(t.transform(this->center()), sq_scale * this->squared_radius(), t.is_even() ? this->orientation() : CGAL::opposite(this->orientation())); } template std::ostream& insert(std::ostream& os, const Sphere_3& c,const Cartesian_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' << static_cast(c.orientation()); break; case IO::BINARY : os << c.center(); write(os, c.squared_radius()); write(os, static_cast(c.orientation())); break; default: os << "SphereC3(" << c.center() << ", " << c.squared_radius(); switch (c.orientation()) { case CLOCKWISE: os << ", clockwise)"; break; case COUNTERCLOCKWISE: os << ", counterclockwise)"; break; default: os << ", collinear)"; break; } break; } return os; } template std::ostream& insert(std::ostream& os, const Sphere_3& c, const Homogeneous_tag&) { switch(os.iword(IO::mode)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' << static_cast(c.orientation()); break; case IO::BINARY : os << c.center(); write(os, c.squared_radius()); write(os, static_cast(c.orientation())); break; default: os << "SphereH3(" << c.center() << ", " << c.squared_radius(); switch (c.orientation()) { case CLOCKWISE: os << ", clockwise)"; break; case COUNTERCLOCKWISE: os << ", counterclockwise)"; break; default: os << ", collinear)"; break; } break; } return os; } template < class R > std::ostream& operator<<(std::ostream& os, const Sphere_3& c) { return insert(os, c, typename R::Kernel_tag() ); } template std::istream& extract(std::istream& is, Sphere_3& c, const Cartesian_tag&) { typename R::Point_3 center; typename R::FT squared_radius; int o=0; switch(is.iword(IO::mode)) { case IO::ASCII : is >> center >> squared_radius >> o; break; case IO::BINARY : is >> center; read(is, squared_radius); is >> o; break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) c = Sphere_3(center, squared_radius, static_cast(o)); return is; } template std::istream& extract(std::istream& is, Sphere_3& c, const Homogeneous_tag&) { typename R::Point_3 center; typename R::FT squared_radius; int o; switch(is.iword(IO::mode)) { case IO::ASCII : is >> center >> squared_radius >> o; break; case IO::BINARY : is >> center; read(is, squared_radius); is >> o; break; default: std::cerr << "" << std::endl; std::cerr << "Stream must be in ascii or binary mode" << std::endl; break; } if (is) c = Sphere_3(center, squared_radius, static_cast(o)); return is; } template < class R > std::istream& operator>>(std::istream& is, Sphere_3& c) { return extract(is, c, typename R::Kernel_tag() ); } } # 52 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_3.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_3.h" 2 namespace CGAL { template class Circle_3 : public R_::Kernel_base::Circle_3 { typedef typename R_::RT RT; typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Sphere_3 Sphere_3; typedef typename R_::Direction_3 Direction_3; typedef Circle_3 Self; static_assert((boost::is_same::value), "(boost::is_same::value)"); public: typedef Dimension_tag<3> Ambient_dimension; typedef Dimension_tag<1> Feature_dimension; typedef typename R_::Kernel_base::Circle_3 Rep; typedef R_ R; const Rep& rep() const { return *this; } Rep& rep() { return *this; } Circle_3() {} Circle_3(const Sphere_3& s, const Plane_3& p, int a) : Rep(typename R::Construct_circle_3()(s,p,a)) {} Circle_3(const Point_3& c, const FT& sr, const Plane_3& p) : Rep(typename R::Construct_circle_3()(c,sr,p)) {} Circle_3(const Point_3& c, const FT& sr, const Direction_3& d) : Rep(typename R::Construct_circle_3()(c,sr,d)) {} Circle_3(const Point_3& c, const FT& sr, const Vector_3& v) : Rep(typename R::Construct_circle_3()(c,sr,v)) {} Circle_3(const Sphere_3& s1, const Sphere_3& s2) : Rep(typename R::Construct_circle_3()(s1,s2)) {} Circle_3(const Sphere_3& s, const Plane_3& p) : Rep(typename R::Construct_circle_3()(s,p)) {} Circle_3(const Plane_3& p, const Sphere_3& s) : Rep(typename R::Construct_circle_3()(p,s)) {} Circle_3(const Point_3& p1, const Point_3& p2, const Point_3& p3) : Rep(typename R::Construct_circle_3()(p1,p2,p3)) {} Circle_3(const Rep& r) : Rep(r) {} typename Qualified_result_of ::type diametral_sphere() const { return typename R::Construct_sphere_3()(*this); } Point_3 center() const { return typename R::Construct_sphere_3()(*this).center(); } FT squared_radius() const { return typename R::Construct_sphere_3()(*this).squared_radius(); } typename Qualified_result_of ::type supporting_plane() const { return typename R::Construct_plane_3()(*this); } Bbox_3 bbox() const { return typename R::Construct_bbox_3()(*this); } FT area_divided_by_pi() const { return typename R::Compute_area_divided_by_pi_3()(*this); } double approximate_area() const { return typename R::Compute_approximate_area_3()(*this); } FT squared_length_divided_by_pi_square() const { return typename R::Compute_squared_length_divided_by_pi_square_3()(*this); } double approximate_squared_length() const { return typename R::Compute_approximate_squared_length_3()(*this); } typename R::Boolean has_on(const Point_3 &p) const { return typename R::Has_on_3()(*this, p); } }; template < typename R > inline bool operator==(const Circle_3 &p, const Circle_3 &q) { return R().equal_3_object()(p, q); } template < typename R > inline bool operator!=(const Circle_3 &p, const Circle_3 &q) { return ! (p == q); } template < typename R > std::ostream & operator<<(std::ostream & os, const Circle_3 &c) { return os << c.supporting_plane() << " " << c.diametral_sphere() << " "; } template < typename R > std::istream & operator>>(std::istream & is, Circle_3 &c) { typename R::Plane_3 p; typename R::Sphere_3 s; is >> p >> s ; if (is) c = Circle_3(p, s); return is; } } # 53 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Aff_transformation_3.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Aff_transformation_3.h" namespace CGAL { template class Aff_transformation_3 : public R_::Kernel_base::Aff_transformation_3 { typedef typename R_::RT RT; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Kernel_base::Aff_transformation_3 RAff_transformation_3; public: typedef CGAL::Dimension_tag<3> Ambient_dimension; typedef R_ R; Aff_transformation_3() {} Aff_transformation_3(const RAff_transformation_3& t) : RAff_transformation_3(t) {} Aff_transformation_3(const Identity_transformation& tag) : RAff_transformation_3(tag) {} Aff_transformation_3(const Translation tag, const Vector_3& v) : RAff_transformation_3(tag, v) {} Aff_transformation_3(const Scaling tag, const RT& s, const RT& w= RT(1) ) : RAff_transformation_3(tag, s, w) {} Aff_transformation_3( const RT& m11, const RT& m12, const RT& m13, const RT& m14, const RT& m21, const RT& m22, const RT& m23, const RT& m24, const RT& m31, const RT& m32, const RT& m33, const RT& m34, const RT& w= RT(1) ) : RAff_transformation_3(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, w) {} Aff_transformation_3( const RT& m11, const RT& m12, const RT& m13, const RT& m21, const RT& m22, const RT& m23, const RT& m31, const RT& m32, const RT& m33, const RT& w = RT(1) ) : RAff_transformation_3(m11, m12, m13, m21, m22, m23, m31, m32, m33, w) {} }; template < class R > std::ostream& operator<<(std::ostream& os, const CGAL::Aff_transformation_3& t) { typedef typename R::Kernel_base::Aff_transformation_3 RAff_transformation_3; return os << static_cast(t); } template < class R > std::istream& operator>>(std::istream& is, CGAL::Aff_transformation_3& t) { typedef typename R::Kernel_base::Aff_transformation_3 RAff_transformation_3; return is >> static_cast(t); } } # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/user_classes.h" 2 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_internal_2.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_internal_2.h" # 1 "/localhome/glisse2/include/boost/mpl/equal_to.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/equal_to.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/numeric_cast.hpp" 1 # 30 "/localhome/glisse2/include/boost/mpl/numeric_cast.hpp" namespace boost { namespace mpl { template< typename SourceTag, typename TargetTag > struct numeric_cast { template< typename N > struct apply; }; }} # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/tag.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/tag.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/has_tag.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/has_tag.hpp" namespace boost { namespace mpl { namespace aux { template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; }}} # 20 "/localhome/glisse2/include/boost/mpl/tag.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename T > struct tag_impl { typedef typename T::tag type; }; } template< typename T, typename Default = void_ > struct tag : if_< aux::has_tag , aux::tag_impl , Default >::type { # 48 "/localhome/glisse2/include/boost/mpl/tag.hpp" }; }} # 25 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_cast_utils.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/numeric_cast_utils.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/numeric_cast_utils.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/forwarding.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/numeric_cast_utils.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename F , typename Tag1 , typename Tag2 > struct cast1st_impl { template< typename N1, typename N2 > struct apply : apply_wrap2< F , typename apply_wrap1< numeric_cast,N1 >::type , N2 > { # 46 "/localhome/glisse2/include/boost/mpl/aux_/numeric_cast_utils.hpp" }; }; template< typename F , typename Tag1 , typename Tag2 > struct cast2nd_impl { template< typename N1, typename N2 > struct apply : apply_wrap2< F , N1 , typename apply_wrap1< numeric_cast,N2 >::type > { # 72 "/localhome/glisse2/include/boost/mpl/aux_/numeric_cast_utils.hpp" }; }; }}} # 26 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/msvc_eti_base.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/msvc_eti_base.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/is_msvc_eti_arg.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/aux_/is_msvc_eti_arg.hpp" namespace boost { namespace mpl { namespace aux { # 62 "/localhome/glisse2/include/boost/mpl/aux_/is_msvc_eti_arg.hpp" }}} # 18 "/localhome/glisse2/include/boost/mpl/aux_/msvc_eti_base.hpp" 2 namespace boost { namespace mpl { namespace aux { # 55 "/localhome/glisse2/include/boost/mpl/aux_/msvc_eti_base.hpp" template< typename T > struct msvc_eti_base : T { msvc_eti_base(); typedef T type; }; template<> struct msvc_eti_base { typedef msvc_eti_base type; typedef msvc_eti_base first; typedef msvc_eti_base second; typedef msvc_eti_base tag; enum { value = 0 }; }; }}} # 30 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { }; template<> struct equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef equal_to< na , na > result_; typedef equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< equal_to< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( N1::value == N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/equal_to.hpp" 2 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_internal_2.h" 2 namespace CGAL { namespace internal { template < class K > inline typename K::Angle angle(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { return k.angle_2_object()(u, v); } template < class K > inline typename K::Angle angle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.angle_2_object()(p, q, r); } template < class K > inline typename K::Angle angle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const typename K::Point_2 &s, const K& k) { return k.angle_2_object()(p, q, r, s); } template < class K > inline typename K::Boolean are_ordered_along_line(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.are_ordered_along_line_2_object()(p, q, r); } template < class K > inline typename K::Boolean are_strictly_ordered_along_line(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.are_strictly_ordered_along_line_2_object()(p, q, r); } template < class K > inline typename K::FT area(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.compute_area_2_object()(p, q, r); } template < class K > inline typename K::Point_2 barycenter(const typename K::Point_2 &p1, const typename K::FT& w1, const typename K::Point_2 &p2, const K& k) { return k.construct_barycenter_2_object()(p1, w1, p2); } template < class K > inline typename K::Point_2 barycenter(const typename K::Point_2 &p1, const typename K::FT& w1, const typename K::Point_2 &p2, const typename K::FT& w2, const K& k) { return k.construct_barycenter_2_object()(p1, w1, p2, w2); } template < class K > inline typename K::Point_2 barycenter(const typename K::Point_2 &p1, const typename K::FT& w1, const typename K::Point_2 &p2, const typename K::FT& w2, const typename K::Point_2 &p3, const K& k) { return k.construct_barycenter_2_object()(p1, w1, p2, w2, p3); } template < class K > inline typename K::Point_2 barycenter(const typename K::Point_2 &p1, const typename K::FT& w1, const typename K::Point_2 &p2, const typename K::FT& w2, const typename K::Point_2 &p3, const typename K::FT& w3, const K& k) { return k.construct_barycenter_2_object()(p1, w1, p2, w2, p3, w3); } template < class K > inline typename K::Point_2 barycenter(const typename K::Point_2 &p1, const typename K::FT& w1, const typename K::Point_2 &p2, const typename K::FT& w2, const typename K::Point_2 &p3, const typename K::FT& w3, const typename K::Point_2 &p4, const K& k) { return k.construct_barycenter_2_object()(p1, w1, p2, w2, p3, w3, p4); } template < class K > inline typename K::Point_2 barycenter(const typename K::Point_2 &p1, const typename K::FT& w1, const typename K::Point_2 &p2, const typename K::FT& w2, const typename K::Point_2 &p3, const typename K::FT& w3, const typename K::Point_2 &p4, const typename K::FT& w4, const K& k) { return k.construct_barycenter_2_object()(p1, w1, p2, w2, p3, w3, p4, w4); } template inline typename K::Line_2 bisector(const typename K::Point_2 &p, const typename K::Point_2 &q, const K &k) { return k.construct_bisector_2_object()(p, q); } template inline typename K::Line_2 bisector(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const K &k) { return k.construct_bisector_2_object()(l1, l2); } template < class K > inline typename K::Point_2 centroid(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.construct_centroid_2_object()(p, q, r); } template < class K > inline typename K::Point_2 centroid(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const typename K::Point_2 &s, const K& k) { return k.construct_centroid_2_object()(p, q, r, s); } template < class K > inline typename K::Point_2 centroid(const typename K::Triangle_2 &t, const K& k) { return k.construct_centroid_2_object()(t); } template < class K > inline typename K::Point_2 circumcenter(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.construct_circumcenter_2_object()(p, q); } template < class K > inline typename K::Point_2 circumcenter(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.construct_circumcenter_2_object()(p, q, r); } template < class K > inline typename K::Point_2 circumcenter(const typename K::Triangle_2 &t, const K& k) { return k.construct_circumcenter_2_object()(t); } template < class K > inline typename K::Boolean collinear(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.collinear_2_object()(p, q, r); } template < class K > inline typename K::Boolean collinear_are_ordered_along_line(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.collinear_are_ordered_along_line_2_object()(p, q, r); } template < class K > inline typename K::Boolean collinear_are_strictly_ordered_along_line( const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.collinear_are_strictly_ordered_along_line_2_object()(p, q, r); } template < typename K > inline typename K::Comparison_result compare_angle_with_x_axis(const typename K::Direction_2& d1, const typename K::Direction_2& d2, const K& k) { return k.compare_angle_with_x_axis_2_object()(d1, d2); } template inline typename boost::enable_if< boost::mpl::equal_to::type::value>, boost::mpl::integral_c >, typename K::Comparison_result> ::type compare_distance(const T1 &o1, const T2 &o2, const T3 &o3, const K& k) { return k.compare_distance_2_object()(o1, o2, o3); } template inline typename boost::enable_if< boost::mpl::equal_to::type::value>, boost::mpl::integral_c >, typename K::Comparison_result> ::type compare_distance(const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const K& k) { return k.compare_distance_2_object()(o1, o2, o3, o4); } template inline typename K::Comparison_result compare_distance_to_point(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.compare_distance_2_object()(p, q, r); } template inline typename K::Comparison_result compare_squared_distance(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::FT &d2, const K& k) { return k.compare_squared_distance_2_object()(p, q, d2); } template inline typename K::Comparison_result compare_signed_distance_to_line(const typename K::Point_2& p, const typename K::Point_2& q, const typename K::Point_2& r, const typename K::Point_2& s, const K& k) { if (k.less_signed_distance_to_line_2_object()(p, q, r, s)) return SMALLER; if (k.less_signed_distance_to_line_2_object()(p, q, s, r)) return LARGER; return EQUAL; } template inline typename K::Comparison_result compare_signed_distance_to_line(const typename K::Line_2& l, const typename K::Point_2& p, const typename K::Point_2& q, const K& k) { if (k.less_signed_distance_to_line_2_object()(l, p, q)) return SMALLER; if (k.less_signed_distance_to_line_2_object()(l, q, p)) return LARGER; return EQUAL; } template < class K > inline typename K::Comparison_result compare_slopes(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const K& k) { return k.compare_slope_2_object()(l1, l2); } template < class K > inline typename K::Comparison_result compare_slopes(const typename K::Segment_2 &s1, const typename K::Segment_2 &s2, const K& k) { return k.compare_slope_2_object()(s1, s2); } template < class K > inline typename K::Comparison_result compare_x(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.compare_x_2_object()(p, q); } template < class K > inline typename K::Comparison_result compare_x(const typename K::Point_2 &p, const typename K::Line_2 &l1, const typename K::Line_2 &l2, const K& k) { return k.compare_x_2_object()(p, l1, l2); } template < class K > inline typename K::Comparison_result compare_x(const typename K::Line_2 &l, const typename K::Line_2 &h1, const typename K::Line_2 &h2, const K& k) { return k.compare_x_2_object()(l, h1, h2); } template < class K > inline typename K::Comparison_result compare_x(const typename K::Line_2 &l1, const typename K::Line_2 &h1, const typename K::Line_2 &l2, const typename K::Line_2 &h2, const K& k) { return k.compare_x_2_object()(l1, h1, l2, h2); } template < class K > inline typename K::Comparison_result compare_x_at_y(const typename K::Point_2& p, const typename K::Line_2& h, const K& k) { return k.compare_x_at_y_2_object()(p, h); } # 437 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_internal_2.h" template < class K > inline typename K::Comparison_result compare_x_at_y(const typename K::Point_2 &p, const typename K::Line_2 &h1, const typename K::Line_2 &h2, const K& k) { return k.compare_x_at_y_2_object()(p, h1, h2); } template < class K > inline typename K::Comparison_result compare_x_at_y(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const typename K::Line_2 &h, const K& k) { return k.compare_x_at_y_2_object()(l1, l2, h); } template < class K > inline typename K::Comparison_result compare_x_at_y(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const typename K::Line_2 &h1, const typename K::Line_2 &h2, const K& k) { return k.compare_x_at_y_2_object()(l1, l2, h1, h2); } template < class K > inline typename K::Comparison_result compare_xy(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.compare_xy_2_object()(p, q); } template < class K > inline typename K::Comparison_result compare_yx(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.compare_yx_2_object()(p, q); } template < class K > inline typename K::Comparison_result compare_y(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.compare_y_2_object()(p, q); } template < class K > inline typename K::Comparison_result compare_y(const typename K::Point_2 &p, const typename K::Line_2 &l1, const typename K::Line_2 &l2, const K& k) { return k.compare_y_2_object()(p, l1, l2); } template < class K > inline typename K::Comparison_result compare_y(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const typename K::Line_2 &h1, const typename K::Line_2 &h2, const K& k) { return k.compare_y_2_object()(l1, l2, h1, h2); } template < class K > inline typename K::Comparison_result compare_y(const typename K::Line_2 &l, const typename K::Line_2 &h1, const typename K::Line_2 &h2, const K& k) { return k.compare_y_2_object()(l, h1, h2); } template < class K > inline typename K::Comparison_result compare_y_at_x(const typename K::Point_2 &p, const typename K::Segment_2 &s, const K& k) { return k.compare_y_at_x_2_object()(p, s); } template < class K > inline typename K::Comparison_result compare_y_at_x(const typename K::Point_2 &p, const typename K::Segment_2 &s1, const typename K::Segment_2 &s2, const K& k) { return k.compare_y_at_x_2_object()(p, s1, s2); } template < class K > inline typename K::Comparison_result compare_y_at_x(const typename K::Point_2 &p, const typename K::Line_2 &l, const K& k) { return k.compare_y_at_x_2_object()(p, l); } template < class K > inline typename K::Comparison_result compare_y_at_x(const typename K::Point_2 &p, const typename K::Line_2 &h1, const typename K::Line_2 &h2, const K& k) { return k.compare_y_at_x_2_object()(p, h1, h2); } template < class K > inline typename K::Comparison_result compare_y_at_x(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const typename K::Line_2 &h, const K& k) { return k.compare_y_at_x_2_object()(l1, l2, h); } template < class K > inline typename K::Comparison_result compare_y_at_x(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const typename K::Line_2 &h1, const typename K::Line_2 &h2, const K& k) { return k.compare_y_at_x_2_object()(l1, l2, h1, h2); } template < class K > inline typename K::FT determinant(const typename K::Vector_2 &v0, const typename K::Vector_2 &v1, const K &k) { return k.compute_determinant_2_object()(v0, v1); } template inline typename K::Boolean has_larger_distance_to_point(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.less_distance_to_point_2_object()(p, r, q); } template inline typename K::Boolean has_smaller_distance_to_point(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.less_distance_to_point_2_object()(p, q, r); } template inline typename K::Boolean has_smaller_signed_distance_to_line(const typename K::Line_2& l, const typename K::Point_2& p, const typename K::Point_2& q, const K& k) { return k.less_signed_distance_to_line_2_object()(l, p, q); } template inline typename K::Boolean has_larger_signed_distance_to_line(const typename K::Line_2& l, const typename K::Point_2& p, const typename K::Point_2& q, const K& k) { return k.less_signed_distance_to_line_2_object()(l, q, p); } template inline typename K::Boolean has_larger_signed_distance_to_line(const typename K::Point_2& p, const typename K::Point_2& q, const typename K::Point_2& r, const typename K::Point_2& s, const K& k) { return k.less_signed_distance_to_line_2_object()(p, q, s, r); } template inline typename K::Boolean has_smaller_signed_distance_to_line(const typename K::Point_2& p, const typename K::Point_2& q, const typename K::Point_2& r, const typename K::Point_2& s, const K& k) { return k.less_signed_distance_to_line_2_object()(p, q, r, s); } template < class K > inline typename K::Boolean left_turn(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { return k.left_turn_2_object()(p, q, r); } template < class K > inline typename K::Boolean less_x(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.less_x_2_object()(p, q); } template < class K > inline typename K::Boolean less_y(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.less_y_2_object()(p, q); } template < class K > inline typename K::Boolean lexicographically_xy_larger(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.compare_xy_2_object()(p, q) == LARGER; } template < class K > inline typename K::Boolean lexicographically_xy_larger_or_equal(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.compare_xy_2_object()(p, q) != SMALLER; } template < class K > inline typename K::Boolean lexicographically_xy_smaller(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.less_xy_2_object()(p, q); } template < class K > inline typename K::Boolean lexicographically_xy_smaller_or_equal(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.compare_xy_2_object()(p, q) != LARGER; } template < class K > inline typename K::Boolean lexicographically_yx_smaller(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.less_yx_2_object()(p, q); } template < class K > inline typename K::Boolean lexicographically_yx_smaller_or_equal(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return !k.less_yx_2_object()(q, p); } template < class K > inline typename K::Boolean lexicographically_yx_larger(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return k.less_yx_2_object()(q, p); } template < class K > inline typename K::Boolean lexicographically_yx_larger_or_equal(const typename K::Point_2 &p, const typename K::Point_2 &q, const K& k) { return !k.less_yx_2_object()(p, q); } template < class K > inline typename K::Point_2 midpoint(const typename K::Point_2 &p, const typename K::Point_2 &q, const K &k) { return k.construct_midpoint_2_object()(p, q); } template < class K > inline typename K::Point_2 max_vertex(const typename K::Iso_rectangle_2 &ir, const K &k) { return k.construct_max_vertex_2_object()(ir); } template < class K > inline typename K::Point_2 min_vertex(const typename K::Iso_rectangle_2 &ir, const K &k) { return k.construct_min_vertex_2_object()(ir); } template inline typename K::Orientation orientation(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K &k) { return k.orientation_2_object()(p, q, r); } template inline typename K::Orientation orientation(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K &k) { return k.orientation_2_object()(u, v); } template inline typename K::Boolean parallel(const typename K::Line_2 &l1, const typename K::Line_2 &l2, const K &k) { return k.are_parallel_2_object()(l1, l2); } template inline typename K::Boolean parallel(const typename K::Ray_2 &r1, const typename K::Ray_2 &r2, const K &k) { return k.are_parallel_2_object()(r1, r2); } template inline typename K::Boolean parallel(const typename K::Segment_2 &s1, const typename K::Segment_2 &s2, const K &k) { return k.are_parallel_2_object()(s1, s2); } template inline typename K::Boolean right_turn(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K &k) { return internal::orientation(p, q, r, k) == RIGHT_TURN; } template inline typename K::Bounded_side side_of_bounded_circle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const typename K::Point_2 &t, const K &k) { return k.side_of_bounded_circle_2_object()(p, q, r, t); } template inline typename K::Bounded_side side_of_bounded_circle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K &k) { return k.side_of_bounded_circle_2_object()(p, q, r); } template inline typename K::Oriented_side side_of_oriented_circle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const typename K::Point_2 &t, const K &k) { return k.side_of_oriented_circle_2_object()(p, q, r, t); } template < class K > inline typename K::FT squared_radius(const typename K::Point_2 &p, const K &k) { return k.compute_squared_radius_2_object()(p); } template < class K > inline typename K::FT squared_radius(const typename K::Point_2 &p, const typename K::Point_2 &q, const K &k) { return k.compute_squared_radius_2_object()(p, q); } template < class K > inline typename K::FT squared_radius(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K &k) { return k.compute_squared_radius_2_object()(p, q, r); } template < class K > inline typename K::Boolean x_equal(const typename K::Point_2 &p, const typename K::Point_2 &q, const K &k) { return k.equal_x_2_object()(p, q); } template < class K > inline typename K::Boolean y_equal(const typename K::Point_2 &p, const typename K::Point_2 &q, const K &k) { return k.equal_y_2_object()(p, q); } } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_2.h" 2 namespace CGAL { template < class K > typename K::Boolean operator==(const Point_2 &p, const Origin& o) { return p == Point_2(o); } template < class K > typename K::Boolean operator!=(const Point_2 &p, const Origin& o) { return p != Point_2(o); } template < class K > inline Angle angle(const Vector_2 &u, const Vector_2 &v) { return internal::angle(u, v, K()); } template < class K > inline Angle angle(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::angle(p, q, r, K()); } template < class K > inline Angle angle(const Point_2 &p, const Point_2 &q, const Point_2 &r, const Point_2 &s) { return internal::angle(p, q, r, s, K()); } template < class K > inline typename K::Boolean are_ordered_along_line(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::are_ordered_along_line(p, q, r, K()); } template < class K > inline typename K::Boolean are_strictly_ordered_along_line(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::are_strictly_ordered_along_line(p, q, r, K()); } template < class K > inline typename K::FT area(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::area(p, q, r, K()); } template < class K > inline typename K::Point_2 barycenter(const Point_2 &p1, const typename K::FT& w1, const Point_2 &p2) { return internal::barycenter(p1, w1, p2, K()); } template < class K > inline typename K::Point_2 barycenter(const Point_2 &p1, const typename K::FT& w1, const Point_2 &p2, const typename K::FT& w2) { return internal::barycenter(p1, w1, p2, w2, K()); } template < class K > inline typename K::Point_2 barycenter(const Point_2 &p1, const typename K::FT& w1, const Point_2 &p2, const typename K::FT& w2, const Point_2 &p3) { return internal::barycenter(p1, w1, p2, w2, p3, K()); } template < class K > inline typename K::Point_2 barycenter(const Point_2 &p1, const typename K::FT& w1, const Point_2 &p2, const typename K::FT& w2, const Point_2 &p3, const typename K::FT& w3) { return internal::barycenter(p1, w1, p2, w2, p3, w3, K()); } template < class K > inline typename K::Point_2 barycenter(const Point_2 &p1, const typename K::FT& w1, const Point_2 &p2, const typename K::FT& w2, const Point_2 &p3, const typename K::FT& w3, const Point_2 &p4) { return internal::barycenter(p1, w1, p2, w2, p3, w3, p4, K()); } template < class K > inline typename K::Point_2 barycenter(const Point_2 &p1, const typename K::FT& w1, const Point_2 &p2, const typename K::FT& w2, const Point_2 &p3, const typename K::FT& w3, const Point_2 &p4, const typename K::FT& w4) { return internal::barycenter(p1, w1, p2, w2, p3, w3, p4, w4, K()); } template inline typename K::Line_2 bisector(const Point_2 &p, const Point_2 &q) { return internal::bisector(p, q, K()); } template inline typename K::Line_2 bisector(const Line_2 &l1, const Line_2 &l2) { return internal::bisector(l1, l2, K()); } template < class K > inline typename K::Point_2 centroid(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::centroid(p, q, r, K()); } template < class K > inline typename K::Point_2 centroid(const Triangle_2 &t) { return internal::centroid(t, K()); } template < class K > inline typename K::Point_2 centroid(const Point_2 &p, const Point_2 &q, const Point_2 &r, const Point_2 &s) { return internal::centroid(p, q, r, s, K()); } template < class K > inline typename K::Point_2 circumcenter(const Point_2 &p, const Point_2 &q) { return internal::circumcenter(p, q, K()); } template < class K > inline typename K::Point_2 circumcenter(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::circumcenter(p, q, r, K()); } template < class K > inline typename K::Point_2 circumcenter(const Triangle_2 &t) { return internal::circumcenter(t, K()); } template < class K > inline typename K::Boolean collinear(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::collinear(p, q, r, K()); } template < class K > inline typename K::Boolean collinear_are_ordered_along_line(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::collinear_are_ordered_along_line(p, q, r, K()); } template < class K > inline typename K::Boolean collinear_are_strictly_ordered_along_line(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::collinear_are_strictly_ordered_along_line(p, q, r, K()); } template < typename K > inline typename K::Comparison_result compare_angle_with_x_axis(const Direction_2& d1, const Direction_2& d2) { return internal::compare_angle_with_x_axis(d1, d2, K()); } template inline typename K::Comparison_result compare_distance_to_point(const Point_2& p, const Point_2& q, const Point_2& r) { return internal::compare_distance_to_point(p, q, r, K()); } template inline typename K::Comparison_result compare_squared_distance(const Point_2& p, const Point_2& q, const typename K::FT& d2) { return internal::compare_squared_distance(p, q, d2, K()); } template inline typename K::Comparison_result compare_signed_distance_to_line(const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& s) { return internal::compare_signed_distance_to_line(p, q, r, s, K()); } template inline typename K::Comparison_result compare_signed_distance_to_line(const Line_2& l, const Point_2& p, const Point_2& q) { return internal::compare_signed_distance_to_line(l, p, q, K()); } # 332 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_2.h" template < class K > inline typename K::Comparison_result compare_slopes(const Line_2 &l1, const Line_2 &l2) { return internal::compare_slopes(l1, l2, K()); } template < class K > inline typename K::Comparison_result compare_slopes(const Segment_2 &s1, const Segment_2 &s2) { return internal::compare_slopes(s1, s2, K()); } template < class K > inline typename K::Comparison_result compare_x(const Point_2 &p, const Point_2 &q) { return internal::compare_x(p, q, K()); } template < class K > inline typename K::Comparison_result compare_x(const Point_2& p, const Line_2& l1, const Line_2& l2) { return internal::compare_x(p, l1, l2, K()); } template < class K > inline typename K::Comparison_result compare_x(const Line_2 &l, const Line_2 &h1, const Line_2 &h2) { return internal::compare_x(l, h1, h2, K()); } template < class K > inline typename K::Comparison_result compare_x(const Line_2 &l1, const Line_2 &h1, const Line_2 &l2, const Line_2 &h2) { return internal::compare_x(l1, h1, l2, h2, K()); } template < class K > inline typename K::Comparison_result compare_x_at_y(const Point_2& p, const Line_2& h) { return internal::compare_x_at_y(p, h, K()); } # 405 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_2.h" template < class K > inline typename K::Comparison_result compare_x_at_y(const Point_2 &p, const Line_2 &h1, const Line_2 &h2) { return internal::compare_x_at_y(p, h1, h2, K()); } template < class K > inline typename K::Comparison_result compare_x_at_y(const Line_2 &l1, const Line_2 &l2, const Line_2 &h) { return internal::compare_x_at_y(l1, l2, h, K()); } template < class K > inline typename K::Comparison_result compare_x_at_y(const Line_2 &l1, const Line_2 &l2, const Line_2 &h1, const Line_2 &h2) { return internal::compare_x_at_y(l1, l2, h1, h2, K()); } template < class K > inline typename K::Comparison_result compare_xy(const Point_2 &p, const Point_2 &q) { return internal::compare_xy(p, q, K()); } template < class K > inline typename K::Comparison_result compare_lexicographically(const Point_2 &p, const Point_2 &q) { return internal::compare_xy(p, q, K()); } template < class K > inline typename K::Comparison_result compare_y(const Point_2 &p, const Point_2 &q) { return internal::compare_y(p, q, K()); } template < class K > inline typename K::Comparison_result compare_y(const Point_2 &p, const Line_2 &l1, const Line_2 &l2) { return internal::compare_y(p, l1, l2, K()); } template < class K > inline typename K::Comparison_result compare_y(const Line_2 &l1, const Line_2 &l2, const Line_2 &h1, const Line_2 &h2) { return internal::compare_y(l1, l2, h1, h2, K()); } template < class K > inline typename K::Comparison_result compare_y(const Line_2 &l, const Line_2 &h1, const Line_2 &h2) { return internal::compare_y(l, h1, h2, K()); } template < class K > inline typename K::Comparison_result compare_y_at_x(const Point_2 &p, const Segment_2 &s) { return internal::compare_y_at_x(p, s, K()); } template < class K > inline typename K::Comparison_result compare_y_at_x(const Point_2 &p, const Segment_2 &s1, const Segment_2 &s2) { return internal::compare_y_at_x(p, s1, s2, K()); } template < class K > inline typename K::Comparison_result compare_y_at_x(const Point_2 &p, const Line_2 &h) { return internal::compare_y_at_x(p, h, K()); } template < class K > inline typename K::Comparison_result compare_y_at_x(const Point_2 &p, const Line_2 &h1, const Line_2 &h2) { return internal::compare_y_at_x(p, h1, h2, K()); } template < class K > inline typename K::Comparison_result compare_y_at_x(const Line_2 &l1, const Line_2 &l2, const Line_2 &h) { return internal::compare_y_at_x(l1, l2, h, K()); } template < class K > inline typename K::Comparison_result compare_y_at_x(const Line_2 &l1, const Line_2 &l2, const Line_2 &h1, const Line_2 &h2) { return internal::compare_y_at_x(l1, l2, h1, h2, K()); } template < class K > inline typename K::Comparison_result compare_yx(const Point_2 &p, const Point_2 &q) { return internal::compare_yx(p, q, K()); } template < class K > inline typename K::FT determinant(const Vector_2 &v0, const Vector_2 &v1) { return internal::determinant(v0, v1, K()); } template inline typename K::Boolean has_larger_distance_to_point(const Point_2& p, const Point_2& q, const Point_2& r) { return internal::has_larger_distance_to_point(p, q, r, K()); } template inline typename K::Boolean has_smaller_distance_to_point(const Point_2& p, const Point_2& q, const Point_2& r) { return internal::has_smaller_distance_to_point(p, q, r, K()); } template inline typename K::Boolean has_smaller_signed_distance_to_line(const Line_2& l, const Point_2& p, const Point_2& q) { return internal::has_smaller_signed_distance_to_line(l, p, q, K()); } template inline typename K::Boolean has_larger_signed_distance_to_line(const Line_2& l, const Point_2& p, const Point_2& q) { return internal::has_larger_signed_distance_to_line(l, p, q, K()); } template inline typename K::Boolean has_larger_signed_distance_to_line(const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& s) { return internal::has_larger_signed_distance_to_line(p, q, r, s, K()); } template inline typename K::Boolean has_smaller_signed_distance_to_line(const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& s) { return internal::has_smaller_signed_distance_to_line(p, q, r, s, K()); } template < class K > inline typename K::Boolean left_turn(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::left_turn(p, q, r, K()); } template < class K > inline typename K::Boolean less_x(const Point_2 &p, const Point_2 &q) { return internal::less_x(p, q, K()); } template < class K > inline typename K::Boolean less_y(const Point_2 &p, const Point_2 &q) { return internal::less_y(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_xy_larger(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_xy_larger(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_xy_larger_or_equal(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_xy_larger_or_equal(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_xy_smaller(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_xy_smaller(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_xy_smaller_or_equal(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_xy_smaller_or_equal(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_yx_smaller(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_yx_smaller(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_yx_smaller_or_equal(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_yx_smaller_or_equal(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_yx_larger(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_yx_larger(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_yx_larger_or_equal(const Point_2 &p, const Point_2 &q) { return internal::lexicographically_yx_larger_or_equal(p, q, K()); } template < class K > inline typename K::Point_2 midpoint(const Point_2 &p, const Point_2 &q) { return internal::midpoint(p, q, K()); } template < class K > inline typename K::Point_2 max_vertex(const Iso_rectangle_2 &ir) { return internal::max_vertex(ir, K()); } template < class K > inline typename K::Point_2 min_vertex(const Iso_rectangle_2 &ir) { return internal::min_vertex(ir, K()); } template < class K > inline typename K::Boolean operator<(const Direction_2& d1, const Direction_2& d2) { return compare_angle_with_x_axis(d1, d2) == SMALLER; } template < class K > inline typename K::Boolean operator>(const Direction_2& d1, const Direction_2& d2) { return compare_angle_with_x_axis(d1, d2) == LARGER; } template < class K > inline typename K::Boolean operator>=(const Direction_2& d1, const Direction_2& d2) { return compare_angle_with_x_axis(d1, d2) != SMALLER; } template < class K > inline typename K::Boolean operator<=(const Direction_2& d1, const Direction_2& d2) { return compare_angle_with_x_axis(d1, d2) != LARGER; } template < class K > inline typename K::Boolean operator==(const Point_2& p, const Point_2& q) { return K().equal_2_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Point_2& p, const Point_2& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator<(const Point_2& p, const Point_2& q) { return K().less_xy_2_object()(p, q); } template < class K > inline typename K::Boolean operator>(const Point_2& p, const Point_2& q) { return K().less_xy_2_object()(q, p); } template < class K > inline typename K::Boolean operator<=(const Point_2& p, const Point_2& q) { return ! K().less_xy_2_object()(q, p); } template < class K > inline typename K::Boolean operator>=(const Point_2& p, const Point_2& q) { return ! K().less_xy_2_object()(p, q); } template < class K > inline typename K::Boolean operator==(const Vector_2& v, const Vector_2& w) { return K().equal_2_object()(v, w); } template < class K > inline typename K::Boolean operator!=(const Vector_2& v, const Vector_2& w) { return ! (v == w); } template < class K > inline typename K::Vector_2 operator*(const typename K::FT &c, const Vector_2 &w) { return K().construct_scaled_vector_2_object()(w, c); } template < class K > inline typename K::Vector_2 operator*(const Vector_2 &w, const typename K::FT &c) { return K().construct_scaled_vector_2_object()(w, c); } template < class K > inline typename K::Vector_2 operator*(const typename First_if_different::Type &c, const Vector_2 &w) { return K().construct_scaled_vector_2_object()(w, c); } template < class K > inline typename K::Vector_2 operator*(const Vector_2 &w, const typename First_if_different::Type &c) { return K().construct_scaled_vector_2_object()(w, c); } template < class K > inline typename K::FT operator*(const Vector_2 &v, const Vector_2 &w) { return K().compute_scalar_product_2_object()(v, w); } template < class K > inline typename K::Point_2 operator+(const Point_2 &p, const Vector_2 &v) { return K().construct_translated_point_2_object()(p, v); } template < class K > inline typename K::Point_2 operator+(const Origin &o, const Vector_2 &v) { return K().construct_translated_point_2_object()(o, v); } template < class K > inline typename K::Point_2 operator-(const Point_2 &p, const Vector_2 &v) { return K().construct_translated_point_2_object() (p, K().construct_opposite_vector_2_object()(v)); } template < class K > inline typename K::Point_2 operator-(const Origin &o, const Vector_2 &v) { return K().construct_translated_point_2_object() (o, K().construct_opposite_vector_2_object()(v)); } template < class K > inline typename K::Vector_2 operator-(const Point_2 &p, const Point_2 &q) { return K().construct_vector_2_object()(q, p); } template < class K > inline typename K::Vector_2 operator-(const Point_2 &p, const Origin &o) { return K().construct_vector_2_object()(o, p); } template < class K > inline typename K::Vector_2 operator-(const Origin &o, const Point_2 &q) { return K().construct_vector_2_object()(q, o); } template inline typename K::Orientation orientation(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::orientation(p, q, r, K()); } template inline typename K::Orientation orientation(const Vector_2 &u, const Vector_2 &v) { return internal::orientation(u, v, K()); } template inline typename K::Line_2 radical_line(const Circle_2 &s1, const Circle_2 &s2) { return K().construct_radical_line_2_object()(s1,s2); } template inline typename K::Boolean right_turn(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::right_turn(p, q, r, K()); } template inline typename K::Bounded_side side_of_bounded_circle(const Point_2 &p, const Point_2 &q, const Point_2 &r, const Point_2 &t) { return internal::side_of_bounded_circle(p, q, r, t, K()); } template inline typename K::Bounded_side side_of_bounded_circle(const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::side_of_bounded_circle(p, q, r, K()); } template inline typename K::Oriented_side side_of_oriented_circle(const Point_2 &p, const Point_2 &q, const Point_2 &r, const Point_2 &t) { return internal::side_of_oriented_circle(p, q, r, t, K()); } template < class K > inline typename K::FT squared_radius(const Point_2 &p) { return internal::squared_radius(p, K()); } template < class K > inline typename K::FT squared_radius(const Point_2 &p, const Point_2 &q) { return internal::squared_radius(p, q, K()); } template < class K > inline typename K::FT squared_radius(const Point_2& p, const Point_2& q, const Point_2& r) { return internal::squared_radius(p, q, r, K()); } template < class K > inline typename K::Boolean x_equal(const Point_2 &p, const Point_2 &q) { return internal::x_equal(p, q, K()); } template < class K > inline typename K::Boolean y_equal(const Point_2 &p, const Point_2 &q) { return internal::y_equal(p, q, K()); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_3.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_internal_3.h" 1 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_internal_3.h" namespace CGAL { namespace internal { template inline typename K::Angle angle(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.angle_3_object()(p, q, r); } template < class K > inline typename K::Boolean are_ordered_along_line(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.are_ordered_along_line_3_object()(p, q, r); } template < class K > inline typename K::Boolean are_strictly_ordered_along_line(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.are_strictly_ordered_along_line_3_object()(p, q, r); } template < class K > inline typename K::Point_3 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1, const typename K::Point_3 &p2, const K& k) { return k.construct_barycenter_3_object()(p1, w1, p2); } template < class K > inline typename K::Point_3 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1, const typename K::Point_3 &p2, const typename K::FT& w2, const K& k) { return k.construct_barycenter_3_object()(p1, w1, p2, w2); } template < class K > inline typename K::Point_3 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1, const typename K::Point_3 &p2, const typename K::FT& w2, const typename K::Point_3 &p3, const K& k) { return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3); } template < class K > inline typename K::Point_3 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1, const typename K::Point_3 &p2, const typename K::FT& w2, const typename K::Point_3 &p3, const typename K::FT& w3, const K& k) { return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3, w3); } template < class K > inline typename K::Point_3 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1, const typename K::Point_3 &p2, const typename K::FT& w2, const typename K::Point_3 &p3, const typename K::FT& w3, const typename K::Point_3 &p4, const K& k) { return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3, w3, p4); } template < class K > inline typename K::Point_3 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1, const typename K::Point_3 &p2, const typename K::FT& w2, const typename K::Point_3 &p3, const typename K::FT& w3, const typename K::Point_3 &p4, const typename K::FT& w4, const K& k) { return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3, w3, p4, w4); } template inline typename K::Plane_3 bisector(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.construct_bisector_3_object()(p, q); } template inline typename K::Plane_3 bisector(const typename K::Plane_3 &h1, const typename K::Plane_3 &h2, const K &k) { return k.construct_bisector_3_object()(h1, h2); } template < class K > inline typename K::Point_3 centroid(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K &k) { return k.construct_centroid_3_object()(p, q, r, s); } template < class K > inline typename K::Point_3 centroid(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.construct_centroid_3_object()(p, q, r); } template < class K > inline typename K::Point_3 centroid(const typename K::Tetrahedron_3 &t, const K &k) { return k.construct_centroid_3_object()(t); } template < class K > inline typename K::Point_3 centroid(const typename K::Triangle_3 &t, const K &k) { return k.construct_centroid_3_object()(t); } template < class K > inline typename K::Point_3 circumcenter(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.construct_circumcenter_3_object()(p, q); } template < class K > inline typename K::Point_3 circumcenter(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.construct_circumcenter_3_object()(p, q, r); } template < class K > inline typename K::Point_3 circumcenter(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K &k) { return k.construct_circumcenter_3_object()(p, q, r, s); } template < class K > inline typename K::Point_3 circumcenter(const typename K::Tetrahedron_3 &t, const K& k) { return k.construct_circumcenter_3_object()(t); } template < class K > inline typename K::Point_3 circumcenter(const typename K::Triangle_3 &t, const K& k) { return k.construct_circumcenter_3_object()(t); } template < class K > inline typename K::Boolean collinear(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.collinear_3_object()(p, q, r); } template < class K > inline typename K::Boolean collinear_are_ordered_along_line( const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.collinear_are_ordered_along_line_3_object()(p, q, r); } template < class K > inline typename K::Boolean collinear_are_strictly_ordered_along_line( const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.collinear_are_strictly_ordered_along_line_3_object()(p, q, r); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const typename K::Point_3& a1, const typename K::Point_3& b1, const typename K::Point_3& c1, const typename K::Point_3& d1, const typename K::Point_3& a2, const typename K::Point_3& b2, const typename K::Point_3& c2, const typename K::Point_3& d2, const K& k) { return k.compare_dihedral_angle_3_object()(a1, b1, c1, d1, a2, b2, c2, d2); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const typename K::Point_3& a1, const typename K::Point_3& b1, const typename K::Point_3& c1, const typename K::Point_3& d1, const typename K::FT& cosine, const K& k) { return k.compare_dihedral_angle_3_object()(a1, b1, c1, d1, cosine); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const typename K::Vector_3& ab1, const typename K::Vector_3& ac1, const typename K::Vector_3& ad1, const typename K::Vector_3& ab2, const typename K::Vector_3& ac2, const typename K::Vector_3& ad2, const K& k) { return k.compare_dihedral_angle_3_object()(ab1, ac1, ad1, ab2, ac2, ad2); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const typename K::Vector_3& ab1, const typename K::Vector_3& ac1, const typename K::Vector_3& ad1, const typename K::FT& cosine, const K& k) { return k.compare_dihedral_angle_3_object()(ab1, ac1, ad1, cosine); } template inline typename boost::enable_if< boost::mpl::equal_to::type::value>, boost::mpl::integral_c >, typename K::Comparison_result> ::type compare_distance(const T1 &o1, const T2 &o2, const T3 &o3, const K& k) { return k.compare_distance_3_object()(o1, o2, o3); } template inline typename boost::enable_if< boost::mpl::equal_to::type::value>, boost::mpl::integral_c >, typename K::Comparison_result> ::type compare_distance(const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4, const K& k) { return k.compare_distance_3_object()(o1, o2, o3, o4); } template < class K > inline typename K::Comparison_result compare_distance_to_point(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.compare_distance_3_object()(p, q, r); } template < class K > inline typename K::Comparison_result compare_squared_distance(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::FT &d2, const K& k) { return k.compare_squared_distance_3_object()(p, q, d2); } template < class K > inline typename K::Comparison_result compare_squared_radius(const typename K::Point_3 &p, const typename K::FT &sr, const K& k) { return k.compare_squared_radius_3_object()(p, sr); } template < class K > inline typename K::Comparison_result compare_squared_radius(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::FT &sr, const K& k) { return k.compare_squared_radius_3_object()(p, q, sr); } template < class K > inline typename K::Comparison_result compare_squared_radius(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::FT &sr, const K& k) { return k.compare_squared_radius_3_object()(p, q, r, sr); } template < class K > inline typename K::Comparison_result compare_squared_radius(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const typename K::FT &sr, const K& k) { return k.compare_squared_radius_3_object()(p, q, r, s, sr); } template < class K > inline typename K::Comparison_result compare_lexicographically_xyz(const typename K::Point_3 &p, const typename K::Point_3 &q, const K& k) { return k.compare_xyz_3_object()(p, q); } template < class K > inline typename K::Comparison_result compare_signed_distance_to_plane(const typename K::Plane_3 &h, const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { if (k.less_signed_distance_to_plane_3_object()(h, p, q)) return SMALLER; if (k.less_signed_distance_to_plane_3_object()(h, q, p)) return LARGER; return EQUAL; } template < class K > inline typename K::Comparison_result compare_signed_distance_to_plane(const typename K::Point_3 &hp, const typename K::Point_3 &hq, const typename K::Point_3 &hr, const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { if (k.less_signed_distance_to_plane_3_object()(hp, hq, hr, p, q)) return SMALLER; if (k.less_signed_distance_to_plane_3_object()(hp, hq, hr, q, p)) return LARGER; return EQUAL; } template < class K > inline typename K::Comparison_result compare_x(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.compare_x_3_object()(p, q); } template < class K > inline typename K::Comparison_result compare_y(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.compare_y_3_object()(p, q); } template < class K > inline typename K::Comparison_result compare_z(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.compare_z_3_object()(p, q); } template < class K > inline typename K::Comparison_result compare_xyz(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.compare_xyz_3_object()(p, q); } template < class K > inline typename K::Boolean coplanar(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K& k) { return k.coplanar_3_object()(p, q, r, s); } template < class K > inline typename K::Orientation coplanar_orientation(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K& k) { return k.coplanar_orientation_3_object()(p, q, r, s); } template < class K > inline typename K::Orientation coplanar_orientation(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.coplanar_orientation_3_object()(p, q, r); } template < class K > inline typename K::Bounded_side coplanar_side_of_bounded_circle(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &t, const K& k) { return k.coplanar_side_of_bounded_circle_3_object()(p, q, r, t); } template < class K > inline typename K::Vector_3 cross_product(const typename K::Vector_3 &v, const typename K::Vector_3 &w, const K& k) { return k.construct_cross_product_vector_3_object()(v, w); } template < class K > inline typename K::FT determinant(const typename K::Vector_3 &v0, const typename K::Vector_3 &v1, const typename K::Vector_3 &v2, const K &k) { return k.compute_determinant_3_object()(v0, v1, v2); } template < class K > inline typename K::Line_3 equidistant_line(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { return k.construct_equidistant_line_3_object()(p, q, r); } template < class K > inline typename K::Boolean has_smaller_distance_to_point(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.less_distance_to_point_3_object()(p, q, r); } template < class K > inline typename K::Boolean has_larger_distance_to_point(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.compare_distance_3_object()(p, q, r) == LARGER; } template < class K > inline typename K::Boolean has_larger_signed_distance_to_plane(const typename K::Plane_3 &h, const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_signed_distance_to_plane_3_object()(h, q, p); } template < class K > inline typename K::Boolean has_larger_signed_distance_to_plane(const typename K::Point_3 &hp, const typename K::Point_3 &hq, const typename K::Point_3 &hr, const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_signed_distance_to_plane_3_object()(hp, hq, hr, q, p); } template < class K > inline typename K::Boolean has_smaller_signed_distance_to_plane(const typename K::Plane_3 &h, const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_signed_distance_to_plane_3_object()(h, p, q); } template < class K > inline typename K::Boolean has_smaller_signed_distance_to_plane(const typename K::Point_3 &hp, const typename K::Point_3 &hq, const typename K::Point_3 &hr, const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_signed_distance_to_plane_3_object()(hp, hq, hr, p, q); } template < class K > inline typename K::Boolean less_x(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_x_3_object()(p, q); } template < class K > inline typename K::Boolean less_y(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_y_3_object()(p, q); } template < class K > inline typename K::Boolean less_z(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_z_3_object()(p, q); } template < class K > inline typename K::Boolean lexicographically_xyz_smaller(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.less_xyz_3_object()(p, q); } template < class K > inline typename K::Point_3 midpoint(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.construct_midpoint_3_object()(p, q); } template < class K > inline typename K::Point_3 max_vertex(const typename K::Iso_cuboid_3 &ic, const K &k) { return k.construct_max_vertex_3_object()(ic); } template < class K > inline typename K::Point_3 min_vertex(const typename K::Iso_cuboid_3 &ic, const K &k) { return k.construct_min_vertex_3_object()(ic); } template < class K > inline typename K::Vector_3 normal(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.construct_normal_3_object()(p, q, r); } template < class K > inline typename K::Vector_3 unit_normal(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.construct_unit_normal_3_object()(p, q, r); } template inline typename K::Orientation orientation(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K &k) { return k.orientation_3_object()(p, q, r, s); } template inline typename K::Orientation orientation(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const typename K::Vector_3 &w, const K &k) { return k.orientation_3_object()(u, v, w); } template < class K > inline typename K::Vector_3 orthogonal_vector(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.construct_orthogonal_vector_3_object()(p, q, r); } template < class K > inline typename K::Vector_3 orthogonal_vector(const typename K::Plane_3 &p, const K &k) { return k.construct_orthogonal_vector_3_object()(p); } template inline typename K::Boolean parallel(const typename K::Line_3 &l1, const typename K::Line_3 &l2, const K &k) { return k.are_parallel_3_object()(l1, l2); } template inline typename K::Boolean parallel(const typename K::Plane_3 &h1, const typename K::Plane_3 &h2, const K &k) { return k.are_parallel_3_object()(h1, h2); } template inline typename K::Boolean parallel(const typename K::Ray_3 &r1, const typename K::Ray_3 &r2, const K &k) { return k.are_parallel_3_object()(r1, r2); } template inline typename K::Boolean parallel(const typename K::Segment_3 &s1, const typename K::Segment_3 &s2, const K &k) { return k.are_parallel_3_object()(s1, s2); } template inline typename K::Bounded_side side_of_bounded_sphere(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &test, const K &k) { return k.side_of_bounded_sphere_3_object()(p, q, test); } template inline typename K::Bounded_side side_of_bounded_sphere(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &test, const K &k) { return k.side_of_bounded_sphere_3_object()(p, q, r, test); } template inline typename K::Bounded_side side_of_bounded_sphere(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const typename K::Point_3 &test, const K &k) { return k.side_of_bounded_sphere_3_object()(p, q, r, s, test); } template inline typename K::Oriented_side side_of_oriented_sphere(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const typename K::Point_3 &test, const K &k) { return k.side_of_oriented_sphere_3_object()(p, q, r, s, test); } template inline typename K::FT squared_area(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.compute_squared_area_3_object()(p, q, r); } template < class K > inline typename K::FT squared_radius(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K &k) { return k.compute_squared_radius_3_object()(p, q, r, s); } template < class K > inline typename K::FT squared_radius(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k) { return k.compute_squared_radius_3_object()(p, q, r); } template < class K > inline typename K::FT squared_radius(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.compute_squared_radius_3_object()(p, q); } template < class K > inline typename K::FT squared_radius(const typename K::Point_3 &p, const K &k) { return k.compute_squared_radius_3_object()(p); } template < class K > inline typename K::FT volume(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K &k) { return k.compute_volume_3_object()(p, q, r, s); } template < class K > inline typename K::Boolean x_equal(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.equal_x_3_object()(p, q); } template < class K > inline typename K::Boolean y_equal(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.equal_y_3_object()(p, q); } template < class K > inline typename K::Boolean z_equal(const typename K::Point_3 &p, const typename K::Point_3 &q, const K &k) { return k.equal_z_3_object()(p, q); } template inline typename K::Boolean are_negative_oriented(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K &k) { return internal::orientation(p, q, r, s, k) == NEGATIVE; } template inline typename K::Boolean are_positive_oriented(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const typename K::Point_3 &s, const K &k) { return internal::orientation(p, q, r, s, k) == POSITIVE; } template < class K > inline typename K::Boolean lexicographically_xyz_smaller_or_equal(const typename K::Point_3 &p, const typename K::Point_3 &q, const K&k) { return internal::compare_lexicographically_xyz(p, q, k) != LARGER; } } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions_3.h" 2 namespace CGAL { template inline Angle angle(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::angle(p, q, r, K()); } template < typename K > inline typename K::Boolean are_negative_oriented(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) { return internal::are_negative_oriented(p, q, r, s, K()); } template < class K > inline typename K::Boolean are_ordered_along_line(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::are_ordered_along_line(p, q, r, K()); } template < typename K > inline typename K::Boolean are_positive_oriented(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) { return internal::are_positive_oriented(p, q, r, s, K()); } template < class K > inline typename K::Boolean are_strictly_ordered_along_line(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::are_strictly_ordered_along_line(p, q, r, K()); } template < class K > inline typename K::Point_3 barycenter(const Point_3 &p1, const typename K::FT& w1, const Point_3 &p2) { return internal::barycenter(p1, w1, p2, K()); } template < class K > inline typename K::Point_3 barycenter(const Point_3 &p1, const typename K::FT& w1, const Point_3 &p2, const typename K::FT& w2) { return internal::barycenter(p1, w1, p2, w2, K()); } template < class K > inline typename K::Point_3 barycenter(const Point_3 &p1, const typename K::FT& w1, const Point_3 &p2, const typename K::FT& w2, const Point_3 &p3) { return internal::barycenter(p1, w1, p2, w2, p3, K()); } template < class K > inline typename K::Point_3 barycenter(const Point_3 &p1, const typename K::FT& w1, const Point_3 &p2, const typename K::FT& w2, const Point_3 &p3, const typename K::FT& w3) { return internal::barycenter(p1, w1, p2, w2, p3, w3, K()); } template < class K > inline typename K::Point_3 barycenter(const Point_3 &p1, const typename K::FT& w1, const Point_3 &p2, const typename K::FT& w2, const Point_3 &p3, const typename K::FT& w3, const Point_3 &p4) { return internal::barycenter(p1, w1, p2, w2, p3, w3, p4, K()); } template < class K > inline typename K::Point_3 barycenter(const Point_3 &p1, const typename K::FT& w1, const Point_3 &p2, const typename K::FT& w2, const Point_3 &p3, const typename K::FT& w3, const Point_3 &p4, const typename K::FT& w4) { return internal::barycenter(p1, w1, p2, w2, p3, w3, p4, w4, K()); } template inline typename K::Plane_3 bisector(const Point_3 &p, const Point_3 &q) { return internal::bisector(p, q, K()); } template inline typename K::Plane_3 bisector(const Plane_3 &h1, const Plane_3 &h2) { return internal::bisector(h1, h2, K()); } template < class K > inline Point_3 centroid(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) { return internal::centroid(p, q, r, s, K()); } template < class K > inline Point_3 centroid(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::centroid(p, q, r, K()); } template < class K > inline Point_3 centroid(const Tetrahedron_3 &t) { return internal::centroid(t, K()); } template < class K > inline Point_3 centroid(const Triangle_3 &t) { return internal::centroid(t, K()); } template < class K > inline typename K::Point_3 circumcenter(const Point_3 &p, const Point_3 &q) { return internal::circumcenter(p, q, K()); } template < class K > inline typename K::Point_3 circumcenter(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::circumcenter(p, q, r, K()); } template < class K > inline typename K::Point_3 circumcenter(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) { return internal::circumcenter(p, q, r, s, K()); } template < class K > inline typename K::Point_3 circumcenter(const Tetrahedron_3 &t) { return internal::circumcenter(t, K()); } template < class K > inline typename K::Point_3 circumcenter(const Triangle_3 &t) { return internal::circumcenter(t, K()); } template < class K > inline typename K::Boolean collinear(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::collinear(p, q, r, K()); } template < class K > inline typename K::Boolean collinear_are_ordered_along_line(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::collinear_are_ordered_along_line(p, q, r, K()); } template < class K > inline typename K::Boolean collinear_are_strictly_ordered_along_line(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::collinear_are_strictly_ordered_along_line(p, q, r, K()); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const Point_3& a1, const Point_3& b1, const Point_3& c1, const Point_3& d1, const Point_3& a2, const Point_3& b2, const Point_3& c2, const Point_3& d2) { return internal::compare_dihedral_angle(a1, b1, c1, d1, a2, b2, c2, d2, K()); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const Point_3& a1, const Point_3& b1, const Point_3& c1, const Point_3& d1, const typename K::FT& cosine) { return internal::compare_dihedral_angle(a1, b1, c1, d1, cosine, K()); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const Vector_3& ab1, const Vector_3& ac1, const Vector_3& ad1, const Vector_3& ab2, const Vector_3& ac2, const Vector_3& ad2) { return internal::compare_dihedral_angle(ab1, ac1, ad1, ab2, ac2, ad2, K()); } template < class K > inline typename K::Comparison_result compare_dihedral_angle(const Vector_3& ab1, const Vector_3& ac1, const Vector_3& ad1, const typename K::FT& cosine) { return internal::compare_dihedral_angle(ab1, ac1, ad1, cosine, K()); } template < class K > inline typename K::Comparison_result compare_distance_to_point(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::compare_distance_to_point(p, q, r, K()); } template < class K > inline typename K::Comparison_result compare_squared_distance(const Point_3 &p, const Point_3 &q, const typename K::FT &d2) { return internal::compare_squared_distance(p, q, d2, K()); } template < class K > inline typename K::Comparison_result compare_squared_radius(const Point_3 &p, const typename K::FT &sr) { return internal::compare_squared_radius(p, sr, K()); } template < class K > inline typename K::Comparison_result compare_squared_radius(const Point_3 &p, const Point_3 &q, const typename K::FT &sr) { return internal::compare_squared_radius(p, q, sr, K()); } template < class K > inline typename K::Comparison_result compare_squared_radius(const Point_3 &p, const Point_3 &q, const Point_3 &r, const typename K::FT &sr) { return internal::compare_squared_radius(p, q, r, sr, K()); } template < class K > inline typename K::Comparison_result compare_squared_radius(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s, const typename K::FT &sr) { return internal::compare_squared_radius(p, q, r, s, sr, K()); } template < class K > inline typename K::Comparison_result compare_lexicographically_xyz(const Point_3 &p, const Point_3 &q) { return internal::compare_lexicographically_xyz(p, q, K()); } template < class K > inline typename K::Comparison_result compare_lexicographically(const Point_3 &p, const Point_3 &q) { return internal::compare_lexicographically_xyz(p, q, K()); } template < class K > inline typename K::Comparison_result compare_signed_distance_to_plane(const Plane_3 &h, const Point_3 &p, const Point_3 &q) { return internal::compare_signed_distance_to_plane(h, p, q, K()); } template < class K > inline typename K::Comparison_result compare_signed_distance_to_plane(const Point_3 &hp, const Point_3 &hq, const Point_3 &hr, const Point_3 &p, const Point_3 &q) { return internal::compare_signed_distance_to_plane(hp, hq, hr, p, q, K()); } template < class K > inline typename K::Comparison_result compare_x(const Point_3 &p, const Point_3 &q) { return internal::compare_x(p, q, K()); } template < class K > inline typename K::Comparison_result compare_y(const Point_3 &p, const Point_3 &q) { return internal::compare_y(p, q, K()); } template < class K > inline typename K::Comparison_result compare_z(const Point_3 &p, const Point_3 &q) { return internal::compare_z(p, q, K()); } template < class K > inline typename K::Comparison_result compare_xyz(const Point_3 &p, const Point_3 &q) { return internal::compare_xyz(p, q, K()); } template < class K > inline typename K::Boolean coplanar(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) { return internal::coplanar(p, q, r, s, K()); } template < class K > inline typename K::Orientation coplanar_orientation(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) { return internal::coplanar_orientation(p, q, r, s, K()); } template < class K > inline typename K::Orientation coplanar_orientation(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::coplanar_orientation(p, q, r, K()); } template < class K > inline typename K::Bounded_side coplanar_side_of_bounded_circle(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &t) { return internal::coplanar_side_of_bounded_circle(p, q, r, t, K()); } template < class K > inline typename K::Vector_3 cross_product(const Vector_3 &v, const Vector_3 &w) { return internal::cross_product(v, w, K()); } template < class K > inline typename K::FT determinant(const Vector_3 &v0, const Vector_3 &v1, const Vector_3 &v2) { return internal::determinant(v0, v1, v2, K()); } template < class K > inline typename K::Line_3 equidistant_line(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::equidistant_line(p, q, r, K()); } template < class K > inline typename K::Boolean has_larger_distance_to_point(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::has_larger_distance_to_point(p, q, r, K()); } template < class K > inline typename K::Boolean has_larger_signed_distance_to_plane(const Point_3 &hp, const Point_3 &hq, const Point_3 &hr, const Point_3 &p, const Point_3 &q) { return internal::has_larger_signed_distance_to_plane(hp, hq, hr, p, q, K()); } template < class K > inline typename K::Boolean has_larger_signed_distance_to_plane(const Plane_3 &h, const Point_3 &p, const Point_3 &q) { return internal::has_larger_signed_distance_to_plane(h, p, q, K()); } template < class K > inline typename K::Boolean has_smaller_distance_to_point(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::has_smaller_distance_to_point(p, q, r, K()); } template < class K > inline typename K::Boolean has_smaller_signed_distance_to_plane(const Point_3 &hp, const Point_3 &hq, const Point_3 &hr, const Point_3 &p, const Point_3 &q) { return internal::has_smaller_signed_distance_to_plane(hp, hq, hr, p, q, K()); } template < class K > inline typename K::Boolean has_smaller_signed_distance_to_plane(const Plane_3 &h, const Point_3 &p, const Point_3 &q) { return internal::has_smaller_signed_distance_to_plane(h, p, q, K()); } template < class K > inline typename K::Boolean less_x(const Point_3 &p, const Point_3 &q) { return internal::less_x(p, q, K()); } template < class K > inline typename K::Boolean less_y(const Point_3 &p, const Point_3 &q) { return internal::less_y(p, q, K()); } template < class K > inline typename K::Boolean less_z(const Point_3 &p, const Point_3 &q) { return internal::less_z(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_xyz_smaller(const Point_3 &p, const Point_3 &q) { return internal::lexicographically_xyz_smaller(p, q, K()); } template < class K > inline typename K::Boolean lexicographically_xyz_smaller_or_equal(const Point_3 &p, const Point_3 &q) { return internal::lexicographically_xyz_smaller_or_equal(p, q, K()); } template < class K > inline typename K::Point_3 midpoint(const Point_3 &p, const Point_3 &q) { return internal::midpoint(p, q, K()); } template < class K > inline typename K::Point_3 max_vertex(const Iso_cuboid_3 &ic) { return internal::max_vertex(ic, K()); } template < class K > inline typename K::Point_3 min_vertex(const Iso_cuboid_3 &ic) { return internal::min_vertex(ic, K()); } template < class K > inline typename K::Vector_3 normal(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::normal(p, q, r, K()); } template < class K > inline typename K::Boolean operator==(const Point_3& p, const Point_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Point_3& p, const Point_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Point_3& p, const Origin& o) { return K().equal_3_object()(p, Point_3(o)); } template < class K > inline typename K::Boolean operator!=(const Point_3& p, const Origin& o) { return ! (p == o); } template < class K > inline typename K::Boolean operator==(const Iso_cuboid_3& p, const Iso_cuboid_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Iso_cuboid_3& p, const Iso_cuboid_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Plane_3& p, const Plane_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Plane_3& p, const Plane_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Segment_3& p, const Segment_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Segment_3& p, const Segment_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Line_3& p, const Line_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Line_3& p, const Line_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Ray_3& p, const Ray_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Ray_3& p, const Ray_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Triangle_3& p, const Triangle_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Triangle_3& p, const Triangle_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Tetrahedron_3& p, const Tetrahedron_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Tetrahedron_3& p, const Tetrahedron_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Direction_3& p, const Direction_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Direction_3& p, const Direction_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Sphere_3& p, const Sphere_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Sphere_3& p, const Sphere_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Vector_3& p, const Vector_3& q) { return K().equal_3_object()(p, q); } template < class K > inline typename K::Boolean operator!=(const Vector_3& p, const Vector_3& q) { return ! (p == q); } template < class K > inline typename K::Boolean operator==(const Vector_3& p, const Null_vector& o) { return K().equal_3_object()(p, Vector_3(o)); } template < class K > inline typename K::Boolean operator!=(const Vector_3& p, const Null_vector& o) { return ! (p == o); } template < class K > inline typename K::Boolean operator<(const Point_3& p, const Point_3& q) { return K().less_xyz_3_object()(p, q); } template < class K > inline typename K::Boolean operator>(const Point_3& p, const Point_3& q) { return K().less_xyz_3_object()(q, p); } template < class K > inline typename K::Boolean operator<=(const Point_3& p, const Point_3& q) { return ! K().less_xyz_3_object()(q, p); } template < class K > inline typename K::Boolean operator>=(const Point_3& p, const Point_3& q) { return ! K().less_xyz_3_object()(p, q); } template < class K > inline typename K::Vector_3 operator*(const typename K::FT &c, const Vector_3 &w) { return K().construct_scaled_vector_3_object()(w, c); } template < class K > inline typename K::Vector_3 operator*(const Vector_3 &w, const typename K::FT &c) { return K().construct_scaled_vector_3_object()(w, c); } template < class K > inline typename K::Vector_3 operator*(const typename First_if_different::Type &c, const Vector_3 &w) { return K().construct_scaled_vector_3_object()(w, c); } template < class K > inline typename K::Vector_3 operator*(const Vector_3 &w, const typename First_if_different::Type &c) { return K().construct_scaled_vector_3_object()(w, c); } template < class K > inline typename K::FT operator*(const Vector_3 &v, const Vector_3 &w) { return K().compute_scalar_product_3_object()(v, w); } template < class K > inline typename K::Point_3 operator+(const Point_3 &p, const Vector_3 &v) { return K().construct_translated_point_3_object()(p, v); } template < class K > inline typename K::Point_3 operator+(const Origin &o, const Vector_3 &v) { return K().construct_translated_point_3_object()(o, v); } template < class K > inline typename K::Point_3 operator-(const Point_3 &p, const Vector_3 &v) { return K().construct_translated_point_3_object() (p, K().construct_opposite_vector_3_object()(v)); } template < class K > inline typename K::Point_3 operator-(const Origin &o, const Vector_3 &v) { return K().construct_translated_point_3_object() (o, K().construct_opposite_vector_3_object()(v)); } template < class K > inline typename K::Vector_3 operator-(const Point_3 &p, const Point_3 &q) { return K().construct_vector_3_object()(q, p); } template < class K > inline typename K::Vector_3 operator-(const Point_3 &p, const Origin &o) { return K().construct_vector_3_object()(o, p); } template < class K > inline typename K::Vector_3 operator-(const Origin &o, const Point_3 &q) { return K().construct_vector_3_object()(q, o); } template inline typename K::Orientation orientation(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) { return internal::orientation(p, q, r, s, K()); } template inline typename K::Orientation orientation(const Vector_3 &u, const Vector_3 &v, const Vector_3 &w) { return internal::orientation(u, v, w, K()); } template inline typename K::Vector_3 orthogonal_vector(const Point_3& p, const Point_3& q, const Point_3& r) { return internal::orthogonal_vector(p, q, r, K()); } template inline typename K::Vector_3 orthogonal_vector(const Plane_3& p) { return internal::orthogonal_vector(p, K()); } template inline typename K::Plane_3 radical_plane(const Sphere_3 &s1, const Sphere_3 &s2) { return K().construct_radical_plane_3_object()(s1,s2); } template inline typename K::Bounded_side side_of_bounded_sphere(const Point_3 &p, const Point_3 &q, const Point_3 &test) { return internal::side_of_bounded_sphere(p, q, test, K()); } template inline typename K::Bounded_side side_of_bounded_sphere(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &test) { return internal::side_of_bounded_sphere(p, q, r, test, K()); } template inline typename K::Bounded_side side_of_bounded_sphere(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s, const Point_3 &test) { return internal::side_of_bounded_sphere(p, q, r, s, test, K()); } template inline typename K::Oriented_side side_of_oriented_sphere(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s, const Point_3 &test) { return internal::side_of_oriented_sphere(p, q, r, s, test, K()); } template inline typename K::FT squared_area(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::squared_area(p, q, r, K()); } template < class K > inline typename K::FT squared_radius(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) { return internal::squared_radius(p, q, r, s, K()); } template < class K > inline typename K::FT squared_radius(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::squared_radius(p, q, r, K()); } template < class K > inline typename K::FT squared_radius(const Point_3 &p, const Point_3 &q) { return internal::squared_radius(p, q, K()); } template < class K > inline typename K::FT squared_radius(const Point_3 &p) { return internal::squared_radius(p, K()); } template < class K > inline typename K::Vector_3 unit_normal(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::unit_normal(p, q, r, K()); } template < class K > inline typename K::FT volume(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) { return internal::volume(p, q, r, s, K()); } template < class K > inline typename K::Boolean x_equal(const Point_3 &p, const Point_3 &q) { return internal::x_equal(p, q, K()); } template < class K > inline typename K::Boolean y_equal(const Point_3 &p, const Point_3 &q) { return internal::y_equal(p, q, K()); } template < class K > inline typename K::Boolean z_equal(const Point_3 &p, const Point_3 &q) { return internal::z_equal(p, q, K()); } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/global_functions.h" 2 namespace CGAL { template inline Comparison_result compare_distance(const T1 &o1, const T2 &o2, const T3 &o3) { typedef typename Kernel_traits::Kernel K; return internal::compare_distance(o1, o2, o3, K()); } template inline Comparison_result compare_distance(const T1 &o1, const T2 &o2, const T3 &o3, const T4 &o4) { typedef typename Kernel_traits::Kernel K; return internal::compare_distance(o1, o2, o3, o4, K()); } template inline bool parallel(const O &o1, const O &o2) { typedef typename Kernel_traits::Kernel K; return internal::parallel(o1, o2, K()); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Point_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Point_2.h" namespace CGAL { template < class R_ > class PointC2 { typedef PointC2 Self; typedef typename R_::FT FT; typedef typename R_::Vector_2 Vector_2_; typedef typename R_::Point_2 Point_2; Vector_2_ base; public: typedef typename Vector_2_::Cartesian_const_iterator Cartesian_const_iterator; typedef R_ R; PointC2() {} PointC2(const Origin &) : base(NULL_VECTOR) {} PointC2(const FT &x, const FT &y) : base(x, y) {} PointC2(const FT &hx, const FT &hy, const FT &hw) : base(hx, hy, hw) {} const FT& x() const { return base.x(); } const FT& y() const { return base.y(); } const FT& hx() const { return base.hx(); } const FT& hy() const { return base.hy(); } const FT& hw() const { return base.hw(); } Cartesian_const_iterator cartesian_begin() const { return base.cartesian_begin(); } Cartesian_const_iterator cartesian_end() const { return base.cartesian_end(); } typename R_::Boolean operator==(const PointC2 &p) const { return base == p.base; } typename R_::Boolean operator!=(const PointC2 &p) const { return !(*this == p); } }; } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Vector_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Vector_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constant.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constant.h" namespace CGAL { template < typename T, int i > inline const T& constant() { static const T t(i); return t; } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Vector_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/memory.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/memory.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 1 3 # 48 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 3 # 49 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 3 # 69 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_raw_storage_iter.h" 1 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_raw_storage_iter.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template class raw_storage_iterator : public iterator { protected: _OutputIterator _M_iter; public: explicit raw_storage_iterator(_OutputIterator __x) : _M_iter(__x) {} raw_storage_iterator& operator*() { return *this; } raw_storage_iterator& operator=(const _Tp& __element) { std::_Construct(std::__addressof(*_M_iter), __element); return *this; } raw_storage_iterator<_OutputIterator, _Tp>& operator++() { ++_M_iter; return *this; } raw_storage_iterator<_OutputIterator, _Tp> operator++(int) { raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this; ++_M_iter; return __tmp; } }; } # 70 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 1 3 # 33 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 3 # 34 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 3 namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; static const _Lock_policy __default_lock_policy = _S_atomic; # 68 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 3 class __concurrence_lock_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_lock_error"; } }; class __concurrence_unlock_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_unlock_error"; } }; class __concurrence_broadcast_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_broadcast_error"; } }; class __concurrence_wait_error : public std::exception { public: virtual char const* what() const throw() { return "__gnu_cxx::__concurrence_wait_error"; } }; inline void __throw_concurrence_lock_error() { throw __concurrence_lock_error(); } inline void __throw_concurrence_unlock_error() { throw __concurrence_unlock_error(); } inline void __throw_concurrence_broadcast_error() { throw __concurrence_broadcast_error(); } inline void __throw_concurrence_wait_error() { throw __concurrence_wait_error(); } class __mutex { private: __gthread_mutex_t _M_mutex; __mutex(const __mutex&); __mutex& operator=(const __mutex&); public: __mutex() { if (__gthread_active_p()) { __gthread_mutex_t __tmp = { { 0, 0, 0, 0, 0, 0, { 0, 0 } } }; _M_mutex = __tmp; } } # 175 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 3 void lock() { if (__gthread_active_p()) { if (__gthread_mutex_lock(&_M_mutex) != 0) __throw_concurrence_lock_error(); } } void unlock() { if (__gthread_active_p()) { if (__gthread_mutex_unlock(&_M_mutex) != 0) __throw_concurrence_unlock_error(); } } __gthread_mutex_t* gthread_mutex(void) { return &_M_mutex; } }; class __recursive_mutex { private: __gthread_recursive_mutex_t _M_mutex; __recursive_mutex(const __recursive_mutex&); __recursive_mutex& operator=(const __recursive_mutex&); public: __recursive_mutex() { if (__gthread_active_p()) { __gthread_recursive_mutex_t __tmp = { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } }; _M_mutex = __tmp; } } # 233 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 3 void lock() { if (__gthread_active_p()) { if (__gthread_recursive_mutex_lock(&_M_mutex) != 0) __throw_concurrence_lock_error(); } } void unlock() { if (__gthread_active_p()) { if (__gthread_recursive_mutex_unlock(&_M_mutex) != 0) __throw_concurrence_unlock_error(); } } __gthread_recursive_mutex_t* gthread_recursive_mutex(void) { return &_M_mutex; } # 294 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 3 }; class __scoped_lock { public: typedef __mutex __mutex_type; private: __mutex_type& _M_device; __scoped_lock(const __scoped_lock&); __scoped_lock& operator=(const __scoped_lock&); public: explicit __scoped_lock(__mutex_type& __name) : _M_device(__name) { _M_device.lock(); } ~__scoped_lock() throw() { _M_device.unlock(); } }; class __cond { private: __gthread_cond_t _M_cond; __cond(const __cond&); __cond& operator=(const __cond&); public: __cond() { if (__gthread_active_p()) { __gthread_cond_t __tmp = { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }; _M_cond = __tmp; } } # 351 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/ext/concurrence.h" 3 void broadcast() { if (__gthread_active_p()) { if (__gthread_cond_broadcast(&_M_cond) != 0) __throw_concurrence_broadcast_error(); } } void wait(__mutex *mutex) { { if (__gthread_cond_wait(&_M_cond, mutex->gthread_mutex()) != 0) __throw_concurrence_wait_error(); } } void wait_recursive(__recursive_mutex *mutex) { { if (__gthread_cond_wait_recursive(&_M_cond, mutex->gthread_recursive_mutex()) != 0) __throw_concurrence_wait_error(); } } }; } # 77 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 1 3 # 36 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 template struct auto_ptr_ref { _Tp1* _M_ptr; explicit auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } } __attribute__ ((__deprecated__)); # 86 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 template class auto_ptr { private: _Tp* _M_ptr; public: typedef _Tp element_type; explicit auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } # 112 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } # 124 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 template auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } # 135 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 auto_ptr& operator=(auto_ptr& __a) throw() { reset(__a.release()); return *this; } # 152 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 template auto_ptr& operator=(auto_ptr<_Tp1>& __a) throw() { reset(__a.release()); return *this; } # 170 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 ~auto_ptr() { delete _M_ptr; } # 180 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 element_type& operator*() const throw() { ; return *_M_ptr; } element_type* operator->() const throw() { ; return _M_ptr; } # 210 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 element_type* get() const throw() { return _M_ptr; } # 224 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 element_type* release() throw() { element_type* __tmp = _M_ptr; _M_ptr = 0; return __tmp; } # 239 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 void reset(element_type* __p = 0) throw() { if (__p != _M_ptr) { delete _M_ptr; _M_ptr = __p; } } # 260 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward/auto_ptr.h" 3 auto_ptr(auto_ptr_ref __ref) throw() : _M_ptr(__ref._M_ptr) { } auto_ptr& operator=(auto_ptr_ref __ref) throw() { if (__ref._M_ptr != this->get()) { delete _M_ptr; _M_ptr = __ref._M_ptr; } return *this; } template operator auto_ptr_ref<_Tp1>() throw() { return auto_ptr_ref<_Tp1>(this->release()); } template operator auto_ptr<_Tp1>() throw() { return auto_ptr<_Tp1>(this->release()); } } __attribute__ ((__deprecated__)); template<> class auto_ptr { public: typedef void element_type; } __attribute__ ((__deprecated__)); } # 85 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/unique_ptr.h" 1 3 # 39 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/unique_ptr.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template struct default_delete { constexpr default_delete() noexcept = default; template::value>::type> default_delete(const default_delete<_Up>&) noexcept { } void operator()(_Tp* __ptr) const { static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete __ptr; } }; template struct default_delete<_Tp[]> { constexpr default_delete() noexcept = default; void operator()(_Tp* __ptr) const { static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete [] __ptr; } template void operator()(_Up*) const = delete; }; template > class unique_ptr { class _Pointer { template static typename _Up::pointer __test(typename _Up::pointer*); template static _Tp* __test(...); typedef typename remove_reference<_Dp>::type _Del; public: typedef decltype( __test<_Del>(0)) type; }; typedef std::tuple __tuple_type; __tuple_type _M_t; public: typedef typename _Pointer::type pointer; typedef _Tp element_type; typedef _Dp deleter_type; constexpr unique_ptr() noexcept : _M_t() { static_assert(!std::is_pointer::value, "constructed with null function pointer deleter"); } explicit unique_ptr(pointer __p) noexcept : _M_t(__p, deleter_type()) { static_assert(!std::is_pointer::value, "constructed with null function pointer deleter"); } unique_ptr(pointer __p, typename std::conditional::value, deleter_type, const deleter_type&>::type __d) noexcept : _M_t(__p, __d) { } unique_ptr(pointer __p, typename std::remove_reference::type&& __d) noexcept : _M_t(std::move(__p), std::move(__d)) { static_assert(!std::is_reference::value, "rvalue deleter bound to reference"); } constexpr unique_ptr(nullptr_t) noexcept : _M_t() { static_assert(!std::is_pointer::value, "constructed with null function pointer deleter"); } unique_ptr(unique_ptr&& __u) noexcept : _M_t(__u.release(), std::forward(__u.get_deleter())) { } template::pointer, pointer>::value && !std::is_array<_Up>::value && ((std::is_reference<_Dp>::value && std::is_same<_Ep, _Dp>::value) || (!std::is_reference<_Dp>::value && std::is_convertible<_Ep, _Dp>::value))> ::type> unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) { } template::value && std::is_same<_Dp, default_delete<_Tp>>::value>::type> unique_ptr(auto_ptr<_Up>&& __u) noexcept : _M_t(__u.release(), deleter_type()) { } ~unique_ptr() noexcept { reset(); } unique_ptr& operator=(unique_ptr&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward(__u.get_deleter()); return *this; } template::pointer, pointer>::value && !std::is_array<_Up>::value>::type> unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward<_Ep>(__u.get_deleter()); return *this; } unique_ptr& operator=(nullptr_t) noexcept { reset(); return *this; } typename std::add_lvalue_reference::type operator*() const { ; return *get(); } pointer operator->() const noexcept { ; return get(); } pointer get() const noexcept { return std::get<0>(_M_t); } deleter_type& get_deleter() noexcept { return std::get<1>(_M_t); } const deleter_type& get_deleter() const noexcept { return std::get<1>(_M_t); } explicit operator bool() const noexcept { return get() == pointer() ? false : true; } pointer release() noexcept { pointer __p = get(); std::get<0>(_M_t) = pointer(); return __p; } void reset(pointer __p = pointer()) noexcept { using std::swap; swap(std::get<0>(_M_t), __p); if (__p != pointer()) get_deleter()(__p); } void swap(unique_ptr& __u) noexcept { using std::swap; swap(_M_t, __u._M_t); } unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; }; template class unique_ptr<_Tp[], _Dp> { typedef std::tuple<_Tp*, _Dp> __tuple_type; __tuple_type _M_t; public: typedef _Tp* pointer; typedef _Tp element_type; typedef _Dp deleter_type; constexpr unique_ptr() noexcept : _M_t() { static_assert(!std::is_pointer::value, "constructed with null function pointer deleter"); } explicit unique_ptr(pointer __p) noexcept : _M_t(__p, deleter_type()) { static_assert(!std::is_pointer::value, "constructed with null function pointer deleter"); } unique_ptr(pointer __p, typename std::conditional::value, deleter_type, const deleter_type&>::type __d) noexcept : _M_t(__p, __d) { } unique_ptr(pointer __p, typename std::remove_reference::type && __d) noexcept : _M_t(std::move(__p), std::move(__d)) { static_assert(!std::is_reference::value, "rvalue deleter bound to reference"); } constexpr unique_ptr(nullptr_t) noexcept : _M_t() { static_assert(!std::is_pointer::value, "constructed with null function pointer deleter"); } unique_ptr(unique_ptr&& __u) noexcept : _M_t(__u.release(), std::forward(__u.get_deleter())) { } template unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept : _M_t(__u.release(), std::forward<_Ep>(__u.get_deleter())) { } ~unique_ptr() { reset(); } unique_ptr& operator=(unique_ptr&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward(__u.get_deleter()); return *this; } template unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) noexcept { reset(__u.release()); get_deleter() = std::forward<_Ep>(__u.get_deleter()); return *this; } unique_ptr& operator=(nullptr_t) noexcept { reset(); return *this; } typename std::add_lvalue_reference::type operator[](size_t __i) const { ; return get()[__i]; } pointer get() const noexcept { return std::get<0>(_M_t); } deleter_type& get_deleter() noexcept { return std::get<1>(_M_t); } const deleter_type& get_deleter() const noexcept { return std::get<1>(_M_t); } explicit operator bool() const noexcept { return get() == pointer() ? false : true; } pointer release() noexcept { pointer __p = get(); std::get<0>(_M_t) = pointer(); return __p; } void reset(pointer __p = pointer()) noexcept { using std::swap; swap(std::get<0>(_M_t), __p); if (__p != nullptr) get_deleter()(__p); } void reset(nullptr_t) noexcept { pointer __p = get(); std::get<0>(_M_t) = pointer(); if (__p != nullptr) get_deleter()(__p); } template void reset(_Up) = delete; void swap(unique_ptr& __u) noexcept { using std::swap; swap(_M_t, __u._M_t); } unique_ptr(const unique_ptr&) = delete; unique_ptr& operator=(const unique_ptr&) = delete; template unique_ptr(_Up*, typename std::conditional::value, deleter_type, const deleter_type&>::type, typename std::enable_if::value>::type* = 0) = delete; template unique_ptr(_Up*, typename std::remove_reference::type&&, typename std::enable_if::value>::type* = 0) = delete; template explicit unique_ptr(_Up*, typename std::enable_if::value>::type* = 0) = delete; }; template inline void swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) noexcept { __x.swap(__y); } template inline bool operator==(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return __x.get() == __y.get(); } template inline bool operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept { return !__x; } template inline bool operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept { return !__x; } template inline bool operator!=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return __x.get() != __y.get(); } template inline bool operator!=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept { return (bool)__x; } template inline bool operator!=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept { return (bool)__x; } template inline bool operator<(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { typedef typename std::common_type::pointer, typename unique_ptr<_Up, _Ep>::pointer>::type _CT; return std::less<_CT>()(__x.get(), __y.get()); } template inline bool operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return std::less::pointer>()(__x.get(), nullptr); } template inline bool operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return std::less::pointer>()(nullptr, __x.get()); } template inline bool operator<=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return !(__y < __x); } template inline bool operator<=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return !(nullptr < __x); } template inline bool operator<=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return !(__x < nullptr); } template inline bool operator>(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return (__y < __x); } template inline bool operator>(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return std::less::pointer>()(nullptr, __x.get()); } template inline bool operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return std::less::pointer>()(__x.get(), nullptr); } template inline bool operator>=(const unique_ptr<_Tp, _Dp>& __x, const unique_ptr<_Up, _Ep>& __y) { return !(__x < __y); } template inline bool operator>=(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) { return !(__x < nullptr); } template inline bool operator>=(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) { return !(nullptr < __x); } template struct hash> : public __hash_base> { size_t operator()(const unique_ptr<_Tp, _Dp>& __u) const { typedef unique_ptr<_Tp, _Dp> _UP; return std::hash()(__u.get()); } }; } # 87 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 1 3 # 52 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr_base.h" 1 3 # 52 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr_base.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { class bad_weak_ptr : public std::exception { public: virtual char const* what() const noexcept; virtual ~bad_weak_ptr() throw(); }; inline void __throw_bad_weak_ptr() { throw bad_weak_ptr(); } using __gnu_cxx::_Lock_policy; using __gnu_cxx::__default_lock_policy; using __gnu_cxx::_S_single; using __gnu_cxx::_S_mutex; using __gnu_cxx::_S_atomic; template<_Lock_policy _Lp> class _Mutex_base { protected: enum { _S_need_barriers = 0 }; }; template<> class _Mutex_base<_S_mutex> : public __gnu_cxx::__mutex { protected: enum { _S_need_barriers = 1 }; }; template<_Lock_policy _Lp = __default_lock_policy> class _Sp_counted_base : public _Mutex_base<_Lp> { public: _Sp_counted_base() noexcept : _M_use_count(1), _M_weak_count(1) { } virtual ~_Sp_counted_base() noexcept { } virtual void _M_dispose() noexcept = 0; virtual void _M_destroy() noexcept { delete this; } virtual void* _M_get_deleter(const std::type_info&) = 0; void _M_add_ref_copy() { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } void _M_add_ref_lock(); void _M_release() noexcept { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, -1) == 1) { ; _M_dispose(); if (_Mutex_base<_Lp>::_S_need_barriers) { __asm __volatile ("":::"memory"); __asm __volatile ("":::"memory"); } ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) { ; _M_destroy(); } } } void _M_weak_add_ref() noexcept { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } void _M_weak_release() noexcept { ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, -1) == 1) { ; if (_Mutex_base<_Lp>::_S_need_barriers) { __asm __volatile ("":::"memory"); __asm __volatile ("":::"memory"); } _M_destroy(); } } long _M_get_use_count() const noexcept { return const_cast(_M_use_count); } private: _Sp_counted_base(_Sp_counted_base const&) = delete; _Sp_counted_base& operator=(_Sp_counted_base const&) = delete; _Atomic_word _M_use_count; _Atomic_word _M_weak_count; }; template<> inline void _Sp_counted_base<_S_single>:: _M_add_ref_lock() { if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) { _M_use_count = 0; __throw_bad_weak_ptr(); } } template<> inline void _Sp_counted_base<_S_mutex>:: _M_add_ref_lock() { __gnu_cxx::__scoped_lock sentry(*this); if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) == 0) { _M_use_count = 0; __throw_bad_weak_ptr(); } } template<> inline void _Sp_counted_base<_S_atomic>:: _M_add_ref_lock() { _Atomic_word __count; do { __count = _M_use_count; if (__count == 0) __throw_bad_weak_ptr(); } while (!__sync_bool_compare_and_swap(&_M_use_count, __count, __count + 1)); } template class __shared_ptr; template class __weak_ptr; template class __enable_shared_from_this; template class shared_ptr; template class weak_ptr; template struct owner_less; template class enable_shared_from_this; template<_Lock_policy _Lp = __default_lock_policy> class __weak_count; template<_Lock_policy _Lp = __default_lock_policy> class __shared_count; template class _Sp_counted_ptr final : public _Sp_counted_base<_Lp> { public: explicit _Sp_counted_ptr(_Ptr __p) : _M_ptr(__p) { } virtual void _M_dispose() noexcept { delete _M_ptr; } virtual void _M_destroy() noexcept { delete this; } virtual void* _M_get_deleter(const std::type_info&) { return 0; } _Sp_counted_ptr(const _Sp_counted_ptr&) = delete; _Sp_counted_ptr& operator=(const _Sp_counted_ptr&) = delete; protected: _Ptr _M_ptr; }; template<> inline void _Sp_counted_ptr::_M_dispose() noexcept { } template<> inline void _Sp_counted_ptr::_M_dispose() noexcept { } template<> inline void _Sp_counted_ptr::_M_dispose() noexcept { } template class _Sp_counted_deleter final : public _Sp_counted_base<_Lp> { struct _My_Deleter : public _Alloc { _Deleter _M_del; _My_Deleter(_Deleter __d, const _Alloc& __a) : _Alloc(__a), _M_del(__d) { } }; public: _Sp_counted_deleter(_Ptr __p, _Deleter __d) : _M_ptr(__p), _M_del(__d, _Alloc()) { } _Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) : _M_ptr(__p), _M_del(__d, __a) { } virtual void _M_dispose() noexcept { _M_del._M_del(_M_ptr); } virtual void _M_destroy() noexcept { typedef typename allocator_traits<_Alloc>::template rebind_traits<_Sp_counted_deleter> _Alloc_traits; typename _Alloc_traits::allocator_type __a(_M_del); _Alloc_traits::destroy(__a, this); _Alloc_traits::deallocate(__a, this, 1); } virtual void* _M_get_deleter(const std::type_info& __ti) { return __ti == typeid(_Deleter) ? &_M_del._M_del : 0; } protected: _Ptr _M_ptr; _My_Deleter _M_del; }; struct _Sp_make_shared_tag { }; template class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp> { struct _Impl : public _Alloc { _Impl(_Alloc __a) : _Alloc(__a), _M_ptr() { } _Tp* _M_ptr; }; public: template _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) : _M_impl(__a), _M_storage() { _M_impl._M_ptr = static_cast<_Tp*>(static_cast(&_M_storage)); allocator_traits<_Alloc>::construct(__a, _M_impl._M_ptr, std::forward<_Args>(__args)...); } virtual void _M_dispose() noexcept { allocator_traits<_Alloc>::destroy(_M_impl, _M_impl._M_ptr); } virtual void _M_destroy() noexcept { typedef typename allocator_traits<_Alloc>::template rebind_traits<_Sp_counted_ptr_inplace> _Alloc_traits; typename _Alloc_traits::allocator_type __a(_M_impl); _Alloc_traits::destroy(__a, this); _Alloc_traits::deallocate(__a, this, 1); } virtual void* _M_get_deleter(const std::type_info& __ti) noexcept { return __ti == typeid(_Sp_make_shared_tag) ? static_cast(&_M_storage) : 0; } private: _Impl _M_impl; typename aligned_storage::value>::type _M_storage; }; template<_Lock_policy _Lp> class __shared_count { public: constexpr __shared_count() noexcept : _M_pi(0) { } template explicit __shared_count(_Ptr __p) : _M_pi(0) { try { _M_pi = new _Sp_counted_ptr<_Ptr, _Lp>(__p); } catch(...) { delete __p; throw; } } template __shared_count(_Ptr __p, _Deleter __d) : _M_pi(0) { typedef std::allocator _Alloc; typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; typedef typename allocator_traits<_Alloc>::template rebind_traits<_Sp_cd_type> _Alloc_traits; typename _Alloc_traits::allocator_type __a; _Sp_cd_type* __mem = 0; try { __mem = _Alloc_traits::allocate(__a, 1); _Alloc_traits::construct(__a, __mem, __p, std::move(__d)); _M_pi = __mem; } catch(...) { __d(__p); if (__mem) _Alloc_traits::deallocate(__a, __mem, 1); throw; } } template __shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0) { typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type; typedef typename allocator_traits<_Alloc>::template rebind_traits<_Sp_cd_type> _Alloc_traits; typename _Alloc_traits::allocator_type __a2(__a); _Sp_cd_type* __mem = 0; try { __mem = _Alloc_traits::allocate(__a2, 1); _Alloc_traits::construct(__a2, __mem, __p, std::move(__d), std::move(__a)); _M_pi = __mem; } catch(...) { __d(__p); if (__mem) _Alloc_traits::deallocate(__a2, __mem, 1); throw; } } template __shared_count(_Sp_make_shared_tag, _Tp*, const _Alloc& __a, _Args&&... __args) : _M_pi(0) { typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type; typedef typename allocator_traits<_Alloc>::template rebind_traits<_Sp_cp_type> _Alloc_traits; typename _Alloc_traits::allocator_type __a2(__a); _Sp_cp_type* __mem = _Alloc_traits::allocate(__a2, 1); try { _Alloc_traits::construct(__a2, __mem, std::move(__a), std::forward<_Args>(__args)...); _M_pi = __mem; } catch(...) { _Alloc_traits::deallocate(__a2, __mem, 1); throw; } } template explicit __shared_count(std::auto_ptr<_Tp>&& __r) : _M_pi(new _Sp_counted_ptr<_Tp*, _Lp>(__r.get())) { __r.release(); } template explicit __shared_count(std::unique_ptr<_Tp, _Del>&& __r) : _M_pi(_S_create_from_up(std::move(__r))) { __r.release(); } explicit __shared_count(const __weak_count<_Lp>& __r); ~__shared_count() noexcept { if (_M_pi != 0) _M_pi->_M_release(); } __shared_count(const __shared_count& __r) noexcept : _M_pi(__r._M_pi) { if (_M_pi != 0) _M_pi->_M_add_ref_copy(); } __shared_count& operator=(const __shared_count& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; if (__tmp != _M_pi) { if (__tmp != 0) __tmp->_M_add_ref_copy(); if (_M_pi != 0) _M_pi->_M_release(); _M_pi = __tmp; } return *this; } void _M_swap(__shared_count& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; __r._M_pi = _M_pi; _M_pi = __tmp; } long _M_get_use_count() const noexcept { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; } bool _M_unique() const noexcept { return this->_M_get_use_count() == 1; } void* _M_get_deleter(const std::type_info& __ti) const noexcept { return _M_pi ? _M_pi->_M_get_deleter(__ti) : 0; } bool _M_less(const __shared_count& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } bool _M_less(const __weak_count<_Lp>& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } friend inline bool operator==(const __shared_count& __a, const __shared_count& __b) noexcept { return __a._M_pi == __b._M_pi; } private: friend class __weak_count<_Lp>; template static _Sp_counted_base<_Lp>* _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r, typename std::enable_if::value>::type* = 0) { return new _Sp_counted_deleter<_Tp*, _Del, std::allocator<_Tp>, _Lp>(__r.get(), __r.get_deleter()); } template static _Sp_counted_base<_Lp>* _S_create_from_up(std::unique_ptr<_Tp, _Del>&& __r, typename std::enable_if::value>::type* = 0) { typedef typename std::remove_reference<_Del>::type _Del1; typedef std::reference_wrapper<_Del1> _Del2; return new _Sp_counted_deleter<_Tp*, _Del2, std::allocator<_Tp>, _Lp>(__r.get(), std::ref(__r.get_deleter())); } _Sp_counted_base<_Lp>* _M_pi; }; template<_Lock_policy _Lp> class __weak_count { public: constexpr __weak_count() noexcept : _M_pi(0) { } __weak_count(const __shared_count<_Lp>& __r) noexcept : _M_pi(__r._M_pi) { if (_M_pi != 0) _M_pi->_M_weak_add_ref(); } __weak_count(const __weak_count<_Lp>& __r) noexcept : _M_pi(__r._M_pi) { if (_M_pi != 0) _M_pi->_M_weak_add_ref(); } ~__weak_count() noexcept { if (_M_pi != 0) _M_pi->_M_weak_release(); } __weak_count<_Lp>& operator=(const __shared_count<_Lp>& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; if (__tmp != 0) __tmp->_M_weak_add_ref(); if (_M_pi != 0) _M_pi->_M_weak_release(); _M_pi = __tmp; return *this; } __weak_count<_Lp>& operator=(const __weak_count<_Lp>& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; if (__tmp != 0) __tmp->_M_weak_add_ref(); if (_M_pi != 0) _M_pi->_M_weak_release(); _M_pi = __tmp; return *this; } void _M_swap(__weak_count<_Lp>& __r) noexcept { _Sp_counted_base<_Lp>* __tmp = __r._M_pi; __r._M_pi = _M_pi; _M_pi = __tmp; } long _M_get_use_count() const noexcept { return _M_pi != 0 ? _M_pi->_M_get_use_count() : 0; } bool _M_less(const __weak_count& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } bool _M_less(const __shared_count<_Lp>& __rhs) const noexcept { return std::less<_Sp_counted_base<_Lp>*>()(this->_M_pi, __rhs._M_pi); } friend inline bool operator==(const __weak_count& __a, const __weak_count& __b) noexcept { return __a._M_pi == __b._M_pi; } private: friend class __shared_count<_Lp>; _Sp_counted_base<_Lp>* _M_pi; }; template<_Lock_policy _Lp> inline __shared_count<_Lp>:: __shared_count(const __weak_count<_Lp>& __r) : _M_pi(__r._M_pi) { if (_M_pi != 0) _M_pi->_M_add_ref_lock(); else __throw_bad_weak_ptr(); } template<_Lock_policy _Lp, typename _Tp1, typename _Tp2> void __enable_shared_from_this_helper(const __shared_count<_Lp>&, const __enable_shared_from_this<_Tp1, _Lp>*, const _Tp2*) noexcept; template void __enable_shared_from_this_helper(const __shared_count<>&, const enable_shared_from_this<_Tp1>*, const _Tp2*) noexcept; template<_Lock_policy _Lp> inline void __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...) noexcept { } template class __shared_ptr { public: typedef _Tp element_type; constexpr __shared_ptr() noexcept : _M_ptr(0), _M_refcount() { } template explicit __shared_ptr(_Tp1* __p) : _M_ptr(__p), _M_refcount(__p) { static_assert( sizeof(_Tp1) > 0, "incomplete type" ); __enable_shared_from_this_helper(_M_refcount, __p, __p); } template __shared_ptr(_Tp1* __p, _Deleter __d) : _M_ptr(__p), _M_refcount(__p, __d) { __enable_shared_from_this_helper(_M_refcount, __p, __p); } template __shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a) : _M_ptr(__p), _M_refcount(__p, __d, std::move(__a)) { __enable_shared_from_this_helper(_M_refcount, __p, __p); } template __shared_ptr(nullptr_t __p, _Deleter __d) : _M_ptr(0), _M_refcount(__p, __d) { } template __shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) : _M_ptr(0), _M_refcount(__p, __d, std::move(__a)) { } template __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r, _Tp* __p) noexcept : _M_ptr(__p), _M_refcount(__r._M_refcount) { } __shared_ptr(const __shared_ptr&) noexcept = default; __shared_ptr& operator=(const __shared_ptr&) noexcept = default; ~__shared_ptr() = default; template::value>::type> __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) { } __shared_ptr(__shared_ptr&& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount() { _M_refcount._M_swap(__r._M_refcount); __r._M_ptr = 0; } template::value>::type> __shared_ptr(__shared_ptr<_Tp1, _Lp>&& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount() { _M_refcount._M_swap(__r._M_refcount); __r._M_ptr = 0; } template explicit __shared_ptr(const __weak_ptr<_Tp1, _Lp>& __r) : _M_refcount(__r._M_refcount) { _M_ptr = __r._M_ptr; } template __shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r) : _M_ptr(__r.get()), _M_refcount() { _Tp1* __tmp = __r.get(); _M_refcount = __shared_count<_Lp>(std::move(__r)); __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp); } template __shared_ptr(std::auto_ptr<_Tp1>&& __r) : _M_ptr(__r.get()), _M_refcount() { static_assert( sizeof(_Tp1) > 0, "incomplete type" ); _Tp1* __tmp = __r.get(); _M_refcount = __shared_count<_Lp>(std::move(__r)); __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp); } constexpr __shared_ptr(nullptr_t) noexcept : _M_ptr(0), _M_refcount() { } template __shared_ptr& operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { _M_ptr = __r._M_ptr; _M_refcount = __r._M_refcount; return *this; } template __shared_ptr& operator=(std::auto_ptr<_Tp1>&& __r) { __shared_ptr(std::move(__r)).swap(*this); return *this; } __shared_ptr& operator=(__shared_ptr&& __r) noexcept { __shared_ptr(std::move(__r)).swap(*this); return *this; } template __shared_ptr& operator=(__shared_ptr<_Tp1, _Lp>&& __r) noexcept { __shared_ptr(std::move(__r)).swap(*this); return *this; } template __shared_ptr& operator=(std::unique_ptr<_Tp1, _Del>&& __r) { __shared_ptr(std::move(__r)).swap(*this); return *this; } void reset() noexcept { __shared_ptr().swap(*this); } template void reset(_Tp1* __p) { ; __shared_ptr(__p).swap(*this); } template void reset(_Tp1* __p, _Deleter __d) { __shared_ptr(__p, __d).swap(*this); } template void reset(_Tp1* __p, _Deleter __d, _Alloc __a) { __shared_ptr(__p, __d, std::move(__a)).swap(*this); } typename std::add_lvalue_reference<_Tp>::type operator*() const noexcept { ; return *_M_ptr; } _Tp* operator->() const noexcept { ; return _M_ptr; } _Tp* get() const noexcept { return _M_ptr; } explicit operator bool() const { return _M_ptr == 0 ? false : true; } bool unique() const noexcept { return _M_refcount._M_unique(); } long use_count() const noexcept { return _M_refcount._M_get_use_count(); } void swap(__shared_ptr<_Tp, _Lp>& __other) noexcept { std::swap(_M_ptr, __other._M_ptr); _M_refcount._M_swap(__other._M_refcount); } template bool owner_before(__shared_ptr<_Tp1, _Lp> const& __rhs) const { return _M_refcount._M_less(__rhs._M_refcount); } template bool owner_before(__weak_ptr<_Tp1, _Lp> const& __rhs) const { return _M_refcount._M_less(__rhs._M_refcount); } protected: template __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, _Args&&... __args) : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a, std::forward<_Args>(__args)...) { void* __p = _M_refcount._M_get_deleter(typeid(__tag)); _M_ptr = static_cast<_Tp*>(__p); __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr); } # 1041 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr_base.h" 3 template friend __shared_ptr<_Tp1, _Lp1> __allocate_shared(const _Alloc& __a, _Args&&... __args); private: void* _M_get_deleter(const std::type_info& __ti) const noexcept { return _M_refcount._M_get_deleter(__ti); } template friend class __shared_ptr; template friend class __weak_ptr; template friend _Del* get_deleter(const __shared_ptr<_Tp1, _Lp1>&) noexcept; _Tp* _M_ptr; __shared_count<_Lp> _M_refcount; }; template inline bool operator==(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return __a.get() == __b.get(); } template inline bool operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return !__a; } template inline bool operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return !__a; } template inline bool operator!=(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return __a.get() != __b.get(); } template inline bool operator!=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return (bool)__a; } template inline bool operator!=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return (bool)__a; } template inline bool operator<(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { typedef typename std::common_type<_Tp1*, _Tp2*>::type _CT; return std::less<_CT>()(__a.get(), __b.get()); } template inline bool operator<(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return std::less<_Tp*>()(__a.get(), nullptr); } template inline bool operator<(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return std::less<_Tp*>()(nullptr, __a.get()); } template inline bool operator<=(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return !(__b < __a); } template inline bool operator<=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return !(nullptr < __a); } template inline bool operator<=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return !(__a < nullptr); } template inline bool operator>(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return (__b < __a); } template inline bool operator>(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return std::less<_Tp*>()(nullptr, __a.get()); } template inline bool operator>(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return std::less<_Tp*>()(__a.get(), nullptr); } template inline bool operator>=(const __shared_ptr<_Tp1, _Lp>& __a, const __shared_ptr<_Tp2, _Lp>& __b) noexcept { return !(__a < __b); } template inline bool operator>=(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t) noexcept { return !(__a < nullptr); } template inline bool operator>=(nullptr_t, const __shared_ptr<_Tp, _Lp>& __a) noexcept { return !(nullptr < __a); } template struct _Sp_less : public binary_function<_Sp, _Sp, bool> { bool operator()(const _Sp& __lhs, const _Sp& __rhs) const noexcept { typedef typename _Sp::element_type element_type; return std::less()(__lhs.get(), __rhs.get()); } }; template struct less<__shared_ptr<_Tp, _Lp>> : public _Sp_less<__shared_ptr<_Tp, _Lp>> { }; template inline void swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept { __a.swap(__b); } # 1191 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr_base.h" 3 template inline __shared_ptr<_Tp, _Lp> static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { return __shared_ptr<_Tp, _Lp>(__r, static_cast<_Tp*>(__r.get())); } template inline __shared_ptr<_Tp, _Lp> const_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { return __shared_ptr<_Tp, _Lp>(__r, const_cast<_Tp*>(__r.get())); } template inline __shared_ptr<_Tp, _Lp> dynamic_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { if (_Tp* __p = dynamic_cast<_Tp*>(__r.get())) return __shared_ptr<_Tp, _Lp>(__r, __p); return __shared_ptr<_Tp, _Lp>(); } template class __weak_ptr { public: typedef _Tp element_type; constexpr __weak_ptr() noexcept : _M_ptr(0), _M_refcount() { } __weak_ptr(const __weak_ptr&) noexcept = default; __weak_ptr& operator=(const __weak_ptr&) noexcept = default; ~__weak_ptr() = default; # 1249 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr_base.h" 3 template::value>::type> __weak_ptr(const __weak_ptr<_Tp1, _Lp>& __r) noexcept : _M_refcount(__r._M_refcount) { _M_ptr = __r.lock().get(); } template::value>::type> __weak_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount) { } template __weak_ptr& operator=(const __weak_ptr<_Tp1, _Lp>& __r) noexcept { _M_ptr = __r.lock().get(); _M_refcount = __r._M_refcount; return *this; } template __weak_ptr& operator=(const __shared_ptr<_Tp1, _Lp>& __r) noexcept { _M_ptr = __r._M_ptr; _M_refcount = __r._M_refcount; return *this; } __shared_ptr<_Tp, _Lp> lock() const noexcept { if (expired()) return __shared_ptr(); try { return __shared_ptr(*this); } catch(const bad_weak_ptr&) { return __shared_ptr(); } } long use_count() const noexcept { return _M_refcount._M_get_use_count(); } bool expired() const noexcept { return _M_refcount._M_get_use_count() == 0; } template bool owner_before(const __shared_ptr<_Tp1, _Lp>& __rhs) const { return _M_refcount._M_less(__rhs._M_refcount); } template bool owner_before(const __weak_ptr<_Tp1, _Lp>& __rhs) const { return _M_refcount._M_less(__rhs._M_refcount); } void reset() noexcept { __weak_ptr().swap(*this); } void swap(__weak_ptr& __s) noexcept { std::swap(_M_ptr, __s._M_ptr); _M_refcount._M_swap(__s._M_refcount); } private: void _M_assign(_Tp* __ptr, const __shared_count<_Lp>& __refcount) noexcept { _M_ptr = __ptr; _M_refcount = __refcount; } template friend class __shared_ptr; template friend class __weak_ptr; friend class __enable_shared_from_this<_Tp, _Lp>; friend class enable_shared_from_this<_Tp>; _Tp* _M_ptr; __weak_count<_Lp> _M_refcount; }; template inline void swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept { __a.swap(__b); } template struct _Sp_owner_less : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __lhs, const _Tp& __rhs) const { return __lhs.owner_before(__rhs); } bool operator()(const _Tp& __lhs, const _Tp1& __rhs) const { return __lhs.owner_before(__rhs); } bool operator()(const _Tp1& __lhs, const _Tp& __rhs) const { return __lhs.owner_before(__rhs); } }; template struct owner_less<__shared_ptr<_Tp, _Lp>> : public _Sp_owner_less<__shared_ptr<_Tp, _Lp>, __weak_ptr<_Tp, _Lp>> { }; template struct owner_less<__weak_ptr<_Tp, _Lp>> : public _Sp_owner_less<__weak_ptr<_Tp, _Lp>, __shared_ptr<_Tp, _Lp>> { }; template class __enable_shared_from_this { protected: constexpr __enable_shared_from_this() noexcept { } __enable_shared_from_this(const __enable_shared_from_this&) noexcept { } __enable_shared_from_this& operator=(const __enable_shared_from_this&) noexcept { return *this; } ~__enable_shared_from_this() { } public: __shared_ptr<_Tp, _Lp> shared_from_this() { return __shared_ptr<_Tp, _Lp>(this->_M_weak_this); } __shared_ptr shared_from_this() const { return __shared_ptr(this->_M_weak_this); } private: template void _M_weak_assign(_Tp1* __p, const __shared_count<_Lp>& __n) const noexcept { _M_weak_this._M_assign(__p, __n); } template friend void __enable_shared_from_this_helper(const __shared_count<_Lp>& __pn, const __enable_shared_from_this* __pe, const _Tp1* __px) noexcept { if (__pe != 0) __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn); } mutable __weak_ptr<_Tp, _Lp> _M_weak_this; }; template inline __shared_ptr<_Tp, _Lp> __allocate_shared(const _Alloc& __a, _Args&&... __args) { return __shared_ptr<_Tp, _Lp>(_Sp_make_shared_tag(), __a, std::forward<_Args>(__args)...); } template inline __shared_ptr<_Tp, _Lp> __make_shared(_Args&&... __args) { typedef typename std::remove_const<_Tp>::type _Tp_nc; return std::__allocate_shared<_Tp, _Lp>(std::allocator<_Tp_nc>(), std::forward<_Args>(__args)...); } template struct hash<__shared_ptr<_Tp, _Lp>> : public __hash_base> { size_t operator()(const __shared_ptr<_Tp, _Lp>& __s) const { return std::hash<_Tp*>()(__s.get()); } }; } # 53 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 2 3 namespace std __attribute__ ((__visibility__ ("default"))) { template inline std::basic_ostream<_Ch, _Tr>& operator<<(std::basic_ostream<_Ch, _Tr>& __os, const __shared_ptr<_Tp, _Lp>& __p) { __os << __p.get(); return __os; } template inline _Del* get_deleter(const __shared_ptr<_Tp, _Lp>& __p) noexcept { return static_cast<_Del*>(__p._M_get_deleter(typeid(_Del))); } # 92 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template class shared_ptr : public __shared_ptr<_Tp> { public: constexpr shared_ptr() noexcept : __shared_ptr<_Tp>() { } template explicit shared_ptr(_Tp1* __p) : __shared_ptr<_Tp>(__p) { } # 126 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template shared_ptr(_Tp1* __p, _Deleter __d) : __shared_ptr<_Tp>(__p, __d) { } # 143 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template shared_ptr(nullptr_t __p, _Deleter __d) : __shared_ptr<_Tp>(__p, __d) { } # 162 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a) : __shared_ptr<_Tp>(__p, __d, std::move(__a)) { } # 181 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a) : __shared_ptr<_Tp>(__p, __d, std::move(__a)) { } # 203 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template shared_ptr(const shared_ptr<_Tp1>& __r, _Tp* __p) noexcept : __shared_ptr<_Tp>(__r, __p) { } # 214 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 shared_ptr(const shared_ptr&) noexcept = default; template::value>::type> shared_ptr(const shared_ptr<_Tp1>& __r) noexcept : __shared_ptr<_Tp>(__r) { } shared_ptr(shared_ptr&& __r) noexcept : __shared_ptr<_Tp>(std::move(__r)) { } template::value>::type> shared_ptr(shared_ptr<_Tp1>&& __r) noexcept : __shared_ptr<_Tp>(std::move(__r)) { } # 246 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template explicit shared_ptr(const weak_ptr<_Tp1>& __r) : __shared_ptr<_Tp>(__r) { } template shared_ptr(std::auto_ptr<_Tp1>&& __r) : __shared_ptr<_Tp>(std::move(__r)) { } template shared_ptr(std::unique_ptr<_Tp1, _Del>&& __r) : __shared_ptr<_Tp>(std::move(__r)) { } constexpr shared_ptr(nullptr_t __p) noexcept : __shared_ptr<_Tp>(__p) { } shared_ptr& operator=(const shared_ptr&) noexcept = default; template shared_ptr& operator=(const shared_ptr<_Tp1>& __r) noexcept { this->__shared_ptr<_Tp>::operator=(__r); return *this; } template shared_ptr& operator=(std::auto_ptr<_Tp1>&& __r) { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } shared_ptr& operator=(shared_ptr&& __r) noexcept { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } template shared_ptr& operator=(shared_ptr<_Tp1>&& __r) noexcept { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } template shared_ptr& operator=(std::unique_ptr<_Tp1, _Del>&& __r) { this->__shared_ptr<_Tp>::operator=(std::move(__r)); return *this; } private: template shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a, _Args&&... __args) : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...) { } template friend shared_ptr<_Tp1> allocate_shared(const _Alloc& __a, _Args&&... __args); }; template inline bool operator==(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b) noexcept { return __a.get() == __b.get(); } template inline bool operator==(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return !__a; } template inline bool operator==(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !__a; } template inline bool operator!=(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b) noexcept { return __a.get() != __b.get(); } template inline bool operator!=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return (bool)__a; } template inline bool operator!=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return (bool)__a; } template inline bool operator<(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b) noexcept { typedef typename std::common_type<_Tp1*, _Tp2*>::type _CT; return std::less<_CT>()(__a.get(), __b.get()); } template inline bool operator<(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return std::less<_Tp*>()(__a.get(), nullptr); } template inline bool operator<(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return std::less<_Tp*>()(nullptr, __a.get()); } template inline bool operator<=(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b) noexcept { return !(__b < __a); } template inline bool operator<=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return !(nullptr < __a); } template inline bool operator<=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !(__a < nullptr); } template inline bool operator>(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b) noexcept { return (__b < __a); } template inline bool operator>(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return std::less<_Tp*>()(nullptr, __a.get()); } template inline bool operator>(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return std::less<_Tp*>()(__a.get(), nullptr); } template inline bool operator>=(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b) noexcept { return !(__a < __b); } template inline bool operator>=(const shared_ptr<_Tp>& __a, nullptr_t) noexcept { return !(__a < nullptr); } template inline bool operator>=(nullptr_t, const shared_ptr<_Tp>& __a) noexcept { return !(nullptr < __a); } template struct less> : public _Sp_less> { }; template inline void swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept { __a.swap(__b); } template inline shared_ptr<_Tp> static_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept { return shared_ptr<_Tp>(__r, static_cast<_Tp*>(__r.get())); } template inline shared_ptr<_Tp> const_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept { return shared_ptr<_Tp>(__r, const_cast<_Tp*>(__r.get())); } template inline shared_ptr<_Tp> dynamic_pointer_cast(const shared_ptr<_Tp1>& __r) noexcept { if (_Tp* __p = dynamic_cast<_Tp*>(__r.get())) return shared_ptr<_Tp>(__r, __p); return shared_ptr<_Tp>(); } template class weak_ptr : public __weak_ptr<_Tp> { public: constexpr weak_ptr() noexcept : __weak_ptr<_Tp>() { } template::value>::type> weak_ptr(const weak_ptr<_Tp1>& __r) noexcept : __weak_ptr<_Tp>(__r) { } template::value>::type> weak_ptr(const shared_ptr<_Tp1>& __r) noexcept : __weak_ptr<_Tp>(__r) { } template weak_ptr& operator=(const weak_ptr<_Tp1>& __r) noexcept { this->__weak_ptr<_Tp>::operator=(__r); return *this; } template weak_ptr& operator=(const shared_ptr<_Tp1>& __r) noexcept { this->__weak_ptr<_Tp>::operator=(__r); return *this; } shared_ptr<_Tp> lock() const noexcept { if (this->expired()) return shared_ptr<_Tp>(); try { return shared_ptr<_Tp>(*this); } catch(const bad_weak_ptr&) { return shared_ptr<_Tp>(); } } }; template inline void swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept { __a.swap(__b); } template struct owner_less; template struct owner_less> : public _Sp_owner_less, weak_ptr<_Tp>> { }; template struct owner_less> : public _Sp_owner_less, shared_ptr<_Tp>> { }; template class enable_shared_from_this { protected: constexpr enable_shared_from_this() noexcept { } enable_shared_from_this(const enable_shared_from_this&) noexcept { } enable_shared_from_this& operator=(const enable_shared_from_this&) noexcept { return *this; } ~enable_shared_from_this() { } public: shared_ptr<_Tp> shared_from_this() { return shared_ptr<_Tp>(this->_M_weak_this); } shared_ptr shared_from_this() const { return shared_ptr(this->_M_weak_this); } private: template void _M_weak_assign(_Tp1* __p, const __shared_count<>& __n) const noexcept { _M_weak_this._M_assign(__p, __n); } template friend void __enable_shared_from_this_helper(const __shared_count<>& __pn, const enable_shared_from_this* __pe, const _Tp1* __px) noexcept { if (__pe != 0) __pe->_M_weak_assign(const_cast<_Tp1*>(__px), __pn); } mutable weak_ptr<_Tp> _M_weak_this; }; # 592 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template inline shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&&... __args) { return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a, std::forward<_Args>(__args)...); } # 607 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/shared_ptr.h" 3 template inline shared_ptr<_Tp> make_shared(_Args&&... __args) { typedef typename std::remove_const<_Tp>::type _Tp_nc; return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(), std::forward<_Args>(__args)...); } template struct hash> : public __hash_base> { size_t operator()(const shared_ptr<_Tp>& __s) const { return std::hash<_Tp*>()(__s.get()); } }; } # 88 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/memory" 2 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/memory.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for.h" 2 namespace CGAL { template > class Handle_for { struct RefCounted { T t; unsigned int count; }; typedef typename Alloc::template rebind::other Allocator; typedef typename Allocator::pointer pointer; static Allocator allocator; pointer ptr_; public: typedef T element_type; typedef std::ptrdiff_t Id_type ; Handle_for() : ptr_(allocator.allocate(1)) { new (&(ptr_->t)) element_type(); ptr_->count = 1; } Handle_for(const element_type& t) : ptr_(allocator.allocate(1)) { new (&(ptr_->t)) element_type(t); ptr_->count = 1; } Handle_for(element_type && t) : ptr_(allocator.allocate(1)) { new (&(ptr_->t)) element_type(std::move(t)); ptr_->count = 1; } # 95 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for.h" template < typename T1, typename T2, typename... Args > Handle_for(T1 && t1, T2 && t2, Args && ... args) : ptr_(allocator.allocate(1)) { new (&(ptr_->t)) element_type(std::forward(t1), std::forward(t2), std::forward(args)...); ptr_->count = 1; } # 128 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for.h" Handle_for(const Handle_for& h) : ptr_(h.ptr_) { ++(ptr_->count); } Handle_for& operator=(const Handle_for& h) { Handle_for tmp = h; swap(tmp); return *this; } Handle_for& operator=(const element_type &t) { if (is_shared()) *this = Handle_for(t); else ptr_->t = t; return *this; } Handle_for& operator=(Handle_for && h) { swap(h); return *this; } Handle_for& operator=(element_type && t) { if (is_shared()) *this = Handle_for(std::move(t)); else ptr_->t = std::move(t); return *this; } ~Handle_for() { if (--(ptr_->count) == 0) { allocator.destroy( ptr_); allocator.deallocate( ptr_, 1); } } void initialize_with(const element_type& t) { *this = t; } Id_type id() const { return Ptr() - static_cast(0); } bool identical(const Handle_for& h) const { return Ptr() == h.Ptr(); } const element_type * Ptr() const { return &(ptr_->t); } # 214 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle_for.h" bool is_shared() const { return ptr_->count > 1; } bool unique() const { return !is_shared(); } long use_count() const { return ptr_->count; } void swap(Handle_for& h) { std::swap(ptr_, h.ptr_); } protected: void copy_on_write() { if ( is_shared() ) Handle_for(ptr_->t).swap(*this); } element_type * ptr() { return &(ptr_->t); } const element_type * ptr() const { return &(ptr_->t); } }; template typename Handle_for::Allocator Handle_for::allocator; template inline void swap(Handle_for &h1, Handle_for &h2) { h1.swap(h2); } template inline bool identical(const Handle_for &h1, const Handle_for &h2) { return h1.identical(h2); } template inline bool identical(const T &t1, const T &t2) { return &t1 == &t2; } template inline const T& get(const Handle_for &h) { return *(h.Ptr()); } template inline const T& get(const T &t) { return t; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Vector_2.h" 2 namespace CGAL { template < class R_ > class VectorC2 { typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Segment_2 Segment_2; typedef typename R_::Ray_2 Ray_2; typedef typename R_::Line_2 Line_2; typedef typename R_::Direction_2 Direction_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef typename Rep::const_iterator Cartesian_const_iterator; typedef R_ R; VectorC2() {} VectorC2(const FT &x, const FT &y) : base(CGAL::make_array(x, y)) {} VectorC2(const FT &hx, const FT &hy, const FT &hw) : base( hw != FT(1) ? CGAL::make_array(hx/hw, hy/hw) : CGAL::make_array(hx, hy) ) {} const FT & x() const { return CGAL::get(base)[0]; } const FT & y() const { return CGAL::get(base)[1]; } const FT & hx() const { return x(); } const FT & hy() const { return y(); } const FT& hw() const { return constant(); } Cartesian_const_iterator cartesian_begin() const { return CGAL::get(base).begin(); } Cartesian_const_iterator cartesian_end() const { return CGAL::get(base).end(); } }; template < class R > inline bool operator==(const VectorC2 &v, const VectorC2 &w) { return w.x() == v.x() && w.y() == v.y(); } template < class R > inline bool operator!=(const VectorC2 &v, const VectorC2 &w) { return !(v == w); } template < class R > inline bool operator==(const VectorC2 &v, const Null_vector &) { return ::CGAL:: is_zero(v.x()) && ::CGAL:: is_zero(v.y()); } template < class R > inline bool operator==(const Null_vector &n, const VectorC2 &v) { return v == n; } template < class R > inline bool operator!=(const VectorC2 &v, const Null_vector &n) { return !(v == n); } template < class R > inline bool operator!=(const Null_vector &n, const VectorC2 &v) { return !(v == n); } } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Direction_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Direction_2.h" namespace CGAL { template < class R_ > class DirectionC2 { typedef DirectionC2 Self; typedef typename R_::FT FT; typedef FT RT; typedef typename R_::Point_2 Point_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Line_2 Line_2; typedef typename R_::Ray_2 Ray_2; typedef typename R_::Segment_2 Segment_2; typedef typename R_::Direction_2 Direction_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; DirectionC2() {} DirectionC2(const FT &x, const FT &y) : base(CGAL::make_array(x, y)) {} bool operator==(const DirectionC2 &d) const; bool operator!=(const DirectionC2 &d) const; Vector_2 to_vector() const; const RT & dx() const { return get(base)[0]; } const RT & dy() const { return get(base)[1]; } }; template < class R > inline bool DirectionC2::operator==(const DirectionC2 &d) const { if (CGAL::identical(base, d.base)) return true; return equal_direction(*this, d); } template < class R > inline bool DirectionC2::operator!=(const DirectionC2 &d) const { return !( *this == d ); } template < class R > inline typename DirectionC2::Vector_2 DirectionC2::to_vector() const { return Vector_2(dx(), dy()); } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Line_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Line_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/algorithm.h" 1 # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/algorithm.h" namespace CGAL { namespace cpp0x { using std::next; using std::prev; # 57 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/algorithm.h" } # 66 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/algorithm.h" template __attribute__((__deprecated__)) OutputIterator copy_n( InputIterator first, Size n, OutputIterator result ) { while( n--) { *result = *first; first++; result++; } return result; } # 94 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/algorithm.h" namespace cpp0x { using std::copy_n; } template inline bool are_sorted(const T & a, const T & b, const T & c) { return a <= b && b <= c; } template inline bool are_sorted(const T & a, const T & b, const T & c, Compare cmp) { return !cmp(b, a) && !cmp(c, b); } template inline bool are_strictly_sorted(const T & a, const T & b, const T & c) { return a < b && b < c; } template inline bool are_strictly_sorted(const T & a, const T & b, const T & c, Compare cmp) { return cmp(a, b) && cmp(b, c); } template inline bool are_ordered(const T & a, const T & b, const T & c) { const T& min = (CGAL::min)(a, c); const T& max = (CGAL::max)(a, c); return min <= b && b <= max; } template inline bool are_ordered(const T & a, const T & b, const T & c, Compare cmp) { const T& min = (std::min)(a, c, cmp); const T& max = (std::max)(a, c, cmp); return !cmp(b, min) && !cmp(max, b); } template inline bool are_strictly_ordered(const T & a, const T & b, const T & c) { const T& min = (CGAL::min)(a, c); const T& max = (CGAL::max)(a, c); return min < b && b < max; } template inline bool are_strictly_ordered(const T & a, const T & b, const T & c, Compare cmp) { const T& min = (std::min)(a, c, cmp); const T& max = (std::max)(a, c, cmp); return cmp(min, b) && cmp(b, max); } template inline __attribute__((__deprecated__)) ForwardIterator successor( ForwardIterator it ) { return ++it; } template inline __attribute__((__deprecated__)) BidirectionalIterator predecessor( BidirectionalIterator it ) { return --it; } template < class ForwardIterator > std::pair< ForwardIterator, ForwardIterator > min_max_element(ForwardIterator first, ForwardIterator last) { typedef std::pair< ForwardIterator, ForwardIterator > FP; FP result(first, first); if (first != last) while (++first != last) { if (*first < *result.first) result.first = first; if (*result.second < *first) result.second = first; } return result; } template < class ForwardIterator, class CompareMin, class CompareMax > std::pair< ForwardIterator, ForwardIterator > min_max_element(ForwardIterator first, ForwardIterator last, CompareMin comp_min, CompareMax comp_max) { typedef std::pair< ForwardIterator, ForwardIterator > FP; FP result(first, first); if (first != last) while (++first != last) { if (comp_min(*first, *result.first)) result.first = first; if (comp_max(*result.second, *first)) result.second = first; } return result; } template < class ForwardIterator, class Predicate > ForwardIterator min_element_if(ForwardIterator first, ForwardIterator last, Predicate pred) { ForwardIterator result = first = std::find_if(first, last, pred); if (first != last) while (++first != last) if (*first < *result && pred(*first)) result = first; return result; } template < class ForwardIterator, class Compare, class Predicate > ForwardIterator min_element_if(ForwardIterator first, ForwardIterator last, Compare comp, Predicate pred) { ForwardIterator result = first = std::find_if(first, last, pred); if (first != last) while (++first != last) if (comp(*first, *result) && pred(*first)) result = first; return result; } template < class ForwardIterator, class Predicate > ForwardIterator max_element_if(ForwardIterator first, ForwardIterator last, Predicate pred) { ForwardIterator result = first = std::find_if(first, last, pred); if (first != last) while (++first != last) if (*result < *first && pred(*first)) result = first; return result; } template < class ForwardIterator, class Compare, class Predicate > ForwardIterator max_element_if(ForwardIterator first, ForwardIterator last, Compare comp, Predicate pred) { ForwardIterator result = first = std::find_if(first, last, pred); if (first != last) while (++first != last) if (comp(*result, *first) && pred(*first)) result = first; return result; } # 312 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/algorithm.h" template CGAL::Comparison_result lexicographical_compare_three_valued( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, BinaryFunction cmp) { while ( first1 != last1 && first2 != last2) { CGAL::Comparison_result result = cmp( *first1, *first2); if ( result != CGAL::EQUAL) return result; ++first1; ++first2; } if ( first1 != last1) return CGAL::LARGER; if ( first2 != last2) return CGAL::SMALLER; return CGAL::EQUAL; } # 346 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/algorithm.h" template std::ostream& output_range(std::ostream& os, InputIterator first, InputIterator beyond, const char* sep = ", ", const char* pre = "", const char* post = "") { InputIterator it = first; if (it != beyond) { os << pre << oformat(*it) << post; while (++it != beyond) os << sep << pre << oformat(*it) << post; } return os; } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/sign_of_determinant.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/sign_of_determinant.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/determinant.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/determinant.h" namespace CGAL { template inline RT determinant( const RT& a00, const RT& a01, const RT& a10, const RT& a11) { const RT m01 = a00*a11 - a10*a01; return m01; } template RT determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a10, const RT& a11, const RT& a12, const RT& a20, const RT& a21, const RT& a22) { const RT m01 = a00*a11 - a10*a01; const RT m02 = a00*a21 - a20*a01; const RT m12 = a10*a21 - a20*a11; const RT m012 = m01*a22 - m02*a12 + m12*a02; return m012; } template RT determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a30, const RT& a31, const RT& a32, const RT& a33) { const RT m01 = a10*a01 - a00*a11; const RT m02 = a20*a01 - a00*a21; const RT m03 = a30*a01 - a00*a31; const RT m12 = a20*a11 - a10*a21; const RT m13 = a30*a11 - a10*a31; const RT m23 = a30*a21 - a20*a31; const RT m012 = m12*a02 - m02*a12 + m01*a22; const RT m013 = m13*a02 - m03*a12 + m01*a32; const RT m023 = m23*a02 - m03*a22 + m02*a32; const RT m123 = m23*a12 - m13*a22 + m12*a32; const RT m0123 = m123*a03 - m023*a13 + m013*a23 - m012*a33; return m0123; } template RT determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24, const RT& a30, const RT& a31, const RT& a32, const RT& a33, const RT& a34, const RT& a40, const RT& a41, const RT& a42, const RT& a43, const RT& a44) { const RT m01 = a10*a01 - a00*a11; const RT m02 = a20*a01 - a00*a21; const RT m03 = a30*a01 - a00*a31; const RT m04 = a40*a01 - a00*a41; const RT m12 = a20*a11 - a10*a21; const RT m13 = a30*a11 - a10*a31; const RT m14 = a40*a11 - a10*a41; const RT m23 = a30*a21 - a20*a31; const RT m24 = a40*a21 - a20*a41; const RT m34 = a40*a31 - a30*a41; const RT m012 = m12*a02 - m02*a12 + m01*a22; const RT m013 = m13*a02 - m03*a12 + m01*a32; const RT m014 = m14*a02 - m04*a12 + m01*a42; const RT m023 = m23*a02 - m03*a22 + m02*a32; const RT m024 = m24*a02 - m04*a22 + m02*a42; const RT m034 = m34*a02 - m04*a32 + m03*a42; const RT m123 = m23*a12 - m13*a22 + m12*a32; const RT m124 = m24*a12 - m14*a22 + m12*a42; const RT m134 = m34*a12 - m14*a32 + m13*a42; const RT m234 = m34*a22 - m24*a32 + m23*a42; const RT m0123 = m123*a03 - m023*a13 + m013*a23 - m012*a33; const RT m0124 = m124*a03 - m024*a13 + m014*a23 - m012*a43; const RT m0134 = m134*a03 - m034*a13 + m014*a33 - m013*a43; const RT m0234 = m234*a03 - m034*a23 + m024*a33 - m023*a43; const RT m1234 = m234*a13 - m134*a23 + m124*a33 - m123*a43; const RT m01234 = m1234*a04 - m0234*a14 + m0134*a24 - m0124*a34 + m0123*a44; return m01234; } template RT determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, const RT& a05, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14, const RT& a15, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24, const RT& a25, const RT& a30, const RT& a31, const RT& a32, const RT& a33, const RT& a34, const RT& a35, const RT& a40, const RT& a41, const RT& a42, const RT& a43, const RT& a44, const RT& a45, const RT& a50, const RT& a51, const RT& a52, const RT& a53, const RT& a54, const RT& a55) { const RT m01 = a00*a11 - a10*a01; const RT m02 = a00*a21 - a20*a01; const RT m03 = a00*a31 - a30*a01; const RT m04 = a00*a41 - a40*a01; const RT m05 = a00*a51 - a50*a01; const RT m12 = a10*a21 - a20*a11; const RT m13 = a10*a31 - a30*a11; const RT m14 = a10*a41 - a40*a11; const RT m15 = a10*a51 - a50*a11; const RT m23 = a20*a31 - a30*a21; const RT m24 = a20*a41 - a40*a21; const RT m25 = a20*a51 - a50*a21; const RT m34 = a30*a41 - a40*a31; const RT m35 = a30*a51 - a50*a31; const RT m45 = a40*a51 - a50*a41; const RT m012 = m01*a22 - m02*a12 + m12*a02; const RT m013 = m01*a32 - m03*a12 + m13*a02; const RT m014 = m01*a42 - m04*a12 + m14*a02; const RT m015 = m01*a52 - m05*a12 + m15*a02; const RT m023 = m02*a32 - m03*a22 + m23*a02; const RT m024 = m02*a42 - m04*a22 + m24*a02; const RT m025 = m02*a52 - m05*a22 + m25*a02; const RT m034 = m03*a42 - m04*a32 + m34*a02; const RT m035 = m03*a52 - m05*a32 + m35*a02; const RT m045 = m04*a52 - m05*a42 + m45*a02; const RT m123 = m12*a32 - m13*a22 + m23*a12; const RT m124 = m12*a42 - m14*a22 + m24*a12; const RT m125 = m12*a52 - m15*a22 + m25*a12; const RT m134 = m13*a42 - m14*a32 + m34*a12; const RT m135 = m13*a52 - m15*a32 + m35*a12; const RT m145 = m14*a52 - m15*a42 + m45*a12; const RT m234 = m23*a42 - m24*a32 + m34*a22; const RT m235 = m23*a52 - m25*a32 + m35*a22; const RT m245 = m24*a52 - m25*a42 + m45*a22; const RT m345 = m34*a52 - m35*a42 + m45*a32; const RT m0123 = m012*a33 - m013*a23 + m023*a13 - m123*a03; const RT m0124 = m012*a43 - m014*a23 + m024*a13 - m124*a03; const RT m0125 = m012*a53 - m015*a23 + m025*a13 - m125*a03; const RT m0134 = m013*a43 - m014*a33 + m034*a13 - m134*a03; const RT m0135 = m013*a53 - m015*a33 + m035*a13 - m135*a03; const RT m0145 = m014*a53 - m015*a43 + m045*a13 - m145*a03; const RT m0234 = m023*a43 - m024*a33 + m034*a23 - m234*a03; const RT m0235 = m023*a53 - m025*a33 + m035*a23 - m235*a03; const RT m0245 = m024*a53 - m025*a43 + m045*a23 - m245*a03; const RT m0345 = m034*a53 - m035*a43 + m045*a33 - m345*a03; const RT m1234 = m123*a43 - m124*a33 + m134*a23 - m234*a13; const RT m1235 = m123*a53 - m125*a33 + m135*a23 - m235*a13; const RT m1245 = m124*a53 - m125*a43 + m145*a23 - m245*a13; const RT m1345 = m134*a53 - m135*a43 + m145*a33 - m345*a13; const RT m2345 = m234*a53 - m235*a43 + m245*a33 - m345*a23; const RT m01234 = m0123*a44 - m0124*a34 + m0134*a24 - m0234*a14 + m1234*a04; const RT m01235 = m0123*a54 - m0125*a34 + m0135*a24 - m0235*a14 + m1235*a04; const RT m01245 = m0124*a54 - m0125*a44 + m0145*a24 - m0245*a14 + m1245*a04; const RT m01345 = m0134*a54 - m0135*a44 + m0145*a34 - m0345*a14 + m1345*a04; const RT m02345 = m0234*a54 - m0235*a44 + m0245*a34 - m0345*a24 + m2345*a04; const RT m12345 = m1234*a54 - m1235*a44 + m1245*a34 - m1345*a24 + m2345*a14; const RT m012345 = m01234*a55 - m01235*a45 + m01245*a35 - m01345*a25 + m02345*a15 - m12345*a05; return m012345; } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/sign_of_determinant.h" 2 namespace CGAL { template inline typename Sgn::result_type sign_of_determinant( const RT& a00, const RT& a01, const RT& a10, const RT& a11) { return enum_cast(::CGAL:: compare( a00*a11, a10*a01)); } template inline typename Sgn::result_type sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a10, const RT& a11, const RT& a12, const RT& a20, const RT& a21, const RT& a22) { return ::CGAL:: sign(determinant(a00, a01, a02, a10, a11, a12, a20, a21, a22)); } template inline typename Sgn::result_type sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a30, const RT& a31, const RT& a32, const RT& a33) { return ::CGAL:: sign(determinant(a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23, a30, a31, a32, a33)); } template typename Sgn::result_type sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24, const RT& a30, const RT& a31, const RT& a32, const RT& a33, const RT& a34, const RT& a40, const RT& a41, const RT& a42, const RT& a43, const RT& a44) { return ::CGAL:: sign(determinant(a00, a01, a02, a03, a04, a10, a11, a12, a13, a14, a20, a21, a22, a23, a24, a30, a31, a32, a33, a34, a40, a41, a42, a43, a44)); } template typename Sgn::result_type sign_of_determinant( const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04, const RT& a05, const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14, const RT& a15, const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24, const RT& a25, const RT& a30, const RT& a31, const RT& a32, const RT& a33, const RT& a34, const RT& a35, const RT& a40, const RT& a41, const RT& a42, const RT& a43, const RT& a44, const RT& a45, const RT& a50, const RT& a51, const RT& a52, const RT& a53, const RT& a54, const RT& a55) { return ::CGAL:: sign(determinant(a00, a01, a02, a03, a04, a05, a10, a11, a12, a13, a14, a15, a20, a21, a22, a23, a24, a25, a30, a31, a32, a33, a34, a35, a40, a41, a42, a43, a44, a45, a50, a51, a52, a53, a54, a55)); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC2.h" namespace CGAL { template < class FT > inline void midpointC2( const FT &px, const FT &py, const FT &qx, const FT &qy, FT &x, FT &y ) { x = (px+qx) / 2; y = (py+qy) / 2; } template < class FT > void circumcenter_translateC2(const FT &dqx, const FT &dqy, const FT &drx, const FT &dry, FT &dcx, FT &dcy) { FT r2 = ::CGAL:: square(drx) + ::CGAL:: square(dry); FT q2 = ::CGAL:: square(dqx) + ::CGAL:: square(dqy); FT den = 2 * determinant(dqx, dqy, drx, dry); (CGAL::possibly(! ::CGAL:: is_zero(den))?(static_cast(0)): ::CGAL::assertion_fail( "! CGAL_NTS is_zero(den)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC2.h", 61)); dcx = determinant (dry, dqy, r2, q2) / den; dcy = - determinant (drx, dqx, r2, q2) / den; } template < class FT > void circumcenterC2( const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, FT &x, FT &y ) { circumcenter_translateC2(qx-px, qy-py, rx-px, ry-py, x, y); x += px; y += py; } template < class FT > void barycenterC2(const FT &p1x, const FT &p1y, const FT &w1, const FT &p2x, const FT &p2y, FT &x, FT &y) { FT w2 = 1 - w1; x = w1 * p1x + w2 * p2x; y = w1 * p1y + w2 * p2y; } template < class FT > void barycenterC2(const FT &p1x, const FT &p1y, const FT &w1, const FT &p2x, const FT &p2y, const FT &w2, FT &x, FT &y) { FT sum = w1 + w2; (CGAL::possibly(sum != 0)?(static_cast(0)): ::CGAL::assertion_fail( "sum != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC2.h", 100)); x = (w1 * p1x + w2 * p2x) / sum; y = (w1 * p1y + w2 * p2y) / sum; } template < class FT > void barycenterC2(const FT &p1x, const FT &p1y, const FT &w1, const FT &p2x, const FT &p2y, const FT &w2, const FT &p3x, const FT &p3y, FT &x, FT &y) { FT w3 = 1 - w1 - w2; x = w1 * p1x + w2 * p2x + w3 * p3x; y = w1 * p1y + w2 * p2y + w3 * p3y; } template < class FT > void barycenterC2(const FT &p1x, const FT &p1y, const FT &w1, const FT &p2x, const FT &p2y, const FT &w2, const FT &p3x, const FT &p3y, const FT &w3, FT &x, FT &y) { FT sum = w1 + w2 + w3; (CGAL::possibly(sum != 0)?(static_cast(0)): ::CGAL::assertion_fail( "sum != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC2.h", 125)); x = (w1 * p1x + w2 * p2x + w3 * p3x) / sum; y = (w1 * p1y + w2 * p2y + w3 * p3y) / sum; } template < class FT > void barycenterC2(const FT &p1x, const FT &p1y, const FT &w1, const FT &p2x, const FT &p2y, const FT &w2, const FT &p3x, const FT &p3y, const FT &w3, const FT &p4x, const FT &p4y, FT &x, FT &y) { FT w4 = 1 - w1 - w2 - w3; x = w1 * p1x + w2 * p2x + w3 * p3x + w4 * p4x; y = w1 * p1y + w2 * p2y + w3 * p3y + w4 * p4y; } template < class FT > void barycenterC2(const FT &p1x, const FT &p1y, const FT &w1, const FT &p2x, const FT &p2y, const FT &w2, const FT &p3x, const FT &p3y, const FT &w3, const FT &p4x, const FT &p4y, const FT &w4, FT &x, FT &y) { FT sum = w1 + w2 + w3 + w4; (CGAL::possibly(sum != 0)?(static_cast(0)): ::CGAL::assertion_fail( "sum != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC2.h", 152)); x = (w1 * p1x + w2 * p2x + w3 * p3x + w4 * p4x) / sum; y = (w1 * p1y + w2 * p2y + w3 * p3y + w4 * p4y) / sum; } template < class FT > void centroidC2( const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, FT &x, FT &y) { x = (px + qx + rx) / 3; y = (py + qy + ry) / 3; } template < class FT > void centroidC2( const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, const FT &sx, const FT &sy, FT &x, FT &y) { x = (px + qx + rx + sx) / 4; y = (py + qy + ry + sy) / 4; } template < class FT > inline void line_from_pointsC2(const FT &px, const FT &py, const FT &qx, const FT &qy, FT &a, FT &b, FT &c) { if(py == qy){ a = 0 ; if(qx > px){ b = 1; c = -py; } else if(qx == px){ b = 0; c = 0; }else{ b = -1; c = py; } } else if(qx == px){ b = 0; if(qy > py){ a = -1; c = px; } else if (qy == py){ a = 0; c = 0; } else { a = 1; c = -px; } } else { a = py - qy; b = qx - px; c = -px*a - py*b; } } template < class FT > inline void line_from_point_directionC2(const FT &px, const FT &py, const FT &dx, const FT &dy, FT &a, FT &b, FT &c) { a = - dy; b = dx; c = px*dy - py*dx; } template < class FT > inline void bisector_of_pointsC2(const FT &px, const FT &py, const FT &qx, const FT &qy, FT &a, FT &b, FT& c ) { a = 2 * (px - qx); b = 2 * (py - qy); c = ::CGAL:: square(qx) + ::CGAL:: square(qy) - ::CGAL:: square(px) - ::CGAL:: square(py); } template < class FT > inline void bisector_of_linesC2(const FT &pa, const FT &pb, const FT &pc, const FT &qa, const FT &qb, const FT &qc, FT &a, FT &b, FT &c) { FT n1 = ::CGAL:: sqrt(::CGAL:: square(pa) + ::CGAL:: square(pb)); FT n2 = ::CGAL:: sqrt(::CGAL:: square(qa) + ::CGAL:: square(qb)); a = n2 * pa + n1 * qa; b = n2 * pb + n1 * qb; c = n2 * pc + n1 * qc; if (a == 0 && b == 0) { a = n2 * pa - n1 * qa; b = n2 * pb - n1 * qb; c = n2 * pc - n1 * qc; } } template < class FT > inline FT line_y_at_xC2(const FT &a, const FT &b, const FT &c, const FT &x) { return (-a*x-c) / b; } template < class FT > inline void line_get_pointC2(const FT &a, const FT &b, const FT &c, int i, FT &x, FT &y) { if (::CGAL:: is_zero(b)) { x = (-b-c)/a + i * b; y = 1 - i * a; } else { x = 1 + i * b; y = -(a+c)/b - i * a; } } template < class FT > inline void perpendicular_through_pointC2(const FT &la, const FT &lb, const FT &px, const FT &py, FT &a, FT &b, FT &c) { a = -lb; b = la; c = lb * px - la * py; } template < class FT > void line_project_pointC2(const FT &la, const FT &lb, const FT &lc, const FT &px, const FT &py, FT &x, FT &y) { if (::CGAL:: is_zero(la)) { x = px; y = -lc/lb; } else if (::CGAL:: is_zero(lb)) { x = -lc/la; y = py; } else { FT ab = la/lb, ba = lb/la, ca = lc/la; y = ( -px + ab*py - ca ) / ( ba + ab ); x = -ba * y - ca; } # 342 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC2.h" } template < class FT > FT squared_radiusC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, FT &x, FT &y ) { circumcenter_translateC2(qx-px, qy-py, rx-px, ry-py, x, y); FT r2 = ::CGAL:: square(x) + ::CGAL:: square(y); x += px; y += py; return r2; } template < class FT > FT squared_radiusC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { FT x, y; circumcenter_translateC2(qx-px, qy-py, rx-px, ry-py, x, y); return ::CGAL:: square(x) + ::CGAL:: square(y); } template < class FT > inline FT squared_distanceC2( const FT &px, const FT &py, const FT &qx, const FT &qy) { return ::CGAL:: square(px-qx) + ::CGAL:: square(py-qy); } template < class FT > inline FT squared_radiusC2(const FT &px, const FT &py, const FT &qx, const FT &qy) { return squared_distanceC2(px, py,qx, qy) / 4; } template < class FT > inline FT scaled_distance_to_lineC2( const FT &la, const FT &lb, const FT &lc, const FT &px, const FT &py) { return la*px + lb*py + lc; } template < class FT > inline FT scaled_distance_to_directionC2( const FT &la, const FT &lb, const FT &px, const FT &py) { return la*px + lb*py; } template < class FT > FT scaled_distance_to_lineC2( const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { return determinant(px-rx, py-ry, qx-rx, qy-ry); } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h" 2 namespace CGAL { template < class FT > inline typename Equal_to::result_type parallelC2(const FT &l1a, const FT &l1b, const FT &l2a, const FT &l2b) { return sign_of_determinant(l1a, l1b, l2a, l2b) == ZERO; } template < class FT > typename Equal_to::result_type parallelC2(const FT &s1sx, const FT &s1sy, const FT &s1tx, const FT &s1ty, const FT &s2sx, const FT &s2sy, const FT &s2tx, const FT &s2ty) { return sign_of_determinant(s1tx - s1sx, s1ty - s1sy, s2tx - s2sx, s2ty - s2sy) == ZERO; } template < class FT > typename Equal_to::result_type equal_lineC2(const FT &l1a, const FT &l1b, const FT &l1c, const FT &l2a, const FT &l2b, const FT &l2c) { if (sign_of_determinant(l1a, l1b, l2a, l2b) != ZERO) return false; typename Sgn::result_type s1a = ::CGAL:: sign(l1a); if (s1a != ZERO) return s1a == ::CGAL:: sign(l2a) && sign_of_determinant(l1a, l1c, l2a, l2c) == ZERO; return ::CGAL:: sign(l1b) == ::CGAL:: sign(l2b) && sign_of_determinant(l1b, l1c, l2b, l2c) == ZERO; } template < class FT > typename Compare::result_type compare_xC2(const FT &px, const FT &la, const FT &lb, const FT &lc, const FT &ha, const FT &hb, const FT &hc) { FT num = determinant( lb, lc, hb, hc); FT den = determinant( la, lb, ha, hb); typename Sgn::result_type s = ::CGAL:: sign(den); (CGAL::possibly(s != ZERO)?(static_cast(0)): ::CGAL::assertion_fail( "s != ZERO" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 83)); return s * ::CGAL:: compare(px * den, num); } template < class FT > typename Compare::result_type compare_xC2(const FT &la, const FT &lb, const FT &lc, const FT &h1a, const FT &h1b, const FT &h1c, const FT &h2a, const FT &h2b, const FT &h2c) { # 103 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h" FT num1 = determinant( la, lc, h1a, h1c); FT num2 = determinant( la, lc, h2a, h2c); FT num = determinant(h1a,h1c,h2a,h2c)*lb + determinant(num1,num2,h1b,h2b); FT den1 = determinant( la, lb, h1a, h1b); FT den2 = determinant( la, lb, h2a, h2b); return ::CGAL:: sign(lb) * ::CGAL:: sign(num) * ::CGAL:: sign(den1) * ::CGAL:: sign(den2); } template < class FT > typename Compare::result_type compare_xC2(const FT &l1a, const FT &l1b, const FT &l1c, const FT &h1a, const FT &h1b, const FT &h1c, const FT &l2a, const FT &l2b, const FT &l2c, const FT &h2a, const FT &h2b, const FT &h2c) { FT num1 = determinant( l1b, l1c, h1b, h1c); FT den1 = determinant( l1a, l1b, h1a, h1b); FT num2 = determinant( l2b, l2c, h2b, h2c); FT den2 = determinant( l2a, l2b, h2a, h2b); typename Sgn::result_type s = ::CGAL:: sign(den1) * ::CGAL:: sign(den2); (CGAL::possibly(s != ZERO)?(static_cast(0)): ::CGAL::assertion_fail( "s != ZERO" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 128)); return s * sign_of_determinant(num1, num2, den1, den2); } template < class FT > typename Compare::result_type compare_y_at_xC2(const FT &px, const FT &py, const FT &la, const FT &lb, const FT &lc) { typename Sgn::result_type s = ::CGAL:: sign(lb); (CGAL::possibly(s != ZERO)?(static_cast(0)): ::CGAL::assertion_fail( "s != ZERO" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 139)); return s * ::CGAL:: sign(la*px + lb*py + lc); } template < class FT > typename Compare::result_type compare_y_at_xC2(const FT &px, const FT &l1a, const FT &l1b, const FT &l1c, const FT &l2a, const FT &l2b, const FT &l2c) { typename Sgn::result_type s = ::CGAL:: sign(l1b) * ::CGAL:: sign(l2b); (CGAL::possibly(s != ZERO)?(static_cast(0)): ::CGAL::assertion_fail( "s != ZERO" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 151)); return s * sign_of_determinant(l2a*px+l2c, l2b, l1a*px+l1c, l1b); } template < class FT > typename Compare::result_type compare_y_at_xC2(const FT &l1a, const FT &l1b, const FT &l1c, const FT &l2a, const FT &l2b, const FT &l2c, const FT &ha, const FT &hb, const FT &hc) { typename Sgn::result_type s = ::CGAL:: sign(hb) * sign_of_determinant(l1a, l1b, l2a, l2b); (CGAL::possibly(s != ZERO)?(static_cast(0)): ::CGAL::assertion_fail( "s != ZERO" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 165)); return s * sign_of_determinant(l1a, l1b, l1c, l2a, l2b, l2c, ha, hb, hc); } template < class FT > typename Compare::result_type compare_y_at_xC2(const FT &l1a, const FT &l1b, const FT &l1c, const FT &l2a, const FT &l2b, const FT &l2c, const FT &h1a, const FT &h1b, const FT &h1c, const FT &h2a, const FT &h2b, const FT &h2c) { FT num = determinant( l1b, l1c, l2b, l2c); FT den = determinant( l1a, l1b, l2a, l2b); typename Sgn::result_type s = ::CGAL:: sign(h1b) * ::CGAL:: sign(h2b) * ::CGAL:: sign(den); (CGAL::possibly(s != ZERO)?(static_cast(0)): ::CGAL::assertion_fail( "s != ZERO" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 185)); return s * sign_of_determinant(h2a*num+h2c*den, h2b, h1a*num+h1c*den, h1b); } template < class FT > inline typename Same_uncertainty_nt::type orientationC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry); template < class FT > typename Compare::result_type compare_y_at_xC2(const FT &px, const FT &py, const FT &ssx, const FT &ssy, const FT &stx, const FT &sty) { (CGAL::possibly(are_ordered(ssx, px, stx))?(static_cast(0)): ::CGAL::precondition_fail( "are_ordered(ssx, px, stx)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 208)); if (ssx < stx) return orientationC2(px, py, ssx, ssy, stx, sty); else if (ssx > stx) return orientationC2(px, py, stx, sty, ssx, ssy); else { if (py < (CGAL::min)(sty, ssy)) return SMALLER; if (py > (CGAL::max)(sty, ssy)) return LARGER; return EQUAL; } } template < class FT > typename Compare::result_type compare_y_at_x_segment_C2(const FT &px, const FT &s1sx, const FT &s1sy, const FT &s1tx, const FT &s1ty, const FT &s2sx, const FT &s2sy, const FT &s2tx, const FT &s2ty) { (CGAL::possibly(are_ordered(s1sx, px, s1tx))?(static_cast(0)): ::CGAL::precondition_fail( "are_ordered(s1sx, px, s1tx)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 238)); (CGAL::possibly(are_ordered(s2sx, px, s2tx))?(static_cast(0)): ::CGAL::precondition_fail( "are_ordered(s2sx, px, s2tx)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h", 239)); if (s1sx != s1tx && s2sx != s2tx) { FT s1stx = s1sx-s1tx; FT s2stx = s2sx-s2tx; return ::CGAL:: compare(s1sx, s1tx) * ::CGAL:: compare(s2sx, s2tx) * ::CGAL:: compare(-(s1sx-px)*(s1sy-s1ty)*s2stx, (s2sy-s1sy)*s2stx*s1stx -(s2sx-px)*(s2sy-s2ty)*s1stx ); } else { if (s1sx == s1tx) { typename Compare::result_type c1, c2; c1 = compare_y_at_xC2(px, s1sy, s2sx, s2sy, s2tx, s2ty); c2 = compare_y_at_xC2(px, s1ty, s2sx, s2sy, s2tx, s2ty); if (c1 == c2) return c1; return EQUAL; } typename Compare::result_type c3, c4; c3 = compare_y_at_xC2(px, s2sy, s1sx, s1sy, s1tx, s1ty); c4 = compare_y_at_xC2(px, s2ty, s1sx, s1sy, s1tx, s1ty); if (c3 == c4) return -c3; return EQUAL; } } template < class FT > typename Equal_to::result_type equal_directionC2(const FT &dx1, const FT &dy1, const FT &dx2, const FT &dy2) { return ::CGAL:: sign(dx1) == ::CGAL:: sign(dx2) && ::CGAL:: sign(dy1) == ::CGAL:: sign(dy2) && sign_of_determinant(dx1, dy1, dx2, dy2) == ZERO; } template < class FT > typename Compare::result_type compare_angle_with_x_axisC2(const FT &dx1, const FT &dy1, const FT &dx2, const FT &dy2) { int quadrant_1 = (dx1 >= 0) ? (dy1 >= 0 ? 1 : 4) : (dy1 >= 0 ? 2 : 3); int quadrant_2 = (dx2 >= 0) ? (dy2 >= 0 ? 1 : 4) : (dy2 >= 0 ? 2 : 3); if (quadrant_1 > quadrant_2) return LARGER; else if (quadrant_1 < quadrant_2) return SMALLER; return -sign_of_determinant(dx1,dy1,dx2,dy2); } template < class FT > typename Compare::result_type compare_slopesC2(const FT &l1a, const FT &l1b, const FT &l2a, const FT &l2b) { typedef typename Compare::result_type result_type; if (::CGAL:: is_zero(l1a)) return ::CGAL:: is_zero(l2b) ? result_type(SMALLER) : ::CGAL:: sign(l2a) * ::CGAL:: sign(l2b); if (::CGAL:: is_zero(l2a)) return ::CGAL:: is_zero(l1b) ? result_type(LARGER) : - ::CGAL:: sign(l1a) * ::CGAL:: sign(l1b); if (::CGAL:: is_zero(l1b)) return ::CGAL:: is_zero(l2b) ? EQUAL : LARGER; if (::CGAL:: is_zero(l2b)) return SMALLER; result_type l1_sign = - ::CGAL:: sign(l1a) * ::CGAL:: sign(l1b); result_type l2_sign = - ::CGAL:: sign(l2a) * ::CGAL:: sign(l2b); if (l1_sign < l2_sign) return SMALLER; if (l1_sign > l2_sign) return LARGER; if (l1_sign > ZERO) return ::CGAL:: compare ( ::CGAL:: abs(l1a * l2b), ::CGAL:: abs(l2a * l1b) ); return ::CGAL:: compare ( ::CGAL:: abs(l2a * l1b), ::CGAL:: abs(l1a * l2b) ); } template < class FT > typename Compare::result_type compare_slopesC2(const FT &s1_src_x, const FT &s1_src_y, const FT &s1_tgt_x, const FT &s1_tgt_y, const FT &s2_src_x, const FT &s2_src_y, const FT &s2_tgt_x, const FT &s2_tgt_y) { typedef typename Compare::result_type Cmp; typedef typename Sgn::result_type Sg; Cmp cmp_y1 = ::CGAL:: compare(s1_src_y, s1_tgt_y); if (cmp_y1 == EQUAL) { Cmp cmp_x2 = ::CGAL:: compare(s2_src_x, s2_tgt_x); if (cmp_x2 == EQUAL) return SMALLER; return - ::CGAL:: sign(s2_src_y - s2_tgt_y) * ::CGAL:: sign(s2_src_x - s2_tgt_x); } Cmp cmp_y2 = ::CGAL:: compare(s2_src_y, s2_tgt_y); if (cmp_y2 == EQUAL) { Cmp cmp_x1 = ::CGAL:: compare(s1_src_x, s1_tgt_x); if (cmp_x1 == EQUAL) return LARGER; return ::CGAL:: sign(s1_src_y - s1_tgt_y) * ::CGAL:: sign(s1_src_x - s1_tgt_x); } Cmp cmp_x1 = ::CGAL:: compare(s1_src_x, s1_tgt_x); Cmp cmp_x2 = ::CGAL:: compare(s2_src_x, s2_tgt_x); if (cmp_x1 == EQUAL) return cmp_x2 == EQUAL ? EQUAL : LARGER; if (cmp_x2 == EQUAL) return SMALLER; FT s1_xdiff = s1_src_x - s1_tgt_x; FT s1_ydiff = s1_src_y - s1_tgt_y; FT s2_xdiff = s2_src_x - s2_tgt_x; FT s2_ydiff = s2_src_y - s2_tgt_y; Sg s1_sign = ::CGAL:: sign(s1_ydiff) * ::CGAL:: sign(s1_xdiff); Sg s2_sign = ::CGAL:: sign(s2_ydiff) * ::CGAL:: sign(s2_xdiff); if (s1_sign < s2_sign) return SMALLER; if (s1_sign > s2_sign) return LARGER; if (s1_sign > ZERO) return ::CGAL:: compare( ::CGAL:: abs(s1_ydiff * s2_xdiff), ::CGAL:: abs(s2_ydiff * s1_xdiff)); return ::CGAL:: compare( ::CGAL:: abs(s2_ydiff * s1_xdiff), ::CGAL:: abs(s1_ydiff * s2_xdiff)); } # 396 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC2.h" template < class FT > inline typename Compare::result_type compare_lexicographically_xyC2(const FT &px, const FT &py, const FT &qx, const FT &qy) { typename Compare::result_type c = ::CGAL:: compare(px,qx); return (c != EQUAL) ? c : ::CGAL:: compare(py,qy); } template < class FT > inline typename Same_uncertainty_nt::type orientationC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { return sign_of_determinant(qx-px, qy-py, rx-px, ry-py); } template < class FT > inline typename Same_uncertainty_nt::type orientationC2(const FT &ux, const FT &uy, const FT &vx, const FT &vy) { return sign_of_determinant(ux, uy, vx, vy); } template < class FT > inline typename Same_uncertainty_nt::type angleC2(const FT &ux, const FT &uy, const FT &vx, const FT &vy) { return enum_cast(::CGAL:: sign(ux*vx + uy*vy)); } template < class FT > inline typename Same_uncertainty_nt::type angleC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { return enum_cast(::CGAL:: sign((px-qx)*(rx-qx)+(py-qy)*(ry-qy))); } template < class FT > inline typename Same_uncertainty_nt::type angleC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, const FT &sx, const FT &sy) { return enum_cast(::CGAL:: sign((px-qx)*(rx-sx)+(py-qy)*(ry-sy))); } template < class FT > typename Equal_to::result_type collinear_are_ordered_along_lineC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { if (px < qx) return !(rx < qx); if (qx < px) return !(qx < rx); if (py < qy) return !(ry < qy); if (qy < py) return !(qy < ry); return true; } template < class FT > typename Equal_to::result_type collinear_are_strictly_ordered_along_lineC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { if (px < qx) return (qx < rx); if (qx < px) return (rx < qx); if (py < qy) return (qy < ry); if (qy < py) return (ry < qy); return false; } template < class FT > typename Same_uncertainty_nt::type side_of_oriented_circleC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, const FT &tx, const FT &ty) { FT qpx = qx-px; FT qpy = qy-py; FT rpx = rx-px; FT rpy = ry-py; FT tpx = tx-px; FT tpy = ty-py; return sign_of_determinant( qpx*tpy - qpy*tpx, tpx*(tx-qx) + tpy*(ty-qy), qpx*rpy - qpy*rpx, rpx*(rx-qx) + rpy*(ry-qy)); } template < class FT > typename Same_uncertainty_nt::type side_of_bounded_circleC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, const FT &tx, const FT &ty) { return enum_cast( side_of_oriented_circleC2(px,py,qx,qy,rx,ry,tx,ty) * orientationC2(px,py,qx,qy,rx,ry) ); } template < class FT > typename Same_uncertainty_nt::type side_of_bounded_circleC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &tx, const FT &ty) { return enum_cast( ::CGAL:: compare((tx-px)*(qx-tx), (ty-py)*(ty-qy)) ); } template < class FT > inline typename Compare::result_type cmp_dist_to_pointC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { return ::CGAL:: compare(squared_distanceC2(px,py,qx,qy), squared_distanceC2(px,py,rx,ry)); } template < class FT > inline typename Equal_to::result_type has_larger_dist_to_pointC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { return cmp_dist_to_pointC2(px,py,qx,qy,rx,ry) == LARGER; } template < class FT > inline typename Equal_to::result_type has_smaller_dist_to_pointC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { return cmp_dist_to_pointC2(px,py,qx,qy,rx,ry) == SMALLER; } template < class FT > inline typename Compare::result_type cmp_signed_dist_to_directionC2(const FT &la, const FT &lb, const FT &px, const FT &py, const FT &qx, const FT &qy) { return ::CGAL:: compare(scaled_distance_to_directionC2(la,lb,px,py), scaled_distance_to_directionC2(la,lb,qx,qy)); } template < class FT > inline typename Equal_to::result_type has_larger_signed_dist_to_directionC2(const FT &la, const FT &lb, const FT &px, const FT &py, const FT &qx, const FT &qy) { return cmp_signed_dist_to_directionC2(la,lb,px,py,qx,qy) == LARGER; } template < class FT > inline typename Equal_to::result_type has_smaller_signed_dist_to_directionC2(const FT &la, const FT &lb, const FT &px, const FT &py, const FT &qx, const FT &qy) { return cmp_signed_dist_to_directionC2(la,lb,px,py,qx,qy) == SMALLER; } template inline typename Compare::result_type cmp_signed_dist_to_lineC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, const FT &sx, const FT &sy) { return ::CGAL:: compare(scaled_distance_to_lineC2(px,py,qx,qy,rx,ry), scaled_distance_to_lineC2(px,py,qx,qy,sx,sy)); } template inline typename Equal_to::result_type has_larger_signed_dist_to_lineC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, const FT &sx, const FT &sy) { return cmp_signed_dist_to_lineC2(px,py,qx,qy,rx,ry,sx,sy) == LARGER; } template inline typename Equal_to::result_type has_smaller_signed_dist_to_lineC2(const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry, const FT &sx, const FT &sy) { return cmp_signed_dist_to_lineC2(px,py,qx,qy,rx,ry,sx,sy) == SMALLER; } template inline typename Same_uncertainty_nt::type side_of_oriented_lineC2(const FT &a, const FT &b, const FT &c, const FT &x, const FT &y) { return ::CGAL:: sign(a*x+b*y+c); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Line_2.h" 2 namespace CGAL { template < class R_ > class LineC2 { typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Direction_2 Direction_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Ray_2 Ray_2; typedef typename R_::Segment_2 Segment_2; typedef typename R_::Line_2 Line_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; LineC2() {} LineC2(const FT &a, const FT &b, const FT &c) : base(CGAL::make_array(a, b, c)) {} typename R_::Boolean operator==(const LineC2 &l) const; typename R_::Boolean operator!=(const LineC2 &l) const; const FT & a() const { return get(base)[0]; } const FT & b() const { return get(base)[1]; } const FT & c() const { return get(base)[2]; } }; template < class R > inline typename R::Boolean LineC2::operator==(const LineC2 &l) const { if (CGAL::identical(base, l.base)) return true; return equal_lineC2(a(), b(), c(), l.a(), l.b(), l.c()); } template < class R > inline typename R::Boolean LineC2::operator!=(const LineC2 &l) const { return ! (*this == l); } } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Ray_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Ray_2.h" namespace CGAL { template < class R_ > class RayC2 { typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Ray_2 Ray_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; RayC2() {} RayC2(const Point_2 &sp, const Point_2 &secondp) : base(CGAL::make_array(sp, secondp)) {} const Point_2& source() const { return get(base)[0]; } const Point_2 & second_point() const { return get(base)[1]; } typename R_::Boolean is_degenerate() const { return source() == second_point(); } }; } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Segment_2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Segment_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_points_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_points_2.h" namespace CGAL { template < class K > inline bool equal_xy(const PointC2 &p, const PointC2 &q) { return __extension__ ({ CGAL::Uncertain CGAL_TMP = (p.x() == q.x()); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((p.y() == q.y())); }); } # 55 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_points_2.h" template < class K > inline Comparison_result compare_lexicographically_yx(const PointC2 &p, const PointC2 &q) { return compare_lexicographically_xyC2(p.y(), p.x(), q.y(), q.x()); } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Segment_2.h" 2 namespace CGAL { template < class R_ > class SegmentC2 { typedef typename R_::Point_2 Point_2; typedef typename R_::Segment_2 Segment_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; SegmentC2() {} SegmentC2(const Point_2 &sp, const Point_2 &ep) : base(CGAL::make_array(sp, ep)) {} const Point_2 & source() const { return get(base)[0]; } const Point_2 & target() const { return get(base)[1]; } }; } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Triangle_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Triangle_2.h" namespace CGAL { template class TriangleC2 { typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Triangle_2 Triangle_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; TriangleC2() {} TriangleC2(const Point_2 &p, const Point_2 &q, const Point_2 &r) : base(CGAL::make_array(p, q, r)) {} const Point_2 & vertex(int i) const { if (i>2) i = i%3; else if (i<0) i = (i%3) + 3; return (i==0) ? get(base)[0] : (i==1) ? get(base)[1] : get(base)[2]; } const Point_2 & operator[](int i) const { return vertex(i); } }; } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_2.h" # 1 "/localhome/glisse2/include/boost/tuple/tuple.hpp" 1 # 32 "/localhome/glisse2/include/boost/tuple/tuple.hpp" # 1 "/localhome/glisse2/include/boost/ref.hpp" 1 # 11 "/localhome/glisse2/include/boost/ref.hpp" # 1 "/localhome/glisse2/include/boost/utility/addressof.hpp" 1 # 18 "/localhome/glisse2/include/boost/utility/addressof.hpp" namespace boost { namespace detail { template struct addr_impl_ref { T & v_; inline addr_impl_ref( T & v ): v_( v ) {} inline operator T& () const { return v_; } private: addr_impl_ref & operator=(const addr_impl_ref &); }; template struct addressof_impl { static inline T * f( T & v, long ) { return reinterpret_cast( &const_cast(reinterpret_cast(v))); } static inline T * f( T * v, int ) { return v; } }; } template T * addressof( T & v ) { return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); } # 100 "/localhome/glisse2/include/boost/utility/addressof.hpp" } # 12 "/localhome/glisse2/include/boost/ref.hpp" 2 # 29 "/localhome/glisse2/include/boost/ref.hpp" namespace boost { template class reference_wrapper { public: typedef T type; explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} operator T& () const { return *t_; } T& get() const { return *t_; } T* get_pointer() const { return t_; } private: T* t_; }; template inline reference_wrapper const ref(T & t) { return reference_wrapper(t); } template inline reference_wrapper const cref(T const & t) { return reference_wrapper(t); } template class is_reference_wrapper : public mpl::false_ { }; template class unwrap_reference { public: typedef T type; }; # 106 "/localhome/glisse2/include/boost/ref.hpp" template class is_reference_wrapper< reference_wrapper > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper > { public: typedef T type; }; template class is_reference_wrapper< reference_wrapper const > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const > { public: typedef T type; }; template class is_reference_wrapper< reference_wrapper volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper volatile > { public: typedef T type; }; template class is_reference_wrapper< reference_wrapper const volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const volatile > { public: typedef T type; }; # 176 "/localhome/glisse2/include/boost/ref.hpp" template inline typename unwrap_reference::type& unwrap_ref(T& t) { return t; } template inline T* get_pointer( reference_wrapper const & r ) { return r.get_pointer(); } } # 33 "/localhome/glisse2/include/boost/tuple/tuple.hpp" 2 # 1 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" 1 # 38 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" # 1 "/localhome/glisse2/include/boost/type_traits/cv_traits.hpp" 1 # 39 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/swap.hpp" 1 # 25 "/localhome/glisse2/include/boost/utility/swap.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/localhome/glisse2/include/boost/utility/swap.hpp" 2 namespace boost_swap_impl { template void swap_impl(T& left, T& right) { using namespace std; swap(left,right); } template void swap_impl(T (& left)[N], T (& right)[N]) { for (std::size_t i = 0; i < N; ++i) { ::boost_swap_impl::swap_impl(left[i], right[i]); } } } namespace boost { template void swap(T1& left, T2& right) { ::boost_swap_impl::swap_impl(left, right); } } # 41 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" 2 namespace boost { namespace tuples { struct null_type {}; namespace detail { inline const null_type cnull() { return null_type(); } template struct IF { typedef Then RET; }; template struct IF { typedef Else RET; }; } template struct cons; template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type> class tuple; template struct length; namespace detail { template class generate_error; template struct drop_front { template struct apply { typedef typename drop_front::template apply next; typedef typename next::type::tail_type type; static const type& call(const Tuple& tup) { return next::call(tup).tail; } }; }; template<> struct drop_front<0> { template struct apply { typedef Tuple type; static const type& call(const Tuple& tup) { return tup; } }; }; } # 124 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" template struct element { typedef typename detail::drop_front::template apply::type::head_type type; }; template struct element { private: typedef typename detail::drop_front::template apply::type::head_type unqualified_type; public: typedef typename boost::add_const::type type; }; # 184 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" template struct access_traits { typedef const T& const_type; typedef T& non_const_type; typedef const typename boost::remove_cv::type& parameter_type; }; template struct access_traits { typedef T& const_type; typedef T& non_const_type; typedef T& parameter_type; }; template inline typename access_traits< typename element >::type >::non_const_type get(cons& c ) { typedef typename detail::drop_front::template apply > impl; typedef typename impl::type cons_element; return const_cast(impl::call(c)).head; } template inline typename access_traits< typename element >::type >::const_type get(const cons& c ) { typedef typename detail::drop_front::template apply > impl; typedef typename impl::type cons_element; return impl::call(c).head; } namespace detail { template class non_storeable_type { non_storeable_type(); }; template struct wrap_non_storeable_type { typedef typename IF< ::boost::is_function::value, non_storeable_type, T >::RET type; }; template <> struct wrap_non_storeable_type { typedef non_storeable_type type; }; } template struct cons { typedef HT head_type; typedef TT tail_type; typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; tail_type tail; typename access_traits::non_const_type get_head() { return head; } typename access_traits::non_const_type get_tail() { return tail; } typename access_traits::const_type get_head() const { return head; } typename access_traits::const_type get_tail() const { return tail; } cons() : head(), tail() {} cons(typename access_traits::parameter_type h, const tail_type& t) : head (h), tail(t) {} template cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) : head (t1), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} template cons( const null_type& , T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) : head (), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} template cons( const cons& u ) : head(u.head), tail(u.tail) {} template cons& operator=( const cons& u ) { head=u.head; tail=u.tail; return *this; } cons& operator=(const cons& u) { head = u.head; tail = u.tail; return *this; } template cons& operator=( const std::pair& u ) { static_assert(length::value == 2, "length::value == 2"); head = u.first; tail.head = u.second; return *this; } template typename access_traits< typename element >::type >::non_const_type get() { return boost::tuples::get(*this); } template typename access_traits< typename element >::type >::const_type get() const { return boost::tuples::get(*this); } }; template struct cons { typedef HT head_type; typedef null_type tail_type; typedef cons self_type; typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; typename access_traits::non_const_type get_head() { return head; } null_type get_tail() { return null_type(); } typename access_traits::const_type get_head() const { return head; } const null_type get_tail() const { return null_type(); } cons() : head() {} cons(typename access_traits::parameter_type h, const null_type& = null_type()) : head (h) {} template cons(T1& t1, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head (t1) {} cons(const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head () {} template cons( const cons& u ) : head(u.head) {} template cons& operator=(const cons& u ) { head = u.head; return *this; } cons& operator=(const cons& u) { head = u.head; return *this; } template typename access_traits< typename element::type >::non_const_type get() { return boost::tuples::get(*this); } template typename access_traits< typename element::type >::const_type get() const { return boost::tuples::get(*this); } }; template struct length { static const int value = 1 + length::value; }; template<> struct length > { static const int value = 0; }; template<> struct length const> { static const int value = 0; }; template<> struct length { static const int value = 0; }; template<> struct length { static const int value = 0; }; namespace detail { template struct map_tuple_to_cons { typedef cons::type > type; }; template <> struct map_tuple_to_cons { typedef null_type type; }; } template class tuple : public detail::map_tuple_to_cons::type { public: typedef typename detail::map_tuple_to_cons::type inherited; typedef typename inherited::head_type head_type; typedef typename inherited::tail_type tail_type; tuple() {} tuple(typename access_traits::parameter_type t0) : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1) : inherited(t0, t1, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2) : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3) : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4) : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5) : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6) : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7, typename access_traits::parameter_type t8) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7, typename access_traits::parameter_type t8, typename access_traits::parameter_type t9) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {} template tuple(const cons& p) : inherited(p) {} template tuple& operator=(const cons& k) { inherited::operator=(k); return *this; } template tuple& operator=(const std::pair& k) { static_assert(length::value == 2, "length::value == 2"); this->head = k.first; this->tail.head = k.second; return *this; } }; template <> class tuple : public null_type { public: typedef null_type inherited; }; namespace detail { struct swallow_assign; typedef void (detail::swallow_assign::*ignore_t)(); struct swallow_assign { swallow_assign(ignore_t(*)(ignore_t)) {} template swallow_assign const& operator=(const T&) const { return *this; } }; } inline detail::ignore_t ignore(detail::ignore_t) { return 0; } # 636 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" template struct make_tuple_traits { typedef T type; }; # 660 "/localhome/glisse2/include/boost/tuple/detail/tuple_basic.hpp" template struct make_tuple_traits { typedef typename detail::generate_error:: do_not_use_with_reference_type error; }; template struct make_tuple_traits { typedef const T (&type)[n]; }; template struct make_tuple_traits { typedef const T (&type)[n]; }; template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; template struct make_tuple_traits >{ typedef T& type; }; template struct make_tuple_traits >{ typedef T& type; }; template<> struct make_tuple_traits { typedef detail::swallow_assign type; }; namespace detail { template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type > struct make_tuple_mapper { typedef tuple::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type> type; }; } inline tuple<> make_tuple() { return tuple<>(); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0) { typedef typename detail::make_tuple_mapper::type t; return t(t0); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3, t4); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3, t4, t5); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7); } template inline typename detail::make_tuple_mapper ::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); } template inline typename detail::make_tuple_mapper ::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); } namespace detail { template struct tie_traits { typedef T& type; }; template<> struct tie_traits { typedef swallow_assign type; }; template<> struct tie_traits { typedef null_type type; }; template < class T0 = void, class T1 = void, class T2 = void, class T3 = void, class T4 = void, class T5 = void, class T6 = void, class T7 = void, class T8 = void, class T9 = void > struct tie_mapper { typedef tuple::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type> type; }; } template inline typename detail::tie_mapper::type tie(T0& t0) { typedef typename detail::tie_mapper::type t; return t(t0); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1) { typedef typename detail::tie_mapper::type t; return t(t0, t1); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2, t3); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2, t3, t4); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2, t3, t4, t5); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7); } template inline typename detail::tie_mapper ::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); } template inline typename detail::tie_mapper ::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); } template void swap(tuple& lhs, tuple& rhs); inline void swap(null_type&, null_type&) {} template inline void swap(cons& lhs, cons& rhs) { ::boost::swap(lhs.head, rhs.head); } template inline void swap(cons& lhs, cons& rhs) { ::boost::swap(lhs.head, rhs.head); ::boost::tuples::swap(lhs.tail, rhs.tail); } template inline void swap(tuple& lhs, tuple& rhs) { typedef tuple tuple_type; typedef typename tuple_type::inherited base; ::boost::tuples::swap(static_cast(lhs), static_cast(rhs)); } } } # 34 "/localhome/glisse2/include/boost/tuple/tuple.hpp" 2 namespace boost { using tuples::tuple; using tuples::make_tuple; using tuples::tie; using tuples::get; # 87 "/localhome/glisse2/include/boost/tuple/tuple.hpp" } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_2.h" 2 namespace CGAL { template class CircleC2 { typedef typename R_::FT FT; typedef typename R_::RT RT; typedef typename R_::Circle_2 Circle_2; typedef typename R_::Point_2 Point_2; typedef boost::tuple Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; CircleC2() {} explicit CircleC2(const Point_2 ¢er, const FT &squared_radius = FT(0), const Orientation &orient = COUNTERCLOCKWISE) { (CGAL::possibly(( squared_radius >= FT(0) ) & ( orient != COLLINEAR))?(static_cast(0)): ::CGAL::precondition_fail( "( squared_radius >= FT(0) ) & ( orient != COLLINEAR)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_2.h" # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_2.h" , 55 # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_2.h" )) ; base = Rep(center, squared_radius, orient); } bool operator==(const CircleC2 &s) const; bool operator!=(const CircleC2 &s) const; const Point_2 & center() const { return get(base).template get<0>(); } const FT & squared_radius() const { return get(base).template get<1>(); } Orientation orientation() const { return get(base).template get<2>(); } }; } # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_rectangle_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_rectangle_2.h" namespace CGAL { template class Iso_rectangleC2 { typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Iso_rectangle_2 Iso_rectangle_2; typedef typename R_::Construct_point_2 Construct_point_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; Iso_rectangleC2() {} Iso_rectangleC2(const Point_2 &p, const Point_2 &q, int) : base(CGAL::make_array(p, q)) { } const Point_2 & min () const { return get(base)[0]; } const Point_2 & max () const { return get(base)[1]; } }; } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_2.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_2.h" 2 namespace CGAL { class Identity_transformation; template < class R > class Aff_transformation_rep_baseC2; template < class R > class Aff_transformation_repC2; template < class R > class Translation_repC2; template < class R > class Rotation_repC2; template < class R > class Scaling_repC2; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_rep_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_rep_2.h" namespace CGAL { template < class R > class Aff_transformation_rep_baseC2 : public Ref_counted_virtual { public: typedef typename R::FT FT; typedef typename R::Point_2 Point_2; typedef typename R::Vector_2 Vector_2; typedef typename R::Direction_2 Direction_2; typedef typename R::Aff_transformation_2 Aff_transformation_2; virtual ~Aff_transformation_rep_baseC2() {} virtual Point_2 transform(const Point_2 &p) const = 0; virtual Vector_2 transform(const Vector_2 &v) const = 0; virtual Direction_2 transform(const Direction_2 &d) const=0; virtual Aff_transformation_2 operator*( const Aff_transformation_rep_baseC2 &t) const = 0; virtual Aff_transformation_2 compose( const Aff_transformation_repC2 &t) const = 0; virtual Aff_transformation_2 compose( const Translation_repC2 &t) const = 0; virtual Aff_transformation_2 compose( const Rotation_repC2 &t) const = 0; virtual Aff_transformation_2 compose( const Scaling_repC2 &t) const = 0; virtual Aff_transformation_2 inverse() const = 0; virtual bool is_even() const = 0; virtual FT cartesian(int i, int j) const = 0; virtual std::ostream &print(std::ostream &os) const = 0; }; template < class R > class Aff_transformation_repC2 : public Aff_transformation_rep_baseC2 { public: typedef typename R::FT FT; typedef Aff_transformation_repC2 Self; typedef Aff_transformation_rep_baseC2 Aff_t_base; typedef typename Aff_t_base::Point_2 Point_2; typedef typename Aff_t_base::Vector_2 Vector_2; typedef typename Aff_t_base::Direction_2 Direction_2; typedef typename Aff_t_base::Aff_transformation_2 Aff_transformation_2; friend class Translation_repC2; friend class Rotation_repC2; friend class Scaling_repC2; Aff_transformation_repC2() {} Aff_transformation_repC2( const FT& m11, const FT& m12, const FT& m21, const FT& m22) : t11(m11), t12(m12), t13(0), t21(m21), t22(m22), t23(0) {} Aff_transformation_repC2( const FT& m11, const FT& m12, const FT& m13, const FT& m21, const FT& m22, const FT& m23) : t11(m11), t12(m12), t13(m13), t21(m21), t22(m22), t23(m23) {} Point_2 transform(const Point_2& p) const { typename R::Construct_point_2 construct_point_2; return construct_point_2(t11 * p.x() + t12 * p.y() + t13, t21 * p.x() + t22 * p.y() + t23); } Vector_2 transform(const Vector_2& v) const { return Vector_2(t11 * v.x() + t12 * v.y(), t21 * v.x() + t22 * v.y()); } Direction_2 transform(const Direction_2& dir) const { return Direction_2(t11 * dir.dx() + t12 * dir.dy(), t21 * dir.dx() + t22 * dir.dy()); } Aff_transformation_2 inverse() const; Aff_transformation_2 operator*(const Aff_t_base &t) const; Aff_transformation_2 compose(const Self &t) const; Aff_transformation_2 compose(const Translation_repC2 &t) const; Aff_transformation_2 compose(const Rotation_repC2 &t) const; Aff_transformation_2 compose(const Scaling_repC2 &t) const; bool is_even() const { return sign_of_determinant(t11, t12, t21, t22) == POSITIVE; } FT cartesian(int i, int j) const { switch (i) { case 0: switch (j) { case 0: return t11; case 1: return t12; case 2: return t13; } case 1: switch (j) { case 0: return t21; case 1: return t22; case 2: return t23; } case 2: switch (j) { case 0: return FT(0); case 1: return FT(0); case 2: return FT(1); } } return FT(0); } std::ostream &print(std::ostream &os) const { os <<"Aff_transformationC2(" < typename Aff_transformation_repC2::Aff_transformation_2 Aff_transformation_repC2:: inverse() const { FT det = FT(1) / (t11 * t22 - t12 * t21); return Aff_transformation_2( det * t22, det * (-t12), det * (t12*t23-t13*t22), det * (-t21), det * t11 , det * (t13*t21-t11*t23)); } template < class R > inline typename Aff_transformation_repC2::Aff_transformation_2 Aff_transformation_repC2:: operator*(const Aff_transformation_rep_baseC2 &t) const { return t.compose(*this); } template < class R > typename Aff_transformation_repC2::Aff_transformation_2 Aff_transformation_repC2:: compose(const Aff_transformation_repC2 &t) const { return Aff_transformation_2(t.t11*t11 + t.t12*t21, t.t11*t12 + t.t12*t22, t.t11*t13 + t.t12*t23 + t.t13, t.t21*t11 + t.t22*t21, t.t21*t12 + t.t22*t22, t.t21*t13 + t.t22*t23 + t.t23 ); } template < class R > typename Aff_transformation_repC2::Aff_transformation_2 Aff_transformation_repC2:: compose(const Translation_repC2 &t) const { return Aff_transformation_2(t11, t12, t13 + t.translationvector_.x(), t21, t22, t23 + t.translationvector_.y()); } template < class R > typename Aff_transformation_repC2::Aff_transformation_2 Aff_transformation_repC2:: compose(const Rotation_repC2 &t) const { return Aff_transformation_2(t.cosinus_*t11 - t.sinus_*t21, t.cosinus_*t12 - t.sinus_*t22, t.cosinus_*t13 - t.sinus_*t23, t.sinus_*t11 + t.cosinus_*t21, t.sinus_*t12 + t.cosinus_*t22, t.sinus_*t13 + t.cosinus_*t23); } template < class R > typename Aff_transformation_repC2::Aff_transformation_2 Aff_transformation_repC2:: compose(const Scaling_repC2 &t) const { return Aff_transformation_2(t.scalefactor_ * t11, t.scalefactor_ * t12, t.scalefactor_ * t13, t.scalefactor_ * t21, t.scalefactor_ * t22, t.scalefactor_ * t23); } } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Translation_rep_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Translation_rep_2.h" namespace CGAL { template < class R > class Translation_repC2 : public Aff_transformation_rep_baseC2 { friend class Aff_transformation_repC2; friend class Rotation_repC2; friend class Scaling_repC2; public: typedef typename R::FT FT; typedef Aff_transformation_rep_baseC2 Aff_t_base; typedef Aff_transformation_repC2 Transformation; typedef Translation_repC2 Translation; typedef Rotation_repC2 Rotation; typedef Scaling_repC2 Scaling; typedef typename Aff_t_base::Point_2 Point_2; typedef typename Aff_t_base::Vector_2 Vector_2; typedef typename Aff_t_base::Direction_2 Direction_2; typedef typename Aff_t_base::Aff_transformation_2 Aff_transformation_2; Translation_repC2() {} Translation_repC2(const Vector_2 &tv) : translationvector_(tv) {} Point_2 transform(const Point_2 &p) const { typename R::Construct_translated_point_2 translated_point; return translated_point(p, translationvector_); } Vector_2 transform(const Vector_2 &v) const { return v; } Direction_2 transform(const Direction_2 &d) const { return d; } Aff_transformation_2 operator*(const Aff_t_base &t) const { return t.compose(*this); } Aff_transformation_2 compose(const Translation &t) const { return Aff_transformation_2(TRANSLATION, translationvector_ + t.translationvector_); } Aff_transformation_2 compose(const Rotation &t) const { return Aff_transformation_2(t.cosinus_, -t.sinus_, t.cosinus_*translationvector_.x() - t.sinus_*translationvector_.y(), t.sinus_, t.cosinus_, t.sinus_*translationvector_.x() + t.cosinus_*translationvector_.y()); } Aff_transformation_2 compose(const Scaling &t) const { return Aff_transformation_2(t.scalefactor_, FT(0), t.scalefactor_*translationvector_.x(), FT(0), t.scalefactor_, t.scalefactor_*translationvector_.y()); } Aff_transformation_2 compose(const Transformation &t) const { return Aff_transformation_2(t.t11, t.t12, t.t11 * translationvector_.x() + t.t12 * translationvector_.y() + t.t13, t.t21, t.t22, t.t21 * translationvector_.x() + t.t22*translationvector_.y() + t.t23); } Aff_transformation_2 inverse() const { return Aff_transformation_2(TRANSLATION, - translationvector_); } bool is_even() const { return true; } FT cartesian(int i, int j) const { if (j==i) return FT(1); if (j==2) return translationvector_[i]; return FT(0); } std::ostream &print(std::ostream &os) const { os << "Aff_transformationC2(VectorC2(" << translationvector_.x() << ", " << translationvector_.y() << "))"; return os; } private: Vector_2 translationvector_; }; } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Rotation_rep_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Rotation_rep_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h" namespace CGAL { template < class NT > void rational_rotation_approximation( const NT & dirx, const NT & diry, NT & sin_num, NT & cos_num, NT & denom, const NT & eps_num, const NT & eps_den ) { const NT& n = eps_num; const NT& d = eps_den; const NT NT0 = NT(0) ; const NT NT1 = NT(1) ; (CGAL::possibly((dirx != NT0) || (diry != NT0))?(static_cast(0)): ::CGAL::precondition_fail( "(dirx != NT0) || (diry != NT0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h", 48)); (CGAL::possibly(n > NT0)?(static_cast(0)): ::CGAL::precondition_fail( "n > NT0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h", 49)); (CGAL::possibly(d > NT0)?(static_cast(0)): ::CGAL::precondition_fail( "d > NT0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h", 50)); NT & sin = sin_num; NT & cos = cos_num; NT & den = denom; NT dx = ::CGAL:: abs(dirx); NT dy = ::CGAL:: abs(diry); NT sq_hypotenuse = dx*dx + dy*dy; NT common_part; NT diff_part; NT rhs; bool lower_ok; bool upper_ok; if (dy > dx) { std::swap (dx,dy); } if (dy * dy * d * d < sq_hypotenuse * n * n) { cos = NT1; sin = NT0; den = NT1; } else { NT p; NT q; NT p0 = NT0; NT q0 = NT1; NT p1 = NT1; NT q1 = NT1; for(;;) { p = p0 + p1; q = q0 + q1; sin = NT(2)*p*q; den = p*p + q*q; # 99 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h" common_part = (sin*sin*d*d + n*n*den*den)*sq_hypotenuse; diff_part = NT(2)*n*sin*d*den*sq_hypotenuse; rhs = dy*dy*d*d*den*den; upper_ok = (common_part - diff_part < rhs); lower_ok = (common_part + diff_part > rhs); if ( lower_ok && upper_ok ) { # 116 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h" cos = q*q - p*p; break; } else { if ( dy*dy*den*den < sin*sin*sq_hypotenuse ) { p1 = p; q1 = q; } else { p0 = p; q0 = q; } } } } dx = dirx; dy = diry; if (::CGAL:: abs(dy) > ::CGAL:: abs(dx) ) { std::swap (sin,cos); } if (dx < NT0) { cos = - cos; } if (dy < NT0) { sin = - sin; } sin_num = sin; cos_num = cos; denom = den; } template < class NT > void rational_rotation_approximation( const double& angle, NT & sin_num, NT & cos_num, NT & denom, const NT & eps_num, const NT & eps_den ) { const NT& n = eps_num; const NT& d = eps_den; const NT NT0 = NT(0) ; const NT NT1 = NT(1) ; (CGAL::possibly(n > NT0)?(static_cast(0)): ::CGAL::precondition_fail( "n > NT0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h", 166)); (CGAL::possibly(d > NT0)?(static_cast(0)): ::CGAL::precondition_fail( "d > NT0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h", 167)); NT& isin = sin_num; NT& icos = cos_num; NT& iden = denom; double dsin = std::sin(angle); double dcos = std::cos(angle); double dn = CGAL::to_double(n); double dd = CGAL::to_double(d); double eps = dn / dd; dsin = ::CGAL:: abs( dsin); dcos = ::CGAL:: abs( dcos); NT common_part; NT diff_part; NT os; bool lower_ok; bool upper_ok; bool swapped = false; if (dsin > dcos) { swapped = true; std::swap (dsin,dcos); } if ( dsin < eps ) { icos = NT1; isin = NT0; iden = NT1; } else { NT p; NT q; NT p0 = NT0; NT q0 = NT1; NT p1 = NT1; NT q1 = NT1; for(;;) { p = p0 + p1; q = q0 + q1; isin = NT(2)*p*q; iden = p*p + q*q; os = CGAL::to_double(isin); diff_part = eps * CGAL::to_double(iden); common_part = dsin * CGAL::to_double(iden); upper_ok = (common_part - diff_part < os); lower_ok = (os < common_part + diff_part); if ( lower_ok && upper_ok ) { # 234 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/rational_rotation.h" icos = q*q - p*p; break; } else { if ( dsin * CGAL::to_double(iden) < CGAL::to_double(isin) ) { p1 = p; q1 = q; } else { p0 = p; q0 = q; } } } } if ( swapped ) { std::swap (isin,icos); } dsin = std::sin( angle); dcos = std::cos( angle); if (dcos < 0.0) { icos = - icos; } if (dsin < 0.0) { isin = - isin; } sin_num = isin; cos_num = icos; denom = iden; } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Rotation_rep_2.h" 2 namespace CGAL { template < class R > class Rotation_repC2: public Aff_transformation_rep_baseC2 { friend class Aff_transformation_repC2; friend class Translation_repC2; friend class Scaling_repC2; public: typedef Aff_transformation_rep_baseC2 Aff_t_base; typedef typename Aff_t_base::FT FT; typedef typename Aff_t_base::Point_2 Point_2; typedef typename Aff_t_base::Vector_2 Vector_2; typedef typename Aff_t_base::Direction_2 Direction_2; typedef typename Aff_t_base::Aff_transformation_2 Aff_transformation_2; typedef Aff_transformation_repC2 Transformation; typedef Translation_repC2 Translation; typedef Rotation_repC2 Rotation; typedef Scaling_repC2 Scaling; Rotation_repC2() {} Rotation_repC2(const FT &sinus, const FT &cosinus) : sinus_(sinus), cosinus_(cosinus) {} Rotation_repC2(const Direction_2 &d, const FT &eps_num, const FT &eps_den = FT(1)) { FT sin_num; FT cos_num; FT denom; rational_rotation_approximation(d.dx(), d.dy(), sin_num, cos_num, denom, eps_num, eps_den); sinus_ = sin_num/denom; cosinus_ = cos_num/denom; } Point_2 transform(const Point_2 &p) const { return Point_2(cosinus_ * p.x() - sinus_ * p.y(), sinus_ * p.x() + cosinus_ * p.y()); } Vector_2 transform(const Vector_2 &v) const { return Vector_2(cosinus_ * v.x() - sinus_ * v.y(), sinus_ * v.x() + cosinus_ * v.y()); } Direction_2 transform(const Direction_2 &d) const { return Direction_2(cosinus_ * d.dx() - sinus_ * d.dy(), sinus_ * d.dx() + cosinus_ * d.dy()); } Aff_transformation_2 inverse() const { return Aff_transformation_2(ROTATION, - sinus_, cosinus_, FT(1)); } Aff_transformation_2 operator*(const Aff_t_base &t) const { return t.compose(*this); } Aff_transformation_2 compose(const Translation &t) const { return Aff_transformation_2(cosinus_, -sinus_, t.translationvector_.x(), sinus_, cosinus_, t.translationvector_.y()); } Aff_transformation_2 compose(const Rotation &t) const { return Aff_transformation_2(ROTATION, t.sinus_*cosinus_ + t.cosinus_*sinus_, t.cosinus_*cosinus_-t.sinus_*sinus_ ); } Aff_transformation_2 compose(const Scaling &t) const { return Aff_transformation_2(t.scalefactor_*cosinus_, t.scalefactor_*-sinus_, t.scalefactor_*sinus_, t.scalefactor_*cosinus_); } Aff_transformation_2 compose(const Transformation &t) const { return Aff_transformation_2(cosinus_*t.t11 + sinus_*t.t12, -sinus_*t.t11 + cosinus_*t.t12, t.t13, cosinus_*t.t21 + sinus_*t.t22, -sinus_*t.t21 + cosinus_*t.t22, t.t23); } bool is_even() const { return true; } FT cartesian(int i, int j) const { switch (i) { case 0: switch (j) { case 0: return cosinus_; case 1: return -sinus_; case 2: return FT(0); } case 1: switch (j) { case 0: return sinus_; case 1: return cosinus_; case 2: return FT(0); } case 2: switch (j) { case 0: return FT(0); case 1: return FT(0); case 2: return FT(1); } } return FT(0); } std::ostream &print(std::ostream &os) const { os << "Aff_transformationC2(" << sinus_ << ", " << cosinus_ << ")"; return os; } private: FT sinus_, cosinus_; }; } # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Scaling_rep_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Scaling_rep_2.h" namespace CGAL { template < class R > class Scaling_repC2: public Aff_transformation_rep_baseC2 { friend class Aff_transformation_repC2; friend class Translation_repC2; friend class Rotation_repC2; public: typedef Aff_transformation_rep_baseC2 Aff_t_base; typedef typename Aff_t_base::FT FT; typedef typename Aff_t_base::Point_2 Point_2; typedef typename Aff_t_base::Vector_2 Vector_2; typedef typename Aff_t_base::Direction_2 Direction_2; typedef typename Aff_t_base::Aff_transformation_2 Aff_transformation_2; typedef Aff_transformation_repC2 Transformation; typedef Translation_repC2 Translation; typedef Rotation_repC2 Rotation; typedef Scaling_repC2 Scaling; Scaling_repC2() {} Scaling_repC2(const FT &scalefactor) : scalefactor_(scalefactor) {} ~Scaling_repC2() {} Point_2 transform(const Point_2 &p) const { return Point_2(scalefactor_ * p.x(), scalefactor_ * p.y()); } Vector_2 transform(const Vector_2 &p) const { return Vector_2(scalefactor_ * p.x(), scalefactor_ * p.y()); } Direction_2 transform(const Direction_2 &d) const { return d; } Aff_transformation_2 operator*(const Aff_t_base &t) const { return t.compose(*this); } Aff_transformation_2 compose(const Translation &t) const { FT ft0(0); return Aff_transformation_2(scalefactor_, ft0, t.translationvector_.x(), ft0, scalefactor_, t.translationvector_.y()); } Aff_transformation_2 compose(const Rotation &t) const { return Aff_transformation_2(scalefactor_ * t.cosinus_, scalefactor_ * -t.sinus_, scalefactor_ * t.sinus_, scalefactor_ * t.cosinus_); } Aff_transformation_2 compose(const Scaling &t) const { return Aff_transformation_2(SCALING, scalefactor_*t.scalefactor_); } Aff_transformation_2 compose(const Transformation &t) const { return Aff_transformation_2(scalefactor_ * t.t11, scalefactor_ * t.t12, t.t13, scalefactor_ * t.t21, scalefactor_ * t.t22, t.t23); } Aff_transformation_2 inverse() const { return Aff_transformation_2(SCALING, FT(1)/scalefactor_); } bool is_even() const { return true; } FT cartesian(int i, int j) const { if (i!=j) return FT(0); return (i==2) ? FT(1) : scalefactor_; } std::ostream &print(std::ostream &os) const { os << "Aff_transformationC2(" << scalefactor_ << ")"; return os; } private: FT scalefactor_; }; } # 46 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_2.h" 2 namespace CGAL { template < class R_ > class Aff_transformationC2 : public Handle_for_virtual< Aff_transformation_rep_baseC2 > { typedef typename R_::FT FT; typedef Aff_transformation_rep_baseC2 Aff_t_base; typedef typename R_::Point_2 Point_2; typedef typename R_::Vector_2 Vector_2; typedef typename R_::Direction_2 Direction_2; typedef typename R_::Line_2 Line_2; typedef typename R_::Aff_transformation_2 Aff_transformation_2; using Handle_for_virtual::initialize_with; public: typedef R_ R; Aff_transformationC2() { initialize_with(Aff_transformation_repC2(FT(1), FT(0), FT(0), FT(1))); } Aff_transformationC2(const Identity_transformation) { initialize_with(Aff_transformation_repC2(FT(1), FT(0), FT(0), FT(1))); } Aff_transformationC2(const Translation, const Vector_2 &v) { initialize_with(Translation_repC2(v)); } Aff_transformationC2(const Rotation, const Direction_2 &d, const FT &num, const FT &den = FT(1)) { initialize_with(Rotation_repC2(d, num, den)); } Aff_transformationC2(const Rotation, const FT &sine, const FT &cosine, const FT &w = FT(1)) { if (w != FT(1)) initialize_with(Rotation_repC2(sine/w, cosine/w)); else initialize_with(Rotation_repC2(sine, cosine)); } Aff_transformationC2(const Scaling, const FT &s, const FT &w = FT(1)) { if (w != FT(1)) initialize_with(Scaling_repC2(s/w)); else initialize_with(Scaling_repC2(s)); } Aff_transformationC2(const FT & m11, const FT & m12, const FT & m13, const FT & m21, const FT & m22, const FT & m23, const FT &w = FT(1)) { if (w != FT(1)) initialize_with(Aff_transformation_repC2(m11/w, m12/w, m13/w, m21/w, m22/w, m23/w)); else initialize_with(Aff_transformation_repC2(m11, m12, m13, m21, m22, m23)); } Aff_transformationC2(const FT & m11, const FT & m12, const FT & m21, const FT & m22, const FT &w = FT(1)) { initialize_with(Aff_transformation_repC2(m11/w, m12/w, m21/w, m22/w)); } Point_2 transform(const Point_2 &p) const { return this->Ptr()->transform(p); } Point_2 operator()(const Point_2 &p) const { return transform(p); } Vector_2 transform(const Vector_2 &v) const { return this->Ptr()->transform(v); } Vector_2 operator()(const Vector_2 &v) const { return transform(v); } Direction_2 transform(const Direction_2 &d) const { return this->Ptr()->transform(d); } Direction_2 operator()(const Direction_2 &d) const { return transform(d); } Line_2 transform(const Line_2 &l) const { return l.transform(*this); } Line_2 operator()(const Line_2 &l) const { return transform(l); } Aff_transformation_2 inverse() const { return this->Ptr()->inverse(); } bool is_even() const { return this->Ptr()->is_even(); } bool is_odd() const { return ! (this->Ptr()->is_even()); } FT cartesian(int i, int j) const { return this->Ptr()->cartesian(i,j); } FT homogeneous(int i, int j) const { return cartesian(i,j); } FT m(int i, int j) const { return cartesian(i,j); } FT hm(int i, int j) const { return cartesian(i,j); } Aff_transformation_2 operator*(const Aff_transformationC2 &t) const { return (*(this->Ptr())) * (*t.Ptr()); } std::ostream & print(std::ostream &os) const; }; template < class R > std::ostream& Aff_transformationC2::print(std::ostream &os) const { this->Ptr()->print(os); return os; } template < class R > std::ostream& operator<<(std::ostream& os, const Aff_transformationC2& t) { t.print(os); return os; } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Data_accessor_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Data_accessor_2.h" namespace CGAL { template < class R_ > class Data_accessorC2 { public: typedef typename R_::FT FT; typedef typename R_::Point_2 Point; typedef R_ R; FT get_x( const Point &p) const { return( p.x()); } FT get_y( const Point &p) const { return( p.y()); } void get( const Point &p, FT &x, FT &y) const { x=get_x(p); y=get_y(p); } void set( Point& p, const FT &x, const FT &y) const { p=Point(x,y); } }; } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h" 2 namespace CGAL { template < class PT, class DA> class ConicCPA2; template < class PT, class DA> class _Min_ellipse_2_adapterC2__Ellipse; template < class _PT, class _DA> class ConicCPA2 { public: typedef _PT PT; typedef _DA DA; typedef typename _DA::FT FT; friend class _Min_ellipse_2_adapterC2__Ellipse; DA dao; FT _r, _s, _t, _u, _v, _w; Conic_type type; CGAL::Orientation o; bool empty, trivial, degenerate; void set_linear_combination (const FT& a1, const ConicCPA2& c1, const FT& a2, const ConicCPA2& c2) { _r = a1 * c1.r() + a2 * c2.r(); _s = a1 * c1.s() + a2 * c2.s(); _t = a1 * c1.t() + a2 * c2.t(); _u = a1 * c1.u() + a2 * c2.u(); _v = a1 * c1.v() + a2 * c2.v(); _w = a1 * c1.w() + a2 * c2.w(); } static void set_two_linepairs (const PT& p1, const PT& p2, const PT& p3, const PT& p4, ConicCPA2& pair1, ConicCPA2& pair2) { FT x1, y1, x2, y2, x3, y3, x4, y4; const DA& da = pair1.da(); da.get (p1, x1, y1); da.get (p2, x2, y2); da.get (p3, x3, y3); da.get (p4, x4, y4); CGAL::Orientation side1_24 = (CGAL::Orientation)(::CGAL:: sign (-x1*y4+x2*y4 +x4*y1-x2*y1 +x1*y2-x4*y2)), side3_24 = (CGAL::Orientation)(::CGAL:: sign (-x3*y4+x2*y4 +x4*y3-x2*y3 +x3*y2-x4*y2)); if (side1_24 != side3_24) { pair1.set_linepair (p1, p2, p3, p4); pair2.set_linepair (p2, p3, p4, p1); } else { CGAL::Orientation side1_32 = (CGAL::Orientation)(::CGAL:: sign (-x1*y2+x3*y2 +x2*y1-x3*y1 +x1*y3-x2*y3)); if (side1_32 != side3_24) { pair1.set_linepair (p2, p1, p3, p4); pair2.set_linepair (p1, p3, p4, p2); } else { pair1.set_linepair (p1, p3, p2, p4); pair2.set_linepair (p3, p2, p4, p1); } } } void set_ellipse (const ConicCPA2& pair1, const ConicCPA2& pair2) { FT b = FT(2) * (pair1.r() * pair2.s() + pair1.s() * pair2.r()) - pair1.t() * pair2.t(); set_linear_combination (pair2.det()-b, pair1, pair1.det()-b, pair2); } void set (const ConicCPA2& c1, const ConicCPA2& c2, const PT& p) { set_linear_combination (c2.evaluate(p), c1, -c1.evaluate(p), c2); } CGAL::Sign vol_derivative (FT dr, FT ds, FT dt, FT du, FT dv, FT dw) const { FT a1 = FT(4)*r()*ds+FT(4)*dr*s()-FT(2)*t()*dt, a0 = FT(4)*r()*s()-t()*t(), b1 = (FT(4)*r()*s()-t()*t())*dw+(FT(4)*r()*ds+FT(4)*dr*s()- FT(2)*t()*dt)*w()-u()*u()*ds - FT(2)*u()*du*s()-v()*v()*dr-FT(2)*v()*dv*r()+u()*v()*dt+ (u()*dv+du*v())*t(), b0 = (FT(4)*r()*s()-t()*t())*w() -u()*u()*s()-v()*v()*r()+u()*v()*t(), c0 = -FT(2)*a0*b1 + FT(3)*a1*b0; return ::CGAL:: sign ((int)-::CGAL:: sign (c0)*o); } double vol_minimum (FT dr, FT ds, FT dt, FT du, FT dv, FT dw) const { FT a2 = FT(4)*dr*ds-dt*dt, a1 = FT(4)*r()*ds+FT(4)*dr*s()-FT(2)*t()*dt, a0 = FT(4)*r()*s()-t()*t(), b3 = (FT(4)*dr*ds-dt*dt)*dw-du*du*ds-dv*dv*dr+du*dv*dt, b2 = (FT(4)*r()*ds+FT(4)*dr*s()-FT(2)*t()*dt)*dw+ (FT(4)*dr*ds-dt*dt)*w()-FT(2)*u()*du*ds-du*du*s()- FT(2)*v()*dv*dr-dv*dv*r()+(u()*dv+du*v())*dt+du*dv*t(), b1 = (FT(4)*r()*s()-t()*t())*dw+(FT(4)*r()*ds+FT(4)*dr*s()- FT(2)*t()*dt)*w()-u()*u()*ds - FT(2)*u()*du*s()-v()*v()*dr-FT(2)*v()*dv*r()+u()*v()*dt+ (u()*dv+du*v())*t(), b0 = (FT(4)*r()*s()-t()*t())*w() -u()*u()*s()-v()*v()*r()+u()*v()*t(), c3 = -FT(3)*a1*b3 + FT(2)*a2*b2, c2 = -FT(6)*a0*b3 - a1*b2 + FT(4)*a2*b1, c1 = -FT(4)*a0*b2 + a1*b1 + FT(6)*a2*b0, c0 = -FT(2)*a0*b1 + FT(3)*a1*b0; double roots[3]; int nr_roots = solve_cubic (CGAL::to_double(c3), CGAL::to_double(c2), CGAL::to_double(c1), CGAL::to_double(c0), roots[0], roots[1], roots[2]); (CGAL::possibly(nr_roots > 0)?(static_cast(0)): ::CGAL::precondition_fail( "nr_roots > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 173)); return best_value (roots, nr_roots, CGAL::to_double(a2), CGAL::to_double(a1), CGAL::to_double(a0), CGAL::to_double(b3), CGAL::to_double(b2), CGAL::to_double(b1), CGAL::to_double(b0)); } protected: FT det () const { return FT(4)*s()*r() - t()*t(); } void analyse( ) { FT d = det(); type = (Conic_type)(::CGAL:: sign(d)); switch (type) { case HYPERBOLA: { trivial = empty = false; FT z_prime = d*w() - u()*u()*s() - v()*v()*r() + u()*v()*t(); o = (CGAL::Orientation)(::CGAL:: sign (z_prime)); degenerate = (o == CGAL::ZERO); } break; case PARABOLA: { if (!::CGAL:: is_zero (r())) { trivial = false; degenerate = (t()*u() == FT(2)*r()*v()); if (degenerate) { CGAL::Sign discr = (CGAL::Sign) ::CGAL:: sign(u()*u()-FT(4)*r()*w()); switch (discr) { case CGAL::NEGATIVE: empty = true; o = (CGAL::Orientation)(::CGAL:: sign (w())); break; case CGAL::ZERO: empty = false; o = (CGAL::Orientation)(::CGAL:: sign (r())); break; case CGAL::POSITIVE: empty = false; o = CGAL::ZERO; break; } } else { empty = false; o = (CGAL::Orientation)(-::CGAL:: sign (r())); } } else if (!::CGAL:: is_zero (s())) { trivial = false; degenerate = (t()*v() == FT(2)*s()*u()); if (degenerate) { CGAL::Sign discr = (CGAL::Sign) ::CGAL:: sign(v()*v()-FT(4)*s()*w()); switch (discr) { case CGAL::NEGATIVE: empty = true; o = (CGAL::Orientation)(::CGAL:: sign (w())); break; case CGAL::ZERO: empty = false; o = (CGAL::Orientation)(::CGAL:: sign (s())); break; case CGAL::POSITIVE: empty = false; o = CGAL::ZERO; break; } } else { empty = false; o = (CGAL::Orientation)(-::CGAL:: sign (s())); } } else { degenerate = true; bool uv_zero = ::CGAL:: is_zero (u()) && ::CGAL:: is_zero (v()); trivial = uv_zero && ::CGAL:: is_zero (w()); empty = uv_zero && !trivial; if (empty) o = (CGAL::Orientation)(::CGAL:: sign (w())); else if (trivial) o = CGAL::POSITIVE; else o = CGAL::ZERO; } } break; case ELLIPSE: { trivial = false; FT z_prime = d*w() - u()*u()*s() - v()*v()*r() + u()*v()*t(); if (::CGAL:: is_positive (r())) { empty = ::CGAL:: sign (z_prime) == CGAL::POSITIVE; empty ? o = CGAL::POSITIVE : o = CGAL::NEGATIVE; } else { empty = ::CGAL:: sign (z_prime) == CGAL::NEGATIVE ; empty ? o = CGAL::NEGATIVE : o = CGAL::POSITIVE; } degenerate = empty || ::CGAL:: is_zero (z_prime); } break; } } FT evaluate (const PT& p) const { FT x, y; dao.get (p, x, y); return r()*x*x + s()*y*y + t()*x*y + u()*x + v()*y + w(); } public: ConicCPA2 ( const DA& da = DA()) : dao( da) { } ConicCPA2 (FT r, FT s, FT t, FT u, FT v, FT w, const DA& da = DA()) : dao( da), _r(r), _s(s), _t(t), _u(u), _v(v), _w(w) { analyse(); } const DA& da() const { return dao; } FT r() const { return _r;} FT s() const { return _s;} FT t() const { return _t;} FT u() const { return _u;} FT v() const { return _v;} FT w() const { return _w;} PT center () const { (CGAL::possibly(type != PARABOLA)?(static_cast(0)): ::CGAL::precondition_fail( "type != PARABOLA" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 322)); typename DA::Point p; FT two = FT(2); FT div = -det(); dao.set( p, (two*s()*u() - t()*v()) / div, (two*r()*v() - t()*u()) / div); return p; } Conic_type conic_type () const { return type; } bool is_hyperbola () const { return (type == HYPERBOLA); } bool is_parabola () const { return (type == PARABOLA); } bool is_ellipse () const { return (type == ELLIPSE); } bool is_circle () const { return (type == ELLIPSE && (r()==s()) && ::CGAL:: is_zero (t())); } bool is_empty () const { return empty; } bool is_trivial () const { return trivial; } bool is_degenerate () const { return degenerate; } CGAL::Orientation orientation () const { return o; } CGAL::Oriented_side oriented_side (const PT& p) const { return (CGAL::Oriented_side)(::CGAL:: sign (evaluate (p))); } bool has_on_positive_side (const PT& p) const { return (::CGAL:: is_positive (evaluate(p))); } bool has_on_negative_side (const PT& p) const { return (::CGAL:: is_negative (evaluate(p))); } bool has_on_boundary (const PT& p) const { return (::CGAL:: is_zero (evaluate(p))); } bool has_on (const PT& p) const { return (::CGAL:: is_zero (evaluate(p))); } Convex_side convex_side (const PT& p) const { switch (o) { case CGAL::POSITIVE: return (Convex_side)( ::CGAL:: sign (evaluate (p))); case CGAL::NEGATIVE: return (Convex_side)(-::CGAL:: sign (evaluate (p))); case CGAL::ZERO: return (Convex_side)( ::CGAL:: sign (::CGAL:: abs (evaluate(p)))); } return( Convex_side( 0)); } bool has_on_convex_side (const PT& p) const { return (convex_side (p) == ON_CONVEX_SIDE); } bool has_on_nonconvex_side (const PT& p) const { return (convex_side (p) == ON_NONCONVEX_SIDE); } bool operator == ( const ConicCPA2<_PT,_DA>& c) const { FT factor1(0); if ( ! ::CGAL:: is_zero( r())) factor1 = r(); else if ( ! ::CGAL:: is_zero( s())) factor1 = s(); else if ( ! ::CGAL:: is_zero( t())) factor1 = t(); else if ( ! ::CGAL:: is_zero( u())) factor1 = u(); else if ( ! ::CGAL:: is_zero( v())) factor1 = v(); else if ( ! ::CGAL:: is_zero( w())) factor1 = w(); else (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 439, "all coefficients zero")); FT factor2(0); if ( ! ::CGAL:: is_zero( c.r())) factor2 = c.r(); else if ( ! ::CGAL:: is_zero( c.s())) factor2 = c.s(); else if ( ! ::CGAL:: is_zero( c.t())) factor2 = c.t(); else if ( ! ::CGAL:: is_zero( c.u())) factor2 = c.u(); else if ( ! ::CGAL:: is_zero( c.v())) factor2 = c.v(); else if ( ! ::CGAL:: is_zero( c.w())) factor2 = c.w(); else (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 449, "all coefficients zero")); return( ( r()*factor2 == c.r()*factor1) && ( s()*factor2 == c.s()*factor1) && ( t()*factor2 == c.t()*factor1) && ( u()*factor2 == c.u()*factor1) && ( v()*factor2 == c.v()*factor1) && ( w()*factor2 == c.w()*factor1)); } void set (FT r_, FT s_, FT t_, FT u_, FT v_, FT w_) { _r = r_; _s = s_; _t = t_; _u = u_; _v = v_; _w = w_; analyse(); } void set_opposite () { _r = -r(); _s = -s(); _t = -t(); _u = -u(); _v = -v(); _w = -w(); o = CGAL::opposite(orientation()); } void set_circle (const PT& p1, const PT& p2, const PT& p3) { FT x1, y1, x2, y2, x3, y3; dao.get (p1, x1, y1); dao.get (p2, x2, y2); dao.get (p3, x3, y3); FT det = -x3*y2+x1*y2+x2*y3-x1*y3+x3*y1-x2*y1; (CGAL::possibly(!::CGAL:: is_zero (det))?(static_cast(0)): ::CGAL::precondition_fail( "!CGAL_NTS is_zero (det)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 481)); FT sqr1 = -x1*x1 - y1*y1; FT sqr2 = -x2*x2 - y2*y2; FT sqr3 = -x3*x3 - y3*y3; _u = -sqr3*y2+sqr1*y2+sqr2*y3-sqr1*y3+sqr3*y1-sqr2*y1; _v = -x3*sqr2+x1*sqr2+x2*sqr3-x1*sqr3+x3*sqr1-x2*sqr1; _w = -x3*y2*sqr1+x1*y2*sqr3+x2*y3*sqr1-x1*y3*sqr2+x3*y1*sqr2-x2*y1*sqr3; _r = det; _s = det; _t = FT(0); analyse(); (CGAL::possibly(is_circle())?(static_cast(0)): ::CGAL::postcondition_fail( "is_circle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 496)); (CGAL::possibly(has_on_boundary(p1))?(static_cast(0)): ::CGAL::postcondition_fail( "has_on_boundary(p1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 497)); (CGAL::possibly(has_on_boundary(p2))?(static_cast(0)): ::CGAL::postcondition_fail( "has_on_boundary(p2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 498)); (CGAL::possibly(has_on_boundary(p3))?(static_cast(0)): ::CGAL::postcondition_fail( "has_on_boundary(p3)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 499)); } void set_linepair (const PT& p1, const PT& p2, const PT& p3, const PT& p4) { FT x1, y1, x2, y2, x3, y3, x4, y4; dao.get (p1, x1, y1); dao.get (p2, x2, y2); dao.get (p3, x3, y3); dao.get (p4, x4, y4); (CGAL::possibly(((x1 != x2) || (y1 != y2)) && ((x3 != x4) || (y3 != y4)))?(static_cast(0)): ::CGAL::precondition_fail( "((x1 != x2) || (y1 != y2)) && ((x3 != x4) || (y3 != y4))" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h" # 511 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h" , 513 # 511 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h" )) ; FT x2_x1 = x2-x1; FT x4_x3 = x4-x3; FT y1_y2 = y1-y2; FT y3_y4 = y3-y4; FT x1y2_y1x2 = x1*y2-y1*x2; FT x3y4_y3x4 = x3*y4-y3*x4; _r = y1_y2 * y3_y4; _s = x2_x1 * x4_x3; _t = x2_x1 * y3_y4 + y1_y2 * x4_x3; _u = x1y2_y1x2 * y3_y4 + y1_y2 * x3y4_y3x4; _v = x1y2_y1x2 * x4_x3 + x2_x1 * x3y4_y3x4; _w = x1y2_y1x2 * x3y4_y3x4; analyse(); } void set_ellipse (const PT& p1, const PT& p2, const PT& p3) { FT x1, y1, x2, y2, x3, y3; dao.get (p1, x1, y1); dao.get (p2, x2, y2); dao.get (p3, x3, y3); FT det = -x3*y2+x1*y2+x2*y3-x1*y3+x3*y1-x2*y1; (CGAL::possibly(!::CGAL:: is_zero (det))?(static_cast(0)): ::CGAL::precondition_fail( "!CGAL_NTS is_zero (det)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 541)); FT x1x1 = x1*x1, y1y1 = y1*y1, x2x2 = x2*x2, y2y2 = y2*y2, x3x3 = x3*x3, y3y3 = y3*y3, two = FT(2); _r = y1y1 - y1*y2 - y1*y3 + y2y2 - y2*y3 + y3y3; _s = x1x1 - x1*x2 - x1*x3 + x2x2 - x2*x3 + x3x3; _t = -two*x1*y1 + x1*y2 + x1*y3 + y1*x2 -two*x2*y2 + x2*y3 + y1*x3 + y2*x3 -two*x3*y3; _u = -(y2y2*x3 - x2*y2*y3 - y2*x3*y3 + x1*y3y3 + x2*y3y3 + y1y1*x2 + y1y1*x3 - x1*y1*y2 - y1*x2*y2 - x1*y1*y3 - y1*x3*y3 + x1*y2y2); _v = -(x2x2*y3 - x2*y2*x3 - x2*x3*y3 + y1*x3x3 + y2*x3x3 + x1x1*y2 + x1x1*y3 - x1*y1*x2 - x1*x2*y2 - x1*y1*x3 - x1*x3*y3 + y1*x2x2); _w = y1y1*x2*x3 - x1*y1*y2*x3 - y1*x2*y2*x3 + y1*y2*x3x3 - x1*y1*x2*y3 + y1*x2x2*y3 - y1*x2*x3*y3 + x1*y2y2*x3 + x1x1*y2*y3 - x1*x2*y2*y3 - x1*y2*x3*y3 + x1*x2*y3y3; type = ELLIPSE; degenerate = trivial = empty = false; o = CGAL::NEGATIVE; if (::CGAL:: is_positive (det)) set_opposite(); } void set_ellipse (const PT& p1, const PT& p2, const PT& p3, const PT& p4, CGAL::Orientation _o = POSITIVE) { ConicCPA2 pair1, pair2; set_two_linepairs (p1, p2, p3, p4, pair1, pair2); set_ellipse (pair1, pair2); analyse(); if (o != _o) set_opposite(); } void set (const PT& p1, const PT& p2, const PT& p3, const PT& p4, const PT& p5, CGAL::Orientation _o = POSITIVE) { ConicCPA2 c1; c1.set_linepair (p1, p2, p3, p4); ConicCPA2 c2; c2.set_linepair (p1, p4, p2, p3); set_linear_combination (c2.evaluate (p5), c1, -c1.evaluate (p5), c2); analyse(); (CGAL::possibly(!is_trivial())?(static_cast(0)): ::CGAL::precondition_fail( "!is_trivial()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ConicCPA2.h", 599)); if (o != _o) set_opposite(); } }; template< class _PT, class _DA> std::ostream& operator << ( std::ostream& os, const ConicCPA2<_PT,_DA>& c) { return( os << c.r() << ' ' << c.s() << ' ' << c.t() << ' ' << c.u() << ' ' << c.v() << ' ' << c.w()); } template< class _PT, class _DA> std::istream& operator >> ( std::istream& is, ConicCPA2<_PT,_DA>& c) { typedef ConicCPA2<_PT,_DA> Conic; typedef typename _DA::FT FT; FT r, s, t, u, v, w; is >> r >> s >> t >> u >> v >> w; c.set( r, s, t, u, v, w); return( is); } } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_directions_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_directions_2.h" namespace CGAL { template < class K > inline typename K::Boolean equal_direction(const DirectionC2 &d1, const DirectionC2 &d2) { return equal_directionC2(d1.dx(), d1.dy(), d2.dx(), d2.dy()); } template < class K > inline typename K::Comparison_result compare_angle_with_x_axis(const DirectionC2 &d1, const DirectionC2 &d2) { return K().compare_angle_with_x_axis_2_object()(d1, d2); } } # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/point_constructions_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/point_constructions_2.h" namespace CGAL { template < class K > inline typename K::Point_2 line_get_point(const LineC2 &l, int i) { typename K::FT x, y; line_get_pointC2(l.a(), l.b(), l.c(), i, x, y); return PointC2(x, y); } template < class K > inline typename K::Point_2 line_project_point(const LineC2 &l, const PointC2 &p) { typename K::FT x, y; line_project_pointC2(l.a(), l.b(), l.c(), p.x(), p.y(), x, y); return PointC2(x, y); } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/line_constructions_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/line_constructions_2.h" namespace CGAL { template < class K > inline LineC2 line_from_point_direction(const PointC2 &p, const DirectionC2 &d) { return K().construct_line_2_object()(p, d); } template < class K > inline LineC2 perpendicular_through_point(const LineC2 &l, const PointC2 &p) { typename K::FT a, b, c; perpendicular_through_pointC2(l.a(), l.b(), p.x(), p.y(), a, b, c); return LineC2(a, b, c); } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/ft_constructions_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/ft_constructions_2.h" namespace CGAL { template < class K > inline typename K::FT squared_distance(const PointC2 &p, const PointC2 &q) { return squared_distanceC2(p.x(), p.y(), q.x(), q.y()); } template < class K > inline typename K::FT scaled_distance_to_line(const LineC2 &l, const PointC2 &p) { return scaled_distance_to_lineC2(l.a(), l.b(), l.c(), p.x(), p.y()); } template < class K > inline typename K::FT scaled_distance_to_line(const PointC2 &p, const PointC2 &q, const PointC2 &r) { return scaled_distance_to_lineC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } template < class K > inline typename K::FT line_y_at_x(const LineC2 &l, const typename K::FT &x) { return line_y_at_xC2(l.a(), l.b(), l.c(), x); } template < class K > inline typename K::FT line_x_at_y(const LineC2 &l, const typename K::FT &y) { return line_y_at_xC2(l.b(), l.a(), l.c(), y); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_2.h" 2 # 48 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Point_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Point_3.h" namespace CGAL { template < class R_ > class PointC3 { typedef typename R_::FT FT; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Point_3 Point_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; Vector_3 base; public: typedef typename Vector_3::Cartesian_const_iterator Cartesian_const_iterator; typedef R_ R; PointC3() {} PointC3(const Origin &) : base(NULL_VECTOR) {} PointC3(const FT &x, const FT &y, const FT &z) : base(x, y, z) {} PointC3(const FT &x, const FT &y, const FT &z, const FT &w) : base(x, y, z, w) {} const FT & x() const { return base.x(); } const FT & y() const { return base.y(); } const FT & z() const { return base.z(); } const FT & hx() const { return base.hx(); } const FT & hy() const { return base.hy(); } const FT & hz() const { return base.hz(); } const FT & hw() const { return base.hw(); } const FT & cartesian(int i) const; const FT & operator[](int i) const; const FT & homogeneous(int i) const; Cartesian_const_iterator cartesian_begin() const { return base.cartesian_begin(); } Cartesian_const_iterator cartesian_end() const { return base.cartesian_end(); } int dimension() const { return base.dimension(); } Point_3 transform(const Aff_transformation_3 &t) const { return t.transform(*this); } }; template < class R > inline const typename PointC3::FT & PointC3::cartesian(int i) const { return base.cartesian(i); } template < class R > inline const typename PointC3::FT & PointC3::operator[](int i) const { return base[i]; } template < class R > inline const typename PointC3::FT & PointC3::homogeneous(int i) const { return base.homogeneous(i); } } # 50 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Vector_3.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Vector_3.h" namespace CGAL { template < class R_ > class VectorC3 { typedef typename R_::FT FT_; typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Segment_3 Segment_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Direction_3 Direction_3; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef typename Rep::const_iterator Cartesian_const_iterator; typedef R_ R; VectorC3() {} VectorC3(const Null_vector &n) { *this = R().construct_vector_3_object()(n); } VectorC3(const Point_3 &a, const Point_3 &b) { *this = R().construct_vector_3_object()(a, b); } explicit VectorC3(const Segment_3 &s) { *this = R().construct_vector_3_object()(s); } explicit VectorC3(const Ray_3 &r) { *this = R().construct_vector_3_object()(r); } explicit VectorC3(const Line_3 &l) { *this = R().construct_vector_3_object()(l); } VectorC3(const FT_ &x, const FT_ &y, const FT_ &z) : base(CGAL::make_array(x, y, z)) {} VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w) : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w) : CGAL::make_array(x, y, z) ) {} const FT_ & x() const { return get(base)[0]; } const FT_ & y() const { return get(base)[1]; } const FT_ & z() const { return get(base)[2]; } const FT_ & hx() const { return x(); } const FT_ & hy() const { return y(); } const FT_ & hz() const { return z(); } const FT_ & hw() const { return constant(); } Cartesian_const_iterator cartesian_begin() const { return get(base).begin(); } Cartesian_const_iterator cartesian_end() const { return get(base).end(); } const FT_ & cartesian(int i) const; const FT_ & operator[](int i) const; const FT_ & homogeneous(int i) const; int dimension() const { return 3; } Vector_3 operator+(const VectorC3 &w) const; Vector_3 operator-(const VectorC3 &w) const; Vector_3 operator-() const; Vector_3 operator/(const FT_ &c) const; FT_ squared_length() const; Direction_3 direction() const; }; template < class R > inline bool operator==(const VectorC3 &v, const VectorC3 &w) { return w.x() == v.x() && w.y() == v.y() && w.z() == v.z(); } template < class R > inline bool operator!=(const VectorC3 &v, const VectorC3 &w) { return !(v == w); } template < class R > inline bool operator==(const VectorC3 &v, const Null_vector &) { return ::CGAL:: is_zero(v.x()) && ::CGAL:: is_zero(v.y()) && ::CGAL:: is_zero(v.z()); } template < class R > inline bool operator==(const Null_vector &n, const VectorC3 &v) { return v == n; } template < class R > inline bool operator!=(const VectorC3 &v, const Null_vector &n) { return !(v == n); } template < class R > inline bool operator!=(const Null_vector &n, const VectorC3 &v) { return !(v == n); } template < class R > inline const typename VectorC3::FT_ & VectorC3::cartesian(int i) const { (CGAL::possibly((i>=0) & (i<3))?(static_cast(0)): ::CGAL::precondition_fail( "(i>=0) & (i<3)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Vector_3.h", 192)); if (i==0) return x(); if (i==1) return y(); return z(); } template < class R > inline const typename VectorC3::FT_ & VectorC3::operator[](int i) const { return cartesian(i); } template < class R > const typename VectorC3::FT_ & VectorC3::homogeneous(int i) const { if (i==3) return hw(); return cartesian(i); } template < class R > inline typename VectorC3::Vector_3 VectorC3:: operator+(const VectorC3 &w) const { return VectorC3(x() + w.x(), y() + w.y(), z() + w.z()); } template < class R > inline typename VectorC3::Vector_3 VectorC3::operator-(const VectorC3 &w) const { return VectorC3(x() - w.x(), y() - w.y(), z() - w.z()); } template < class R > inline typename VectorC3::Vector_3 VectorC3::operator-() const { return R().construct_opposite_vector_3_object()(*this); } template < class R > inline typename VectorC3::FT_ VectorC3::squared_length() const { return ::CGAL:: square(x()) + ::CGAL:: square(y()) + ::CGAL:: square(z()); } template < class R > inline typename VectorC3::Vector_3 VectorC3:: operator/(const typename VectorC3::FT_ &c) const { return VectorC3(x()/c, y()/c, z()/c); } template < class R > inline typename VectorC3::Direction_3 VectorC3::direction() const { return Direction_3(*this); } } # 51 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Direction_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Direction_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC3.h" namespace CGAL { template < class FT > inline void midpointC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, FT &x, FT &y, FT &z) { x = (px + qx) / 2; y = (py + qy) / 2; z = (pz + qz) / 2; } template < class FT > void barycenterC3(const FT &p1x, const FT &p1y, const FT &p1z, const FT &w1, const FT &p2x, const FT &p2y, const FT &p2z, FT &x, FT &y, FT &z) { FT w2 = 1 - w1; x = w1 * p1x + w2 * p2x; y = w1 * p1y + w2 * p2y; z = w1 * p1z + w2 * p2z; } template < class FT > void barycenterC3(const FT &p1x, const FT &p1y, const FT &p1z, const FT &w1, const FT &p2x, const FT &p2y, const FT &p2z, const FT &w2, FT &x, FT &y, FT &z) { FT sum = w1 + w2; (CGAL::possibly(sum != 0)?(static_cast(0)): ::CGAL::assertion_fail( "sum != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC3.h", 63)); x = (w1 * p1x + w2 * p2x) / sum; y = (w1 * p1y + w2 * p2y) / sum; z = (w1 * p1z + w2 * p2z) / sum; } template < class FT > void barycenterC3(const FT &p1x, const FT &p1y, const FT &p1z, const FT &w1, const FT &p2x, const FT &p2y, const FT &p2z, const FT &w2, const FT &p3x, const FT &p3y, const FT &p3z, FT &x, FT &y, FT &z) { FT w3 = 1 - w1 - w2; x = w1 * p1x + w2 * p2x + w3 * p3x; y = w1 * p1y + w2 * p2y + w3 * p3y; z = w1 * p1z + w2 * p2z + w3 * p3z; } template < class FT > void barycenterC3(const FT &p1x, const FT &p1y, const FT &p1z, const FT &w1, const FT &p2x, const FT &p2y, const FT &p2z, const FT &w2, const FT &p3x, const FT &p3y, const FT &p3z, const FT &w3, FT &x, FT &y, FT &z) { FT sum = w1 + w2 + w3; (CGAL::possibly(sum != 0)?(static_cast(0)): ::CGAL::assertion_fail( "sum != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC3.h", 90)); x = (w1 * p1x + w2 * p2x + w3 * p3x) / sum; y = (w1 * p1y + w2 * p2y + w3 * p3y) / sum; z = (w1 * p1z + w2 * p2z + w3 * p3z) / sum; } template < class FT > void barycenterC3(const FT &p1x, const FT &p1y, const FT &p1z, const FT &w1, const FT &p2x, const FT &p2y, const FT &p2z, const FT &w2, const FT &p3x, const FT &p3y, const FT &p3z, const FT &w3, const FT &p4x, const FT &p4y, const FT &p4z, FT &x, FT &y, FT &z) { FT w4 = 1 - w1 - w2 - w3; x = w1 * p1x + w2 * p2x + w3 * p3x + w4 * p4x; y = w1 * p1y + w2 * p2y + w3 * p3y + w4 * p4y; z = w1 * p1z + w2 * p2z + w3 * p3z + w4 * p4z; } template < class FT > void barycenterC3(const FT &p1x, const FT &p1y, const FT &p1z, const FT &w1, const FT &p2x, const FT &p2y, const FT &p2z, const FT &w2, const FT &p3x, const FT &p3y, const FT &p3z, const FT &w3, const FT &p4x, const FT &p4y, const FT &p4z, const FT &w4, FT &x, FT &y, FT &z) { FT sum = w1 + w2 + w3 + w4; (CGAL::possibly(sum != 0)?(static_cast(0)): ::CGAL::assertion_fail( "sum != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC3.h", 119)); x = (w1 * p1x + w2 * p2x + w3 * p3x + w4 * p4x) / sum; y = (w1 * p1y + w2 * p2y + w3 * p3y + w4 * p4y) / sum; z = (w1 * p1z + w2 * p2z + w3 * p3z + w4 * p4z) / sum; } template < class FT > void centroidC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, const FT &sx, const FT &sy, const FT &sz, FT &x, FT &y, FT &z) { x = (px + qx + rx + sx) / 4; y = (py + qy + ry + sy) / 4; z = (pz + qz + rz + sz) / 4; } template < class FT > void centroidC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, FT &x, FT &y, FT &z) { x = (px + qx + rx) / 3; y = (py + qy + ry) / 3; z = (pz + qz + rz) / 3; } template < class FT > FT squared_radiusC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, const FT &sx, const FT &sy, const FT &sz) { FT qpx = qx-px; FT qpy = qy-py; FT qpz = qz-pz; FT qp2 = ::CGAL:: square(qpx) + ::CGAL:: square(qpy) + ::CGAL:: square(qpz); FT rpx = rx-px; FT rpy = ry-py; FT rpz = rz-pz; FT rp2 = ::CGAL:: square(rpx) + ::CGAL:: square(rpy) + ::CGAL:: square(rpz); FT spx = sx-px; FT spy = sy-py; FT spz = sz-pz; FT sp2 = ::CGAL:: square(spx) + ::CGAL:: square(spy) + ::CGAL:: square(spz); FT num_x = determinant(qpy,qpz,qp2, rpy,rpz,rp2, spy,spz,sp2); FT num_y = determinant(qpx,qpz,qp2, rpx,rpz,rp2, spx,spz,sp2); FT num_z = determinant(qpx,qpy,qp2, rpx,rpy,rp2, spx,spy,sp2); FT den = determinant(qpx,qpy,qpz, rpx,rpy,rpz, spx,spy,spz); (CGAL::possibly(! ::CGAL:: is_zero(den))?(static_cast(0)): ::CGAL::assertion_fail( "! CGAL_NTS is_zero(den)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC3.h", 184)); return (::CGAL:: square(num_x) + ::CGAL:: square(num_y) + ::CGAL:: square(num_z)) / ::CGAL:: square(2 * den); } template < class FT > FT squared_radiusC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &sx, const FT &sy, const FT &sz) { FT psx = px-sx; FT psy = py-sy; FT psz = pz-sz; FT ps2 = ::CGAL:: square(psx) + ::CGAL:: square(psy) + ::CGAL:: square(psz); FT qsx = qx-sx; FT qsy = qy-sy; FT qsz = qz-sz; FT qs2 = ::CGAL:: square(qsx) + ::CGAL:: square(qsy) + ::CGAL:: square(qsz); FT rsx = psy*qsz-psz*qsy; FT rsy = psz*qsx-psx*qsz; FT rsz = psx*qsy-psy*qsx; FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz) - qs2 * determinant(psy,psz,rsy,rsz); FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz) - qs2 * determinant(psx,psz,rsx,rsz); FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy) - qs2 * determinant(psx,psy,rsx,rsy); FT den = determinant(psx,psy,psz, qsx,qsy,qsz, rsx,rsy,rsz); (CGAL::possibly(den != 0)?(static_cast(0)): ::CGAL::assertion_fail( "den != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/constructions/kernel_ftC3.h", 221)); return (::CGAL:: square(num_x) + ::CGAL:: square(num_y) + ::CGAL:: square(num_z)) / ::CGAL:: square(2 * den); } template void plane_from_pointsC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, FT &pa, FT &pb, FT &pc, FT &pd) { FT rpx = px-rx; FT rpy = py-ry; FT rpz = pz-rz; FT rqx = qx-rx; FT rqy = qy-ry; FT rqz = qz-rz; pa = rpy*rqz - rqy*rpz; pb = rpz*rqx - rqz*rpx; pc = rpx*rqy - rqx*rpy; pd = - pa*rx - pb*ry - pc*rz; } template void plane_from_point_directionC3(const FT &px, const FT &py, const FT &pz, const FT &dx, const FT &dy, const FT &dz, FT &pa, FT &pb, FT &pc, FT &pd) { pa = dx; pb = dy; pc = dz; pd = -dx*px - dy*py - dz*pz; } template void point_on_planeC3(const FT &pa, const FT &pb, const FT &pc, const FT &pd, FT &x, FT &y, FT &z) { x = y = z = 0; if (! ::CGAL:: is_zero(pa)) x = -pd/pa; else if (! ::CGAL:: is_zero(pb)) y = -pd/pb; else z = -pd/pc; } template void projection_planeC3(const FT &pa, const FT &pb, const FT &pc, const FT &pd, const FT &px, const FT &py, const FT &pz, FT &x, FT &y, FT &z) { FT num = pa*px + pb*py + pc*pz + pd; FT den = pa*pa + pb*pb + pc*pc; FT lambda = num / den; x = px - lambda * pa; y = py - lambda * pb; z = pz - lambda * pc; } template < class FT > inline FT squared_distanceC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return ::CGAL:: square(px-qx) + ::CGAL:: square(py-qy) + ::CGAL:: square(pz-qz); } template < class FT > inline FT squared_radiusC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return squared_distanceC3(px, py, pz, qx, qy, qz) / 4; } template < class FT > inline FT scaled_distance_to_directionC3(const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz) { return pa*px + pb*py + pc*pz; } template < class FT > inline FT scaled_distance_to_planeC3( const FT &pa, const FT &pb, const FT &pc, const FT &pd, const FT &px, const FT &py, const FT &pz) { return pa*px + pb*py + pc*pz + pd; } template < class FT > inline FT scaled_distance_to_planeC3( const FT &ppx, const FT &ppy, const FT &ppz, const FT &pqx, const FT &pqy, const FT &pqz, const FT &prx, const FT &pry, const FT &prz, const FT &px, const FT &py, const FT &pz) { return determinant(ppx-px,ppy-py,ppz-pz, pqx-px,pqy-py,pqz-pz, prx-px,pry-py,prz-pz); } template < class FT > inline void bisector_of_pointsC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, FT &a, FT &b, FT &c, FT &d) { a = 2*(px - qx); b = 2*(py - qy); c = 2*(pz - qz); d = ::CGAL:: square(qx) + ::CGAL:: square(qy) + ::CGAL:: square(qz) - ::CGAL:: square(px) - ::CGAL:: square(py) - ::CGAL:: square(pz); } template < class FT > void bisector_of_planesC3(const FT &pa, const FT &pb, const FT &pc, const FT &pd, const FT &qa, const FT &qb, const FT &qc, const FT &qd, FT &a, FT &b, FT &c, FT &d) { FT n1 = ::CGAL:: sqrt(::CGAL:: square(pa) + ::CGAL:: square(pb) + ::CGAL:: square(pc)); FT n2 = ::CGAL:: sqrt(::CGAL:: square(qa) + ::CGAL:: square(qb) + ::CGAL:: square(qc)); a = n2 * pa + n1 * qa; b = n2 * pb + n1 * qb; c = n2 * pc + n1 * qc; d = n2 * pd + n1 * qd; if (a == 0 && b == 0 && c == 0) { a = n2 * pa - n1 * qa; b = n2 * pb - n1 * qb; c = n2 * pc - n1 * qc; d = n2 * pd - n1 * qd; } } template < class FT > FT squared_areaC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { FT dqx = qx-px; FT dqy = qy-py; FT dqz = qz-pz; FT drx = rx-px; FT dry = ry-py; FT drz = rz-pz; FT vx = dqy*drz-dqz*dry; FT vy = dqz*drx-dqx*drz; FT vz = dqx*dry-dqy*drx; return (::CGAL:: square(vx) + ::CGAL:: square(vy) + ::CGAL:: square(vz))/4; } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC3.h" 2 namespace CGAL { template < class FT > inline typename Equal_to::result_type parallelC3(const FT &v1x, const FT &v1y, const FT &v1z, const FT &v2x, const FT &v2y, const FT &v2z) { return __extension__ ({ CGAL::Uncertain CGAL_TMP = (sign_of_determinant(v1x, v2x, v1y, v2y) == ZERO); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((__extension__ ({ CGAL::Uncertain CGAL_TMP = (sign_of_determinant(v1x, v2x, v1z, v2z) == ZERO); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((sign_of_determinant(v1y, v2y, v1z, v2z) == ZERO)); }))); }) ; } template < class FT > typename Equal_to::result_type parallelC3(const FT &s1sx, const FT &s1sy, const FT &s1sz, const FT &s1tx, const FT &s1ty, const FT &s1tz, const FT &s2sx, const FT &s2sy, const FT &s2sz, const FT &s2tx, const FT &s2ty, const FT &s2tz) { FT v1x = s1tx - s1sx; FT v1y = s1ty - s1sy; FT v1z = s1tz - s1sz; FT v2x = s2tx - s2sx; FT v2y = s2ty - s2sy; FT v2z = s2tz - s2sz; return parallelC3(v1x, v1y, v1z, v2x, v2y, v2z); } template < class FT > typename Compare::result_type compare_lexicographically_xyzC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { typedef typename Compare::result_type Cmp; Cmp c = ::CGAL:: compare(px, qx); if (c != EQUAL) return c; c = ::CGAL:: compare(py, qy); if (c != EQUAL) return c; return ::CGAL:: compare(pz, qz); } template < class FT > typename Equal_to::result_type strict_dominanceC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return __extension__ ({ CGAL::Uncertain CGAL_TMP = (::CGAL:: compare(px, qx) == LARGER); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((__extension__ ({ CGAL::Uncertain CGAL_TMP = (::CGAL:: compare(py, qy) == LARGER); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((::CGAL:: compare(pz, qz) == LARGER)); }))); }) ; } template < class FT > typename Equal_to::result_type dominanceC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return __extension__ ({ CGAL::Uncertain CGAL_TMP = (::CGAL:: compare(px, qx) != SMALLER); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((__extension__ ({ CGAL::Uncertain CGAL_TMP = (::CGAL:: compare(py, qy) != SMALLER); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((::CGAL:: compare(pz, qz) != SMALLER)); }))); }) ; } template < class FT > typename Equal_to::result_type collinearC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { FT dpx = px-rx; FT dqx = qx-rx; FT dpy = py-ry; FT dqy = qy-ry; if (sign_of_determinant(dpx, dqx, dpy, dqy) != ZERO) return false; FT dpz = pz-rz; FT dqz = qz-rz; return __extension__ ({ CGAL::Uncertain CGAL_TMP = (sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO)); }) ; } template < class FT > typename Same_uncertainty_nt::type orientationC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, const FT &sx, const FT &sy, const FT &sz) { return sign_of_determinant(qx-px,rx-px,sx-px, qy-py,ry-py,sy-py, qz-pz,rz-pz,sz-pz); } template < class FT > typename Same_uncertainty_nt::type orientationC3(const FT &ux, const FT &uy, const FT &uz, const FT &vx, const FT &vy, const FT &vz, const FT &wx, const FT &wy, const FT &wz) { return sign_of_determinant(ux, vx, wx, uy, vy, wy, uz, vz, wz); } template < class FT > inline typename Same_uncertainty_nt::type angleC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { return enum_cast(::CGAL:: sign((px-qx)*(rx-qx)+ (py-qy)*(ry-qy)+ (pz-qz)*(rz-qz))); } template < class FT > typename Same_uncertainty_nt::type coplanar_orientationC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, const FT &sx, const FT &sy, const FT &sz) { typedef typename Same_uncertainty_nt::type Ori; Ori oxy_pqr = orientationC2(px,py,qx,qy,rx,ry); if (oxy_pqr != COLLINEAR) return oxy_pqr * orientationC2(px,py,qx,qy,sx,sy); Ori oyz_pqr = orientationC2(py,pz,qy,qz,ry,rz); if (oyz_pqr != COLLINEAR) return oyz_pqr * orientationC2(py,pz,qy,qz,sy,sz); Ori oxz_pqr = orientationC2(px,pz,qx,qz,rx,rz); (CGAL::possibly(oxz_pqr != COLLINEAR)?(static_cast(0)): ::CGAL::assertion_fail( "oxz_pqr != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates/kernel_ftC3.h", 173)); return oxz_pqr * orientationC2(px,pz,qx,qz,sx,sz); } template < class FT > typename Same_uncertainty_nt::type coplanar_orientationC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { typedef typename Same_uncertainty_nt::type Ori; Ori oxy_pqr = orientationC2(px,py,qx,qy,rx,ry); if (oxy_pqr != COLLINEAR) return oxy_pqr; Ori oyz_pqr = orientationC2(py,pz,qy,qz,ry,rz); if (oyz_pqr != COLLINEAR) return oyz_pqr; return orientationC2(px,pz,qx,qz,rx,rz); } template < class FT > typename Same_uncertainty_nt::type coplanar_side_of_bounded_circleC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, const FT &tx, const FT &ty, const FT &tz) { FT ptx = px - tx; FT pty = py - ty; FT ptz = pz - tz; FT pt2 = ::CGAL:: square(ptx) + ::CGAL:: square(pty) + ::CGAL:: square(ptz); FT qtx = qx - tx; FT qty = qy - ty; FT qtz = qz - tz; FT qt2 = ::CGAL:: square(qtx) + ::CGAL:: square(qty) + ::CGAL:: square(qtz); FT rtx = rx - tx; FT rty = ry - ty; FT rtz = rz - tz; FT rt2 = ::CGAL:: square(rtx) + ::CGAL:: square(rty) + ::CGAL:: square(rtz); FT pqx = qx - px; FT pqy = qy - py; FT pqz = qz - pz; FT prx = rx - px; FT pry = ry - py; FT prz = rz - pz; FT vx = pqy*prz - pqz*pry; FT vy = pqz*prx - pqx*prz; FT vz = pqx*pry - pqy*prx; FT v2 = ::CGAL:: square(vx) + ::CGAL:: square(vy) + ::CGAL:: square(vz); return enum_cast(sign_of_determinant(ptx,pty,ptz,pt2, rtx,rty,rtz,rt2, qtx,qty,qtz,qt2, vx,vy,vz,v2)); } template < class FT > typename Equal_to::result_type collinear_are_ordered_along_lineC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { if (px < qx) return !(rx < qx); if (qx < px) return !(qx < rx); if (py < qy) return !(ry < qy); if (qy < py) return !(qy < ry); if (pz < qz) return !(rz < qz); if (qz < pz) return !(qz < rz); return true; } template < class FT > typename Equal_to::result_type collinear_are_strictly_ordered_along_lineC3( const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { if (px < qx) return (qx < rx); if (qx < px) return (rx < qx); if (py < qy) return (qy < ry); if (qy < py) return (ry < qy); if (pz < qz) return (qz < rz); if (qz < pz) return (rz < qz); return false; } template < class FT > typename Equal_to::result_type equal_directionC3(const FT &dx1, const FT &dy1, const FT &dz1, const FT &dx2, const FT &dy2, const FT &dz2) { return sign_of_determinant(dx1, dy1, dx2, dy2) == ZERO && sign_of_determinant(dx1, dz1, dx2, dz2) == ZERO && sign_of_determinant(dy1, dz1, dy2, dz2) == ZERO && ::CGAL:: sign(dx1) == ::CGAL:: sign(dx2) && ::CGAL:: sign(dy1) == ::CGAL:: sign(dy2) && ::CGAL:: sign(dz1) == ::CGAL:: sign(dz2); } template < class FT > typename Equal_to::result_type equal_planeC3(const FT &ha, const FT &hb, const FT &hc, const FT &hd, const FT &pa, const FT &pb, const FT &pc, const FT &pd) { typedef typename Sgn::result_type Sg; if (!equal_directionC3(ha, hb, hc, pa, pb, pc)) return false; Sg s1a = ::CGAL:: sign(ha); if (s1a != ZERO) return __extension__ ({ CGAL::Uncertain CGAL_TMP = (s1a == ::CGAL:: sign(pa)); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((sign_of_determinant(pa, pd, ha, hd) == ZERO)); }) ; Sg s1b = ::CGAL:: sign(hb); if (s1b != ZERO) return s1b == ::CGAL:: sign(pb) && sign_of_determinant(pb, pd, hb, hd) == ZERO; return ::CGAL:: sign(pc) == ::CGAL:: sign(hc) && sign_of_determinant(pc, pd, hc, hd) == ZERO; } template typename Same_uncertainty_nt::type side_of_oriented_planeC3(const FT &a, const FT &b, const FT &c, const FT &d, const FT &px, const FT &py, const FT &pz) { return ::CGAL:: sign(a*px + b*py + c*pz + d); } template typename Same_uncertainty_nt::type side_of_oriented_sphereC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, const FT &sx, const FT &sy, const FT &sz, const FT &tx, const FT &ty, const FT &tz) { FT ptx = px - tx; FT pty = py - ty; FT ptz = pz - tz; FT pt2 = ::CGAL:: square(ptx) + ::CGAL:: square(pty) + ::CGAL:: square(ptz); FT qtx = qx - tx; FT qty = qy - ty; FT qtz = qz - tz; FT qt2 = ::CGAL:: square(qtx) + ::CGAL:: square(qty) + ::CGAL:: square(qtz); FT rtx = rx - tx; FT rty = ry - ty; FT rtz = rz - tz; FT rt2 = ::CGAL:: square(rtx) + ::CGAL:: square(rty) + ::CGAL:: square(rtz); FT stx = sx - tx; FT sty = sy - ty; FT stz = sz - tz; FT st2 = ::CGAL:: square(stx) + ::CGAL:: square(sty) + ::CGAL:: square(stz); return sign_of_determinant(ptx,pty,ptz,pt2, rtx,rty,rtz,rt2, qtx,qty,qtz,qt2, stx,sty,stz,st2); } template typename Same_uncertainty_nt::type side_of_bounded_sphereC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz, const FT &sx, const FT &sy, const FT &sz, const FT &tx, const FT &ty, const FT &tz) { return enum_cast( side_of_oriented_sphereC3(px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz, tx, ty, tz) * orientationC3(px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz) ); } template typename Same_uncertainty_nt::type side_of_bounded_sphereC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &tx, const FT &ty, const FT &tz) { return enum_cast( ::CGAL:: sign((tx-px)*(qx-tx) + (ty-py)*(qy-ty) + (tz-pz)*(qz-tz)) ); } template < class FT > inline typename Compare::result_type cmp_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { return ::CGAL:: compare(squared_distanceC3(px,py,pz,qx,qy,qz), squared_distanceC3(px,py,pz,rx,ry,rz)); } template typename Same_uncertainty_nt::type side_of_bounded_sphereC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &sx, const FT &sy, const FT &sz, const FT &tx, const FT &ty, const FT &tz) { FT psx = px-sx; FT psy = py-sy; FT psz = pz-sz; FT ps2 = ::CGAL:: square(psx) + ::CGAL:: square(psy) + ::CGAL:: square(psz); FT qsx = qx-sx; FT qsy = qy-sy; FT qsz = qz-sz; FT qs2 = ::CGAL:: square(qsx) + ::CGAL:: square(qsy) + ::CGAL:: square(qsz); FT rsx = psy*qsz-psz*qsy; FT rsy = psz*qsx-psx*qsz; FT rsz = psx*qsy-psy*qsx; FT tsx = tx-sx; FT tsy = ty-sy; FT tsz = tz-sz; FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz) - qs2 * determinant(psy,psz,rsy,rsz); FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz) - qs2 * determinant(psx,psz,rsx,rsz); FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy) - qs2 * determinant(psx,psy,rsx,rsy); FT den2 = 2 * determinant(psx,psy,psz, qsx,qsy,qsz, rsx,rsy,rsz); return enum_cast( cmp_dist_to_pointC3(num_x, - num_y, num_z, psx*den2, psy*den2, psz*den2, tsx*den2, tsy*den2, tsz*den2) ); } template < class FT > typename Equal_to::result_type has_larger_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { return cmp_dist_to_pointC3(px,py,pz,qx,qy,qz,rx,ry,rz) == LARGER; } template < class FT > typename Equal_to::result_type has_smaller_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz) { return cmp_dist_to_pointC3(px,py,pz,qx,qy,qz,rx,ry,rz) == SMALLER; } template < class FT > typename Compare::result_type cmp_signed_dist_to_directionC3( const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return ::CGAL:: compare(scaled_distance_to_directionC3(pa,pb,pc,px,py,pz), scaled_distance_to_directionC3(pa,pb,pc,qx,qy,qz)); } template < class FT > typename Equal_to::result_type has_larger_signed_dist_to_directionC3( const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return cmp_signed_dist_to_directionC3(pa,pb,pc,px,py,pz,qx,qy,qz) == LARGER; } template < class FT > typename Equal_to::result_type has_smaller_signed_dist_to_directionC3( const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return cmp_signed_dist_to_directionC3(pa,pb,pc,px,py,pz,qx,qy,qz) == SMALLER; } template < class FT > typename Compare::result_type cmp_signed_dist_to_planeC3( const FT &ppx, const FT &ppy, const FT &ppz, const FT &pqx, const FT &pqy, const FT &pqz, const FT &prx, const FT &pry, const FT &prz, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return sign_of_determinant( pqx-ppx, pqy-ppy, pqz-ppz, prx-ppx, pry-ppy, prz-ppz, px-qx, py-qy, pz-qz); } template < class FT > typename Equal_to::result_type has_larger_signed_dist_to_planeC3( const FT &ppx, const FT &ppy, const FT &ppz, const FT &pqx, const FT &pqy, const FT &pqz, const FT &prx, const FT &pry, const FT &prz, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return cmp_signed_dist_to_planeC3(ppx, ppy, ppz, pqx, pqy, pqz, prx, pry, prz, px, py, pz, qx, qy, qz) == LARGER; } template < class FT > typename Equal_to::result_type has_smaller_signed_dist_to_planeC3( const FT &ppx, const FT &ppy, const FT &ppz, const FT &pqx, const FT &pqy, const FT &pqz, const FT &prx, const FT &pry, const FT &prz, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz) { return cmp_signed_dist_to_planeC3(ppx, ppy, ppz, pqx, pqy, pqz, prx, pry, prz, px, py, pz, qx, qy, qz) == SMALLER; } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Direction_3.h" 2 namespace CGAL { template < class R_ > class DirectionC3 { typedef typename R_::FT FT; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Segment_3 Segment_3; typedef typename R_::Direction_3 Direction_3; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; DirectionC3() {} explicit DirectionC3(const Vector_3 &v) : base(CGAL::make_array(v.x(), v.y(), v.z())) {} explicit DirectionC3(const Line_3 &l) { *this = l.rep().direction(); } explicit DirectionC3(const Ray_3 &r) { *this = r.direction(); } explicit DirectionC3(const Segment_3 &s) { *this = s.direction(); } DirectionC3(const FT &x, const FT &y, const FT &z) : base(CGAL::make_array(x, y, z)) {} typename R::Boolean operator==(const DirectionC3 &d) const; typename R::Boolean operator!=(const DirectionC3 &d) const; Vector_3 to_vector() const; Vector_3 vector() const { return to_vector(); } const FT & dx() const { return get(base)[0]; } const FT & dy() const { return get(base)[1]; } const FT & dz() const { return get(base)[2]; } const FT & hdx() const { return dx(); } const FT & hdy() const { return dy(); } const FT & hdz() const { return dz(); } FT hw() const { return FT(1); } }; template < class R > inline typename R::Boolean DirectionC3::operator==(const DirectionC3 &d) const { if (CGAL::identical(base, d.base)) return true; return equal_directionC3(dx(), dy(), dz(), d.dx(), d.dy(), d.dz()); } template < class R > inline typename R::Boolean DirectionC3::operator!=(const DirectionC3 &d) const { return !(*this == d); } template < class R > inline typename DirectionC3::Vector_3 DirectionC3::to_vector() const { return Vector_3(dx(), dy(), dz()); } } # 52 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Line_3.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Line_3.h" namespace CGAL { template < class R_ > class LineC3 { typedef typename R_::RT RT; typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Segment_3 Segment_3; typedef std::pair Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; LineC3() {} LineC3(const Point_3 &p, const Point_3 &q) { *this = R().construct_line_3_object()(p, q); } explicit LineC3(const Segment_3 &s) { *this = R().construct_line_3_object()(s); } explicit LineC3(const Ray_3 &r) { *this = R().construct_line_3_object()(r); } LineC3(const Point_3 &p, const Vector_3 &v) : base(p, v) {} LineC3(const Point_3 &p, const Direction_3 &d) { *this = R().construct_line_3_object()(p, d); } bool operator==(const LineC3 &l) const; bool operator!=(const LineC3 &l) const; Plane_3 perpendicular_plane(const Point_3 &p) const; Line_3 opposite() const; const Point_3 & point() const { return get(base).first; } const Vector_3 & to_vector() const { return get(base).second; } Direction_3 direction() const { return Direction_3(to_vector()); } Point_3 point(int i) const; bool has_on(const Point_3 &p) const; bool is_degenerate() const; }; template < class R > inline bool LineC3::operator==(const LineC3 &l) const { if (CGAL::identical(base, l.base)) return true; return has_on(l.point()) && (direction() == l.direction()); } template < class R > inline bool LineC3::operator!=(const LineC3 &l) const { return !(*this == l); } template < class R > inline typename LineC3::Point_3 LineC3::point(int i) const { return point() + to_vector()*RT(i); } template < class R > inline typename LineC3::Plane_3 LineC3:: perpendicular_plane(const typename LineC3::Point_3 &p) const { return Plane_3(p, to_vector()); } template < class R > inline typename LineC3::Line_3 LineC3::opposite() const { return Line_3(point(), -to_vector()); } template < class R > inline bool LineC3:: has_on(const typename LineC3::Point_3 &p) const { return collinear(point(), point()+to_vector(), p); } template < class R > inline bool LineC3::is_degenerate() const { return to_vector() == NULL_VECTOR; } } # 53 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Plane_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Plane_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/solve_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/solve_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/solve.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/solve.h" namespace CGAL { template void solve (const FT &a1, const FT &a2, const FT &a3, const FT &b1, const FT &b2, const FT &b3, const FT &c1, const FT &c2, const FT &c3, const FT &d1, const FT &d2, const FT &d3, FT &x, FT &y, FT &z) { # 50 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/solve.h" FT ab23 = a3*b2 - a2*b3; FT ab13 = a3*b1 - a1*b3; FT ab12 = a2*b1 - a1*b2; FT denom = ab23*c1 - ab13*c2 + ab12*c3; FT cd23 = c3*d2 - c2*d3; FT cd13 = c3*d1 - c1*d3; FT cd12 = c2*d1 - c1*d2; x = (b3*cd12 - b2*cd13 + b1*cd23)/denom; y = (a2*cd13 - cd12*a3 - cd23*a1)/denom; z = (ab23*d1 + ab12*d3 - ab13*d2)/denom; } template void solve_quadratic (const FT &a1, const FT &a2, const FT &a3, const FT &b1, const FT &b2, const FT &b3, const FT &d1, const FT &d2, const FT &d3, FT &x, FT &y, FT &z) { FT denom = b2*a3-b1*a3+b1*a2+b3*a1-b3*a2-b2*a1; x = - (b2*d1-b2*d3+b3*d2+b1*d3-b1*d2-b3*d1)/denom; z = (b2*d1*a3-b2*a1*d3+b1*a2*d3-b1*d2*a3-d1*b3*a2+a1*b3*d2)/denom; y = (a2*d1-a2*d3-d1*a3+a1*d3+d2*a3-d2*a1)/denom; } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/solve_3.h" 2 namespace CGAL { namespace Cartesian_internal { template void solve (const VectorC3 &v0, const VectorC3 &v1, const VectorC3 &v2, const VectorC3 &d, typename R::FT &alpha, typename R::FT &beta, typename R::FT &gamma) { CGAL::solve(v0.x(), v0.y(), v0.z(), v1.x(), v1.y(), v1.z(), v2.x(), v2.y(), v2.z(), d.x(), d.y(), d.z(), alpha, beta, gamma); } } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Plane_3.h" 2 namespace CGAL { template class PlaneC3 { typedef typename R_::FT FT; typedef typename R_::Point_2 Point_2; typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Segment_3 Segment_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Circle_3 Circle_3; typedef typename R_::Construct_point_3 Construct_point_3; typedef typename R_::Construct_point_2 Construct_point_2; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; PlaneC3() {} PlaneC3(const Point_3 &p, const Point_3 &q, const Point_3 &r) { *this = plane_from_points(p, q, r); } PlaneC3(const Point_3 &p, const Direction_3 &d) { *this = plane_from_point_direction(p, d); } PlaneC3(const Point_3 &p, const Vector_3 &v) { *this = plane_from_point_direction(p, v.direction()); } PlaneC3(const FT &a, const FT &b, const FT &c, const FT &d) : base(CGAL::make_array(a, b, c, d)) {} PlaneC3(const Line_3 &l, const Point_3 &p) { *this = plane_from_points(l.point(), l.point()+l.direction().to_vector(), p); } PlaneC3(const Segment_3 &s, const Point_3 &p) { *this = plane_from_points(s.start(), s.end(), p); } PlaneC3(const Ray_3 &r, const Point_3 &p) { *this = plane_from_points(r.start(), r.second_point(), p); } typename R::Boolean operator==(const PlaneC3 &p) const; typename R::Boolean operator!=(const PlaneC3 &p) const; const FT & a() const { return get(base)[0]; } const FT & b() const { return get(base)[1]; } const FT & c() const { return get(base)[2]; } const FT & d() const { return get(base)[3]; } Line_3 perpendicular_line(const Point_3 &p) const; Plane_3 opposite() const; Point_3 point() const; Point_3 projection(const Point_3 &p) const; Vector_3 orthogonal_vector() const; Direction_3 orthogonal_direction() const; Vector_3 base1() const; Vector_3 base2() const; Point_3 to_plane_basis(const Point_3 &p) const; Point_2 to_2d(const Point_3 &p) const; Point_3 to_3d(const Point_2 &p) const; typename R::Oriented_side oriented_side(const Point_3 &p) const; typename R::Boolean has_on_positive_side(const Point_3 &l) const; typename R::Boolean has_on_negative_side(const Point_3 &l) const; typename R::Boolean has_on(const Point_3 &p) const { return oriented_side(p) == ON_ORIENTED_BOUNDARY; } typename R::Boolean has_on(const Line_3 &l) const { return has_on(l.point()) && has_on(l.point() + l.direction().to_vector()); } typename R::Boolean has_on(const Circle_3 &circle) const { if(circle.squared_radius() != FT(0)) { const Plane_3& p = circle.supporting_plane(); if(is_zero(a())) { if(!is_zero(p.a())) return false; if(is_zero(b())) { if(!is_zero(p.b())) return false; return c() * p.d() == d() * p.c(); } return (p.c() * b() == c() * p.b()) && (p.d() * b() == d() * p.b()); } return (p.b() * a() == b() * p.a()) && (p.c() * a() == c() * p.a()) && (p.d() * a() == d() * p.a()); } else return has_on(circle.center()); } typename R::Boolean is_degenerate() const; }; template < class R > inline typename R::Boolean PlaneC3::operator==(const PlaneC3 &p) const { if (CGAL::identical(base, p.base)) return true; return equal_plane(*this, p); } template < class R > inline typename R::Boolean PlaneC3::operator!=(const PlaneC3 &p) const { return !(*this == p); } template < class R > inline typename PlaneC3::Point_3 PlaneC3::point() const { return point_on_plane(*this); } template < class R > inline typename PlaneC3::Point_3 PlaneC3:: projection(const typename PlaneC3::Point_3 &p) const { return projection_plane(p, *this); } template < class R > inline typename PlaneC3::Vector_3 PlaneC3::orthogonal_vector() const { return R().construct_orthogonal_vector_3_object()(*this); } template < class R > inline typename PlaneC3::Direction_3 PlaneC3::orthogonal_direction() const { return Direction_3(a(), b(), c()); } template < class R > typename PlaneC3::Vector_3 PlaneC3::base1() const { return R().construct_base_vector_3_object()(*this, 1); } template < class R > typename PlaneC3::Vector_3 PlaneC3::base2() const { return R().construct_base_vector_3_object()(*this, 2); } template < class R > typename PlaneC3::Point_3 PlaneC3:: to_plane_basis(const typename PlaneC3::Point_3 &p) const { FT alpha, beta, gamma; Construct_point_3 construct_point_3; Cartesian_internal::solve(base1(), base2(), orthogonal_vector(), p - point(), alpha, beta, gamma); return construct_point_3(alpha, beta, gamma); } template < class R > typename PlaneC3::Point_2 PlaneC3:: to_2d(const typename PlaneC3::Point_3 &p) const { FT alpha, beta, gamma; Construct_point_2 construct_point_2; Cartesian_internal::solve(base1(), base2(), orthogonal_vector(), p - point(), alpha, beta, gamma); return construct_point_2(alpha, beta); } template < class R > inline typename PlaneC3::Point_3 PlaneC3:: to_3d(const typename PlaneC3::Point_2 &p) const { return R().construct_lifted_point_3_object()(*this, p); } template < class R > inline typename PlaneC3::Line_3 PlaneC3:: perpendicular_line(const typename PlaneC3::Point_3 &p) const { return Line_3(p, orthogonal_direction()); } template < class R > inline typename PlaneC3::Plane_3 PlaneC3::opposite() const { return PlaneC3(-a(), -b(), -c(), -d()); } template < class R > inline typename R::Oriented_side PlaneC3:: oriented_side(const typename PlaneC3::Point_3 &p) const { return side_of_oriented_plane(*this, p); } template < class R > inline typename R::Boolean PlaneC3:: has_on_positive_side(const typename PlaneC3::Point_3 &p) const { return oriented_side(p) == ON_POSITIVE_SIDE; } template < class R > inline typename R::Boolean PlaneC3:: has_on_negative_side(const typename PlaneC3::Point_3 &p) const { return oriented_side(p) == ON_NEGATIVE_SIDE; } template < class R > inline typename R::Boolean PlaneC3:: is_degenerate() const { return ::CGAL:: is_zero(a()) && ::CGAL:: is_zero(b()) && ::CGAL:: is_zero(c()); } } # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Ray_3.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Ray_3.h" namespace CGAL { template < class R_ > class RayC3 { typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Ray_3 Ray_3; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; RayC3() {} RayC3(const Point_3 &sp, const Point_3 &secondp) : base(CGAL::make_array(sp, secondp)) {} RayC3(const Point_3 &sp, const Vector_3 &v) : base(CGAL::make_array(sp, sp + v)) {} RayC3(const Point_3 &sp, const Direction_3 &d) : base(CGAL::make_array(sp, sp + d.to_vector())) {} RayC3(const Point_3 &sp, const Line_3 &l) : base(CGAL::make_array(sp, sp + l.to_vector())) {} typename R::Boolean operator==(const RayC3 &r) const; typename R::Boolean operator!=(const RayC3 &r) const; const Point_3 & source() const { return get(base)[0]; } const Point_3 & second_point() const { return get(base)[1]; } Point_3 point(int i) const; Direction_3 direction() const; Vector_3 to_vector() const; Line_3 supporting_line() const; Ray_3 opposite() const; typename R::Boolean is_degenerate() const; typename R::Boolean has_on(const Point_3 &p) const; typename R::Boolean collinear_has_on(const Point_3 &p) const; }; template < class R > inline typename R::Boolean RayC3::operator==(const RayC3 &r) const { if (CGAL::identical(base, r.base)) return true; return source() == r.source() && direction() == r.direction(); } template < class R > inline typename R::Boolean RayC3::operator!=(const RayC3 &r) const { return !(*this == r); } template < class R > inline typename RayC3::Point_3 RayC3::point(int i) const { (CGAL::possibly(i >= 0)?(static_cast(0)): ::CGAL::precondition_fail( "i >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Ray_3.h", 111)); if (i == 0) return source(); if (i == 1) return second_point(); return source() + FT(i) * (second_point() - source()); } template < class R > inline typename RayC3::Vector_3 RayC3::to_vector() const { return second_point() - source(); } template < class R > inline typename RayC3::Direction_3 RayC3::direction() const { return Direction_3( second_point() - source() ); } template < class R > inline typename RayC3::Line_3 RayC3::supporting_line() const { return Line_3(*this); } template < class R > inline typename RayC3::Ray_3 RayC3::opposite() const { return RayC3( source(), - direction() ); } template < class R > typename R::Boolean RayC3:: has_on(const typename RayC3::Point_3 &p) const { return (p == source()) || ( collinear(source(), p, second_point()) && ( Direction_3(p - source()) == direction() )); } template < class R > inline typename R::Boolean RayC3::is_degenerate() const { return source() == second_point(); } template < class R > inline typename R::Boolean RayC3:: collinear_has_on(const typename RayC3::Point_3 &p) const { (static_cast(0)); typename R::Comparison_result cx = compare_x(source(), second_point()); if (cx != EQUAL) return cx != compare_x(p, source()); typename R::Comparison_result cy = compare_y(source(), second_point()); if (cy != EQUAL) return cy != compare_y(p, source()); typename R::Comparison_result cz = compare_z(source(), second_point()); if (cz != EQUAL) return cz != compare_z(p, source()); return true; } } # 55 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Segment_3.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Segment_3.h" namespace CGAL { template < class R_ > class SegmentC3 { typedef typename R_::Point_3 Point_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Line_3 Line_3; typedef typename R_::Segment_3 Segment_3; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; SegmentC3() {} SegmentC3(const Point_3 &sp, const Point_3 &ep) : base(CGAL::make_array(sp, ep)) {} bool has_on(const Point_3 &p) const; bool collinear_has_on(const Point_3 &p) const; bool operator==(const SegmentC3 &s) const; bool operator!=(const SegmentC3 &s) const; const Point_3 & source() const { return get(base)[0]; } const Point_3 & target() const { return get(base)[1]; } const Point_3 & start() const; const Point_3 & end() const; const Point_3 & min () const; const Point_3 & max () const; const Point_3 & vertex(int i) const; const Point_3 & point(int i) const; const Point_3 & operator[](int i) const; Direction_3 direction() const; Vector_3 to_vector() const; Line_3 supporting_line() const; Segment_3 opposite() const; bool is_degenerate() const; }; template < class R > inline bool SegmentC3::operator==(const SegmentC3 &s) const { if (CGAL::identical(base, s.base)) return true; return source() == s.source() && target() == s.target(); } template < class R > inline bool SegmentC3::operator!=(const SegmentC3 &s) const { return !(*this == s); } template < class R > const typename SegmentC3::Point_3 & SegmentC3::start() const { return source(); } template < class R > const typename SegmentC3::Point_3 & SegmentC3::end() const { return target(); } template < class R > inline const typename SegmentC3::Point_3 & SegmentC3::min () const { return lexicographically_xyz_smaller(source(),target()) ? source() : target(); } template < class R > inline const typename SegmentC3::Point_3 & SegmentC3::max () const { return lexicographically_xyz_smaller(source(),target()) ? target() : source(); } template < class R > inline const typename SegmentC3::Point_3 & SegmentC3::vertex(int i) const { return (i%2 == 0) ? source() : target(); } template < class R > inline const typename SegmentC3::Point_3 & SegmentC3::point(int i) const { return vertex(i); } template < class R > inline const typename SegmentC3::Point_3 & SegmentC3::operator[](int i) const { return vertex(i); } template < class R > inline typename SegmentC3::Vector_3 SegmentC3::to_vector() const { return target() - source(); } template < class R > inline typename SegmentC3::Direction_3 SegmentC3::direction() const { return Direction_3( target() - source() ); } template < class R > inline typename SegmentC3::Line_3 SegmentC3::supporting_line() const { return Line_3(*this); } template < class R > inline typename SegmentC3::Segment_3 SegmentC3::opposite() const { return SegmentC3(target(), source()); } template < class R > inline bool SegmentC3::is_degenerate() const { return source() == target(); } template < class R > inline bool SegmentC3:: has_on(const typename SegmentC3::Point_3 &p) const { return are_ordered_along_line(source(), p, target()); } template < class R > inline bool SegmentC3:: collinear_has_on(const typename SegmentC3::Point_3 &p) const { return collinear_are_ordered_along_line(source(), p, target()); } } # 56 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Triangle_3.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Triangle_3.h" namespace CGAL { template class TriangleC3 { typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Triangle_3 Triangle_3; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; TriangleC3() {} TriangleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r) : base(CGAL::make_array(p, q, r)) {} bool operator==(const TriangleC3 &t) const; bool operator!=(const TriangleC3 &t) const; Plane_3 supporting_plane() const; bool has_on(const Point_3 &p) const; bool is_degenerate() const; const Point_3 & vertex(int i) const; const Point_3 & operator[](int i) const; FT squared_area() const; }; template < class R > bool TriangleC3::operator==(const TriangleC3 &t) const { if (CGAL::identical(base, t.base)) return true; int i; for(i=0; i<3; i++) if ( vertex(0) == t.vertex(i) ) break; return (i<3) && vertex(1) == t.vertex(i+1) && vertex(2) == t.vertex(i+2); } template < class R > inline bool TriangleC3::operator!=(const TriangleC3 &t) const { return !(*this == t); } template < class R > const typename TriangleC3::Point_3 & TriangleC3::vertex(int i) const { if (i<0) i=(i%3)+3; else if (i>2) i=i%3; return (i==0) ? get(base)[0] : (i==1) ? get(base)[1] : get(base)[2]; } template < class R > inline const typename TriangleC3::Point_3 & TriangleC3::operator[](int i) const { return vertex(i); } template < class R > typename TriangleC3::FT TriangleC3::squared_area() const { return internal::squared_area(vertex(0), vertex(1), vertex(2), R()); } template < class R > inline typename TriangleC3::Plane_3 TriangleC3::supporting_plane() const { return Plane_3(vertex(0), vertex(1), vertex(2)); } template < class R > inline bool TriangleC3:: has_on(const typename TriangleC3::Point_3 &p) const { return R().has_on_3_object() (static_cast(*this), p); } template < class R > bool TriangleC3::is_degenerate() const { return collinear(vertex(0),vertex(1),vertex(2)); } } # 57 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Tetrahedron_3.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Tetrahedron_3.h" namespace CGAL { template class TetrahedronC3 { typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Tetrahedron_3 Tetrahedron_3; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; TetrahedronC3() {} TetrahedronC3(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) : base(CGAL::make_array(p, q, r, s)) {} const Point_3 & vertex(int i) const; const Point_3 & operator[](int i) const; typename R::Boolean operator==(const TetrahedronC3 &t) const; typename R::Boolean operator!=(const TetrahedronC3 &t) const; typename R::Orientation orientation() const; typename R::Oriented_side oriented_side(const Point_3 &p) const; typename R::Bounded_side bounded_side(const Point_3 &p) const; typename R::Boolean has_on_boundary(const Point_3 &p) const; typename R::Boolean has_on_positive_side(const Point_3 &p) const; typename R::Boolean has_on_negative_side(const Point_3 &p) const; typename R::Boolean has_on_bounded_side(const Point_3 &p) const; typename R::Boolean has_on_unbounded_side(const Point_3 &p) const; typename R::Boolean is_degenerate() const; }; template < class R > typename R::Boolean TetrahedronC3:: operator==(const TetrahedronC3 &t) const { if (CGAL::identical(base, t.base)) return true; if (orientation() != t.orientation()) return false; std::vector< Point_3 > V1; std::vector< Point_3 > V2; typename std::vector< Point_3 >::iterator uniq_end1; typename std::vector< Point_3 >::iterator uniq_end2; int k; for ( k=0; k < 4; k++) V1.push_back( vertex(k)); for ( k=0; k < 4; k++) V2.push_back( t.vertex(k)); typename R::Less_xyz_3 Less_object = R().less_xyz_3_object(); std::sort(V1.begin(), V1.end(), Less_object); std::sort(V2.begin(), V2.end(), Less_object); uniq_end1 = std::unique( V1.begin(), V1.end()); uniq_end2 = std::unique( V2.begin(), V2.end()); V1.erase( uniq_end1, V1.end()); V2.erase( uniq_end2, V2.end()); return V1 == V2; } template < class R > inline typename R::Boolean TetrahedronC3:: operator!=(const TetrahedronC3 &t) const { return !(*this == t); } template < class R > const typename TetrahedronC3::Point_3 & TetrahedronC3:: vertex(int i) const { if (i<0) i=(i%4)+4; else if (i>3) i=i%4; switch (i) { case 0: return get(base)[0]; case 1: return get(base)[1]; case 2: return get(base)[2]; default: return get(base)[3]; } } template < class R > inline const typename TetrahedronC3::Point_3 & TetrahedronC3:: operator[](int i) const { return vertex(i); } template < class R > typename R::Orientation TetrahedronC3:: orientation() const { return R().orientation_3_object()(vertex(0), vertex(1), vertex(2), vertex(3)); } template < class R > typename R::Oriented_side TetrahedronC3:: oriented_side(const typename TetrahedronC3::Point_3 &p) const { typename R::Orientation o = orientation(); if (o != ZERO) return enum_cast(bounded_side(p)) * o; (CGAL::possibly(!is_degenerate())?(static_cast(0)): ::CGAL::assertion_fail( "!is_degenerate()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Tetrahedron_3.h", 155)); return ON_ORIENTED_BOUNDARY; } template < class R > typename R::Bounded_side TetrahedronC3:: bounded_side(const typename TetrahedronC3::Point_3 &p) const { return R().bounded_side_3_object() (static_cast(*this), p); } template < class R > inline typename R::Boolean TetrahedronC3::has_on_boundary (const typename TetrahedronC3::Point_3 &p) const { return oriented_side(p) == ON_ORIENTED_BOUNDARY; } template < class R > inline typename R::Boolean TetrahedronC3::has_on_positive_side (const typename TetrahedronC3::Point_3 &p) const { return oriented_side(p) == ON_POSITIVE_SIDE; } template < class R > inline typename R::Boolean TetrahedronC3::has_on_negative_side (const typename TetrahedronC3::Point_3 &p) const { return oriented_side(p) == ON_NEGATIVE_SIDE; } template < class R > inline typename R::Boolean TetrahedronC3::has_on_bounded_side (const typename TetrahedronC3::Point_3 &p) const { return bounded_side(p) == ON_BOUNDED_SIDE; } template < class R > inline typename R::Boolean TetrahedronC3::has_on_unbounded_side (const typename TetrahedronC3::Point_3 &p) const { return bounded_side(p) == ON_UNBOUNDED_SIDE; } template < class R > inline typename R::Boolean TetrahedronC3::is_degenerate() const { return orientation() == COPLANAR; } } # 58 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_points_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_points_3.h" namespace CGAL { template < class K > inline bool equal_xy(const PointC3 &p, const PointC3 &q) { return K().equal_xy_3_object()(p, q); } template < class K > inline bool equal_xyz(const PointC3 &p, const PointC3 &q) { return p.x() == q.x() && p.y() == q.y() && p.z() == q.z(); } template < class K > inline Comparison_result compare_xy(const PointC3 &p, const PointC3 &q) { return K().compare_xy_3_object()(p, q); } template < class K > inline Comparison_result compare_lexicographically_xy(const PointC3 &p, const PointC3 &q) { return K().compare_xy_3_object()(p, q); } template < class K > inline bool lexicographically_xy_smaller_or_equal(const PointC3 &p, const PointC3 &q) { return compare_lexicographically_xy(p, q) != LARGER; } template < class K > inline bool lexicographically_xy_smaller(const PointC3 &p, const PointC3 &q) { return K().less_xy_3_object()(p, q); } template < class K > inline bool strict_dominance(const PointC3 &p, const PointC3 &q) { return strict_dominanceC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); } template < class K > inline bool dominance(const PointC3 &p, const PointC3 &q) { return dominanceC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h" 2 namespace CGAL { template < class R_ > class Iso_cuboidC3 { typedef typename R_::FT FT; typedef typename R_::Iso_cuboid_3 Iso_cuboid_3; typedef typename R_::Point_3 Point_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef typename R_::Construct_point_3 Construct_point_3; typedef cpp0x::array Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; Iso_cuboidC3() {} Iso_cuboidC3(const Point_3 &p, const Point_3 &q, int) : base(CGAL::make_array(p, q)) { } Iso_cuboidC3(const Point_3 &p, const Point_3 &q) { Construct_point_3 construct_point_3; FT minx, maxx, miny, maxy, minz, maxz; if (p.x() < q.x()) { minx = p.x(); maxx = q.x(); } else { minx = q.x(); maxx = p.x(); } if (p.y() < q.y()) { miny = p.y(); maxy = q.y(); } else { miny = q.y(); maxy = p.y(); } if (p.z() < q.z()) { minz = p.z(); maxz = q.z(); } else { minz = q.z(); maxz = p.z(); } base = Rep(CGAL::make_array(construct_point_3(minx, miny, minz), construct_point_3(maxx, maxy, maxz))); } Iso_cuboidC3(const Point_3 &left, const Point_3 &right, const Point_3 &bottom, const Point_3 &top, const Point_3 &far_, const Point_3 &close) : base(CGAL::make_array(Construct_point_3()(left.x(), bottom.y(), far_.z()), Construct_point_3()(right.x(), top.y(), close.z()))) { (CGAL::possibly(!less_x(right, left))?(static_cast(0)): ::CGAL::precondition_fail( "!less_x(right, left)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 82)); (CGAL::possibly(!less_y(top, bottom))?(static_cast(0)): ::CGAL::precondition_fail( "!less_y(top, bottom)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 83)); (CGAL::possibly(!less_z(close, far_))?(static_cast(0)): ::CGAL::precondition_fail( "!less_z(close, far_)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 84)); } Iso_cuboidC3(const FT& min_x, const FT& min_y, const FT& min_z, const FT& max_x, const FT& max_y, const FT& max_z) : base(CGAL::make_array(Construct_point_3()(min_x, min_y, min_z), Construct_point_3()(max_x, max_y, max_z))) { (CGAL::possibly(min_x <= max_x)?(static_cast(0)): ::CGAL::precondition_fail( "min_x <= max_x" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 92)); (CGAL::possibly(min_y <= max_y)?(static_cast(0)): ::CGAL::precondition_fail( "min_y <= max_y" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 93)); (CGAL::possibly(min_z <= max_z)?(static_cast(0)): ::CGAL::precondition_fail( "min_z <= max_z" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 94)); } Iso_cuboidC3(const FT& min_hx, const FT& min_hy, const FT& min_hz, const FT& max_hx, const FT& max_hy, const FT& max_hz, const FT& hw) { if (hw == FT(1)) base = Rep(CGAL::make_array(Construct_point_3()(min_hx, min_hy, min_hz), Construct_point_3()(max_hx, max_hy, max_hz))); else base = Rep(CGAL::make_array(Construct_point_3()(min_hx/hw, min_hy/hw, min_hz/hw), Construct_point_3()(max_hx/hw, max_hy/hw, max_hz/hw))); } typename R::Boolean operator==(const Iso_cuboidC3& s) const; typename R::Boolean operator!=(const Iso_cuboidC3& s) const; const Point_3 & min () const { return get(base)[0]; } const Point_3 & max () const { return get(base)[1]; } Point_3 vertex(int i) const; Point_3 operator[](int i) const; Iso_cuboid_3 transform(const Aff_transformation_3 &t) const { return Iso_cuboidC3(t.transform((this->min)()), t.transform((this->max)())); } Bounded_side bounded_side(const Point_3& p) const; typename R::Boolean has_on(const Point_3& p) const; typename R::Boolean has_on_boundary(const Point_3& p) const; typename R::Boolean has_on_bounded_side(const Point_3& p) const; typename R::Boolean has_on_unbounded_side(const Point_3& p) const; typename R::Boolean is_degenerate() const; const FT & xmin() const; const FT & ymin() const; const FT & zmin() const; const FT & xmax() const; const FT & ymax() const; const FT & zmax() const; const FT & min_coord(int i) const; const FT & max_coord(int i) const; FT volume() const; }; template < class R > inline typename R::Boolean Iso_cuboidC3::operator==(const Iso_cuboidC3& r) const { if (CGAL::identical(base, r.base)) return true; return (this->min)() == (r.min)() && (this->max)() == (r.max)(); } template < class R > inline typename R::Boolean Iso_cuboidC3::operator!=(const Iso_cuboidC3& r) const { return !(*this == r); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::xmin() const { return (this->min)().x(); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::ymin() const { return (this->min)().y(); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::zmin() const { return (this->min)().z(); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::xmax() const { return (this->max)().x(); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::ymax() const { return (this->max)().y(); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::zmax() const { return (this->max)().z(); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::min_coord(int i) const { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 217)); if (i == 0) return xmin(); else if (i == 1) return ymin(); else return zmin(); } template < class R > inline const typename Iso_cuboidC3::FT & Iso_cuboidC3::max_coord(int i) const { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Iso_cuboid_3.h", 231)); if (i == 0) return xmax(); else if (i == 1) return ymax(); else return zmax(); } template < class R > typename Iso_cuboidC3::Point_3 Iso_cuboidC3::vertex(int i) const { Construct_point_3 construct_point_3; switch (i%8) { case 0: return (this->min)(); case 1: return construct_point_3((this->max)().hx(), (this->min)().hy(), (this->min)().hz()); case 2: return construct_point_3((this->max)().hx(), (this->max)().hy(), (this->min)().hz()); case 3: return construct_point_3((this->min)().hx(), (this->max)().hy(), (this->min)().hz()); case 4: return construct_point_3((this->min)().hx(), (this->max)().hy(), (this->max)().hz()); case 5: return construct_point_3((this->min)().hx(), (this->min)().hy(), (this->max)().hz()); case 6: return construct_point_3((this->max)().hx(), (this->min)().hy(), (this->max)().hz()); default: return (this->max)(); } } template < class R > inline typename Iso_cuboidC3::Point_3 Iso_cuboidC3::operator[](int i) const { return vertex(i); } template < class R > inline typename Iso_cuboidC3::FT Iso_cuboidC3::volume() const { return (xmax()-xmin()) * (ymax()-ymin()) * (zmax()-zmin()); } template < class R > Bounded_side Iso_cuboidC3:: bounded_side(const typename Iso_cuboidC3::Point_3& p) const { if (strict_dominance(p, (this->min)()) && strict_dominance((this->max)(), p) ) return ON_BOUNDED_SIDE; if (dominance(p, (this->min)()) && dominance((this->max)(), p)) return ON_BOUNDARY; return ON_UNBOUNDED_SIDE; } template < class R > inline typename R::Boolean Iso_cuboidC3:: has_on_boundary(const typename Iso_cuboidC3::Point_3& p) const { return bounded_side(p) == ON_BOUNDARY; } template < class R > inline typename R::Boolean Iso_cuboidC3:: has_on(const typename Iso_cuboidC3::Point_3& p) const { return bounded_side(p) == ON_BOUNDARY; } template < class R > inline typename R::Boolean Iso_cuboidC3:: has_on_bounded_side(const typename Iso_cuboidC3::Point_3& p) const { return bounded_side(p) == ON_BOUNDED_SIDE; } template < class R > inline typename R::Boolean Iso_cuboidC3:: has_on_unbounded_side(const typename Iso_cuboidC3::Point_3& p) const { return bounded_side(p) == ON_UNBOUNDED_SIDE; } template < class R > inline typename R::Boolean Iso_cuboidC3::is_degenerate() const { return (this->min)().hx() == (this->max)().hx() || (this->min)().hy() == (this->max)().hy() || (this->min)().hz() == (this->max)().hz(); } } # 59 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h" namespace CGAL { template class SphereC3 { typedef typename R_::FT FT; typedef typename R_::Point_3 Point_3_; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Sphere_3 Sphere_3; typedef typename R_::Circle_3 Circle_3; typedef boost::tuple Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; SphereC3() {} SphereC3(const Point_3_ ¢er, const FT &squared_radius, const Orientation &o = COUNTERCLOCKWISE) { (CGAL::possibly((squared_radius >= FT(0)) & (o != COLLINEAR))?(static_cast(0)): ::CGAL::precondition_fail( "(squared_radius >= FT(0)) & (o != COLLINEAR)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h" # 57 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h" , 58 # 57 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h" )) ; base = Rep(center, squared_radius, o); } SphereC3(const Point_3_ &p, const Point_3_ &q, const Point_3_ &r, const Point_3_ &s) { Orientation orient = make_certain(CGAL::orientation(p, q, r, s)); Point_3_ center = circumcenter(p, q, r, s); FT squared_radius = squared_distance(p, center); base = Rep(center, squared_radius, orient); } SphereC3(const Point_3_ &p, const Point_3_ &q, const Point_3_ &r, const Orientation &o = COUNTERCLOCKWISE) { (CGAL::possibly(o != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "o != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h", 78)); Point_3_ center = circumcenter(p, q, r); FT squared_radius = squared_distance(p, center); base = Rep(center, squared_radius, o); } SphereC3(const Point_3_ &p, const Point_3_ &q, const Orientation &o = COUNTERCLOCKWISE) { (CGAL::possibly(o != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "o != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h", 90)); Point_3_ center = midpoint(p, q); FT squared_radius = squared_distance(p, center); base = Rep(center, squared_radius, o); } explicit SphereC3(const Point_3_ ¢er, const Orientation& o = COUNTERCLOCKWISE) { (CGAL::possibly(o != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "o != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Sphere_3.h", 101)); base = Rep(center, FT(0), o); } typename R::Boolean operator==(const SphereC3 &) const; typename R::Boolean operator!=(const SphereC3 &) const; const Point_3_ & center() const { return get(base).template get<0>(); } const FT & squared_radius() const { return get(base).template get<1>(); } Orientation orientation() const { return get(base).template get<2>(); } typename R::Boolean is_degenerate() const; Sphere_3 opposite() const; typename R_::Oriented_side oriented_side(const Point_3_ &p) const; typename R::Boolean has_on(const Circle_3 &p) const; typename R::Boolean has_on(const Point_3_ &p) const; typename R::Boolean has_on_boundary(const Point_3_ &p) const; typename R::Boolean has_on_positive_side(const Point_3_ &p) const; typename R::Boolean has_on_negative_side(const Point_3_ &p) const; typename R_::Bounded_side bounded_side(const Point_3_ &p) const; typename R::Boolean has_on_bounded_side(const Point_3_ &p) const; typename R::Boolean has_on_unbounded_side(const Point_3_ &p) const; }; template < class R > inline typename R::Boolean SphereC3::operator==(const SphereC3 &t) const { if (CGAL::identical(base, t.base)) return true; return center() == t.center() && squared_radius() == t.squared_radius() && orientation() == t.orientation(); } template < class R > inline typename R::Boolean SphereC3::operator!=(const SphereC3 &t) const { return !(*this == t); } template < class R > typename R::Oriented_side SphereC3:: oriented_side(const typename SphereC3::Point_3_ &p) const { return enum_cast(bounded_side(p)) * orientation(); } template < class R > inline typename R::Bounded_side SphereC3:: bounded_side(const typename SphereC3::Point_3_ &p) const { return enum_cast(compare(squared_radius(), squared_distance(center(), p))); } template < class R > inline typename R::Boolean SphereC3:: has_on(const typename SphereC3::Circle_3 &c) const { typedef typename SphereC3::Point_3_ Point_3_; typedef typename SphereC3::FT FT; Point_3_ proj = c.supporting_plane().projection(center()); if(!(proj == c.center())) return false; const FT d2 = squared_distance(center(),c.center()); return ((squared_radius() - d2) == c.squared_radius()); } template < class R > inline typename R::Boolean SphereC3:: has_on(const typename SphereC3::Point_3_ &p) const { return has_on_boundary(p); } template < class R > inline typename R::Boolean SphereC3:: has_on_boundary(const typename SphereC3::Point_3_ &p) const { return squared_distance(center(),p) == squared_radius(); } template < class R > inline typename R::Boolean SphereC3:: has_on_negative_side(const typename SphereC3::Point_3_ &p) const { if (orientation() == COUNTERCLOCKWISE) return has_on_unbounded_side(p); return has_on_bounded_side(p); } template < class R > inline typename R::Boolean SphereC3:: has_on_positive_side(const typename SphereC3::Point_3_ &p) const { if (orientation() == COUNTERCLOCKWISE) return has_on_bounded_side(p); return has_on_unbounded_side(p); } template < class R > inline typename R::Boolean SphereC3:: has_on_bounded_side(const typename SphereC3::Point_3_ &p) const { return squared_distance(center(),p) < squared_radius(); } template < class R > inline typename R::Boolean SphereC3:: has_on_unbounded_side(const typename SphereC3::Point_3_ &p) const { return squared_distance(center(),p) > squared_radius(); } template < class R > inline typename R::Boolean SphereC3:: is_degenerate() const { return ::CGAL:: is_zero(squared_radius()); } template < class R > inline typename SphereC3::Sphere_3 SphereC3::opposite() const { return SphereC3(center(), squared_radius(), CGAL::opposite(orientation()) ); } } # 60 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" namespace CGAL { template class CircleC3 { typedef typename R_::Sphere_3 Sphere_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::FT FT; typedef std::pair Rep; typedef typename R_::template Handle::type Base; Base base; public: typedef R_ R; CircleC3() {} CircleC3(const Point_3& center, const FT& squared_r, const Direction_3& d) { (CGAL::possibly(squared_r >= FT(0))?(static_cast(0)): ::CGAL::assertion_fail( "squared_r >= FT(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 51)); (CGAL::possibly((d.dx() != FT(0)) || (d.dy() != FT(0)) || (d.dz() != FT(0)))?(static_cast(0)): ::CGAL::assertion_fail( "(d.dx() != FT(0)) || (d.dy() != FT(0)) || (d.dz() != FT(0))" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 53)); base = Rep(Sphere_3(center,squared_r), plane_from_point_direction(center, d)); } CircleC3(const Point_3& center, const FT& squared_r, const Vector_3& normal) { (CGAL::possibly(squared_r >= FT(0))?(static_cast(0)): ::CGAL::assertion_fail( "squared_r >= FT(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 60)); (CGAL::possibly((normal.x() != FT(0)) || (normal.y() != FT(0)) || (normal.z() != FT(0)))?(static_cast(0)): ::CGAL::assertion_fail( "(normal.x() != FT(0)) || (normal.y() != FT(0)) || (normal.z() != FT(0))" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" # 62 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" , 64 # 62 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" )) ; base = Rep(Sphere_3(center,squared_r), Plane_3(center, normal.direction())); } CircleC3(const Point_3& center, const FT& squared_r, const Plane_3& p) { (CGAL::possibly(!R().is_degenerate_3_object()(p))?(static_cast(0)): ::CGAL::assertion_fail( "!R().is_degenerate_3_object()(p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 72)); (CGAL::possibly((p.a() * center.x() + p.b() * center.y() + p.c() * center.z() + p.d()) == CGAL::ZERO)?(static_cast(0)): ::CGAL::assertion_fail( "(p.a() * center.x() + p.b() * center.y() + p.c() * center.z() + p.d()) == CGAL::ZERO" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" # 73 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" , 76 # 73 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h" )) ; (CGAL::possibly(squared_r >= FT(0))?(static_cast(0)): ::CGAL::assertion_fail( "squared_r >= FT(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 77)); base = Rep(Sphere_3(center,squared_r), p); } CircleC3(const Sphere_3 &s1, const Sphere_3 &s2) { Object obj = R().intersect_3_object()(s1, s2); (CGAL::possibly(!(obj.is_empty()))?(static_cast(0)): ::CGAL::precondition_fail( "!(obj.is_empty())" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 84)); const typename R::Circle_3* circle_ptr=object_cast(&obj); if(circle_ptr!=__null) base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane()); else { const typename R::Point_3* point=object_cast(&obj); (CGAL::possibly(point!=__null)?(static_cast(0)): ::CGAL::precondition_fail( "point!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 90)); CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0))); base = Rep(circle.diametral_sphere(), circle.supporting_plane()); } } CircleC3(const Plane_3 &p, const Sphere_3 &s, int) : base(s, p) {} CircleC3(const Plane_3 &p, const Sphere_3 &s) { Object obj = R().intersect_3_object()(p, s); (CGAL::possibly(!(obj.is_empty()))?(static_cast(0)): ::CGAL::precondition_fail( "!(obj.is_empty())" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 101)); const typename R::Circle_3* circle_ptr=object_cast(&obj); if(circle_ptr!=__null) base = Rep(circle_ptr->diametral_sphere(), circle_ptr->supporting_plane()); else { const typename R::Point_3* point=object_cast(&obj); (CGAL::possibly(point!=__null)?(static_cast(0)): ::CGAL::precondition_fail( "point!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 107)); CircleC3 circle = CircleC3(*point, FT(0), Vector_3(FT(1),FT(0),FT(0))); base = Rep(circle.diametral_sphere(), circle.supporting_plane()); } } CircleC3(const Point_3 &p, const Point_3 &q, const Point_3 &r) { (CGAL::possibly(!R().collinear_3_object()(p, q, r))?(static_cast(0)): ::CGAL::precondition_fail( "!R().collinear_3_object()(p, q, r)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 115)); Plane_3 p1 = R().construct_plane_3_object()(p, q, r); Plane_3 p2 = R().construct_bisector_3_object()(p, q); Plane_3 p3 = R().construct_bisector_3_object()(p, r); Object obj = R().intersect_3_object()(p1, p2, p3); const Point_3& center=*object_cast(&obj); FT sqr = R().compute_squared_distance_3_object()(center, r); Sphere_3 s = R().construct_sphere_3_object()(center, sqr); base = Rep(s, p1); } const Plane_3& supporting_plane() const { return get(base).second; } const Sphere_3& supporting_sphere() const { return diametral_sphere(); } Point_3 center() const { return diametral_sphere().center(); } FT squared_radius() const { return diametral_sphere().squared_radius(); } const Sphere_3& diametral_sphere() const { return get(base).first; } double approximate_area() const { return 3.14159265358979323846 * to_double(squared_radius()); } double approximate_squared_length() const { return 3.14159265358979323846 * 3.14159265358979323846 * 4.0 * to_double(squared_radius()); } FT area_divided_by_pi() const { return squared_radius(); } FT squared_length_divided_by_pi_square() const { return 4 * squared_radius(); } CGAL::Bbox_3 bbox() const { typedef CGAL::Interval_nt Interval; CGAL::Interval_nt::Protector ip; const Sphere_3 &s = diametral_sphere(); const FT &sq_r = s.squared_radius(); const Point_3 &p = s.center(); if(sq_r == FT(0)) return p.bbox(); const Plane_3 &plane = supporting_plane(); const Interval a = CGAL::to_interval(plane.a()); const Interval b = CGAL::to_interval(plane.b()); const Interval c = CGAL::to_interval(plane.c()); const Interval x = CGAL::to_interval(p.x()); const Interval y = CGAL::to_interval(p.y()); const Interval z = CGAL::to_interval(p.z()); const Interval r2 = CGAL::to_interval(sq_r); const Interval r = CGAL::sqrt(r2); const Interval a2 = CGAL::square(a); const Interval b2 = CGAL::square(b); const Interval c2 = CGAL::square(c); const Interval sqr_sum = a2 + b2 + c2; const Interval mx = r * CGAL::sqrt((sqr_sum - a2)/sqr_sum); const Interval my = r * CGAL::sqrt((sqr_sum - b2)/sqr_sum); const Interval mz = r * CGAL::sqrt((sqr_sum - c2)/sqr_sum); return CGAL::Bbox_3((x-mx).inf(),(y-my).inf(),(z-mz).inf(), (x+mx).sup(),(y+my).sup(),(z+mz).sup()); } bool operator==(const CircleC3 &) const; bool operator!=(const CircleC3 &) const; bool has_on(const Point_3 &p) const; bool has_on_bounded_side(const Point_3 &p) const; bool has_on_unbounded_side(const Point_3 &p) const; Bounded_side bounded_side(const Point_3 &p) const; bool is_degenerate() const { return diametral_sphere().is_degenerate(); } }; template < class R > inline bool CircleC3:: has_on(const typename CircleC3::Point_3 &p) const { return R().has_on_3_object()(diametral_sphere(),p) && R().has_on_3_object()(supporting_plane(),p); } template < class R > inline bool CircleC3:: has_on_bounded_side(const typename CircleC3::Point_3 &p) const { (CGAL::possibly(R().has_on_3_object()(supporting_plane(), p))?(static_cast(0)): ::CGAL::precondition_fail( "R().has_on_3_object()(supporting_plane(), p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 238)); return squared_distance(center(),p) < squared_radius(); } template < class R > inline bool CircleC3:: has_on_unbounded_side(const typename CircleC3::Point_3 &p) const { (CGAL::possibly(R().has_on_3_object()(supporting_plane(), p))?(static_cast(0)): ::CGAL::precondition_fail( "R().has_on_3_object()(supporting_plane(), p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 248)); return squared_distance(center(),p) > squared_radius(); } template < class R > inline Bounded_side CircleC3:: bounded_side(const typename CircleC3::Point_3 &p) const { (CGAL::possibly(is_degenerate() || R().has_on_3_object()(supporting_plane(), p))?(static_cast(0)): ::CGAL::precondition_fail( "is_degenerate() || R().has_on_3_object()(supporting_plane(), p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Circle_3.h", 258)); return diametral_sphere().bounded_side(p); } template < class R > inline bool CircleC3::operator==(const CircleC3 &t) const { if (CGAL::identical(base, t.base)) return true; if(!(center() == t.center() && squared_radius() == t.squared_radius())) return false; const typename R::Plane_3 p1 = supporting_plane(); const typename R::Plane_3 p2 = t.supporting_plane(); if(is_zero(p1.a())) { if(!is_zero(p2.a())) return false; if(is_zero(p1.b())) { if(!is_zero(p2.b())) return false; return p1.c() * p2.d() == p1.d() * p2.c(); } return (p2.c() * p1.b() == p1.c() * p2.b()) && (p2.d() * p1.b() == p1.d() * p2.b()); } return (p2.b() * p1.a() == p1.b() * p2.a()) && (p2.c() * p1.a() == p1.c() * p2.a()) && (p2.d() * p1.a() == p1.d() * p2.a()); } template < class R > inline bool CircleC3::operator!=(const CircleC3 &t) const { return !(*this == t); } } # 61 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_3.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_3.h" 2 namespace CGAL { class Identity_transformation; template class Aff_transformation_rep_baseC3; template class Aff_transformation_repC3; template class Translation_repC3; template class Scaling_repC3; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_rep_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_rep_3.h" namespace CGAL { template < class R > class Aff_transformation_rep_baseC3 : public Ref_counted_virtual { public: typedef typename R::FT FT; typedef typename R::Point_3 Point_3; typedef typename R::Vector_3 Vector_3; typedef typename R::Direction_3 Direction_3; typedef typename R::Aff_transformation_3 Aff_transformation_3; virtual ~Aff_transformation_rep_baseC3(){} virtual Point_3 transform(const Point_3 &p) const = 0; virtual Vector_3 transform(const Vector_3 &v) const = 0; virtual Direction_3 transform(const Direction_3 &d) const = 0; virtual Aff_transformation_3 operator*( const Aff_transformation_rep_baseC3 &t) const = 0; virtual Aff_transformation_3 compose( const Translation_repC3 &t) const = 0; virtual Aff_transformation_3 compose( const Scaling_repC3 &t) const = 0; virtual Aff_transformation_3 compose( const Aff_transformation_repC3 &t) const = 0; virtual Aff_transformation_3 inverse() const = 0; virtual Aff_transformation_3 transpose() const = 0; virtual bool is_even() const = 0; virtual FT cartesian(int i, int j) const = 0; virtual std::ostream &print(std::ostream &os) const = 0; }; template < class R > class Aff_transformation_repC3 : public Aff_transformation_rep_baseC3 { friend class Translation_repC3; friend class Scaling_repC3; public: typedef typename R::FT FT; typedef Aff_transformation_repC3 Self; typedef Aff_transformation_rep_baseC3 Transformation_base_3; typedef Aff_transformation_repC3 Transformation_3; typedef Translation_repC3 Translation_3; typedef Scaling_repC3 Scaling_3; typedef typename Transformation_base_3::Point_3 Point_3; typedef typename Transformation_base_3::Vector_3 Vector_3; typedef typename Transformation_base_3::Direction_3 Direction_3; typedef typename Transformation_base_3:: Aff_transformation_3 Aff_transformation_3; Aff_transformation_repC3() {} Aff_transformation_repC3(const FT& m11, const FT& m12, const FT& m13, const FT& m21, const FT& m22, const FT& m23, const FT& m31, const FT& m32, const FT& m33) : t11(m11), t12(m12), t13(m13), t14(FT(0)), t21(m21), t22(m22), t23(m23), t24(FT(0)), t31(m31), t32(m32), t33(m33), t34(FT(0)) {} Aff_transformation_repC3( const FT& m11, const FT& m12, const FT& m13, const FT& m14, const FT& m21, const FT& m22, const FT& m23, const FT& m24, const FT& m31, const FT& m32, const FT& m33, const FT& m34 ) : t11(m11), t12(m12), t13(m13), t14(m14), t21(m21), t22(m22), t23(m23), t24(m24), t31(m31), t32(m32), t33(m33), t34(m34) {} virtual ~Aff_transformation_repC3() {} virtual Point_3 transform(const Point_3& p) const { typename R::Construct_point_3 construct_point_3; return construct_point_3(t11 * p.x() + t12 * p.y() + t13 * p.z() + t14, t21 * p.x() + t22 * p.y() + t23 * p.z() + t24, t31 * p.x() + t32 * p.y() + t33 * p.z() + t34); } virtual Vector_3 transform(const Vector_3& v) const { return Vector_3(t11 * v.x() + t12 * v.y() + t13 * v.z(), t21 * v.x() + t22 * v.y() + t23 * v.z(), t31 * v.x() + t32 * v.y() + t33 * v.z()); } virtual Direction_3 transform(const Direction_3& dir) const { Vector_3 v = dir.to_vector(); return Direction_3(t11 * v.x() + t12 * v.y() + t13 * v.z(), t21 * v.x() + t22 * v.y() + t23 * v.z(), t31 * v.x() + t32 * v.y() + t33 * v.z()); } virtual Aff_transformation_3 inverse() const; virtual Aff_transformation_3 transpose() const; virtual Aff_transformation_3 operator*(const Transformation_base_3 &t) const; virtual Aff_transformation_3 compose(const Transformation_3 &t) const; virtual Aff_transformation_3 compose(const Translation_3 &t) const; virtual Aff_transformation_3 compose(const Scaling_3 &t) const; virtual bool is_even() const { return sign_of_determinant(t11, t12, t13, t21, t22, t23, t31, t32, t33) == POSITIVE; } virtual FT cartesian(int i, int j) const { switch (i) { case 0: switch (j) { case 0: return t11; case 1: return t12; case 2: return t13; case 3: return t14; } case 1: switch (j) { case 0: return t21; case 1: return t22; case 2: return t23; case 3: return t24; } case 2: switch (j) { case 0: return t31; case 1: return t32; case 2: return t33; case 3: return t34; } case 3: switch (j) { case 0: return FT(0); case 1: return FT(0); case 2: return FT(0); case 3: return FT(1); } } return FT(0); } virtual std::ostream &print(std::ostream &os) const { os <<"Aff_transformationC3("< typename Aff_transformation_repC3::Aff_transformation_3 Aff_transformation_repC3::inverse() const { return Aff_transformation_3( determinant( t22, t23, t32, t33), -determinant( t12, t13, t32, t33), determinant( t12, t13, t22, t23), -determinant( t12, t13, t14, t22, t23, t24, t32, t33, t34 ), -determinant( t21, t23, t31, t33), determinant( t11, t13, t31, t33), -determinant( t11, t13, t21, t23), determinant( t11, t13, t14, t21, t23, t24, t31, t33, t34 ), determinant( t21, t22, t31, t32), -determinant( t11, t12, t31, t32), determinant( t11, t12, t21, t22), -determinant( t11, t12, t14, t21, t22, t24, t31, t32, t34 ), determinant( t11, t12, t13, t21, t22, t23, t31, t32, t33 )); } template < class R > inline typename Aff_transformation_repC3::Aff_transformation_3 Aff_transformation_repC3:: operator*(const Aff_transformation_rep_baseC3 &t) const { return t.compose(*this); } template < class R > typename Aff_transformation_repC3::Aff_transformation_3 Aff_transformation_repC3:: compose(const Aff_transformation_repC3 &t) const { return Aff_transformation_3(t.t11*t11 + t.t12*t21 + t.t13*t31, t.t11*t12 + t.t12*t22 + t.t13*t32, t.t11*t13 + t.t12*t23 + t.t13*t33, t.t11*t14 + t.t12*t24 + t.t13*t34 + t.t14, t.t21*t11 + t.t22*t21 + t.t23*t31, t.t21*t12 + t.t22*t22 + t.t23*t32, t.t21*t13 + t.t22*t23 + t.t23*t33, t.t21*t14 + t.t22*t24 + t.t23*t34 + t.t24, t.t31*t11 + t.t32*t21 + t.t33*t31, t.t31*t12 + t.t32*t22 + t.t33*t32, t.t31*t13 + t.t32*t23 + t.t33*t33, t.t31*t14 + t.t32*t24 + t.t33*t34 + t.t34); } template < class R > typename Aff_transformation_repC3::Aff_transformation_3 Aff_transformation_repC3:: compose(const Translation_repC3 &t) const { return Aff_transformation_3(t11, t12, t13, t14 + t.translationvector_.x(), t21, t22, t23, t24 + t.translationvector_.y(), t31, t32, t33, t34 + t.translationvector_.z()); } template < class R > typename Aff_transformation_repC3::Aff_transformation_3 Aff_transformation_repC3:: compose(const Scaling_repC3 &t) const { return Aff_transformation_3(t.scalefactor_ * t11, t.scalefactor_ * t12, t.scalefactor_ * t13, t.scalefactor_ * t14, t.scalefactor_ * t21, t.scalefactor_ * t22, t.scalefactor_ * t23, t.scalefactor_ * t24, t.scalefactor_ * t31, t.scalefactor_ * t32, t.scalefactor_ * t33, t.scalefactor_ * t34); } template < class R > typename Aff_transformation_repC3::Aff_transformation_3 Aff_transformation_repC3::transpose() const { return Aff_transformation_3( t11, t21, t31, t14, t12, t22, t32, t24, t13, t23, t33, t34); } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Translation_rep_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Translation_rep_3.h" namespace CGAL { template < class R > class Translation_repC3 : public Aff_transformation_rep_baseC3 { friend class Aff_transformation_repC3; friend class Scaling_repC3; public: typedef typename R::FT FT; typedef Aff_transformation_rep_baseC3 Transformation_base_3; typedef Aff_transformation_repC3 Transformation_3; typedef Translation_repC3 Translation_3; typedef Scaling_repC3 Scaling_3; typedef typename Transformation_base_3::Point_3 Point_3; typedef typename Transformation_base_3::Vector_3 Vector_3; typedef typename Transformation_base_3::Direction_3 Direction_3; typedef typename Transformation_base_3::Aff_transformation_3 Aff_transformation_3; Translation_repC3() {} Translation_repC3(const Vector_3 &tv) : translationvector_(tv) {} virtual ~Translation_repC3() {} virtual Point_3 transform(const Point_3 &p) const { return p + translationvector_; } virtual Vector_3 transform(const Vector_3 &v) const { return v; } virtual Direction_3 transform(const Direction_3 &d) const { return d; } virtual Aff_transformation_3 operator*(const Transformation_base_3 &t) const { return t.compose(*this); } virtual Aff_transformation_3 compose(const Transformation_3 &t) const { return Aff_transformation_3(t.t11, t.t12, t.t13, t.t11 * translationvector_.x() + t.t12 * translationvector_.y() + t.t13 * translationvector_.z() + t.t14, t.t21, t.t22, t.t23, t.t21 * translationvector_.x() + t.t22 * translationvector_.y() + t.t23 * translationvector_.z() + t.t24, t.t31, t.t32, t.t33, t.t31 * translationvector_.x() + t.t32 * translationvector_.y() + t.t33 * translationvector_.z() + t.t34); } virtual Aff_transformation_3 compose(const Translation_3 &t) const { return Aff_transformation_3(TRANSLATION, translationvector_ + t.translationvector_); } virtual Aff_transformation_3 compose(const Scaling_3 &t) const { FT ft0(0); return Aff_transformation_3(t.scalefactor_, ft0, ft0, t.scalefactor_ * translationvector_.x(), ft0, t.scalefactor_, ft0, t.scalefactor_ * translationvector_.y(), ft0, ft0, t.scalefactor_, t.scalefactor_ * translationvector_.z()); } virtual Aff_transformation_3 inverse() const { return Aff_transformation_3(TRANSLATION, - translationvector_); } virtual Aff_transformation_3 transpose() const { return Aff_transformation_3(TRANSLATION, translationvector_); } virtual bool is_even() const { return true; } virtual FT cartesian(int i, int j) const { if (j==i) return FT(1); if (j==3) return translationvector_[i]; return FT(0); } virtual std::ostream &print(std::ostream &os) const { os << "Aff_transformationC3(VectorC3("<< translationvector_.x() << "," << translationvector_.y() << "," << translationvector_.z() << "))\n"; return os; } private: Vector_3 translationvector_; }; } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Scaling_rep_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Scaling_rep_3.h" namespace CGAL { template < class R > class Scaling_repC3 : public Aff_transformation_rep_baseC3 { friend class Aff_transformation_repC3; friend class Translation_repC3; public: typedef typename R::FT FT; typedef Aff_transformation_rep_baseC3 Transformation_base_3; typedef Aff_transformation_repC3 Transformation_3; typedef Translation_repC3 Translation_3; typedef Scaling_repC3 Scaling_3; typedef typename Transformation_base_3::Point_3 Point_3; typedef typename Transformation_base_3::Vector_3 Vector_3; typedef typename Transformation_base_3::Direction_3 Direction_3; typedef typename Transformation_base_3::Aff_transformation_3 Aff_transformation_3; Scaling_repC3() {} Scaling_repC3(const FT &s) : scalefactor_(s) {} virtual ~Scaling_repC3() {} virtual Point_3 transform(const Point_3 &p) const { return Point_3(scalefactor_ * p.x(), scalefactor_ * p.y(), scalefactor_ * p.z()); } virtual Vector_3 transform(const Vector_3 &v) const { return Vector_3(scalefactor_ * v.x(), scalefactor_ * v.y(), scalefactor_ * v.z()); } virtual Direction_3 transform(const Direction_3 &d) const { return d; } virtual Aff_transformation_3 operator*(const Transformation_base_3 &t) const { return t.compose(*this); } virtual Aff_transformation_3 compose(const Transformation_3 &t) const { return Aff_transformation_3(scalefactor_ * t.t11, scalefactor_ * t.t12, scalefactor_ * t.t13, t.t14, scalefactor_ * t.t21, scalefactor_ * t.t22, scalefactor_ * t.t23, t.t24, scalefactor_ * t.t31, scalefactor_ * t.t32, scalefactor_ * t.t33, t.t34); } virtual Aff_transformation_3 compose(const Translation_3 &t) const { FT ft0(0); return Aff_transformation_3(scalefactor_, ft0, ft0, t.translationvector_.x(), ft0, scalefactor_, ft0, t.translationvector_.y(), ft0, ft0, scalefactor_, t.translationvector_.z()); } virtual Aff_transformation_3 compose(const Scaling_3 &t) const { return Aff_transformation_3(SCALING, scalefactor_*t.scalefactor_); } virtual Aff_transformation_3 inverse() const { return Aff_transformation_3(SCALING, FT(1)/scalefactor_); } virtual Aff_transformation_3 transpose() const { return Aff_transformation_3(SCALING, scalefactor_); } virtual bool is_even() const { return true; } virtual FT cartesian(int i, int j) const { if (i!=j) return FT(0); if (i==3) return FT(1); return scalefactor_; } virtual std::ostream &print(std::ostream &os) const { os << "Aff_transformationC3(" << scalefactor_ << ")"; return os; } private: FT scalefactor_; }; } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Aff_transformation_3.h" 2 namespace CGAL { template < class R_ > class Aff_transformationC3 : public Handle_for_virtual > { friend class PlaneC3; typedef typename R_::FT FT; typedef Aff_transformation_rep_baseC3 Aff_t_base; typedef typename R_::Point_3 Point_3; typedef typename R_::Vector_3 Vector_3; typedef typename R_::Direction_3 Direction_3; typedef typename R_::Plane_3 Plane_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; using Handle_for_virtual::initialize_with; public: typedef R_ R; Aff_transformationC3() { FT ft1(1), ft0(0); initialize_with(Aff_transformation_repC3(ft1, ft0, ft0, ft0, ft1, ft0, ft0, ft0, ft1)); } Aff_transformationC3(const Identity_transformation) { FT ft1(1), ft0(0); initialize_with(Aff_transformation_repC3(ft1, ft0, ft0, ft0, ft1, ft0, ft0, ft0, ft1)); } Aff_transformationC3(const Translation, const Vector_3 &v) { initialize_with(Translation_repC3(v)); } Aff_transformationC3(const Scaling, const FT &s, const FT &w = FT(1)) { if (w != FT(1)) initialize_with(Scaling_repC3(s/w)); else initialize_with(Scaling_repC3(s)); } Aff_transformationC3(const FT& m11, const FT& m12, const FT& m13, const FT& m21, const FT& m22, const FT& m23, const FT& m31, const FT& m32, const FT& m33, const FT& w = FT(1)) { if (w != FT(1)) initialize_with(Aff_transformation_repC3(m11/w, m12/w, m13/w, m21/w, m22/w, m23/w, m31/w, m32/w, m33/w)); else initialize_with(Aff_transformation_repC3(m11, m12, m13, m21, m22, m23, m31, m32, m33)); } Aff_transformationC3( const FT& m11, const FT& m12, const FT& m13, const FT& m14, const FT& m21, const FT& m22, const FT& m23, const FT& m24, const FT& m31, const FT& m32, const FT& m33, const FT& m34, const FT& w = FT(1)) { if (w != FT(1)) initialize_with(Aff_transformation_repC3(m11/w, m12/w, m13/w, m14/w, m21/w, m22/w, m23/w, m24/w, m31/w, m32/w, m33/w, m34/w)); else initialize_with(Aff_transformation_repC3(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34)); } Point_3 transform(const Point_3 &p) const { return this->Ptr()->transform(p); } Point_3 operator()(const Point_3 &p) const { return transform(p); } Vector_3 transform(const Vector_3 &v) const { return this->Ptr()->transform(v); } Vector_3 operator()(const Vector_3 &v) const { return transform(v); } Direction_3 transform(const Direction_3 &d) const { return this->Ptr()->transform(d); } Direction_3 operator()(const Direction_3 &d) const { return transform(d); } Plane_3 transform(const Plane_3& p) const { if (is_even()) return Plane_3(transform(p.point()), transpose().inverse().transform(p.orthogonal_direction())); else return Plane_3(transform(p.point()), - transpose().inverse().transform(p.orthogonal_direction())); } Plane_3 operator()(const Plane_3& p) const { return transform(p); } Aff_transformation_3 inverse() const { return this->Ptr()->inverse(); } bool is_even() const { return this->Ptr()->is_even(); } bool is_odd() const { return ! (this->Ptr()->is_even()); } FT cartesian(int i, int j) const { return this->Ptr()->cartesian(i,j); } FT homogeneous(int i, int j) const { return cartesian(i,j); } FT m(int i, int j) const { return cartesian(i,j); } FT hm(int i, int j) const { return cartesian(i,j); } Aff_transformation_3 operator*(const Aff_transformationC3 &t) const { return (*this->Ptr()) * (*t.Ptr()); } protected: Aff_transformation_3 transpose() const { return this->Ptr()->transpose(); } }; template < class R > std::ostream &operator<<(std::ostream &os, const Aff_transformationC3 &t) { t.print(os); return os; } } # 62 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_planes_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/predicates_on_planes_3.h" namespace CGAL { template < class K > inline typename K::Oriented_side side_of_oriented_plane(const PlaneC3 &h, const PointC3 &p) { return side_of_oriented_planeC3(h.a(), h.b(), h.c(), h.d(), p.x(), p.y(), p.z()); } template < class K > inline typename K::Boolean equal_plane(const PlaneC3 &h, const PlaneC3 &p) { return equal_planeC3(h.a(), h.b(), h.c(), h.d(), p.a(), p.b(), p.c(), p.d()); } } # 65 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/point_constructions_3.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/point_constructions_3.h" namespace CGAL { template PointC3 point_on_plane(const PlaneC3 &p) { typename K::FT x, y, z; point_on_planeC3(p.a(), p.b(), p.c(), p.d(), x, y, z); return PointC3(x, y, z); } template PointC3 projection_plane(const PointC3 &p, const PlaneC3 &h) { typename K::FT x, y, z; projection_planeC3(h.a(), h.b(), h.c(), h.d(), p.x(), p.y(), p.z(), x, y, z); return PointC3(x, y, z); } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/plane_constructions_3.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/plane_constructions_3.h" namespace CGAL { template PlaneC3 plane_from_points(const PointC3 &p, const PointC3 &q, const PointC3 &r) { typename R::FT a, b, c, d; plane_from_pointsC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), a, b, c, d); return PlaneC3(a, b, c, d); } template PlaneC3 plane_from_point_direction(const PointC3 &p, const DirectionC3 &d) { typename R::FT A, B, C, D; plane_from_point_directionC3(p.x(), p.y(), p.z(), d.dx(), d.dy(), d.dz(), A, B, C, D); return PlaneC3(A, B, C, D); } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/ft_constructions_3.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/ft_constructions_3.h" namespace CGAL { template < class K > inline typename K::FT squared_distance(const PointC3 &p, const PointC3 &q) { return squared_distanceC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); } template < class K > inline typename K::FT scaled_distance_to_plane(const PlaneC3 &h, const PointC3 &p) { return scaled_distance_to_planeC3(h.a(), h.b(), h.c(), h.d(), p.x(), p.y(), p.z()); } template < class K > inline typename K::FT scaled_distance_to_plane(const PointC3 &hp, const PointC3 &hq, const PointC3 &hr, const PointC3 &p) { return scaled_distance_to_planeC3(hp.x(), hp.y(), hp.z(), hq.x(), hq.y(), hq.z(), hr.x(), hr.y(), hr.z(), p.x(), p.y(), p.z()); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/basic_constructions_3.h" 2 # 66 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_1.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_1.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/wmult.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/wmult.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Wutils.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Wutils.h" namespace CGAL { namespace internal { template < typename Rep_Tag > struct wmult_tag; template <> struct wmult_tag { template < typename RT > const RT & operator()(const RT &a, const RT &) const { return a; } template < typename RT > const RT & operator()(const RT &a, const RT &, const RT &) const { return a; } template < typename RT > const RT & operator()(const RT &a, const RT &, const RT &, const RT &) const { return a; } template < typename RT > const RT & operator()(const RT &a, const RT &, const RT &, const RT &, const RT &) const { return a; } }; template <> struct wmult_tag { template < typename RT > RT operator()(const RT &a, const RT &w) const { return a*w; } template < typename RT > RT operator()(const RT &a, const RT &w1, const RT &w2) const { return a*w1*w2; } template < typename RT > RT operator()(const RT &a, const RT &w1, const RT &w2, const RT &w3) const { return a*w1*w2*w3; } template < typename RT > RT operator()(const RT &a, const RT &w1, const RT &w2, const RT &w3, const RT &w4) const { return a*w1*w2*w3*w4; } }; template < typename K > struct wmult_functor : public wmult_tag {}; template < typename Rep_Tag > struct wmult_hw_tag; template <> struct wmult_hw_tag { template < typename RT, typename T > const RT & operator()(const RT &a, const T &) const { return a; } template < typename RT, typename T > const RT & operator()(const RT &a, const RT &, const T &) const { return a; } template < typename RT, typename T > const RT & operator()(const RT &a, const RT &, const RT &, const T &) const { return a; } template < typename RT, typename T > const RT & operator()(const RT &a, const RT &, const RT &, const RT &, const T &) const { return a; } }; template <> struct wmult_hw_tag { template < typename RT, typename T > RT operator()(const RT &a, const T &t) const { return a*t.hw(); } template < typename RT, typename T > RT operator()(const RT &a, const RT &w1, const T &t) const { return a*w1*t.hw(); } template < typename RT, typename T > RT operator()(const RT &a, const RT &w1, const RT &w2, const T &t) const { return a*w1*w2*t.hw(); } template < typename RT, typename T > RT operator()(const RT &a, const RT &w1, const RT &w2, const RT &w3, const T &t) const { return a*w1*w2*w3*t.hw(); } }; template < typename K > struct wmult_hw_functor : public wmult_hw_tag {}; template < typename Rep_Tag > struct wcross_tag_2; template <> struct wcross_tag_2 { template < typename Point_2 > typename Point_2::R::RT operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r) const { return (q.x()-p.x())*(r.y()-q.y()) - (q.y()-p.y())*(r.x()-q.x()); } }; template <> struct wcross_tag_2 { template < typename Point_2 > typename Point_2::R::RT operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r) const { return determinant(p.hx(), q.hx(), r.hx(), p.hy(), q.hy(), r.hy(), p.hw(), q.hw(), r.hw()); } }; template < typename K > struct wcross_functor_2 : public wcross_tag_2 {}; template < typename Rep_Tag > struct wcross_tag_3; template <> struct wcross_tag_3 { template < typename Point_3 > typename Point_3::R::Vector_3 operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r) const { typedef typename Point_3::R::FT FT; typedef typename Point_3::R::Vector_3 Vector_3; FT x = (q.y()-p.y())*(r.z()-q.z()) - (q.z()-p.z())*(r.y()-q.y()); FT y = (q.z()-p.z())*(r.x()-q.x()) - (q.x()-p.x())*(r.z()-q.z()); FT z = (q.x()-p.x())*(r.y()-q.y()) - (q.y()-p.y())*(r.x()-q.x()); return Vector_3(x, y, z); } }; template <> struct wcross_tag_3 { template < typename Point_3 > typename Point_3::R::Vector_3 operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r) const { typedef typename Point_3::R::RT RT; typedef typename Point_3::R::Vector_3 Vector_3; RT x = p.hy() * (q.hz()*r.hw() - q.hw()*r.hz() ) + p.hz() * (q.hw()*r.hy() - q.hy()*r.hw() ) + p.hw() * (q.hy()*r.hz() - q.hz()*r.hy() ); RT y = p.hz() * (q.hx()*r.hw() - q.hw()*r.hx() ) + p.hx() * (q.hw()*r.hz() - q.hz()*r.hw() ) + p.hw() * (q.hz()*r.hx() - q.hx()*r.hz() ); RT z = p.hx() * (q.hy()*r.hw() - q.hw()*r.hy() ) + p.hy() * (q.hw()*r.hx() - q.hx()*r.hw() ) + p.hw() * (q.hx()*r.hy() - q.hy()*r.hx() ); return Vector_3(x, y, z); } }; template < typename K > struct wcross_functor_3 : public wcross_tag_3 {}; } template < typename K, typename T > inline typename K::RT wmult_hw(K*, const typename K::RT &a, const T &t) { return internal::wmult_hw_functor()(a, t); } template < typename K, typename T > inline typename K::RT wmult_hw(K*, const typename K::RT &a, const typename K::RT &w1, const T &t) { return internal::wmult_hw_functor()(a, w1, t); } template < typename K, typename T > inline typename K::RT wmult_hw(K*, const typename K::RT &a, const typename K::RT &w1, const typename K::RT &w2, const T &t) { return internal::wmult_hw_functor()(a, w1, w2, t); } template < typename K, typename T > inline typename K::RT wmult_hw(K*, const typename K::RT &a, const typename K::RT &w1, const typename K::RT &w2, const typename K::RT &w3, const T &t) { return internal::wmult_hw_functor()(a, w1, w2, w3, t); } template < typename K > inline typename K::RT wmult(K*, const typename K::RT &a, const typename K::RT &w) { return internal::wmult_functor()(a, w); } template < typename K > inline typename K::RT wmult(K*, const typename K::RT &a, const typename K::RT &w1, const typename K::RT &w2) { return internal::wmult_functor()(a, w1, w2); } template < typename K > inline typename K::RT wmult(K*, const typename K::RT &a, const typename K::RT &w1, const typename K::RT &w2, const typename K::RT &w3) { return internal::wmult_functor()(a, w1, w2, w3); } template < typename K > inline typename K::RT wmult(K*, const typename K::RT &a, const typename K::RT &w1, const typename K::RT &w2, const typename K::RT &w3, const typename K::RT &w4) { return internal::wmult_functor()(a, w1, w2, w3, w4); } template < typename K > inline typename K::RT wcross(K*, const Point_2 &p, const Point_2 &q, const Point_2 &r) { return internal::wcross_functor_2()(p, q, r); } template < typename K > inline typename K::Vector_3 wcross(const Point_3 &p, const Point_3 &q, const Point_3 &r) { return internal::wcross_functor_3()(p, q, r); } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/wmult.h" 2 # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_utils.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_utils.h" namespace CGAL { namespace internal { template bool is_null(const typename K::Vector_2 &v, const K&) { typedef typename K::RT RT; return v.hx()==RT(0) && v.hy()==RT(0); } template typename K::RT wdot(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K&) { return (u.hx()*v.hx() + u.hy()*v.hy()); } template typename K::RT wdot_tag(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K&, const Cartesian_tag&) { return (p.x() - q.x()) * (r.x() - q.x()) + (p.y() - q.y()) * (r.y() - q.y()); } template typename K::RT wdot_tag(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K&, const Homogeneous_tag&) { return (p.hx() * q.hw() - q.hx() * p.hw()) * (r.hx() * q.hw() - q.hx() * r.hw()) + (p.hy() * q.hw() - q.hy() * p.hw()) * (r.hy() * q.hw() - q.hy() * r.hw()); } template typename K::RT wdot(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { typedef typename K::Kernel_tag Tag; Tag tag; return wdot_tag(p, q, r, k, tag); } template typename K::RT wcross(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K&) { return (typename K::RT)(u.hx()*v.hy() - u.hy()*v.hx()); } template inline typename K::RT wcross_tag(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K&, const Homogeneous_tag&) { return CGAL::determinant( p.hx(), q.hx(), r.hx(), p.hy(), q.hy(), r.hy(), p.hw(), q.hw(), r.hw()); } template inline typename K::FT wcross_tag(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K&, const Cartesian_tag&) { return (q.x()-p.x())*(r.y()-q.y()) - (q.y()-p.y())*(r.x()-q.x()); } template typename K::RT wcross(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { typedef typename K::Kernel_tag Tag; Tag tag; return wcross_tag(p, q, r, k, tag); } template inline bool is_acute_angle(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wdot(u, v, k)) > RT(0) ; } template inline bool is_straight_angle(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wdot(u, v, k)) == RT(0) ; } template inline bool is_obtuse_angle(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wdot(u, v, k)) < RT(0) ; } template inline bool is_acute_angle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { typedef typename K::RT RT; return RT(wdot(p, q, r, k)) > RT(0) ; } template inline bool is_straight_angle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { typedef typename K::RT RT; return RT(wdot(p, q, r, k)) == RT(0) ; } template inline bool is_obtuse_angle(const typename K::Point_2 &p, const typename K::Point_2 &q, const typename K::Point_2 &r, const K& k) { typedef typename K::RT RT; return RT(wdot(p, q, r, k)) < RT(0) ; } template inline bool counterclockwise(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wcross(u,v, k)) > RT(0); } template inline bool left_turn(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wcross(u,v, k)) > RT(0); } template inline bool clockwise(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wcross(u,v, k)) < RT(0); } template inline bool right_turn(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wcross(u,v, k)) < RT(0); } template inline bool collinear(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::RT RT; return RT(wcross(u,v, k)) == RT(0); } template inline bool same_direction_tag(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K&, const Cartesian_tag&) { typedef typename K::FT FT; const FT& ux = u.x(); const FT& uy = u.y(); if (::CGAL:: abs(ux) > ::CGAL:: abs(uy)) { return ::CGAL:: sign(ux) == ::CGAL:: sign(v.x()); } else { return ::CGAL:: sign(uy) == ::CGAL:: sign(v.y()); } } template inline bool same_direction_tag(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K&, const Homogeneous_tag&) { typedef typename K::RT RT; const RT& uhx = u.hx(); const RT& uhy = u.hy(); if (::CGAL:: abs(uhx) > ::CGAL:: abs(uhy)) { return ::CGAL:: sign(uhx) == ::CGAL:: sign(v.hx()); } else { return ::CGAL:: sign(uhy) == ::CGAL:: sign(v.hy()); } } template inline bool same_direction(const typename K::Vector_2 &u, const typename K::Vector_2 &v, const K& k) { typedef typename K::Kernel_tag Tag; Tag tag; return same_direction_tag(u,v, k, tag); } } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_1.h" 2 namespace CGAL { namespace internal { template inline typename K::FT squared_distance(const typename K::Point_2 & pt1, const typename K::Point_2 & pt2, const K& k) { typename K::Vector_2 vec = k.construct_vector_2_object()(pt2, pt1); return (typename K::FT)k.compute_squared_length_2_object()(vec); } template typename K::FT squared_distance(const typename K::Point_2 &pt, const typename K::Line_2 &line, const K&, const Homogeneous_tag&) { typedef typename K::RT RT; typedef typename K::FT FT; const RT & a = line.a(); const RT & b = line.b(); const RT & w = pt.hw(); RT n = a*pt.hx() + b*pt.hy() + w * line.c(); RT d = (::CGAL:: square(a) + ::CGAL:: square(b)) * ::CGAL:: square(w); return Rational_traits().make_rational(::CGAL:: square(n), d); } template typename K::FT squared_distance(const typename K::Point_2 &pt, const typename K::Line_2 &line, const K&, const Cartesian_tag&) { typedef typename K::FT FT; const FT & a = line.a(); const FT & b = line.b(); FT n = a*pt.x() + b*pt.y() + line.c(); FT d = ::CGAL:: square(a) + ::CGAL:: square(b); return ::CGAL:: square(n)/d; } template typename K::FT squared_distance(const typename K::Point_2 &pt, const typename K::Line_2 &line, const K& k) { typedef typename K::Kernel_tag Tag; Tag tag; return squared_distance(pt, line, k, tag); } template inline typename K::FT squared_distance(const typename K::Line_2 &line, const typename K::Point_2 &pt, const K& k) { return internal::squared_distance(pt, line, k); } template typename K::FT squared_distance(const typename K::Point_2 &pt, const typename K::Ray_2 &ray, const K& k) { typedef typename K::Vector_2 Vector_2; typename K::Construct_vector_2 construct_vector; Vector_2 diff = construct_vector(ray.source(), pt); const Vector_2 &dir = ray.direction().vector(); if (!is_acute_angle(dir,diff, k) ) return (typename K::FT)k.compute_squared_length_2_object()(diff); return internal::squared_distance(pt, ray.supporting_line(), k); } template inline typename K::FT squared_distance(const typename K::Ray_2 &ray, const typename K::Point_2 &pt, const K& k) { return internal::squared_distance(pt, ray, k); } template typename K::FT squared_distance(const typename K::Point_2 &pt, const typename K::Segment_2 &seg, const K& k) { typename K::Construct_vector_2 construct_vector; typedef typename K::Vector_2 Vector_2; typedef typename K::RT RT; Vector_2 diff = construct_vector(seg.source(), pt); Vector_2 segvec = construct_vector(seg.source(), seg.target()); RT d = wdot(diff,segvec, k); if (d <= (RT)0) return (typename K::FT)k.compute_squared_length_2_object()(diff); RT e = wdot(segvec,segvec, k); if (wmult((K*)0 ,d, segvec.hw()) > wmult((K*)0, e, diff.hw())) return internal::squared_distance(pt, seg.target(), k); return internal::squared_distance(pt, seg.supporting_line(), k); } template inline typename K::FT squared_distance(const typename K::Segment_2 &seg, const typename K::Point_2 &pt, const K& k) { return internal::squared_distance(pt, seg, k); } template typename K::FT squared_distance_parallel(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, const K& k) { typedef typename K::Vector_2 Vector_2; const Vector_2 &dir1 = seg1.direction().vector(); const Vector_2 &dir2 = seg2.direction().vector(); if (same_direction(dir1, dir2, k)) { if (!is_acute_angle(seg1.source(), seg1.target(), seg2.source(), k)) return internal::squared_distance(seg1.target(), seg2.source(), k); if (!is_acute_angle(seg1.target(), seg1.source(), seg2.target(), k)) return internal::squared_distance(seg1.source(), seg2.target(), k); } else { if (!is_acute_angle(seg1.source(), seg1.target(), seg2.target(), k)) return internal::squared_distance(seg1.target(), seg2.target(), k); if (!is_acute_angle(seg1.target(), seg1.source(), seg2.source(), k)) return internal::squared_distance(seg1.source(), seg2.source(), k); } return internal::squared_distance(seg2.source(), seg1.supporting_line(), k); } template inline typename K::RT _distance_measure_sub(const typename K::RT &startwcross, const typename K::RT &endwcross, const typename K::Point_2 &start, const typename K::Point_2 &end) { return ::CGAL:: abs(wmult((K*)0, startwcross, end.hw())) - ::CGAL:: abs(wmult((K*)0, endwcross, start.hw())); } template typename K::FT squared_distance(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, const K& k) { typedef typename K::RT RT; typedef typename K::FT FT; bool crossing1, crossing2; RT c1s, c1e, c2s, c2e; if (seg1.source() == seg1.target()) return internal::squared_distance(seg1.source(), seg2, k); if (seg2.source() == seg2.target()) return internal::squared_distance(seg2.source(), seg1, k); c1s = wcross(seg2.source(), seg2.target(), seg1.source(), k); c1e = wcross(seg2.source(), seg2.target(), seg1.target(), k); c2s = wcross(seg1.source(), seg1.target(), seg2.source(), k); c2e = wcross(seg1.source(), seg1.target(), seg2.target(), k); if (c1s < RT(0)) { crossing1 = (c1e >= RT(0)); } else { if (c1e <= RT(0)) { if (c1s == RT(0) && c1e == RT(0)) return internal::squared_distance_parallel(seg1, seg2, k); crossing1 = true; } else { crossing1 = (c1s == RT(0)); } } if (c2s < RT(0)) { crossing2 = (c2e >= RT(0)); } else { if (c2e <= RT(0)) { if (c2s == RT(0) && c2e == RT(0)) return internal::squared_distance_parallel(seg1, seg2, k); crossing2 = true; } else { crossing2 = (c2s == RT(0)); } } if (crossing1) { if (crossing2) return (FT)0; RT dm; dm = _distance_measure_sub(c2s,c2e, seg2.source(), seg2.target()); if (dm < RT(0)) { return internal::squared_distance(seg2.source(), seg1, k); } else { if (dm > RT(0)) { return internal::squared_distance(seg2.target(), seg1, k); } else { return internal::squared_distance_parallel(seg1, seg2, k); } } } else { if (crossing2) { RT dm; dm = _distance_measure_sub(c1s, c1e,seg1.source(),seg1.target()); if (dm < RT(0)) { return internal::squared_distance(seg1.source(), seg2, k); } else { if (dm > RT(0)) { return internal::squared_distance(seg1.target(), seg2, k); } else { return internal::squared_distance_parallel(seg1, seg2, k); } } } else { FT min1, min2; RT dm = _distance_measure_sub( c1s, c1e, seg1.source(), seg1.target()); if (dm == RT(0)) return internal::squared_distance_parallel(seg1, seg2, k); min1 = (dm < RT(0)) ? internal::squared_distance(seg1.source(), seg2, k): internal::squared_distance(seg1.target(), seg2, k); dm = _distance_measure_sub( c2s, c2e, seg2.source(), seg2.target()); if (dm == RT(0)) return internal::squared_distance_parallel(seg1, seg2, k); min2 = (dm < RT(0)) ? internal::squared_distance(seg2.source(), seg1, k): internal::squared_distance(seg2.target(), seg1, k); return (min1 < min2) ? min1 : min2; } } } template inline typename K::RT _distance_measure_sub(const typename K::RT &startwcross, const typename K::RT &endwcross, const typename K::Vector_2 &start, const typename K::Vector_2 &end) { return ::CGAL:: abs(wmult((K*)0, startwcross, end.hw())) - ::CGAL:: abs(wmult((K*)0, endwcross, start.hw())); } template typename K::FT squared_distance_parallel(const typename K::Segment_2 &seg, const typename K::Ray_2 &ray, const K& k) { typedef typename K::Vector_2 Vector_2; const Vector_2 &dir1 = seg.direction().vector(); const Vector_2 &dir2 = ray.direction().vector(); if (same_direction(dir1, dir2, k)) { if (!is_acute_angle(seg.source(), seg.target(), ray.source(), k)) return internal::squared_distance(seg.target(), ray.source(), k); } else { if (!is_acute_angle(seg.target(), seg.source(), ray.source(), k)) return internal::squared_distance(seg.source(), ray.source(), k); } return internal::squared_distance(ray.source(), seg.supporting_line(), k); } template typename K::FT squared_distance(const typename K::Segment_2 &seg, const typename K::Ray_2 &ray, const K& k) { typename K::Construct_vector_2 construct_vector; typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Vector_2 Vector_2; const Vector_2 &raydir = ray.direction().vector(); Vector_2 startvec(construct_vector(ray.source(), seg.source())); Vector_2 endvec(construct_vector(ray.source(), seg.target())); typename K::Orientation_2 orientation; bool crossing1, crossing2; RT c1s, c1e; if (seg.source() == seg.target()) return internal::squared_distance(seg.source(), ray, k); c1s = wcross(raydir, startvec, k); c1e = wcross(raydir, endvec, k); if (c1s < RT(0)) { crossing1 = (c1e >= RT(0)); } else { if (c1e <= RT(0)) { if (c1s == RT(0) && c1e == RT(0)) return internal::squared_distance_parallel(seg, ray, k); crossing1 = true; } else { crossing1 = (c1s == RT(0)); } } switch (orientation(seg.source(), seg.target(), ray.source())) { case LEFT_TURN: crossing2 = right_turn(construct_vector(seg.source(), seg.target()), raydir, k); break; case RIGHT_TURN: crossing2 = left_turn(construct_vector(seg.source(), seg.target()), raydir, k); break; default: crossing2 = true; break; } if (crossing1) { if (crossing2) return FT(0); return internal::squared_distance(ray.source(), seg, k); } else { if (crossing2) { RT dm; dm = _distance_measure_sub(c1s, c1e, startvec, endvec); if (dm < RT(0)) { return internal::squared_distance(seg.source(), ray, k); } else { if (dm > RT(0)) { return internal::squared_distance(seg.target(), ray, k); } else { return internal::squared_distance_parallel(seg, ray, k); } } } else { FT min1, min2; RT dm = _distance_measure_sub(c1s, c1e, startvec, endvec); if (dm == RT(0)) return internal::squared_distance_parallel(seg, ray, k); min1 = (dm < RT(0)) ? internal::squared_distance(seg.source(), ray, k) : internal::squared_distance(seg.target(), ray, k); min2 = internal::squared_distance(ray.source(), seg, k); return (min1 < min2) ? min1 : min2; } } } template inline typename K::FT squared_distance(const typename K::Ray_2 &ray, const typename K::Segment_2 &seg, const K& k) { return internal::squared_distance(seg, ray, k); } template typename K::FT _sqd_to_line(const typename K::Vector_2 &diff, const typename K::RT & wcross, const typename K::Vector_2 &dir ) { typedef typename K::RT RT; typedef typename K::FT FT; RT numerator = ::CGAL:: square(wcross); RT denominator = wmult((K*)0, RT(wdot(dir,dir, K())), diff.hw(), diff.hw()); return Rational_traits().make_rational(numerator, denominator); } template typename K::FT squared_distance(const typename K::Segment_2 &seg, const typename K::Line_2 &line, const K& k) { typename K::Construct_vector_2 construct_vector; typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Vector_2 Vector_2; typedef typename K::Point_2 Point_2; const Vector_2 &linedir = line.direction().vector(); const Point_2 &linepoint = line.point(); Vector_2 startvec(construct_vector(linepoint, seg.source())); Vector_2 endvec(construct_vector(linepoint, seg.target())); bool crossing1; RT c1s, c1e; if (seg.source() == seg.target()) return internal::squared_distance(seg.source(), line, k); c1s = wcross(linedir, startvec, k); c1e = wcross(linedir, endvec, k); if (c1s < RT(0)) { crossing1 = (c1e >= RT(0)); } else { if (c1e <= RT(0)) { crossing1 = true; } else { crossing1 = (c1s == RT(0)); } } if (crossing1) { return (FT)0; } else { RT dm; dm = _distance_measure_sub(c1s, c1e, startvec, endvec); if (dm <= RT(0)) { return _sqd_to_line(startvec, c1s, linedir); } else { return _sqd_to_line(endvec, c1e, linedir); } } } template inline typename K::FT squared_distance(const typename K::Line_2 &line, const typename K::Segment_2 &seg, const K& k) { return internal::squared_distance(seg, line, k); } template typename K::FT ray_ray_squared_distance_parallel( const typename K::Vector_2 &ray1dir, const typename K::Vector_2 &ray2dir, const typename K::Vector_2 &from1to2, const K& k) { typedef typename K::RT RT; typedef typename K::FT FT; if (!is_acute_angle(ray1dir, from1to2, k)) { if (!same_direction(ray1dir, ray2dir, k)) return (typename K::FT)k.compute_squared_length_2_object()(from1to2); } RT wcr, w; wcr = wcross(ray1dir, from1to2, k); w = from1to2.hw(); return (typename K::FT)(FT(wcr*wcr) / FT(wmult((K*)0, RT(wdot(ray1dir, ray1dir, k)), w, w))); } template typename K::FT squared_distance(const typename K::Ray_2 &ray1, const typename K::Ray_2 &ray2, const K& k) { typename K::Construct_vector_2 construct_vector; typedef typename K::Vector_2 Vector_2; typedef typename K::FT FT; const Vector_2 &ray1dir = ray1.direction().vector(); const Vector_2 &ray2dir = ray2.direction().vector(); Vector_2 diffvec(construct_vector(ray1.source(),ray2.source())); bool crossing1, crossing2; switch (orientation(ray1dir, ray2dir, k)) { case COUNTERCLOCKWISE: crossing1 = !clockwise(diffvec, ray2dir, k); crossing2 = !counterclockwise(ray1dir, diffvec, k); break; case CLOCKWISE: crossing1 = !counterclockwise(diffvec, ray2dir, k); crossing2 = !clockwise(ray1dir, diffvec, k); break; default: return ray_ray_squared_distance_parallel(ray1dir,ray2dir,diffvec,k); } if (crossing1) { if (crossing2) return (FT)0; return internal::squared_distance(ray2.source(), ray1, k); } else { if (crossing2) { return internal::squared_distance(ray1.source(), ray2, k); } else { FT min1, min2; min1 = internal::squared_distance(ray1.source(), ray2, k); min2 = internal::squared_distance(ray2.source(), ray1, k); return (min1 < min2) ? min1 : min2; } } } template typename K::FT squared_distance(const typename K::Line_2 &line, const typename K::Ray_2 &ray, const K& k) { typename K::Construct_vector_2 construct_vector; typedef typename K::FT FT; typedef typename K::Vector_2 Vector_2; Vector_2 normalvec(line.a(), line.b()); Vector_2 diff = construct_vector(line.point(), ray.source()); FT sign_dist = k.compute_scalar_product_2_object()(diff,normalvec); if (sign_dist < FT(0)) { if (is_acute_angle(normalvec, ray.direction().vector(), k) ) return (FT)0; } else { if (is_obtuse_angle(normalvec, ray.direction().vector(), k) ) return (FT)0; } return (typename K::FT)((sign_dist*sign_dist)/k.compute_squared_length_2_object()(normalvec)); } template inline typename K::FT squared_distance(const typename K::Ray_2 &ray, const typename K::Line_2 &line, const K& k) { return internal::squared_distance(line, ray, k); } template inline typename K::FT squared_distance(const typename K::Line_2 &line1, const typename K::Line_2 &line2, const K& k) { typedef typename K::FT FT; if (internal::parallel(line1, line2, k)) return internal::squared_distance(line1.point(), line2, k); else return (FT)0; } template void distance_index(int &ind, const typename K::Point_2 &pt, const typename K::Ray_2 &ray, const K& k) { typename K::Construct_vector_2 construct_vector; if (!is_acute_angle(ray.direction().vector(), construct_vector(ray.source(), pt), k)) { ind = 0; return; } ind = -1; } template void distance_index(int &ind, const typename K::Point_2 &pt, const typename K::Segment_2 &seg, const K& k) { if (!is_acute_angle(seg.target(),seg.source(),pt, k)) { ind = 0; return; } if (!is_acute_angle(seg.source(),seg.target(),pt, k)) { ind = 1; return; } ind = -1; } template inline typename K::FT squared_distance_indexed(const typename K::Point_2 &pt, const typename K::Ray_2 &ray, int ind, const K& k) { if (ind == 0) return internal::squared_distance(pt, ray.source(), k); return internal::squared_distance(pt, ray.supporting_line(), k); } template inline typename K::FT squared_distance_indexed(const typename K::Point_2 &pt, const typename K::Segment_2 &seg, int ind, const K& k) { if (ind == 0) return internal::squared_distance(pt, seg.source(), k); if (ind == 1) return internal::squared_distance(pt, seg.target(), k); return internal::squared_distance(pt, seg.supporting_line(), k); } } template inline typename K::FT squared_distance(const Point_2 & pt1, const Point_2 & pt2) { return internal::squared_distance(pt1, pt2, K()); } template inline typename K::FT squared_distance(const Point_2 &pt, const Line_2 &line) { return internal::squared_distance(pt, line, K()); } template inline typename K::FT squared_distance(const Line_2 & line, const Point_2 & pt) { return squared_distance(pt, line); } template inline typename K::FT squared_distance(const Point_2 &pt, const Ray_2 &ray) { return internal::squared_distance(pt, ray, K()); } template inline typename K::FT squared_distance(const Ray_2 & ray, const Point_2 & pt) { return squared_distance(pt, ray); } template inline typename K::FT squared_distance(const Point_2 &pt, const Segment_2 &seg) { return internal::squared_distance(pt, seg, K()); } template inline typename K::FT squared_distance(const Segment_2 & seg, const Point_2 & pt) { return internal::squared_distance(pt, seg, K()); } template inline typename K::FT squared_distance(const Segment_2 &seg1, const Segment_2 &seg2) { return internal::squared_distance(seg1, seg2, K()); } template inline typename K::FT squared_distance(const Segment_2 &seg, const Ray_2 &ray) { return internal::squared_distance(seg, ray, K()); } template inline typename K::FT squared_distance(const Ray_2 & ray, const Segment_2 & seg) { return internal::squared_distance(seg, ray, K()); } template inline typename K::FT squared_distance(const Segment_2 &seg, const Line_2 &line) { return internal::squared_distance(seg, line, K()); } template inline typename K::FT squared_distance(const Line_2 & line, const Segment_2 & seg) { return internal::squared_distance(seg, line, K()); } template inline typename K::FT squared_distance(const Ray_2 &ray1, const Ray_2 &ray2) { return internal::squared_distance(ray1, ray2, K()); } template inline typename K::FT squared_distance(const Line_2 &line, const Ray_2 &ray) { return internal::squared_distance(line, ray, K()); } template inline typename K::FT squared_distance(const Ray_2 & ray, const Line_2 & line) { return internal::squared_distance(line, ray, K()); } template inline typename K::FT squared_distance(const Line_2 &line1, const Line_2 &line2) { return internal::squared_distance(line1, line2, K()); } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_2.h" 2 # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2_2.h" namespace CGAL { namespace internal { template void distance_index(int &ind1, int &ind2, const typename K::Point_2 &pt, const typename K::Triangle_2 &triangle, const K& k ) { typename K::Left_turn_2 leftturn = k.left_turn_2_object(); typedef typename K::Point_2 Point_2; const Point_2 &vt0 = triangle.vertex(0); const Point_2 &vt1 = triangle.vertex(1); const Point_2 &vt2 = triangle.vertex(2); if (leftturn(vt0, vt1, vt2)) { if (leftturn(pt, vt1, vt0)) { if (!is_acute_angle(vt0, vt1, pt, k)) { if (leftturn(pt, vt2, vt1)) { if (!is_acute_angle(vt1, vt2, pt, k)) { ind1 = 2; ind2 = -1; return; } if (!is_acute_angle(vt2, vt1, pt, k)) { ind1 = 1; ind2 = -1; return; } ind1 = 1; ind2 = 2; return; } ind1 = 1; ind2 = -1; return; } if (!is_acute_angle(vt1, vt0, pt, k)) { if (leftturn(pt, vt0, vt2)) { if (!is_acute_angle(vt0, vt2, pt, k)) { ind1 = 2; ind2 = -1; return; } if (!is_acute_angle(vt2, vt0, pt, k)) { ind1 = 0; ind2 = -1; return; } ind1 = 2; ind2 = 0; return; } ind1 = 0; ind2 = -1; return; } ind1 = 0; ind2 = 1; return; } else { if (leftturn(pt, vt2, vt1)) { if (!is_acute_angle(vt1, vt2, pt, k)) { if (leftturn(pt, vt0, vt2)) { if (!is_acute_angle(vt0, vt2, pt, k)) { ind1 = 2; ind2 = -1; return; } if (!is_acute_angle(vt2, vt0, pt, k)) { ind1 = 0; ind2 = -1; return; } ind1 = 2; ind2 = 0; return; } ind1 = 0; ind2 = -1; return; } if (!is_acute_angle(vt2, vt1, pt, k)) { ind1 = 1; ind2 = -1; return; } ind1 = 1; ind2 = 2; return; } else { if (leftturn(pt, vt0, vt2)) { if (!is_acute_angle(vt2, vt0, pt, k)) { ind1 = 0; ind2 = -1; return; } if (!is_acute_angle(vt0, vt2, pt, k)) { ind1 = 2; ind2 = -1; return; } ind1 = 2; ind2 = 0; return; } else { ind1 = -1; ind2 = -1; return; } } } } else { if (leftturn(pt, vt2, vt0)) { if (!is_acute_angle(vt0, vt2, pt, k)) { if (leftturn(pt, vt1, vt2)) { if (!is_acute_angle(vt2, vt1, pt, k)) { ind1 = 1; ind2 = -1; return; } if (!is_acute_angle(vt1, vt2, pt, k)) { ind1 = 2; ind2 = -1; return; } ind1 = 2; ind2 = 1; return; } ind1 = 2; ind2 = -1; return; } if (!is_acute_angle(vt2, vt0, pt, k)) { if (leftturn(pt, vt0, vt1)) { if (!is_acute_angle(vt0, vt1, pt, k)) { ind1 = 1; ind2 = -1; return; } if (!is_acute_angle(vt1, vt0, pt, k)) { ind1 = 0; ind2 = -1; return; } ind1 = 1; ind2 = 0; return; } ind1 = 0; ind2 = -1; return; } ind1 = 0; ind2 = 2; return; } else { if (leftturn(pt, vt1, vt2)) { if (!is_acute_angle(vt2, vt1, pt, k)) { if (leftturn(pt, vt0, vt1)) { if (!is_acute_angle(vt0, vt1, pt, k)) { ind1 = 1; ind2 = -1; return; } if (!is_acute_angle(vt1, vt0, pt, k)) { ind1 = 0; ind2 = -1; return; } ind1 = 1; ind2 = 0; return; } ind1 = 0; ind2 = -1; return; } if (!is_acute_angle(vt1, vt2, pt, k)) { ind1 = 2; ind2 = -1; return; } ind1 = 2; ind2 = 1; return; } else { if (leftturn(pt, vt0, vt1)) { if (!is_acute_angle(vt1, vt0, pt, k)) { ind1 = 0; ind2 = -1; return; } if (!is_acute_angle(vt0, vt1, pt, k)) { ind1 = 1; ind2 = -1; return; } ind1 = 1; ind2 = 0; return; } else { ind1 = -1; ind2 = -1; return; } } } } } template typename K::FT squared_distance_indexed(const typename K::Point_2 &pt, const typename K::Triangle_2 &triangle, int ind1, int ind2, const K& k) { typedef typename K::FT FT; typedef typename K::Line_2 Line_2; if (ind1 == -1) return FT(0); if (ind2 == -1) return internal::squared_distance(pt, triangle.vertex(ind1), k); return internal::squared_distance(pt, Line_2(triangle.vertex(ind1), triangle.vertex(ind2)), k); } template typename K::FT squared_distance(const typename K::Point_2 &pt, const typename K::Triangle_2 &triangle, const K& k) { int ind1,ind2; distance_index(ind1, ind2, pt, triangle, k); return squared_distance_indexed(pt, triangle, ind1, ind2, k); } template inline typename K::FT squared_distance(const typename K::Triangle_2 & triangle, const typename K::Point_2 & pt, const K& k) { return internal::squared_distance(pt, triangle, k); } template typename K::FT squared_distance(const typename K::Line_2 &line, const typename K::Triangle_2 &triangle, const K& k) { typedef typename K::FT FT; Oriented_side side0; side0 = line.oriented_side(triangle.vertex(0)); if (line.oriented_side(triangle.vertex(1)) != side0) return FT(0); if (line.oriented_side(triangle.vertex(2)) != side0) return FT(0); FT mindist, dist; int i; mindist = internal::squared_distance(triangle.vertex(0),line,k); for (i=1; i<3; i++) { dist = internal::squared_distance(triangle.vertex(i),line,k); if (dist < mindist) mindist = dist; } return mindist; } template inline typename K::FT squared_distance(const typename K::Triangle_2 & triangle, const typename K::Line_2 & line, const K& k) { return internal::squared_distance(line, triangle, k); } template typename K::FT squared_distance(const typename K::Ray_2 &ray, const typename K::Triangle_2 &triangle, const K& k) { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; int i, ind_tr1, ind_tr2, ind_ray = 0, ind1; FT mindist, dist; distance_index(ind_tr1, ind_tr2, ray.source(), triangle, k); mindist = squared_distance_indexed(ray.source(), triangle, ind_tr1, ind_tr2, k); for (i=0; i<3; i++) { const Point_2& pt = triangle.vertex(i); distance_index(ind1, pt, ray, k); dist = squared_distance_indexed(pt, ray, ind1, k); if (dist < mindist) { ind_ray = ind1; ind_tr1 = i; ind_tr2 = -1; mindist = dist; } } if (ind_tr2 == -1 && ind_ray != -1) return mindist; if (ind_tr2 != -1) { const Point_2 &vt1 = triangle.vertex(ind_tr1); const Point_2 &vt2 = triangle.vertex(ind_tr2); if (clockwise(ray.direction().vector(), vt2-vt1, k)) { mindist = FT(0); } } else { const Line_2 &sl = ray.supporting_line(); Oriented_side or_s = sl.oriented_side(triangle.vertex(0)); for (i=1; i<3; i++) { if (sl.oriented_side(triangle.vertex(i)) != or_s) { mindist = FT(0); break; } } } return mindist; } template inline typename K::FT squared_distance(const typename K::Triangle_2 & triangle, const typename K::Ray_2 & ray, const K& k) { return internal::squared_distance(ray, triangle, k); } template typename K::FT squared_distance(const typename K::Segment_2 &seg, const typename K::Triangle_2 &triangle, const K& k) { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typename K::Orientation_2 orientation; int i, ind_tr1 = 0, ind_tr2 = -1, ind_seg = 0, ind1, ind2; FT mindist, dist; mindist = internal::squared_distance(seg.source(), triangle.vertex(0), k); for (i=0; i<2; i++) { const Point_2 &pt = seg.vertex(i); distance_index(ind1, ind2, pt, triangle, k); dist = internal::squared_distance_indexed(pt, triangle, ind1, ind2, k); if (dist < mindist) { ind_seg = i; ind_tr1 = ind1; ind_tr2 = ind2; mindist = dist; } } for (i=0; i<3; i++) { const Point_2& pt = triangle.vertex(i); distance_index(ind1, pt, seg, k); dist = internal::squared_distance_indexed(pt, seg, ind1, k); if (dist < mindist) { ind_seg = ind1; ind_tr1 = i; ind_tr2 = -1; mindist = dist; } } if (ind_tr2 == -1 && ind_seg != -1) return mindist; if (ind_tr2 != -1) { const Point_2 &vt1 = triangle.vertex(ind_tr1); const Point_2 &vt2 = triangle.vertex(ind_tr2); Orientation or_s = orientation(vt1, vt2, seg.source()); if (orientation(vt1, vt2, seg.target()) != or_s) { mindist = FT(0); } } else { const Point_2 &vt1 = seg.source(); const Point_2 &vt2 = seg.target(); Orientation or_s = orientation(vt1, vt2, triangle.vertex(0)); for (i=1; i<3; i++) { if (orientation(vt1, vt2, triangle.vertex(i)) != or_s) { mindist = FT(0); break; } } } return mindist; } template inline typename K::FT squared_distance(const typename K::Triangle_2 & triangle, const typename K::Segment_2 & seg, const K& k) { return internal::squared_distance(seg, triangle, k); } template typename K::FT squared_distance(const typename K::Triangle_2 &triangle1, const typename K::Triangle_2 &triangle2, const K& k) { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typename K::Orientation_2 orientation; int i, ind1_1 = 0,ind1_2 = -1, ind2_1 = 0, ind2_2 = -1, ind1, ind2; FT mindist, dist; mindist = internal::squared_distance(triangle1.vertex(0), triangle2.vertex(0), k); for (i=0; i<3; i++) { const Point_2& pt = triangle1.vertex(i); distance_index(ind1, ind2, pt, triangle2, k); dist = squared_distance_indexed(pt, triangle2, ind1, ind2, k); if (dist < mindist) { ind1_1 = i; ind1_2 = -1; ind2_1 = ind1; ind2_2 = ind2; mindist = dist; } } for (i=0; i<3; i++) { const Point_2& pt = triangle2.vertex(i); distance_index(ind1, ind2, pt, triangle1, k); dist = squared_distance_indexed(pt, triangle1, ind1, ind2, k); if (dist < mindist) { ind1_1 = ind1; ind1_2 = ind2; ind2_1 = i; ind2_2 = -1; mindist = dist; } } if (ind1_2 == -1 && ind2_2 == -1) return mindist; if (ind1_2 != -1) { const Point_2 &vt1 = triangle1.vertex(ind1_1); const Point_2 &vt2 = triangle1.vertex(ind1_2); Orientation or_s = orientation(vt1, vt2, triangle2.vertex(0)); for (i=1; i<3; i++) { if (orientation(vt1, vt2, triangle2.vertex(i)) != or_s) { mindist = FT(0); break; } } } else { const Point_2 &vt1 = triangle2.vertex(ind2_1); const Point_2 &vt2 = triangle2.vertex(ind2_2); Orientation or_s = orientation(vt1, vt2, triangle1.vertex(0)); for (i=1; i<3; i++) { if (orientation(vt1, vt2, triangle1.vertex(i)) != or_s) { mindist = FT(0); break; } } } return mindist; } } template inline typename K::FT squared_distance(const Point_2 &pt, const Triangle_2 &triangle) { return internal::squared_distance(pt, triangle, K()); } template inline typename K::FT squared_distance(const Triangle_2 &triangle, const Point_2 &pt) { return internal::squared_distance(pt, triangle, K()); } template inline typename K::FT squared_distance(const Line_2 &line, const Triangle_2 &triangle) { return internal::squared_distance(line, triangle, K()); } template inline typename K::FT squared_distance(const Triangle_2 &triangle, const Line_2 &line) { return internal::squared_distance(line, triangle, K()); } template inline typename K::FT squared_distance(const Ray_2 &ray, const Triangle_2 &triangle) { return internal::squared_distance(ray, triangle, K()); } template inline typename K::FT squared_distance(const Triangle_2 &triangle, const Ray_2 &ray) { return internal::squared_distance(ray, triangle, K()); } template inline typename K::FT squared_distance(const Segment_2 &seg, const Triangle_2 &triangle) { return internal::squared_distance(seg, triangle, K()); } template inline typename K::FT squared_distance(const Triangle_2 &triangle, const Segment_2 &seg) { return internal::squared_distance(seg, triangle, K()); } template inline typename K::FT squared_distance(const Triangle_2 &triangle1, const Triangle_2 &triangle2) { return internal::squared_distance(triangle1, triangle2, K()); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_2.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3_0.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3_0.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3_0.h" 2 namespace CGAL { namespace internal { template bool is_null(const typename K::Vector_3 &v, const K&) { typedef typename K::RT RT; return v.hx()==RT(0) && v.hy()==RT(0) && v.hz()==RT(0); } template typename K::RT wdot(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K&) { return (u.hx()*v.hx() + u.hy()*v.hy() + u.hz()*v.hz()); } template typename K::RT wdot_tag(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K&, const Cartesian_tag&) { return ( (p.x() - q.x()) * (r.x()- q.x()) + (p.y()- q.y())* (r.y()- q.y()) + (p.z()- q.z()) * (r.z() - q.z()) ); } template typename K::RT wdot_tag(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K&, const Homogeneous_tag&) { return ( (p.hx() * q.hw() - q.hx() * p.hw()) * (r.hx() * q.hw() - q.hx() * r.hw()) + (p.hy() * q.hw() - q.hy() * p.hw()) * (r.hy() * q.hw() - q.hy() * r.hw()) + (p.hz() * q.hw() - q.hz() * p.hw()) * (r.hz() * q.hw() - q.hz() * r.hw())); } template inline typename K::RT wdot(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { typedef typename K::Kernel_tag Tag; Tag tag; return wdot_tag(p, q, r, k, tag); } template typename K::Vector_3 wcross(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K&) { typedef typename K::Vector_3 Vector_3; return Vector_3( u.hy()*v.hz() - u.hz()*v.hy(), u.hz()*v.hx() - u.hx()*v.hz(), u.hx()*v.hy() - u.hy()*v.hx()); } template inline bool is_acute_angle(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K& k) { typedef typename K::RT RT; return RT(wdot(u, v, k)) > RT(0) ; } template inline bool is_straight_angle(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K& k) { typedef typename K::RT RT; return RT(wdot(u, v, k)) == RT(0) ; } template inline bool is_obtuse_angle(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K& k) { typedef typename K::RT RT; return RT(wdot(u, v, k)) < RT(0) ; } template inline bool is_acute_angle(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { typedef typename K::RT RT; return RT(wdot(p, q, r, k)) > RT(0) ; } template inline bool is_straight_angle(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { typedef typename K::RT RT; return RT(wdot(p, q, r, k)) == RT(0) ; } template inline bool is_obtuse_angle(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K& k) { typedef typename K::RT RT; return RT(wdot(p, q, r, k)) < RT(0) ; } template inline typename K::FT squared_distance(const typename K::Point_3 & pt1, const typename K::Point_3 & pt2, const K& k) { return k.compute_squared_distance_3_object()(pt1, pt2); } template typename K::FT squared_distance_to_plane(const typename K::Vector_3 & normal, const typename K::Vector_3 & diff, const K& k) { typedef typename K::RT RT; typedef typename K::FT FT; RT dot, squared_length; dot = wdot(normal, diff, k); squared_length = wdot(normal, normal, k); return FT(dot*dot) / FT(wmult((K*)0, squared_length, diff.hw(), diff.hw())); } template typename K::FT squared_distance_to_line(const typename K::Vector_3 & dir, const typename K::Vector_3 & diff, const K& k) { typedef typename K::Vector_3 Vector_3; typedef typename K::RT RT; typedef typename K::FT FT; Vector_3 wcr = wcross(dir, diff, k); return FT(wcr*wcr)/FT(wmult( (K*)0, RT(wdot(dir, dir, k)), diff.hw(), diff.hw())); } template inline bool same_direction_tag(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K&, const Cartesian_tag&) { typedef typename K::FT FT; const FT& ux = u.x(); const FT& uy = u.y(); const FT& uz = u.z(); if (::CGAL:: abs(ux) > ::CGAL:: abs(uy)) { if (::CGAL:: abs(ux) > ::CGAL:: abs(uz)) { return ::CGAL:: sign(ux) == ::CGAL:: sign(v.x()); } else { return ::CGAL:: sign(uz) == ::CGAL:: sign(v.z()); } } else { if (::CGAL:: abs(uy) > ::CGAL:: abs(uz)) { return ::CGAL:: sign(uy) == ::CGAL:: sign(v.y()); } else { return ::CGAL:: sign(uz) == ::CGAL:: sign(v.z()); } } } template inline bool same_direction_tag(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K&, const Homogeneous_tag&) { typedef typename K::RT RT; const RT& uhx = u.hx(); const RT& uhy = u.hy(); const RT& uhz = u.hz(); if (::CGAL:: abs(uhx) > ::CGAL:: abs(uhy)) { if (::CGAL:: abs(uhx) > ::CGAL:: abs(uhz)) { return ::CGAL:: sign(uhx) == ::CGAL:: sign(v.hx()); } else { return ::CGAL:: sign(uhz) == ::CGAL:: sign(v.hz()); } } else { if (::CGAL:: abs(uhy) > ::CGAL:: abs(uhz)) { return ::CGAL:: sign(uhy) == ::CGAL:: sign(v.hy()); } else { return ::CGAL:: sign(uhz) == ::CGAL:: sign(v.hz()); } } } template inline bool same_direction(const typename K::Vector_3 &u, const typename K::Vector_3 &v, const K& k) { typedef typename K::Kernel_tag Tag; Tag tag; return same_direction_tag(u, v, k, tag); } } template inline typename K::FT squared_distance(const Point_3 & pt1, const Point_3 & pt2) { return internal::squared_distance(pt1,pt2, K()); } template inline typename K::FT squared_distance_to_plane(const Vector_3 & normal, const Vector_3 & diff) { return internal::squared_distance_to_plane(normal, diff, K()); } template inline typename K::FT squared_distance_to_line(const Vector_3 & dir, const Vector_3 & diff) { return internal::squared_distance_to_line(dir, diff, K()); } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3_1.h" 1 # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3_1.h" namespace CGAL { namespace internal { template typename K::FT squared_distance( const typename K::Point_3 &pt, const typename K::Line_3 &line, const K& k) { typedef typename K::Vector_3 Vector_3; typename K::Construct_vector_3 construct_vector; Vector_3 dir(line.direction().vector()); Vector_3 diff = construct_vector(line.point(), pt); return internal::squared_distance_to_line(dir, diff, k); } template inline typename K::FT squared_distance( const typename K::Line_3 & line, const typename K::Point_3 & pt, const K& k) { return squared_distance(pt, line, k); } template typename K::FT squared_distance( const typename K::Point_3 &pt, const typename K::Ray_3 &ray, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; Vector_3 diff = construct_vector(ray.source(), pt); const Vector_3 &dir = ray.direction().vector(); if (!is_acute_angle(dir,diff, k) ) return (typename K::FT)(diff*diff); return squared_distance_to_line(dir, diff, k); } template inline typename K::FT squared_distance( const typename K::Ray_3 & ray, const typename K::Point_3 & pt, const K& k) { return squared_distance(pt, ray, k); } template typename K::FT squared_distance( const typename K::Point_3 &pt, const typename K::Segment_3 &seg, const K& k, const Homogeneous_tag) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; typedef typename K::RT RT; typedef typename K::FT FT; Vector_3 diff = construct_vector(seg.source(), pt); Vector_3 segvec = construct_vector(seg.source(), seg.target()); RT d = wdot(diff,segvec, k); if (d <= (RT)0) return (FT(diff*diff)); RT e = wdot(segvec,segvec, k); if ( (d * segvec.hw()) > (e * diff.hw())) return squared_distance(pt, seg.target(), k); Vector_3 wcr = wcross(segvec, diff, k); return FT(wcr*wcr)/FT(e * diff.hw() * diff.hw()); } template typename K::FT squared_distance( const typename K::Point_3 &pt, const typename K::Segment_3 &seg, const K& k, const Cartesian_tag&) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; typedef typename K::RT RT; typedef typename K::FT FT; Vector_3 diff = construct_vector(seg.source(), pt); Vector_3 segvec = construct_vector(seg.source(), seg.target()); RT d = wdot(diff,segvec, k); if (d <= (RT)0) return (FT(diff*diff)); RT e = wdot(segvec,segvec, k); if (d > e) return squared_distance(pt, seg.target(), k); Vector_3 wcr = wcross(segvec, diff, k); return FT(wcr*wcr)/e; } template inline typename K::FT squared_distance( const typename K::Point_3 &pt, const typename K::Segment_3 &seg, const K& k) { typedef typename K::Kernel_tag Tag; Tag tag; return squared_distance(pt, seg, k, tag); } template inline typename K::FT squared_distance( const typename K::Segment_3 & seg, const typename K::Point_3 & pt, const K& k) { return squared_distance(pt, seg, k); } template typename K::FT squared_distance_parallel( const typename K::Segment_3 &seg1, const typename K::Segment_3 &seg2, const K& k) { typedef typename K::Vector_3 Vector_3; const Vector_3 &dir1 = seg1.direction().vector(); const Vector_3 &dir2 = seg2.direction().vector(); if (same_direction(dir1, dir2, k)) { if (!is_acute_angle(seg1.source(), seg1.target(), seg2.source(), k)) return squared_distance(seg1.target(), seg2.source(), k); if (!is_acute_angle(seg1.target(), seg1.source(), seg2.target(), k)) return squared_distance(seg1.source(), seg2.target(), k); } else { if (!is_acute_angle(seg1.source(), seg1.target(), seg2.target(), k)) return squared_distance(seg1.target(), seg2.target(), k); if (!is_acute_angle(seg1.target(), seg1.source(), seg2.source(), k)) return squared_distance(seg1.source(), seg2.source(), k); } return squared_distance(seg2.source(), seg1.supporting_line(), k); } template inline typename K::RT _distance_measure_sub(typename K::RT startwdist, typename K::RT endwdist, const typename K::Vector_3 &start, const typename K::Vector_3 &end, const K&) { return ::CGAL:: abs(wmult((K*)0, startwdist, end.hw())) - ::CGAL:: abs(wmult((K*)0, endwdist, start.hw())); } template typename K::FT squared_distance( const typename K::Segment_3 &seg1, const typename K::Segment_3 &seg2, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; typedef typename K::Point_3 Point_3; typedef typename K::RT RT; typedef typename K::FT FT; const Point_3 &start1 = seg1.source(); const Point_3 &start2 = seg2.source(); const Point_3 &end1 = seg1.target(); const Point_3 &end2 = seg2.target(); if (start1 == end1) return squared_distance(start1, seg2, k); if (start2 == end2) return squared_distance(start2, seg1, k); Vector_3 dir1, dir2, normal; dir1 = seg1.direction().vector(); dir2 = seg2.direction().vector(); normal = wcross(dir1, dir2, k); if (is_null(normal, k)) return squared_distance_parallel(seg1, seg2, k); bool crossing1, crossing2; RT sdm_s1to2, sdm_e1to2, sdm_s2to1, sdm_e2to1; Vector_3 perpend1, perpend2, s2mins1, e2mins1, e1mins2; perpend1 = wcross(dir1, normal, k); perpend2 = wcross(dir2, normal, k); s2mins1 = construct_vector(start1, start2); e2mins1 = construct_vector(start1, end2); e1mins2 = construct_vector(start2, end1); sdm_s1to2 = -RT(wdot(perpend2, s2mins1, k)); sdm_e1to2 = wdot(perpend2, e1mins2, k); sdm_s2to1 = wdot(perpend1, s2mins1, k); sdm_e2to1 = wdot(perpend1, e2mins1, k); if (sdm_s1to2 < RT(0)) { crossing1 = (sdm_e1to2 >= RT(0)); } else { if (sdm_e1to2 <= RT(0)) { crossing1 = true; } else { crossing1 = (sdm_s1to2 == RT(0)); } } if (sdm_s2to1 < RT(0)) { crossing2 = (sdm_e2to1 >= RT(0)); } else { if (sdm_e2to1 <= RT(0)) { crossing2 = true; } else { crossing2 = (sdm_s2to1 == RT(0)); } } if (crossing1) { if (crossing2) { return squared_distance_to_plane(normal, s2mins1, k); } RT dm; dm = _distance_measure_sub( sdm_s2to1, sdm_e2to1, s2mins1, e2mins1, k); if (dm < RT(0)) { return squared_distance(start2, seg1, k); } else { if (dm > RT(0)) { return squared_distance(end2, seg1, k); } else { return squared_distance_parallel(seg1, seg2, k); } } } else { if (crossing2) { RT dm; dm =_distance_measure_sub( sdm_s1to2, sdm_e1to2, s2mins1, e1mins2, k); if (dm < RT(0)) { return squared_distance(start1, seg2, k); } else { if (dm > RT(0)) { return squared_distance(end1, seg2, k); } else { return squared_distance_parallel(seg1, seg2, k); } } } else { FT min1, min2; RT dm; dm = _distance_measure_sub( sdm_s1to2, sdm_e1to2, s2mins1, e1mins2, k); if (dm == RT(0)) return squared_distance_parallel(seg1, seg2, k); min1 = (dm < RT(0)) ? squared_distance(seg1.source(), seg2, k): squared_distance(end1, seg2, k); dm = _distance_measure_sub( sdm_s2to1, sdm_e2to1, s2mins1, e2mins1, k); if (dm == RT(0)) return squared_distance_parallel(seg1, seg2, k); min2 = (dm < RT(0)) ? squared_distance(start2, seg1, k): squared_distance(end2, seg1, k); return (min1 < min2) ? min1 : min2; } } } template typename K::FT squared_distance_parallel( const typename K::Segment_3 &seg, const typename K::Ray_3 &ray, const K& k) { typedef typename K::Vector_3 Vector_3; bool same_direction; const Vector_3 &dir1 = seg.direction().vector(); const Vector_3 &dir2 = ray.direction().vector(); if (::CGAL:: abs(dir1.hx()) > ::CGAL:: abs(dir1.hy())) { same_direction = (::CGAL:: sign(dir1.hx()) == ::CGAL:: sign(dir2.hx())); } else { same_direction = (::CGAL:: sign(dir1.hy()) == ::CGAL:: sign(dir2.hy())); } if (same_direction) { if (!is_acute_angle(seg.source(), seg.target(), ray.source(), k)) return squared_distance(seg.target(), ray.source(), k); } else { if (!is_acute_angle(seg.target(), seg.source(), ray.source(), k)) return squared_distance(seg.source(), ray.source(), k); } return squared_distance(ray.source(), seg.supporting_line(), k); } template typename K::FT squared_distance( const typename K::Segment_3 &seg, const typename K::Ray_3 &ray, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::RT RT; typedef typename K::FT FT; const Point_3 & ss = seg.source(); const Point_3 & se = seg.target(); if (ss == se) return squared_distance(ss, ray, k); Vector_3 raydir, segdir, normal; raydir = ray.direction().vector(); segdir = seg.direction().vector(); normal = wcross(segdir, raydir, k); if (is_null(normal, k)) return squared_distance_parallel(seg, ray, k); bool crossing1, crossing2; RT sdm_ss2r, sdm_se2r, sdm_rs2s, sdm_re2s; Vector_3 perpend2seg, perpend2ray, ss_min_rs, se_min_rs; perpend2seg = wcross(segdir, normal, k); perpend2ray = wcross(raydir, normal, k); ss_min_rs = construct_vector(ray.source(), ss); se_min_rs = construct_vector(ray.source(), se); sdm_ss2r = wdot(perpend2ray, ss_min_rs, k); sdm_se2r = wdot(perpend2ray, se_min_rs, k); if (sdm_ss2r < RT(0)) { crossing1 = (sdm_se2r >= RT(0)); } else { if (sdm_se2r <= RT(0)) { crossing1 = true; } else { crossing1 = (sdm_ss2r == RT(0)); } } sdm_rs2s = -RT(wdot(perpend2seg, ss_min_rs, k)); sdm_re2s = wdot(perpend2seg, raydir, k); if (sdm_rs2s < RT(0)) { crossing2 = (sdm_re2s >= RT(0)); } else { if (sdm_re2s <= RT(0)) { crossing2 = true; } else { crossing2 = (sdm_rs2s == RT(0)); } } if (crossing1) { if (crossing2) { return squared_distance_to_plane(normal, ss_min_rs, k); } return squared_distance(ray.source(), seg, k); } else { if (crossing2) { RT dm; dm = _distance_measure_sub( sdm_ss2r, sdm_se2r, ss_min_rs, se_min_rs, k); if (dm < RT(0)) { return squared_distance(ss, ray, k); } else { if (dm > RT(0)) { return squared_distance(se, ray, k); } else { return squared_distance_parallel(seg, ray, k); } } } else { FT min1, min2; RT dm; dm = _distance_measure_sub( sdm_ss2r, sdm_se2r, ss_min_rs, se_min_rs, k); if (dm == RT(0)) return squared_distance_parallel(seg, ray, k); min1 = (dm < RT(0)) ? squared_distance(ss, ray, k) : squared_distance(se, ray, k); min2 = squared_distance(ray.source(), seg, k); return (min1 < min2) ? min1 : min2; } } } template inline typename K::FT squared_distance( const typename K::Ray_3 & ray, const typename K::Segment_3 & seg, const K& k) { return squared_distance(seg, ray, k); } template typename K::FT squared_distance( const typename K::Segment_3 &seg, const typename K::Line_3 &line, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; typedef typename K::Point_3 Point_3; typedef typename K::RT RT; const Point_3 &linepoint = line.point(); const Point_3 &start = seg.source(); const Point_3 &end = seg.target(); if (start == end) return squared_distance(start, line, k); Vector_3 linedir = line.direction().vector(); Vector_3 segdir = seg.direction().vector(); Vector_3 normal = wcross(segdir, linedir, k); if (is_null(normal, k)) return squared_distance_to_line(linedir, construct_vector(linepoint,start), k); bool crossing; RT sdm_ss2l, sdm_se2l; Vector_3 perpend2line, start_min_lp, end_min_lp; perpend2line = wcross(linedir, normal, k); start_min_lp = construct_vector(linepoint, start); end_min_lp = construct_vector(linepoint, end); sdm_ss2l = wdot(perpend2line, start_min_lp, k); sdm_se2l = wdot(perpend2line, end_min_lp, k); if (sdm_ss2l < RT(0)) { crossing = (sdm_se2l >= RT(0)); } else { if (sdm_se2l <= RT(0)) { crossing = true; } else { crossing = (sdm_ss2l == RT(0)); } } if (crossing) { return squared_distance_to_plane(normal, start_min_lp, k); } else { RT dm; dm = _distance_measure_sub( sdm_ss2l, sdm_se2l, start_min_lp, end_min_lp, k); if (dm <= RT(0)) { return squared_distance_to_line(linedir, start_min_lp, k); } else { return squared_distance_to_line(linedir, end_min_lp, k); } } } template inline typename K::FT squared_distance( const typename K::Line_3 & line, const typename K::Segment_3 & seg, const K& k) { return squared_distance(seg, line, k); } template typename K::FT ray_ray_squared_distance_parallel( const typename K::Vector_3 &ray1dir, const typename K::Vector_3 &ray2dir, const typename K::Vector_3 &s1_min_s2, const K& k) { if (!is_acute_angle(ray2dir, s1_min_s2, k)) { if (!same_direction(ray1dir, ray2dir, k)) return (typename K::FT)(s1_min_s2*s1_min_s2); } return squared_distance_to_line(ray1dir, s1_min_s2, k); } template typename K::FT squared_distance( const typename K::Ray_3 &ray1, const typename K::Ray_3 &ray2, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; typedef typename K::Point_3 Point_3; typedef typename K::RT RT; typedef typename K::FT FT; const Point_3 & s1 = ray1.source(); const Point_3 & s2 = ray2.source(); Vector_3 dir1, dir2, normal; dir1 = ray1.direction().vector(); dir2 = ray2.direction().vector(); normal = wcross(dir1, dir2, k); Vector_3 s1_min_s2 = construct_vector(s2, s1); if (is_null(normal, k)) return ray_ray_squared_distance_parallel(dir1, dir2, s1_min_s2, k); bool crossing1, crossing2; RT sdm_s1_2, sdm_s2_1; Vector_3 perpend1, perpend2; perpend1 = wcross(dir1, normal, k); perpend2 = wcross(dir2, normal, k); sdm_s1_2 = wdot(perpend2, s1_min_s2, k); if (sdm_s1_2 < RT(0)) { crossing1 = (RT(wdot(perpend2, dir1, k)) >= RT(0)); } else { if (RT(wdot(perpend2, dir1, k)) <= RT(0)) { crossing1 = true; } else { crossing1 = (sdm_s1_2 == RT(0)); } } sdm_s2_1 = -RT(wdot(perpend1, s1_min_s2, k)); if (sdm_s2_1 < RT(0)) { crossing2 = (RT(wdot(perpend1, dir2, k)) >= RT(0)); } else { if (RT(wdot(perpend1, dir2, k)) <= RT(0)) { crossing2 = true; } else { crossing2 = (sdm_s2_1 == RT(0)); } } if (crossing1) { if (crossing2) return squared_distance_to_plane(normal, s1_min_s2, k); return squared_distance(ray2.source(), ray1, k); } else { if (crossing2) { return squared_distance(ray1.source(), ray2, k); } else { FT min1, min2; min1 = squared_distance(ray1.source(), ray2, k); min2 = squared_distance(ray2.source(), ray1, k); return (min1 < min2) ? min1 : min2; } } } template typename K::FT squared_distance( const typename K::Line_3 &line, const typename K::Ray_3 &ray, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; typedef typename K::Point_3 Point_3; typedef typename K::RT RT; const Point_3 & rs =ray.source(); Vector_3 raydir, linedir, normal; linedir = line.direction().vector(); raydir = ray.direction().vector(); normal = wcross(raydir, linedir, k); Vector_3 rs_min_lp = construct_vector(line.point(), rs); if (is_null(normal, k)) return squared_distance_to_line(linedir, rs_min_lp, k); bool crossing; RT sdm_sr_l; Vector_3 perpend2l; perpend2l = wcross(linedir, normal, k); sdm_sr_l = wdot(perpend2l, rs_min_lp, k); if (sdm_sr_l < RT(0)) { crossing = (RT(wdot(perpend2l, raydir, k)) >= RT(0)); } else { if (RT(wdot(perpend2l, raydir, k)) <= RT(0)) { crossing = true; } else { crossing = (sdm_sr_l == RT(0)); } } if (crossing) return squared_distance_to_plane(normal, rs_min_lp, k); else return squared_distance_to_line(linedir, rs_min_lp, k); } template inline typename K::FT squared_distance( const typename K::Ray_3 & ray, const typename K::Line_3 & line, const K& k) { return squared_distance(line, ray, k); } template typename K::FT squared_distance( const typename K::Line_3 &line1, const typename K::Line_3 &line2, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; Vector_3 dir1, dir2, normal, diff; dir1 = line1.direction().vector(); dir2 = line2.direction().vector(); normal = wcross(dir1, dir2, k); diff = construct_vector(line1.point(), line2.point()); if (is_null(normal, k)) return squared_distance_to_line(dir2, diff, k); return squared_distance_to_plane(normal, diff, k); } } template inline typename K::FT squared_distance(const Point_3 &pt, const Line_3 &line) { return internal::squared_distance(pt, line, K()); } template inline typename K::FT squared_distance( const Line_3 & line, const Point_3 & pt) { return internal::squared_distance(pt, line, K()); } template inline typename K::FT squared_distance( const Point_3 &pt, const Ray_3 &ray) { return internal::squared_distance(pt, ray, K()); } template inline typename K::FT squared_distance( const Ray_3 & ray, const Point_3 & pt) { return internal::squared_distance(pt, ray, K()); } template inline typename K::FT squared_distance( const Point_3 &pt, const Segment_3 &seg) { return internal::squared_distance(pt, seg, K()); } template inline typename K::FT squared_distance( const Segment_3 & seg, const Point_3 & pt) { return internal::squared_distance(pt, seg, K()); } template inline typename K::FT squared_distance_parallel( const Segment_3 &seg1, const Segment_3 &seg2) { return internal::squared_distance_parallel(seg1, seg2, K()); } template inline typename K::FT squared_distance(const Segment_3 &seg1, const Segment_3 &seg2) { return internal::squared_distance(seg1, seg2, K()); } template inline typename K::FT squared_distance_parallel( const Segment_3 &seg, const Ray_3 &ray) { return internal::squared_distance_parallel(ray,seg, K()); } template inline typename K::FT squared_distance( const Segment_3 &seg, const Ray_3 &ray) { return internal::squared_distance(ray, seg, K()); } template inline typename K::FT squared_distance( const Ray_3 & ray, const Segment_3 & seg) { return internal::squared_distance(seg, ray, K()); } template inline typename K::FT squared_distance( const Segment_3 &seg, const Line_3 &line) { return internal::squared_distance(seg, line, K()); } template inline typename K::FT squared_distance( const Line_3 & line, const Segment_3 & seg) { return internal::squared_distance(seg, line, K()); } template inline typename K::FT ray_ray_squared_distance_parallel( const Vector_3 &ray1dir, const Vector_3 &ray2dir, const Vector_3 &s1_min_s2) { return internal::ray_ray_squared_distance_parallel(ray1dir, ray2dir, s1_min_s2, K()); } template inline typename K::FT squared_distance( const Ray_3 &ray1, const Ray_3 &ray2) { return internal::squared_distance(ray1, ray2, K()); } template inline typename K::FT squared_distance( const Line_3 &line, const Ray_3 &ray) { return internal::squared_distance(line, ray, K()); } template inline typename K::FT squared_distance( const Ray_3 & ray, const Line_3 & line) { return internal::squared_distance(line, ray, K()); } template inline typename K::FT squared_distance( const Line_3 &line1, const Line_3 &line2) { return internal::squared_distance(line1, line2, K()); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3_2.h" 1 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3_2.h" namespace CGAL { namespace internal { template bool contains_vector(const typename K::Plane_3 &pl, const typename K::Vector_3 &vec, const K&) { typedef typename K::RT RT; return pl.a()*vec.hx() + pl.b()*vec.hy() + pl.c() * vec.hz() == RT(0); } template inline typename K::FT squared_distance( const typename K::Point_3 & pt, const typename K::Plane_3 & plane, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Vector_3 Vector_3; Vector_3 diff = construct_vector(plane.point(), pt); return squared_distance_to_plane(plane.orthogonal_vector(), diff, k); } template inline typename K::FT squared_distance( const typename K::Plane_3 & plane, const typename K::Point_3 & pt, const K& k) { return squared_distance(pt, plane, k); } template typename K::FT squared_distance( const typename K::Line_3 &line, const typename K::Plane_3 &plane, const K& k) { typedef typename K::FT FT; if (contains_vector(plane, line.direction().vector(), k)) return squared_distance(plane, line.point(), k); return FT(0); } template inline typename K::FT squared_distance( const typename K::Plane_3 & p, const typename K::Line_3 & line, const K& k) { return squared_distance(line, p, k); } template typename K::FT squared_distance( const typename K::Ray_3 &ray, const typename K::Plane_3 &plane, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::RT RT; typedef typename K::FT FT; const Point_3 &start = ray.start(); const Point_3 &planepoint = plane.point(); Vector_3 start_min_pp = construct_vector(planepoint, start); Vector_3 end_min_pp = ray.direction().vector(); const Vector_3 &normal = plane.orthogonal_vector(); RT sdm_rs2pp = wdot(normal, start_min_pp, k); RT sdm_re2pp = wdot(normal, end_min_pp, k); switch (::CGAL:: sign(sdm_rs2pp)) { case -1: if (sdm_re2pp > RT(0)) return FT(0); return squared_distance_to_plane(normal, start_min_pp, k); case 0: default: return FT(0); case 1: if (sdm_re2pp < RT(0)) return FT(0); return squared_distance_to_plane(normal, start_min_pp, k); } } template inline typename K::FT squared_distance( const typename K::Plane_3 & plane, const typename K::Ray_3 & ray, const K& k) { return squared_distance(ray, plane, k); } template typename K::FT squared_distance( const typename K::Segment_3 &seg, const typename K::Plane_3 &plane, const K& k) { typename K::Construct_vector_3 construct_vector; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::RT RT; typedef typename K::FT FT; const Point_3 &start = seg.start(); const Point_3 &end = seg.end(); if (start == end) return squared_distance(start, plane, k); const Point_3 &planepoint = plane.point(); Vector_3 start_min_pp = construct_vector(planepoint, start); Vector_3 end_min_pp = construct_vector(planepoint, end); const Vector_3 &normal = plane.orthogonal_vector(); RT sdm_ss2pp = wdot(normal, start_min_pp, k); RT sdm_se2pp = wdot(normal, end_min_pp, k); switch (::CGAL:: sign(sdm_ss2pp)) { case -1: if (sdm_se2pp >= RT(0)) return FT(0); if (sdm_ss2pp * end_min_pp.hw() >= sdm_se2pp * start_min_pp.hw()) return squared_distance_to_plane(normal, start_min_pp, k); else return squared_distance_to_plane(normal, end_min_pp, k); case 0: default: return FT(0); case 1: if (sdm_se2pp <= RT(0)) return FT(0); if (sdm_ss2pp * end_min_pp.hw() <= sdm_se2pp * start_min_pp.hw()) return squared_distance_to_plane(normal, start_min_pp, k); else return squared_distance_to_plane(normal, end_min_pp, k); } } template inline typename K::FT squared_distance( const typename K::Plane_3 & plane, const typename K::Segment_3 & seg, const K& k) { return squared_distance(seg, plane, k); } } template bool contains_vector(const Plane_3 &pl, const Vector_3 &vec) { return internal::contains_vector(pl,vec, K()); } template inline typename K::FT squared_distance( const Point_3 & pt, const Plane_3 & plane) { return internal::squared_distance(pt, plane, K()); } template inline typename K::FT squared_distance( const Plane_3 & plane, const Point_3 & pt) { return internal::squared_distance(pt, plane, K()); } template inline typename K::FT squared_distance( const Line_3 &line, const Plane_3 &plane) { return internal::squared_distance(line, plane, K()); } template inline typename K::FT squared_distance( const Plane_3 & p, const Line_3 & line) { return internal::squared_distance(line, p, K()); } template inline typename K::FT squared_distance( const Ray_3 &ray, const Plane_3 &plane) { return internal::squared_distance(ray, plane, K()); } template inline typename K::FT squared_distance( const Plane_3 & plane, const Ray_3 & ray) { return internal::squared_distance(ray, plane, K()); } template inline typename K::FT squared_distance( const Segment_3 &seg, const Plane_3 &plane) { return internal::squared_distance(seg, plane, K()); } template inline typename K::FT squared_distance( const Plane_3 & plane, const Segment_3 & seg) { return internal::squared_distance(seg, plane, K()); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/squared_distance_3.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" 2 namespace CGAL { namespace internal { template class Line_2_Line_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, LINE}; Line_2_Line_2_pair(typename K::Line_2 const *line1, typename K::Line_2 const *line2) : _line1(line1), _line2(line2), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Line_2 intersection_line() const; protected: typename K::Line_2 const* _line1; typename K::Line_2 const * _line2; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point; }; template inline bool do_intersect( const typename K::Line_2 &p1, const typename K::Line_2 &p2, const K&) { typedef Line_2_Line_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template Object intersection(const typename K::Line_2 &line1, const typename K::Line_2 &line2, const K&) { typedef Line_2_Line_2_pair is_t; is_t linepair(&line1, &line2); switch (linepair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(linepair.intersection_point()); case is_t::LINE: return make_object(line1); } } template bool construct_if_finite(POINT &pt, RT x, RT y, RT w, R &, const Cartesian_tag &) { typename R::Construct_point_2 construct_point; typedef typename R::FT FT; (CGAL::possibly(::CGAL:: is_finite(x) && ::CGAL:: is_finite(y) && w != RT(0))?(static_cast(0)): ::CGAL::precondition_fail( "CGAL_NTS is_finite(x) && CGAL_NTS is_finite(y) && w != RT(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" # 99 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" , 101 # 99 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" )) ; FT xw = FT(x)/FT(w); FT yw = FT(y)/FT(w); if (!::CGAL:: is_finite(xw) || !::CGAL:: is_finite(yw)) return false; pt = construct_point(xw, yw); return true; } template bool construct_if_finite(POINT &pt, RT x, RT y, RT w, R &, const Homogeneous_tag&) { typename R::Construct_point_2 construct_point; typedef typename R::FT FT; (CGAL::possibly(::CGAL:: is_finite(x) && ::CGAL:: is_finite(y) && w != RT(0))?(static_cast(0)): ::CGAL::precondition_fail( "CGAL_NTS is_finite(x) && CGAL_NTS is_finite(y) && w != RT(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" # 118 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" , 120 # 118 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h" )) ; FT xw = FT(x)/FT(w); FT yw = FT(y)/FT(w); if (!::CGAL:: is_finite(xw) || !::CGAL:: is_finite(yw)) return false; pt = construct_point(x, y, w); return true; } template inline bool construct_if_finite(POINT &pt, RT x, RT y, RT w, const R &r) { typedef typename R::Kernel_tag Tag; Tag tag; return construct_if_finite(pt, x, y, w, r, tag); } template typename Line_2_Line_2_pair::Intersection_results Line_2_Line_2_pair::intersection_type() const { typedef typename K::RT RT; if (_known) return _result; RT nom1, nom2, denom; _known = true; denom = _line1->a()*_line2->b() - _line2->a()*_line1->b(); if (denom == RT(0)) { if (RT(0) == (_line1->a()*_line2->c() - _line2->a()*_line1->c()) && RT(0) == (_line1->b()*_line2->c() - _line2->b()*_line1->c())) _result = LINE; else _result = NO_INTERSECTION; return _result; } nom1 = (_line1->b()*_line2->c() - _line2->b()*_line1->c()); if (!::CGAL:: is_finite(nom1)) { _result = NO_INTERSECTION; return _result; } nom2 = (_line2->a()*_line1->c() - _line1->a()*_line2->c()); if (!::CGAL:: is_finite(nom2)) { _result = NO_INTERSECTION; return _result; } K dummyR; if (!construct_if_finite(_intersection_point, nom1, nom2, denom, dummyR)){ _result = NO_INTERSECTION; return _result; } _result = POINT; return _result; } template typename K::Point_2 Line_2_Line_2_pair::intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h", 188)); return _intersection_point; } template typename K::Line_2 Line_2_Line_2_pair::intersection_line() const { if (!_known) intersection_type(); (CGAL::possibly(_result == LINE)?(static_cast(0)): ::CGAL::assertion_fail( "_result == LINE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Line_2_intersection.h", 198)); return *_line1; } } template inline bool do_intersect( const Line_2 &p1, const Line_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template Object intersection(const Line_2 &line1, const Line_2 &line2) { typedef typename K::Intersect_2 Intersect; return Intersect()(line1, line2); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Line_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Line_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Line_2_intersection.h" 2 namespace CGAL { namespace internal { template class Segment_2_Line_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Segment_2_Line_2_pair(typename K::Segment_2 const *seg, typename K::Line_2 const *line) : _seg(seg), _line(line), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: typename K::Segment_2 const*_seg; typename K::Line_2 const * _line; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point; }; template inline bool do_intersect( const typename K::Segment_2 &p1, const typename K::Line_2 &p2, const K&) { typedef Segment_2_Line_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template Object intersection(const typename K::Segment_2 &seg, const typename K::Line_2 &line, const K&) { typedef Segment_2_Line_2_pair is_t; is_t ispair(&seg, &line); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(seg); } } template Object intersection(const typename K::Line_2 &line, const typename K::Segment_2 &seg, const K& k) { return internal::intersection(seg, line, k); } template inline bool do_intersect( const typename K::Line_2 &line, const typename K::Segment_2 &seg, const K& k) { return internal::do_intersect(seg, line, k); } template typename Segment_2_Line_2_pair::Intersection_results Segment_2_Line_2_pair::intersection_type() const { if (_known) return _result; _known = true; const typename K::Line_2 &l1 = _seg->supporting_line(); Line_2_Line_2_pair linepair(&l1, _line); switch ( linepair.intersection_type()) { case Line_2_Line_2_pair::NO_INTERSECTION: _result = NO_INTERSECTION; break; case Line_2_Line_2_pair::POINT: _intersection_point = linepair.intersection_point(); _result = (_seg->collinear_has_on(_intersection_point) ) ? POINT : NO_INTERSECTION; break; case Line_2_Line_2_pair::LINE: _result = SEGMENT; break; } return _result; } template typename K::Point_2 Segment_2_Line_2_pair::intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Line_2_intersection.h", 143)); return _intersection_point; } template typename K::Segment_2 Segment_2_Line_2_pair::intersection_segment() const { if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Line_2_intersection.h", 153)); return *_seg; } } template inline bool do_intersect(const Segment_2 &seg, const Line_2 &line) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(seg, line); } template inline bool do_intersect(const Line_2 &line, const Segment_2 &seg) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(line, seg); } template inline Object intersection(const Line_2 &line, const Segment_2 &seg) { typedef typename K::Intersect_2 Intersect; return Intersect()(seg, line); } template inline Object intersection(const Segment_2 &seg, const Line_2 &line) { typedef typename K::Intersect_2 Intersect; return Intersect()(line, seg); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/predicates_on_points_2.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h" 2 namespace CGAL { namespace internal { template inline bool do_intersect(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2); template bool seg_seg_do_intersect_crossing( const typename K::Point_2 &p1, const typename K::Point_2 &p2, const typename K::Point_2 &p3, const typename K::Point_2 &p4, const K& k) { switch (make_certain(k.orientation_2_object()(p1,p2,p3))) { case LEFT_TURN: return ! (k.orientation_2_object()(p3,p4,p2) == RIGHT_TURN); case RIGHT_TURN: return ! (k.orientation_2_object()(p3,p4,p2) == LEFT_TURN); case COLLINEAR: return true; } (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h", 64)); return false; } template bool seg_seg_do_intersect_contained( const typename K::Point_2 &p1, const typename K::Point_2 &p2, const typename K::Point_2 &p3, const typename K::Point_2 &p4, const K& k) { switch (make_certain(k.orientation_2_object()(p1,p2,p3))) { case LEFT_TURN: return ! (k.orientation_2_object()(p1,p2,p4) == LEFT_TURN); case RIGHT_TURN: return ! (k.orientation_2_object()(p1,p2,p4) == RIGHT_TURN); case COLLINEAR: return true; } (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h", 83)); return false; } template bool do_intersect(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, const K& k) { typename K::Point_2 const & A1 = seg1.source(); typename K::Point_2 const & A2 = seg1.target(); typename K::Point_2 const & B1 = seg2.source(); typename K::Point_2 const & B2 = seg2.target(); typename K::Less_xy_2 less_xy; typename K::Compare_xy_2 compare_xy; if (less_xy(A1,A2)) { if (less_xy(B1,B2)) { if (less_xy(A2,B1) || less_xy(B2,A1)) return false; } else { if (less_xy(A2,B2) || less_xy(B1,A1)) return false; } } else { if (less_xy(B1,B2)) { if (less_xy(A1,B1) || less_xy(B2,A2)) return false; } else { if (less_xy(A1,B2) || less_xy(B1,A2)) return false; } } if (less_xy(A1,A2)) { if (less_xy(B1,B2)) { switch(make_certain(compare_xy(A1,B1))) { case SMALLER: switch(make_certain(compare_xy(A2,B1))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(A2,B2))) { case SMALLER: return seg_seg_do_intersect_crossing(A1,A2,B1,B2, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(A1,A2,B1,B2, k); } } case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B2,A1))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B2,A2))) { case SMALLER: return seg_seg_do_intersect_crossing(B1,B2,A1,A2, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(B1,B2,A1,A2, k); } } } } else { switch(make_certain(compare_xy(A1,B2))) { case SMALLER: switch(make_certain(compare_xy(A2,B2))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(A2,B1))) { case SMALLER: return seg_seg_do_intersect_crossing(A1,A2,B2,B1, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(A1,A2,B2,B1, k); } } case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B1,A1))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B1,A2))) { case SMALLER: return seg_seg_do_intersect_crossing(B2,B1,A1,A2, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(B2,B1,A1,A2, k); } } } } } else { if (less_xy(B1,B2)) { switch(make_certain(compare_xy(A2,B1))) { case SMALLER: switch(make_certain(compare_xy(A1,B1))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(A1,B2))) { case SMALLER: return seg_seg_do_intersect_crossing(A2,A1,B1,B2, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(A2,A1,B1,B2, k); } } case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B2,A2))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B2,A1))) { case SMALLER: return seg_seg_do_intersect_crossing(B1,B2,A2,A1, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(B1,B2,A2,A1, k); } } } } else { switch(make_certain(compare_xy(A2,B2))) { case SMALLER: switch(make_certain(compare_xy(A1,B2))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(A1,B1))) { case SMALLER: return seg_seg_do_intersect_crossing(A2,A1,B2,B1, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(A2,A1,B2,B1, k); } } case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B1,A2))) { case SMALLER: return false; case EQUAL: return true; case LARGER: switch(make_certain(compare_xy(B1,A1))) { case SMALLER: return seg_seg_do_intersect_crossing(B2,B1,A2,A1, k); case EQUAL: return true; case LARGER: return seg_seg_do_intersect_contained(B2,B1,A2,A1, k); } } } } } (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h", 275)); return false; } template class Segment_2_Segment_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Segment_2_Segment_2_pair(typename K::Segment_2 const *seg1, typename K::Segment_2 const *seg2) : _seg1(seg1), _seg2(seg2), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: typename K::Segment_2 const* _seg1; typename K::Segment_2 const * _seg2; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point, _other_point; }; template typename Segment_2_Segment_2_pair::Intersection_results Segment_2_Segment_2_pair::intersection_type() const { typename K::Construct_vector_2 construct_vector; if (_known) return _result; _known = true; if (!internal::do_intersect(*_seg1, *_seg2, K())) { _result = NO_INTERSECTION; return _result; } typename K::Line_2 const &l1 = _seg1->supporting_line(); typename K::Line_2 const &l2 = _seg2->supporting_line(); Line_2_Line_2_pair linepair(&l1, &l2); switch ( linepair.intersection_type()) { case Line_2_Line_2_pair::NO_INTERSECTION: _result = NO_INTERSECTION; break; case Line_2_Line_2_pair::POINT: _intersection_point = linepair.intersection_point(); _result = POINT; break; case Line_2_Line_2_pair::LINE: { typedef typename K::RT RT; typename K::Point_2 const &start1 = _seg1->source(); typename K::Point_2 const &end1 = _seg1->target(); typename K::Point_2 const &start2 = _seg2->source(); typename K::Point_2 const &end2 = _seg2->target(); typename K::Vector_2 diff1 = construct_vector(start1, end1); typename K::Point_2 const *minpt; typename K::Point_2 const *maxpt; if (::CGAL:: abs(diff1.x()) > ::CGAL:: abs(diff1.y())) { if (start1.x() < end1.x()) { minpt = &start1; maxpt = &end1; } else { minpt = &end1; maxpt = &start1; } if (start2.x() < end2.x()) { if (start2.x() > minpt->x()) { minpt = &start2; } if (end2.x() < maxpt->x()) { maxpt = &end2; } } else { if (end2.x() > minpt->x()) { minpt = &end2; } if (start2.x() < maxpt->x()) { maxpt = &start2; } } if (maxpt->x() < minpt->x()) { _result = NO_INTERSECTION; return _result; } if (maxpt->x() == minpt->x()) { _intersection_point = *minpt; _result = POINT; return _result; } _intersection_point = *minpt; _other_point = *maxpt; _result = SEGMENT; return _result; } else { if (start1.y() < end1.y()) { minpt = &start1; maxpt = &end1; } else { minpt = &end1; maxpt = &start1; } if (start2.y() < end2.y()) { if (start2.y() > minpt->y()) { minpt = &start2; } if (end2.y() < maxpt->y()) { maxpt = &end2; } } else { if (end2.y() > minpt->y()) { minpt = &end2; } if (start2.y() < maxpt->y()) { maxpt = &start2; } } if (maxpt->y() < minpt->y()) { _result = NO_INTERSECTION; return _result; } if (maxpt->y() == minpt->y()) { _intersection_point = *minpt; _result = POINT; return _result; } _intersection_point = *minpt; _other_point = *maxpt; _result = SEGMENT; return _result; } } } return _result; } template typename K::Point_2 Segment_2_Segment_2_pair::intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h", 418)); return _intersection_point; } template typename K::Segment_2 Segment_2_Segment_2_pair::intersection_segment() const { typedef typename K::Segment_2 Segment_2; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Segment_2_intersection.h", 429)); return Segment_2(_intersection_point, _other_point); } template Object intersection(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, const K&) { typedef Segment_2_Segment_2_pair is_t; is_t ispair(&seg1, &seg2); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); } } } template inline bool do_intersect(const Segment_2 &seg1, const Segment_2 &seg2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(seg1, seg2); } template Object intersection(const Segment_2 &seg1, const Segment_2 &seg2) { typedef typename K::Intersect_2 Intersect; return Intersect()(seg1, seg2); } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Line_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Line_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Line_2_intersection.h" 2 namespace CGAL { namespace internal { template class Ray_2_Line_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, RAY}; Ray_2_Line_2_pair(typename K::Ray_2 const *ray, typename K::Line_2 const *line) : _ray(ray), _line(line), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Ray_2 intersection_ray() const; protected: typename K::Ray_2 const * _ray; typename K::Line_2 const * _line; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point; }; template inline bool do_intersect( const typename K::Ray_2 &p1, const typename K::Line_2 &p2) { typedef Ray_2_Line_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template Object intersection(const typename K::Ray_2 &ray, const typename K::Line_2 &line, const K&) { typedef Ray_2_Line_2_pair is_t; is_t ispair(&ray, &line); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::RAY: return make_object(ray); } } template inline Object intersection(const typename K::Line_2 &line, const typename K::Ray_2 &ray, const K& k) { return internal::intersection(ray, line, k); } template inline bool do_intersect( const typename K::Line_2 &p1, const typename K::Ray_2 &p2, const K&) { typedef Ray_2_Line_2_pair pair_t; pair_t pair(&p2, &p1); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template typename Ray_2_Line_2_pair::Intersection_results Ray_2_Line_2_pair::intersection_type() const { if (_known) return _result; _known = true; const typename K::Line_2 &l1 = _ray->supporting_line(); Line_2_Line_2_pair linepair(&l1, _line); switch ( linepair.intersection_type()) { case Line_2_Line_2_pair::NO_INTERSECTION: _result = NO_INTERSECTION; break; case Line_2_Line_2_pair::POINT: _intersection_point = linepair.intersection_point(); _result = (_ray->collinear_has_on(_intersection_point) ) ? POINT : NO_INTERSECTION; break; case Line_2_Line_2_pair::LINE: _result = RAY; break; } return _result; } template typename K::Point_2 Ray_2_Line_2_pair::intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Line_2_intersection.h", 150)); return _intersection_point; } template typename K::Ray_2 Ray_2_Line_2_pair::intersection_ray() const { if (!_known) intersection_type(); (CGAL::possibly(_result == RAY)?(static_cast(0)): ::CGAL::assertion_fail( "_result == RAY" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Line_2_intersection.h", 160)); return *_ray; } } template inline bool do_intersect(const Line_2 &p1, const Ray_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template inline bool do_intersect(const Ray_2 &p2, const Line_2 &p1) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template inline Object intersection(const Line_2 &line, const Ray_2 &ray) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, line); } template inline Object intersection(const Ray_2 &ray, const Line_2 &line) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, line); } } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Segment_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Segment_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Segment_2_intersection.h" 2 namespace CGAL { namespace internal { template class Ray_2_Segment_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Ray_2_Segment_2_pair(typename K::Ray_2 const *ray, typename K::Segment_2 const *seg) : _ray(ray), _seg(seg), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: typename K::Ray_2 const * _ray; typename K::Segment_2 const * _seg; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point, _other_point; }; template inline bool do_intersect(const typename K::Ray_2 &p1, const typename K::Segment_2 &p2, const K&) { typedef Ray_2_Segment_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline bool do_intersect(const typename K::Segment_2 &p2, const typename K::Ray_2 &p1, const K& k) { return internal::do_intersect(p1, p2, k); } template typename Ray_2_Segment_2_pair::Intersection_results Ray_2_Segment_2_pair::intersection_type() const { if (_known) return _result; _known = true; const typename K::Line_2 &l1 = _ray->supporting_line(); const typename K::Line_2 &l2 = _seg->supporting_line(); Line_2_Line_2_pair linepair(&l1, &l2); switch ( linepair.intersection_type()) { case Line_2_Line_2_pair::NO_INTERSECTION: _result = NO_INTERSECTION; return _result; case Line_2_Line_2_pair::POINT: _intersection_point = linepair.intersection_point(); _result = (_ray->collinear_has_on(_intersection_point) && _seg->collinear_has_on(_intersection_point) ) ? POINT : NO_INTERSECTION; return _result; case Line_2_Line_2_pair::LINE: { typedef typename K::RT RT; const typename K::Point_2 &start1 = _seg->source(); const typename K::Point_2 &end1 = _seg->target(); const typename K::Point_2 &start2 = _ray->source(); const typename K::Point_2 *minpt, *maxpt; typename K::Vector_2 diff1 = end1-start1; if (::CGAL:: abs(diff1.x()) > ::CGAL:: abs(diff1.y())) { typedef typename K::FT FT; if (start1.x() < end1.x()) { minpt = &start1; maxpt = &end1; } else { minpt = &end1; maxpt = &start1; } if (_ray->direction().to_vector().x() > FT(0)) { if (maxpt->x() < start2.x()) { _result = NO_INTERSECTION; return _result; } if (maxpt->x() == start2.x()) { _intersection_point = *maxpt; _result = POINT; return _result; } if (minpt->x() < start2.x()) { _intersection_point = start2; _other_point = *maxpt; } else { _intersection_point = _seg->source(); _other_point = _seg->target(); } _result = SEGMENT; return _result; } else { if (minpt->x() > start2.x()) { _result = NO_INTERSECTION; return _result; } if (minpt->x() == start2.x()) { _intersection_point = *minpt; _result = POINT; return _result; } if (maxpt->x() > start2.x()) { _intersection_point = start2; _other_point = *maxpt; } else { _intersection_point = _seg->source(); _other_point = _seg->target(); } _result = SEGMENT; return _result; } } else { typedef typename K::FT FT; if (start1.y() < end1.y()) { minpt = &start1; maxpt = &end1; } else { minpt = &end1; maxpt = &start1; } if (_ray->direction().to_vector().y() > FT(0)) { if (maxpt->y() < start2.y()) { _result = NO_INTERSECTION; return _result; } if (maxpt->y() == start2.y()) { _intersection_point = *maxpt; _result = POINT; return _result; } if (minpt->y() < start2.y()) { _intersection_point = start2; _other_point = *maxpt; } else { _intersection_point = _seg->source(); _other_point = _seg->target(); } _result = SEGMENT; return _result; } else { if (minpt->y() > start2.y()) { _result = NO_INTERSECTION; return _result; } if (minpt->y() == start2.y()) { _intersection_point = *minpt; _result = POINT; return _result; } if (maxpt->y() > start2.y()) { _intersection_point = start2; _other_point = *maxpt; } else { _intersection_point = _seg->source(); _other_point = _seg->target(); } _result = SEGMENT; return _result; } } } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Segment_2_intersection.h", 209)); return _result; } } template typename K::Point_2 Ray_2_Segment_2_pair::intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Segment_2_intersection.h", 221)); return _intersection_point; } template typename K::Segment_2 Ray_2_Segment_2_pair::intersection_segment() const { typedef typename K::Segment_2 Segment_2; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Segment_2_intersection.h", 232)); return Segment_2(_intersection_point, _other_point); } template Object intersection(const typename K::Ray_2 &ray, const typename K::Segment_2&seg, const K&) { typedef Ray_2_Segment_2_pair is_t; is_t ispair(&ray, &seg); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); } } template Object intersection(const typename K::Segment_2 &seg, const typename K::Ray_2 &ray, const K& k) { return internal::intersection(ray, seg, k); } } template inline bool do_intersect( const Segment_2 &p1, const Ray_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template inline bool do_intersect( const Ray_2 &p1, const Segment_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p2, p1); } template inline Object intersection(const Segment_2 &seg, const Ray_2 &ray) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, seg); } template inline Object intersection(const Ray_2 &ray, const Segment_2 &seg) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, seg); } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Ray_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Ray_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Ray_2_intersection.h" 2 namespace CGAL { namespace internal { template class Ray_2_Ray_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT, RAY}; Ray_2_Ray_2_pair(typename K::Ray_2 const *ray1, typename K::Ray_2 const *ray2) : _ray1(ray1), _ray2(ray2), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; typename K::Ray_2 intersection_ray() const; protected: typename K::Ray_2 const* _ray1; typename K::Ray_2 const * _ray2; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point, _other_point; }; template inline bool do_intersect( const typename K::Ray_2 &p1, const typename K::Ray_2 &p2, const K&) { typedef Ray_2_Ray_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template typename Ray_2_Ray_2_pair::Intersection_results Ray_2_Ray_2_pair::intersection_type() const { if (_known) return _result; _known = true; const typename K::Line_2 &l1 = _ray1->supporting_line(); const typename K::Line_2 &l2 = _ray2->supporting_line(); Line_2_Line_2_pair linepair(&l1, &l2); switch ( linepair.intersection_type()) { case Line_2_Line_2_pair::NO_INTERSECTION: _result = NO_INTERSECTION; return _result; case Line_2_Line_2_pair::POINT: _intersection_point = linepair.intersection_point(); _result = (_ray1->collinear_has_on(_intersection_point) && _ray2->collinear_has_on(_intersection_point) ) ? POINT : NO_INTERSECTION; return _result; case Line_2_Line_2_pair::LINE: { typedef typename K::RT RT; const typename K::Vector_2 &dir1 = _ray1->direction().to_vector(); const typename K::Vector_2 &dir2 = _ray2->direction().to_vector(); if (::CGAL:: abs(dir1.x()) > ::CGAL:: abs(dir1.y())) { typedef typename K::FT FT; if (dir1.x() > FT(0)) { if (dir2.x() > FT(0)) { _intersection_point = (_ray1->source().x() < _ray2->source().x()) ? _ray2->source() : _ray1->source(); _result = RAY; return _result; } else { if (_ray1->source().x() > _ray2->source().x()) { _result = NO_INTERSECTION; return _result; } if (_ray1->source().x() == _ray2->source().x()) { _intersection_point = _ray1->source(); _result = POINT; return _result; } _result = SEGMENT; return _result; } } else { if (dir2.x() < FT(0)) { _intersection_point = (_ray1->source().x() > _ray2->source().x()) ? _ray2->source() : _ray1->source(); _result = RAY; return _result; } else { if (_ray1->source().x() < _ray2->source().x()) { _result = NO_INTERSECTION; return _result; } if (_ray1->source().x() == _ray2->source().x()) { _intersection_point = _ray1->source(); _result = POINT; return _result; } _result = SEGMENT; return _result; } } } else { typedef typename K::FT FT; if (dir1.y() > FT(0)) { if (dir2.y() > FT(0)) { _intersection_point = (_ray1->source().y() < _ray2->source().y()) ? _ray2->source() : _ray1->source(); _result = RAY; return _result; } else { if (_ray1->source().y() > _ray2->source().y()) { _result = NO_INTERSECTION; return _result; } if (_ray1->source().y() == _ray2->source().y()) { _intersection_point = _ray1->source(); _result = POINT; return _result; } _result = SEGMENT; return _result; } } else { if (dir2.y() < FT(0)) { _intersection_point = (_ray1->source().y() > _ray2->source().y()) ? _ray2->source() : _ray1->source(); _result = RAY; return _result; } else { if (_ray1->source().y() < _ray2->source().y()) { _result = NO_INTERSECTION; return _result; } if (_ray1->source().y() == _ray2->source().y()) { _intersection_point = _ray1->source(); _result = POINT; return _result; } _result = SEGMENT; return _result; } } } } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Ray_2_intersection.h", 196)); return _result; } } template typename K::Point_2 Ray_2_Ray_2_pair::intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Ray_2_intersection.h", 208)); return _intersection_point; } template typename K::Segment_2 Ray_2_Ray_2_pair::intersection_segment() const { typedef typename K::Segment_2 Segment_2; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Ray_2_intersection.h", 219)); return Segment_2(_ray1->source(), _ray2->source()); } template typename K::Ray_2 Ray_2_Ray_2_pair::intersection_ray() const { typedef typename K::Ray_2 Ray_2; if (!_known) intersection_type(); (CGAL::possibly(_result == RAY)?(static_cast(0)): ::CGAL::assertion_fail( "_result == RAY" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Ray_2_intersection.h", 230)); return Ray_2(_intersection_point, _ray1->direction()); } template Object intersection(const typename K::Ray_2 &ray1, const typename K::Ray_2 &ray2, const K&) { typedef Ray_2_Ray_2_pair is_t; is_t ispair(&ray1, &ray2); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); case is_t::RAY: return make_object(ispair.intersection_ray()); } } } template inline bool do_intersect(const Ray_2 &ray1, const Ray_2 &ray2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(ray1, ray2); } template Object intersection(const Ray_2 &ray1, const Ray_2 &ray2) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray1, ray2); } } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Line_2_intersection.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Line_2_intersection.h" namespace CGAL { namespace internal { template inline bool do_intersect(const typename K::Point_2 &pt, const typename K::Line_2 &line, const K&) { return line.has_on(pt); } template inline bool do_intersect(const typename K::Line_2 &line, const typename K::Point_2 &pt, const K&) { return line.has_on(pt); } template Object intersection(const typename K::Point_2 &pt, const typename K::Line_2 &line, const K& k) { if (do_intersect(pt,line, k)) { return make_object(pt); } return Object(); } template Object intersection(const typename K::Line_2 &line, const typename K::Point_2 &pt, const K& k) { if (do_intersect(pt,line, k)) { return make_object(pt); } return Object(); } } template inline bool do_intersect(const Line_2 &line, const Point_2 &pt) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, line); } template inline bool do_intersect(const Point_2 &pt, const Line_2 &line) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, line); } template inline Object intersection(const Line_2 &line, const Point_2 &pt) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, line); } template inline Object intersection(const Point_2 &pt, const Line_2 &line) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, line); } } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Ray_2_intersection.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Ray_2_intersection.h" namespace CGAL { namespace internal { template inline bool do_intersect(const typename K::Point_2 &pt, const typename K::Ray_2 &ray, const K&) { return ray.has_on(pt); } template inline bool do_intersect(const typename K::Ray_2 &ray, const typename K::Point_2 &pt, const K&) { return ray.has_on(pt); } template Object intersection(const typename K::Point_2 &pt, const typename K::Ray_2 &ray, const K& k) { if (do_intersect(pt,ray, k)) { return make_object(pt); } return Object(); } template Object intersection(const typename K::Ray_2 &ray, const typename K::Point_2 &pt, const K& k) { if (do_intersect(pt,ray, k)) { return make_object(pt); } return Object(); } } template inline bool do_intersect(const Ray_2 &ray, const Point_2 &pt) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, ray); } template inline bool do_intersect(const Point_2 &pt, const Ray_2 &ray) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, ray); } template inline Object intersection(const Ray_2 &ray, const Point_2 &pt) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, ray); } template inline Object intersection(const Point_2 &pt, const Ray_2 &ray) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, ray); } } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Segment_2_intersection.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Segment_2_intersection.h" namespace CGAL { namespace internal { template inline bool do_intersect(const typename K::Point_2 &pt, const typename K::Segment_2 &seg, const K&) { return seg.has_on(pt); } template inline bool do_intersect(const typename K::Segment_2 &seg, const typename K::Point_2 &pt, const K&) { return seg.has_on(pt); } template inline Object intersection(const typename K::Point_2 &pt, const typename K::Segment_2 &seg, const K&) { if (do_intersect(pt,seg)) { return make_object(pt); } return Object(); } template inline Object intersection( const typename K::Segment_2 &seg, const typename K::Point_2 &pt, const K&) { if (do_intersect(pt,seg)) { return make_object(pt); } return Object(); } } template inline bool do_intersect(const Segment_2 &seg, const Point_2 &pt) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, seg); } template inline bool do_intersect(const Point_2 &pt, const Segment_2 &seg) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, seg); } template inline Object intersection(const Segment_2 &seg, const Point_2 &pt) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, seg); } template inline Object intersection(const Point_2 &pt, const Segment_2 &seg) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, seg); } } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Point_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Point_2_intersection.h" namespace CGAL { namespace internal { template inline bool do_intersect(const typename K::Point_2 &pt1, const typename K::Point_2 &pt2) { return pt1 == pt2; } template Object intersection(const typename K::Point_2 &pt1, const typename K::Point_2 &pt2) { if (pt1 == pt2) { return make_object(pt1); } return Object(); } } template inline bool do_intersect(const Point_2 &pt1, const Point_2 &pt2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt1, pt2); } template inline Object intersection(const Point_2 &pt1, const Point_2 &pt2) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt1, pt2); } } # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Triangle_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Triangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Triangle_2_intersection.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" namespace CGAL { namespace internal { class Straight_2_base_ { public: enum states {EMPTY, POINT, SEGMENT, RAY, LINE}; enum bound_states {NO_UNBOUNDED=0, MIN_UNBOUNDED=1, MAX_UNBOUNDED=2, BOTH_UNBOUNDED = 3, LINE_EMPTY = 4}; protected: Straight_2_base_() ; int main_dir_; int dir_sign_; unsigned int bound_state_; public: unsigned int bound_state() const {return bound_state_;} }; template class Straight_2_: public Straight_2_base_ { public: Straight_2_() ; Straight_2_(typename K::Point_2 const &point) ; Straight_2_(typename K::Line_2 const &line) ; Straight_2_(typename K::Ray_2 const &ray) ; Straight_2_(typename K::Ray_2 const &ray,bool cooriented) ; Straight_2_(typename K::Segment_2 const &seg) ; void cut_right_off(typename K::Line_2 const & cutter) ; int collinear_order(typename K::Point_2 const & p1, typename K::Point_2 const &p2) const ; void current(typename K::Line_2 &line) const; void current(typename K::Ray_2 &ray) const; void current(typename K::Segment_2 &seg) const; void current(typename K::Point_2 &point) const; states current_state() const; bool operator==(const Straight_2_&) const; bool operator!=(const Straight_2_&other) const { return !(*this == other);} protected: typename K::Line_2 support_; typename K::Point_2 min_; typename K::Point_2 max_; }; inline Straight_2_base_:: Straight_2_base_() { bound_state_ = LINE_EMPTY; } template Straight_2_base_::states Straight_2_:: current_state() const { switch (bound_state_) { case BOTH_UNBOUNDED: return LINE; case MIN_UNBOUNDED: case MAX_UNBOUNDED: return RAY; case NO_UNBOUNDED: return (collinear_order(min_, max_) == 0) ? POINT : SEGMENT; case LINE_EMPTY: default: return EMPTY; } } template Straight_2_:: Straight_2_() { bound_state_ = LINE_EMPTY; } template Straight_2_:: Straight_2_(typename K::Line_2 const &line) { support_ = line; typename K::Vector_2 const &dir = support_.direction().to_vector(); main_dir_ = (::CGAL:: abs(dir.x()) > ::CGAL:: abs(dir.y()) ) ? 0 : 1; dir_sign_ = ::CGAL:: sign(support_.direction().to_vector().cartesian(main_dir_)); bound_state_ = BOTH_UNBOUNDED; } template Straight_2_:: Straight_2_(typename K::Point_2 const &point) { typedef typename K::Direction_2 Direction_2; typedef typename K::Line_2 Line_2; support_ = Line_2(point, Direction_2(K::RT(1), K::RT(0))); main_dir_ = 0; dir_sign_ = 1; bound_state_ = NO_UNBOUNDED; min_ = point; max_ = point; } template Straight_2_:: Straight_2_(typename K::Ray_2 const &ray) { support_ = ray.supporting_line(); typename K::Vector_2 const &dir = ray.direction().to_vector(); main_dir_ = (::CGAL:: abs(dir.x()) > ::CGAL:: abs(dir.y()) ) ? 0 : 1; dir_sign_ = ::CGAL:: sign(support_.direction().to_vector().cartesian(main_dir_)); bound_state_ = MAX_UNBOUNDED; min_ = ray.source(); } template Straight_2_:: Straight_2_(typename K::Ray_2 const &ray_,bool cooriented) { typename K::Ray_2 const &ray = cooriented ? ray_ : ray_.opposite(); support_ = ray.supporting_line(); typename K::Vector_2 const &dir = ray.direction().to_vector(); main_dir_ = (::CGAL:: abs(dir.x()) > ::CGAL:: abs(dir.y()) ) ? 0 : 1; dir_sign_ = ::CGAL:: sign(support_.direction().to_vector().cartesian(main_dir_)); if (cooriented) { bound_state_ = MAX_UNBOUNDED; min_ = ray.source(); } else { bound_state_ = MIN_UNBOUNDED; max_ = ray.source(); } } template Straight_2_:: Straight_2_(typename K::Segment_2 const &seg) { support_ = seg.supporting_line(); typename K::Vector_2 const &dir = support_.direction().to_vector(); main_dir_ = (::CGAL:: abs(dir.x()) > ::CGAL:: abs(dir.y()) ) ? 0 : 1; dir_sign_ = ::CGAL:: sign(support_.direction().to_vector().cartesian(main_dir_)); bound_state_ = NO_UNBOUNDED; min_ = seg.source(); max_ = seg.target(); } template void Straight_2_:: current(typename K::Line_2 &line) const { (CGAL::possibly(bound_state_ == BOTH_UNBOUNDED)?(static_cast(0)): ::CGAL::assertion_fail( "bound_state_ == BOTH_UNBOUNDED" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h", 195)); line = support_; } template void Straight_2_:: current(typename K::Ray_2 &ray) const { typedef typename K::Ray_2 Ray_2; (CGAL::possibly(bound_state_ == MIN_UNBOUNDED || bound_state_ == MAX_UNBOUNDED)?(static_cast(0)): ::CGAL::assertion_fail( "bound_state_ == MIN_UNBOUNDED || bound_state_ == MAX_UNBOUNDED" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" # 205 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" , 206 # 205 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" )) ; if (bound_state_ == MIN_UNBOUNDED) { ray = Ray_2(max_, -support_.direction()); } else { ray = Ray_2(min_, support_.direction()); } } template void Straight_2_:: current(typename K::Segment_2 &seg) const { typedef typename K::Segment_2 Segment_2; (CGAL::possibly(bound_state_ == NO_UNBOUNDED && collinear_order(min_, max_) != 0)?(static_cast(0)): ::CGAL::assertion_fail( "bound_state_ == NO_UNBOUNDED && collinear_order(min_, max_) != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" # 220 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" , 221 # 220 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" )) ; seg = Segment_2(min_, max_); } template void Straight_2_:: current(typename K::Point_2 &pt) const { (CGAL::possibly(bound_state_ == NO_UNBOUNDED && collinear_order(min_, max_) == 0)?(static_cast(0)): ::CGAL::assertion_fail( "bound_state_ == NO_UNBOUNDED && collinear_order(min_, max_) == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" # 230 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" , 231 # 230 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h" )) ; pt = min_; } template bool Straight_2_::operator==(const Straight_2_& s) const { typedef Straight_2_ Straight_2; if (bound_state_!=s.bound_state()) return false; if (bound_state_==Straight_2::LINE_EMPTY) return true; if (support_!=s.support_) return false; switch (bound_state_) { case Straight_2::NO_UNBOUNDED: return min_==s.min_ && max_==s.max_; case Straight_2::MAX_UNBOUNDED: return min_==s.min_; case Straight_2::MIN_UNBOUNDED: return max_==s.max_; case Straight_2::BOTH_UNBOUNDED: return true; } return false; } template int sign_of_cross(typename K::Direction_2 const &dir1, typename K::Direction_2 const &dir2, const K&) { return static_cast(internal::orientation(dir1.to_vector(), dir2.to_vector(), K())); } template void Straight_2_:: cut_right_off(typename K::Line_2 const & cutter) { if (bound_state_ == LINE_EMPTY) return; Line_2_Line_2_pair pair(&support_, &cutter); switch (pair.intersection_type()) { case Line_2_Line_2_pair::NO_INTERSECTION: if (cutter.has_on_negative_side(support_.point())) bound_state_ = LINE_EMPTY; break; case Line_2_Line_2_pair::LINE: break; case Line_2_Line_2_pair::POINT: typename K::Point_2 ispoint = pair.intersection_point(); bool new_point = false; switch (sign_of_cross(support_.direction(), cutter.direction(), K())) { case -1: if (bound_state_ & MIN_UNBOUNDED) { new_point = true; bound_state_ ^= MIN_UNBOUNDED; } else { if (collinear_order(ispoint, min_) == -1) new_point = true; } if (new_point) { if (!(bound_state_ & MAX_UNBOUNDED) && collinear_order(ispoint, max_) == -1) bound_state_ = LINE_EMPTY; else min_ = ispoint; } break; case 0: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::warning_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Straight_2.h", 310, "Internal CGAL error.")); break; case 1: if (bound_state_ & MAX_UNBOUNDED) { new_point = true; bound_state_ ^= MAX_UNBOUNDED; } else { if (collinear_order(ispoint, max_) == 1) new_point = true; } if (new_point) { if (!(bound_state_ & MIN_UNBOUNDED) && collinear_order(ispoint, min_) == 1) bound_state_ = LINE_EMPTY; else max_ = ispoint; } break; } break; } } template int Straight_2_:: collinear_order(typename K::Point_2 const &pt1, typename K::Point_2 const & pt2) const { typename K::Construct_cartesian_const_iterator_2 construct_cccit; typename K::Cartesian_const_iterator_2 ccit1 = construct_cccit(pt1) + main_dir_; typename K::Cartesian_const_iterator_2 ccit2 = construct_cccit(pt2) + main_dir_; int diffsign; diffsign = ::CGAL:: sign(*ccit2 - *ccit1); if (diffsign == 0) return 0; return (diffsign == dir_sign_) ? 1 : -1; } } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Triangle_2_intersection.h" 2 namespace CGAL { namespace internal { template class Point_2_Triangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT}; Point_2_Triangle_2_pair(typename K::Point_2 const *pt, typename K::Triangle_2 const *trian) : _pt(pt), _trian(trian), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; protected: typename K::Point_2 const * _pt; typename K::Triangle_2 const * _trian; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point; mutable typename K::Point_2 _other_point; }; template inline bool do_intersect(const typename K::Point_2 &p1, const typename K::Triangle_2 &p2, const K&) { typedef Point_2_Triangle_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline bool do_intersect(const typename K::Triangle_2 &p2, const typename K::Point_2 &p1, const K& k) { return internal::do_intersect(p1, p2, k); } template typename Point_2_Triangle_2_pair::Intersection_results Point_2_Triangle_2_pair::intersection_type() const { typedef typename K::Line_2 line_t; if (_known) return _result; _known = true; if (_trian->has_on_unbounded_side(*_pt)) { _result = NO_INTERSECTION; } else { _result = POINT; } return _result; # 114 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Triangle_2_intersection.h" } template typename K::Point_2 Point_2_Triangle_2_pair:: intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Triangle_2_intersection.h", 125)); return *_pt; } template Object intersection(const typename K::Point_2 &pt, const typename K::Triangle_2 &tr, const K&) { typedef Point_2_Triangle_2_pair is_t; is_t ispair(&pt, &tr); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(pt); } } template inline Object intersection(const typename K::Triangle_2 &tr, const typename K::Point_2 &pt, const K&k) { return internal::intersection(pt, tr, k); } } template inline bool do_intersect(const Triangle_2 &tr, const Point_2 &pt) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, tr); } template inline bool do_intersect(const Point_2 &pt, const Triangle_2 &tr) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, tr); } template inline Object intersection(const Triangle_2 &tr, const Point_2 &pt) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, tr); } template inline Object intersection(const Point_2 &pt, const Triangle_2 &tr) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, tr); } } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_1.h" 2 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_intersection.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" namespace CGAL { namespace internal { template bool intersection_test_vertex(const typename K::Point_2 * P1, const typename K::Point_2 * Q1, const typename K::Point_2 * R1, const typename K::Point_2 * P2, const typename K::Point_2 * Q2, const typename K::Point_2 * R2, const K & k ){ (CGAL::possibly(k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" , 43 # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" )) ; (CGAL::possibly(k.orientation_2_object() (*P2,*Q2,*R2) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.orientation_2_object() (*P2,*Q2,*R2) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" , 45 # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" )) ; typename K::Orientation_2 orientation = k.orientation_2_object(); if (orientation(*R2,*P2,*Q1) != NEGATIVE) { if (orientation(*R2,*Q2,*Q1) != POSITIVE) { if (orientation(*P1,*P2,*Q1) == POSITIVE) return orientation(*P1,*Q2,*Q1) != POSITIVE; return orientation(*P1,*P2,*R1) != NEGATIVE && orientation(*Q1,*R1,*P2) != NEGATIVE ; } return orientation(*P1,*Q2,*Q1) != POSITIVE && orientation(*R2,*Q2,*R1) != POSITIVE && orientation(*Q1,*R1,*Q2) != NEGATIVE ; } if (orientation(*R2,*P2,*R1) != NEGATIVE) { if (orientation(*Q1,*R1,*R2) != NEGATIVE) return orientation(*P1,*P2,*R1) != NEGATIVE; return orientation(*Q1,*R1,*Q2) != NEGATIVE && orientation(*R2,*R1,*Q2) != NEGATIVE; } return false; } template bool intersection_test_edge(const typename K::Point_2 * P1, const typename K::Point_2 * Q1, const typename K::Point_2 * R1, const typename K::Point_2 * P2, const typename K::Point_2 * Q2, const typename K::Point_2 * R2, const K & k ){ (CGAL::possibly(k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" # 84 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" , 85 # 84 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" )) ; (CGAL::possibly(k.orientation_2_object() (*P2,*Q2,*R2) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.orientation_2_object() (*P2,*Q2,*R2) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" # 86 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" , 87 # 86 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h" )) ; typename K::Orientation_2 orientation = k.orientation_2_object(); if (orientation(*R2,*P2,*Q1) != NEGATIVE) { if (orientation(*P1,*P2,*Q1) != NEGATIVE) return orientation(*P1,*Q1,*R2) != NEGATIVE; return orientation(*Q1,*R1,*P2) != NEGATIVE && orientation(*R1,*P1,*P2) != NEGATIVE; } if (orientation(*R2,*P2,*R1) != NEGATIVE) return orientation(*P1,*P2,*R1) != NEGATIVE && ( orientation(*P1,*R1,*R2) != NEGATIVE || orientation(*Q1,*R1,*R2) != NEGATIVE ) ; return false; } template bool do_intersect(const typename K::Triangle_2 &t1, const typename K::Triangle_2 &t2, const K & k ){ (CGAL::possibly(! k.is_degenerate_2_object() (t1))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_2_object() (t1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h", 114)); (CGAL::possibly(! k.is_degenerate_2_object() (t2))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_2_object() (t2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_do_intersect.h", 115)); typename K::Construct_vertex_2 vertex_on = k.construct_vertex_2_object(); typename K::Orientation_2 orientation = k.orientation_2_object(); typedef typename K::Point_2 Point_2; const Point_2 & P1 = vertex_on(t1,0); const Point_2 & Q1 = vertex_on(t1,1); const Point_2 & R1 = vertex_on(t1,2); const Point_2 & P2 = vertex_on(t2,0); const Point_2 & Q2 = vertex_on(t2,1); const Point_2 & R2 = vertex_on(t2,2); const Point_2 * p1 = &P1; const Point_2 * q1 = &Q1; const Point_2 * r1 = &R1; const Point_2 * p2 = &P2; const Point_2 * q2 = &Q2; const Point_2 * r2 = &R2; if ( orientation(P1,Q1,R1) != POSITIVE ) { q1 = &R1;; r1 = &Q1; } if ( orientation(P2,Q2,R2) != POSITIVE ) { q2 = &R2; r2 = &Q2; } if ( orientation(*p2,*q2,*p1) != NEGATIVE ) { if ( orientation(*q2,*r2,*p1) != NEGATIVE ) { if ( orientation(*r2,*p2,*p1) != NEGATIVE ) return true; return internal::intersection_test_edge(p1,q1,r1,p2,q2,r2,k); } if ( orientation(*r2,*p2,*p1) != NEGATIVE ) return internal::intersection_test_edge(p1,q1,r1,r2,p2,q2,k); return internal::intersection_test_vertex(p1,q1,r1,p2,q2,r2,k); } if ( orientation(*q2,*r2,*p1) != NEGATIVE ) { if ( orientation(*r2,*p2,*p1) != NEGATIVE ) return internal::intersection_test_edge(p1,q1,r1,q2,r2,p2,k); return internal::intersection_test_vertex(p1,q1,r1,q2,r2,p2,k); } return internal::intersection_test_vertex(p1,q1,r1,r2,p2,q2,k); } } template inline bool do_intersect(const Triangle_2 &t1, const Triangle_2 &t2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(t1,t2); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_intersection.h" 2 namespace CGAL { template inline Object intersection(const Triangle_2 &tr1, const Triangle_2& tr2) { typedef typename K::Intersect_2 Intersect; return Intersect()(tr1, tr2); } } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h" 2 namespace CGAL { namespace internal { template struct Pointlist_2_rec_ { Pointlist_2_rec_ *next; typename K::Point_2 point; Oriented_side side; }; template struct Pointlist_2_ { int size; Pointlist_2_rec_ *first; Pointlist_2_() ; ~Pointlist_2_() ; }; template Pointlist_2_::Pointlist_2_() { size = 0; first = 0; } template Pointlist_2_::~Pointlist_2_() { Pointlist_2_rec_ *cur; for (int i=0; inext; delete cur; } } template void _init_list(Pointlist_2_ &list, const typename K::Triangle_2 &trian) { if (!trian.is_degenerate()) { list.size = 3; list.first = 0; for (int i=0; i<3; i++) { Pointlist_2_rec_ *newrec = new Pointlist_2_rec_; newrec->next = list.first; list.first = newrec; newrec->point = trian[i]; } } else { (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 93)); } } template void _cut_off(Pointlist_2_ &list, const typename K::Line_2 &cutter) { int i; int add = 0; Pointlist_2_rec_ *cur, *last=0, *newrec; for (i=0, cur = list.first; inext) { cur->side = cutter.oriented_side(cur->point); last = cur; } for (cur = list.first, i=0; inext) { if ((cur->side == ON_POSITIVE_SIDE && last->side == ON_NEGATIVE_SIDE) || (cur->side == ON_NEGATIVE_SIDE && last->side == ON_POSITIVE_SIDE)) { add++; typename K::Line_2 l(cur->point, last->point); newrec = new Pointlist_2_rec_; newrec->next = last->next; last->next = newrec; newrec->side = ON_ORIENTED_BOUNDARY; Line_2_Line_2_pair linepair(&cutter, &l); typename Line_2_Line_2_pair::Intersection_results isr; isr = linepair.intersection_type(); (CGAL::possibly(isr == Line_2_Line_2_pair::POINT)?(static_cast(0)): ::CGAL::assertion_fail( "isr == Line_2_Line_2_pair::POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 125)); newrec->point = linepair.intersection_point(); } last = cur; } (CGAL::possibly(add <= 2)?(static_cast(0)): ::CGAL::assertion_fail( "add <= 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 130)); Pointlist_2_rec_ **curpt; curpt = &list.first; while (*curpt != 0) { cur = *curpt; if (cur->side == ON_NEGATIVE_SIDE) { add--; *curpt = cur->next; delete cur; } else { curpt = &cur->next; } } if (list.size == 2 && add == 1) { add = 0; cur = list.first; if (cur->side == ON_ORIENTED_BOUNDARY) { list.first = cur->next; delete cur; } else { last = cur; cur = cur->next; last->next = cur->next; delete cur; } } list.size += add; } template class Triangle_2_Triangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT, TRIANGLE, POLYGON}; Triangle_2_Triangle_2_pair(typename K::Triangle_2 const *trian1, typename K::Triangle_2 const *trian2) : _trian1(trian1), _trian2(trian2), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; typename K::Triangle_2 intersection_triangle() const; bool intersection( ) const; int vertex_count() const; typename K::Point_2 vertex(int i) const; protected: typename K::Triangle_2 const* _trian1; typename K::Triangle_2 const * _trian2; mutable bool _known; mutable Intersection_results _result; mutable Pointlist_2_ _pointlist; }; template typename Triangle_2_Triangle_2_pair::Intersection_results Triangle_2_Triangle_2_pair::intersection_type() const { typedef typename K::Line_2 Line_2; if (_known) return _result; _known = true; if (!do_overlap(_trian1->bbox(), _trian2->bbox())) { _result = NO_INTERSECTION; return _result; } _init_list(_pointlist, *_trian1); if (_trian2->is_degenerate()) { (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 200)); } else { Line_2 l(_trian2->vertex(0), _trian2->vertex(1)); if (l.oriented_side(_trian2->vertex(2)) == ON_POSITIVE_SIDE) { _cut_off(_pointlist, l); l = Line_2(_trian2->vertex(1), _trian2->vertex(2)); _cut_off(_pointlist, l); l = Line_2(_trian2->vertex(2), _trian2->vertex(0)); _cut_off(_pointlist, l); } else { l = l.opposite(); _cut_off(_pointlist, l); l = Line_2(_trian2->vertex(0), _trian2->vertex(2)); _cut_off(_pointlist, l); l = Line_2(_trian2->vertex(2), _trian2->vertex(1)); _cut_off(_pointlist, l); } } switch (_pointlist.size) { case 0: _result = NO_INTERSECTION; break; case 1: _result = POINT; break; case 2: _result = SEGMENT; break; case 3: _result = TRIANGLE; break; default: _result = POLYGON; } return _result; } template bool Triangle_2_Triangle_2_pair::intersection( ) const { if (!_known) intersection_type(); if (_result != TRIANGLE && _result != POLYGON) return false; Pointlist_2_rec_ *cur; int i; for (i=0, cur = _pointlist.first; i<_pointlist.size; i++, cur = cur->next) { std::cout << to_double(cur->point.x()) << ' '; std::cout << to_double(cur->point.y()) << ' '; } std::cout << std::endl; return true; } template int Triangle_2_Triangle_2_pair::vertex_count() const { (CGAL::possibly(_known)?(static_cast(0)): ::CGAL::assertion_fail( "_known" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 264)); return _pointlist.size; } template typename K::Point_2 Triangle_2_Triangle_2_pair::vertex(int n) const { (CGAL::possibly(_known)?(static_cast(0)): ::CGAL::assertion_fail( "_known" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 272)); (CGAL::possibly(n >= 0 && n < _pointlist.size)?(static_cast(0)): ::CGAL::assertion_fail( "n >= 0 && n < _pointlist.size" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 273)); Pointlist_2_rec_ *cur; int k; for (k=0, cur = _pointlist.first; k < n; k++, cur = cur->next) { } return cur->point; } template typename K::Triangle_2 Triangle_2_Triangle_2_pair::intersection_triangle() const { typedef typename K::Triangle_2 Triangle_2; if (!_known) intersection_type(); (CGAL::possibly(_result == TRIANGLE)?(static_cast(0)): ::CGAL::assertion_fail( "_result == TRIANGLE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 290)); return Triangle_2(_pointlist.first->point, _pointlist.first->next->point, _pointlist.first->next->next->point); } template typename K::Segment_2 Triangle_2_Triangle_2_pair::intersection_segment() const { typedef typename K::Segment_2 Segment_2; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 303)); return Segment_2(_pointlist.first->point, _pointlist.first->next->point); } template typename K::Point_2 Triangle_2_Triangle_2_pair::intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_2/Triangle_2_Triangle_2_intersection_impl.h", 314)); return _pointlist.first->point; } template Object intersection(const typename K::Triangle_2 &tr1, const typename K::Triangle_2 &tr2, const K&) { typedef Triangle_2_Triangle_2_pair is_t; is_t ispair(&tr1, &tr2); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); case is_t::TRIANGLE: return make_object(ispair.intersection_triangle()); case is_t::POLYGON: { typedef std::vector Container; Container points(ispair.vertex_count()); for (int i =0; i < ispair.vertex_count(); i++) { points[i] = ispair.vertex(i); } return make_object(points); } } } } } # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Triangle_2_intersection.h" 2 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Line_2_intersection.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Line_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Triangle_2_intersection.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Triangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Triangle_2_intersection.h" 2 namespace CGAL { namespace internal { template class Line_2_Triangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Line_2_Triangle_2_pair(typename K::Line_2 const *line, typename K::Triangle_2 const *trian) : _line(line), _trian(trian), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: typename K::Line_2 const*_line; typename K::Triangle_2 const * _trian; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point; mutable typename K::Point_2 _other_point; }; template inline bool do_intersect(const typename K::Line_2 &p1, const typename K::Triangle_2 &p2, const K&) { typedef Line_2_Triangle_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline bool do_intersect(const typename K::Triangle_2 &p2, const typename K::Line_2 &p1, const K& k) { return internal::do_intersect(p1, p2, k); } template typename Line_2_Triangle_2_pair::Intersection_results Line_2_Triangle_2_pair::intersection_type() const { typedef typename K::Line_2 Line_2; if (_known) return _result; _known = true; Straight_2_ straight(*_line); Line_2 l(_trian->vertex(0), _trian->vertex(1)); if (l.oriented_side(_trian->vertex(2)) == ON_POSITIVE_SIDE) { straight.cut_right_off( Line_2(_trian->vertex(0), _trian->vertex(1))); straight.cut_right_off( Line_2(_trian->vertex(1), _trian->vertex(2))); straight.cut_right_off( Line_2(_trian->vertex(2), _trian->vertex(0))); } else { straight.cut_right_off( Line_2(_trian->vertex(2), _trian->vertex(1))); straight.cut_right_off( Line_2(_trian->vertex(1), _trian->vertex(0))); straight.cut_right_off( Line_2(_trian->vertex(0), _trian->vertex(2))); } switch (straight.current_state()) { case Straight_2_::EMPTY: _result = NO_INTERSECTION; return _result; case Straight_2_::POINT: { straight.current(_intersection_point); _result = POINT; return _result; } case Straight_2_::SEGMENT: { typename K::Segment_2 seg; straight.current(seg); _intersection_point = seg.source(); _other_point = seg.target(); _result = SEGMENT; return _result; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Triangle_2_intersection.h", 130, "Internal CGAL error.")); _result = NO_INTERSECTION; return _result; } } template typename K::Point_2 Line_2_Triangle_2_pair:: intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Triangle_2_intersection.h", 144)); return _intersection_point; } template typename K::Segment_2 Line_2_Triangle_2_pair:: intersection_segment() const { typedef typename K::Segment_2 Segment_2; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Triangle_2_intersection.h", 156)); return Segment_2(_intersection_point, _other_point); } template Object intersection(const typename K::Line_2 &line, const typename K::Triangle_2 &tr, const K&) { typedef Line_2_Triangle_2_pair is_t; is_t ispair(&line, &tr); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); } } template inline Object intersection(const typename K::Triangle_2 &tr, const typename K::Line_2 &line, const K& k) { return intersection(line, tr, k); } } template inline bool do_intersect(const Line_2 &p1, const Triangle_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template inline bool do_intersect( const Triangle_2 &p1, const Line_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p2, p1); } template inline Object intersection(const Line_2 &line, const Triangle_2 &tr) { typedef typename K::Intersect_2 Intersect; return Intersect()(line, tr); } template inline Object intersection(const Triangle_2 &tr, const Line_2 &line) { typedef typename K::Intersect_2 Intersect; return Intersect()(line, tr); } } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Line_2_intersection.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Ray_2_intersection.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Ray_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Triangle_2_intersection.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Triangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Triangle_2_intersection.h" 2 namespace CGAL { namespace internal { template class Ray_2_Triangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Ray_2_Triangle_2_pair(typename K::Ray_2 const *ray, typename K::Triangle_2 const *trian) : _ray(ray), _trian(trian), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: typename K::Ray_2 const* _ray; typename K::Triangle_2 const * _trian; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point; mutable typename K::Point_2 _other_point; }; template typename Ray_2_Triangle_2_pair::Intersection_results Ray_2_Triangle_2_pair::intersection_type() const { typedef typename K::Line_2 Line_2; if (_known) return _result; _known = true; Straight_2_ straight(*_ray); Line_2 l(_trian->vertex(0), _trian->vertex(1)); if (l.oriented_side(_trian->vertex(2)) == ON_POSITIVE_SIDE) { straight.cut_right_off( Line_2(_trian->vertex(0), _trian->vertex(1))); straight.cut_right_off( Line_2(_trian->vertex(1), _trian->vertex(2))); straight.cut_right_off( Line_2(_trian->vertex(2), _trian->vertex(0))); } else { straight.cut_right_off( Line_2(_trian->vertex(2), _trian->vertex(1))); straight.cut_right_off( Line_2(_trian->vertex(1), _trian->vertex(0))); straight.cut_right_off( Line_2(_trian->vertex(0), _trian->vertex(2))); } switch (straight.current_state()) { case Straight_2_::EMPTY: _result = NO_INTERSECTION; return _result; case Straight_2_::POINT: { straight.current(_intersection_point); _result = POINT; return _result; } case Straight_2_::SEGMENT: { typename K::Segment_2 seg; straight.current(seg); _intersection_point = seg.source(); _other_point = seg.target(); _result = SEGMENT; return _result; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Triangle_2_intersection.h", 114, "Internal CGAL error.")); _result = NO_INTERSECTION; return _result; } } template typename K::Point_2 Ray_2_Triangle_2_pair:: intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Triangle_2_intersection.h", 128)); return _intersection_point; } template typename K::Segment_2 Ray_2_Triangle_2_pair:: intersection_segment() const { typedef typename K::Segment_2 Segment_2; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Triangle_2_intersection.h", 140)); return Segment_2(_intersection_point, _other_point); } template Object intersection(const typename K::Ray_2 &ray, const typename K::Triangle_2&tr, const K&) { typedef Ray_2_Triangle_2_pair is_t; is_t ispair(&ray, &tr); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_segment()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); } } template Object intersection(const typename K::Triangle_2&tr, const typename K::Ray_2 &ray, const K& k) { return internal::intersection(ray, tr, k); } template inline bool do_intersect( const typename K::Ray_2 &p1, const typename K::Triangle_2 &p2, const K&) { typedef Ray_2_Triangle_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline bool do_intersect( const typename K::Triangle_2 &p1, const typename K::Ray_2 &p2, const K&) { typedef Ray_2_Triangle_2_pair pair_t; pair_t pair(&p2, &p1); return pair.intersection_type() != pair_t::NO_INTERSECTION; } } template inline bool do_intersect(const Triangle_2 &tr, const Ray_2 &ray) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(ray, tr); } template inline bool do_intersect(const Ray_2 &ray, const Triangle_2 &tr) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(ray, tr); } template inline Object intersection(const Ray_2 &ray, const Triangle_2 &tr) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, tr); } template inline Object intersection(const Triangle_2 &tr, const Ray_2 &ray) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, tr); } } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Ray_2_intersection.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Segment_2_intersection.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Segment_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Triangle_2_intersection.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Triangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Triangle_2_intersection.h" 2 namespace CGAL { namespace internal { template class Segment_2_Triangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Segment_2_Triangle_2_pair(typename K::Segment_2 const *seg, typename K::Triangle_2 const *trian) : _seg(seg), _trian(trian), _known(false) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: typename K::Segment_2 const * _seg; typename K::Triangle_2 const * _trian; mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _intersection_point; mutable typename K::Point_2 _other_point; }; template inline bool do_intersect( const typename K::Segment_2 &p1, const typename K::Triangle_2 &p2, const K&) { typedef Segment_2_Triangle_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template typename Segment_2_Triangle_2_pair::Intersection_results Segment_2_Triangle_2_pair::intersection_type() const { if (_known) return _result; _known = true; Straight_2_ straight(*_seg); typedef typename K::Line_2 Line_2; Line_2 l(_trian->vertex(0), _trian->vertex(1)); if (l.oriented_side(_trian->vertex(2)) == ON_POSITIVE_SIDE) { straight.cut_right_off( Line_2(_trian->vertex(0), _trian->vertex(1))); straight.cut_right_off( Line_2(_trian->vertex(1), _trian->vertex(2))); straight.cut_right_off( Line_2(_trian->vertex(2), _trian->vertex(0))); } else { straight.cut_right_off( Line_2(_trian->vertex(2), _trian->vertex(1))); straight.cut_right_off( Line_2(_trian->vertex(1), _trian->vertex(0))); straight.cut_right_off( Line_2(_trian->vertex(0), _trian->vertex(2))); } switch (straight.current_state()) { case Straight_2_::EMPTY: _result = NO_INTERSECTION; return _result; case Straight_2_::POINT: { straight.current(_intersection_point); _result = POINT; return _result; } case Straight_2_::SEGMENT: { typename K::Segment_2 seg; straight.current(seg); _intersection_point = seg.source(); _other_point = seg.target(); _result = SEGMENT; return _result; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Triangle_2_intersection.h", 123, "Internal CGAL error.")); _result = NO_INTERSECTION; return _result; } } template typename K::Point_2 Segment_2_Triangle_2_pair:: intersection_point() const { if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Triangle_2_intersection.h", 137)); return _intersection_point; } template typename K::Segment_2 Segment_2_Triangle_2_pair:: intersection_segment() const { typedef typename K::Segment_2 Segment_2; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Triangle_2_intersection.h", 149)); return Segment_2(_intersection_point, _other_point); } template Object intersection(const typename K::Segment_2 &seg, const typename K::Triangle_2&tr, const K&) { typedef Segment_2_Triangle_2_pair is_t; is_t ispair(&seg, &tr); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); } } template Object intersection(const typename K::Triangle_2&tr, const typename K::Segment_2 &seg, const K& k) { return internal::intersection(seg, tr, k); } template inline bool do_intersect( const typename K::Triangle_2 &p1, const typename K::Segment_2 &p2, const K&) { typedef Segment_2_Triangle_2_pair pair_t; pair_t pair(&p2, &p1); return pair.intersection_type() != pair_t::NO_INTERSECTION; } } template inline Object intersection(const Segment_2 &seg, const Triangle_2 &tr) { typedef typename K::Intersect_2 Intersect; return Intersect()(seg, tr); } template inline Object intersection(const Triangle_2 &tr, const Segment_2 &seg) { typedef typename K::Intersect_2 Intersect; return Intersect()(seg, tr); } template inline bool do_intersect(const Segment_2 &seg, const Triangle_2 &tr) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(seg, tr); } template inline bool do_intersect(const Triangle_2 &tr, const Segment_2 &seg) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(seg, tr); } } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_2_Segment_2_intersection.h" 2 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Iso_rectangle_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Iso_rectangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Iso_rectangle_2_intersection.h" 2 namespace CGAL { namespace internal { template class Line_2_Iso_rectangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Line_2_Iso_rectangle_2_pair(typename K::Line_2 const *line, typename K::Iso_rectangle_2 const *iso) : _known(false), _ref_point(line->point()), _dir(line->direction().to_vector()), _isomin((iso->min)()), _isomax((iso->max)()) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: mutable bool _known; mutable Intersection_results _result; mutable typename K::FT _min, _max; typename K::Point_2 _ref_point; typename K::Vector_2 _dir; typename K::Point_2 _isomin; typename K::Point_2 _isomax; }; template inline bool do_intersect(const typename K::Line_2 &p1, const typename K::Iso_rectangle_2 &p2, const K&) { typedef Line_2_Iso_rectangle_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline bool do_intersect(const typename K::Iso_rectangle_2 &p2, const typename K::Line_2 &p1, const K& k) { return internal::do_intersect(p1, p2, k); } template typename Line_2_Iso_rectangle_2_pair::Intersection_results Line_2_Iso_rectangle_2_pair::intersection_type() const { typedef typename K::Line_2 line_t; if (_known) return _result; _known = true; typedef typename K::FT FT; typedef typename K::RT RT; bool all_values = true; typename K::Construct_cartesian_const_iterator_2 construct_cccit; typename K::Cartesian_const_iterator_2 ref_point_it = construct_cccit(_ref_point); typename K::Cartesian_const_iterator_2 end = construct_cccit(_ref_point, 0); typename K::Cartesian_const_iterator_2 isomin_it = construct_cccit(_isomin); typename K::Cartesian_const_iterator_2 isomax_it = construct_cccit(_isomax); for (unsigned int i=0; ref_point_it != end; ++i, ++ref_point_it, ++isomin_it, ++isomax_it) { if (_dir.homogeneous(i) == RT(0)) { if (*ref_point_it < *isomin_it) { _result = NO_INTERSECTION; return NO_INTERSECTION; } if (*ref_point_it > *isomax_it) { _result = NO_INTERSECTION; return NO_INTERSECTION; } } else { FT newmin, newmax; if (_dir.homogeneous(i) > RT(0)) { newmin = (*isomin_it - *ref_point_it) / _dir.cartesian(i); newmax = (*isomax_it - *ref_point_it) / _dir.cartesian(i); } else { newmin = (*isomax_it - *ref_point_it) / _dir.cartesian(i); newmax = (*isomin_it - *ref_point_it) / _dir.cartesian(i); } if (all_values) { _min = newmin; _max = newmax; } else { if (newmin > _min) _min = newmin; if (newmax < _max) _max = newmax; if (_max < _min) { _result = NO_INTERSECTION; return NO_INTERSECTION; } } all_values = false; } } (CGAL::possibly(!all_values)?(static_cast(0)): ::CGAL::assertion_fail( "!all_values" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Iso_rectangle_2_intersection.h", 145)); if (_max == _min) { _result = POINT; return POINT; } _result = SEGMENT; return SEGMENT; } template typename K::Point_2 Line_2_Iso_rectangle_2_pair:: intersection_point() const { typename K::Construct_translated_point_2 translated_point; typename K::Construct_scaled_vector_2 construct_scaled_vector; if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Iso_rectangle_2_intersection.h", 165)); return translated_point(_ref_point, construct_scaled_vector(_dir, _min)); } template typename K::Segment_2 Line_2_Iso_rectangle_2_pair:: intersection_segment() const { typename K::Construct_segment_2 construct_segment_2; typename K::Construct_translated_point_2 translated_point; typename K::Construct_scaled_vector_2 construct_scaled_vector; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_2_Iso_rectangle_2_intersection.h", 179)); return construct_segment_2(translated_point(_ref_point, construct_scaled_vector(_dir,_min)), translated_point(_ref_point, construct_scaled_vector(_dir,_max))); } template Object intersection(const typename K::Line_2 &line, const typename K::Iso_rectangle_2 &iso, const K&) { typename K::Construct_object_2 construct_object; typedef Line_2_Iso_rectangle_2_pair is_t; is_t ispair(&line, &iso); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return construct_object(ispair.intersection_point()); case is_t::SEGMENT: return construct_object(ispair.intersection_segment()); } } template inline Object intersection(const typename K::Iso_rectangle_2 &iso, const typename K::Line_2 &line, const K& k) { return internal::intersection(line, iso, k); } } template inline bool do_intersect( const Line_2 &p1, const Iso_rectangle_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template inline bool do_intersect( const Iso_rectangle_2 &p1, const Line_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p2, p1); } template Object intersection(const Line_2 &line, const Iso_rectangle_2 &iso) { typedef typename K::Intersect_2 Intersect; return Intersect()(line, iso); } template inline Object intersection(const Iso_rectangle_2 &iso, const Line_2 &line) { typedef typename K::Intersect_2 Intersect; return Intersect()(line, iso); } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h" 2 namespace CGAL { namespace internal { template class Ray_2_Iso_rectangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Ray_2_Iso_rectangle_2_pair(typename K::Ray_2 const *ray, typename K::Iso_rectangle_2 const *iso) : _known(false), _ref_point(ray->source()), _dir(ray->direction().to_vector()), _isomin((iso->min)()), _isomax((iso->max)()), _min((typename K::FT)(0)) {} Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _ref_point; mutable typename K::Vector_2 _dir; mutable typename K::Point_2 _isomin; mutable typename K::Point_2 _isomax; mutable typename K::FT _min, _max; }; template inline bool do_intersect(const typename K::Ray_2 &p1, const typename K::Iso_rectangle_2 &p2, const K&) { typedef Ray_2_Iso_rectangle_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline bool do_intersect(const typename K::Iso_rectangle_2 &p2, const typename K::Ray_2 &p1, const K& k) { return do_intersect(p1, p2, k); } template Object intersection(const typename K::Ray_2 &ray, const typename K::Iso_rectangle_2 &iso, const K& ) { typedef Ray_2_Iso_rectangle_2_pair is_t; is_t ispair(&ray, &iso); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); } } template Object intersection(const typename K::Iso_rectangle_2 &iso, const typename K::Ray_2 &ray, const K& k) { return intersection(ray, iso, k); } template typename Ray_2_Iso_rectangle_2_pair::Intersection_results Ray_2_Iso_rectangle_2_pair::intersection_type() const { typedef typename K::RT RT; typedef typename K::FT FT; if (_known) return _result; _known = true; bool to_infinity = true; typename K::Construct_cartesian_const_iterator_2 construct_cccit; typename K::Cartesian_const_iterator_2 ref_point_it = construct_cccit(_ref_point); typename K::Cartesian_const_iterator_2 end = construct_cccit(_ref_point, 0); typename K::Cartesian_const_iterator_2 isomin_it = construct_cccit(_isomin); typename K::Cartesian_const_iterator_2 isomax_it = construct_cccit(_isomax); for (unsigned int i=0; ref_point_it != end; ++i, ++ref_point_it, ++isomin_it, ++isomax_it) { if (_dir.homogeneous(i) == RT(0)) { if ((*ref_point_it) < (*isomin_it)) { _result = NO_INTERSECTION; return _result; } if ((*ref_point_it) > (*isomax_it)) { _result = NO_INTERSECTION; return _result; } } else { FT newmin, newmax; if (_dir.homogeneous(i) > RT(0)) { newmin = (*isomin_it - *ref_point_it) / _dir.cartesian(i); newmax = (*isomax_it - *ref_point_it) / _dir.cartesian(i); } else { newmin = (*isomax_it - *ref_point_it) / _dir.cartesian(i); newmax = (*isomin_it - *ref_point_it) / _dir.cartesian(i); } if (newmin > _min) _min = newmin; if (to_infinity) { _max = newmax; } else { if (newmax < _max) _max = newmax; } if (_max < _min) { _result = NO_INTERSECTION; return _result; } to_infinity = false; } } (CGAL::possibly(!to_infinity)?(static_cast(0)): ::CGAL::assertion_fail( "!to_infinity" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h", 166)); if (_max == _min) { _result = POINT; return _result; } _result = SEGMENT; return _result; } template typename K::Segment_2 Ray_2_Iso_rectangle_2_pair::intersection_segment() const { typedef typename K::Segment_2 Segment_2; typename K::Construct_translated_point_2 translated_point; typename K::Construct_scaled_vector_2 construct_scaled_vector; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h", 185)); typename K::Point_2 p1(translated_point(_ref_point, construct_scaled_vector(_dir,_min))); typename K::Point_2 p2(translated_point(_ref_point, construct_scaled_vector(_dir,_max))); return Segment_2(p1, p2); } template typename K::Point_2 Ray_2_Iso_rectangle_2_pair::intersection_point() const { typedef typename K::Point_2 Point_2; typename K::Construct_translated_point_2 translated_point; typename K::Construct_scaled_vector_2 construct_scaled_vector; if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h", 200)); return Point_2(translated_point(_ref_point, construct_scaled_vector(_dir, _min))); } } template inline bool do_intersect(const Iso_rectangle_2 &p1, const Ray_2 &p2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template inline bool do_intersect(const Ray_2 &p2, const Iso_rectangle_2 &p1) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(p1, p2); } template inline Object intersection(const Iso_rectangle_2&iso, const Ray_2&ray) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, iso); } template inline Object intersection(const Ray_2&ray, const Iso_rectangle_2&iso) { typedef typename K::Intersect_2 Intersect; return Intersect()(ray, iso); } } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/kernel_assertions.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h" 2 namespace CGAL { namespace internal { template class Segment_2_Iso_rectangle_2_pair { public: enum Intersection_results {NO_INTERSECTION, POINT, SEGMENT}; Segment_2_Iso_rectangle_2_pair(typename K::Segment_2 const *seg, typename K::Iso_rectangle_2 const *rect) ; Intersection_results intersection_type() const; typename K::Point_2 intersection_point() const; typename K::Segment_2 intersection_segment() const; protected: mutable bool _known; mutable Intersection_results _result; mutable typename K::Point_2 _ref_point; mutable typename K::Vector_2 _dir; mutable typename K::Point_2 _isomin; mutable typename K::Point_2 _isomax; mutable typename K::FT _min, _max; }; template inline bool do_intersect( const typename K::Segment_2 &p1, const typename K::Iso_rectangle_2 &p2, const K&) { typedef Segment_2_Iso_rectangle_2_pair pair_t; pair_t pair(&p1, &p2); return pair.intersection_type() != pair_t::NO_INTERSECTION; } template Object intersection( const typename K::Segment_2 &seg, const typename K::Iso_rectangle_2 &iso, const K&) { typedef Segment_2_Iso_rectangle_2_pair is_t; is_t ispair(&seg, &iso); switch (ispair.intersection_type()) { case is_t::NO_INTERSECTION: default: return Object(); case is_t::POINT: return make_object(ispair.intersection_point()); case is_t::SEGMENT: return make_object(ispair.intersection_segment()); } } template inline Object intersection(const typename K::Iso_rectangle_2 &iso, const typename K::Segment_2 &seg, const K& k) { return internal::intersection(seg, iso, k); } template Segment_2_Iso_rectangle_2_pair:: Segment_2_Iso_rectangle_2_pair( typename K::Segment_2 const *seg, typename K::Iso_rectangle_2 const *iso) { _known = false; _isomin = (iso->min)(); _isomax = (iso->max)(); _ref_point = seg->source(); _dir = seg->direction().to_vector(); _min = (typename K::FT)(0); int main_dir = (::CGAL:: abs(_dir.x()) > ::CGAL:: abs(_dir.y()) ) ? 0 : 1; typename K::Construct_cartesian_const_iterator_2 construct_cccit; typename K::Cartesian_const_iterator_2 seg_target_it = construct_cccit(seg->target()) + main_dir; typename K::Cartesian_const_iterator_2 ref_point_it = construct_cccit(_ref_point) + main_dir; _max = (*seg_target_it - *ref_point_it) / _dir.cartesian(main_dir); } template typename Segment_2_Iso_rectangle_2_pair::Intersection_results Segment_2_Iso_rectangle_2_pair::intersection_type() const { typedef typename K::RT RT; typedef typename K::FT FT; if (_known) return _result; _known = true; typename K::Construct_cartesian_const_iterator_2 construct_cccit; typename K::Cartesian_const_iterator_2 ref_point_it = construct_cccit(_ref_point); typename K::Cartesian_const_iterator_2 end = construct_cccit(_ref_point, 0); typename K::Cartesian_const_iterator_2 isomin_it = construct_cccit(_isomin); typename K::Cartesian_const_iterator_2 isomax_it = construct_cccit(_isomax); for (unsigned int i=0; ref_point_it != end; ++i, ++ref_point_it, ++isomin_it, ++isomax_it) { if (_dir.homogeneous(i) == RT(0)) { if ( *(ref_point_it) < *(isomin_it) ) { _result = NO_INTERSECTION; return _result; } if ( *(ref_point_it) > *(isomax_it)) { _result = NO_INTERSECTION; return _result; } } else { FT newmin, newmax; if (_dir.homogeneous(i) > RT(0)) { newmin = ( *(isomin_it) - (*ref_point_it)) / _dir.cartesian(i); newmax = ( *(isomax_it) - (*ref_point_it)) / _dir.cartesian(i); } else { newmin = ( (*isomax_it) - (*ref_point_it)) / _dir.cartesian(i); newmax = ( (*isomin_it) - (*ref_point_it)) / _dir.cartesian(i); } if (newmin > _min) _min = newmin; if (newmax < _max) _max = newmax; if (_max < _min) { _result = NO_INTERSECTION; return _result; } } } if (_max == _min) { _result = POINT; return _result; } _result = SEGMENT; return _result; } template typename K::Segment_2 Segment_2_Iso_rectangle_2_pair:: intersection_segment() const { typedef typename K::Segment_2 Segment_2; typename K::Construct_translated_point_2 translated_point; typename K::Construct_scaled_vector_2 construct_scaled_vector; if (!_known) intersection_type(); (CGAL::possibly(_result == SEGMENT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == SEGMENT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h", 196)); typename K::Point_2 p1(translated_point(_ref_point, construct_scaled_vector(_dir,_min))); typename K::Point_2 p2(translated_point(_ref_point, construct_scaled_vector(_dir,_max))); return Segment_2(p1, p2); } template typename K::Point_2 Segment_2_Iso_rectangle_2_pair:: intersection_point() const { typename K::Construct_translated_point_2 translated_point; typename K::Construct_scaled_vector_2 construct_scaled_vector; if (!_known) intersection_type(); (CGAL::possibly(_result == POINT)?(static_cast(0)): ::CGAL::assertion_fail( "_result == POINT" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h", 211)); return translated_point(_ref_point, construct_scaled_vector(_dir,_min)); } template inline bool do_intersect( const typename K::Iso_rectangle_2 &p1, const typename K::Segment_2 &p2, const K&) { typedef Segment_2_Iso_rectangle_2_pair pair_t; pair_t pair(&p2, &p1); return pair.intersection_type() != pair_t::NO_INTERSECTION; } } template inline bool do_intersect(const Iso_rectangle_2 & iso, const Segment_2 &seg) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(seg, iso); } template inline bool do_intersect(const Segment_2 &seg, const Iso_rectangle_2 &iso) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(seg, iso); } template inline Object intersection( const Iso_rectangle_2 &iso, const Segment_2 &seg) { typedef typename K::Intersect_2 Intersect; return Intersect()(seg, iso); } template inline Object intersection(const Segment_2 &seg, const Iso_rectangle_2 &iso) { typedef typename K::Intersect_2 Intersect; return Intersect()(seg, iso); } } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Iso_rectangle_2_intersection.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Point_2_Iso_rectangle_2_intersection.h" namespace CGAL { namespace internal { template inline bool do_intersect(const typename K::Point_2 &pt, const typename K::Iso_rectangle_2 &iso, const K&) { return !iso.has_on_unbounded_side(pt); } template inline bool do_intersect(const typename K::Iso_rectangle_2 &iso, const typename K::Point_2 &pt, const K&) { return !iso.has_on_unbounded_side(pt); } template Object intersection(const typename K::Point_2 &pt, const typename K::Iso_rectangle_2 &iso, const K& k) { if (internal::do_intersect(pt,iso,k)) { return make_object(pt); } return Object(); } template Object intersection(const typename K::Iso_rectangle_2 &iso, const typename K::Point_2 &pt, const K& k) { if (internal::do_intersect(pt,iso,k)) { return make_object(pt); } return Object(); } } template inline bool do_intersect(const Iso_rectangle_2 &iso, const Point_2 &pt) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, iso); } template inline bool do_intersect(const Point_2 &pt, const Iso_rectangle_2 &iso) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(pt, iso); } template inline Object intersection(const Iso_rectangle_2 &iso, const Point_2 &pt) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, iso); } template inline Object intersection(const Point_2 &pt, const Iso_rectangle_2 &iso) { typedef typename K::Intersect_2 Intersect; return Intersect()(pt, iso); } } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_rectangle_2_Iso_rectangle_2_intersection.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iso_rectangle_2_Iso_rectangle_2_intersection.h" namespace CGAL { namespace internal { template Object intersection( const typename K::Iso_rectangle_2 &irect1, const typename K::Iso_rectangle_2 &irect2, const K&) { typedef typename K::FT FT; Rational_traits rt; typename K::Construct_point_2 construct_point_2; typename K::Construct_object_2 construct_object; typename K::Construct_iso_rectangle_2 construct_iso_rectangle_2; const typename K::Point_2 &min1 = (irect1.min)(); const typename K::Point_2 &min2 = (irect2.min)(); const typename K::Point_2 &max1 = (irect1.max)(); const typename K::Point_2 &max2 = (irect2.max)(); typename K::FT minx, miny, maxx, maxy; typename K::Point_2 newmin; typename K::Point_2 newmax; minx = (min1.x() >= min2.x()) ? min1.x() : min2.x(); maxx = (max1.x() <= max2.x()) ? max1.x() : max2.x(); if (maxx < minx) return Object(); miny = (min1.y() >= min2.y()) ? min1.y() : min2.y(); maxy = (max1.y() <= max2.y()) ? max1.y() : max2.y(); if (maxy < miny) return Object(); if (rt.denominator(minx) == rt.denominator(miny)) { newmin = construct_point_2(rt.numerator(minx), rt.numerator(miny), rt.denominator(minx)); } else { newmin = construct_point_2(rt.numerator(minx) * rt.denominator(miny), rt.numerator(miny) * rt.denominator(minx), rt.denominator(minx) * rt.denominator(miny)); } if (rt.denominator(maxx) == rt.denominator(maxy)) { newmax = construct_point_2(rt.numerator(maxx), rt.numerator(maxy), rt.denominator(maxx)); } else { newmax = construct_point_2(rt.numerator(maxx) * rt.denominator(maxy), rt.numerator(maxy) * rt.denominator(maxx), rt.denominator(maxx) * rt.denominator(maxy)); } return construct_object(construct_iso_rectangle_2(newmin, newmax)); } } template inline Object intersection(const Iso_rectangle_2 &irect1, const Iso_rectangle_2 &irect2) { typedef typename K::Intersect_2 Intersect; return Intersect()(irect1, irect2); } template inline bool do_intersect(const Iso_rectangle_2 &irect1, const Iso_rectangle_2 &irect2) { return ! intersection(irect1, irect2).is_empty(); } } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_2.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_3.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_2_Circle_2_intersection.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_2_Circle_2_intersection.h" namespace CGAL { namespace internal { template bool do_intersect(const typename K::Circle_2 & circ1, const typename K::Circle_2& circ2, const K&) { typedef typename K::FT FT; FT sr1 = circ1.squared_radius(); FT sr2 = circ2.squared_radius(); FT squared_dist = squared_distance(circ1.center(), circ2.center()); FT temp = sr1+sr2-squared_dist; return !(FT(4)*sr1*sr2 < temp*temp); } } template inline bool do_intersect(const Circle_2 & circ1, const Circle_2 & circ2) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(circ1, circ2); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_2_Line_2_intersection.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circle_2_Line_2_intersection.h" namespace CGAL { namespace internal { template bool do_intersect(const typename K::Circle_2 & c, const typename K::Line_2& l, const K&) { return squared_distance(c.center(), l) <= c.squared_radius(); } template bool do_intersect(const typename K::Line_2& l, const typename K::Circle_2 & c, const K&) { return squared_distance(c.center(), l) <= c.squared_radius(); } } template inline bool do_intersect(const Circle_2 & c, const Line_2 & l) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(c, l); } template inline bool do_intersect(const Line_2 & l, const Circle_2 & c) { typedef typename K::Do_intersect_2 Do_intersect; return Do_intersect()(c, l); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2_3.h" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_2.h" 2 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3_1.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3_1.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/bbox_intersection_3.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/bbox_intersection_3.h" namespace CGAL { template Object intersection_bl(const Bbox_3 &box, double lpx, double lpy, double lpz, double ldx, double ldy, double ldz, bool min_infinite, bool max_infinite) { double seg_min = 0.0, seg_max = 1.0; if (ldx == 0.0) { if (lpx < box.xmin()) return Object(); if (lpx > box.xmax()) return Object(); } else { double newmin, newmax; if (ldx > 0.0) { newmin = (box.xmin()-lpx)/ldx; newmax = (box.xmax()-lpx)/ldx; } else { newmin = (box.xmax()-lpx)/ldx; newmax = (box.xmin()-lpx)/ldx; } if (min_infinite) { min_infinite = false; seg_min = newmin; } else { if (newmin > seg_min) seg_min = newmin; } if (max_infinite) { max_infinite = false; seg_max = newmax; } else { if (newmax < seg_max) seg_max = newmax; } if (seg_max < seg_min) return Object(); } if (ldy == 0.0) { if (lpy < box.ymin()) return Object(); if (lpy > box.ymax()) return Object(); } else { double newmin, newmax; if (ldy > 0.0) { newmin = (box.ymin()-lpy)/ldy; newmax = (box.ymax()-lpy)/ldy; } else { newmin = (box.ymax()-lpy)/ldy; newmax = (box.ymin()-lpy)/ldy; } if (min_infinite) { min_infinite = false; seg_min = newmin; } else { if (newmin > seg_min) seg_min = newmin; } if (max_infinite) { max_infinite = false; seg_max = newmax; } else { if (newmax < seg_max) seg_max = newmax; } if (seg_max < seg_min) return Object(); } if (ldz == 0.0) { if (lpz < box.zmin()) return Object(); if (lpz > box.zmax()) return Object(); } else { double newmin, newmax; if (ldz > 0.0) { newmin = (box.zmin()-lpz)/ldz; newmax = (box.zmax()-lpz)/ldz; } else { newmin = (box.zmax()-lpz)/ldz; newmax = (box.zmin()-lpz)/ldz; } if (min_infinite) { min_infinite = false; seg_min = newmin; } else { if (newmin > seg_min) seg_min = newmin; } if (max_infinite) { max_infinite = false; seg_max = newmax; } else { if (newmax < seg_max) seg_max = newmax; } if (seg_max < seg_min) return Object(); } if (min_infinite || max_infinite) { seg_max = 0.0; (CGAL::possibly(true)?(static_cast(0)): ::CGAL::assertion_fail( "true" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/bbox_intersection_3.h" # 144 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/bbox_intersection_3.h" , 145 # 144 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/bbox_intersection_3.h" , "Zero direction vector of line detected.")) ; } typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Segment_3 Segment_3; Point_3 ref_point = Point_3( FT(lpx), FT(lpy), FT(lpz)); Vector_3 dir = Vector_3( FT(ldx), FT(ldy), FT(ldz)); if (seg_max == seg_min) return make_object(ref_point + dir * FT(seg_max)); return make_object( Segment_3(ref_point + dir*FT(seg_min), ref_point + dir*FT(seg_max))); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3_1.h" 2 namespace CGAL { template Object intersection(const Plane_3 &plane1, const Plane_3&plane2); template inline bool do_intersect(const Plane_3 &plane1, const Plane_3&plane2) { return ! intersection(plane1, plane2).is_empty(); } template Object intersection(const Plane_3 &plane1, const Plane_3&plane2, const Plane_3&plane3); template inline bool do_intersect(const Plane_3 &plane1, const Plane_3&plane2, const Plane_3&plane3) { return ! intersection(plane1, plane2, plane3).is_empty(); } template Object intersection(const Plane_3 &plane, const Line_3&line); template inline Object intersection(const Line_3&line, const Plane_3 &plane) { return intersection(plane,line); } template bool do_intersect(const Plane_3 &p2, const Line_3 &p1); template inline bool do_intersect(const Line_3 &p1, const Plane_3 &p2) { return do_intersect(p2,p1); } template Object intersection(const Plane_3 &plane, const Ray_3&ray); template inline Object intersection(const Ray_3&ray, const Plane_3 &plane) { return intersection(plane,ray); } template bool do_intersect(const Plane_3 &p1, const Ray_3 &p2); template inline bool do_intersect( const Ray_3 &p1, const Plane_3 &p2) { return do_intersect(p2,p1); } template Object intersection(const Plane_3 &plane, const Segment_3&seg); template inline Object intersection(const Segment_3&seg, const Plane_3 &plane) { return intersection(plane,seg); } template bool do_intersect(const Plane_3 &p1, const Segment_3 &p2); template inline bool do_intersect(const Segment_3 &p1, const Plane_3 &p2) { return do_intersect(p2,p1); } template Object intersection(const Plane_3 &plane, const Triangle_3&tri); template inline Object intersection(const Triangle_3&tri, const Plane_3 &plane) { return intersection(plane,tri); } template Object intersection(const Line_3 &line, const Bbox_3 &box) ; template inline Object intersection(const Bbox_3 &box, const Line_3 &line) { return intersection(line, box); } template Object intersection(const Ray_3 &ray, const Bbox_3 &box) ; template inline Object intersection(const Bbox_3 &box, const Ray_3 &ray) { return intersection(ray, box); } template Object intersection(const Segment_3 &seg, const Bbox_3 &box) ; template inline Object intersection(const Bbox_3 &box, const Segment_3 &seg) { return intersection(seg, box); } template Object intersection(const Line_3 &line, const Iso_cuboid_3 &box) ; template inline Object intersection(const Iso_cuboid_3 &box, const Line_3 &line) { return intersection(line, box); } template Object intersection(const Ray_3 &ray, const Iso_cuboid_3 &box) ; template inline Object intersection(const Iso_cuboid_3 &box, const Ray_3 &ray) { return intersection(ray, box); } template Object intersection(const Segment_3 &seg, const Iso_cuboid_3 &box) ; template inline Object intersection(const Iso_cuboid_3 &box, const Segment_3 &seg) { return intersection(seg, box); } template Object intersection(const Iso_cuboid_3 &box1, const Iso_cuboid_3 &box2) ; template Object intersection(const Line_3 &l1, const Line_3 &l2); template Object intersection(const Segment_3 &, const Segment_3 &); template Object intersection(const Line_3 &, const Segment_3 &); template Object intersection(const Segment_3 &s, const Line_3 &l) {return intersection(l,s);} template Object intersection(const Line_3 &, const Ray_3 &); template Object intersection(const Ray_3 &r, const Line_3 &l) {return intersection(l,r);} template Object intersection(const Ray_3 &, const Segment_3 &); template Object intersection(const Segment_3 &s, const Ray_3 &r) {return intersection(r,s);} template Object intersection(const Ray_3 &, const Ray_3 &); template Object intersection(const Sphere_3 &s1, const Sphere_3 &s2); template Object intersection(const Plane_3 &p, const Sphere_3 &s); template inline Object intersection(const Sphere_3 &s, const Plane_3 &p) { return intersection(p, s); } template bool do_intersect(const Line_3 &l1, const Line_3 &l2); template bool do_intersect(const Segment_3 &, const Segment_3 &); template bool do_intersect(const Line_3 &, const Segment_3 &); template bool do_intersect(const Segment_3 &s, const Line_3 &l) {return do_intersect(l,s);} template bool do_intersect(const Line_3 &, const Ray_3 &); template bool do_intersect(const Ray_3 &r, const Line_3 &l) {return do_intersect(l,r);} template bool do_intersect(const Ray_3 &, const Segment_3 &); template bool do_intersect(const Segment_3 &s, const Ray_3 &r) {return do_intersect(r,s);} template bool do_intersect(const Ray_3 &r1, const Ray_3 &r2); template bool do_intersect(const Sphere_3 &s1, const Sphere_3 &s2); template bool do_intersect(const Plane_3 &p, const Sphere_3 &s); template inline bool do_intersect(const Sphere_3 &s, const Plane_3 &p) { return do_intersect(p, s); } template inline bool do_intersect(const Iso_cuboid_3 &i, const Iso_cuboid_3 &j) { return ! CGAL::intersection(i, j).empty(); } template inline bool do_intersect(const Line_3 &l, const Iso_cuboid_3 &j) { return ! CGAL::intersection(l, j).empty(); } template inline bool do_intersect(const Iso_cuboid_3 &j, const Line_3 &l) { return ! CGAL::intersection(l, j).empty(); } template inline bool do_intersect(const Ray_3 &r, const Iso_cuboid_3 &j) { return ! CGAL::intersection(r, j).empty(); } template inline bool do_intersect(const Iso_cuboid_3 &j, const Ray_3 &r) { return ! CGAL::intersection(r, j).empty(); } template inline bool do_intersect(const Segment_3 &s, const Iso_cuboid_3 &j) { return ! CGAL::intersection(s, j).empty(); } template inline bool do_intersect(const Iso_cuboid_3 &j, const Segment_3 &s) { return ! CGAL::intersection(s, j).empty(); } } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h" # 1 "/localhome/glisse2/include/boost/next_prior.hpp" 1 # 17 "/localhome/glisse2/include/boost/next_prior.hpp" namespace boost { # 29 "/localhome/glisse2/include/boost/next_prior.hpp" template inline T next(T x) { return ++x; } template inline T next(T x, Distance n) { std::advance(x, n); return x; } template inline T prior(T x) { return --x; } template inline T prior(T x, Distance n) { std::advance(x, -n); return x; } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h" 2 namespace CGAL { namespace internal { template Object intersection(const typename K::Plane_3 &plane, const typename K::Line_3 &line, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; typedef typename K::RT RT; const Point_3 &line_pt = line.point(); const Direction_3 &line_dir = line.direction(); RT num = plane.a()*line_pt.hx() + plane.b()*line_pt.hy() + plane.c()*line_pt.hz() + wmult_hw((K*)0, plane.d(), line_pt); RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy() + plane.c()*line_dir.dz(); if (den == 0) { if (num == 0) { return make_object(line); } else { return Object(); } } return make_object(Point_3( den*line_pt.hx()-num*line_dir.dx(), den*line_pt.hy()-num*line_dir.dy(), den*line_pt.hz()-num*line_dir.dz(), wmult_hw((K*)0, den, line_pt))); } template inline Object intersection(const typename K::Line_3 &line, const typename K::Plane_3 &plane, const K& k) { return intersection(plane, line, k); } template Object intersection(const typename K::Plane_3 &plane1, const typename K::Plane_3 &plane2, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; typedef typename K::Line_3 Line_3; typedef typename K::RT RT; const RT &a = plane1.a(); const RT &b = plane1.b(); const RT &c = plane1.c(); const RT &d = plane1.d(); const RT &p = plane2.a(); const RT &q = plane2.b(); const RT &r = plane2.c(); const RT &s = plane2.d(); RT det = a*q-p*b; if (det != 0) { Point_3 is_pt = Point_3(b*s-d*q, p*d-a*s, 0, det); Direction_3 is_dir = Direction_3(b*r-c*q, p*c-a*r, det); return make_object(Line_3(is_pt, is_dir)); } det = a*r-p*c; if (det != 0) { Point_3 is_pt = Point_3(c*s-d*r, 0, p*d-a*s, det); Direction_3 is_dir = Direction_3(c*q-b*r, det, p*b-a*q); return make_object(Line_3(is_pt, is_dir)); } det = b*r-c*q; if (det != 0) { Point_3 is_pt = Point_3(0, c*s-d*r, d*q-b*s, det); Direction_3 is_dir = Direction_3(det, c*p-a*r, a*q-b*p); return make_object(Line_3(is_pt, is_dir)); } if (a!=0 || p!=0) { if (a*s == p*d) return make_object(plane1); else return Object(); } if (b!=0 || q!=0) { if (b*s == q*d) return make_object(plane1); else return Object(); } if (c!=0 || r!=0) { if (c*s == r*d) return make_object(plane1); else return Object(); } return make_object(plane1); } template Object intersection(const typename K::Plane_3 &plane1, const typename K::Plane_3 &plane2, const typename K::Plane_3 &plane3, const K& k) { typedef typename K::Line_3 Line_3; typedef typename K::Plane_3 Plane_3; Object o12 = internal::intersection(plane1, plane2, k); if (const Line_3 *l = object_cast(&o12)) return internal::intersection(plane3, *l, k); if (const Plane_3 *pl = object_cast(&o12)) return internal::intersection(plane3, *pl, k); return Object(); } template bool do_intersect(const typename K::Plane_3 &plane, const typename K::Line_3 &line, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; typedef typename K::RT RT; const Point_3 &line_pt = line.point(); const Direction_3 &line_dir = line.direction(); RT den = plane.a()*line_dir.dx() + plane.b()*line_dir.dy() + plane.c()*line_dir.dz(); if (den != 0) return true; RT num = plane.a()*line_pt.hx() + plane.b()*line_pt.hy() + plane.c()*line_pt.hz() + wmult_hw((K*)0, plane.d(), line_pt); if (num == 0) { return true; } else { return false; } } template inline bool do_intersect(const typename K::Line_3 &line, const typename K::Plane_3 &plane, const K& k) { return do_intersect(plane, line, k); } template Object intersection(const typename K::Line_3 &l1, const typename K::Line_3 &l2, const K&) { typedef typename K::FT FT; typedef typename K::Line_3 Line_3; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; if(K().has_on_3_object()(l1, l2.point())) { const Vector_3& v1 = l1.to_vector(); const Vector_3& v2 = l2.to_vector(); if((v1.x() * v2.y() == v1.y() * v2.x()) && (v1.x() * v2.z() == v1.z() * v2.x()) && (v1.y() * v2.z() == v1.z() * v2.y())) return make_object(l1); } if(K().are_parallel_3_object()(l1,l2)) return Object(); const Point_3 &p1 = l1.point(); const Point_3 &p3 = l2.point(); const Vector_3 &v1 = l1.to_vector(); const Vector_3 &v2 = l2.to_vector(); const Point_3 p2 = p1 + v1; const Point_3 p4 = p2 + v2; if(!K().coplanar_3_object()(p1,p2,p3,p4)) return Object(); const Vector_3 v3 = p3 - p1; const Vector_3 v3v2 = cross_product(v3,v2); const Vector_3 v1v2 = cross_product(v1,v2); const FT t = ((v3v2.x()*v1v2.x()) + (v3v2.y()*v1v2.y()) + (v3v2.z()*v1v2.z())) / (v1v2.squared_length()); return make_object(p1 + (v1 * t)); } template bool do_intersect(const typename K::Line_3 &l1, const typename K::Line_3 &l2, const K&) { typedef typename K::FT FT; typedef typename K::Line_3 Line_3; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; if(K().has_on_3_object()(l1, l2.point())) return true; if(K().are_parallel_3_object()(l1,l2)) return false; const Point_3 &p1 = l1.point(); const Point_3 &p3 = l2.point(); const Vector_3 &v1 = l1.to_vector(); const Vector_3 &v2 = l2.to_vector(); const Point_3 p2 = p1 + v1; const Point_3 p4 = p2 + v2; return K().coplanar_3_object()(p1,p2,p3,p4); } template Object intersection_collinear_segments(const typename K::Segment_3 &s1, const typename K::Segment_3 &s2, const K& k) { (CGAL::possibly(! s1.is_degenerate () && ! s2.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! s1.is_degenerate () && ! s2.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 262)); const typename K::Point_3& p=s1[0],q=s1[1],r=s2[0],s=s2[1]; typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object(); if ( cln_order(p,r,q) ){ if ( cln_order(p,s,q) ) return make_object(s2); if ( cln_order(r,p,s) ){ if (r!=p) return make_object( typename K::Segment_3(r,p) ); if ( cln_order(r,q,s) ) return make_object(s1); return make_object(p); } return r!=q ? make_object( typename K::Segment_3(r,q) ) : make_object(q); } if ( cln_order(p,s,q) ){ if ( cln_order(r,p,s) ){ if (s!=p) return make_object( typename K::Segment_3(s,p) ); if (cln_order(r,q,s)) return make_object(s1); return make_object(p); } return s!=q ? make_object( typename K::Segment_3(s,q) ) : make_object(q); } if ( cln_order(r,p,s) ) return make_object(s1); return Object(); } template Object intersection(const typename K::Segment_3 &s1, const typename K::Segment_3 &s2, const K& k) { (CGAL::possibly(! s1.is_degenerate () && ! s2.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! s1.is_degenerate () && ! s2.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 297)); Object res = intersection(s1.supporting_line(),s2.supporting_line()); const typename K::Point_3* p=object_cast (&res); if (p!=__null){ typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object(); if ( cln_order(s1[0],*p,s1[1]) && cln_order(s2[0],*p,s2[1]) ) return res; } else{ const typename K::Line_3* l=object_cast (&res); if (l!=__null) return intersection_collinear_segments(s1,s2,k); } return Object(); } template inline bool do_intersect(const typename K::Segment_3 &s1, const typename K::Segment_3 &s2, const K & k) { (CGAL::possibly(! s1.is_degenerate () && ! s2.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! s1.is_degenerate () && ! s2.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 320)); bool b=do_intersect(s1.supporting_line(),s2.supporting_line(),k); if (b) { typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object(); ::CGAL::Orientation or1 = cpl_orient(s1[0],s1[1],s2[0]); ::CGAL::Orientation or2 = cpl_orient(s1[0],s1[1],s2[1]); if ( or1 == COLLINEAR && or2 ==COLLINEAR ) { typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object(); return cln_order(s1[0],s2[0],s1[1]) || cln_order(s1[0],s2[1],s1[1]) || cln_order(s2[0],s1[0],s2[1]) ; } if ( or1 != or2 ){ or1=cpl_orient(s2[0],s2[1],s1[0]); return (or1 == COLLINEAR || or1 != cpl_orient(s2[0],s2[1],s1[1])); } } return false; } template Object intersection(const typename K::Line_3 &l, const typename K::Segment_3 &s, const K& k) { (CGAL::possibly(! l.is_degenerate () && ! s.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! l.is_degenerate () && ! s.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 352)); Object res = intersection(l,s.supporting_line()); const typename K::Point_3* p=object_cast (&res); if (p!=__null){ typename K::Collinear_are_ordered_along_line_3 cln_order=k.collinear_are_ordered_along_line_3_object(); if ( cln_order(s[0],*p,s[1]) ) return res; } else{ const typename K::Line_3* l2=object_cast (&res); if (l2!=__null) return make_object(s); } return Object(); } template Object intersection(const typename K::Segment_3 &s, const typename K::Line_3 &l, const K& k) { return intersection(l,s,k); } template inline bool do_intersect(const typename K::Line_3 &l, const typename K::Segment_3 &s, const K & k) { (CGAL::possibly(! l.is_degenerate () && ! s.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! l.is_degenerate () && ! s.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 381)); bool b=do_intersect(l,s.supporting_line(),k); if (b) { typename K::Coplanar_orientation_3 cpl_orient=k.coplanar_orientation_3_object(); typename K::Point_3 p1=l.point(0); typename K::Point_3 p2=l.point(1); ::CGAL::Orientation or1 = cpl_orient(p1,p2,s[0]); if ( or1 == COLLINEAR ) return true; ::CGAL::Orientation or2 = cpl_orient(p1,p2,s[1]); return or1!=or2; } return false; } template inline bool do_intersect(const typename K::Segment_3 &s, const typename K::Line_3 &l, const K & k) { return do_intersect(l,s,k); } template bool Ray_3_has_on_collinear_Point_3( const typename K::Ray_3 &r, const typename K::Point_3 &p, const K& k) { return k.equal_3_object()(r.source(),p) || k.equal_3_object() ( k.construct_direction_3_object()( k.construct_vector_3_object() (r.source(),p) ), r.direction() ); } template Object intersection(const typename K::Line_3 &l, const typename K::Ray_3 &r, const K& k) { (CGAL::possibly(! l.is_degenerate () && ! r.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! l.is_degenerate () && ! r.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 431)); Object res = intersection(l,r.supporting_line()); const typename K::Point_3* p=object_cast (&res); if (p!=__null){ if( Ray_3_has_on_collinear_Point_3(r,*p,k) ) return res; } else{ const typename K::Line_3* l2=object_cast (&res); if (l2!=__null) return make_object(r); } return Object(); } template Object intersection(const typename K::Ray_3 &r, const typename K::Line_3 &l, const K& k) { return intersection(l,r,k); } template inline bool do_intersect(const typename K::Line_3 &l, const typename K::Ray_3 &r, const K & k) { (CGAL::possibly(! l.is_degenerate () && ! r.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! l.is_degenerate () && ! r.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 460)); if ( !do_intersect(l,r.supporting_line()) ) return false; typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object(); Orientation p0p1s=pred(l.point(0),l.point(1),r.source()); if ( p0p1s == COLLINEAR) return true; Orientation stp0 =pred(r.source(),r.second_point(),l.point(0)); if ( stp0 == COLLINEAR ) return Ray_3_has_on_collinear_Point_3(r,l.point(0),k); return p0p1s!=stp0; } template inline bool do_intersect(const typename K::Ray_3 &r, const typename K::Line_3 &l, const K & k) { return do_intersect(l,r,k); } template Object intersection(const typename K::Segment_3 &s, const typename K::Ray_3 &r, const K& k) { (CGAL::possibly(! s.is_degenerate () && ! r.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! s.is_degenerate () && ! r.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 487)); Object res = intersection(r.supporting_line(),s); const typename K::Point_3* p=object_cast (&res); if (p!=__null){ if( Ray_3_has_on_collinear_Point_3(r,*p,k) ) return res; } else{ const typename K::Segment_3* s2=object_cast (&res); if (s2!=__null){ bool has_source=Ray_3_has_on_collinear_Point_3(r,s.source(),k); bool has_target=Ray_3_has_on_collinear_Point_3(r,s.target(),k); if (has_source){ if (has_target) return res; else { if (k.equal_3_object() (r.source(),s.source())) return make_object(r.source()); else return make_object(k.construct_segment_3_object()(r.source(),s.source())); } } else{ if (has_target){ if (k.equal_3_object() (r.source(),s.target())) return make_object(r.source()); else return make_object(k.construct_segment_3_object()(r.source(),s.target())); } } } } return Object(); } template Object intersection(const typename K::Ray_3 &r, const typename K::Segment_3 &s, const K& k) { return intersection(s,r,k); } template inline bool do_intersect(const typename K::Segment_3 &s, const typename K::Ray_3 &r, const K & k) { (CGAL::possibly(! s.is_degenerate () && ! r.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! s.is_degenerate () && ! r.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 538)); if ( !do_intersect(s,r.supporting_line()) ) return false; typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object(); Orientation p0p1s=pred(s.point(0),s.point(1),r.source()); Orientation stp0 =pred(r.source(),r.second_point(),s.point(0)); if ( p0p1s == COLLINEAR) { if ( stp0 == COLLINEAR ) return Ray_3_has_on_collinear_Point_3(r,s.point(0),k) || Ray_3_has_on_collinear_Point_3(r,s.point(1),k); else return true; } if ( stp0 == COLLINEAR ) return Ray_3_has_on_collinear_Point_3(r,s.point(0),k); return p0p1s!=stp0; } template inline bool do_intersect(const typename K::Ray_3 &r, const typename K::Segment_3 &s, const K & k) { return do_intersect(s,r,k); } template Object intersection(const typename K::Ray_3 &r1, const typename K::Ray_3 &r2, const K& k) { (CGAL::possibly(! r1.is_degenerate () && ! r2.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! r1.is_degenerate () && ! r2.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 571)); Object res = intersection(r1.supporting_line(),r2); const typename K::Point_3* p=object_cast (&res); if (p!=__null){ if ( Ray_3_has_on_collinear_Point_3(r1,*p,k) ) return res; } else{ const typename K::Ray_3* r=object_cast (&res); if (r!=__null){ bool r1_has_s2=Ray_3_has_on_collinear_Point_3(r1,r2.source(),k); bool r2_has_s1=Ray_3_has_on_collinear_Point_3(r2,r1.source(),k); if (r1_has_s2){ if (r2_has_s1) { if (k.equal_3_object()(r1.source(),r2.source())) return make_object(r1.source()); else return make_object(k.construct_segment_3_object()(r1.source(),r2.source())); } else return res; } else{ if (r2_has_s1) return make_object(r1); } } } return Object(); } template inline bool do_intersect(const typename K::Ray_3 &r1, const typename K::Ray_3 &r2, const K & k) { (CGAL::possibly(! r1.is_degenerate () && ! r2.is_degenerate ())?(static_cast(0)): ::CGAL::precondition_fail( "! r1.is_degenerate () && ! r2.is_degenerate ()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 609)); if ( !do_intersect(r1,r2.supporting_line()) ) return false; typename K::Coplanar_orientation_3 pred=k.coplanar_orientation_3_object(); Orientation p0p1s=pred(r1.point(0),r1.point(1),r2.source()); Orientation stp0 =pred(r2.source(),r2.second_point(),r1.point(0)); if ( p0p1s == COLLINEAR){ if(stp0 == COLLINEAR ) return Ray_3_has_on_collinear_Point_3(r2,r1.source(),k) || Ray_3_has_on_collinear_Point_3(r1,r2.source(),k); else return true; } if(stp0 == COLLINEAR ) return Ray_3_has_on_collinear_Point_3(r2,r1.point(0),k); return p0p1s!=stp0; } template Object intersection(const typename K::Plane_3 &p, const typename K::Sphere_3 &s, const K&) { typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Point_3 Point_3; typedef typename K::FT FT; const FT d2 = CGAL::square(p.a()*s.center().x() + p.b()*s.center().y() + p.c()*s.center().z() + p.d()) / (square(p.a()) + square(p.b()) + square(p.c())); const FT cmp = d2 - s.squared_radius(); if(::CGAL:: is_zero(cmp)) { return make_object(p.projection(s.center())); } else if(::CGAL:: is_negative(cmp)) { Point_3 center = p.projection(s.center()); return make_object(Circle_3(center,s.squared_radius() - d2,p)); } return Object(); } template inline bool do_intersect(const typename K::Plane_3 &p, const typename K::Sphere_3 &s, const K&) { typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Point_3 Point_3; typedef typename K::FT FT; const FT d2 = CGAL::square(p.a()*s.center().x() + p.b()*s.center().y() + p.c()*s.center().z() + p.d()) / (square(p.a()) + square(p.b()) + square(p.c())); return d2 <= s.squared_radius(); } template inline bool do_intersect(const typename K::Sphere_3 &s, const typename K::Plane_3 &p, const K& k) { return do_intersect(p,s); } template inline Object intersection(const typename K::Sphere_3 &s, const typename K::Plane_3 &p, const K& k) { return intersection(p, s, k); } template inline Object intersection(const typename K::Sphere_3 &s1, const typename K::Sphere_3 &s2, const K& k) { typedef typename K::Plane_3 Plane_3; typedef typename K::Sphere_3 Sphere_3; if(s1.center() == s2.center()) { if(s1.squared_radius() == s2.squared_radius()) { if(is_zero(s1.squared_radius())) return make_object(s1.center()); else return make_object(s1); } else return Object(); } Plane_3 p = K().construct_radical_plane_3_object()(s1,s2); return intersection(p, s1, k); } template inline bool do_intersect(const typename K::Sphere_3 &s1, const typename K::Sphere_3 &s2, const K& k) { typedef typename K::Plane_3 Plane_3; typedef typename K::Sphere_3 Sphere_3; if(s1.center() == s2.center()) { return s1.squared_radius() == s2.squared_radius(); } Plane_3 p = K().construct_radical_plane_3_object()(s1,s2); return do_intersect(p, s1, k); } template Object intersection(const typename K::Plane_3 &plane, const typename K::Ray_3 &ray, const K& k) { typedef typename K::Point_3 Point_3; const Object line_intersection = intersection(plane, ray.supporting_line(), k); if (const Point_3 *isp = object_cast(&line_intersection)) { if (ray.collinear_has_on(*isp)) return line_intersection; else return Object(); } if (line_intersection.is_empty()) return line_intersection; return make_object(ray); } template inline Object intersection(const typename K::Ray_3 &ray, const typename K::Plane_3 &plane, const K& k) { return intersection(plane, ray, k); } template bool do_intersect(const typename K::Plane_3 &plane, const typename K::Ray_3 &ray, const K& k) { typedef typename K::Point_3 Point_3; const Object line_intersection = intersection(plane, ray.supporting_line(), k); if (line_intersection.is_empty()) return false; if (const Point_3 *isp = object_cast(&line_intersection)) return ray.collinear_has_on(*isp); return true; } template inline bool do_intersect(const typename K::Ray_3 &ray, const typename K::Plane_3 &plane, const K& k) { return do_intersect(plane, ray, k); } template Object intersection(const typename K::Plane_3 &plane, const typename K::Segment_3 &seg, const K& k) { typedef typename K::Point_3 Point_3; const Point_3 &source = seg.source(); const Point_3 &target = seg.target(); Oriented_side source_side = plane.oriented_side(source); Oriented_side target_side = plane.oriented_side(target); switch (source_side) { case ON_ORIENTED_BOUNDARY: if (target_side == ON_ORIENTED_BOUNDARY) return make_object(seg); else return make_object(source); case ON_POSITIVE_SIDE: switch (target_side) { case ON_ORIENTED_BOUNDARY: return make_object(target); case ON_POSITIVE_SIDE: return Object(); case ON_NEGATIVE_SIDE: { Object obj = intersection(plane, seg.supporting_line(), k); if ( __null == object_cast(&obj) ) return obj; else return make_object(seg); } } case ON_NEGATIVE_SIDE: switch (target_side) { case ON_ORIENTED_BOUNDARY: return make_object(target); case ON_POSITIVE_SIDE: { Object obj = intersection(plane, seg.supporting_line(), k); if ( __null == object_cast(&obj) ) return obj; else return make_object(seg); } case ON_NEGATIVE_SIDE: return Object(); } } (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 842, "Supposedly unreachable code.")); return Object(); } template inline Object intersection(const typename K::Segment_3 &seg, const typename K::Plane_3 &plane, const K& k) { return intersection(plane, seg, k); } template bool do_intersect(const typename K::Plane_3 &plane, const typename K::Segment_3 &seg, const K&) { typedef typename K::Point_3 Point_3; const Point_3 &source = seg.source(); const Point_3 &target = seg.target(); Oriented_side source_side = plane.oriented_side(source); Oriented_side target_side = plane.oriented_side(target); if ( source_side == target_side && target_side != ON_ORIENTED_BOUNDARY) { return false; } return true; } template inline bool do_intersect(const typename K::Segment_3 &seg, const typename K::Plane_3 &plane, const K& k) { return do_intersect(plane, seg, k); } template inline Object intersection(const typename K::Plane_3 &plane, const typename K::Triangle_3 &tri, const K& k) { typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); Oriented_side or0=plane.oriented_side(vertex_on(tri,0)); Oriented_side or1=plane.oriented_side(vertex_on(tri,1)); Oriented_side or2=plane.oriented_side(vertex_on(tri,2)); if (or0==ON_ORIENTED_BOUNDARY){ if (or1==ON_ORIENTED_BOUNDARY){ if (or2==ON_ORIENTED_BOUNDARY) return make_object(tri); else return make_object(k.construct_segment_3_object()(tri.vertex(0),tri.vertex(1))); } else{ if (or2==ON_ORIENTED_BOUNDARY) return make_object(k.construct_segment_3_object()(tri.vertex(0),tri.vertex(2))); else{ if (or1==or2) return make_object(tri.vertex(0)); else{ Object obj = intersection(plane, k.construct_line_3_object()(tri.vertex(1),tri.vertex(2)), k); const typename K::Point_3* p=object_cast(&obj); (CGAL::possibly(p!=__null)?(static_cast(0)): ::CGAL::assertion_fail( "p!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 919)); return make_object(k.construct_segment_3_object()(*p,tri.vertex(0))); } } } } if (or1==ON_ORIENTED_BOUNDARY){ if (or2==ON_ORIENTED_BOUNDARY) return make_object(k.construct_segment_3_object()(tri.vertex(1),tri.vertex(2))); if (or2==or0) return make_object(tri.vertex(1)); else{ Object obj = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(2)), k); const typename K::Point_3* p=object_cast(&obj); (CGAL::possibly(p!=__null)?(static_cast(0)): ::CGAL::assertion_fail( "p!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 934)); return make_object(k.construct_segment_3_object()(*p,tri.vertex(1))); } } if (or2==ON_ORIENTED_BOUNDARY){ if (or1==or0) return make_object(tri.vertex(2)); else{ Object obj = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(1)), k); const typename K::Point_3* p=object_cast(&obj); (CGAL::possibly(p!=__null)?(static_cast(0)): ::CGAL::assertion_fail( "p!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 945)); return make_object(k.construct_segment_3_object()(*p,tri.vertex(2))); } } std::vector pts; pts.reserve(2); if (or0!=or1){ Object obj = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(1)), k); const typename K::Point_3* pt_ptr=object_cast(&obj); (CGAL::possibly(pt_ptr!=__null)?(static_cast(0)): ::CGAL::assertion_fail( "pt_ptr!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 956)); pts.push_back( *pt_ptr ); } if (or0!=or2){ Object obj = intersection(plane, k.construct_line_3_object()(tri.vertex(0),tri.vertex(2)), k); const typename K::Point_3* pt_ptr=object_cast(&obj); (CGAL::possibly(pt_ptr!=__null)?(static_cast(0)): ::CGAL::assertion_fail( "pt_ptr!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 962)); pts.push_back( *pt_ptr ); } if (or1!=or2){ Object obj = intersection(plane, k.construct_line_3_object()(tri.vertex(1),tri.vertex(2)), k); const typename K::Point_3* pt_ptr=object_cast(&obj); (CGAL::possibly(pt_ptr!=__null)?(static_cast(0)): ::CGAL::assertion_fail( "pt_ptr!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 968)); pts.push_back( *pt_ptr ); } if (pts.empty()) return CGAL::Object(); (CGAL::possibly(pts.size()==2)?(static_cast(0)): ::CGAL::assertion_fail( "pts.size()==2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 974)); return make_object( k.construct_segment_3_object()(*pts.begin(),*boost::prior(pts.end())) ); } template inline Object intersection(const typename K::Triangle_3 &triangle, const typename K::Plane_3 &plane, const K& k) { return intersection(plane, triangle, k); } template Object intersection(const typename K::Line_3 &line, const Bbox_3 &box, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; const Point_3 &linepoint = line.point(); const Direction_3 &linedir = line.direction(); return intersection_bl(box, CGAL::to_double(linepoint.x()), CGAL::to_double(linepoint.y()), CGAL::to_double(linepoint.z()), CGAL::to_double(linedir.dx()), CGAL::to_double(linedir.dy()), CGAL::to_double(linedir.dz()), true, true ); } template inline Object intersection(const Bbox_3 &box, const typename K::Line_3 &line, const K& k) { return intersection(line, box, k); } template Object intersection(const typename K::Ray_3 &ray, const Bbox_3 &box, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; const Point_3 &linepoint = ray.source(); const Direction_3 &linedir = ray.direction(); return intersection_bl(box, CGAL::to_double(linepoint.x()), CGAL::to_double(linepoint.y()), CGAL::to_double(linepoint.z()), CGAL::to_double(linedir.dx()), CGAL::to_double(linedir.dy()), CGAL::to_double(linedir.dz()), false, true ); } template inline Object intersection(const Bbox_3 &box, const typename K::Ray_3 &ray, const K& k) { return intersection(ray, box, k); } template Object intersection(const typename K::Segment_3 &seg, const Bbox_3 &box, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; const Point_3 &linepoint = seg.source(); const Vector_3 &diffvec = seg.target()-linepoint; return intersection_bl(box, CGAL::to_double(linepoint.x()), CGAL::to_double(linepoint.y()), CGAL::to_double(linepoint.z()), CGAL::to_double(diffvec.x()), CGAL::to_double(diffvec.y()), CGAL::to_double(diffvec.z()), false, false ); } template inline Object intersection(const Bbox_3 &box, const typename K::Segment_3 &seg, const K& k) { return intersection(seg, box, k); } template Object intersection(const typename K::Line_3 &line, const typename K::Iso_cuboid_3 &box, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Segment_3 Segment_3; typedef typename K::RT RT; typedef typename K::FT FT; bool all_values = true; FT _min = 0, _max = 0; Point_3 const & _ref_point=line.point(); Vector_3 const & _dir=line.direction().vector(); Point_3 const & _iso_min=(box.min)(); Point_3 const & _iso_max=(box.max)(); for (int i=0; i< _ref_point.dimension(); i++) { if (_dir.homogeneous(i) == 0) { if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) { return Object(); } if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) { return Object(); } } else { FT newmin, newmax; if (_dir.homogeneous(i) > 0) { newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); } else { newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); } if (all_values) { _min = newmin; _max = newmax; } else { if (newmin > _min) _min = newmin; if (newmax < _max) _max = newmax; if (_max < _min) { return Object(); } } all_values = false; } } (CGAL::possibly(!all_values)?(static_cast(0)): ::CGAL::assertion_fail( "!all_values" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 1142)); if (_max == _min) { return make_object(Point_3(_ref_point + _dir * _min )); } return make_object( Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max)); } template inline Object intersection(const typename K::Iso_cuboid_3 &box, const typename K::Line_3 &line, const K& k) { return intersection(line, box, k); } template Object intersection(const typename K::Ray_3 &ray, const typename K::Iso_cuboid_3 &box, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Segment_3 Segment_3; typedef typename K::RT RT; typedef typename K::FT FT; bool all_values = true; FT _min = 0, _max = 0; Point_3 const & _ref_point=ray.source(); Vector_3 const & _dir=ray.direction().vector(); Point_3 const & _iso_min=(box.min)(); Point_3 const & _iso_max=(box.max)(); for (int i=0; i< _ref_point.dimension(); i++) { if (_dir.homogeneous(i) == 0) { if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) { return Object(); } if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) { return Object(); } } else { FT newmin, newmax; if (_dir.homogeneous(i) > 0) { newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); } else { newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); } if (all_values) { _max = newmax; } else { if (newmax < _max) _max = newmax; } if (newmin > _min) _min = newmin; if (_max < _min) return Object(); all_values = false; } } (CGAL::possibly(!all_values)?(static_cast(0)): ::CGAL::assertion_fail( "!all_values" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Intersections_3/intersection_3_1_impl.h", 1215)); if (_max == _min) { return make_object(Point_3(_ref_point + _dir * _min )); } return make_object( Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max)); } template inline Object intersection(const typename K::Iso_cuboid_3 &box, const typename K::Ray_3 &ray, const K& k) { return intersection(ray, box, k); } template Object intersection(const typename K::Segment_3 &seg, const typename K::Iso_cuboid_3 &box, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Segment_3 Segment_3; typedef typename K::RT RT; typedef typename K::FT FT; FT _min = 0, _max; Point_3 const & _ref_point=seg.source(); Vector_3 const & _dir=seg.direction().vector(); Point_3 const & _iso_min=(box.min)(); Point_3 const & _iso_max=(box.max)(); int main_dir = (::CGAL:: abs(_dir.x()) > ::CGAL:: abs(_dir.y()) ) ? (::CGAL:: abs(_dir.x()) > ::CGAL:: abs(_dir.z()) ? 0 : 2) : (::CGAL:: abs(_dir.y()) > ::CGAL:: abs(_dir.z()) ? 1 : 2); _max = (seg.target().cartesian(main_dir)-_ref_point.cartesian(main_dir)) / _dir.cartesian(main_dir); for (int i=0; i< _ref_point.dimension(); i++) { if (_dir.homogeneous(i) == 0) { if (_ref_point.cartesian(i) < _iso_min.cartesian(i)) { return Object(); } if (_ref_point.cartesian(i) > _iso_max.cartesian(i)) { return Object(); } } else { FT newmin, newmax; if (_dir.homogeneous(i) > 0) { newmin = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); newmax = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); } else { newmin = (_iso_max.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); newmax = (_iso_min.cartesian(i) - _ref_point.cartesian(i)) / _dir.cartesian(i); } if (newmax < _max) _max = newmax; if (newmin > _min) _min = newmin; if (_max < _min) return Object(); } } if (_max == _min) { return make_object(Point_3(_ref_point + _dir * _min )); } return make_object( Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max)); } template inline Object intersection(const typename K::Iso_cuboid_3 &box, const typename K::Segment_3 &seg, const K& k) { return intersection(seg, box, k); } template Object intersection( const typename K::Iso_cuboid_3 &icub1, const typename K::Iso_cuboid_3 &icub2, const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; Point_3 min_points[2]; Point_3 max_points[2]; min_points[0] = (icub1.min)(); min_points[1] = (icub2.min)(); max_points[0] = (icub1.max)(); max_points[1] = (icub2.max)(); typedef typename K::FT FT; const int DIM = 3; int min_idx[DIM]; int max_idx[DIM]; Point_3 newmin; Point_3 newmax; for (int dim = 0; dim < DIM; ++dim) { min_idx[dim] = min_points[0].cartesian(dim) >= min_points[1].cartesian(dim) ? 0 : 1; max_idx[dim] = max_points[0].cartesian(dim) <= max_points[1].cartesian(dim) ? 0 : 1; if (min_idx[dim] != max_idx[dim] && max_points[max_idx[dim]].cartesian(dim) < min_points[min_idx[dim]].cartesian(dim)) return Object(); } if (min_idx[0] == min_idx[1] && min_idx[0] == min_idx[2]) { newmin = min_points[min_idx[0]]; } else { newmin = Point_3( min_idx[0] == 0 ? wmult_hw((K*)0, min_points[0].hx(), min_points[1]) : wmult_hw((K*)0, min_points[1].hx(), min_points[0]) , min_idx[1] == 0 ? wmult_hw((K*)0, min_points[0].hy(), min_points[1]) : wmult_hw((K*)0, min_points[1].hy(), min_points[0]) , min_idx[2] == 0 ? wmult_hw((K*)0, min_points[0].hz(), min_points[1]) : wmult_hw((K*)0, min_points[1].hz(), min_points[0]) , wmult_hw((K*)0, min_points[0].hw(), min_points[1]) ); } if (max_idx[0] == max_idx[1] && max_idx[0] == max_idx[2]) { newmax = max_points[max_idx[0]]; } else { newmax = Point_3( max_idx[0] == 0 ? wmult_hw((K*)0, max_points[0].hx(), max_points[1]) : wmult_hw((K*)0, max_points[1].hx(), max_points[0]) , max_idx[1] == 0 ? wmult_hw((K*)0, max_points[0].hy(), max_points[1]) : wmult_hw((K*)0, max_points[1].hy(), max_points[0]) , max_idx[2] == 0 ? wmult_hw((K*)0, max_points[0].hz(), max_points[1]) : wmult_hw((K*)0, max_points[1].hz(), max_points[0]) , wmult_hw((K*)0, max_points[0].hw(), max_points[1]) ); } Object result = make_object(Iso_cuboid_3(newmin, newmax)); return result; } } template inline Object intersection(const Plane_3 &plane1, const Plane_3 &plane2) { return typename K::Intersect_3()(plane1, plane2); } template inline Object intersection(const Plane_3 &plane1, const Plane_3 &plane2, const Plane_3 &plane3) { return typename K::Intersect_3()(plane1, plane2, plane3); } template inline Object intersection(const Plane_3 &plane, const Line_3 &line) { return typename K::Intersect_3()(plane, line); } template inline bool do_intersect(const Plane_3 &plane, const Line_3 &line) { return typename K::Do_intersect_3()(plane, line); } template inline Object intersection(const Plane_3 &plane, const Ray_3 &ray) { return typename K::Intersect_3()(plane, ray); } template inline bool do_intersect(const Plane_3 &plane, const Ray_3 &ray) { return typename K::Do_intersect_3()(plane, ray); } template inline Object intersection(const Plane_3 &plane, const Segment_3 &seg) { return typename K::Intersect_3()(plane, seg); } template inline bool do_intersect(const Plane_3 &plane, const Segment_3 &seg) { return typename K::Do_intersect_3()(plane, seg); } template inline Object intersection(const Plane_3 &plane, const Triangle_3 &tri) { return typename K::Intersect_3()(plane, tri); } template inline Object intersection(const Line_3 &line, const Bbox_3 &box) { return typename K::Intersect_3()(line, box); } template inline Object intersection(const Ray_3 &ray, const Bbox_3 &box) { return typename K::Intersect_3()(ray, box); } template inline Object intersection(const Segment_3 &seg, const Bbox_3 &box) { return typename K::Intersect_3()(seg, box); } template inline Object intersection(const Line_3 &line, const Iso_cuboid_3 &box) { return typename K::Intersect_3()(line, box); } template inline Object intersection(const Ray_3 &ray, const Iso_cuboid_3 &box) { return typename K::Intersect_3()(ray, box); } template inline Object intersection(const Segment_3 &seg, const Iso_cuboid_3 &box) { return typename K::Intersect_3()(seg, box); } template inline Object intersection(const Iso_cuboid_3 &icub1, const Iso_cuboid_3 &icub2) { return typename K::Intersect_3()(icub1, icub2); } template inline Object intersection(const Line_3 &l1, const Line_3 &l2) { return typename K::Intersect_3()(l1, l2); } template inline bool do_intersect(const Line_3 &l1, const Line_3 &l2) { return typename K::Do_intersect_3()(l1, l2); } template inline Object intersection(const Segment_3 &s1, const Segment_3 &s2) { return typename K::Intersect_3()(s1, s2); } template inline bool do_intersect(const Segment_3 &s1, const Segment_3 &s2) { return typename K::Do_intersect_3()(s1, s2); } template inline Object intersection(const Line_3 &l, const Segment_3 &s) { return typename K::Intersect_3()(l, s); } template inline Object intersection(const Line_3 &l, const Ray_3 &r) { return typename K::Intersect_3()(l, r); } template inline Object intersection(const Ray_3 &r, const Segment_3 &s) { return typename K::Intersect_3()(r, s); } template inline Object intersection(const Ray_3 &r1, const Ray_3 &r2) { return typename K::Intersect_3()(r1, r2); } template inline bool do_intersect(const Line_3 &l, const Segment_3 &s) { return typename K::Do_intersect_3()(l, s); } template inline bool do_intersect(const Line_3 &l, const Ray_3 &r) { return typename K::Do_intersect_3()(l, r); } template inline bool do_intersect(const Ray_3 &r, const Segment_3 &s) { return typename K::Do_intersect_3()(r, s); } template inline bool do_intersect(const Ray_3 &r1, const Ray_3 &r2) { return typename K::Do_intersect_3()(r1, r2); } template inline Object intersection(const Sphere_3 &s1, const Sphere_3 &s2) { return typename K::Intersect_3()(s1, s2); } template inline bool do_intersect(const Sphere_3 &s1, const Sphere_3 &s2) { return typename K::Do_intersect_3()(s1, s2); } template inline Object intersection(const Plane_3 &p, const Sphere_3 &s) { return typename K::Intersect_3()(p, s); } template inline bool do_intersect(const Plane_3 &p, const Sphere_3 &s) { return typename K::Do_intersect_3()(p, s); } } # 428 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3_1.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Line_3_do_intersect.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Line_3_do_intersect.h" namespace CGAL { namespace internal { template bool do_intersect(const typename K::Triangle_3 &t, const typename K::Line_3 &l, const K & k ) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Line_3_do_intersect.h", 34)) ; (CGAL::possibly(! k.is_degenerate_3_object()(l))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(l)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Line_3_do_intersect.h", 35)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); const Point_3 & a = vertex_on(t,0); const Point_3 & b = vertex_on(t,1); const Point_3 & c = vertex_on(t,2); const Point_3 & p = point_on(l,0); const Point_3 & q = point_on(l,1); if ( ( orientation(a,b,c,p) != COPLANAR ) || ( orientation(a,b,c,q) != COPLANAR ) ) { const Orientation pqab = orientation(p,q,a,b); const Orientation pqbc = orientation(p,q,b,c); switch ( pqab ) { case POSITIVE: return pqbc != NEGATIVE && orientation(p,q,c,a) != NEGATIVE ; case NEGATIVE: return pqbc != POSITIVE && orientation(p,q,c,a) != POSITIVE ; case COPLANAR: switch ( pqbc ) { case POSITIVE: return orientation(p,q,c,a) != NEGATIVE ; case NEGATIVE: return orientation(p,q,c,a) != POSITIVE ; case COPLANAR: return true; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Line_3_do_intersect.h", 81)); return false; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Line_3_do_intersect.h", 85)); return false; } } const Orientation pqa = coplanar_orientation(p,q,a); return coplanar_orientation(p,q,b) != pqa || coplanar_orientation(p,q,c) != pqa ; } template inline bool do_intersect(const typename K::Line_3 &l, const typename K::Triangle_3 &t, const K & k ) { return do_intersect(t, l, k); } } template bool do_intersect(const Triangle_3 &t, const Line_3 &l) { return typename K::Do_intersect_3()(t,l); } template inline bool do_intersect(const Line_3 &l, const Triangle_3 &t) { return typename K::Do_intersect_3()(t,l); } # 137 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Line_3_do_intersect.h" } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Plane_3_do_intersect.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Plane_3_do_intersect.h" namespace CGAL { namespace internal { template bool do_intersect(const typename K::Triangle_3 &t, const typename K::Plane_3 &h, const K & k) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Plane_3_do_intersect.h", 34)) ; (CGAL::possibly(! k.is_degenerate_3_object()(h))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(h)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Plane_3_do_intersect.h", 35)) ; typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Oriented_side_3 oriented_side = k.oriented_side_3_object(); switch ( oriented_side(h,vertex_on(t,0)) ) { case ON_POSITIVE_SIDE: return oriented_side(h,vertex_on(t,1)) != ON_POSITIVE_SIDE || oriented_side(h,vertex_on(t,2)) != ON_POSITIVE_SIDE; case ON_NEGATIVE_SIDE: return oriented_side(h,vertex_on(t,1)) != ON_NEGATIVE_SIDE || oriented_side(h,vertex_on(t,2)) != ON_NEGATIVE_SIDE ; case ON_ORIENTED_BOUNDARY: return true; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Plane_3_do_intersect.h", 56)); return false; } } template inline bool do_intersect(const typename K::Plane_3 &h, const typename K::Triangle_3 &t, const K & k) { return do_intersect(t, h, k); } } template inline bool do_intersect(const Triangle_3 &t, const Plane_3 &h) { return typename K::Do_intersect_3()(t,h); } template inline bool do_intersect(const Plane_3 &h, const Triangle_3 &t) { return typename K::Do_intersect_3()(t,h); } # 100 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Plane_3_do_intersect.h" } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Point_3_do_intersect.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Point_3_do_intersect.h" namespace CGAL { namespace internal { template bool do_intersect(const typename K::Triangle_3 &t, const typename K::Point_3 &p, const K & k ) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Point_3_do_intersect.h", 34)); typedef typename K::Point_3 Point_3; typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); const Point_3 & a = vertex_on(t,0); const Point_3 & b = vertex_on(t,1); const Point_3 & c = vertex_on(t,2); if (orientation(a,b,c,p) != COPLANAR) return false; const Orientation abp = coplanar_orientation(a,b,p); const Orientation bcp = coplanar_orientation(b,c,p); switch ( abp ) { case POSITIVE: return bcp != NEGATIVE && coplanar_orientation(c,a,p) != NEGATIVE ; case NEGATIVE: return bcp != POSITIVE && coplanar_orientation(c,a,p) != POSITIVE ; case COLLINEAR: switch ( bcp ) { case POSITIVE: return coplanar_orientation(c,a,p) != NEGATIVE ; case NEGATIVE: return coplanar_orientation(c,a,p) != POSITIVE ; case COLLINEAR: return true; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Point_3_do_intersect.h", 73)); return false; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Point_3_do_intersect.h", 77)); return false; } } template bool do_intersect(const typename K::Point_3 &p, const typename K::Triangle_3 &t, const K & k ) { return do_intersect(t, p, k); } } template inline bool do_intersect(const Point_3 &p, const Triangle_3 &t) { return typename K::Do_intersect_3()(t,p); } template inline bool do_intersect(const Triangle_3 &t, const Point_3 &p) { return typename K::Do_intersect_3()(t,p); } # 120 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Point_3_do_intersect.h" } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h" namespace CGAL { namespace internal { template bool do_intersect_coplanar(const typename K::Triangle_3 &t, const typename K::Ray_3 &r, const K & k ); template bool do_intersect(const typename K::Triangle_3 &t, const typename K::Ray_3 &r, const K & k) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 39)) ; (CGAL::possibly(! k.is_degenerate_3_object()(r))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(r)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 40)) ; typedef typename K::Point_3 Point_3; typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); const Point_3 & a = vertex_on(t,0); const Point_3 & b = vertex_on(t,1); const Point_3 & c = vertex_on(t,2); typename K::Construct_vector_3 construct_vector = k.construct_vector_3_object(); typename K::Construct_ray_3 construct_ray = k.construct_ray_3_object(); typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); const Point_3 & p = point_on(r,0); const Point_3 & q = point_on(r,1); const Orientation ray_direction = orientation(a,b,c,point_on(construct_ray(a, construct_vector(r)),1)); if (ray_direction == COPLANAR ) { if (orientation(a,b,c,p) == COPLANAR) return do_intersect_coplanar(t,r,k); else return false; } const Orientation abcp = orientation(a,b,c,p); switch ( abcp ) { case POSITIVE: switch ( ray_direction ) { case POSITIVE: return false; case NEGATIVE: return orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 98)); return false; } case NEGATIVE: switch ( ray_direction ) { case POSITIVE: return orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE; case NEGATIVE: return false; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 120)); return false; } case COPLANAR: switch ( ray_direction ) { case POSITIVE: return orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE; case NEGATIVE: return orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 141)); return false; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 146)); return false; } } template inline bool do_intersect(const typename K::Ray_3 &r, const typename K::Triangle_3 &t, const K & k) { return do_intersect(t,r, k); } template bool do_intersect_coplanar(const typename K::Triangle_3 &t, const typename K::Ray_3 &r, const K & k ) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 169)) ; (CGAL::possibly(! k.is_degenerate_3_object()(r))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(r)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 170)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); const Point_3 & p = point_on(r,0); const Point_3 & q = point_on(r,1); const Point_3 & A = vertex_on(t,0); const Point_3 & B = vertex_on(t,1); const Point_3 & C = vertex_on(t,2); const Point_3 * a = &A; const Point_3 * b = &B; const Point_3 * c = &C; if (coplanar_orientation(A,B,C) != POSITIVE) { b = &C; c = &B; } const Orientation pqa = coplanar_orientation(p,q,*a); const Orientation pqb = coplanar_orientation(p,q,*b); const Orientation pqc = coplanar_orientation(p,q,*c); switch ( pqa ) { case POSITIVE: switch ( pqb ) { case POSITIVE: if (pqc == POSITIVE) return false; return coplanar_orientation(*a,*c,p) != POSITIVE ; case NEGATIVE: if (pqc == POSITIVE) return coplanar_orientation(*c,*b,p) != POSITIVE ; return coplanar_orientation(*a,*c,p) != POSITIVE ; case COLLINEAR: if (pqc == POSITIVE) return coplanar_orientation(*c,*b,p) != POSITIVE ; return coplanar_orientation(*a,*c,p) != POSITIVE ; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 237)); return false; } case NEGATIVE: switch ( pqb ) { case POSITIVE: if (pqc == POSITIVE) return coplanar_orientation(*b,*a,p) != POSITIVE ; return coplanar_orientation(*b,*a,p) != POSITIVE ; case NEGATIVE: if (pqc == NEGATIVE) return false; return coplanar_orientation(*c,*b,p) != POSITIVE ; case COLLINEAR: if (pqc == NEGATIVE) return coplanar_orientation(*b,*a,p) != POSITIVE ; return coplanar_orientation(*b,*a,p) != POSITIVE ; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 263)); return false; } case COLLINEAR: switch ( pqb ) { case POSITIVE: if (pqc == POSITIVE) return coplanar_orientation(*b,*a,p) != POSITIVE ; return coplanar_orientation(*b,*a,p) != POSITIVE ; case NEGATIVE: if (pqc == NEGATIVE) return coplanar_orientation(*a,*c,p) != POSITIVE ; return coplanar_orientation(*c,*b,p) != POSITIVE ; case COLLINEAR: if (pqc == POSITIVE) return coplanar_orientation(*c,*b,p) != POSITIVE ; return coplanar_orientation(*a,*c,p) != POSITIVE ; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 288)); return false; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h", 293)); return false; } } } template inline bool do_intersect(const Ray_3 &r, const Triangle_3 &t) { return typename K::Do_intersect_3()(t,r); } template inline bool do_intersect(const Triangle_3 &t, const Ray_3 &r) { return typename K::Do_intersect_3()(t,r); } # 327 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Ray_3_do_intersect.h" } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h" namespace CGAL { namespace internal { template bool do_intersect_coplanar( const typename K::Point_3& A, const typename K::Point_3& B, const typename K::Point_3& C, const typename K::Point_3 & p, const typename K::Point_3 & q, const K & k ); template bool do_intersect_coplanar(const typename K::Triangle_3 &t, const typename K::Segment_3 &s, const K & k ) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 41)) ; (CGAL::possibly(! k.is_degenerate_3_object()(s))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(s)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 42)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); const Point_3 & p = point_on(s,0); const Point_3 & q = point_on(s,1); const Point_3 & A = vertex_on(t,0); const Point_3 & B = vertex_on(t,1); const Point_3 & C = vertex_on(t,2); return do_intersect_coplanar(A,B,C,p,q,k); } template bool do_intersect_coplanar( const typename K::Point_3& A, const typename K::Point_3& B, const typename K::Point_3& C, const typename K::Point_3 & p, const typename K::Point_3 & q, const K & k ) { typedef typename K::Point_3 Point_3; typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); const Point_3 * a = &A; const Point_3 * b = &B; const Point_3 * c = &C; if (coplanar_orientation(A,B,C) != POSITIVE) { b = &C; c = &B; } const Orientation pqa = coplanar_orientation(p,q,*a); const Orientation pqb = coplanar_orientation(p,q,*b); const Orientation pqc = coplanar_orientation(p,q,*c); switch ( pqa ) { case POSITIVE: switch ( pqb ) { case POSITIVE: if (pqc == POSITIVE) return false; return coplanar_orientation(*b,*c,q) != NEGATIVE && coplanar_orientation(*c,*a,p) != NEGATIVE ; case NEGATIVE: if (pqc == POSITIVE) return coplanar_orientation(*a,*b,q) != NEGATIVE && coplanar_orientation(*b,*c,p) != NEGATIVE ; return coplanar_orientation(*a,*b,q) != NEGATIVE && coplanar_orientation(*c,*a,p) != NEGATIVE ; case COLLINEAR: if (pqc == POSITIVE) return coplanar_orientation(*a,*b,q) != NEGATIVE && coplanar_orientation(*b,*c,p) != NEGATIVE ; return coplanar_orientation(*a,*b,q) != NEGATIVE && coplanar_orientation(*c,*a,p) != NEGATIVE ; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 124)); return false; } case NEGATIVE: switch ( pqb ) { case POSITIVE: if (pqc == POSITIVE) return coplanar_orientation(*a,*b,p) != NEGATIVE && coplanar_orientation(*c,*a,q) != NEGATIVE ; return coplanar_orientation(*a,*b,p) != NEGATIVE && coplanar_orientation(*b,*c,q) != NEGATIVE ; case NEGATIVE: if (pqc == NEGATIVE) return false; return coplanar_orientation(*b,*c,p) != NEGATIVE && coplanar_orientation(*c,*a,q) != NEGATIVE ; case COLLINEAR: if (pqc == NEGATIVE) return coplanar_orientation(*a,*b,p) != NEGATIVE && coplanar_orientation(*b,*c,q) != NEGATIVE ; return coplanar_orientation(*a,*b,p) != NEGATIVE && coplanar_orientation(*c,*a,q) != NEGATIVE ; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 155)); return false; } case COLLINEAR: switch ( pqb ) { case POSITIVE: if (pqc == POSITIVE) return coplanar_orientation(*a,*b,p) != NEGATIVE && coplanar_orientation(*c,*a,q) != NEGATIVE ; return coplanar_orientation(*a,*b,p) != NEGATIVE && coplanar_orientation(*b,*c,q) != NEGATIVE ; case NEGATIVE: if (pqc == NEGATIVE) return coplanar_orientation(*a,*b,q) != NEGATIVE && coplanar_orientation(*c,*a,p) != NEGATIVE ; return coplanar_orientation(*a,*b,q) != NEGATIVE && coplanar_orientation(*b,*c,p) != NEGATIVE ; case COLLINEAR: if (pqc == POSITIVE) return coplanar_orientation(*b,*c,p) != NEGATIVE && coplanar_orientation(*c,*a,q) != NEGATIVE ; return coplanar_orientation(*b,*c,q) != NEGATIVE && coplanar_orientation(*c,*a,p) != NEGATIVE ; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 188)); return false; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 193)); return false; } } template bool do_intersect(const typename K::Triangle_3 &t, const typename K::Segment_3 &s, const K & k) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 206)) ; (CGAL::possibly(! k.is_degenerate_3_object()(s))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(s)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 207)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); const Point_3 & a = vertex_on(t,0); const Point_3 & b = vertex_on(t,1); const Point_3 & c = vertex_on(t,2); const Point_3 & p = point_on(s,0); const Point_3 & q = point_on(s,1); const Orientation abcp = orientation(a,b,c,p); const Orientation abcq = orientation(a,b,c,q); switch ( abcp ) { case POSITIVE: switch ( abcq ) { case POSITIVE: return false; case NEGATIVE: return orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE; case COPLANAR: return orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 254)); return false; } case NEGATIVE: switch ( abcq ) { case POSITIVE: return orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE; case NEGATIVE: return false; case COPLANAR: return orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 278)); return false; } case COPLANAR: switch ( abcq ) { case POSITIVE: return orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE; case NEGATIVE: return orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE; case COPLANAR: return do_intersect_coplanar(t,s,k); default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 301)); return false; } default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h", 305)); return false; } } template inline bool do_intersect(const typename K::Segment_3 &s, const typename K::Triangle_3 &t, const K & k) { return do_intersect(t, s, k); } } template inline bool do_intersect(const Segment_3 &s, const Triangle_3 &t) { return typename K::Do_intersect_3()(t,s); } template inline bool do_intersect(const Triangle_3 &t, const Segment_3 &s) { return typename K::Do_intersect_3()(t,s); } # 347 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Segment_3_do_intersect.h" } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" namespace CGAL { namespace internal { template bool _intersection_test_vertex(const typename K::Point_3 * p, const typename K::Point_3 * q, const typename K::Point_3 * r, const typename K::Point_3 * a, const typename K::Point_3 * b, const typename K::Point_3 * c, const K & k){ (CGAL::possibly(k.coplanar_orientation_3_object() (*p,*q,*r) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.coplanar_orientation_3_object() (*p,*q,*r) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" , 40 # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" )) ; (CGAL::possibly(k.coplanar_orientation_3_object() (*a,*b,*c) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.coplanar_orientation_3_object() (*a,*b,*c) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" , 42 # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" )) ; typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); if (coplanar_orientation(*c,*a,*q) != NEGATIVE) { if (coplanar_orientation(*c,*b,*q) != POSITIVE) { if (coplanar_orientation(*p,*a,*q) == POSITIVE) return coplanar_orientation(*p,*b,*q) != POSITIVE; return coplanar_orientation(*p,*a,*r) != NEGATIVE && coplanar_orientation(*q,*r,*a) != NEGATIVE; } if (coplanar_orientation(*p,*b,*q) != POSITIVE) return coplanar_orientation(*c,*b,*r) != POSITIVE && coplanar_orientation(*q,*r,*b) != NEGATIVE; return false; } if (coplanar_orientation(*c,*a,*r) != NEGATIVE) { if (coplanar_orientation(*q,*r,*c) != NEGATIVE) return (coplanar_orientation(*p,*a,*r) != NEGATIVE); return coplanar_orientation(*q,*r,*b) != NEGATIVE && coplanar_orientation(*c,*r,*b) != NEGATIVE; } return false; } template bool _intersection_test_edge(const typename K::Point_3 * p, const typename K::Point_3 * q, const typename K::Point_3 * r, const typename K::Point_3 * a, const typename K::Point_3 * b, const typename K::Point_3 * c, const K & k){ (CGAL::possibly(k.coplanar_orientation_3_object() (*p,*q,*r) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.coplanar_orientation_3_object() (*p,*q,*r) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" # 88 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" , 89 # 88 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" )) ; (CGAL::possibly(k.coplanar_orientation_3_object() (*a,*b,*c) == POSITIVE)?(static_cast(0)): ::CGAL::precondition_fail( "k.coplanar_orientation_3_object() (*a,*b,*c) == POSITIVE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" , 91 # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h" )) ; typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); if (coplanar_orientation(*c,*a,*q) != NEGATIVE) { if (coplanar_orientation(*p,*a,*q) != NEGATIVE) return coplanar_orientation(*p,*q,*c) != NEGATIVE ; return coplanar_orientation(*q,*r,*a) != NEGATIVE && coplanar_orientation(*r,*p,*a) != NEGATIVE; } if (coplanar_orientation(*c,*a,*r) != NEGATIVE) { return coplanar_orientation(*p,*a,*r) != NEGATIVE && ( coplanar_orientation(*p,*r,*c) != NEGATIVE || coplanar_orientation(*q,*r,*c) != NEGATIVE ); } return false; } template bool do_intersect_coplanar(const typename K::Triangle_3 &t1, const typename K::Triangle_3 &t2, const K & k) { (CGAL::possibly(! k.is_degenerate_3_object() (t1))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object() (t1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 125)); (CGAL::possibly(! k.is_degenerate_3_object() (t2))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object() (t2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 126)); typedef typename K::Point_3 Point_3; typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); const Point_3 & P = vertex_on(t1,0); const Point_3 & Q = vertex_on(t1,1); const Point_3 & R = vertex_on(t1,2); const Point_3 & A = vertex_on(t2,0); const Point_3 & B = vertex_on(t2,1); const Point_3 & C = vertex_on(t2,2); const Point_3 * p = &P; const Point_3 * q = &Q; const Point_3 * r = &R; const Point_3 * a = &A; const Point_3 * b = &B; const Point_3 * c = &C; if ( coplanar_orientation(P,Q,R) == NEGATIVE ) { q = &R; r = &Q; } if ( coplanar_orientation(A,B,C) == NEGATIVE ) { b = &C; c = &B; } if ( coplanar_orientation(*a,*b,*p) != NEGATIVE ) { if ( coplanar_orientation(*b,*c,*p) != NEGATIVE ) { if ( coplanar_orientation(*c,*a,*p) != NEGATIVE ) return true; return internal::_intersection_test_edge(p,q,r,a,b,c,k); } if ( coplanar_orientation(*c,*a,*p) != NEGATIVE ) return internal::_intersection_test_edge(p,q,r,c,a,b,k); return internal::_intersection_test_vertex(p,q,r,a,b,c,k); } if ( coplanar_orientation(*b,*c,*p) != NEGATIVE ) { if ( coplanar_orientation(*c,*a,*p) != NEGATIVE ) return internal::_intersection_test_edge(p,q,r,b,c,a,k); return internal::_intersection_test_vertex(p,q,r,b,c,a,k); } return internal::_intersection_test_vertex(p,q,r,c,a,b,k); } template typename K::Boolean do_intersect(const typename K::Triangle_3 &t1, const typename K::Triangle_3 &t2, const K & k) { (CGAL::possibly(! k.is_degenerate_3_object() (t1))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object() (t1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 202)); (CGAL::possibly(! k.is_degenerate_3_object() (t2))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object() (t2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 203)); typedef typename K::Point_3 Point_3; typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); const Point_3 & p = vertex_on(t1,0); const Point_3 & q = vertex_on(t1,1); const Point_3 & r = vertex_on(t1,2); const Point_3 & a = vertex_on(t2,0); const Point_3 & b = vertex_on(t2,1); const Point_3 & c = vertex_on(t2,2); const Point_3 * s_min1; const Point_3 * t_min1; const Point_3 * s_max1; const Point_3 * t_max1; const Orientation dp = make_certain(orientation(a,b,c,p)); const Orientation dq = make_certain(orientation(a,b,c,q)); const Orientation dr = make_certain(orientation(a,b,c,r)); switch ( dp ) { case POSITIVE: if ( dq == POSITIVE ) { if ( dr == POSITIVE) return false; s_min1 = &q ; t_min1 = &r ; s_max1 = &r ; t_max1 = &p; } else { if ( dr == POSITIVE) { s_min1 = &p; t_min1 = &q; s_max1 = &q; t_max1 = &r; } else { s_min1 = &p; t_min1 = &q; s_max1 = &r; t_max1 = &p; } } break; case NEGATIVE: if ( dq == NEGATIVE ) { if ( dr == NEGATIVE ) return false; s_min1 = &r; t_min1 = &p; s_max1 = &q; t_max1 = &r; } else { if ( dr == NEGATIVE ) { s_min1 = &q; t_min1 = &r; s_max1 = &p; t_max1 = &q; } else { s_min1 = &r; t_min1 = &p; s_max1 = &p; t_max1 = &q; } } break; case COPLANAR: switch ( dq ) { case POSITIVE: if ( dr == POSITIVE ) { s_min1 = &r; t_min1 = &p; s_max1 = &p; t_max1 = &q; } else { s_min1 = &q; t_min1 = &r; s_max1 = &p; t_max1 = &q; } break; case NEGATIVE: if ( dr == NEGATIVE ) { s_min1 = &p; t_min1 = &q; s_max1 = &r; t_max1 = &p; } else { s_min1 = &p; t_min1 = &q; s_max1 = &q; t_max1 = &r; } break; case COPLANAR: switch ( dr ) { case POSITIVE: s_min1 = &r; t_min1 = &p; s_max1 = &q; t_max1 = &r; break; case NEGATIVE: s_min1 = &q ; t_min1 = &r ; s_max1 = &r ; t_max1 = &p; break; case COPLANAR: return do_intersect_coplanar(t1,t2,k); default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 311)); return false; } break; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 318)); return false; } break; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 325)); return false; } const Point_3 * s_min2; const Point_3 * t_min2; const Point_3 * s_max2; const Point_3 * t_max2; const Orientation da = make_certain(orientation(p,q,r,a)); const Orientation db = make_certain(orientation(p,q,r,b)); const Orientation dc = make_certain(orientation(p,q,r,c)); switch ( da ) { case POSITIVE: if ( db == POSITIVE ) { if ( dc == POSITIVE) return false; s_min2 = &b ; t_min2 = &c ; s_max2 = &c ; t_max2 = &a; } else { if ( dc == POSITIVE) { s_min2 = &a; t_min2 = &b; s_max2 = &b; t_max2 = &c; } else { s_min2 = &a; t_min2 = &b; s_max2 = &c; t_max2 = &a; } } break; case NEGATIVE: if ( db == NEGATIVE ) { if ( dc == NEGATIVE ) return false; s_min2 = &c ; t_min2 = &a ; s_max2 = &b ; t_max2 = &c; } else { if ( dc == NEGATIVE ) { s_min2 = &b ; t_min2 = &c ; s_max2 = &a ; t_max2 = &b; } else { s_min2 = &c ; t_min2 = &a ; s_max2 = &a ; t_max2 = &b; } } break; case COPLANAR: switch ( db ) { case POSITIVE: if ( dc == POSITIVE ) { s_min2 = &c ; t_min2 = &a ; s_max2 = &a ; t_max2 = &b; } else { s_min2 = &b ; t_min2 = &c ; s_max2 = &a ; t_max2 = &b; } break; case NEGATIVE: if ( dc == NEGATIVE ) { s_min2 = &a ; t_min2 = &b ; s_max2 = &c ; t_max2 = &a; } else { s_min2 = &a ; t_min2 = &b ; s_max2 = &b ; t_max2 = &c; } break; case COPLANAR: switch ( dc ) { case POSITIVE: s_min2 = &c ; t_min2 = &a ; s_max2 = &b ; t_max2 = &c; break; case NEGATIVE: s_min2 = &b ; t_min2 = &c ; s_max2 = &c ; t_max2 = &a; break; case COPLANAR: return do_intersect_coplanar(t1,t2,k); default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 423)); return false; } break; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 430)); return false; } break; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_do_intersect.h", 437)); return false; } return orientation(*s_min1,*t_min1,*s_min2,*t_min2) != POSITIVE && orientation(*s_max1,*t_max1,*t_max2,*s_max2) != POSITIVE; } } template inline typename K::Boolean do_intersect(const Triangle_3 &t1, const Triangle_3 &t2) { return typename K::Do_intersect_3()(t1,t2); } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" 2 namespace CGAL { namespace internal { template typename K::Boolean do_intersect(const typename K::Triangle_3 &tr, const typename K::Tetrahedron_3 &tet, const K & k) { typedef typename K::Triangle_3 Triangle; typedef typename K::Point_3 Point; (CGAL::possibly(! k.is_degenerate_3_object() (tr))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object() (tr)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h", 44)); (CGAL::possibly(! k.is_degenerate_3_object() (tet))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object() (tet)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h", 45)); if (do_intersect(tr, Triangle(tet[0], tet[1], tet[2]), k)) return true; if (do_intersect(tr, Triangle(tet[0], tet[1], tet[3]), k)) return true; if (do_intersect(tr, Triangle(tet[0], tet[2], tet[3]), k)) return true; if (do_intersect(tr, Triangle(tet[1], tet[2], tet[3]), k)) return true; (CGAL::possibly(k.bounded_side_3_object()(tet, tr[0]) == k.bounded_side_3_object()(tet, tr[1]))?(static_cast(0)): ::CGAL::assertion_fail( "k.bounded_side_3_object()(tet, tr[0]) == k.bounded_side_3_object()(tet, tr[1])" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" # 52 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" , 53 # 52 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" )) ; (CGAL::possibly(k.bounded_side_3_object()(tet, tr[0]) == k.bounded_side_3_object()(tet, tr[2]))?(static_cast(0)): ::CGAL::assertion_fail( "k.bounded_side_3_object()(tet, tr[0]) == k.bounded_side_3_object()(tet, tr[2])" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" , 55 # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Tetrahedron_3_do_intersect.h" )) ; return k.has_on_bounded_side_3_object()(tet, tr[0]); } template inline typename K::Boolean do_intersect(const typename K::Tetrahedron_3 &tet, const typename K::Triangle_3 &tr, const K & k) { return do_intersect(tr, tet, k); } } template inline bool do_intersect(const Tetrahedron_3 &tet, const Triangle_3 &tr) { return typename K::Do_intersect_3()(tr,tet); } template inline bool do_intersect(const Triangle_3 &tr, const Tetrahedron_3 &tet) { return typename K::Do_intersect_3()(tr,tet); } } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Bbox_3_do_intersect.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Bbox_3_do_intersect.h" namespace CGAL { bool inline do_intersect(const CGAL::Bbox_3& c, const CGAL::Bbox_3& bbox) { return CGAL::do_overlap(c, bbox); } } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Line_3_do_intersect.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Line_3_do_intersect.h" namespace CGAL { namespace internal { template inline bool bbox_line_do_intersect_aux(const FT& px, const FT& py, const FT& pz, const FT& vx, const FT& vy, const FT& vz, const FT& bxmin, const FT& bymin, const FT& bzmin, const FT& bxmax, const FT& bymax, const FT& bzmax) { FT dmin, tmin, tmax; if ( vx >= 0 ) { tmin = bxmin - px; tmax = bxmax - px; dmin = vx; } else { tmin = px - bxmax; tmax = px - bxmin; dmin = -vx; } if ( dmin == FT(0) && (tmin > FT(0) || tmax < FT(0)) ) return false; FT dmax = dmin; FT d_, tmin_, tmax_; if ( vy >= 0 ) { tmin_ = bymin - py; tmax_ = bymax - py; d_ = vy; } else { tmin_ = py - bymax; tmax_ = py - bymin; d_ = -vy; } if ( d_ == FT(0) ){ if( (tmin_ > FT(0) || tmax_ < FT(0)) ) return false; } else if ( (dmin*tmax_) < (d_*tmin) || (dmax*tmin_) > (d_*tmax) ) return false; if( (dmin*tmin_) > (d_*tmin) ) { tmin = tmin_; dmin = d_; } if( (dmax*tmax_) < (d_*tmax) ) { tmax = tmax_; dmax = d_; } if ( vz >= 0 ) { tmin_ = bzmin - pz; tmax_ = bzmax - pz; d_ = vz; } else { tmin_ = pz - bzmax; tmax_ = pz - bzmin; d_ = -vz; } return ( (dmin*tmax_) >= (d_*tmin) && (dmax*tmin_) <= (d_*tmax) ); } template bool do_intersect(const typename K::Line_3& line, const CGAL::Bbox_3& bbox, const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; const Point_3& point = line.point(); const Vector_3& v = line.to_vector(); return bbox_line_do_intersect_aux( point.x(), point.y(), point.z(), v.x(), v.y(), v.z(), FT(bbox.xmin()), FT(bbox.ymin()), FT(bbox.zmin()), FT(bbox.xmax()), FT(bbox.ymax()), FT(bbox.zmax()) ); } } template bool do_intersect(const CGAL::Line_3& line, const CGAL::Bbox_3& bbox) { return typename K::Do_intersect_3()(line, bbox); } template bool do_intersect(const CGAL::Bbox_3& bbox, const CGAL::Line_3& line) { return typename K::Do_intersect_3()(line, bbox); } } # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Ray_3_do_intersect.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Ray_3_do_intersect.h" namespace CGAL { namespace internal { template inline bool bbox_ray_do_intersect_aux(const FT& px, const FT& py, const FT& pz, const FT& qx, const FT& qy, const FT& qz, const FT& bxmin, const FT& bymin, const FT& bzmin, const FT& bxmax, const FT& bymax, const FT& bzmax) { FT dmin, tmin, tmax; if ( qx >= px ) { tmin = bxmin - px; tmax = bxmax - px; dmin = qx - px; if ( tmax < FT(0) ) return false; } else { tmin = px - bxmax; tmax = px - bxmin; dmin = px - qx; if ( tmax < FT(0) ) return false; } FT dmax = dmin; if ( tmin > FT(0) ) { if ( dmin == FT(0) ) return false; } else { tmin = FT(0); dmin = FT(1); } FT d_, tmin_, tmax_; if ( qy >= py ) { tmin_ = bymin - py; tmax_ = bymax - py; d_ = qy - py; } else { tmin_ = py - bymax; tmax_ = py - bymin; d_ = py - qy; } if ( (dmin*tmax_) < (d_*tmin) || (dmax*tmin_) > (d_*tmax) ) return false; if( (dmin*tmin_) > (d_*tmin) ) { tmin = tmin_; dmin = d_; } if( (dmax*tmax_) < (d_*tmax) ) { tmax = tmax_; dmax = d_; } if ( qz >= pz ) { tmin_ = bzmin - pz; tmax_ = bzmax - pz; d_ = qz - pz; } else { tmin_ = pz - bzmax; tmax_ = pz - bzmin; d_ = pz - qz; } return ( (dmin*tmax_) >= (d_*tmin) && (dmax*tmin_) <= (d_*tmax) ); } template bool do_intersect(const typename K::Ray_3& ray, const CGAL::Bbox_3& bbox, const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; const Point_3& source = ray.source(); const Point_3& point_on_ray = ray.point(1); return bbox_ray_do_intersect_aux( source.x(), source.y(), source.z(), point_on_ray.x(), point_on_ray.y(), point_on_ray.z(), FT(bbox.xmin()), FT(bbox.ymin()), FT(bbox.zmin()), FT(bbox.xmax()), FT(bbox.ymax()), FT(bbox.zmax()) ); } } template bool do_intersect(const CGAL::Ray_3& ray, const CGAL::Bbox_3& bbox) { return typename K::Do_intersect_3()(ray, bbox); } template bool do_intersect(const CGAL::Bbox_3& bbox, const CGAL::Ray_3& ray) { return typename K::Do_intersect_3()(ray, bbox); } } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h" namespace CGAL { namespace internal { template inline bool do_intersect_bbox_segment_aux( const FT& px, const FT& py, const FT& pz, const FT& qx, const FT& qy, const FT& qz, const FT& bxmin, const FT& bymin, const FT& bzmin, const FT& bxmax, const FT& bymax, const FT& bzmax) { FT dmin, tmin, tmax; if ( qx >= px ) { tmin = bxmin - px; tmax = bxmax - px; dmin = qx - px; } else { tmin = px - bxmax; tmax = px - bxmin; dmin = px - qx; } if ( tmax < FT(0) || tmin > dmin ) return false; FT dmax = dmin; if ( tmin < FT(0) ) { tmin = FT(0); dmin = FT(1); } if ( tmax > dmax ) { tmax = FT(1); dmax = FT(1); } FT d_, tmin_, tmax_; if ( qy >= py ) { tmin_ = bymin - py; tmax_ = bymax - py; d_ = qy - py; } else { tmin_ = py - bymax; tmax_ = py - bymin; d_ = py - qy; } if ( (dmin*tmax_) < (d_*tmin) || (dmax*tmin_) > (d_*tmax) ) return false; if( (dmin*tmin_) > (d_*tmin) ) { tmin = tmin_; dmin = d_; } if( (dmax*tmax_) < (d_*tmax) ) { tmax = tmax_; dmax = d_; } if ( qz >= pz ) { tmin_ = bzmin - pz; tmax_ = bzmax - pz; d_ = qz - pz; } else { tmin_ = pz - bzmax; tmax_ = pz - bzmin; d_ = pz - qz; } return ( (dmin*tmax_) >= (d_*tmin) && (dmax*tmin_) <= (d_*tmax) ); } template bool do_intersect(const typename K::Segment_3& segment, const CGAL::Bbox_3& bbox, const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; const Point_3& source = segment.source(); const Point_3& target = segment.target(); return do_intersect_bbox_segment_aux( source.x(), source.y(), source.z(), target.x(), target.y(), target.z(), FT(bbox.xmin()), FT(bbox.ymin()), FT(bbox.zmin()), FT(bbox.xmax()), FT(bbox.ymax()), FT(bbox.zmax()) ); } template bool do_intersect(const CGAL::Bbox_3& bbox, const typename K::Segment_3& segment, const K& k) { return do_intersect(segment, bbox, k); } } template bool do_intersect(const CGAL::Segment_3& segment, const CGAL::Bbox_3& bbox) { return typename K::Do_intersect_3()(segment, bbox); } template bool do_intersect(const CGAL::Bbox_3& bbox, const CGAL::Segment_3& segment) { return typename K::Do_intersect_3()(segment, bbox); } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Plane_3_do_intersect.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Plane_3_do_intersect.h" namespace CGAL { namespace internal { template Uncertain get_min_max(const typename K::Vector_3& p, const CGAL::Bbox_3& bbox, typename K::Point_3& p_min, typename K::Point_3& p_max) { if(certainly(p.x() > 0)) { if(certainly(p.y() > 0)) { if(certainly(p.z() > 0)) { p_min = typename K::Point_3(bbox.xmin(), bbox.ymin(),bbox.zmin()); p_max = typename K::Point_3(bbox.xmax(), bbox.ymax(),bbox.zmax()); return true; } else if(certainly(p.z() <= 0)) { p_min = typename K::Point_3(bbox.xmin(), bbox.ymin(),bbox.zmax()); p_max = typename K::Point_3(bbox.xmax(), bbox.ymax(),bbox.zmin()); return true; } } else if(certainly(p.y() <= 0)) { if(certainly(p.z() > 0)) { p_min = typename K::Point_3(bbox.xmin(), bbox.ymax(),bbox.zmin()); p_max = typename K::Point_3(bbox.xmax(), bbox.ymin(),bbox.zmax()); return true; } else if(certainly(p.z() <= 0)) { p_min = typename K::Point_3(bbox.xmin(), bbox.ymax(),bbox.zmax()); p_max = typename K::Point_3(bbox.xmax(), bbox.ymin(),bbox.zmin()); return true; } } } else if(certainly(p.x() <= 0)) { if(certainly(p.y() > 0)) { if(certainly(p.z() > 0)) { p_min = typename K::Point_3(bbox.xmax(), bbox.ymin(),bbox.zmin()); p_max = typename K::Point_3(bbox.xmin(), bbox.ymax(),bbox.zmax()); return true;} else if(certainly(p.z() <= 0)) { p_min = typename K::Point_3(bbox.xmax(), bbox.ymin(),bbox.zmax()); p_max = typename K::Point_3(bbox.xmin(), bbox.ymax(),bbox.zmin()); return true; } } else if(certainly(p.y() <= 0)) { if(certainly(p.z() > 0)) { p_min = typename K::Point_3(bbox.xmax(), bbox.ymax(),bbox.zmin()); p_max = typename K::Point_3(bbox.xmin(), bbox.ymin(),bbox.zmax()); return true; } else if(certainly(p.z() <= 0)) { p_min = typename K::Point_3(bbox.xmax(), bbox.ymax(),bbox.zmax()); p_max = typename K::Point_3(bbox.xmin(), bbox.ymin(),bbox.zmin()); return true; } } } return Uncertain::indeterminate(); } template bool do_intersect(const typename K::Plane_3& plane, const CGAL::Bbox_3& bbox, const K&) { typedef typename K::Point_3 Point_3; Point_3 p_max, p_min; Uncertain b = get_min_max(plane.orthogonal_vector(), bbox, p_min, p_max); if(is_certain(b)){ return ! (plane.oriented_side(p_max) == ON_NEGATIVE_SIDE || plane.oriented_side(p_min) == ON_POSITIVE_SIDE); } CGAL::Oriented_side side = plane.oriented_side(Point_3(bbox.xmin(), bbox.ymin(),bbox.zmin())); if(side == ON_ORIENTED_BOUNDARY) return true; CGAL::Oriented_side s = plane.oriented_side(Point_3(bbox.xmax(), bbox.ymax(),bbox.zmax())); if(s != side) return true; s = plane.oriented_side(Point_3(bbox.xmin(), bbox.ymin(),bbox.zmax())); if(s != side) return true; s = plane.oriented_side(Point_3(bbox.xmax(), bbox.ymax(),bbox.zmin())); if(s != side) return true; s = plane.oriented_side(Point_3(bbox.xmin(), bbox.ymax(),bbox.zmin())); if(s != side) return true; s = plane.oriented_side(Point_3(bbox.xmax(), bbox.ymin(),bbox.zmax())); if(s != side) return true; s = plane.oriented_side(Point_3(bbox.xmin(), bbox.ymax(),bbox.zmax())); if(s != side) return true; s = plane.oriented_side(Point_3(bbox.xmax(), bbox.ymin(),bbox.zmin())); if(s != side) return true; return false; } } template bool do_intersect(const CGAL::Plane_3& plane, const CGAL::Bbox_3& bbox) { return typename K::Do_intersect_3()(plane, bbox); } template bool do_intersect(const CGAL::Bbox_3& bbox, const CGAL::Plane_3& plane) { return typename K::Do_intersect_3()(plane, bbox); } } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Sphere_3_do_intersect.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Sphere_3_do_intersect.h" namespace CGAL { namespace internal { template bool do_intersect(const typename K::Sphere_3& sphere, const CGAL::Bbox_3& bbox, const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point; FT d = FT(0); FT distance = FT(0); Point center = sphere.center(); if(center.x() < (FT)bbox.xmin()) { d = (FT)bbox.xmin() - center.x(); distance += d * d; } else if(center.x() > (FT)bbox.xmax()) { d = center.x() - (FT)bbox.xmax(); distance += d * d; } if(center.y() < (FT)bbox.ymin()) { d = (FT)bbox.ymin() - center.y(); distance += d * d; } else if(center.y() > (FT)bbox.ymax()) { d = center.y() - (FT)bbox.ymax(); distance += d * d; } if(center.z() < (FT)bbox.zmin()) { d = (FT)bbox.zmin() - center.z(); distance += d * d; } else if(center.z() > (FT)bbox.zmax()) { d = center.z() - (FT)bbox.zmax(); distance += d * d; } # 96 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Sphere_3_do_intersect.h" return distance <= sphere.squared_radius(); } } template bool do_intersect(const CGAL::Sphere_3& sphere, const CGAL::Bbox_3& bbox) { return typename K::Do_intersect_3()(sphere, bbox); } template bool do_intersect(const CGAL::Bbox_3& bbox, const CGAL::Sphere_3& sphere) { return typename K::Do_intersect_3()(sphere, bbox); } } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h" namespace CGAL { namespace internal { template inline bool do_bbox_intersect(const typename K::Triangle_3& triangle, const CGAL::Bbox_3& bbox) { const typename K::Point_3& p = triangle.vertex(0); const typename K::Point_3& q = triangle.vertex(1); const typename K::Point_3& r = triangle.vertex(2); for(int i = 0; i < 3; ++i) { if(p[i] <= q[i]) { if(q[i] <= r[i]) { if((bbox.max(i) < p[i]) || (bbox.min(i) > r[i])) return false; } else { if(p[i] <= r[i]) { if(bbox.max(i) < p[i] || bbox.min(i) > q[i]) return false; } else { if(bbox.max(i) < r[i] || bbox.min(i) > q[i]) return false; } } } else { if(p[i] <= r[i]) { if(bbox.max(i) < q[i] || bbox.min(i) > r[i]) return false; } else { if(q[i] <= r[i]) { if(bbox.max(i) < q[i] || bbox.min(i) > p[i]) return false; } else { if(bbox.max(i) < r[i] || bbox.min(i) > p[i]) return false; } } } } return true; } template inline void get_min_max(const typename K::FT& px, const typename K::FT& py, const typename K::FT& pz, const CGAL::Bbox_3& c, typename K::Point_3& p_min, typename K::Point_3& p_max) { if(AXE == 0 || px > 0) { if(AXE == 1 || py > 0) { if(AXE == 2 || pz > 0) { p_min = typename K::Point_3(c.xmin(), c.ymin(),c.zmin()); p_max = typename K::Point_3(c.xmax(), c.ymax(),c.zmax()); } else { p_min = typename K::Point_3(c.xmin(), c.ymin(),c.zmax()); p_max = typename K::Point_3(c.xmax(), c.ymax(),c.zmin()); } } else { if(AXE == 2 || pz > 0) { p_min = typename K::Point_3(c.xmin(), c.ymax(),c.zmin()); p_max = typename K::Point_3(c.xmax(), c.ymin(),c.zmax()); } else { p_min = typename K::Point_3(c.xmin(), c.ymax(),c.zmax()); p_max = typename K::Point_3(c.xmax(), c.ymin(),c.zmin()); } } } else { if(AXE == 1 || py > 0) { if(AXE == 2 || pz > 0) { p_min = typename K::Point_3(c.xmax(), c.ymin(),c.zmin()); p_max = typename K::Point_3(c.xmin(), c.ymax(),c.zmax()); } else { p_min = typename K::Point_3(c.xmax(), c.ymin(),c.zmax()); p_max = typename K::Point_3(c.xmin(), c.ymax(),c.zmin()); } } else { if(AXE == 2 || pz > 0) { p_min = typename K::Point_3(c.xmax(), c.ymax(),c.zmin()); p_max = typename K::Point_3(c.xmin(), c.ymin(),c.zmax()); } else { p_min = typename K::Point_3(c.xmax(), c.ymax(),c.zmax()); p_max = typename K::Point_3(c.xmin(), c.ymin(),c.zmin()); } } } } template inline typename K::FT do_axis_intersect_aux(const typename K::FT& alpha, const typename K::FT& beta, const typename K::Vector_3* sides) { switch ( AXE ) { case 0: return -sides[SIDE].z()*alpha + sides[SIDE].y()*beta; case 1: return sides[SIDE].z()*alpha - sides[SIDE].x()*beta; case 2: return -sides[SIDE].y()*alpha + sides[SIDE].x()*beta; default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h", 161 ); return typename K::FT(0.); } } template inline int collinear_axis(typename K::Vector_3 side){ if ( certainly(side[0]==0) ){ if ( certainly(side[1]==0) ) return 2; if ( certainly(side[2]==0) ) return 1; } else{ if ( certainly(side[1]==0) && certainly(side[2]==0) ) return 0; } return -1; } template inline Uncertain do_axis_intersect(const typename K::Triangle_3& triangle, const typename K::Vector_3* sides, const CGAL::Bbox_3& bbox) { const typename K::Point_3* j = & triangle.vertex(SIDE); const typename K::Point_3* k = & triangle.vertex((SIDE+2)%3); typename K::Point_3 p_min, p_max; get_min_max(AXE==0? 0: AXE==1? sides[SIDE].z(): -sides[SIDE].y(), AXE==0? -sides[SIDE].z(): AXE==1? 0: sides[SIDE].x(), AXE==0? sides[SIDE].y(): AXE==1? -sides[SIDE].x(): 0, bbox, p_min, p_max); switch ( AXE ) { case 0: { Uncertain b = do_axis_intersect_aux(k->y()-j->y(), k->z()-j->z(), sides) >= 0; if (is_indeterminate(b)) return b; if(b) std::swap(j,k); return __extension__ ({ CGAL::Uncertain CGAL_TMP = ((do_axis_intersect_aux(p_min.y()-j->y(), p_min.z()-j->z(), sides) <= 0)); CGAL::certainly(CGAL_TMP) ? CGAL::make_uncertain(true) : CGAL_TMP | CGAL::make_uncertain(((do_axis_intersect_aux(p_max.y()-k->y(), p_max.z()-k->z(), sides) >= 0))); }) ; } case 1: { Uncertain b = do_axis_intersect_aux(k->x()-j->x(), k->z()-j->z(), sides) >= 0; if (is_indeterminate(b)) return b; if(b) std::swap(j,k); return __extension__ ({ CGAL::Uncertain CGAL_TMP = ((do_axis_intersect_aux(p_min.x()-j->x(), p_min.z()-j->z(), sides) <= 0)); CGAL::certainly(CGAL_TMP) ? CGAL::make_uncertain(true) : CGAL_TMP | CGAL::make_uncertain(((do_axis_intersect_aux(p_max.x()-k->x(), p_max.z()-k->z(), sides) >= 0))); }) ; } case 2: { Uncertain b = do_axis_intersect_aux(k->x()-j->x(), k->y()-j->y(), sides) >= 0; if ( is_indeterminate(b)) return b; if(b) std::swap(j,k); return __extension__ ({ CGAL::Uncertain CGAL_TMP = ((do_axis_intersect_aux(p_min.x()-j->x(), p_min.y()-j->y(), sides) <= 0)); CGAL::certainly(CGAL_TMP) ? CGAL::make_uncertain(true) : CGAL_TMP | CGAL::make_uncertain(((do_axis_intersect_aux(p_max.x()-k->x(), p_max.y()-k->y(), sides) >= 0))); }) ; } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h", 230 ); return make_uncertain(false); } } template bool do_intersect(const typename K::Triangle_3& a_triangle, const CGAL::Bbox_3& a_bbox, const K& k) { if(certainly_not( do_bbox_intersect(a_triangle, a_bbox) )) return false; if(certainly_not( do_intersect(a_triangle.supporting_plane(), a_bbox, k) )) return false; typename K::Vector_3 sides[3]; sides[0] = a_triangle[1] - a_triangle[0]; sides[1] = a_triangle[2] - a_triangle[1]; sides[2] = a_triangle[0] - a_triangle[2]; int forbidden_axis=-1; int forbidden_size=-1; int tmp=collinear_axis(sides[0]); if ( tmp!= -1){ forbidden_axis=tmp; forbidden_size=0; } else{ tmp=collinear_axis(sides[1]); if ( tmp!= -1){ forbidden_axis=tmp; forbidden_size=1; } else{ tmp=collinear_axis(sides[2]); if ( tmp!= -1){ forbidden_axis=tmp; forbidden_size=2; } } } # 286 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h" const typename K::Triangle_3& triangle = a_triangle; const Bbox_3& bbox = a_bbox; Uncertain ind = make_uncertain(true); Uncertain b = make_uncertain(true); if (forbidden_axis!=0){ if (forbidden_size!=0){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } if (forbidden_size!=1){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } if (forbidden_size!=2){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } } if (forbidden_axis!=1){ if (forbidden_size!=0){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } if (forbidden_size!=1){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } if (forbidden_size!=2){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } } if (forbidden_axis!=2){ if (forbidden_size!=0){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } if (forbidden_size!=1){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } if (forbidden_size!=2){ b = do_axis_intersect(triangle, sides, bbox); if(is_indeterminate(b)){ ind = b; } else if(! b){ return false; } } } return ind; } template bool do_intersect(const CGAL::Bbox_3& bbox, const typename K::Triangle_3& triangle, const K& k) { return do_intersect(triangle, bbox, k); } } template bool do_intersect(const CGAL::Triangle_3& triangle, const CGAL::Bbox_3& bbox) { return typename K::Do_intersect_3()(triangle, bbox); } template bool do_intersect(const CGAL::Bbox_3& bbox, const CGAL::Triangle_3& triangle) { return typename K::Do_intersect_3()(triangle, bbox); } } # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersections.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersections.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersections.h" 2 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h" 2 namespace CGAL { namespace internal { template typename K::Point_3 t3l3_intersection_coplanar_aux(const typename K::Line_3& l, const typename K::Point_3& a, const typename K::Point_3& b, const K& k) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::FT FT; typename K::Construct_vector_3 vector = k.construct_vector_3_object(); typename K::Construct_cross_product_vector_3 cross_product = k.construct_cross_product_vector_3_object(); typename K::Compute_scalar_product_3 scalar_product = k.compute_scalar_product_3_object(); typename K::Compute_squared_length_3 sq_length = k.compute_squared_length_3_object(); const Point_3& p = l.point(); const Vector_3& v = l.to_vector(); const Vector_3 ab = vector(a,b); const Vector_3 pa = vector(p,a); const Vector_3 pa_ab = cross_product(pa,ab); const Vector_3 v_ab = cross_product(v,ab); const FT t = scalar_product(pa_ab,v_ab) / sq_length(v_ab); return ( p + t*v ); } template Object t3l3_intersection_coplanar_aux(const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& c, const typename K::Line_3& l, const bool negative_side, const K& k) { # 95 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h" typedef typename K::Point_3 Point_3; typename K::Construct_segment_3 segment = k.construct_segment_3_object(); const Point_3 l_bc = t3l3_intersection_coplanar_aux(l,b,c,k); const Point_3 l_ca = t3l3_intersection_coplanar_aux(l,c,a,k); if ( negative_side ) return make_object(segment(l_bc, l_ca)); else return make_object(segment(l_ca, l_bc)); } template Object intersection_coplanar(const typename K::Triangle_3 &t, const typename K::Line_3 &l, const K & k ) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 117)) ; (CGAL::possibly(! k.is_degenerate_3_object()(l))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(l)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 118)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); typename K::Construct_segment_3 segment = k.construct_segment_3_object(); const Point_3 & p = point_on(l,0); const Point_3 & q = point_on(l,1); const Point_3 & A = vertex_on(t,0); const Point_3 & B = vertex_on(t,1); const Point_3 & C = vertex_on(t,2); int k0 = 0; int k1 = 1; int k2 = 2; if (coplanar_orientation(A,B,C) != POSITIVE) { std::swap(k1,k2); } const Point_3& a = vertex_on(t,k0); const Point_3& b = vertex_on(t,k1); const Point_3& c = vertex_on(t,k2); const Orientation pqa = coplanar_orientation(p,q,a); const Orientation pqb = coplanar_orientation(p,q,b); const Orientation pqc = coplanar_orientation(p,q,c); switch ( pqa ) { case POSITIVE: switch ( pqb ) { case POSITIVE: switch ( pqc ) { case POSITIVE: return Object(); case NEGATIVE: return t3l3_intersection_coplanar_aux(a,b,c,l,true,k); case COLLINEAR: return make_object(c); } case NEGATIVE: if ( POSITIVE == pqc ) return t3l3_intersection_coplanar_aux(c,a,b,l,true,k); else return t3l3_intersection_coplanar_aux(b,c,a,l,false,k); case COLLINEAR: switch ( pqc ) { case POSITIVE: return make_object(b); case NEGATIVE: return t3l3_intersection_coplanar_aux(b,c,a,l,false,k); case COLLINEAR: return make_object(segment(b,c)); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 204 ); return Object(); } case NEGATIVE: switch ( pqb ) { case POSITIVE: if ( POSITIVE == pqc ) return t3l3_intersection_coplanar_aux(b,c,a,l,true,k); else return t3l3_intersection_coplanar_aux(c,a,b,l,false,k); case NEGATIVE: switch ( pqc ) { case POSITIVE: return t3l3_intersection_coplanar_aux(a,b,c,l,false,k); case NEGATIVE: return Object(); case COLLINEAR: return make_object(c); } case COLLINEAR: switch ( pqc ) { case POSITIVE: return t3l3_intersection_coplanar_aux(b,c,a,l,true,k); case NEGATIVE: return make_object(b); case COLLINEAR: return make_object(segment(c,b)); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 249 ); return Object(); } case COLLINEAR: switch ( pqb ) { case POSITIVE: switch ( pqc ) { case POSITIVE: return make_object(a); case NEGATIVE: return t3l3_intersection_coplanar_aux(c,a,b,l,false,k); case COLLINEAR: return make_object(segment(c,a)); } case NEGATIVE: switch ( pqc ) { case POSITIVE: return t3l3_intersection_coplanar_aux(c,a,b,l,true,k); case NEGATIVE: return make_object(a); case COLLINEAR: return make_object(segment(a,c)); } case COLLINEAR: switch ( pqc ) { case POSITIVE: return make_object(segment(a,b)); case NEGATIVE: return make_object(segment(b,a)); case COLLINEAR: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 295 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 300 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 305 ); return Object(); } } template inline Object t3l3_intersection_aux(const typename K::Triangle_3 &t, const typename K::Line_3 &l, const K& k) { typename K::Intersect_3 intersection = k.intersect_3_object(); Object obj = intersection(l,t.supporting_plane()); if ( obj.is() ) return Object(); else return obj; } template Object intersection(const typename K::Triangle_3 &t, const typename K::Line_3 &l, const K& k) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 337)) ; (CGAL::possibly(! k.is_degenerate_3_object()(l))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(l)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 338)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); const Point_3 & a = vertex_on(t,0); const Point_3 & b = vertex_on(t,1); const Point_3 & c = vertex_on(t,2); const Point_3 & p = point_on(l,0); const Point_3 & q = point_on(l,1); if ( ( orientation(a,b,c,p) != COPLANAR ) || ( orientation(a,b,c,q) != COPLANAR ) ) { const Orientation pqab = orientation(p,q,a,b); const Orientation pqbc = orientation(p,q,b,c); switch ( pqab ) { case POSITIVE: if ( pqbc != NEGATIVE && orientation(p,q,c,a) != NEGATIVE ) return t3l3_intersection_aux(t,l,k); else return Object(); case NEGATIVE: if ( pqbc != POSITIVE && orientation(p,q,c,a) != POSITIVE ) return t3l3_intersection_aux(t,l,k); else return Object(); case COPLANAR: switch ( pqbc ) { case POSITIVE: if ( orientation(p,q,c,a) != NEGATIVE ) return t3l3_intersection_aux(t,l,k); else return Object(); case NEGATIVE: if ( orientation(p,q,c,a) != POSITIVE ) return t3l3_intersection_aux(t,l,k); else return Object(); case COPLANAR: return t3l3_intersection_aux(t,l,k); default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 393 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Line_3_intersection.h", 398 ); return Object(); } } return intersection_coplanar(t,l,k); } template Object intersection(const typename K::Line_3 &l, const typename K::Triangle_3 &t, const K& k) { return internal::intersection(t,l,k); } } template inline Object intersection(const Triangle_3 &t, const Line_3 &l) { return typename K::Intersect_3()(t,l); } template inline Object intersection(const Line_3 &l, const Triangle_3 &t) { return typename K::Intersect_3()(t,l); } } # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h" namespace CGAL { namespace internal { template typename K::Point_3 t3r3_intersection_coplanar_aux(const typename K::Point_3& p, const typename K::Vector_3& v, const typename K::Point_3& a, const typename K::Point_3& b, const K& k) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::FT FT; typename K::Construct_vector_3 vector = k.construct_vector_3_object(); typename K::Construct_cross_product_vector_3 cross_product = k.construct_cross_product_vector_3_object(); typename K::Compute_scalar_product_3 scalar_product = k.compute_scalar_product_3_object(); typename K::Compute_squared_length_3 sq_length = k.compute_squared_length_3_object(); const Vector_3 ab = vector(a,b); const Vector_3 pa = vector(p,a); const Vector_3 pa_ab = cross_product(pa,ab); const Vector_3 v_ab = cross_product(v,ab); const FT t = scalar_product(pa_ab,v_ab) / sq_length(v_ab); return ( p + t*v ); } template Object t3r3_intersection_coplanar_aux(const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& c, const typename K::Ray_3& r, const bool negative_side, const K& k) { # 96 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h" typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); typename K::Construct_segment_3 segment = k.construct_segment_3_object(); typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); const Point_3& p = point_on(r,0); Orientation cap = negative_side ? coplanar_orientation(c,a,p) : coplanar_orientation(b,c,p); switch ( cap ) { case NEGATIVE: return Object(); case COLLINEAR: return make_object(p); case POSITIVE: { Vector_3 v = r.to_vector(); Point_3 p_side_end_point(p); Point_3 q_side_end_point; if ( negative_side ) { if ( NEGATIVE == coplanar_orientation(b,c,p) ) p_side_end_point = t3r3_intersection_coplanar_aux(p,v,b,c,k); q_side_end_point = t3r3_intersection_coplanar_aux(p,v,c,a,k); } else { if ( NEGATIVE == coplanar_orientation(c,a,p) ) p_side_end_point = t3r3_intersection_coplanar_aux(p,v,c,a,k); q_side_end_point = t3r3_intersection_coplanar_aux(p,v,b,c,k); } return make_object(segment(p_side_end_point, q_side_end_point)); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 157 ); return Object(); } ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 161 ); return Object(); } template Object intersection_coplanar(const typename K::Triangle_3 &t, const typename K::Ray_3 &r, const K & k ) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 172)) ; (CGAL::possibly(! k.is_degenerate_3_object()(r))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(r)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 173)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); typename K::Construct_segment_3 segment = k.construct_segment_3_object(); typename K::Collinear_are_ordered_along_line_3 collinear_ordered = k.collinear_are_ordered_along_line_3_object(); const Point_3 & p = point_on(r,0); const Point_3 & q = point_on(r,1); const Point_3 & A = vertex_on(t,0); const Point_3 & B = vertex_on(t,1); const Point_3 & C = vertex_on(t,2); int k0 = 0; int k1 = 1; int k2 = 2; if (coplanar_orientation(A,B,C) != POSITIVE) { std::swap(k1,k2); } const Point_3& a = vertex_on(t,k0); const Point_3& b = vertex_on(t,k1); const Point_3& c = vertex_on(t,k2); const Orientation pqa = coplanar_orientation(p,q,a); const Orientation pqb = coplanar_orientation(p,q,b); const Orientation pqc = coplanar_orientation(p,q,c); switch ( pqa ) { case POSITIVE: switch ( pqb ) { case POSITIVE: switch ( pqc ) { case POSITIVE: return Object(); case NEGATIVE: return t3r3_intersection_coplanar_aux(a,b,c,r,true,k); case COLLINEAR: if ( collinear_ordered(p,c,q) || collinear_ordered(p,q,c) ) return make_object(c); else return Object(); } case NEGATIVE: if ( POSITIVE == pqc ) return t3r3_intersection_coplanar_aux(c,a,b,r,true,k); else return t3r3_intersection_coplanar_aux(b,c,a,r,false,k); case COLLINEAR: switch ( pqc ) { case POSITIVE: if ( collinear_ordered(p,b,q) || collinear_ordered(p,q,b) ) return make_object(b); else return Object(); case NEGATIVE: return t3r3_intersection_coplanar_aux(b,c,a,r,false,k); case COLLINEAR: if ( collinear_ordered(p,b,c) ) return make_object(segment(b,c)); else return make_object(segment(p,c)); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 279 ); return Object(); } case NEGATIVE: switch ( pqb ) { case POSITIVE: if ( POSITIVE == pqc ) return t3r3_intersection_coplanar_aux(b,c,a,r,true,k); else return t3r3_intersection_coplanar_aux(c,a,b,r,false,k); case NEGATIVE: switch ( pqc ) { case POSITIVE: return t3r3_intersection_coplanar_aux(a,b,c,r,false,k); case NEGATIVE: return Object(); case COLLINEAR: if ( collinear_ordered(p,c,q) || collinear_ordered(p,q,c) ) return make_object(c); else return Object(); } case COLLINEAR: switch ( pqc ) { case POSITIVE: return t3r3_intersection_coplanar_aux(b,c,a,r,true,k); case NEGATIVE: if ( collinear_ordered(p,b,q) || collinear_ordered(p,q,b) ) return make_object(b); else return Object(); case COLLINEAR: if ( collinear_ordered(p,c,b) ) return make_object(segment(c,b)); else return make_object(segment(p,b)); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 339 ); return Object(); } case COLLINEAR: switch ( pqb ) { case POSITIVE: switch ( pqc ) { case POSITIVE: if ( collinear_ordered(p,a,q) || collinear_ordered(p,q,a) ) return make_object(a); else return Object(); case NEGATIVE: return t3r3_intersection_coplanar_aux(c,a,b,r,false,k); case COLLINEAR: if ( collinear_ordered(p,c,a) ) return make_object(segment(c,a)); else return make_object(segment(p,a)); } case NEGATIVE: switch ( pqc ) { case POSITIVE: return t3r3_intersection_coplanar_aux(c,a,b,r,true,k); case NEGATIVE: if ( collinear_ordered(p,a,q) || collinear_ordered(p,q,a) ) return make_object(a); else return Object(); case COLLINEAR: if ( collinear_ordered(p,a,c) ) return make_object(segment(a,c)); else return make_object(segment(p,c)); } case COLLINEAR: switch ( pqc ) { case POSITIVE: if ( collinear_ordered(p,a,b) ) return make_object(segment(a,b)); else return make_object(segment(p,b)); case NEGATIVE: if ( collinear_ordered(p,b,a) ) return make_object(segment(b,a)); else return make_object(segment(p,a)); case COLLINEAR: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 411 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 416 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 421 ); return Object(); } } template inline Object t3r3_intersection_aux(const typename K::Triangle_3 &t, const typename K::Ray_3 &r, const K& k) { typename K::Intersect_3 intersection = k.intersect_3_object(); Object obj = intersection(r.supporting_line(),t.supporting_plane()); if ( obj.is() ) return Object(); else return obj; } template Object intersection(const typename K::Triangle_3 &t, const typename K::Ray_3 &r, const K& k) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 453)) ; (CGAL::possibly(! k.is_degenerate_3_object()(r))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(r)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 454)) ; typedef typename K::Point_3 Point_3; typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); typename K::Construct_ray_3 ray = k.construct_ray_3_object(); typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); const Point_3& a = vertex_on(t,0); const Point_3& b = vertex_on(t,1); const Point_3& c = vertex_on(t,2); const Point_3& p = point_on(r,0); const Point_3& q = point_on(r,1); Point_3 d = point_on(ray(a,r.to_vector()),1); const Orientation ray_direction = orientation(a,b,c,d); const Orientation abcp = orientation(a,b,c,p); switch ( abcp ) { case POSITIVE: switch ( ray_direction ) { case POSITIVE: return Object(); case NEGATIVE: if ( orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) return t3r3_intersection_aux(t,r,k); else return Object(); case COPLANAR: return Object(); default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 505 ); return Object(); } case NEGATIVE: switch ( ray_direction ) { case POSITIVE: if ( orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) return t3r3_intersection_aux(t,r,k); else return Object(); case NEGATIVE: return Object(); case COPLANAR: return Object(); default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 532 ); return Object(); } case COPLANAR: switch ( ray_direction ) { case POSITIVE: if ( orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) return t3r3_intersection_aux(t,r,k); else return Object(); case NEGATIVE: if ( orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) return t3r3_intersection_aux(t,r,k); else return Object(); case COPLANAR: return intersection_coplanar(t,r,k); default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 561 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 566 ); return Object(); } ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Ray_3_intersection.h", 570 ); return Object(); } } template inline Object intersection(const Triangle_3 &t, const Ray_3 &r) { return typename K::Intersect_3()(t, r); } template inline Object intersection(const Ray_3 &r, const Triangle_3 &t) { return typename K::Intersect_3()(t, r); } } # 48 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h" namespace CGAL { namespace internal { template typename K::Point_3 t3s3_intersection_coplanar_aux(const typename K::Point_3& p, const typename K::Point_3& q, const typename K::Point_3& a, const typename K::Point_3& b, const K& k) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::FT FT; typename K::Construct_vector_3 vector = k.construct_vector_3_object(); typename K::Construct_cross_product_vector_3 cross_product = k.construct_cross_product_vector_3_object(); typename K::Compute_scalar_product_3 scalar_product = k.compute_scalar_product_3_object(); typename K::Compute_squared_length_3 sq_length = k.compute_squared_length_3_object(); const Vector_3 pq = vector(p,q); const Vector_3 ab = vector(a,b); const Vector_3 pa = vector(p,a); const Vector_3 pa_ab = cross_product(pa,ab); const Vector_3 pq_ab = cross_product(pq,ab); const FT t = scalar_product(pa_ab,pq_ab) / sq_length(pq_ab); return ( p + t*pq ); } template Object t3s3_intersection_coplanar_aux(const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& c, const typename K::Point_3& p, const typename K::Point_3& q, const bool negative_side, const K& k) { # 97 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h" typedef typename K::Point_3 Point_3; typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); typename K::Construct_segment_3 segment = k.construct_segment_3_object(); const Orientation bcq = coplanar_orientation(b,c,q); const Orientation cap = coplanar_orientation(c,a,p); if ( NEGATIVE == bcq || NEGATIVE == cap ) return Object(); else if ( COLLINEAR == bcq ) return make_object(q); else if ( COLLINEAR == cap ) return make_object(p); else { Point_3 p_side_end_point(p); if ( NEGATIVE == coplanar_orientation(b,c,p) ) { p_side_end_point = t3s3_intersection_coplanar_aux(p,q,b,c,k); } Point_3 q_side_end_point(q); if ( NEGATIVE == coplanar_orientation(c,a,q) ) { q_side_end_point = t3s3_intersection_coplanar_aux(p,q,c,a,k); } if ( negative_side ) return make_object(segment(p_side_end_point, q_side_end_point)); else return make_object(segment(q_side_end_point, p_side_end_point)); } } template Object t3s3_intersection_collinear_aux(const typename K::Point_3& a, const typename K::Point_3& b, const typename K::Point_3& p, const typename K::Point_3& q, const K& k) { typename K::Construct_segment_3 segment = k.construct_segment_3_object(); typename K::Collinear_are_ordered_along_line_3 collinear_ordered = k.collinear_are_ordered_along_line_3_object(); typename K::Equal_3 equals = k.equal_3_object(); if ( collinear_ordered(p,a,q) ) { if ( collinear_ordered(p,b,q) ) return make_object(segment(a,b)); else return equals(a,q)? make_object(a): make_object(segment(a,q)); } else { if ( collinear_ordered(p,b,q) ) return equals(p,b)? make_object(p): make_object(segment(p,b)); else return make_object(segment(p,q)); } } template Object intersection_coplanar(const typename K::Triangle_3 &t, const typename K::Segment_3 &s, const K & k ) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 190)) ; (CGAL::possibly(! k.is_degenerate_3_object()(s))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(s)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 191)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Coplanar_orientation_3 coplanar_orientation = k.coplanar_orientation_3_object(); typename K::Collinear_are_ordered_along_line_3 collinear_ordered = k.collinear_are_ordered_along_line_3_object(); const Point_3 & p = point_on(s,0); const Point_3 & q = point_on(s,1); const Point_3 & A = vertex_on(t,0); const Point_3 & B = vertex_on(t,1); const Point_3 & C = vertex_on(t,2); int k0 = 0; int k1 = 1; int k2 = 2; if (coplanar_orientation(A,B,C) != POSITIVE) { std::swap(k1,k2); } const Point_3& a = vertex_on(t,k0); const Point_3& b = vertex_on(t,k1); const Point_3& c = vertex_on(t,k2); const Orientation pqa = coplanar_orientation(p,q,a); const Orientation pqb = coplanar_orientation(p,q,b); const Orientation pqc = coplanar_orientation(p,q,c); switch ( pqa ) { case POSITIVE: switch ( pqb ) { case POSITIVE: switch ( pqc ) { case POSITIVE: return Object(); case NEGATIVE: return t3s3_intersection_coplanar_aux(a,b,c,p,q,true,k); case COLLINEAR: if ( collinear_ordered(p,c,q) ) return make_object(c); else return Object(); } case NEGATIVE: if ( POSITIVE == pqc ) return t3s3_intersection_coplanar_aux(c,a,b,p,q,true,k); else return t3s3_intersection_coplanar_aux(b,c,a,q,p,false,k); case COLLINEAR: switch ( pqc ) { case POSITIVE: if ( collinear_ordered(p,b,q) ) return make_object(b); else return Object(); case NEGATIVE: return t3s3_intersection_coplanar_aux(b,c,a,q,p,false,k); case COLLINEAR: return t3s3_intersection_collinear_aux(b,c,p,q,k); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 283 ); return Object(); } case NEGATIVE: switch ( pqb ) { case POSITIVE: if ( POSITIVE == pqc ) return t3s3_intersection_coplanar_aux(b,c,a,p,q,true,k); else return t3s3_intersection_coplanar_aux(c,a,b,q,p,false,k); case NEGATIVE: switch ( pqc ) { case POSITIVE: return t3s3_intersection_coplanar_aux(a,b,c,q,p,false,k); case NEGATIVE: return Object(); case COLLINEAR: if ( collinear_ordered(p,c,q) ) return make_object(c); else return Object(); } case COLLINEAR: switch ( pqc ) { case POSITIVE: return t3s3_intersection_coplanar_aux(b,c,a,p,q,true,k); case NEGATIVE: if ( collinear_ordered(p,b,q) ) return make_object(b); else return Object(); case COLLINEAR: return t3s3_intersection_collinear_aux(c,b,p,q,k); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 332 ); return Object(); } case COLLINEAR: switch ( pqb ) { case POSITIVE: switch ( pqc ) { case POSITIVE: if ( collinear_ordered(p,a,q) ) return make_object(a); else return Object(); case NEGATIVE: return t3s3_intersection_coplanar_aux(c,a,b,q,p,false,k); case COLLINEAR: return t3s3_intersection_collinear_aux(c,a,p,q,k); } case NEGATIVE: switch ( pqc ) { case POSITIVE: return t3s3_intersection_coplanar_aux(c,a,b,p,q,true,k); case NEGATIVE: if ( collinear_ordered(p,a,q) ) return make_object(a); else return Object(); case COLLINEAR: return t3s3_intersection_collinear_aux(a,c,p,q,k); } case COLLINEAR: switch ( pqc ) { case POSITIVE: return t3s3_intersection_collinear_aux(a,b,p,q,k); case NEGATIVE: return t3s3_intersection_collinear_aux(b,a,p,q,k); case COLLINEAR: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 382 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 387 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 392 ); return Object(); } } template Object intersection(const typename K::Triangle_3 &t, const typename K::Segment_3 &s, const K & k) { (CGAL::possibly(! k.is_degenerate_3_object()(t))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(t)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 404)) ; (CGAL::possibly(! k.is_degenerate_3_object()(s))?(static_cast(0)): ::CGAL::precondition_fail( "! k.is_degenerate_3_object()(s)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 405)) ; typedef typename K::Point_3 Point_3; typename K::Construct_point_on_3 point_on = k.construct_point_on_3_object(); typename K::Construct_vertex_3 vertex_on = k.construct_vertex_3_object(); typename K::Orientation_3 orientation = k.orientation_3_object(); typename K::Intersect_3 intersection = k.intersect_3_object(); const Point_3 & a = vertex_on(t,0); const Point_3 & b = vertex_on(t,1); const Point_3 & c = vertex_on(t,2); const Point_3 & p = point_on(s,0); const Point_3 & q = point_on(s,1); const Orientation abcp = orientation(a,b,c,p); const Orientation abcq = orientation(a,b,c,q); switch ( abcp ) { case POSITIVE: switch ( abcq ) { case POSITIVE: return Object(); case NEGATIVE: if ( orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) { Object obj = intersection(s.supporting_line(),t.supporting_plane()); if ( obj.is() ) return Object(); else return obj; } else return Object(); case COPLANAR: if ( orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) return make_object(q); else return Object(); default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 465 ); return Object(); } case NEGATIVE: switch ( abcq ) { case POSITIVE: if ( orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) { Object obj = intersection(s.supporting_line(),t.supporting_plane()); if ( obj.is() ) return Object(); else return obj; } else return Object(); case NEGATIVE: return Object(); case COPLANAR: if ( orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) return make_object(q); else return Object(); default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 501 ); return Object(); } case COPLANAR: switch ( abcq ) { case POSITIVE: if ( orientation(q,p,a,b) != POSITIVE && orientation(q,p,b,c) != POSITIVE && orientation(q,p,c,a) != POSITIVE ) return make_object(p); else return Object(); case NEGATIVE: if ( orientation(p,q,a,b) != POSITIVE && orientation(p,q,b,c) != POSITIVE && orientation(p,q,c,a) != POSITIVE ) return make_object(p); else return Object(); case COPLANAR: return intersection_coplanar(t,s,k); default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 531 ); return Object(); } default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h", 535 ); return Object(); } } template inline Object intersection(const typename K::Segment_3 &s, const typename K::Triangle_3 &t, const K & k) { return internal::intersection(t,s,k); } } template inline Object intersection(const Triangle_3 &t, const Segment_3 &s) { return typename K::Intersect_3()(t, s); } template inline Object intersection(const Segment_3 &s, const Triangle_3 &t) { return typename K::Intersect_3()(t, s); } } # 49 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_intersection.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_intersection.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/list" 1 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/list" 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/list" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 1 3 # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { namespace __detail { # 78 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 struct _List_node_base { _List_node_base* _M_next; _List_node_base* _M_prev; static void swap(_List_node_base& __x, _List_node_base& __y) noexcept; void _M_transfer(_List_node_base* const __first, _List_node_base* const __last) noexcept; void _M_reverse() noexcept; void _M_hook(_List_node_base* const __position) noexcept; void _M_unhook() noexcept; }; } template struct _List_node : public __detail::_List_node_base { _Tp _M_data; template _List_node(_Args&&... __args) : __detail::_List_node_base(), _M_data(std::forward<_Args>(__args)...) { } }; template struct _List_iterator { typedef _List_iterator<_Tp> _Self; typedef _List_node<_Tp> _Node; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef _Tp* pointer; typedef _Tp& reference; _List_iterator() : _M_node() { } explicit _List_iterator(__detail::_List_node_base* __x) : _M_node(__x) { } reference operator*() const { return static_cast<_Node*>(_M_node)->_M_data; } pointer operator->() const { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } _Self& operator++() { _M_node = _M_node->_M_next; return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _M_node->_M_next; return __tmp; } _Self& operator--() { _M_node = _M_node->_M_prev; return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _M_node->_M_prev; return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } __detail::_List_node_base* _M_node; }; template struct _List_const_iterator { typedef _List_const_iterator<_Tp> _Self; typedef const _List_node<_Tp> _Node; typedef _List_iterator<_Tp> iterator; typedef ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef const _Tp* pointer; typedef const _Tp& reference; _List_const_iterator() : _M_node() { } explicit _List_const_iterator(const __detail::_List_node_base* __x) : _M_node(__x) { } _List_const_iterator(const iterator& __x) : _M_node(__x._M_node) { } reference operator*() const { return static_cast<_Node*>(_M_node)->_M_data; } pointer operator->() const { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } _Self& operator++() { _M_node = _M_node->_M_next; return *this; } _Self operator++(int) { _Self __tmp = *this; _M_node = _M_node->_M_next; return __tmp; } _Self& operator--() { _M_node = _M_node->_M_prev; return *this; } _Self operator--(int) { _Self __tmp = *this; _M_node = _M_node->_M_prev; return __tmp; } bool operator==(const _Self& __x) const { return _M_node == __x._M_node; } bool operator!=(const _Self& __x) const { return _M_node != __x._M_node; } const __detail::_List_node_base* _M_node; }; template inline bool operator==(const _List_iterator<_Val>& __x, const _List_const_iterator<_Val>& __y) { return __x._M_node == __y._M_node; } template inline bool operator!=(const _List_iterator<_Val>& __x, const _List_const_iterator<_Val>& __y) { return __x._M_node != __y._M_node; } template class _List_base { protected: # 306 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 typedef typename _Alloc::template rebind<_List_node<_Tp> >::other _Node_alloc_type; typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _List_impl : public _Node_alloc_type { __detail::_List_node_base _M_node; size_t _M_size; _List_impl() : _Node_alloc_type(), _M_node() , _M_size(0) { } _List_impl(const _Node_alloc_type& __a) : _Node_alloc_type(__a), _M_node() , _M_size(0) { } _List_impl(_Node_alloc_type&& __a) : _Node_alloc_type(std::move(__a)), _M_node(), _M_size(0) { } }; _List_impl _M_impl; _List_node<_Tp>* _M_get_node() { _List_node<_Tp>* __tmp = _M_impl._Node_alloc_type::allocate(1); ++_M_impl._M_size; return __tmp; } void _M_put_node(_List_node<_Tp>* __p) { _M_impl._Node_alloc_type::deallocate(__p, 1); --_M_impl._M_size; } public: typedef _Alloc allocator_type; _Node_alloc_type& _M_get_Node_allocator() noexcept { return *static_cast<_Node_alloc_type*>(&_M_impl); } const _Node_alloc_type& _M_get_Node_allocator() const noexcept { return *static_cast(&_M_impl); } _Tp_alloc_type _M_get_Tp_allocator() const noexcept { return _Tp_alloc_type(_M_get_Node_allocator()); } allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Node_allocator()); } _List_base() : _M_impl() { _M_init(); } _List_base(const _Node_alloc_type& __a) : _M_impl(__a) { _M_init(); } _List_base(_List_base&& __x) : _M_impl(std::move(__x._M_get_Node_allocator())) { _M_init(); __detail::_List_node_base::swap(_M_impl._M_node, __x._M_impl._M_node); std::swap(_M_impl._M_size, __x._M_impl._M_size); } ~_List_base() noexcept { _M_clear(); } void _M_clear(); void _M_init() { this->_M_impl._M_node._M_next = &this->_M_impl._M_node; this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; } }; # 457 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template > class list : protected _List_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; typedef _List_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; typedef typename _Base::_Node_alloc_type _Node_alloc_type; public: typedef _Tp value_type; typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef typename _Tp_alloc_type::reference reference; typedef typename _Tp_alloc_type::const_reference const_reference; typedef _List_iterator<_Tp> iterator; typedef _List_const_iterator<_Tp> const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: typedef _List_node<_Tp> _Node; using _Base::_M_impl; using _Base::_M_put_node; using _Base::_M_get_node; using _Base::_M_get_Tp_allocator; using _Base::_M_get_Node_allocator; # 518 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template _Node* _M_create_node(_Args&&... __args) { _Node* __p = this->_M_get_node(); try { _M_get_Node_allocator().construct(__p, std::forward<_Args>(__args)...); } catch(...) { _M_put_node(__p); throw; } return __p; } public: list() : _Base() { } explicit list(const allocator_type& __a) : _Base(_Node_alloc_type(__a)) { } # 562 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 explicit list(size_type __n) : _Base() { _M_default_initialize(__n); } # 575 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 list(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) : _Base(_Node_alloc_type(__a)) { _M_fill_initialize(__n, __value); } # 602 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 list(const list& __x) : _Base(__x._M_get_Node_allocator()) { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } # 614 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 list(list&& __x) noexcept : _Base(std::move(__x)) { } # 625 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 list(initializer_list __l, const allocator_type& __a = allocator_type()) : _Base(_Node_alloc_type(__a)) { _M_initialize_dispatch(__l.begin(), __l.end(), __false_type()); } # 641 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template list(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(_Node_alloc_type(__a)) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } # 666 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 list& operator=(const list& __x); # 677 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 list& operator=(list&& __x) { this->clear(); this->swap(__x); return *this; } # 694 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 list& operator=(initializer_list __l) { this->assign(__l.begin(), __l.end()); return *this; } # 712 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 728 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } # 745 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void assign(initializer_list __l) { this->assign(__l.begin(), __l.end()); } allocator_type get_allocator() const noexcept { return _Base::get_allocator(); } iterator begin() noexcept { return iterator(this->_M_impl._M_node._M_next); } const_iterator begin() const noexcept { return const_iterator(this->_M_impl._M_node._M_next); } iterator end() noexcept { return iterator(&this->_M_impl._M_node); } const_iterator end() const noexcept { return const_iterator(&this->_M_impl._M_node); } reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); } reverse_iterator rend() noexcept { return reverse_iterator(begin()); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); } const_iterator cbegin() const noexcept { return const_iterator(this->_M_impl._M_node._M_next); } const_iterator cend() const noexcept { return const_iterator(&this->_M_impl._M_node); } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(end()); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(begin()); } bool empty() const noexcept { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } size_type size() const noexcept { return this->_M_impl._M_size; } size_type max_size() const noexcept { return _M_get_Node_allocator().max_size(); } # 900 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void resize(size_type __new_size); # 913 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void resize(size_type __new_size, const value_type& __x); # 935 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator __tmp = end(); --__tmp; return *__tmp; } const_reference back() const { const_iterator __tmp = end(); --__tmp; return *__tmp; } # 982 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void push_front(const value_type& __x) { this->_M_insert(begin(), __x); } void push_front(value_type&& __x) { this->_M_insert(begin(), std::move(__x)); } template void emplace_front(_Args&&... __args) { this->_M_insert(begin(), std::forward<_Args>(__args)...); } # 1009 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void pop_front() { this->_M_erase(begin()); } # 1023 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void push_back(const value_type& __x) { this->_M_insert(end(), __x); } void push_back(value_type&& __x) { this->_M_insert(end(), std::move(__x)); } template void emplace_back(_Args&&... __args) { this->_M_insert(end(), std::forward<_Args>(__args)...); } # 1049 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void pop_back() { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } # 1066 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template iterator emplace(iterator __position, _Args&&... __args); # 1082 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 iterator insert(iterator __position, const value_type& __x); # 1097 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 iterator insert(iterator __position, value_type&& __x) { return emplace(__position, std::move(__x)); } # 1114 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void insert(iterator __p, initializer_list __l) { this->insert(__p, __l.begin(), __l.end()); } # 1131 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void insert(iterator __position, size_type __n, const value_type& __x) { list __tmp(__n, __x, get_allocator()); splice(__position, __tmp); } # 1151 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { list __tmp(__first, __last, get_allocator()); splice(__position, __tmp); } # 1175 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 iterator erase(iterator __position); # 1196 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 iterator erase(iterator __first, iterator __last) { while (__first != __last) __first = erase(__first); return __last; } # 1213 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void swap(list& __x) { __detail::_List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); std::swap(this->_M_impl._M_size, __x._M_impl._M_size); std::__alloc_swap:: _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); } void clear() noexcept { _Base::_M_clear(); _Base::_M_init(); } # 1253 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void splice(iterator __position, list&& __x) { if (!__x.empty()) { _M_check_equal_allocators(__x); this->_M_transfer(__position, __x.begin(), __x.end()); this->_M_impl._M_size += __x.size(); __x._M_impl._M_size = 0; } } void splice(iterator __position, list& __x) { splice(__position, std::move(__x)); } # 1288 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void splice(iterator __position, list&& __x, iterator __i) { iterator __j = __i; ++__j; if (__position == __i || __position == __j) return; if (this != &__x) { _M_check_equal_allocators(__x); ++this->_M_impl._M_size; --__x._M_impl._M_size; } this->_M_transfer(__position, __i, __j); } void splice(iterator __position, list& __x, iterator __i) { splice(__position, std::move(__x), __i); } # 1331 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void splice(iterator __position, list&& __x, iterator __first, iterator __last) { if (__first != __last) { if (this != &__x) { _M_check_equal_allocators(__x); const size_type __size = std::distance(__first, __last); this->_M_impl._M_size += __size; __x._M_impl._M_size -= __size; } this->_M_transfer(__position, __first, __last); } } void splice(iterator __position, list& __x, iterator __first, iterator __last) { splice(__position, std::move(__x), __first, __last); } # 1374 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void remove(const _Tp& __value); # 1388 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template void remove_if(_Predicate); # 1402 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void unique(); # 1417 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template void unique(_BinaryPredicate); # 1431 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void merge(list&& __x); void merge(list& __x) { merge(std::move(__x)); } # 1455 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template void merge(list&& __x, _StrictWeakOrdering __comp); template void merge(list& __x, _StrictWeakOrdering __comp) { merge(std::move(__x), __comp); } # 1474 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 void reverse() noexcept { this->_M_impl._M_node._M_reverse(); } void sort(); template void sort(_StrictWeakOrdering); protected: template void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_fill_initialize(static_cast(__n), __x); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { for (; __first != __last; ++__first) push_back(*__first); } void _M_fill_initialize(size_type __n, const value_type& __x) { for (; __n; --__n) push_back(__x); } void _M_default_initialize(size_type __n) { for (; __n; --__n) emplace_back(); } void _M_default_append(size_type __n); # 1548 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type); void _M_fill_assign(size_type __n, const value_type& __val); void _M_transfer(iterator __position, iterator __first, iterator __last) { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } # 1579 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template void _M_insert(iterator __position, _Args&&... __args) { _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); __tmp->_M_hook(__position._M_node); } void _M_erase(iterator __position) { __position._M_node->_M_unhook(); _Node* __n = static_cast<_Node*>(__position._M_node); _M_get_Node_allocator().destroy(__n); _M_put_node(__n); } void _M_check_equal_allocators(list& __x) { if (std::__alloc_neq:: _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) __throw_runtime_error(("list::_M_check_equal_allocators")); } }; # 1622 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template inline bool operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return (__x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin())); # 1643 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 } # 1656 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_list.h" 3 template inline bool operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) { return !(__x < __y); } template inline void swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) { __x.swap(__y); } } # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/list" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/list.tcc" 1 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/list.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void _List_base<_Tp, _Alloc>:: _M_clear() { typedef _List_node<_Tp> _Node; _Node* __cur = static_cast<_Node*>(_M_impl._M_node._M_next); while (__cur != &_M_impl._M_node) { _Node* __tmp = __cur; __cur = static_cast<_Node*>(__cur->_M_next); _M_get_Node_allocator().destroy(__tmp); _M_put_node(__tmp); } } template template typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>:: emplace(iterator __position, _Args&&... __args) { _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); __tmp->_M_hook(__position._M_node); return iterator(__tmp); } template typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>:: insert(iterator __position, const value_type& __x) { _Node* __tmp = _M_create_node(__x); __tmp->_M_hook(__position._M_node); return iterator(__tmp); } template typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>:: erase(iterator __position) { iterator __ret = iterator(__position._M_node->_M_next); _M_erase(__position); return __ret; } template void list<_Tp, _Alloc>:: _M_default_append(size_type __n) { size_type __i = 0; try { for (; __i < __n; ++__i) emplace_back(); } catch(...) { for (; __i; --__i) pop_back(); throw; } } template void list<_Tp, _Alloc>:: resize(size_type __new_size) { if (__new_size > size()) _M_default_append(__new_size - size()); else if (__new_size < size()) { iterator __i = begin(); std::advance(__i, __new_size); erase(__i, end()); } } template void list<_Tp, _Alloc>:: resize(size_type __new_size, const value_type& __x) { if (__new_size > size()) insert(end(), __new_size - size(), __x); else if (__new_size < size()) { iterator __i = begin(); std::advance(__i, __new_size); erase(__i, end()); } } # 183 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/list.tcc" 3 template list<_Tp, _Alloc>& list<_Tp, _Alloc>:: operator=(const list& __x) { if (this != &__x) { iterator __first1 = begin(); iterator __last1 = end(); const_iterator __first2 = __x.begin(); const_iterator __last2 = __x.end(); for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) *__first1 = *__first2; if (__first2 == __last2) erase(__first1, __last1); else insert(__last1, __first2, __last2); } return *this; } template void list<_Tp, _Alloc>:: _M_fill_assign(size_type __n, const value_type& __val) { iterator __i = begin(); for (; __i != end() && __n > 0; ++__i, --__n) *__i = __val; if (__n > 0) insert(end(), __n, __val); else erase(__i, end()); } template template void list<_Tp, _Alloc>:: _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, __false_type) { iterator __first1 = begin(); iterator __last1 = end(); for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) *__first1 = *__first2; if (__first2 == __last2) erase(__first1, __last1); else insert(__last1, __first2, __last2); } template void list<_Tp, _Alloc>:: remove(const value_type& __value) { iterator __first = begin(); iterator __last = end(); iterator __extra = __last; while (__first != __last) { iterator __next = __first; ++__next; if (*__first == __value) { if (std::__addressof(*__first) != std::__addressof(__value)) _M_erase(__first); else __extra = __first; } __first = __next; } if (__extra != __last) _M_erase(__extra); } template void list<_Tp, _Alloc>:: unique() { iterator __first = begin(); iterator __last = end(); if (__first == __last) return; iterator __next = __first; while (++__next != __last) { if (*__first == *__next) _M_erase(__next); else __first = __next; __next = __first; } } template void list<_Tp, _Alloc>:: merge(list&& __x) { if (this != &__x) { _M_check_equal_allocators(__x); iterator __first1 = begin(); iterator __last1 = end(); iterator __first2 = __x.begin(); iterator __last2 = __x.end(); while (__first1 != __last1 && __first2 != __last2) if (*__first2 < *__first1) { iterator __next = __first2; _M_transfer(__first1, __first2, ++__next); __first2 = __next; } else ++__first1; if (__first2 != __last2) _M_transfer(__last1, __first2, __last2); this->_M_impl._M_size += __x.size(); __x._M_impl._M_size = 0; } } template template void list<_Tp, _Alloc>:: merge(list&& __x, _StrictWeakOrdering __comp) { if (this != &__x) { _M_check_equal_allocators(__x); iterator __first1 = begin(); iterator __last1 = end(); iterator __first2 = __x.begin(); iterator __last2 = __x.end(); while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first2, *__first1)) { iterator __next = __first2; _M_transfer(__first1, __first2, ++__next); __first2 = __next; } else ++__first1; if (__first2 != __last2) _M_transfer(__last1, __first2, __last2); this->_M_impl._M_size += __x.size(); __x._M_impl._M_size = 0; } } template void list<_Tp, _Alloc>:: sort() { if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) { list __carry; list __tmp[64]; list * __fill = &__tmp[0]; list * __counter; do { __carry.splice(__carry.begin(), *this, begin()); for(__counter = &__tmp[0]; __counter != __fill && !__counter->empty(); ++__counter) { __counter->merge(__carry); __carry.swap(*__counter); } __carry.swap(*__counter); if (__counter == __fill) ++__fill; } while ( !empty() ); for (__counter = &__tmp[1]; __counter != __fill; ++__counter) __counter->merge(*(__counter - 1)); swap( *(__fill - 1) ); } } template template void list<_Tp, _Alloc>:: remove_if(_Predicate __pred) { iterator __first = begin(); iterator __last = end(); while (__first != __last) { iterator __next = __first; ++__next; if (__pred(*__first)) _M_erase(__first); __first = __next; } } template template void list<_Tp, _Alloc>:: unique(_BinaryPredicate __binary_pred) { iterator __first = begin(); iterator __last = end(); if (__first == __last) return; iterator __next = __first; while (++__next != __last) { if (__binary_pred(*__first, *__next)) _M_erase(__next); else __first = __next; __next = __first; } } template template void list<_Tp, _Alloc>:: sort(_StrictWeakOrdering __comp) { if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) { list __carry; list __tmp[64]; list * __fill = &__tmp[0]; list * __counter; do { __carry.splice(__carry.begin(), *this, begin()); for(__counter = &__tmp[0]; __counter != __fill && !__counter->empty(); ++__counter) { __counter->merge(__carry, __comp); __carry.swap(*__counter); } __carry.swap(*__counter); if (__counter == __fill) ++__fill; } while ( !empty() ); for (__counter = &__tmp[1]; __counter != __fill; ++__counter) __counter->merge(*(__counter - 1), __comp); swap(*(__fill - 1)); } } } # 66 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/list" 2 3 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_intersection.h" 2 namespace CGAL { namespace internal{ template void intersection_coplanar_triangles_cutoff( const typename Kernel::Point_3& p, const typename Kernel::Point_3& q, const typename Kernel::Point_3& r, const Kernel& k, std::list& inter_pts ) { if ( inter_pts.empty() ) return; typedef typename std::list::iterator Iterator; typename Kernel::Coplanar_orientation_3 orient=k.coplanar_orientation_3_object(); typename Kernel::Construct_line_3 Line_3=k.construct_line_3_object(); std::map orientations; for (Iterator it=inter_pts.begin();it!=inter_pts.end();++it) orientations[ &(*it) ]=orient(p,q,r,*it); int pt_added=0; const typename Kernel::Point_3* prev = &(*boost::prior(inter_pts.end())); Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : boost::prior(inter_pts.end()); for (Iterator it=inter_pts.begin();it!=stop;++it) { const typename Kernel::Point_3& curr=*it; Orientation or_prev=orientations[prev],or_curr=orientations[&curr]; if ( (or_prev==POSITIVE && or_curr==NEGATIVE) || (or_prev==NEGATIVE && or_curr==POSITIVE) ) { Object obj= intersection(Line_3(p,q),Line_3(*prev,curr),k); const typename Kernel::Point_3* inter=object_cast(&obj); (CGAL::possibly(inter!=__null)?(static_cast(0)): ::CGAL::assertion_fail( "inter!=NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_intersection.h", 64)); prev=&(* inter_pts.insert(it,*inter) ); orientations[prev]=COLLINEAR; ++pt_added; } prev=&(*it); } (CGAL::possibly(pt_added<3)?(static_cast(0)): ::CGAL::assertion_fail( "pt_added<3" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_intersection.h", 72)); Iterator it=inter_pts.begin(); while(it!=inter_pts.end()) { if (orientations[&(*it)]==NEGATIVE) inter_pts.erase(it++); else ++it; } } template Object intersection_coplanar_triangles( const typename Kernel::Triangle_3& t1, const typename Kernel::Triangle_3& t2, const Kernel& k) { const typename Kernel::Point_3& p=t1.vertex(0),q=t1.vertex(1),r=t1.vertex(2); std::list inter_pts; inter_pts.push_back(t2.vertex(0)); inter_pts.push_back(t2.vertex(1)); inter_pts.push_back(t2.vertex(2)); intersection_coplanar_triangles_cutoff(p,q,r,k,inter_pts); intersection_coplanar_triangles_cutoff(q,r,p,k,inter_pts); intersection_coplanar_triangles_cutoff(r,p,q,k,inter_pts); switch ( inter_pts.size() ) { case 0: return Object(); case 1: return make_object( * inter_pts.begin() ); case 2: return make_object( k.construct_segment_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin())) ); case 3: return make_object( k.construct_triangle_3_object()(*inter_pts.begin(), *boost::next(inter_pts.begin()), *boost::prior(inter_pts.end())) ); default: return make_object( std::vector(inter_pts.begin(),inter_pts.end()) ); } } template Object intersection( const typename Kernel::Triangle_3& t1, const typename Kernel::Triangle_3& t2, const Kernel& k) { (CGAL::possibly(!t1.is_degenerate() && !t2.is_degenerate())?(static_cast(0)): ::CGAL::precondition_fail( "!t1.is_degenerate() && !t2.is_degenerate()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangle_3_Triangle_3_intersection.h", 126)); typename Kernel::Intersect_3 inter=k.intersect_3_object(); CGAL::Object res=inter(t1.supporting_plane(),t2.supporting_plane()); const typename Kernel::Line_3* line=CGAL::object_cast(&res); if (line==__null){ const typename Kernel::Plane_3* plane=CGAL::object_cast(&res); if (plane!=__null) return intersection_coplanar_triangles(t1,t2,k); return Object(); } Object inter1=intersection_coplanar(t1,*line,k); Object inter2=intersection_coplanar(t2,*line,k); const typename Kernel::Segment_3* sgt1=CGAL::object_cast(&inter1); if (sgt1 == __null){ const typename Kernel::Point_3* pt1=CGAL::object_cast(&inter1); if (pt1==__null) return Object(); const typename Kernel::Segment_3* sgt2=CGAL::object_cast(&inter2); if (sgt2==__null){ const typename Kernel::Point_3* pt2=CGAL::object_cast(&inter2); if (pt2==__null || *pt1!=*pt2) return Object(); return inter1; } if ( sgt2->has_on(*pt1) ) return inter1; return Object(); } const typename Kernel::Segment_3* sgt2=CGAL::object_cast(&inter2); if (sgt2==__null){ const typename Kernel::Point_3* pt2=CGAL::object_cast(&inter2); if ( pt2==__null || !sgt1->has_on(*pt2) ) return Object(); return inter2; } return intersection_collinear_segments(*sgt1,*sgt2,k); } } template inline Object intersection(const Triangle_3 &t1, const Triangle_3 &t2) { return typename K::Intersect_3()(t1, t2); } } # 50 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/intersection_3.h" 2 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" 2 namespace CGAL { namespace CommonKernelFunctors { template class Are_ordered_along_line_2 { typedef typename K::Point_2 Point_2; typedef typename K::Collinear_2 Collinear_2; typedef typename K::Collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; Collinear_2 c; Collinear_are_ordered_along_line_2 cao; public: typedef typename K::Boolean result_type; Are_ordered_along_line_2() {} Are_ordered_along_line_2(const Collinear_2& c_, const Collinear_are_ordered_along_line_2& cao_) : c(c_), cao(cao_) {} result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return c(p, q, r) && cao(p, q, r); } }; template class Are_ordered_along_line_3 { typedef typename K::Point_3 Point_3; typedef typename K::Collinear_3 Collinear_3; typedef typename K::Collinear_are_ordered_along_line_3 Collinear_are_ordered_along_line_3; Collinear_3 c; Collinear_are_ordered_along_line_3 cao; public: typedef typename K::Boolean result_type; Are_ordered_along_line_3() {} Are_ordered_along_line_3(const Collinear_3& c_, const Collinear_are_ordered_along_line_3& cao_) : c(c_), cao(cao_) {} result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return c(p, q, r) && cao(p, q, r); } }; template class Are_strictly_ordered_along_line_2 { typedef typename K::Point_2 Point_2; typedef typename K::Collinear_2 Collinear_2; typedef typename K::Collinear_are_strictly_ordered_along_line_2 Collinear_are_strictly_ordered_along_line_2; Collinear_2 c; Collinear_are_strictly_ordered_along_line_2 cao; public: typedef typename K::Boolean result_type; Are_strictly_ordered_along_line_2() {} Are_strictly_ordered_along_line_2( const Collinear_2& c_, const Collinear_are_strictly_ordered_along_line_2& cao_) : c(c_), cao(cao_) {} result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return c(p, q, r) && cao(p, q, r); } }; template class Are_strictly_ordered_along_line_3 { typedef typename K::Point_3 Point_3; typedef typename K::Collinear_3 Collinear_3; typedef typename K::Collinear_are_strictly_ordered_along_line_3 Collinear_are_strictly_ordered_along_line_3; Collinear_3 c; Collinear_are_strictly_ordered_along_line_3 cao; public: typedef typename K::Boolean result_type; Are_strictly_ordered_along_line_3() {} Are_strictly_ordered_along_line_3( const Collinear_3& c_, const Collinear_are_strictly_ordered_along_line_3& cao_) : c(c_), cao(cao_) {} result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return c(p, q, r) && cao(p, q, r); } }; template class Assign_2 { typedef typename K::Object_2 Object_2; public: typedef bool result_type; template result_type operator()(T& t, const Object_2& o) const { return assign(t, o); } }; template class Assign_3 { typedef typename K::Object_3 Object_3; public: typedef bool result_type; template result_type operator()(T& t, const Object_3& o) const { return assign(t, o); } }; template class Compare_dihedral_angle_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::FT FT; public: typedef typename K::Comparison_result result_type; result_type operator()(const Point_3& a1, const Point_3& b1, const Point_3& c1, const Point_3& d1, const Point_3& a2, const Point_3& b2, const Point_3& c2, const Point_3& d2) const { const Vector_3 ab1 = b1 - a1; const Vector_3 ac1 = c1 - a1; const Vector_3 ad1 = d1 - a1; const Vector_3 ab2 = b2 - a2; const Vector_3 ac2 = c2 - a2; const Vector_3 ad2 = d2 - a2; return this->operator()(ab1, ac1, ad1, ab2, ac2, ad2); } result_type operator()(const Point_3& a1, const Point_3& b1, const Point_3& c1, const Point_3& d1, const FT& cosine) const { const Vector_3 ab1 = b1 - a1; const Vector_3 ac1 = c1 - a1; const Vector_3 ad1 = d1 - a1; return this->operator()(ab1, ac1, ad1, cosine); } result_type operator()(const Vector_3& ab1, const Vector_3& ac1, const Vector_3& ad1, const FT& cosine) const { typedef typename K::FT FT; typedef typename K::Construct_cross_product_vector_3 Cross_product; Cross_product xproduct = K().construct_cross_product_vector_3_object(); const Vector_3 abac1 = xproduct(ab1, ac1); const Vector_3 abad1 = xproduct(ab1, ad1); const FT sc_prod_1 = abac1 * abad1; (CGAL::possibly(abac1 != NULL_VECTOR)?(static_cast(0)): ::CGAL::assertion_fail( "abac1 != NULL_VECTOR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 217 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 218 # 217 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , "ab1 and ac1 are collinear")) ; (CGAL::possibly(abad1 != NULL_VECTOR)?(static_cast(0)): ::CGAL::assertion_fail( "abad1 != NULL_VECTOR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 219 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 220 # 219 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , "ab1 and ad1 are collinear")) ; if(sc_prod_1 >= 0 ) { if(cosine >= 0) { return compare(CGAL::square(cosine)* abac1.squared_length()*abad1.squared_length(), CGAL::square(sc_prod_1)); } else { return SMALLER; } } else { if(cosine < 0) { return compare(CGAL::square(sc_prod_1), CGAL::square(cosine)* abac1.squared_length()*abad1.squared_length()); } else return LARGER; } } result_type operator()(const Vector_3& ab1, const Vector_3& ac1, const Vector_3& ad1, const Vector_3& ab2, const Vector_3& ac2, const Vector_3& ad2) const { typedef typename K::FT FT; typedef typename K::Construct_cross_product_vector_3 Cross_product; Cross_product xproduct = K().construct_cross_product_vector_3_object(); const Vector_3 abac1 = xproduct(ab1, ac1); const Vector_3 abad1 = xproduct(ab1, ad1); const FT sc_prod_1 = abac1 * abad1; const Vector_3 abac2 = xproduct(ab2, ac2); const Vector_3 abad2 = xproduct(ab2, ad2); const FT sc_prod_2 = abac2 * abad2; (CGAL::possibly(abac1 != NULL_VECTOR)?(static_cast(0)): ::CGAL::assertion_fail( "abac1 != NULL_VECTOR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 262 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 263 # 262 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , "ab1 and ac1 are collinear")) ; (CGAL::possibly(abad1 != NULL_VECTOR)?(static_cast(0)): ::CGAL::assertion_fail( "abad1 != NULL_VECTOR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 264 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 265 # 264 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , "ab1 and ad1 are collinear")) ; (CGAL::possibly(abac2 != NULL_VECTOR)?(static_cast(0)): ::CGAL::assertion_fail( "abac2 != NULL_VECTOR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 266 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 267 # 266 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , "ab2 and ac2 are collinear")) ; (CGAL::possibly(abad2 != NULL_VECTOR)?(static_cast(0)): ::CGAL::assertion_fail( "abad2 != NULL_VECTOR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 268 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 269 # 268 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , "ab2 and ad2 are collinear")) ; if(sc_prod_1 >= 0 ) { if(sc_prod_2 >= 0) { return compare(CGAL::square(sc_prod_2)* abac1.squared_length()*abad1.squared_length(), CGAL::square(sc_prod_1)* abac2.squared_length()*abad2.squared_length()); } else { return SMALLER; } } else { if(sc_prod_2 < 0) { return compare(CGAL::square(sc_prod_1)* abac2.squared_length()*abad2.squared_length(), CGAL::square(sc_prod_2)* abac1.squared_length()*abad1.squared_length()); } else return LARGER; } } }; template class Compare_squared_distance_2 { typedef typename K::FT FT; public: typedef typename K::Comparison_result result_type; template result_type operator()(const T1& p, const T2& q, const FT& d2) const { return ::CGAL:: compare(squared_distance(p, q), d2); } template result_type operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return ::CGAL:: compare(squared_distance(p, q), squared_distance(r, s)); } }; template class Compare_squared_distance_3 { typedef typename K::FT FT; public: typedef typename K::Comparison_result result_type; template result_type operator()(const T1& p, const T2& q, const FT& d2) const { return ::CGAL:: compare(squared_distance(p, q), d2); } template result_type operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return ::CGAL:: compare(squared_distance(p, q), squared_distance(r, s)); } }; template class Compute_area_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Triangle_3 Triangle_3; public: typedef FT result_type; FT operator()( const Triangle_3& t ) const { return ::CGAL:: sqrt(K().compute_squared_area_3_object()(t)); } FT operator()( const Point_3& p, const Point_3& q, const Point_3& r ) const { return ::CGAL:: sqrt(K().compute_squared_area_3_object()(p, q, r)); } }; template class Compute_squared_distance_2 { typedef typename K::FT FT; public: typedef FT result_type; template FT operator()( const T1& t1, const T2& t2) const { return internal::squared_distance(t1, t2, K()); } }; template class Compute_squared_distance_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; public: typedef FT result_type; template FT operator()( const T1& t1, const T2& t2) const { return internal::squared_distance(t1, t2, K()); } FT operator()( const Point_3& pt1, const Point_3& pt2) const { typedef typename K::Vector_3 Vector_3; Vector_3 vec = pt2 - pt1; return vec*vec; } }; template class Compute_squared_length_2 { typedef typename K::FT FT; typedef typename K::Segment_2 Segment_2; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; FT operator()( const Vector_2& v) const { return ::CGAL:: square(K().compute_x_2_object()(v)) + ::CGAL:: square(K().compute_y_2_object()(v));} FT operator()( const Segment_2& s) const { return K().compute_squared_distance_2_object()(s.source(), s.target()); } }; template class Compute_squared_length_3 { typedef typename K::FT FT; typedef typename K::Segment_3 Segment_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; FT operator()( const Vector_3& v) const { return v.rep().squared_length(); } FT operator()( const Segment_3& s) const { return s.squared_length(); } }; template class Compute_a_2 { typedef typename K::RT RT; typedef typename K::Line_2 Line_2; public: typedef RT result_type; RT operator()(const Line_2& l) const { return l.rep().a(); } }; template class Compute_a_3 { typedef typename K::RT RT; typedef typename K::Plane_3 Plane_3; public: typedef RT result_type; RT operator()(const Plane_3& l) const { return l.rep().a(); } }; template class Compute_b_2 { typedef typename K::RT RT; typedef typename K::Line_2 Line_2; public: typedef RT result_type; RT operator()(const Line_2& l) const { return l.rep().b(); } }; template class Compute_b_3 { typedef typename K::RT RT; typedef typename K::Plane_3 Plane_3; public: typedef RT result_type; RT operator()(const Plane_3& l) const { return l.rep().b(); } }; template class Compute_c_2 { typedef typename K::RT RT; typedef typename K::Line_2 Line_2; public: typedef RT result_type; RT operator()(const Line_2& l) const { return l.rep().c(); } }; template class Compute_c_3 { typedef typename K::RT RT; typedef typename K::Plane_3 Plane_3; public: typedef RT result_type; RT operator()(const Plane_3& l) const { return l.rep().c(); } }; template class Compute_d_3 { typedef typename K::RT RT; typedef typename K::Plane_3 Plane_3; public: typedef RT result_type; RT operator()(const Plane_3& l) const { return l.rep().d(); } }; template class Compute_x_at_y_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; public: typedef FT result_type; FT operator()(const Line_2& l, const FT& y) const { (CGAL::possibly(! l.is_degenerate())?(static_cast(0)): ::CGAL::precondition_fail( "! l.is_degenerate()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h", 564)); return (FT(-l.b())*y - FT(l.c()) )/FT(l.a()); } }; template class Compute_y_at_x_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; public: typedef FT result_type; FT operator()(const Line_2& l, const FT& x) const { (CGAL::possibly(! l.is_vertical())?(static_cast(0)): ::CGAL::precondition_fail( "! l.is_vertical()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 582 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 583 # 582 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , "Compute_y_at_x(FT x) is undefined for vertical line")) ; return (FT(-l.a())*x - FT(l.c()) )/FT(l.b()); } }; template class Compute_xmin_2 { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_rectangle_2& r) const { return (r.min)().x(); } }; template class Compute_xmin_3 { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_cuboid_3& r) const { return (r.min)().x(); } }; template class Compute_xmax_2 { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_rectangle_2& r) const { return (r.max)().x(); } }; template class Compute_xmax_3 { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_cuboid_3& r) const { return (r.max)().x(); } }; template class Compute_ymin_2 { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_rectangle_2& r) const { return (r.min)().y(); } }; template class Compute_ymin_3 { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_cuboid_3& r) const { return (r.min)().y(); } }; template class Compute_ymax_2 { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_rectangle_2& r) const { return (r.max)().y(); } }; template class Compute_ymax_3 { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_cuboid_3& r) const { return (r.max)().y(); } }; template class Compute_zmin_3 { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_cuboid_3& r) const { return (r.min)().z(); } }; template class Compute_zmax_3 { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef FT Cartesian_coordinate_type; public: typedef FT result_type; Cartesian_coordinate_type operator()(const Iso_cuboid_3& r) const { return (r.max)().z(); } }; template class Construct_center_2 : Has_qrt { typedef typename K::Point_2 Point_2; typedef typename K::Circle_2 Circle_2; public: typedef Point_2 result_type; const Point_2 & operator()(const Circle_2& c) const { return c.rep().center(); } }; template class Construct_center_3 : Has_qrt { typedef typename K::Point_3 Point_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; public: typedef Point_3 result_type; const Point_3 & operator()(const Sphere_3& s) const { return s.rep().center(); } const Point_3 & operator()(const Circle_3& c) const { return c.rep().center(); } }; template class Construct_circle_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Circle_2 Circle_2; typedef typename Circle_2::Rep Rep; public: typedef Circle_2 result_type; Rep operator()( Return_base_tag, const Point_2& center, const FT& squared_radius, Orientation orientation = COUNTERCLOCKWISE) const { return Rep(center, squared_radius, orientation); } Rep operator()( Return_base_tag, const Point_2& p, const Point_2& q, const Point_2& r) const { typename K::Orientation_2 orientation; typename K::Compute_squared_distance_2 squared_distance; typename K::Construct_circumcenter_2 circumcenter; typename K::Orientation orient = orientation(p, q, r); (CGAL::possibly(orient != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "orient != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h", 824)); Point_2 center = circumcenter(p, q, r); return Rep(center, squared_distance(p, center), orient); } Rep operator()( Return_base_tag, const Point_2& p, const Point_2& q, Orientation orientation = COUNTERCLOCKWISE) const { (CGAL::possibly(orientation != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "orientation != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h", 836)); typename K::Compute_squared_distance_2 squared_distance; typename K::Construct_midpoint_2 midpoint; if (p != q) { Point_2 center = midpoint(p, q); return Rep(center, squared_distance(p, center), orientation); } else return Rep(p, FT(0), orientation); } Rep operator()( Return_base_tag, const Point_2& p, const Point_2& q, const FT& bulge) const { typename K::Compute_squared_distance_2 squared_distance; const FT sqr_bulge = CGAL::square(bulge); const FT common = (FT(1) - sqr_bulge) / (FT(4)*bulge); const FT x_coord = (p.x() + q.x())/FT(2) + common*(p.y() - q.y()); const FT y_coord = (p.y() + q.y())/FT(2) + common*(q.x() - p.x()); const FT sqr_rad = squared_distance(p, q) * (FT(1)/sqr_bulge + FT(2) + sqr_bulge) / FT(16); return Rep(Point_2(x_coord, y_coord), sqr_rad); } Rep operator()( Return_base_tag, const Point_2& center, Orientation orientation = COUNTERCLOCKWISE) const { (CGAL::possibly(orientation != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "orientation != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h", 872)); return Rep(center, FT(0), orientation); } Circle_2 operator()( const Point_2& center, const FT& squared_radius, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), center, squared_radius, orientation); } Circle_2 operator()( const Point_2& p, const Point_2& q, const Point_2& r) const { return this->operator()(Return_base_tag(), p, q, r); } Circle_2 operator()( const Point_2& p, const Point_2& q, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), p, q, orientation); } Circle_2 operator()( const Point_2& p, const Point_2& q, const FT& bulge) const { return this->operator()(Return_base_tag(), p, q, bulge); } Circle_2 operator()( const Point_2& center, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), center, orientation); } }; template < typename K > class Construct_circle_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Direction_3 Direction_3; typedef typename Circle_3::Rep Rep; public: typedef Circle_3 result_type; Rep operator() (Return_base_tag, const Point_3& p, const FT& sr, const Plane_3& plane) const { return Rep(p, sr, plane); } Rep operator() (Return_base_tag, const Point_3& p, const FT& sr, const Vector_3& v) const { return Rep(p, sr, v); } Rep operator() (Return_base_tag, const Point_3& p, const FT& sr, const Direction_3& d) const { return Rep(p, sr, d); } Rep operator() (Return_base_tag, const Sphere_3& s1, const Sphere_3& s2) const { return Rep(s1, s2); } Rep operator() (Return_base_tag, const Plane_3& p, const Sphere_3& s) const { return Rep(p, s); } Rep operator() (Return_base_tag, const Plane_3& p, const Sphere_3& s, int a) const { return Rep(p, s, a); } Rep operator() (Return_base_tag, const Point_3& p1, const Point_3& p2, const Point_3& p3) const { return Rep(p1, p2, p3); } Circle_3 operator()(const Point_3& p, const FT& sr, const Plane_3& plane) const { return this->operator()(Return_base_tag(), p, sr, plane); } Circle_3 operator() (const Point_3& p, const FT& sr, const Vector_3& v) const { return this->operator()(Return_base_tag(), p, sr, v); } Circle_3 operator() (const Point_3& p, const FT& sr, const Direction_3& d) const { return this->operator()(Return_base_tag(), p, sr, d); } Circle_3 operator() (const Sphere_3& s1, const Sphere_3& s2) const { return this->operator()(Return_base_tag(), s1, s2); } Circle_3 operator() (const Plane_3& p, const Sphere_3& s) const { return this->operator()(Return_base_tag(), p, s); } Circle_3 operator() (const Sphere_3& s, const Plane_3& p) const { return this->operator()(Return_base_tag(), p, s); } Circle_3 operator() (const Plane_3& p, const Sphere_3& s, int a) const { return this->operator()(Return_base_tag(), p, s, a); } Circle_3 operator() (const Sphere_3& s, const Plane_3& p, int a) const { return this->operator()(Return_base_tag(), p, s, a); } Circle_3 operator()( const Point_3& p1, const Point_3& p2, const Point_3& p3) const { return this->operator()(Return_base_tag(), p1, p2, p3); } }; template class Construct_iso_cuboid_3 { typedef typename K::RT RT; typedef typename K::Point_3 Point_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename Iso_cuboid_3::Rep Rep; public: typedef Iso_cuboid_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q, int) const { return Rep(p, q, 0); } Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q) const { return Rep(p, q); } Rep operator()(Return_base_tag, const Point_3 &left, const Point_3 &right, const Point_3 &bottom, const Point_3 &top, const Point_3 &far_, const Point_3 &close) const { return Rep(left, right, bottom, top, far_, close); } Rep operator()(Return_base_tag, const RT& min_hx, const RT& min_hy, const RT& min_hz, const RT& max_hx, const RT& max_hy, const RT& max_hz, const RT& hw) const { return Rep(min_hx, min_hy, min_hz, max_hx, max_hy, max_hz, hw); } Rep operator()(Return_base_tag, const RT& min_hx, const RT& min_hy, const RT& min_hz, const RT& max_hx, const RT& max_hy, const RT& max_hz) const { return Rep(min_hx, min_hy, min_hz, max_hx, max_hy, max_hz); } Iso_cuboid_3 operator()(const Point_3& p, const Point_3& q, int) const { return this->operator()(Return_base_tag(), p, q, 0); } Iso_cuboid_3 operator()(const Point_3& p, const Point_3& q) const { return this->operator()(Return_base_tag(), p, q); } Iso_cuboid_3 operator()(const Point_3 &left, const Point_3 &right, const Point_3 &bottom, const Point_3 &top, const Point_3 &far_, const Point_3 &close) const { return this->operator()(Return_base_tag(), left, right, bottom, top, far_, close); } Iso_cuboid_3 operator()(const RT& min_hx, const RT& min_hy, const RT& min_hz, const RT& max_hx, const RT& max_hy, const RT& max_hz, const RT& hw) const { return this->operator()(Return_base_tag(), min_hx, min_hy, min_hz, max_hx, max_hy, max_hz, hw); } Iso_cuboid_3 operator()(const RT& min_hx, const RT& min_hy, const RT& min_hz, const RT& max_hx, const RT& max_hy, const RT& max_hz) const { return this->operator()(Return_base_tag(), min_hx, min_hy, min_hz, max_hx, max_hy, max_hz); } }; template class Construct_max_vertex_2 : Has_qrt { typedef typename K::Point_2 Point_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; public: typedef Point_2 result_type; const Point_2& operator()(const Iso_rectangle_2& r) const { return (r.rep().max)(); } const Point_2& operator()(const Segment_2& s) const { return (s.max)(); } }; template class Construct_min_vertex_2 : Has_qrt { typedef typename K::Point_2 Point_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; public: typedef Point_2 result_type; const Point_2& operator()(const Iso_rectangle_2& r) const { return (r.rep().min)(); } const Point_2& operator()(const Segment_2& s) const { return (s.min)(); } }; template class Construct_max_vertex_3 { typedef typename K::Point_3 Point_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; public: typedef Point_3 result_type; Point_3 operator()(const Iso_cuboid_3& r) const { return (r.rep().max)(); } const Point_3& operator()(const Segment_3& s) const { return (s.rep().max)(); } }; template class Construct_min_vertex_3 { typedef typename K::Point_3 Point_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; public: typedef Point_3 result_type; Point_3 operator()(const Iso_cuboid_3& r) const { return (r.rep().min)(); } const Point_3& operator()(const Segment_3& s) const { return (s.rep().min)(); } }; template class Construct_normal_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()(const Point_3& p,const Point_3& q, const Point_3& r) const { (CGAL::possibly(! K().collinear_3_object()(p,q,r))?(static_cast(0)): ::CGAL::precondition_fail( "! K().collinear_3_object()(p,q,r)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h", 1152)); Vector_3 res = CGAL::cross_product(q-p, r-p); return res; } }; template class Construct_object_2 { typedef typename K::Object_2 Object_2; public: typedef Object_2 result_type; template Object_2 operator()( const Cls& c) const { return make_object(c); } }; template class Construct_object_3 { typedef typename K::Object_3 Object_3; public: typedef Object_3 result_type; template Object_3 operator()( const Cls& c) const { return make_object(c); } }; template class Construct_opposite_circle_2 { typedef typename K::Circle_2 Circle_2; public: typedef Circle_2 result_type; Circle_2 operator()( const Circle_2& c) const { return c.opposite(); } }; template class Construct_opposite_direction_2 { typedef typename K::Direction_2 Direction_2; typedef typename Direction_2::Rep Rep; public: typedef Direction_2 result_type; Direction_2 operator()( const Direction_2& d) const { return Rep(-d.dx(), -d.dy()); } }; template class Construct_opposite_direction_3 { typedef typename K::Direction_3 Direction_3; typedef typename Direction_3::Rep Rep; public: typedef Direction_3 result_type; Direction_3 operator()( const Direction_3& d) const { return Rep(-d.dx(), -d.dy(), -d.dz()); } }; template class Construct_opposite_line_2 { typedef typename K::Line_2 Line_2; public: typedef Line_2 result_type; Line_2 operator()( const Line_2& l) const { return Line_2( -l.a(), -l.b(), -l.c()); } }; template class Construct_opposite_line_3 { typedef typename K::Line_3 Line_3; public: typedef Line_3 result_type; Line_3 operator()( const Line_3& l) const { return l.rep().opposite(); } }; template class Construct_opposite_plane_3 { typedef typename K::Plane_3 Plane_3; public: typedef Plane_3 result_type; Plane_3 operator()( const Plane_3& p) const { return p.rep().opposite(); } }; template class Construct_opposite_ray_2 { typedef typename K::Ray_2 Ray_2; public: typedef Ray_2 result_type; Ray_2 operator()( const Ray_2& r) const { return r.opposite(); } }; template class Construct_opposite_ray_3 { typedef typename K::Ray_3 Ray_3; public: typedef Ray_3 result_type; Ray_3 operator()( const Ray_3& r) const { return r.opposite(); } }; template class Construct_opposite_segment_2 { typedef typename K::Segment_2 Segment_2; public: typedef Segment_2 result_type; Segment_2 operator()( const Segment_2& s) const { return Segment_2(s.target(), s.source()); } }; template class Construct_opposite_segment_3 { typedef typename K::Segment_3 Segment_3; public: typedef Segment_3 result_type; Segment_3 operator()( const Segment_3& s) const { return s.rep().opposite(); } }; template class Construct_opposite_sphere_3 { typedef typename K::Sphere_3 Sphere_3; public: typedef Sphere_3 result_type; Sphere_3 operator()( const Sphere_3& s) const { return s.rep().opposite(); } }; template class Construct_opposite_triangle_2 { typedef typename K::Triangle_2 Triangle_2; public: typedef Triangle_2 result_type; Triangle_2 operator()( const Triangle_2& t) const { return Triangle_2(t.vertex(0), t.vertex(2), t.vertex(1));} }; template class Construct_perpendicular_line_3 { typedef typename K::Line_3 Line_3; typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; public: typedef Line_3 result_type; Line_3 operator()( const Plane_3& pl, const Point_3& p) const { return pl.rep().perpendicular_line(p); } }; template class Construct_perpendicular_plane_3 { typedef typename K::Line_3 Line_3; typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; public: typedef Plane_3 result_type; Plane_3 operator()( const Line_3& l, const Point_3& p) const { return l.rep().perpendicular_plane(p); } }; template class Construct_plane_3 { typedef typename K::RT RT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Direction_3 Direction_3; typedef typename K::Line_3 Line_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Circle_3 Circle_3; typedef typename Plane_3::Rep Rep; public: typedef Plane_3 result_type; Rep operator()(Return_base_tag, const RT& a, const RT& b, const RT& c, const RT& d) const { return Rep(a, b, c, d); } Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q, const Point_3& r) const { return Rep(p, q, r); } Rep operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const { return Rep(p, d); } Rep operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const { return Rep(p, v); } Rep operator()(Return_base_tag, const Line_3& l, const Point_3& p) const { return Rep(l, p); } Rep operator()(Return_base_tag, const Ray_3& r, const Point_3& p) const { return Rep(r, p); } Rep operator()(Return_base_tag, const Segment_3& s, const Point_3& p) const { return Rep(s, p); } Rep operator()(Return_base_tag, const Circle_3 & c) const { return c.rep().supporting_plane(); } Plane_3 operator()(const RT& a, const RT& b, const RT& c, const RT& d) const { return this->operator()(Return_base_tag(), a, b, c, d); } Plane_3 operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return this->operator()(Return_base_tag(), p, q, r); } Plane_3 operator()(const Point_3& p, const Direction_3& d) const { return this->operator()(Return_base_tag(), p, d); } Plane_3 operator()(const Point_3& p, const Vector_3& v) const { return this->operator()(Return_base_tag(), p, v); } Plane_3 operator()(const Line_3& l, const Point_3& p) const { return this->operator()(Return_base_tag(), l, p); } Plane_3 operator()(const Ray_3& r, const Point_3& p) const { return this->operator()(Return_base_tag(), r, p); } Plane_3 operator()(const Segment_3& s, const Point_3& p) const { return this->operator()(Return_base_tag(), s, p); } Plane_3 operator()(const Circle_3 & c) const { return this->operator()(Return_base_tag(), c); } }; template class Construct_point_on_2 { typedef typename K::Point_2 Point_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Line_2 Line_2; typedef typename K::Ray_2 Ray_2; public: typedef Point_2 result_type; Point_2 operator()( const Line_2& l, int i) const { return l.point(i); } Point_2 operator()( const Segment_2& s, int i) const { return s.point(i); } Point_2 operator()( const Ray_2& r, int i) const { return r.point(i); } }; template class Construct_point_on_3 { typedef typename K::Point_3 Point_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Line_3 Line_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Plane_3 Plane_3; public: typedef Point_3 result_type; Point_3 operator()( const Line_3& l, int i) const { return l.rep().point(i); } Point_3 operator()( const Segment_3& s, int i) const { return s.point(i); } Point_3 operator()( const Ray_3& r, int i) const { return r.rep().point(i); } Point_3 operator()( const Plane_3& p) const { return p.rep().point(); } }; template class Construct_projected_xy_point_2 { typedef typename K::Point_2 Point_2; typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; public: typedef Point_2 result_type; Point_2 operator()( const Plane_3& h, const Point_3& p) const { return h.rep().to_2d(p); } }; template class Construct_ray_2 { typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Direction_2 Direction_2; typedef typename K::Line_2 Line_2; typedef typename K::Ray_2 Ray_2; typedef typename Ray_2::Rep Rep; public: typedef Ray_2 result_type; Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q) const { return Rep(p, q); } Rep operator()(Return_base_tag, const Point_2& p, const Vector_2& v) const { return Rep(p, K().construct_translated_point_2_object()(p, v)); } Rep operator()(Return_base_tag, const Point_2& p, const Direction_2& d) const { return Rep(p, K().construct_translated_point_2_object()(p, d.to_vector())); } Rep operator()(Return_base_tag, const Point_2& p, const Line_2& l) const { return Rep(p, K().construct_translated_point_2_object()(p, l.to_vector())); } Ray_2 operator()(const Point_2& p, const Point_2& q) const { return this->operator()(Return_base_tag(), p, q); } Ray_2 operator()(const Point_2& p, const Vector_2& v) const { return this->operator()(Return_base_tag(), p, v); } Ray_2 operator()(const Point_2& p, const Direction_2& d) const { return this->operator()(Return_base_tag(), p, d); } Ray_2 operator()(const Point_2& p, const Line_2& l) const { return this->operator()(Return_base_tag(), p, l); } }; template class Construct_ray_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Direction_3 Direction_3; typedef typename K::Line_3 Line_3; typedef typename K::Ray_3 Ray_3; typedef typename Ray_3::Rep Rep; public: typedef Ray_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q) const { return Rep(p, q); } Rep operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const { return Rep(p, v); } Rep operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const { return Rep(p, d); } Rep operator()(Return_base_tag, const Point_3& p, const Line_3& l) const { return Rep(p, l); } Ray_3 operator()(const Point_3& p, const Point_3& q) const { return this->operator()(Return_base_tag(), p, q); } Ray_3 operator()(const Point_3& p, const Vector_3& v) const { return this->operator()(Return_base_tag(), p, v); } Ray_3 operator()(const Point_3& p, const Direction_3& d) const { return this->operator()(Return_base_tag(), p, d); } Ray_3 operator()(const Point_3& p, const Line_3& l) const { return this->operator()(Return_base_tag(), p, l); } }; template class Construct_segment_2 { typedef typename K::Segment_2 Segment_2; typedef typename Segment_2::Rep Rep; typedef typename K::Point_2 Point_2; public: typedef Segment_2 result_type; Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q) const { return Rep(p, q); } Segment_2 operator()( const Point_2& p, const Point_2& q) const { return this->operator()(Return_base_tag(), p, q); } }; template class Construct_segment_3 { typedef typename K::Segment_3 Segment_3; typedef typename K::Point_3 Point_3; typedef typename Segment_3::Rep Rep; public: typedef Segment_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q) const { return Rep(p, q); } Segment_3 operator()( const Point_3& p, const Point_3& q) const { return this->operator()(Return_base_tag(), p, q); } }; template class Construct_source_2 : Has_qrt { typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Point_2 Point_2; public: typedef Point_2 result_type; const result_type& operator()(const Segment_2& s) const { return s.rep().source(); } const result_type& operator()(const Ray_2& r) const { return r.rep().source(); } }; template class Construct_source_3 : Has_qrt { typedef typename K::Segment_3 Segment_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Point_3 Point_3; public: typedef Point_3 result_type; const result_type& operator()(const Segment_3& s) const { return s.rep().source(); } const result_type& operator()(const Ray_3& r) const { return r.rep().source(); } }; template class Construct_target_2 : Has_qrt { typedef typename K::Segment_2 Segment_2; typedef typename K::Point_2 Point_2; public: typedef Point_2 result_type; const result_type& operator()(const Segment_2& s) const { return s.rep().target(); } }; template class Construct_target_3 : Has_qrt { typedef typename K::Segment_3 Segment_3; typedef typename K::Point_3 Point_3; public: typedef Point_3 result_type; const result_type& operator()(const Segment_3& s) const { return s.rep().target(); } }; template class Construct_second_point_2 : Has_qrt { typedef typename K::Ray_2 Ray_2; typedef typename K::Point_2 Point_2; public: typedef Point_2 result_type; const result_type& operator()(const Ray_2& r) const { return r.rep().second_point(); } }; template class Construct_second_point_3 { typedef typename K::Ray_3 Ray_3; typedef typename K::Point_3 Point_3; public: typedef Point_3 result_type; result_type operator()(const Ray_3& r) const { return r.rep().second_point(); } }; template class Construct_sphere_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; typedef typename Sphere_3::Rep Rep; public: typedef Sphere_3 result_type; Rep operator()(Return_base_tag, const Point_3& center, const FT& squared_radius, Orientation orientation = COUNTERCLOCKWISE) const { return Rep(center, squared_radius, orientation); } Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { return Rep(p, q, r, s); } Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q, const Point_3& r, Orientation orientation = COUNTERCLOCKWISE) const { return Rep(p, q, r, orientation); } Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q, Orientation orientation = COUNTERCLOCKWISE) const { return Rep(p, q, orientation); } Rep operator()(Return_base_tag, const Point_3& center, Orientation orientation = COUNTERCLOCKWISE) const { return Rep(center, orientation); } Rep operator() (Return_base_tag, const Circle_3 & c) const { return c.rep().diametral_sphere(); } Sphere_3 operator()( const Point_3& center, const FT& squared_radius, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), center, squared_radius, orientation); } Sphere_3 operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { return this->operator()(Return_base_tag(), p, q, r, s); } Sphere_3 operator()( const Point_3& p, const Point_3& q, const Point_3& r, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), p, q, r, orientation); } Sphere_3 operator()( const Point_3& p, const Point_3& q, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), p, q, orientation); } Sphere_3 operator()( const Point_3& center, Orientation orientation = COUNTERCLOCKWISE) const { return this->operator()(Return_base_tag(), center, orientation); } Sphere_3 operator() (const Circle_3 & c) const { return this->operator()(Return_base_tag(), c); } }; template class Construct_supporting_plane_3 { typedef typename K::Triangle_3 Triangle_3; typedef typename K::Plane_3 Plane_3; public: typedef Plane_3 result_type; Plane_3 operator()( const Triangle_3& t) const { return t.rep().supporting_plane(); } }; template class Construct_tetrahedron_3 { typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Point_3 Point_3; typedef typename Tetrahedron_3::Rep Rep; public: typedef Tetrahedron_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { return Rep(p, q, r, s); } Tetrahedron_3 operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { return this->operator()(Return_base_tag(), p, q, r, s); } }; template class Construct_triangle_2 { typedef typename K::Triangle_2 Triangle_2; typedef typename Triangle_2::Rep Rep; typedef typename K::Point_2 Point_2; public: typedef Triangle_2 result_type; Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q, const Point_2& r) const { return Rep(p, q, r); } Triangle_2 operator()( const Point_2& p, const Point_2& q, const Point_2& r) const { return this->operator()(Return_base_tag(), p, q, r); } }; template class Construct_triangle_3 { typedef typename K::Triangle_3 Triangle_3; typedef typename K::Point_3 Point_3; typedef typename Triangle_3::Rep Rep; public: typedef Triangle_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q, const Point_3& r) const { return Rep(p, q, r); } Triangle_3 operator()( const Point_3& p, const Point_3& q, const Point_3& r) const { return this->operator()(Return_base_tag(), p, q, r); } }; template class Construct_unit_normal_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()(const Point_3& p,const Point_3& q, const Point_3& r) const { (CGAL::possibly(! K().collinear_3_object()(p,q,r))?(static_cast(0)): ::CGAL::precondition_fail( "! K().collinear_3_object()(p,q,r)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h", 1876)); Vector_3 res = CGAL::cross_product(q-p, r-p); res = res / CGAL::sqrt(res.squared_length()); return res; } }; template class Construct_vertex_3 : Has_qrt { typedef typename K::Point_3 Point_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; public: typedef Point_3 result_type; const Point_3 & operator()( const Segment_3& s, int i) const { return s.rep().vertex(i); } const Point_3 & operator()( const Triangle_3& t, int i) const { return t.rep().vertex(i); } Point_3 operator()( const Iso_cuboid_3& r, int i) const { return r.rep().vertex(i); } const Point_3 & operator()( const Tetrahedron_3& t, int i) const { return t.rep().vertex(i); } }; template class Construct_cartesian_const_iterator_2 { typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Cartesian_const_iterator_2 Cartesian_const_iterator_2; public: typedef Cartesian_const_iterator_2 result_type; Cartesian_const_iterator_2 operator()( const Point_2& p) const { return p.rep().cartesian_begin(); } Cartesian_const_iterator_2 operator()( const Point_2& p, int) const { return p.rep().cartesian_end(); } Cartesian_const_iterator_2 operator()( const Vector_2& v) const { return v.rep().cartesian_begin(); } Cartesian_const_iterator_2 operator()( const Vector_2& v, int) const { return v.rep().cartesian_end(); } }; template class Construct_cartesian_const_iterator_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Cartesian_const_iterator_3 Cartesian_const_iterator_3; public: typedef Cartesian_const_iterator_3 result_type; Cartesian_const_iterator_3 operator()( const Point_3& p) const { return p.rep().cartesian_begin(); } Cartesian_const_iterator_3 operator()( const Point_3& p, int) const { return p.rep().cartesian_end(); } Cartesian_const_iterator_3 operator()( const Vector_3& v) const { return v.rep().cartesian_begin(); } Cartesian_const_iterator_3 operator()( const Vector_3& v, int) const { return v.rep().cartesian_end(); } }; template class Coplanar_3 { typedef typename K::Point_3 Point_3; typedef typename K::Orientation_3 Orientation_3; Orientation_3 o; public: typedef typename K::Boolean result_type; Coplanar_3() {} Coplanar_3(const Orientation_3& o_) : o(o_) {} result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { return o(p, q, r, s) == COPLANAR; } }; template class Counterclockwise_in_between_2 { typedef typename K::Direction_2 Direction_2; public: typedef typename K::Boolean result_type; result_type operator()( const Direction_2& p, const Direction_2& q, const Direction_2& r) const { if ( q < p) return ( p < r )||( r <= q ); else return ( p < r )&&( r <= q ); } }; template class Do_intersect_2 { public: typedef typename K::Boolean result_type; template result_type operator()(const T1& t1, const T2& t2) const { return internal::do_intersect(t1, t2, K()); } }; template class Do_intersect_3 { public: typedef typename K::Boolean result_type; template result_type operator()(const T1& t1, const T2& t2) const { return internal::do_intersect(t1, t2, K()); } }; template class Equal_2 { typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Direction_2 Direction_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Line_2 Line_2; typedef typename K::Triangle_2 Triangle_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Circle_2 Circle_2; public: typedef typename K::Boolean result_type; result_type operator()(const Point_2 &p, const Point_2 &q) const { return p.rep() == q.rep(); } result_type operator()(const Vector_2 &v1, const Vector_2 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Vector_2 &v, const Null_vector &n) const { return v.rep() == n; } result_type operator()(const Direction_2 &d1, const Direction_2 &d2) const { return d1.rep() == d2.rep(); } result_type operator()(const Segment_2 &s1, const Segment_2 &s2) const { return s1.source() == s2.source() && s1.target() == s2.target(); } result_type operator()(const Line_2 &l1, const Line_2 &l2) const { return l1.rep() == l2.rep(); } result_type operator()(const Ray_2& r1, const Ray_2& r2) const { return r1.source() == r2.source() && r1.direction() == r2.direction(); } result_type operator()(const Circle_2& c1, const Circle_2& c2) const { return c1.center() == c2.center() && c1.squared_radius() == c2.squared_radius() && c1.orientation() == c2.orientation(); } result_type operator()(const Triangle_2& t1, const Triangle_2& t2) const { int i; for(i=0; i<3; i++) if ( t1.vertex(0) == t2.vertex(i) ) break; return (i<3) && t1.vertex(1) == t2.vertex(i+1) && t1.vertex(2) == t2.vertex(i+2); } result_type operator()(const Iso_rectangle_2& i1, const Iso_rectangle_2& i2) const { return ((i1.min)() == (i2.min)()) && ((i1.max)() == (i2.max)()); } }; template class Equal_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Direction_3 Direction_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Line_3 Line_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Circle_3 Circle_3; public: typedef typename K::Boolean result_type; result_type operator()(const Point_3 &p, const Point_3 &q) const { return p.x() == q.x() && p.y() == q.y() && p.z() == q.z(); } result_type operator()(const Plane_3 &v1, const Plane_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Iso_cuboid_3 &v1, const Iso_cuboid_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Sphere_3 &v1, const Sphere_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Tetrahedron_3 &v1, const Tetrahedron_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Triangle_3 &v1, const Triangle_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Ray_3 &v1, const Ray_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Line_3 &v1, const Line_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Direction_3 &v1, const Direction_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Segment_3 &v1, const Segment_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Vector_3 &v1, const Vector_3 &v2) const { return v1.rep() == v2.rep(); } result_type operator()(const Vector_3 &v, const Null_vector &n) const { return v.rep() == n; } result_type operator()(const Circle_3 &v1, const Circle_3 &v2) const { return v1.rep() == v2.rep(); } }; template class Has_on_boundary_2 { typedef typename K::Point_2 Point_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2; public: typedef typename K::Boolean result_type; result_type operator()( const Circle_2& c, const Point_2& p) const { return c.has_on_boundary(p); } result_type operator()( const Triangle_2& t, const Point_2& p) const { return t.has_on_boundary(p); } result_type operator()( const Iso_rectangle_2& r, const Point_2& p) const { return K().bounded_side_2_object()(r,p) == ON_BOUNDARY; } }; template class Has_on_boundary_3 { typedef typename K::Point_3 Point_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Plane_3 Plane_3; public: typedef typename K::Boolean result_type; result_type operator()( const Sphere_3& s, const Point_3& p) const { return s.rep().has_on_boundary(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const { return t.rep().has_on_boundary(p); } result_type operator()( const Iso_cuboid_3& c, const Point_3& p) const { return c.rep().has_on_boundary(p); } }; template class Has_on_bounded_side_2 { typedef typename K::Point_2 Point_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2; public: typedef typename K::Boolean result_type; result_type operator()( const Circle_2& c, const Point_2& p) const { return c.has_on_bounded_side(p); } result_type operator()( const Triangle_2& t, const Point_2& p) const { return t.has_on_bounded_side(p); } result_type operator()( const Iso_rectangle_2& r, const Point_2& p) const { return K().bounded_side_2_object()(r,p) == ON_BOUNDED_SIDE; } }; template class Has_on_bounded_side_3 { typedef typename K::Point_3 Point_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Circle_3 Circle_3; public: typedef typename K::Boolean result_type; result_type operator()( const Sphere_3& s, const Point_3& p) const { return s.has_on_bounded_side(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const { return t.rep().has_on_bounded_side(p); } result_type operator()( const Iso_cuboid_3& c, const Point_3& p) const { return c.rep().has_on_bounded_side(p); } result_type operator()(const Circle_3& c, const Point_3& p) const { (CGAL::possibly(K().has_on_3_object()(c.supporting_plane(),p))?(static_cast(0)): ::CGAL::precondition_fail( "K().has_on_3_object()(c.supporting_plane(),p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 2328 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 2330 # 2328 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" )) ; return c.rep().has_on_bounded_side(p); } }; template class Has_on_negative_side_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2; public: typedef typename K::Boolean result_type; result_type operator()( const Circle_2& c, const Point_2& p) const { return c.has_on_negative_side(p); } result_type operator()( const Triangle_2& t, const Point_2& p) const { return t.has_on_negative_side(p); } result_type operator()( const Line_2& l, const Point_2& p) const { return l.has_on_negative_side(p); } }; template class Has_on_negative_side_3 { typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; public: typedef typename K::Boolean result_type; result_type operator()( const Sphere_3& s, const Point_3& p) const { return s.has_on_negative_side(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const { return t.rep().has_on_negative_side(p); } result_type operator()( const Plane_3& pl, const Point_3& p) const { return pl.rep().has_on_negative_side(p); } }; template class Has_on_positive_side_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2; public: typedef typename K::Boolean result_type; result_type operator()( const Circle_2& c, const Point_2& p) const { return c.has_on_positive_side(p); } result_type operator()( const Triangle_2& t, const Point_2& p) const { return t.has_on_positive_side(p); } result_type operator()( const Line_2& l, const Point_2& p) const { return l.has_on_positive_side(p); } }; template class Has_on_positive_side_3 { typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; public: typedef typename K::Boolean result_type; result_type operator()( const Sphere_3& s, const Point_3& p) const { return s.has_on_positive_side(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const { return t.rep().has_on_positive_side(p); } result_type operator()( const Plane_3& pl, const Point_3& p) const { return pl.rep().has_on_positive_side(p); } }; template class Has_on_unbounded_side_2 { typedef typename K::Point_2 Point_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2; public: typedef typename K::Boolean result_type; result_type operator()( const Circle_2& c, const Point_2& p) const { return c.has_on_unbounded_side(p); } result_type operator()( const Triangle_2& t, const Point_2& p) const { return t.has_on_unbounded_side(p); } result_type operator()( const Iso_rectangle_2& r, const Point_2& p) const { return K().bounded_side_2_object()(r,p)== ON_UNBOUNDED_SIDE; } }; template class Has_on_unbounded_side_3 { typedef typename K::Point_3 Point_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; public: typedef typename K::Boolean result_type; result_type operator()( const Sphere_3& s, const Point_3& p) const { return s.has_on_unbounded_side(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const { return t.rep().has_on_unbounded_side(p); } result_type operator()( const Iso_cuboid_3& c, const Point_3& p) const { return c.rep().has_on_unbounded_side(p); } result_type operator()(const Circle_3& c, const Point_3& p) const { (CGAL::possibly(K().has_on_3_object()(c.supporting_plane(),p))?(static_cast(0)): ::CGAL::precondition_fail( "K().has_on_3_object()(c.supporting_plane(),p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" # 2479 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" , 2481 # 2479 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/function_objects.h" )) ; return c.rep().has_on_unbounded_side(p); } }; template class Has_on_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Segment_2 Segment_2; public: typedef typename K::Boolean result_type; result_type operator()( const Line_2& l, const Point_2& p) const { return l.has_on(p); } result_type operator()( const Ray_2& r, const Point_2& p) const { return r.has_on(p); } result_type operator()( const Segment_2& s, const Point_2& p) const { return s.has_on(p); } }; template class Intersect_2 { typedef typename K::Object_2 Object_2; public: typedef Object_2 result_type; template Object_2 operator()(const T1& t1, const T2& t2) const { return internal::intersection(t1, t2, K()); } }; template class Intersect_3 { typedef typename K::Object_3 Object_3; typedef typename K::Plane_3 Plane_3; public: typedef Object_3 result_type; template Object_3 operator()(const T1& t1, const T2& t2) const { return internal::intersection(t1, t2, K() ); } Object_3 operator()(const Plane_3& pl1, const Plane_3& pl2, const Plane_3& pl3)const { return internal::intersection(pl1, pl2, pl3, K() ); } }; template class Is_degenerate_2 { typedef typename K::Circle_2 Circle_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Line_2 Line_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Triangle_2 Triangle_2; typedef typename K::Circle_3 Circle_3; public: typedef typename K::Boolean result_type; result_type operator()( const Circle_2& c) const { return c.is_degenerate(); } result_type operator()( const Iso_rectangle_2& r) const { return (r.xmin() == r.xmax()) || (r.ymin() == r.ymax()); } result_type operator()( const Line_2& l) const { return ::CGAL:: is_zero(l.a()) && ::CGAL:: is_zero(l.b()); } result_type operator()( const Ray_2& r) const { return r.rep().is_degenerate(); } result_type operator()( const Segment_2& s) const { return s.source() == s.target(); } result_type operator()( const Triangle_2& t) const { return t.is_degenerate(); } result_type operator()( const Circle_3& c) const { return c.rep().is_degenerate(); } }; template class Is_degenerate_3 { typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Line_3 Line_3; typedef typename K::Circle_3 Circle_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; public: typedef typename K::Boolean result_type; result_type operator()( const Iso_cuboid_3& c) const { return c.rep().is_degenerate(); } result_type operator()( const Line_3& l) const { return l.rep().is_degenerate(); } result_type operator()( const Plane_3& pl) const { return pl.rep().is_degenerate(); } result_type operator()( const Ray_3& r) const { return r.rep().is_degenerate(); } result_type operator()( const Segment_3& s) const { return s.rep().is_degenerate(); } result_type operator()( const Sphere_3& s) const { return s.rep().is_degenerate(); } result_type operator()( const Triangle_3& t) const { return t.rep().is_degenerate(); } result_type operator()( const Tetrahedron_3& t) const { return t.rep().is_degenerate(); } result_type operator()( const Circle_3& t) const { return t.rep().is_degenerate(); } }; template class Is_horizontal_2 { typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; public: typedef typename K::Boolean result_type; result_type operator()( const Line_2& l) const { return ::CGAL:: is_zero(l.a()); } result_type operator()( const Segment_2& s) const { return s.is_horizontal(); } result_type operator()( const Ray_2& r) const { return r.is_horizontal(); } }; template class Is_vertical_2 { typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; public: typedef typename K::Boolean result_type; result_type operator()( const Line_2& l) const { return ::CGAL:: is_zero(l.b()); } result_type operator()( const Segment_2& s) const { return s.is_vertical(); } result_type operator()( const Ray_2& r) const { return r.is_vertical(); } }; template class Left_turn_2 { typedef typename K::Point_2 Point_2; typedef typename K::Orientation_2 Orientation_2; Orientation_2 o; public: typedef typename K::Boolean result_type; Left_turn_2() {} Left_turn_2(const Orientation_2& o_) : o(o_) {} result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return o(p, q, r) == LEFT_TURN; } }; template class Less_rotate_ccw_2 { typedef typename K::Point_2 Point_2; typedef typename K::Orientation_2 Orientation_2; typedef typename K::Collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; Orientation_2 o; Collinear_are_ordered_along_line_2 co; public: typedef typename K::Boolean result_type; Less_rotate_ccw_2() {} Less_rotate_ccw_2(const Orientation_2& o_, const Collinear_are_ordered_along_line_2& co_) : o(o_), co(co_) {} result_type operator()(const Point_2& r, const Point_2& p, const Point_2& q) const { typename K::Orientation ori = o(r, p, q); if ( ori == LEFT_TURN ) return true; else if ( ori == RIGHT_TURN ) return false; else { if (p == r) return false; if (q == r) return true; if (p == q) return false; return co( r, q, p); } } }; template class Oriented_side_3 { typedef typename K::Point_3 Point_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Sphere_3 Sphere_3; public: typedef typename K::Oriented_side result_type; result_type operator()( const Sphere_3& s, const Point_3& p) const { return s.rep().oriented_side(p); } result_type operator()( const Plane_3& pl, const Point_3& p) const { return pl.rep().oriented_side(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const { return t.rep().oriented_side(p); } }; } template struct Qualified_result_of,Iso_cuboid_3 > : qrt_or_not,false> {}; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h" 2 namespace CGAL { namespace CartesianKernelFunctors { using namespace CommonKernelFunctors; template class Angle_2 { typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; public: typedef typename K::Angle result_type; result_type operator()(const Vector_2& u, const Vector_2& v) const { return angleC2(u.x(), u.y(), v.x(), v.y()); } result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return angleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& s) const { return angleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), s.x(), s.y()); } }; template class Angle_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Angle result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return angleC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } }; template class Are_parallel_2 { typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; public: typedef typename K::Boolean result_type; result_type operator()(const Line_2& l1, const Line_2& l2) const { return parallelC2(l1.a(), l1.b(), l2.a(), l2.b()); } result_type operator()(const Segment_2& s1, const Segment_2& s2) const { return parallelC2(s1.source().x(), s1.source().y(), s1.target().x(), s1.target().y(), s2.source().x(), s2.source().y(), s2.target().x(), s2.target().y()); } result_type operator()(const Ray_2& r1, const Ray_2& r2) const { return parallelC2(r1.source().x(), r1.source().y(), r1.second_point().x(), r1.second_point().y(), r2.source().x(), r2.source().y(), r2.second_point().x(), r2.second_point().y()); } }; template class Are_parallel_3 { typedef typename K::Line_3 Line_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Plane_3 Plane_3; public: typedef typename K::Boolean result_type; result_type operator()(const Line_3& l1, const Line_3& l2) const { return parallelC3( l1.to_vector().x(), l1.to_vector().y(), l1.to_vector().z(), l2.to_vector().x(), l2.to_vector().y(), l2.to_vector().z()); } result_type operator()(const Plane_3& h1, const Plane_3& h2) const { return parallelC3(h1.a(), h1.b(), h1.c(), h2.a(), h2.b(), h2.c()); } result_type operator()(const Segment_3& s1, const Segment_3& s2) const { return parallelC3(s1.source().x(), s1.source().y(), s1.source().z(), s1.target().x(), s1.target().y(), s1.target().z(), s2.source().x(), s2.source().y(), s2.source().z(), s2.target().x(), s2.target().y(), s2.target().z()); } result_type operator()(const Ray_3& r1, const Ray_3& r2) const { return parallelC3(r1.source().x(), r1.source().y(), r1.source().z(), r1.second_point().x(), r1.second_point().y(), r1.second_point().z(), r2.source().x(), r2.source().y(), r2.source().z(), r2.second_point().x(), r2.second_point().y(), r2.second_point().z()); } }; template class Bounded_side_2 { typedef typename K::Point_2 Point_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Triangle_2 Triangle_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; public: typedef typename K::Bounded_side result_type; result_type operator()( const Circle_2& c, const Point_2& p) const { typename K::Compute_squared_distance_2 squared_distance; return enum_cast(::CGAL:: compare(c.squared_radius(), squared_distance(c.center(),p))); } result_type operator()( const Triangle_2& t, const Point_2& p) const { typename K::Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line; typename K::Orientation_2 orientation; typename K::Orientation o1 = orientation(t.vertex(0), t.vertex(1), p), o2 = orientation(t.vertex(1), t.vertex(2), p), o3 = orientation(t.vertex(2), t.vertex(3), p); if (o2 == o1 && o3 == o1) return ON_BOUNDED_SIDE; return (o1 == COLLINEAR && collinear_are_ordered_along_line(t.vertex(0), p, t.vertex(1))) || (o2 == COLLINEAR && collinear_are_ordered_along_line(t.vertex(1), p, t.vertex(2))) || (o3 == COLLINEAR && collinear_are_ordered_along_line(t.vertex(2), p, t.vertex(3))) ? ON_BOUNDARY : ON_UNBOUNDED_SIDE; } result_type operator()( const Iso_rectangle_2& r, const Point_2& p) const { bool x_incr = (r.xmin() < p.x()) && (p.x() < r.xmax()), y_incr = (r.ymin() < p.y()) && (p.y() < r.ymax()); if (x_incr) { if (y_incr) return ON_BOUNDED_SIDE; if ( (p.y() == r.ymin()) || (r.ymax() == p.y()) ) return ON_BOUNDARY; } if ( (p.x() == r.xmin()) || (r.xmax() == p.x()) ) if ( y_incr || (p.y() == r.ymin()) || (r.ymax() == p.y()) ) return ON_BOUNDARY; return ON_UNBOUNDED_SIDE; } }; template class Bounded_side_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; public: typedef typename K::Bounded_side result_type; result_type operator()( const Sphere_3& s, const Point_3& p) const { return s.rep().bounded_side(p); } result_type operator()( const Circle_3& s, const Point_3& p) const { return s.rep().bounded_side(p); } result_type operator()( const Tetrahedron_3& t, const Point_3& p) const { FT alpha, beta, gamma; Cartesian_internal::solve(t.vertex(1)-t.vertex(0), t.vertex(2)-t.vertex(0), t.vertex(3)-t.vertex(0), p - t.vertex(0), alpha, beta, gamma); if ( (alpha < 0) || (beta < 0) || (gamma < 0) || (alpha + beta + gamma > 1) ) return ON_UNBOUNDED_SIDE; if ( (alpha == 0) || (beta == 0) || (gamma == 0) || (alpha+beta+gamma == 1) ) return ON_BOUNDARY; return ON_BOUNDED_SIDE; } result_type operator()( const Iso_cuboid_3& c, const Point_3& p) const { return c.rep().bounded_side(p); } }; template class Collinear_are_ordered_along_line_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { (static_cast(0)); return collinear_are_ordered_along_lineC2 (p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } }; template class Collinear_are_ordered_along_line_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { (static_cast(0)); return collinear_are_ordered_along_lineC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } }; template class Collinear_are_strictly_ordered_along_line_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { (static_cast(0)); return collinear_are_strictly_ordered_along_lineC2 (p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } }; template class Collinear_are_strictly_ordered_along_line_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { (static_cast(0)); return collinear_are_strictly_ordered_along_lineC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } }; template class Collinear_has_on_2 { typedef typename K::Point_2 Point_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Segment_2 Segment_2; public: typedef typename K::Boolean result_type; result_type operator()( const Ray_2& r, const Point_2& p) const { const Point_2 & source = r.source(); const Point_2 & second = r.second_point(); switch(make_certain(compare_x(source, second))) { case SMALLER: return compare_x(source, p) != LARGER; case LARGER: return compare_x(p, source) != LARGER; default: switch(make_certain(compare_y(source, second))){ case SMALLER: return compare_y(source, p) != LARGER; case LARGER: return compare_y(p, source) != LARGER; default: return true; } } } result_type operator()( const Segment_2& s, const Point_2& p) const { return collinear_are_ordered_along_line(s.source(), p, s.target()); } }; template class Collinear_2 { typedef typename K::Point_2 Point_2; typedef typename K::Orientation_2 Orientation_2; Orientation_2 o; public: typedef typename K::Boolean result_type; Collinear_2() {} Collinear_2(const Orientation_2 o_) : o(o_) {} result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return o(p, q, r) == COLLINEAR; } }; template class Collinear_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return collinearC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } }; template class Compare_angle_with_x_axis_2 { typedef typename K::Direction_2 Direction_2; public: typedef typename K::Comparison_result result_type; result_type operator()(const Direction_2& d1, const Direction_2& d2) const { return compare_angle_with_x_axisC2(d1.dx(), d1.dy(), d2.dx(), d2.dy()); } }; template class Compare_distance_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Comparison_result result_type; result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return cmp_dist_to_pointC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } template result_type operator()(const T1& p, const T2& q, const T3& r) const { return ::CGAL:: compare(squared_distance(p, q), squared_distance(p, r)); } template result_type operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return ::CGAL:: compare(squared_distance(p, q), squared_distance(r, s)); } }; template class Compare_distance_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Comparison_result result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return cmp_dist_to_pointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } template result_type operator()(const T1& p, const T2& q, const T3& r) const { return ::CGAL:: compare(squared_distance(p, q), squared_distance(p, r)); } template result_type operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return ::CGAL:: compare(squared_distance(p, q), squared_distance(r, s)); } }; template class Compare_squared_radius_3 { typedef typename K::Point_3 Point_3; typedef typename K::FT FT; public: typedef typename K::Comparison_result result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const FT& ft) const { return ::CGAL:: compare(squared_radiusC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), s.x(), s.y(), s.z() ), ft); } result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r, const FT& ft) const { return ::CGAL:: compare(squared_radiusC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()), ft); } result_type operator()(const Point_3& p, const Point_3& q, const FT& ft) const { return ::CGAL:: compare(squared_radiusC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z() ), ft); } result_type operator()(const Point_3&, const FT& ft) const { return - ::CGAL:: sign(ft); } }; template class Compare_slope_2 { typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; public: typedef typename K::Comparison_result result_type; result_type operator()(const Line_2& l1, const Line_2& l2) const { return compare_slopesC2(l1.a(), l1.b(), l2.a(), l2.b()); } result_type operator()(const Segment_2& s1, const Segment_2& s2) const { return compare_slopesC2(s1.source().x(), s1.source().y(), s1.target().x(), s1.target().y(), s2.source().x(), s2.source().y(), s2.target().x(), s2.target().y()); } }; template class Compare_x_at_y_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_2& p, const Line_2& h) const { return compare_y_at_xC2(p.y(), p.x(), h.b(), h.a(), h.c()); } result_type operator()( const Point_2& p, const Line_2& h1, const Line_2& h2) const { return compare_y_at_xC2(p.y(), h1.b(), h1.a(), h1.c(), h2.b(), h2.a(), h2.c()); } result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h) const { return compare_y_at_xC2(l1.b(), l1.a(), l1.c(), l2.b(), l2.a(), l2.c(), h.b(), h.a(), h.c()); } result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h1, const Line_2& h2) const { return compare_y_at_xC2(l1.b(), l1.a(), l1.c(), l2.b(), l2.a(), l2.c(), h1.b(), h1.a(), h1.c(), h2.b(), h2.a(), h2.c()); } }; template class Compare_xyz_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return compare_lexicographically_xyzC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); } }; template class Compare_xy_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return compare_lexicographically_xyC2(p.x(), p.y(), q.x(), q.y()); } }; template class Compare_xy_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return compare_lexicographically_xyC2(p.x(), p.y(), q.x(), q.y()); } }; template class Compare_x_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return ::CGAL:: compare(p.x(), q.x()); } result_type operator()( const Point_2& p, const Line_2& l, const Line_2& h) const { return compare_xC2(p.x(), l.a(), l.b(), l.c(), h.a(), h.b(), h.c()); } result_type operator()( const Line_2& l, const Line_2& h1, const Line_2& h2) const { return compare_xC2(l.a(), l.b(), l.c(), h1.a(), h1.b(), h1.c(), h2.a(), h2.b(), h2.c()); } result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h1, const Line_2& h2) const { return compare_xC2(l1.a(), l1.b(), l1.c(), l2.a(), l2.b(), l2.c(), h1.a(), h1.b(), h1.c(), h2.a(), h2.b(), h2.c()); } }; template class Compare_x_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return ::CGAL:: compare(p.x(), q.x()); } }; template class Compare_yx_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return compare_lexicographically_xyC2(p.y(), p.x(), q.y(), q.x()); } }; template class Compare_y_at_x_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Segment_2 Segment_2; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_2& p, const Line_2& h) const { return compare_y_at_xC2(p.x(), p.y(), h.a(), h.b(), h.c()); } result_type operator()( const Point_2& p, const Line_2& h1, const Line_2& h2) const { return compare_y_at_xC2(p.x(), h1.a(), h1.b(), h1.c(), h2.a(), h2.b(), h2.c()); } result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h) const { return compare_y_at_xC2(l1.a(), l1.b(), l1.c(), l2.a(), l2.b(), l2.c(), h.a(), h.b(), h.c()); } result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h1, const Line_2& h2) const { return compare_y_at_xC2(l1.a(), l1.b(), l1.c(), l2.a(), l2.b(), l2.c(), h1.a(), h1.b(), h1.c(), h2.a(), h2.b(), h2.c()); } result_type operator()( const Point_2& p, const Segment_2& s) const { return compare_y_at_xC2(p.x(), p.y(), s.source().x(), s.source().y(), s.target().x(), s.target().y()); } result_type operator()( const Point_2& p, const Segment_2& s1, const Segment_2& s2) const { return compare_y_at_x_segment_C2(p.x(), s1.source().x(), s1.source().y(), s1.target().x(), s1.target().y(), s2.source().x(), s2.source().y(), s2.target().x(), s2.target().y()); } }; template class Compare_y_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return ::CGAL:: compare(p.y(), q.y()); } result_type operator()( const Point_2& p, const Line_2& l1, const Line_2& l2) const { return compare_xC2(p.y(), l1.b(), l1.a(), l1.c(), l2.b(), l2.a(), l2.c()); } result_type operator()( const Line_2& l, const Line_2& h1, const Line_2& h2) const { return compare_xC2(l.b(), l.a(), l.c(), h1.b(), h1.a(), h1.c(), l.b(), l.a(), l.c(), h2.b(), h2.a(), h2.c()); } result_type operator()( const Line_2& l1, const Line_2& l2, const Line_2& h1, const Line_2& h2) const { return compare_xC2(l1.b(), l1.a(), l1.c(), l2.b(), l2.a(), l2.c(), h1.b(), h1.a(), h1.c(), h2.b(), h2.a(), h2.c()); } }; template class Compare_y_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return ::CGAL:: compare(p.y(), q.y()); } }; template class Compare_z_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Comparison_result result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return ::CGAL:: compare(p.z(), q.z()); } }; template class Compute_approximate_area_3 { typedef typename K::Circle_3 Circle_3; typedef typename K::FT FT; public: typedef double result_type; result_type operator() (const Circle_3 & c) const { return 3.14159265358979323846 * to_double(c.squared_radius()); } }; template class Compute_approximate_squared_length_3 { typedef typename K::Circle_3 Circle_3; typedef typename K::FT FT; public: typedef double result_type; result_type operator() (const Circle_3 & c) const { return 3.14159265358979323846 * 3.14159265358979323846 * 4.0 * to_double(c.squared_radius()); } }; template class Compute_area_2 { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Triangle_2 Triangle_2; typedef typename K::Point_2 Point_2; public: typedef FT result_type; result_type operator()( const Point_2& p, const Point_2& q, const Point_2& r ) const { FT v1x = q.x() - p.x(); FT v1y = q.y() - p.y(); FT v2x = r.x() - p.x(); FT v2y = r.y() - p.y(); return determinant(v1x, v1y, v2x, v2y)/2; } result_type operator()( const Iso_rectangle_2& r ) const { return (r.xmax()-r.xmin()) * (r.ymax()-r.ymin()); } result_type operator()( const Triangle_2& t ) const { return t.area(); } }; template class Compute_area_divided_by_pi_3 { typedef typename K::Circle_3 Circle_3; typedef typename K::FT FT; public: typedef FT result_type; result_type operator()(const Circle_3 & c) const { return c.rep().area_divided_by_pi(); } }; template class Compute_determinant_2 { typedef typename K::FT FT; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; result_type operator()(const Vector_2& v, const Vector_2& w) const { return determinant(v.x(), v.y(), w.x(), w.y()); } }; template class Compute_determinant_3 { typedef typename K::FT FT; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; result_type operator()(const Vector_3& v, const Vector_3& w, const Vector_3& t) const { return determinant(v.x(), v.y(), v.z(), w.x(), w.y(), w.z(), t.x(), t.y(), t.z()); } }; template class Compute_scalar_product_2 { typedef typename K::FT FT; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; result_type operator()(const Vector_2& v, const Vector_2& w) const { return v.x() * w.x() + v.y() * w.y(); } }; template class Compute_scalar_product_3 { typedef typename K::FT FT; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; result_type operator()(const Vector_3& v, const Vector_3& w) const { return v.x() * w.x() + v.y() * w.y() + v.z() * w.z(); } }; template class Compute_squared_area_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Triangle_3 Triangle_3; public: typedef FT result_type; result_type operator()( const Triangle_3& t ) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2)); } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r ) const { return squared_areaC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } }; template class Compute_squared_distance_Point_Point_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; public: typedef FT result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return squared_distanceC2(p.x(), p.y(), q.x(), q.y()); } }; template class Compute_squared_length_divided_by_pi_square_3 { typedef typename K::Circle_3 Circle_3; typedef typename K::FT FT; public: typedef FT result_type; result_type operator() (const Circle_3 & c) const { return c.rep().squared_length_divided_by_pi_square(); } }; template class Compute_squared_radius_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Circle_2 Circle_2; public: typedef FT result_type; const result_type& operator()( const Circle_2& c) const { return c.rep().squared_radius(); } result_type operator()( const Point_2& ) const { return FT(0); } result_type operator()( const Point_2& p, const Point_2& q) const { return squared_radiusC2(p.x(), p.y(), q.x(), q.y()); } result_type operator()( const Point_2& p, const Point_2& q, const Point_2& r) const { return squared_radiusC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } }; } template < typename K> struct Qualified_result_of, typename K::Circle_2> { typedef typename K::FT const & type; }; namespace CartesianKernelFunctors { template class Compute_squared_radius_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; public: typedef FT result_type; result_type operator()( const Sphere_3& s) const { return s.rep().squared_radius(); } result_type operator()( const Circle_3& c) const { return c.rep().squared_radius(); } result_type operator()( const Point_3& ) const { return FT(0); } result_type operator()( const Point_3& p, const Point_3& q) const { return squared_radiusC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r) const { return squared_radiusC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { return squared_radiusC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), s.x(), s.y(), s.z()); } }; template class Compute_volume_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; public: typedef FT result_type; result_type operator()(const Point_3& p0, const Point_3& p1, const Point_3& p2, const Point_3& p3) const { return determinant(p1.x()-p0.x(), p1.y()-p0.y(), p1.z()-p0.z(), p2.x()-p0.x(), p2.y()-p0.y(), p2.z()-p0.z(), p3.x()-p0.x(), p3.y()-p0.y(), p3.z()-p0.z())/6; } result_type operator()( const Tetrahedron_3& t ) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2), t.vertex(3)); } result_type operator()( const Iso_cuboid_3& c ) const { return c.rep().volume(); } }; template class Compute_x_2 : Has_qrt { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; const result_type & operator()(const Point_2& p) const { return p.rep().x(); } const result_type & operator()(const Vector_2& v) const { return v.rep().x(); } }; template class Compute_x_3 : Has_qrt { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; const result_type & operator()(const Point_3& p) const { return p.rep().x(); } const result_type & operator()(const Vector_3& v) const { return v.rep().x(); } }; template class Compute_y_2 : Has_qrt { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; const result_type & operator()(const Point_2& p) const { return p.rep().y(); } const result_type & operator()(const Vector_2& v) const { return v.rep().y(); } }; template class Compute_y_3 : Has_qrt { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; const result_type & operator()(const Point_3& p) const { return p.rep().y(); } const result_type & operator()(const Vector_3& v) const { return v.rep().y(); } }; template class Compute_z_3 : Has_qrt { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; const result_type & operator()(const Point_3& p) const { return p.rep().z(); } const result_type & operator()(const Vector_3& v) const { return v.rep().z(); } }; template class Compute_dx_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Direction_2 Direction_2; public: typedef FT result_type; const result_type & operator()(const Direction_2& d) const { return d.rep().dx(); } }; template class Compute_dx_3 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Direction_3 Direction_3; public: typedef FT result_type; const result_type & operator()(const Direction_3& d) const { return d.rep().dx(); } }; template class Compute_dy_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Direction_2 Direction_2; public: typedef FT result_type; const result_type & operator()(const Direction_2& d) const { return d.rep().dy(); } }; template class Compute_dy_3 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Direction_3 Direction_3; public: typedef FT result_type; const result_type & operator()(const Direction_3& d) const { return d.rep().dy(); } }; template class Compute_dz_3 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Direction_3 Direction_3; public: typedef FT result_type; const result_type & operator()(const Direction_3& d) const { return d.rep().dz(); } }; template class Compute_hx_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; const result_type & operator()(const Point_2& p) const { return p.rep().hx(); } const result_type & operator()(const Vector_2& v) const { return v.rep().hx(); } }; template class Compute_hx_3 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; const result_type & operator()(const Point_3& p) const { return p.rep().hx(); } const result_type & operator()(const Vector_3& v) const { return v.rep().hx(); } }; template class Compute_hy_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; const result_type & operator()(const Point_2& p) const { return p.rep().hy(); } const result_type & operator()(const Vector_2& v) const { return v.rep().hy(); } }; template class Compute_hy_3 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; const result_type & operator()(const Point_3& p) const { return p.rep().hy(); } const result_type & operator()(const Vector_3& v) const { return v.rep().hy(); } }; template class Compute_hz_3 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; const result_type & operator()(const Point_3& p) const { return p.rep().hz(); } const result_type & operator()(const Vector_3& v) const { return v.rep().hz(); } }; template class Compute_hw_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; public: typedef FT result_type; const result_type & operator()(const Point_2& p) const { return p.rep().hw(); } const result_type & operator()(const Vector_2& v) const { return v.rep().hw(); } }; template class Compute_hw_3 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef FT result_type; const result_type & operator()(const Point_3& p) const { return p.rep().hw(); } const result_type & operator()(const Vector_3& v) const { return v.rep().hw(); } }; template class Compute_xmin_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; public: typedef FT result_type; const result_type & operator()(const Iso_rectangle_2& r) const { return (r.min)().x(); } }; template class Compute_xmax_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; public: typedef FT result_type; const result_type & operator()(const Iso_rectangle_2& r) const { return (r.max)().x(); } }; template class Compute_ymin_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; public: typedef FT result_type; const result_type & operator()(const Iso_rectangle_2& r) const { return (r.min)().y(); } }; template class Compute_ymax_2 : public Has_qrt { typedef typename K::FT FT; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; public: typedef FT result_type; const result_type & operator()(const Iso_rectangle_2& r) const { return (r.max)().y(); } }; template class Construct_barycenter_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; public: typedef Point_2 result_type; result_type operator()(const Point_2& p1, const FT&w1, const Point_2& p2) const { typename K::Construct_point_2 construct_point_2; FT x, y; barycenterC2(p1.x(), p1.y(), w1, p2.x(), p2.y(), x, y); return construct_point_2(x, y); } result_type operator()(const Point_2& p1, const FT& w1, const Point_2& p2, const FT& w2) const { typename K::Construct_point_2 construct_point_2; FT x, y; barycenterC2(p1.x(), p1.y(), w1, p2.x(), p2.y(), w2, x, y); return construct_point_2(x, y); } result_type operator()(const Point_2& p1, const FT& w1, const Point_2& p2, const FT& w2, const Point_2& p3) const { typename K::Construct_point_2 construct_point_2; FT x, y; barycenterC2(p1.x(), p1.y(), w1, p2.x(), p2.y(), w2, p3.x(), p3.y(), x, y); return construct_point_2(x, y); } result_type operator()(const Point_2& p1, const FT& w1, const Point_2& p2, const FT& w2, const Point_2& p3, const FT& w3) const { typename K::Construct_point_2 construct_point_2; FT x, y; barycenterC2(p1.x(), p1.y(), w1, p2.x(), p2.y(), w2, p3.x(), p3.y(), w3, x, y); return construct_point_2(x, y); } result_type operator()(const Point_2& p1, const FT& w1, const Point_2& p2, const FT& w2, const Point_2& p3, const FT& w3, const Point_2& p4) const { typename K::Construct_point_2 construct_point_2; FT x, y; barycenterC2(p1.x(), p1.y(), w1, p2.x(), p2.y(), w2, p3.x(), p3.y(), w3, p4.x(), p4.y(), x, y); return construct_point_2(x, y); } result_type operator()(const Point_2& p1, const FT& w1, const Point_2& p2, const FT& w2, const Point_2& p3, const FT& w3, const Point_2& p4, const FT& w4) const { typename K::Construct_point_2 construct_point_2; FT x, y; barycenterC2(p1.x(), p1.y(), w1, p2.x(), p2.y(), w2, p3.x(), p3.y(), w3, p4.x(), p4.y(), w4, x, y); return construct_point_2(x, y); } }; template class Construct_barycenter_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; public: typedef Point_3 result_type; result_type operator()(const Point_3& p1, const FT&w1, const Point_3& p2) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; barycenterC3(p1.x(), p1.y(), p1.z(), w1, p2.x(), p2.y(), p2.z(), x, y, z); return construct_point_3(x, y, z); } result_type operator()(const Point_3& p1, const FT& w1, const Point_3& p2, const FT& w2) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; barycenterC3(p1.x(), p1.y(), p1.z(), w1, p2.x(), p2.y(), p2.z(), w2, x, y, z); return construct_point_3(x, y, z); } result_type operator()(const Point_3& p1, const FT& w1, const Point_3& p2, const FT& w2, const Point_3& p3) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; barycenterC3(p1.x(), p1.y(), p1.z(), w1, p2.x(), p2.y(), p2.z(), w2, p3.x(), p3.y(), p3.z(), x, y, z); return construct_point_3(x, y, z); } result_type operator()(const Point_3& p1, const FT& w1, const Point_3& p2, const FT& w2, const Point_3& p3, const FT& w3) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; barycenterC3(p1.x(), p1.y(), p1.z(), w1, p2.x(), p2.y(), p2.z(), w2, p3.x(), p3.y(), p3.z(), w3, x, y, z); return construct_point_3(x, y, z); } result_type operator()(const Point_3& p1, const FT& w1, const Point_3& p2, const FT& w2, const Point_3& p3, const FT& w3, const Point_3& p4) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; barycenterC3(p1.x(), p1.y(), p1.z(), w1, p2.x(), p2.y(), p2.z(), w2, p3.x(), p3.y(), p3.z(), w3, p4.x(), p4.y(), p4.z(), x, y, z); return construct_point_3(x, y, z); } result_type operator()(const Point_3& p1, const FT& w1, const Point_3& p2, const FT& w2, const Point_3& p3, const FT& w3, const Point_3& p4, const FT& w4) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; barycenterC3(p1.x(), p1.y(), p1.z(), w1, p2.x(), p2.y(), p2.z(), w2, p3.x(), p3.y(), p3.z(), w3, p4.x(), p4.y(), p4.z(), w4, x, y, z); return construct_point_3(x, y, z); } }; template class Construct_base_vector_3 { typedef typename K::Vector_3 Vector_3; typedef typename K::Plane_3 Plane_3; typedef typename K::FT FT; typedef typename K::Construct_cross_product_vector_3 Construct_cross_product_vector_3; typedef typename K::Construct_orthogonal_vector_3 Construct_orthogonal_vector_3; Construct_cross_product_vector_3 cp; Construct_orthogonal_vector_3 co; public: typedef Vector_3 result_type; Construct_base_vector_3() {} Construct_base_vector_3(const Construct_cross_product_vector_3& cp_, const Construct_orthogonal_vector_3& co_) : cp(cp_), co(co_) {} result_type operator()( const Plane_3& h, int index ) const { if (index == 1) { if ( ::CGAL:: is_zero(h.a()) ) return Vector_3(FT(1), FT(0), FT(0)); if ( ::CGAL:: is_zero(h.b()) ) return Vector_3(FT(0), FT(1), FT(0)); if ( ::CGAL:: is_zero(h.c()) ) return Vector_3(FT(0), FT(0), FT(1)); return Vector_3(-h.b(), h.a(), FT(0)); } else { return cp(co(h), this->operator()(h,1)); } } }; template class Construct_bbox_2 { typedef typename K::Point_2 Point_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Triangle_2 Triangle_2; typedef typename K::Circle_2 Circle_2; public: typedef Bbox_2 result_type; result_type operator()(const Point_2& p) const { std::pair xp = ::CGAL:: to_interval(p.x()); std::pair yp = ::CGAL:: to_interval(p.y()); return Bbox_2(xp.first, yp.first, xp.second, yp.second); } result_type operator()(const Segment_2& s) const { return s.source().bbox() + s.target().bbox(); } result_type operator()(const Triangle_2& t) const { typename K::Construct_bbox_2 construct_bbox_2; return construct_bbox_2(t.vertex(0)) + construct_bbox_2(t.vertex(1)) + construct_bbox_2(t.vertex(2)); } result_type operator()(const Iso_rectangle_2& r) const { typename K::Construct_bbox_2 construct_bbox_2; return construct_bbox_2((r.min)()) + construct_bbox_2((r.max)()); } result_type operator()(const Circle_2& c) const { typename K::Construct_bbox_2 construct_bbox_2; Bbox_2 b = construct_bbox_2(c.center()); Interval_nt<> x (b.xmin(), b.xmax()); Interval_nt<> y (b.ymin(), b.ymax()); Interval_nt<> sqr = ::CGAL:: to_interval(c.squared_radius()); Interval_nt<> r = CGAL::sqrt(sqr); Interval_nt<> minx = x-r; Interval_nt<> maxx = x+r; Interval_nt<> miny = y-r; Interval_nt<> maxy = y+r; return Bbox_2(minx.inf(), miny.inf(), maxx.sup(), maxy.sup()); } }; template class Construct_bbox_3 { typedef typename K::Point_3 Point_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Iso_cuboid_3 Iso_cuboid_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::Circle_3 Circle_3; public: typedef Bbox_3 result_type; Bbox_3 operator()(const Point_3& p) const { std::pair xp = ::CGAL:: to_interval(p.x()); std::pair yp = ::CGAL:: to_interval(p.y()); std::pair zp = ::CGAL:: to_interval(p.z()); return Bbox_3(xp.first, yp.first, zp.first, xp.second, yp.second, zp.second); } Bbox_3 operator()(const Segment_3& s) const { return s.source().bbox() + s.target().bbox(); } Bbox_3 operator()(const Triangle_3& t) const { typename K::Construct_bbox_3 construct_bbox_3; return construct_bbox_3(t.vertex(0)) + construct_bbox_3(t.vertex(1)) + construct_bbox_3(t.vertex(2)); } Bbox_3 operator()(const Iso_cuboid_3& r) const { typename K::Construct_bbox_3 construct_bbox_3; return construct_bbox_3((r.min)()) + construct_bbox_3((r.max)()); } Bbox_3 operator()(const Tetrahedron_3& t) const { typename K::Construct_bbox_3 construct_bbox_3; return construct_bbox_3(t.vertex(0)) + construct_bbox_3(t.vertex(1)) + construct_bbox_3(t.vertex(2)) + construct_bbox_3(t.vertex(3)); } Bbox_3 operator()(const Sphere_3& s) const { typename K::Construct_bbox_3 construct_bbox_3; Bbox_3 b = construct_bbox_3(s.center()); Interval_nt<> x (b.xmin(), b.xmax()); Interval_nt<> y (b.ymin(), b.ymax()); Interval_nt<> z (b.zmin(), b.zmax()); Interval_nt<> sqr = ::CGAL:: to_interval(s.squared_radius()); Interval_nt<> r = CGAL::sqrt(sqr); Interval_nt<> minx = x-r; Interval_nt<> maxx = x+r; Interval_nt<> miny = y-r; Interval_nt<> maxy = y+r; Interval_nt<> minz = z-r; Interval_nt<> maxz = z+r; return Bbox_3(minx.inf(), miny.inf(), minz.inf(), maxx.sup(), maxy.sup(), maxz.sup()); } Bbox_3 operator()(const Circle_3& c) const { return c.rep().bbox(); } }; template class Construct_bisector_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; public: typedef Line_2 result_type; result_type operator()(const Point_2& p, const Point_2& q) const { FT a, b, c; bisector_of_pointsC2(p.x(), p.y(), q.x(), q.y(), a, b, c); return Line_2(a, b, c); } result_type operator()(const Line_2& p, const Line_2& q) const { FT a, b, c; bisector_of_linesC2(p.a(), p.b(), p.c(), q.a(), q.b(), q.c(), a, b, c); return Line_2(a, b, c); } }; template class Construct_bisector_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; public: typedef Plane_3 result_type; result_type operator()(const Point_3& p, const Point_3& q) const { FT a, b, c, d; bisector_of_pointsC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), a, b, c, d); return Plane_3(a, b, c, d); } result_type operator()(const Plane_3& p, const Plane_3& q) const { FT a, b, c, d; bisector_of_planesC3(p.a(), p.b(), p.c(), p.d(), q.a(), q.b(), q.c(), q.d(), a, b, c, d); return Plane_3(a, b, c, d); } }; template class Construct_centroid_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Triangle_2 Triangle_2; public: typedef Point_2 result_type; result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { typename K::Construct_point_2 construct_point_2; FT x, y; centroidC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), x, y); return construct_point_2(x, y); } result_type operator()(const Triangle_2& t) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2)); } result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& s) const { typename K::Construct_point_2 construct_point_2; FT x, y; centroidC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), s.x(), s.y(), x, y); return construct_point_2(x, y); } }; template class Construct_centroid_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; public: typedef Point_3 result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; centroidC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), x, y, z); return construct_point_3(x, y, z); } result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; centroidC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), s.x(), s.y(), s.z(), x, y, z); return construct_point_3(x, y, z); } result_type operator()(const Triangle_3& t) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2)); } result_type operator()(const Tetrahedron_3& t) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2), t.vertex(3)); } }; template class Construct_circumcenter_2 { typedef typename K::Point_2 Point_2; typedef typename K::Triangle_2 Triangle_2; public: typedef Point_2 result_type; Point_2 operator()(const Point_2& p, const Point_2& q) const { typename K::Construct_midpoint_2 construct_midpoint_2; return construct_midpoint_2(p, q); } result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { typename K::Construct_point_2 construct_point_2; typedef typename K::FT FT; FT x, y; circumcenterC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), x, y); return construct_point_2(x, y); } result_type operator()(const Triangle_2& t) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2)); } }; template class Construct_circumcenter_3 { typedef typename K::FT FT; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Point_3 Point_3; public: typedef Point_3 result_type; Point_3 operator()(const Point_3& p, const Point_3& q) const { typename K::Construct_midpoint_3 construct_midpoint_3; return construct_midpoint_3(p, q); } Point_3 operator()(const Point_3& p, const Point_3& q, const Point_3& s) const { typename K::Construct_point_3 construct_point_3; FT psx = p.x()-s.x(); FT psy = p.y()-s.y(); FT psz = p.z()-s.z(); FT ps2 = ::CGAL:: square(psx) + ::CGAL:: square(psy) + ::CGAL:: square(psz); FT qsx = q.x()-s.x(); FT qsy = q.y()-s.y(); FT qsz = q.z()-s.z(); FT qs2 = ::CGAL:: square(qsx) + ::CGAL:: square(qsy) + ::CGAL:: square(qsz); FT rsx = psy*qsz-psz*qsy; FT rsy = psz*qsx-psx*qsz; FT rsz = psx*qsy-psy*qsx; # 2076 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h" FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz) - qs2 * determinant(psy,psz,rsy,rsz); FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz) - qs2 * determinant(psx,psz,rsx,rsz); FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy) - qs2 * determinant(psx,psy,rsx,rsy); FT den = determinant(psx,psy,psz, qsx,qsy,qsz, rsx,rsy,rsz); (CGAL::possibly(den != 0)?(static_cast(0)): ::CGAL::assertion_fail( "den != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2087)); FT inv = 1 / (2 * den); FT x = s.x() + num_x*inv; FT y = s.y() - num_y*inv; FT z = s.z() + num_z*inv; return construct_point_3(x, y, z); } Point_3 operator()(const Triangle_3& t) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2)); } Point_3 operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { typename K::Construct_point_3 construct_point_3; FT qpx = q.x()-p.x(); FT qpy = q.y()-p.y(); FT qpz = q.z()-p.z(); FT qp2 = ::CGAL:: square(qpx) + ::CGAL:: square(qpy) + ::CGAL:: square(qpz); FT rpx = r.x()-p.x(); FT rpy = r.y()-p.y(); FT rpz = r.z()-p.z(); FT rp2 = ::CGAL:: square(rpx) + ::CGAL:: square(rpy) + ::CGAL:: square(rpz); FT spx = s.x()-p.x(); FT spy = s.y()-p.y(); FT spz = s.z()-p.z(); FT sp2 = ::CGAL:: square(spx) + ::CGAL:: square(spy) + ::CGAL:: square(spz); FT num_x = determinant(qpy,qpz,qp2, rpy,rpz,rp2, spy,spz,sp2); FT num_y = determinant(qpx,qpz,qp2, rpx,rpz,rp2, spx,spz,sp2); FT num_z = determinant(qpx,qpy,qp2, rpx,rpy,rp2, spx,spy,sp2); FT den = determinant(qpx,qpy,qpz, rpx,rpy,rpz, spx,spy,spz); (CGAL::possibly(! ::CGAL:: is_zero(den))?(static_cast(0)): ::CGAL::assertion_fail( "! CGAL_NTS is_zero(den)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2133)); FT inv = 1 / (2 * den); FT x = p.x() + num_x*inv; FT y = p.y() - num_y*inv; FT z = p.z() + num_z*inv; return construct_point_3(x, y, z); } Point_3 operator()(const Tetrahedron_3& t) const { return this->operator()(t.vertex(0), t.vertex(1), t.vertex(2), t.vertex(3)); } }; template class Construct_cross_product_vector_3 { typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()(const Vector_3& v, const Vector_3& w) const { return Vector_3(v.y() * w.z() - v.z() * w.y(), v.z() * w.x() - v.x() * w.z(), v.x() * w.y() - v.y() * w.x()); } }; template class Construct_lifted_point_3 { typedef typename K::Point_2 Point_2; typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Construct_base_vector_3 Construct_base_vector_3; typedef typename K::Construct_point_on_3 Construct_point_on_3; typedef typename K::Construct_scaled_vector_3 Construct_scaled_vector_3; typedef typename K::Construct_translated_point_3 Construct_translated_point_3; Construct_base_vector_3 cb; Construct_point_on_3 cp; Construct_scaled_vector_3 cs; Construct_translated_point_3 ct; public: typedef Point_3 result_type; Construct_lifted_point_3() {} Construct_lifted_point_3(const Construct_base_vector_3& cb_, const Construct_point_on_3& cp_, const Construct_scaled_vector_3& cs_, const Construct_translated_point_3& ct_) : cb(cb_), cp(cp_), cs(cs_), ct(ct_) {} Point_3 operator()(const Plane_3& h, const Point_2& p) const { return ct(ct(cp(h), cs(cb(h,1), p.x())), cs(cb(h,2), p.y())); } }; template class Construct_direction_2 { typedef typename K::Direction_2 Direction_2; typedef typename Direction_2::Rep Rep; typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Line_2 Line_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Segment_2 Segment_2; typedef typename K::RT RT; public: typedef Direction_2 result_type; Rep operator()(Return_base_tag, const RT& x, const RT& y) const { return Rep(x, y); } Rep operator()(Return_base_tag, const Vector_2& v) const { return Rep(v.x(),v.y()); } Rep operator()(Return_base_tag, const Line_2& l) const { return Rep(l.b(), -l.a()); } Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q) const { return Rep(q.x() - p.x(), q.y() - p.y()); } Rep operator()(Return_base_tag, const Ray_2& r) const { return this->operator()(Return_base_tag(), r.source(), r.second_point()); } Rep operator()(Return_base_tag, const Segment_2& s) const { return this->operator()(Return_base_tag(), s.source(), s.target()); } Direction_2 operator()(const RT& x, const RT& y) const { return this->operator()(Return_base_tag(), x, y); } Direction_2 operator()(const Vector_2& v) const { return this->operator()(Return_base_tag(), v); } Direction_2 operator()(const Line_2& l) const { return this->operator()(Return_base_tag(), l); } Direction_2 operator()(const Point_2& p, const Point_2& q) const { return this->operator()(Return_base_tag(), p, q); } Direction_2 operator()(const Ray_2& r) const { return this->operator()(Return_base_tag(), r); } Direction_2 operator()(const Segment_2& s) const { return this->operator()(Return_base_tag(), s); } }; template class Construct_direction_3 { typedef typename K::Direction_3 Direction_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Line_3 Line_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Segment_3 Segment_3; typedef typename K::RT RT; typedef typename Direction_3::Rep Rep; public: typedef Direction_3 result_type; Rep operator()(Return_base_tag, const RT& x, const RT& y, const RT& z) const { return Rep(x, y, z); } Rep operator()(Return_base_tag, const Vector_3& v) const { return Rep(v); } Rep operator()(Return_base_tag, const Line_3& l) const { return Rep(l); } Rep operator()(Return_base_tag, const Ray_3& r) const { return Rep(r); } Rep operator()(Return_base_tag, const Segment_3& s) const { return Rep(s); } Direction_3 operator()(const RT& x, const RT& y, const RT& z) const { return this->operator()(Return_base_tag(), x, y, z); } Direction_3 operator()(const Vector_3& v) const { return this->operator()(Return_base_tag(), v); } Direction_3 operator()(const Line_3& l) const { return this->operator()(Return_base_tag(), l); } Direction_3 operator()(const Ray_3& r) const { return this->operator()(Return_base_tag(), r); } Direction_3 operator()(const Segment_3& s) const { return this->operator()(Return_base_tag(), s); } }; template class Construct_equidistant_line_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Line_3 Line_3; typedef typename Line_3::Rep Rep; public: typedef Line_3 result_type; Line_3 operator()( const Point_3& p, const Point_3& q, const Point_3& s) const { (CGAL::possibly(! collinear(p, q, s))?(static_cast(0)): ::CGAL::precondition_fail( "! collinear(p, q, s)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2347)); FT psx = p.x()-s.x(); FT psy = p.y()-s.y(); FT psz = p.z()-s.z(); FT ps2 = ::CGAL:: square(psx) + ::CGAL:: square(psy) + ::CGAL:: square(psz); FT qsx = q.x()-s.x(); FT qsy = q.y()-s.y(); FT qsz = q.z()-s.z(); FT qs2 = ::CGAL:: square(qsx) + ::CGAL:: square(qsy) + ::CGAL:: square(qsz); FT rsx = psy*qsz-psz*qsy; FT rsy = psz*qsx-psx*qsz; FT rsz = psx*qsy-psy*qsx; # 2374 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h" FT num_x = ps2 * determinant(qsy,qsz,rsy,rsz) - qs2 * determinant(psy,psz,rsy,rsz); FT num_y = ps2 * determinant(qsx,qsz,rsx,rsz) - qs2 * determinant(psx,psz,rsx,rsz); FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy) - qs2 * determinant(psx,psy,rsx,rsy); FT den = determinant(psx,psy,psz, qsx,qsy,qsz, rsx,rsy,rsz); (CGAL::possibly(den != 0)?(static_cast(0)): ::CGAL::assertion_fail( "den != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2385)); FT inv = 1 / (2 * den); FT x = s.x() + num_x*inv; FT y = s.y() - num_y*inv; FT z = s.z() + num_z*inv; return Rep(Point_3(x, y, z), Vector_3(rsx, rsy, rsz)); } }; template class Construct_iso_rectangle_2 { typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename Iso_rectangle_2::Rep Rep; public: typedef Iso_rectangle_2 result_type; Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q, int) const { return Rep(p, q, 0); } Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q) const { FT minx, maxx, miny, maxy; if (p.x() < q.x()) { minx = p.x(); maxx = q.x(); } else { minx = q.x(); maxx = p.x(); } if (p.y() < q.y()) { miny = p.y(); maxy = q.y(); } else { miny = q.y(); maxy = p.y(); } return Rep(Point_2(minx, miny), Point_2(maxx, maxy), 0); } Rep operator()(Return_base_tag, const Point_2 &left, const Point_2 &right, const Point_2 &bottom, const Point_2 &top) const { typename K::Less_x_2 less_x; typename K::Less_y_2 less_y; (CGAL::possibly(!less_x(right, left))?(static_cast(0)): ::CGAL::assertion_fail( "!less_x(right, left)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2436)); (CGAL::possibly(!less_y(top, bottom))?(static_cast(0)): ::CGAL::assertion_fail( "!less_y(top, bottom)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2437)); return Rep(Point_2(left.x(), bottom.y()), Point_2(right.x(), top.y()), 0); } Rep operator()(Return_base_tag, const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy) const { (CGAL::possibly(min_hx <= max_hx)?(static_cast(0)): ::CGAL::precondition_fail( "min_hx <= max_hx" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2446)); (CGAL::possibly(min_hy <= max_hy)?(static_cast(0)): ::CGAL::precondition_fail( "min_hy <= max_hy" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2447)); return Rep(Point_2(min_hx, min_hy), Point_2(max_hx, max_hy), 0); } Rep operator()(Return_base_tag, const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy, const RT& hw) const { if (hw == 1) return Rep(Point_2(min_hx, min_hy), Point_2(max_hx, max_hy), 0); return Rep(Point_2(min_hx/hw, min_hy/hw), Point_2(max_hx/hw, max_hy/hw), 0); } Iso_rectangle_2 operator()(const Point_2& p, const Point_2& q, int i) const { return this->operator()(Return_base_tag(), p, q, i); } Iso_rectangle_2 operator()(const Point_2& p, const Point_2& q) const { return this->operator()(Return_base_tag(), p, q); } Iso_rectangle_2 operator()(const Point_2 &left, const Point_2 &right, const Point_2 &bottom, const Point_2 &top) const { return this->operator()(Return_base_tag(), left, right, bottom, top); } Iso_rectangle_2 operator()(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy) const { return this->operator()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy); } Iso_rectangle_2 operator()(const RT& min_hx, const RT& min_hy, const RT& max_hx, const RT& max_hy, const RT& hw) const { return this->operator()(Return_base_tag(), min_hx, min_hy, max_hx, max_hy, hw); } }; template class Construct_line_2 { typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Point_2 Point_2; typedef typename K::Direction_2 Direction_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Line_2 Line_2; typedef typename Line_2::Rep Rep; typedef typename K::Construct_point_on_2 Construct_point_on_2; Construct_point_on_2 c; public: typedef Line_2 result_type; Construct_line_2() {} Construct_line_2(const Construct_point_on_2& c_) : c(c_) {} Rep operator()(Return_base_tag, const RT& a, const RT& b, const RT& cc) const { return Rep(a, b, cc); } Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q) const { FT a, b, cc; line_from_pointsC2(p.x(), p.y(), q.x(), q.y(), a, b, cc); return Rep(a, b, cc); } Rep operator()(Return_base_tag, const Point_2& p, const Direction_2& d) const { FT a, b, cc; line_from_point_directionC2(p.x(), p.y(), d.dx(), d.dy(), a, b, cc); return Rep(a, b, cc); } Rep operator()(Return_base_tag, const Point_2& p, const Vector_2& v) const { FT a, b, cc; line_from_point_directionC2(p.x(), p.y(), v.x(), v.y(), a, b, cc); return Rep(a, b, cc); } Rep operator()(Return_base_tag, const Segment_2& s) const { return this->operator()(Return_base_tag(), c(s, 0), c(s, 1)); } Rep operator()(Return_base_tag, const Ray_2& r) const { return this->operator()(Return_base_tag(), c(r, 0), c(r, 1)); } Line_2 operator()(const RT& a, const RT& b, const RT& cc) const { return this->operator()(Return_base_tag(), a, b, cc); } Line_2 operator()(const Point_2& p, const Point_2& q) const { return this->operator()(Return_base_tag(), p, q); } Line_2 operator()(const Point_2& p, const Direction_2& d) const { return this->operator()(Return_base_tag(), p, d); } Line_2 operator()(const Point_2& p, const Vector_2& v) const { return this->operator()(Return_base_tag(), p, v); } Line_2 operator()(const Segment_2& s) const { return this->operator()(Return_base_tag(), s); } Line_2 operator()(const Ray_2& r) const { return this->operator()(Return_base_tag(), r); } }; template class Construct_line_3 { typedef typename K::Point_3 Point_3; typedef typename K::Direction_3 Direction_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Line_3 Line_3; typedef typename K::Vector_3 Vector_3; typedef typename Line_3::Rep Rep; public: typedef Line_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q) const { return Rep(p, Vector_3(p, q)); } Rep operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const { return operator()(Return_base_tag(), p, Vector_3(d.dx(), d.dy(), d.dz())); } Rep operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const { return Rep(p, v); } Rep operator()(Return_base_tag, const Segment_3& s) const { return Rep(s.source(), Vector_3(s.source(), s.target())); } Rep operator()(Return_base_tag, const Ray_3& r) const { return Rep(r.source(), Vector_3(r.source(), r.second_point())); } Line_3 operator()(const Point_3& p, const Point_3& q) const { return this->operator()(Return_base_tag(), p, q); } Line_3 operator()(const Point_3& p, const Direction_3& d) const { return this->operator()(Return_base_tag(), p, d); } Line_3 operator()(const Point_3& p, const Vector_3& v) const { return this->operator()(Return_base_tag(), p, v); } Line_3 operator()(const Segment_3& s) const { return this->operator()(Return_base_tag(), s); } Line_3 operator()(const Ray_3& r) const { return this->operator()(Return_base_tag(), r); } }; template class Construct_midpoint_2 { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; public: typedef Point_2 result_type; Point_2 operator()(const Point_2& p, const Point_2& q) const { typename K::Construct_point_2 construct_point_2; FT x, y; midpointC2(p.x(), p.y(), q.x(), q.y(), x, y); return construct_point_2(x, y); } }; template class Construct_midpoint_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; public: typedef Point_3 result_type; Point_3 operator()(const Point_3& p, const Point_3& q) const { typename K::Construct_point_3 construct_point_3; FT x, y, z; midpointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), x, y, z); return construct_point_3(x, y, z); } }; template class Construct_opposite_vector_2 { typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; Vector_2 operator()( const Vector_2& v) const { return Vector_2(-v.x(), -v.y()); } }; template class Construct_difference_of_vectors_2 { typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; Vector_2 operator()( const Vector_2& v, const Vector_2& w) const { return Vector_2(v.x()-w.x(), v.y()-w.y()); } }; template class Construct_difference_of_vectors_3 { typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()( const Vector_3& v, const Vector_3& w) const { return Vector_3(v.x()-w.x(), v.y()-w.y(), v.z()-w.z()); } }; template class Construct_sum_of_vectors_2 { typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; Vector_2 operator()( const Vector_2& v, const Vector_2& w) const { return Vector_2(v.x()+w.x(), v.y()+w.y()); } }; template class Construct_sum_of_vectors_3 { typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()( const Vector_3& v, const Vector_3& w) const { return Vector_3(v.x()+w.x(), v.y()+w.y(), v.z()+w.z()); } }; template class Construct_opposite_vector_3 { typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()( const Vector_3& v) const { return Vector_3(-v.x(), -v.y(), -v.z()); } }; template class Construct_orthogonal_vector_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Plane_3 Plane_3; public: typedef Vector_3 result_type; Vector_3 operator()( const Plane_3& p ) const { return Vector_3(p.a(), p.b(), p.c()); } Vector_3 operator()( const Point_3& p, const Point_3& q, const Point_3& r ) const { FT rpx = p.x()-r.x(); FT rpy = p.y()-r.y(); FT rpz = p.z()-r.z(); FT rqx = q.x()-r.x(); FT rqy = q.y()-r.y(); FT rqz = q.z()-r.z(); FT vx = rpy*rqz - rqy*rpz; FT vy = rpz*rqx - rqz*rpx; FT vz = rpx*rqy - rqx*rpy; typename K::Construct_vector_3 construct_vector; return construct_vector(vx, vy, vz); } }; template class Construct_perpendicular_vector_2 { typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; Vector_2 operator()( const Vector_2& v, Orientation o) const { (CGAL::possibly(o != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "o != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2786)); if (o == COUNTERCLOCKWISE) return K().construct_vector_2_object()(-v.y(), v.x()); else return K().construct_vector_2_object()(v.y(), -v.x()); } }; template class Construct_perpendicular_direction_2 { typedef typename K::Direction_2 Direction_2; public: typedef Direction_2 result_type; Direction_2 operator()( const Direction_2& d, Orientation o) const { (CGAL::possibly(o != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "o != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2804)); if (o == COUNTERCLOCKWISE) return K().construct_direction_2_object()(-d.dy(), d.dx()); else return K().construct_direction_2_object()(d.dy(), -d.dx()); } }; template class Construct_perpendicular_line_2 { typedef typename K::Line_2 Line_2; typedef typename K::Point_2 Point_2; public: typedef Line_2 result_type; Line_2 operator()( const Line_2& l, const Point_2& p) const { typename K::FT fta, ftb, ftc; perpendicular_through_pointC2(l.a(), l.b(), p.x(), p.y(), fta, ftb, ftc); return Line_2(fta, ftb, ftc); } }; template class Construct_point_2 { typedef typename K::RT RT; typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename Point_2::Rep Rep; public: typedef Point_2 result_type; Rep operator()(Return_base_tag, Origin o) const { return Rep(o); } Rep operator()(Return_base_tag, const RT& x, const RT& y) const { return Rep(x, y); } Rep operator()(Return_base_tag, const RT& x, const RT& y, const RT& w) const { return Rep(x, y, w); } Point_2 operator()(const Line_2& l) const { typename K::Construct_point_2 construct_point_2; typename K::FT x, y; line_get_pointC2(l.a(), l.b(), l.c(), 0, x, y); return construct_point_2(x,y); } Point_2 operator()(const Line_2& l, int i) const { typename K::Construct_point_2 construct_point_2; typename K::FT x, y; line_get_pointC2(l.a(), l.b(), l.c(), i, x, y); return construct_point_2(x,y); } Point_2 operator()(Origin o) const { return Point_2(o); } Point_2 operator()(const RT& x, const RT& y) const { return Point_2(x, y); } Point_2 operator()(const RT& x, const RT& y, const RT& w) const { return Point_2(x, y, w); } }; template class Construct_point_3 { typedef typename K::RT RT; typedef typename K::Point_3 Point_3; typedef typename Point_3::Rep Rep; public: typedef Point_3 result_type; Rep operator()(Return_base_tag, Origin o) const { return Rep(o); } Rep operator()(Return_base_tag, const RT& x, const RT& y, const RT& z) const { return Rep(x, y, z); } Rep operator()(Return_base_tag, const RT& x, const RT& y, const RT& z, const RT& w) const { return Rep(x, y, z, w); } Point_3 operator()(Origin o) const { return Point_3(o); } Point_3 operator()(const RT& x, const RT& y, const RT& z) const { return Point_3(x, y, z); } Point_3 operator()(const RT& x, const RT& y, const RT& z, const RT& w) const { return Point_3(x, y, z, w); } }; template class Construct_projected_point_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; public: typedef Point_2 result_type; Point_2 operator()( const Line_2& l, const Point_2& p ) const { typename K::FT x, y; typename K::Construct_point_2 construct_point_2; line_project_pointC2(l.a(), l.b(), l.c(), p.x(), p.y(), x, y); return construct_point_2(x, y); } }; template class Construct_projected_point_3 { typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Line_3 Line_3; typedef typename K::FT FT; public: typedef Point_3 result_type; Point_3 operator()( const Line_3& l, const Point_3& p ) const { FT lpx = l.point().x(); FT lpy = l.point().y(); FT lpz = l.point().z(); FT ldx = l.direction().dx(); FT ldy = l.direction().dy(); FT ldz = l.direction().dz(); FT dpx = p.x()-lpx; FT dpy = p.y()-lpy; FT dpz = p.z()-lpz; FT lambda = (ldx*dpx+ldy*dpy+ldz*dpz) / (ldx*ldx+ldy*ldy+ldz*ldz); return Point_3(lpx + lambda * ldx, lpy + lambda * ldy, lpz + lambda * ldz); } Point_3 operator()( const Plane_3& h, const Point_3& p ) const { return h.rep().projection(p); } }; template class Construct_radical_line_2 { typedef typename K::Line_2 Line_2; typedef typename K::Circle_2 Circle_2; typedef typename K::FT FT; public: typedef Line_2 result_type; result_type operator() (const Circle_2 & c1, const Circle_2 & c2) const { (CGAL::possibly(c1.center() != c2.center())?(static_cast(0)): ::CGAL::precondition_fail( "c1.center() != c2.center()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 2989)); const FT a = 2*(c2.center().x() - c1.center().x()); const FT b = 2*(c2.center().y() - c1.center().y()); const FT c = CGAL::square(c1.center().x()) + CGAL::square(c1.center().y()) - c1.squared_radius() - CGAL::square(c2.center().x()) - CGAL::square(c2.center().y()) + c2.squared_radius(); return Line_2(a, b, c); } }; template class Construct_radical_plane_3 { typedef typename K::Plane_3 Plane_3; typedef typename K::Sphere_3 Sphere_3; typedef typename K::FT FT; public: typedef Plane_3 result_type; result_type operator() (const Sphere_3 & s1, const Sphere_3 & s2) const { (CGAL::possibly(s1.center() != s2.center())?(static_cast(0)): ::CGAL::precondition_fail( "s1.center() != s2.center()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 3015)); const FT a = 2*(s2.center().x() - s1.center().x()); const FT b = 2*(s2.center().y() - s1.center().y()); const FT c = 2*(s2.center().z() - s1.center().z()); const FT d = CGAL::square(s1.center().x()) + CGAL::square(s1.center().y()) + CGAL::square(s1.center().z()) - s1.squared_radius() - CGAL::square(s2.center().x()) - CGAL::square(s2.center().y()) - CGAL::square(s2.center().z()) + s2.squared_radius(); return Plane_3(a, b, c, d); } }; template class Construct_scaled_vector_2 { typedef typename K::FT FT; typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; Vector_2 operator()( const Vector_2& v, const FT& c) const { return Vector_2(c * v.x(), c * v.y()); } }; template class Construct_divided_vector_2 { typedef typename K::FT FT; typedef typename K::Vector_2 Vector_2; public: typedef Vector_2 result_type; Vector_2 operator()( const Vector_2& v, const FT& c) const { return Vector_2(v.x()/c, v.y()/c); } }; template class Construct_divided_vector_3 { typedef typename K::FT FT; typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()( const Vector_3& v, const FT& c) const { return Vector_3(v.x()/c, v.y()/c, v.z()/c); } }; template class Construct_scaled_vector_3 { typedef typename K::FT FT; typedef typename K::Vector_3 Vector_3; public: typedef Vector_3 result_type; Vector_3 operator()( const Vector_3& w, const FT& c) const { return Vector_3(c * w.x(), c * w.y(), c * w.z()); } }; template class Construct_translated_point_2 { typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; public: typedef Point_2 result_type; Point_2 operator()( const Point_2& p, const Vector_2& v) const { typename K::Construct_point_2 construct_point_2; return construct_point_2(p.x() + v.x(), p.y() + v.y()); } Point_2 operator()( const Origin& , const Vector_2& v) const { typename K::Construct_point_2 construct_point_2; return construct_point_2(v.x(), v.y()); } }; template class Construct_translated_point_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; public: typedef Point_3 result_type; Point_3 operator()( const Point_3& p, const Vector_3& v) const { typename K::Construct_point_3 construct_point_3; return construct_point_3(p.x() + v.x(), p.y() + v.y(), p.z() + v.z()); } Point_3 operator()( const Origin& , const Vector_3& v) const { typename K::Construct_point_3 construct_point_3; return construct_point_3(v.x(), v.y(), v.z()); } }; template class Construct_vector_2 { typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Segment_2 Segment_2; typedef typename K::Ray_2 Ray_2; typedef typename K::Line_2 Line_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Point_2 Point_2; typedef typename K::Direction_2 Direction_2; typedef typename Vector_2::Rep Rep; public: typedef Vector_2 result_type; Rep operator()(Return_base_tag, const Point_2& p, const Point_2& q) const { return Rep(q.x() - p.x(), q.y() - p.y()); } Rep operator()(Return_base_tag, const Origin&, const Point_2& q) const { return Rep(q.x(), q.y()); } Rep operator()(Return_base_tag, const Point_2& p, const Origin& ) const { return Rep(-p.x(), -p.y()); } Rep operator()(Return_base_tag, const Direction_2& d ) const { return Rep(d.dx(), d.dy()); } Vector_2 operator()(Return_base_tag, const Segment_2& s) const { return s.to_vector(); } Vector_2 operator()(Return_base_tag, const Ray_2& r) const { return r.to_vector(); } Rep operator()(Return_base_tag, const Line_2& l) const { return Rep(l.b(), -l.a()); } Rep operator()(Return_base_tag, Null_vector) const { return Rep(FT(0), FT(0)); } Rep operator()(Return_base_tag, const RT& x, const RT& y) const { return Rep(x, y); } Rep operator()(Return_base_tag, const RT& x, const RT& y, const RT& w) const { return Rep(x, y, w); } Vector_2 operator()( const Point_2& p, const Point_2& q) const { return this->operator()(Return_base_tag(), p, q); } Vector_2 operator()( const Origin& o, const Point_2& q) const { return this->operator()(Return_base_tag(), o, q); } Vector_2 operator()( const Point_2& p, const Origin& o) const { return this->operator()(Return_base_tag(), p, o); } Vector_2 operator()( const Direction_2& d ) const { return this->operator()(Return_base_tag(), d); } Vector_2 operator()( const Segment_2& s) const { return this->operator()(Return_base_tag(), s); } Vector_2 operator()( const Ray_2& r) const { return this->operator()(Return_base_tag(), r); } Vector_2 operator()( const Line_2& l) const { return this->operator()(Return_base_tag(), l); } Vector_2 operator()( Null_vector n) const { return this->operator()(Return_base_tag(), n); } Vector_2 operator()( const RT& x, const RT& y) const { return this->operator()(Return_base_tag(), x, y); } Vector_2 operator()( const RT& x, const RT& y, const RT& w) const { return this->operator()(Return_base_tag(), x, y, w); } }; template class Construct_vector_3 { typedef typename K::RT RT; typedef typename K::FT FT; typedef typename K::Segment_3 Segment_3; typedef typename K::Direction_3 Direction_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Line_3 Line_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Point_3 Point_3; typedef typename Vector_3::Rep Rep; public: typedef Vector_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const Point_3& q) const { return Rep(q.x() - p.x(), q.y() - p.y(), q.z() - p.z()); } Rep operator()(Return_base_tag, const Origin&, const Point_3& q) const { return Rep(q.x(), q.y(), q.z()); } Rep operator()(Return_base_tag, const Point_3& p, const Origin&) const { return Rep(- p.x(), - p.y(), - p.z()); } Rep operator()(Return_base_tag, const Direction_3& d) const { return d.rep().to_vector(); } Rep operator()(Return_base_tag, const Segment_3& s) const { return s.rep().to_vector(); } Rep operator()(Return_base_tag, const Ray_3& r) const { return r.rep().to_vector(); } Rep operator()(Return_base_tag, const Line_3& l) const { return l.rep().to_vector(); } Rep operator()(Return_base_tag, const Null_vector&) const { return Rep(FT(0), FT(0), FT(0)); } Rep operator()(Return_base_tag, const RT& x, const RT& y, const RT& z) const { return Rep(x, y, z); } Rep operator()(Return_base_tag, const RT& x, const RT& y, const RT& z, const RT& w) const { return Rep(x, y, z, w); } Vector_3 operator()( const Point_3& p, const Point_3& q) const { return this->operator()(Return_base_tag(), p, q); } Vector_3 operator()( const Origin& o, const Point_3& q) const { return this->operator()(Return_base_tag(), o, q); } Vector_3 operator()( const Point_3& p, const Origin& q) const { return this->operator()(Return_base_tag(), p, q); } Vector_3 operator()( const Direction_3& d) const { return this->operator()(Return_base_tag(), d); } Vector_3 operator()( const Segment_3& s) const { return this->operator()(Return_base_tag(), s); } Vector_3 operator()( const Ray_3& r) const { return this->operator()(Return_base_tag(), r); } Vector_3 operator()( const Line_3& l) const { return this->operator()(Return_base_tag(), l); } Vector_3 operator()( const Null_vector& n) const { return this->operator()(Return_base_tag(), n); } Vector_3 operator()( int x, int y, int z) const { return this->operator()(Return_base_tag(), x, y, z); } Vector_3 operator()( const RT& x, const RT& y, const RT& z) const { return this->operator()(Return_base_tag(), x, y, z); } Vector_3 operator()( const RT& x, const RT& y, const RT& z, const RT& w) const { return this->operator()(Return_base_tag(), x, y, z, w); } }; template class Construct_vertex_2 { typedef typename K::Point_2 Point_2; typedef typename K::Segment_2 Segment_2; typedef typename K::Iso_rectangle_2 Iso_rectangle_2; typedef typename K::Triangle_2 Triangle_2; public: typedef Point_2 result_type; const Point_2 & operator()( const Segment_2& s, int i) const { return s.vertex(i); } const Point_2 & operator()( const Triangle_2& t, int i) const { return t.rep().vertex(i); } Point_2 operator()( const Iso_rectangle_2& r, int i) const { switch (i%4) { case 0: return (r.min)(); case 1: return Point_2(r.xmax(), r.ymin()); case 2: return (r.max)(); default: return Point_2(r.xmin(), r.ymax()); } } }; } template < typename K> struct Qualified_result_of, typename K::Segment_2, int > { typedef typename K::Point_2 const & type; }; template < typename K> struct Qualified_result_of, typename K::Triangle_2, int > { typedef typename K::Point_2 const & type; }; namespace CartesianKernelFunctors { template class Coplanar_orientation_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Orientation result_type; # 3411 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h" result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return coplanar_orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { (static_cast(0)); (static_cast(0)); return coplanar_orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), s.x(), s.y(), s.z()); } }; template class Coplanar_side_of_bounded_circle_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Bounded_side result_type; # 3460 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h" result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& t) const { (static_cast(0)); (static_cast(0)); return coplanar_side_of_bounded_circleC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), t.x(), t.y(), t.z()); } }; template class Equal_xy_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return __extension__ ({ CGAL::Uncertain CGAL_TMP = (p.x() == q.x()); CGAL::certainly_not(CGAL_TMP) ? CGAL::make_uncertain(false) : CGAL_TMP & CGAL::make_uncertain((p.y() == q.y())); }); } }; template class Equal_x_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return p.x() == q.x(); } }; template class Equal_x_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return p.x() == q.x(); } }; template class Equal_y_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return p.y() == q.y(); } }; template class Equal_y_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return p.y() == q.y(); } }; template class Equal_z_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return p.z() == q.z(); } }; template class Has_on_3 { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Line_3 Line_3; typedef typename K::Ray_3 Ray_3; typedef typename K::Segment_3 Segment_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Triangle_3 Triangle_3; typedef typename K::Circle_3 Circle_3; typedef typename K::Sphere_3 Sphere_3; public: typedef typename K::Boolean result_type; result_type operator()( const Line_3& l, const Point_3& p) const { return l.rep().has_on(p); } result_type operator()( const Ray_3& r, const Point_3& p) const { return r.rep().has_on(p); } result_type operator()( const Segment_3& s, const Point_3& p) const { return s.has_on(p); } result_type operator()( const Plane_3& pl, const Point_3& p) const { return pl.rep().has_on(p); } result_type operator()( const Plane_3& pl, const Line_3& l) const { return pl.rep().has_on(l); } result_type operator()( const Triangle_3& t, const Point_3& p) const { Point_3 o = t.vertex(0) + t.supporting_plane().orthogonal_vector(); Vector_3 v0 = t.vertex(0)-o, v1 = t.vertex(1)-o, v2 = t.vertex(2)-o; FT alpha, beta, gamma; Cartesian_internal::solve(v0, v1, v2, p-o, alpha, beta, gamma); return (alpha >= FT(0)) && (beta >= FT(0)) && (gamma >= FT(0)) && ((alpha+beta+gamma == FT(1))); } result_type operator()(const Circle_3 &a, const Point_3 &p) const { return a.rep().has_on(p); } result_type operator()(const Sphere_3 &a, const Circle_3 &p) const { return a.rep().has_on(p); } result_type operator()(const Sphere_3 &a, const Point_3 &p) const { return a.rep().has_on(p); } result_type operator()(const Plane_3 &a, const Circle_3 &p) const { return a.rep().has_on(p); } }; template class Less_distance_to_point_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return has_smaller_dist_to_pointC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } }; template class Less_distance_to_point_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return has_smaller_dist_to_pointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z()); } }; template class Less_signed_distance_to_line_2 { typedef typename K::Point_2 Point_2; typedef typename K::Line_2 Line_2; typedef typename K::Equal_2 Equal_2; public: typedef typename K::Boolean result_type; result_type operator()(const Point_2& a, const Point_2& b, const Point_2& c, const Point_2& d) const { Equal_2 equal; (CGAL::possibly(! equal(a,b))?(static_cast(0)): ::CGAL::precondition_fail( "! equal(a,b)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 3667)); return cmp_signed_dist_to_lineC2( a.x(), a.y(), b.x(), b.y(), c.x(), c.y(), d.x(), d.y()) == SMALLER; } result_type operator()(const Line_2& l, const Point_2& p, const Point_2& q) const { return has_smaller_signed_dist_to_directionC2(l.a(), l.b(), p.x(), p.y(), q.x(), q.y()); } }; template class Less_signed_distance_to_plane_3 { typedef typename K::Point_3 Point_3; typedef typename K::Plane_3 Plane_3; typedef typename K::Collinear_3 Collinear_3; public: typedef typename K::Boolean result_type; result_type operator()( const Plane_3& h, const Point_3& p, const Point_3& q) const { return has_smaller_signed_dist_to_directionC3(h.a(), h.b(), h.c(), p.x(), p.y(), p.z(), q.x(), q.y(), q.z()); } result_type operator()( const Point_3& hp, const Point_3& hq, const Point_3& hr, const Point_3& p, const Point_3& q) const { Collinear_3 collinear_3; (CGAL::possibly(! collinear_3(hp, hq, hr))?(static_cast(0)): ::CGAL::precondition_fail( "! collinear_3(hp, hq, hr)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/function_objects.h", 3705)); return has_smaller_signed_dist_to_planeC3(hp.x(), hp.y(), hp.z(), hq.x(), hq.y(), hq.z(), hr.x(), hr.y(), hr.z(), p.x(), p.y(), p.z(), q.x(), q.y(), q.z());; } }; template class Less_xyz_3 { typedef typename K::Point_3 Point_3; typedef typename K::Compare_xyz_3 Compare_xyz_3; Compare_xyz_3 c; public: typedef typename K::Boolean result_type; Less_xyz_3() {} Less_xyz_3(const Compare_xyz_3& c_) : c(c_) {} result_type operator()( const Point_3& p, const Point_3& q) const { return c(p, q) == SMALLER; } }; template class Less_xy_2 { typedef typename K::Point_2 Point_2; typedef typename K::Compare_xy_2 Compare_xy_2; Compare_xy_2 c; public: typedef typename K::Boolean result_type; Less_xy_2() {} Less_xy_2(const Compare_xy_2& c_) : c(c_) {} result_type operator()( const Point_2& p, const Point_2& q) const { return c(p, q) == SMALLER; } }; template class Less_xy_3 { typedef typename K::Point_3 Point_3; typedef typename K::Compare_xy_3 Compare_xy_3; Compare_xy_3 c; public: typedef typename K::Boolean result_type; Less_xy_3() {} Less_xy_3(const Compare_xy_3& c_) : c(c_) {} result_type operator()( const Point_3& p, const Point_3& q) const { return c(p, q) == SMALLER; } }; template class Less_x_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return p.x() < q.x(); } }; template class Less_x_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return p.x() < q.x(); } }; template class Less_yx_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return compare_lexicographically_xyC2(p.y(), p.x(), q.y(), q.x()) == SMALLER; } }; template class Less_y_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Boolean result_type; result_type operator()( const Point_2& p, const Point_2& q) const { return p.y() < q.y(); } }; template class Less_y_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return p.y() < q.y(); } }; template class Less_z_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Boolean result_type; result_type operator()( const Point_3& p, const Point_3& q) const { return p.z() < q.z(); } }; template class Orientation_2 { typedef typename K::Point_2 Point_2; typedef typename K::Vector_2 Vector_2; typedef typename K::Circle_2 Circle_2; public: typedef typename K::Orientation result_type; result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return orientationC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } result_type operator()(const Vector_2& u, const Vector_2& v) const { return orientationC2(u.x(), u.y(), v.x(), v.y()); } result_type operator()(const Circle_2& c) const { return c.rep().orientation(); } }; template class Orientation_3 { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; typedef typename K::Tetrahedron_3 Tetrahedron_3; typedef typename K::Sphere_3 Sphere_3; public: typedef typename K::Orientation result_type; result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { return orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), s.x(), s.y(), s.z()); } result_type operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const { return orientationC3(u.x(), u.y(), u.z(), v.x(), v.y(), v.z(), w.x(), w.y(), w.z()); } result_type operator()( const Tetrahedron_3& t) const { return t.rep().orientation(); } result_type operator()(const Sphere_3& s) const { return s.rep().orientation(); } }; template class Oriented_side_2 { typedef typename K::Point_2 Point_2; typedef typename K::Circle_2 Circle_2; typedef typename K::Line_2 Line_2; typedef typename K::Triangle_2 Triangle_2; public: typedef typename K::Oriented_side result_type; result_type operator()( const Circle_2& c, const Point_2& p) const { return enum_cast(c.bounded_side(p)) * c.orientation(); } result_type operator()( const Line_2& l, const Point_2& p) const { return side_of_oriented_lineC2(l.a(), l.b(), l.c(), p.x(), p.y()); } result_type operator()( const Triangle_2& t, const Point_2& p) const { typename K::Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line; typename K::Orientation_2 orientation; typename K::Orientation o1 = orientation(t.vertex(0), t.vertex(1), p), o2 = orientation(t.vertex(1), t.vertex(2), p), o3 = orientation(t.vertex(2), t.vertex(3), p), ot = orientation(t.vertex(0), t.vertex(1), t.vertex(2)); if (o1 == ot && o2 == ot && o3 == ot) return ot; return (o1 == COLLINEAR && collinear_are_ordered_along_line(t.vertex(0), p, t.vertex(1))) || (o2 == COLLINEAR && collinear_are_ordered_along_line(t.vertex(1), p, t.vertex(2))) || (o3 == COLLINEAR && collinear_are_ordered_along_line(t.vertex(2), p, t.vertex(3))) ? result_type(ON_ORIENTED_BOUNDARY) : opposite(ot); } }; template class Side_of_bounded_circle_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Bounded_side result_type; result_type operator()( const Point_2& p, const Point_2& q, const Point_2& t) const { return side_of_bounded_circleC2(p.x(), p.y(), q.x(), q.y(), t.x(), t.y()); } result_type operator()( const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& t) const { return side_of_bounded_circleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), t.x(), t.y()); } }; template class Side_of_bounded_sphere_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Bounded_side result_type; result_type operator()( const Point_3& p, const Point_3& q, const Point_3& test) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), test.x(), test.y(), test.z()); } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& test) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), test.x(), test.y(), test.z()); } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const Point_3& test) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), s.x(), s.y(), s.z(), test.x(), test.y(), test.z()); } }; template class Side_of_oriented_circle_2 { typedef typename K::Point_2 Point_2; public: typedef typename K::Oriented_side result_type; result_type operator()( const Point_2& p, const Point_2& q, const Point_2& r, const Point_2& t) const { return side_of_oriented_circleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), t.x(), t.y()); } }; template class Side_of_oriented_sphere_3 { typedef typename K::Point_3 Point_3; public: typedef typename K::Oriented_side result_type; result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const Point_3& test) const { return side_of_oriented_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), r.x(), r.y(), r.z(), s.x(), s.y(), s.z(), test.x(), test.y(), test.z()); } }; } } # 69 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian/Cartesian_base.h" 2 namespace CGAL { template < typename K_, typename FT_> struct Cartesian_base { typedef K_ Kernel; typedef FT_ FT; typedef Cartesian_base Self; typedef Cartesian_tag Rep_tag; typedef Cartesian_tag Kernel_tag; enum { Has_filtered_predicates = false }; typedef Boolean_tag Has_filtered_predicates_tag; typedef CGAL::Object Object_2; typedef CGAL::Object Object_3; typedef typename Same_uncertainty_nt::type Boolean; typedef typename Same_uncertainty_nt::type Sign; typedef typename Same_uncertainty_nt::type Comparison_result; typedef typename Same_uncertainty_nt::type Orientation; typedef typename Same_uncertainty_nt::type Oriented_side; typedef typename Same_uncertainty_nt::type Bounded_side; typedef typename Same_uncertainty_nt::type Angle; template struct Ambient_dimension { typedef typename T::Ambient_dimension type; }; template struct Feature_dimension { typedef typename T::Feature_dimension type; }; typedef PointC2 Point_2; typedef VectorC2 Vector_2; typedef DirectionC2 Direction_2; typedef SegmentC2 Segment_2; typedef LineC2 Line_2; typedef RayC2 Ray_2; typedef TriangleC2 Triangle_2; typedef CircleC2 Circle_2; typedef Iso_rectangleC2 Iso_rectangle_2; typedef Aff_transformationC2 Aff_transformation_2; typedef PointC3 Point_3; typedef VectorC3 Vector_3; typedef DirectionC3 Direction_3; typedef LineC3 Line_3; typedef PlaneC3 Plane_3; typedef RayC3 Ray_3; typedef SegmentC3 Segment_3; typedef TriangleC3 Triangle_3; typedef TetrahedronC3 Tetrahedron_3; typedef Iso_cuboidC3 Iso_cuboid_3; typedef SphereC3 Sphere_3; typedef CircleC3 Circle_3; typedef Aff_transformationC3 Aff_transformation_3; typedef typename cpp0x::array::const_iterator Cartesian_const_iterator_2; typedef typename cpp0x::array::const_iterator Cartesian_const_iterator_3; typedef Data_accessorC2 Data_accessor_2; typedef ConicCPA2 Conic_2; }; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Simple_cartesian.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Type_equality_wrapper.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Type_equality_wrapper.h" namespace CGAL { template < typename K_base, typename Kernel_ > struct Type_equality_wrapper : public K_base { typedef K_base Kernel_base; # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" typedef CGAL::Point_2 Point_2; typedef CGAL::Vector_2 Vector_2; typedef CGAL::Direction_2 Direction_2; typedef CGAL::Segment_2 Segment_2; typedef CGAL::Ray_2 Ray_2; typedef CGAL::Line_2 Line_2; typedef CGAL::Triangle_2 Triangle_2; typedef CGAL::Iso_rectangle_2 Iso_rectangle_2; typedef CGAL::Circle_2 Circle_2; typedef CGAL::Point_3 Point_3; typedef CGAL::Plane_3 Plane_3; typedef CGAL::Vector_3 Vector_3; typedef CGAL::Direction_3 Direction_3; typedef CGAL::Segment_3 Segment_3; typedef CGAL::Ray_3 Ray_3; typedef CGAL::Line_3 Line_3; typedef CGAL::Triangle_3 Triangle_3; typedef CGAL::Tetrahedron_3 Tetrahedron_3; typedef CGAL::Iso_cuboid_3 Iso_cuboid_3; typedef CGAL::Sphere_3 Sphere_3; typedef CGAL::Circle_3 Circle_3; # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Type_equality_wrapper.h" 2 typedef CGAL::Conic_2 Conic_2; typedef CGAL::Aff_transformation_2 Aff_transformation_2; typedef CGAL::Aff_transformation_3 Aff_transformation_3; }; } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Simple_cartesian.h" 2 namespace CGAL { template < typename FT_, typename Kernel_ > struct Cartesian_base_no_ref_count : public Cartesian_base< Kernel_, FT_ > { typedef FT_ RT; typedef FT_ FT; template < typename T > struct Handle { typedef T type; }; template < typename Kernel2 > struct Base { typedef Cartesian_base_no_ref_count Type; }; typedef Kernel_ K; # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" typedef CartesianKernelFunctors::Angle_2 Angle_2; Angle_2 angle_2_object() const { return Angle_2(); } typedef CartesianKernelFunctors::Angle_3 Angle_3; Angle_3 angle_3_object() const { return Angle_3(); } typedef CartesianKernelFunctors::Are_ordered_along_line_2 Are_ordered_along_line_2; Are_ordered_along_line_2 are_ordered_along_line_2_object() const { return Are_ordered_along_line_2(); } typedef CartesianKernelFunctors::Are_ordered_along_line_3 Are_ordered_along_line_3; Are_ordered_along_line_3 are_ordered_along_line_3_object() const { return Are_ordered_along_line_3(); } typedef CartesianKernelFunctors::Are_parallel_2 Are_parallel_2; Are_parallel_2 are_parallel_2_object() const { return Are_parallel_2(); } typedef CartesianKernelFunctors::Are_parallel_3 Are_parallel_3; Are_parallel_3 are_parallel_3_object() const { return Are_parallel_3(); } typedef CartesianKernelFunctors::Are_strictly_ordered_along_line_2 Are_strictly_ordered_along_line_2; Are_strictly_ordered_along_line_2 are_strictly_ordered_along_line_2_object() const { return Are_strictly_ordered_along_line_2(); } typedef CartesianKernelFunctors::Are_strictly_ordered_along_line_3 Are_strictly_ordered_along_line_3; Are_strictly_ordered_along_line_3 are_strictly_ordered_along_line_3_object() const { return Are_strictly_ordered_along_line_3(); } typedef CartesianKernelFunctors::Assign_2 Assign_2; Assign_2 assign_2_object() const { return Assign_2(); } typedef CartesianKernelFunctors::Assign_3 Assign_3; Assign_3 assign_3_object() const { return Assign_3(); } typedef CartesianKernelFunctors::Bounded_side_2 Bounded_side_2; Bounded_side_2 bounded_side_2_object() const { return Bounded_side_2(); } typedef CartesianKernelFunctors::Bounded_side_3 Bounded_side_3; Bounded_side_3 bounded_side_3_object() const { return Bounded_side_3(); } typedef CartesianKernelFunctors::Collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const { return Collinear_are_ordered_along_line_2(); } typedef CartesianKernelFunctors::Collinear_are_ordered_along_line_3 Collinear_are_ordered_along_line_3; Collinear_are_ordered_along_line_3 collinear_are_ordered_along_line_3_object() const { return Collinear_are_ordered_along_line_3(); } typedef CartesianKernelFunctors::Collinear_are_strictly_ordered_along_line_2 Collinear_are_strictly_ordered_along_line_2; Collinear_are_strictly_ordered_along_line_2 collinear_are_strictly_ordered_along_line_2_object() const { return Collinear_are_strictly_ordered_along_line_2(); } typedef CartesianKernelFunctors::Collinear_are_strictly_ordered_along_line_3 Collinear_are_strictly_ordered_along_line_3; Collinear_are_strictly_ordered_along_line_3 collinear_are_strictly_ordered_along_line_3_object() const { return Collinear_are_strictly_ordered_along_line_3(); } typedef CartesianKernelFunctors::Collinear_has_on_2 Collinear_has_on_2; Collinear_has_on_2 collinear_has_on_2_object() const { return Collinear_has_on_2(); } typedef CartesianKernelFunctors::Collinear_2 Collinear_2; Collinear_2 collinear_2_object() const { return Collinear_2(); } typedef CartesianKernelFunctors::Collinear_3 Collinear_3; Collinear_3 collinear_3_object() const { return Collinear_3(); } typedef CartesianKernelFunctors::Compare_angle_with_x_axis_2 Compare_angle_with_x_axis_2; Compare_angle_with_x_axis_2 compare_angle_with_x_axis_2_object() const { return Compare_angle_with_x_axis_2(); } typedef CartesianKernelFunctors::Compare_dihedral_angle_3 Compare_dihedral_angle_3; Compare_dihedral_angle_3 compare_dihedral_angle_3_object() const { return Compare_dihedral_angle_3(); } typedef CartesianKernelFunctors::Compare_distance_2 Compare_distance_2; Compare_distance_2 compare_distance_2_object() const { return Compare_distance_2(); } typedef CartesianKernelFunctors::Compare_distance_3 Compare_distance_3; Compare_distance_3 compare_distance_3_object() const { return Compare_distance_3(); } typedef CartesianKernelFunctors::Compare_slope_2 Compare_slope_2; Compare_slope_2 compare_slope_2_object() const { return Compare_slope_2(); } typedef CartesianKernelFunctors::Compare_squared_distance_2 Compare_squared_distance_2; Compare_squared_distance_2 compare_squared_distance_2_object() const { return Compare_squared_distance_2(); } typedef CartesianKernelFunctors::Compare_squared_distance_3 Compare_squared_distance_3; Compare_squared_distance_3 compare_squared_distance_3_object() const { return Compare_squared_distance_3(); } typedef CartesianKernelFunctors::Compare_squared_radius_3 Compare_squared_radius_3; Compare_squared_radius_3 compare_squared_radius_3_object() const { return Compare_squared_radius_3(); } typedef CartesianKernelFunctors::Compare_x_at_y_2 Compare_x_at_y_2; Compare_x_at_y_2 compare_x_at_y_2_object() const { return Compare_x_at_y_2(); } typedef CartesianKernelFunctors::Compare_xyz_3 Compare_xyz_3; Compare_xyz_3 compare_xyz_3_object() const { return Compare_xyz_3(); } typedef CartesianKernelFunctors::Compare_xy_2 Compare_xy_2; Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } typedef CartesianKernelFunctors::Compare_xy_3 Compare_xy_3; Compare_xy_3 compare_xy_3_object() const { return Compare_xy_3(); } typedef CartesianKernelFunctors::Compare_x_2 Compare_x_2; Compare_x_2 compare_x_2_object() const { return Compare_x_2(); } typedef CartesianKernelFunctors::Compare_x_3 Compare_x_3; Compare_x_3 compare_x_3_object() const { return Compare_x_3(); } typedef CartesianKernelFunctors::Compare_y_at_x_2 Compare_y_at_x_2; Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(); } typedef CartesianKernelFunctors::Compare_y_2 Compare_y_2; Compare_y_2 compare_y_2_object() const { return Compare_y_2(); } typedef CartesianKernelFunctors::Compare_y_3 Compare_y_3; Compare_y_3 compare_y_3_object() const { return Compare_y_3(); } typedef CartesianKernelFunctors::Compare_yx_2 Compare_yx_2; Compare_yx_2 compare_yx_2_object() const { return Compare_yx_2(); } typedef CartesianKernelFunctors::Compare_z_3 Compare_z_3; Compare_z_3 compare_z_3_object() const { return Compare_z_3(); } typedef CartesianKernelFunctors::Compute_a_2 Compute_a_2; Compute_a_2 compute_a_2_object() const { return Compute_a_2(); } typedef CartesianKernelFunctors::Compute_a_3 Compute_a_3; Compute_a_3 compute_a_3_object() const { return Compute_a_3(); } typedef CartesianKernelFunctors::Compute_b_2 Compute_b_2; Compute_b_2 compute_b_2_object() const { return Compute_b_2(); } typedef CartesianKernelFunctors::Compute_b_3 Compute_b_3; Compute_b_3 compute_b_3_object() const { return Compute_b_3(); } typedef CartesianKernelFunctors::Compute_c_2 Compute_c_2; Compute_c_2 compute_c_2_object() const { return Compute_c_2(); } typedef CartesianKernelFunctors::Compute_c_3 Compute_c_3; Compute_c_3 compute_c_3_object() const { return Compute_c_3(); } typedef CartesianKernelFunctors::Compute_d_3 Compute_d_3; Compute_d_3 compute_d_3_object() const { return Compute_d_3(); } typedef CartesianKernelFunctors::Compute_approximate_area_3 Compute_approximate_area_3; Compute_approximate_area_3 compute_approximate_area_3_object() const { return Compute_approximate_area_3(); } typedef CartesianKernelFunctors::Compute_approximate_squared_length_3 Compute_approximate_squared_length_3; Compute_approximate_squared_length_3 compute_approximate_squared_length_3_object() const { return Compute_approximate_squared_length_3(); } typedef CartesianKernelFunctors::Compute_area_2 Compute_area_2; Compute_area_2 compute_area_2_object() const { return Compute_area_2(); } typedef CartesianKernelFunctors::Compute_area_3 Compute_area_3; Compute_area_3 compute_area_3_object() const { return Compute_area_3(); } typedef CartesianKernelFunctors::Compute_area_divided_by_pi_3 Compute_area_divided_by_pi_3; Compute_area_divided_by_pi_3 compute_area_divided_by_pi_3_object() const { return Compute_area_divided_by_pi_3(); } typedef CartesianKernelFunctors::Compute_determinant_2 Compute_determinant_2; Compute_determinant_2 compute_determinant_2_object() const { return Compute_determinant_2(); } typedef CartesianKernelFunctors::Compute_determinant_3 Compute_determinant_3; Compute_determinant_3 compute_determinant_3_object() const { return Compute_determinant_3(); } typedef CartesianKernelFunctors::Compute_scalar_product_2 Compute_scalar_product_2; Compute_scalar_product_2 compute_scalar_product_2_object() const { return Compute_scalar_product_2(); } typedef CartesianKernelFunctors::Compute_scalar_product_3 Compute_scalar_product_3; Compute_scalar_product_3 compute_scalar_product_3_object() const { return Compute_scalar_product_3(); } typedef CartesianKernelFunctors::Compute_squared_area_3 Compute_squared_area_3; Compute_squared_area_3 compute_squared_area_3_object() const { return Compute_squared_area_3(); } typedef CartesianKernelFunctors::Compute_squared_distance_2 Compute_squared_distance_2; Compute_squared_distance_2 compute_squared_distance_2_object() const { return Compute_squared_distance_2(); } typedef CartesianKernelFunctors::Compute_squared_distance_3 Compute_squared_distance_3; Compute_squared_distance_3 compute_squared_distance_3_object() const { return Compute_squared_distance_3(); } typedef CartesianKernelFunctors::Compute_squared_length_2 Compute_squared_length_2; Compute_squared_length_2 compute_squared_length_2_object() const { return Compute_squared_length_2(); } typedef CartesianKernelFunctors::Compute_squared_length_3 Compute_squared_length_3; Compute_squared_length_3 compute_squared_length_3_object() const { return Compute_squared_length_3(); } typedef CartesianKernelFunctors::Compute_squared_length_divided_by_pi_square_3 Compute_squared_length_divided_by_pi_square_3; Compute_squared_length_divided_by_pi_square_3 compute_squared_length_divided_by_pi_square_3_object() const { return Compute_squared_length_divided_by_pi_square_3(); } typedef CartesianKernelFunctors::Compute_squared_radius_2 Compute_squared_radius_2; Compute_squared_radius_2 compute_squared_radius_2_object() const { return Compute_squared_radius_2(); } typedef CartesianKernelFunctors::Compute_squared_radius_3 Compute_squared_radius_3; Compute_squared_radius_3 compute_squared_radius_3_object() const { return Compute_squared_radius_3(); } typedef CartesianKernelFunctors::Compute_volume_3 Compute_volume_3; Compute_volume_3 compute_volume_3_object() const { return Compute_volume_3(); } typedef CartesianKernelFunctors::Compute_x_2 Compute_x_2; Compute_x_2 compute_x_2_object() const { return Compute_x_2(); } typedef CartesianKernelFunctors::Compute_x_3 Compute_x_3; Compute_x_3 compute_x_3_object() const { return Compute_x_3(); } typedef CartesianKernelFunctors::Compute_y_2 Compute_y_2; Compute_y_2 compute_y_2_object() const { return Compute_y_2(); } typedef CartesianKernelFunctors::Compute_y_3 Compute_y_3; Compute_y_3 compute_y_3_object() const { return Compute_y_3(); } typedef CartesianKernelFunctors::Compute_z_3 Compute_z_3; Compute_z_3 compute_z_3_object() const { return Compute_z_3(); } typedef CartesianKernelFunctors::Compute_dx_2 Compute_dx_2; Compute_dx_2 compute_dx_2_object() const { return Compute_dx_2(); } typedef CartesianKernelFunctors::Compute_dx_3 Compute_dx_3; Compute_dx_3 compute_dx_3_object() const { return Compute_dx_3(); } typedef CartesianKernelFunctors::Compute_dy_2 Compute_dy_2; Compute_dy_2 compute_dy_2_object() const { return Compute_dy_2(); } typedef CartesianKernelFunctors::Compute_dy_3 Compute_dy_3; Compute_dy_3 compute_dy_3_object() const { return Compute_dy_3(); } typedef CartesianKernelFunctors::Compute_dz_3 Compute_dz_3; Compute_dz_3 compute_dz_3_object() const { return Compute_dz_3(); } typedef CartesianKernelFunctors::Compute_hx_2 Compute_hx_2; Compute_hx_2 compute_hx_2_object() const { return Compute_hx_2(); } typedef CartesianKernelFunctors::Compute_hx_3 Compute_hx_3; Compute_hx_3 compute_hx_3_object() const { return Compute_hx_3(); } typedef CartesianKernelFunctors::Compute_hy_2 Compute_hy_2; Compute_hy_2 compute_hy_2_object() const { return Compute_hy_2(); } typedef CartesianKernelFunctors::Compute_hy_3 Compute_hy_3; Compute_hy_3 compute_hy_3_object() const { return Compute_hy_3(); } typedef CartesianKernelFunctors::Compute_hz_3 Compute_hz_3; Compute_hz_3 compute_hz_3_object() const { return Compute_hz_3(); } typedef CartesianKernelFunctors::Compute_hw_2 Compute_hw_2; Compute_hw_2 compute_hw_2_object() const { return Compute_hw_2(); } typedef CartesianKernelFunctors::Compute_hw_3 Compute_hw_3; Compute_hw_3 compute_hw_3_object() const { return Compute_hw_3(); } typedef CartesianKernelFunctors::Compute_x_at_y_2 Compute_x_at_y_2; Compute_x_at_y_2 compute_x_at_y_2_object() const { return Compute_x_at_y_2(); } typedef CartesianKernelFunctors::Compute_y_at_x_2 Compute_y_at_x_2; Compute_y_at_x_2 compute_y_at_x_2_object() const { return Compute_y_at_x_2(); } typedef CartesianKernelFunctors::Compute_xmin_2 Compute_xmin_2; Compute_xmin_2 compute_xmin_2_object() const { return Compute_xmin_2(); } typedef CartesianKernelFunctors::Compute_xmax_2 Compute_xmax_2; Compute_xmax_2 compute_xmax_2_object() const { return Compute_xmax_2(); } typedef CartesianKernelFunctors::Compute_ymin_2 Compute_ymin_2; Compute_ymin_2 compute_ymin_2_object() const { return Compute_ymin_2(); } typedef CartesianKernelFunctors::Compute_ymax_2 Compute_ymax_2; Compute_ymax_2 compute_ymax_2_object() const { return Compute_ymax_2(); } typedef CartesianKernelFunctors::Compute_xmin_3 Compute_xmin_3; Compute_xmin_3 compute_xmin_3_object() const { return Compute_xmin_3(); } typedef CartesianKernelFunctors::Compute_xmax_3 Compute_xmax_3; Compute_xmax_3 compute_xmax_3_object() const { return Compute_xmax_3(); } typedef CartesianKernelFunctors::Compute_ymin_3 Compute_ymin_3; Compute_ymin_3 compute_ymin_3_object() const { return Compute_ymin_3(); } typedef CartesianKernelFunctors::Compute_ymax_3 Compute_ymax_3; Compute_ymax_3 compute_ymax_3_object() const { return Compute_ymax_3(); } typedef CartesianKernelFunctors::Compute_zmin_3 Compute_zmin_3; Compute_zmin_3 compute_zmin_3_object() const { return Compute_zmin_3(); } typedef CartesianKernelFunctors::Compute_zmax_3 Compute_zmax_3; Compute_zmax_3 compute_zmax_3_object() const { return Compute_zmax_3(); } typedef CartesianKernelFunctors::Construct_barycenter_2 Construct_barycenter_2; Construct_barycenter_2 construct_barycenter_2_object() const { return Construct_barycenter_2(); } typedef CartesianKernelFunctors::Construct_barycenter_3 Construct_barycenter_3; Construct_barycenter_3 construct_barycenter_3_object() const { return Construct_barycenter_3(); } typedef CartesianKernelFunctors::Construct_base_vector_3 Construct_base_vector_3; Construct_base_vector_3 construct_base_vector_3_object() const { return Construct_base_vector_3(); } typedef CartesianKernelFunctors::Construct_bisector_2 Construct_bisector_2; Construct_bisector_2 construct_bisector_2_object() const { return Construct_bisector_2(); } typedef CartesianKernelFunctors::Construct_bisector_3 Construct_bisector_3; Construct_bisector_3 construct_bisector_3_object() const { return Construct_bisector_3(); } typedef CartesianKernelFunctors::Construct_center_2 Construct_center_2; Construct_center_2 construct_center_2_object() const { return Construct_center_2(); } typedef CartesianKernelFunctors::Construct_center_3 Construct_center_3; Construct_center_3 construct_center_3_object() const { return Construct_center_3(); } typedef CartesianKernelFunctors::Construct_centroid_2 Construct_centroid_2; Construct_centroid_2 construct_centroid_2_object() const { return Construct_centroid_2(); } typedef CartesianKernelFunctors::Construct_centroid_3 Construct_centroid_3; Construct_centroid_3 construct_centroid_3_object() const { return Construct_centroid_3(); } typedef CartesianKernelFunctors::Construct_circle_2 Construct_circle_2; Construct_circle_2 construct_circle_2_object() const { return Construct_circle_2(); } typedef CartesianKernelFunctors::Construct_circle_3 Construct_circle_3; Construct_circle_3 construct_circle_3_object() const { return Construct_circle_3(); } typedef CartesianKernelFunctors::Construct_circumcenter_2 Construct_circumcenter_2; Construct_circumcenter_2 construct_circumcenter_2_object() const { return Construct_circumcenter_2(); } typedef CartesianKernelFunctors::Construct_circumcenter_3 Construct_circumcenter_3; Construct_circumcenter_3 construct_circumcenter_3_object() const { return Construct_circumcenter_3(); } typedef CartesianKernelFunctors::Construct_cross_product_vector_3 Construct_cross_product_vector_3; Construct_cross_product_vector_3 construct_cross_product_vector_3_object() const { return Construct_cross_product_vector_3(); } typedef CartesianKernelFunctors::Construct_direction_2 Construct_direction_2; Construct_direction_2 construct_direction_2_object() const { return Construct_direction_2(); } typedef CartesianKernelFunctors::Construct_direction_3 Construct_direction_3; Construct_direction_3 construct_direction_3_object() const { return Construct_direction_3(); } typedef CartesianKernelFunctors::Construct_equidistant_line_3 Construct_equidistant_line_3; Construct_equidistant_line_3 construct_equidistant_line_3_object() const { return Construct_equidistant_line_3(); } typedef CartesianKernelFunctors::Construct_iso_cuboid_3 Construct_iso_cuboid_3; Construct_iso_cuboid_3 construct_iso_cuboid_3_object() const { return Construct_iso_cuboid_3(); } typedef CartesianKernelFunctors::Construct_iso_rectangle_2 Construct_iso_rectangle_2; Construct_iso_rectangle_2 construct_iso_rectangle_2_object() const { return Construct_iso_rectangle_2(); } typedef CartesianKernelFunctors::Construct_lifted_point_3 Construct_lifted_point_3; Construct_lifted_point_3 construct_lifted_point_3_object() const { return Construct_lifted_point_3(); } typedef CartesianKernelFunctors::Construct_line_2 Construct_line_2; Construct_line_2 construct_line_2_object() const { return Construct_line_2(); } typedef CartesianKernelFunctors::Construct_line_3 Construct_line_3; Construct_line_3 construct_line_3_object() const { return Construct_line_3(); } typedef CartesianKernelFunctors::Construct_midpoint_2 Construct_midpoint_2; Construct_midpoint_2 construct_midpoint_2_object() const { return Construct_midpoint_2(); } typedef CartesianKernelFunctors::Construct_midpoint_3 Construct_midpoint_3; Construct_midpoint_3 construct_midpoint_3_object() const { return Construct_midpoint_3(); } typedef CartesianKernelFunctors::Construct_min_vertex_2 Construct_min_vertex_2; Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } typedef CartesianKernelFunctors::Construct_max_vertex_2 Construct_max_vertex_2; Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } typedef CartesianKernelFunctors::Construct_min_vertex_3 Construct_min_vertex_3; Construct_min_vertex_3 construct_min_vertex_3_object() const { return Construct_min_vertex_3(); } typedef CartesianKernelFunctors::Construct_max_vertex_3 Construct_max_vertex_3; Construct_max_vertex_3 construct_max_vertex_3_object() const { return Construct_max_vertex_3(); } typedef CartesianKernelFunctors::Construct_normal_3 Construct_normal_3; Construct_normal_3 construct_normal_3_object() const { return Construct_normal_3(); } typedef CartesianKernelFunctors::Construct_object_2 Construct_object_2; Construct_object_2 construct_object_2_object() const { return Construct_object_2(); } typedef CartesianKernelFunctors::Construct_object_3 Construct_object_3; Construct_object_3 construct_object_3_object() const { return Construct_object_3(); } typedef CartesianKernelFunctors::Construct_opposite_circle_2 Construct_opposite_circle_2; Construct_opposite_circle_2 construct_opposite_circle_2_object() const { return Construct_opposite_circle_2(); } typedef CartesianKernelFunctors::Construct_opposite_direction_2 Construct_opposite_direction_2; Construct_opposite_direction_2 construct_opposite_direction_2_object() const { return Construct_opposite_direction_2(); } typedef CartesianKernelFunctors::Construct_opposite_direction_3 Construct_opposite_direction_3; Construct_opposite_direction_3 construct_opposite_direction_3_object() const { return Construct_opposite_direction_3(); } typedef CartesianKernelFunctors::Construct_opposite_line_2 Construct_opposite_line_2; Construct_opposite_line_2 construct_opposite_line_2_object() const { return Construct_opposite_line_2(); } typedef CartesianKernelFunctors::Construct_opposite_line_3 Construct_opposite_line_3; Construct_opposite_line_3 construct_opposite_line_3_object() const { return Construct_opposite_line_3(); } typedef CartesianKernelFunctors::Construct_opposite_plane_3 Construct_opposite_plane_3; Construct_opposite_plane_3 construct_opposite_plane_3_object() const { return Construct_opposite_plane_3(); } typedef CartesianKernelFunctors::Construct_opposite_ray_2 Construct_opposite_ray_2; Construct_opposite_ray_2 construct_opposite_ray_2_object() const { return Construct_opposite_ray_2(); } typedef CartesianKernelFunctors::Construct_opposite_ray_3 Construct_opposite_ray_3; Construct_opposite_ray_3 construct_opposite_ray_3_object() const { return Construct_opposite_ray_3(); } typedef CartesianKernelFunctors::Construct_opposite_segment_2 Construct_opposite_segment_2; Construct_opposite_segment_2 construct_opposite_segment_2_object() const { return Construct_opposite_segment_2(); } typedef CartesianKernelFunctors::Construct_opposite_segment_3 Construct_opposite_segment_3; Construct_opposite_segment_3 construct_opposite_segment_3_object() const { return Construct_opposite_segment_3(); } typedef CartesianKernelFunctors::Construct_opposite_sphere_3 Construct_opposite_sphere_3; Construct_opposite_sphere_3 construct_opposite_sphere_3_object() const { return Construct_opposite_sphere_3(); } typedef CartesianKernelFunctors::Construct_opposite_triangle_2 Construct_opposite_triangle_2; Construct_opposite_triangle_2 construct_opposite_triangle_2_object() const { return Construct_opposite_triangle_2(); } typedef CartesianKernelFunctors::Construct_opposite_vector_2 Construct_opposite_vector_2; Construct_opposite_vector_2 construct_opposite_vector_2_object() const { return Construct_opposite_vector_2(); } typedef CartesianKernelFunctors::Construct_difference_of_vectors_2 Construct_difference_of_vectors_2; Construct_difference_of_vectors_2 construct_difference_of_vectors_2_object() const { return Construct_difference_of_vectors_2(); } typedef CartesianKernelFunctors::Construct_difference_of_vectors_3 Construct_difference_of_vectors_3; Construct_difference_of_vectors_3 construct_difference_of_vectors_3_object() const { return Construct_difference_of_vectors_3(); } typedef CartesianKernelFunctors::Construct_sum_of_vectors_2 Construct_sum_of_vectors_2; Construct_sum_of_vectors_2 construct_sum_of_vectors_2_object() const { return Construct_sum_of_vectors_2(); } typedef CartesianKernelFunctors::Construct_sum_of_vectors_3 Construct_sum_of_vectors_3; Construct_sum_of_vectors_3 construct_sum_of_vectors_3_object() const { return Construct_sum_of_vectors_3(); } typedef CartesianKernelFunctors::Construct_opposite_vector_3 Construct_opposite_vector_3; Construct_opposite_vector_3 construct_opposite_vector_3_object() const { return Construct_opposite_vector_3(); } typedef CartesianKernelFunctors::Construct_orthogonal_vector_3 Construct_orthogonal_vector_3; Construct_orthogonal_vector_3 construct_orthogonal_vector_3_object() const { return Construct_orthogonal_vector_3(); } typedef CartesianKernelFunctors::Construct_perpendicular_direction_2 Construct_perpendicular_direction_2; Construct_perpendicular_direction_2 construct_perpendicular_direction_2_object() const { return Construct_perpendicular_direction_2(); } typedef CartesianKernelFunctors::Construct_perpendicular_line_2 Construct_perpendicular_line_2; Construct_perpendicular_line_2 construct_perpendicular_line_2_object() const { return Construct_perpendicular_line_2(); } typedef CartesianKernelFunctors::Construct_perpendicular_line_3 Construct_perpendicular_line_3; Construct_perpendicular_line_3 construct_perpendicular_line_3_object() const { return Construct_perpendicular_line_3(); } typedef CartesianKernelFunctors::Construct_perpendicular_plane_3 Construct_perpendicular_plane_3; Construct_perpendicular_plane_3 construct_perpendicular_plane_3_object() const { return Construct_perpendicular_plane_3(); } typedef CartesianKernelFunctors::Construct_perpendicular_vector_2 Construct_perpendicular_vector_2; Construct_perpendicular_vector_2 construct_perpendicular_vector_2_object() const { return Construct_perpendicular_vector_2(); } typedef CartesianKernelFunctors::Construct_plane_3 Construct_plane_3; Construct_plane_3 construct_plane_3_object() const { return Construct_plane_3(); } typedef CartesianKernelFunctors::Construct_point_on_2 Construct_point_on_2; Construct_point_on_2 construct_point_on_2_object() const { return Construct_point_on_2(); } typedef CartesianKernelFunctors::Construct_point_on_3 Construct_point_on_3; Construct_point_on_3 construct_point_on_3_object() const { return Construct_point_on_3(); } typedef CartesianKernelFunctors::Construct_point_2 Construct_point_2; Construct_point_2 construct_point_2_object() const { return Construct_point_2(); } typedef CartesianKernelFunctors::Construct_point_3 Construct_point_3; Construct_point_3 construct_point_3_object() const { return Construct_point_3(); } typedef CartesianKernelFunctors::Construct_projected_point_2 Construct_projected_point_2; Construct_projected_point_2 construct_projected_point_2_object() const { return Construct_projected_point_2(); } typedef CartesianKernelFunctors::Construct_projected_point_3 Construct_projected_point_3; Construct_projected_point_3 construct_projected_point_3_object() const { return Construct_projected_point_3(); } typedef CartesianKernelFunctors::Construct_projected_xy_point_2 Construct_projected_xy_point_2; Construct_projected_xy_point_2 construct_projected_xy_point_2_object() const { return Construct_projected_xy_point_2(); } typedef CartesianKernelFunctors::Construct_radical_line_2 Construct_radical_line_2; Construct_radical_line_2 construct_radical_line_2_object() const { return Construct_radical_line_2(); } typedef CartesianKernelFunctors::Construct_radical_plane_3 Construct_radical_plane_3; Construct_radical_plane_3 construct_radical_plane_3_object() const { return Construct_radical_plane_3(); } typedef CartesianKernelFunctors::Construct_ray_2 Construct_ray_2; Construct_ray_2 construct_ray_2_object() const { return Construct_ray_2(); } typedef CartesianKernelFunctors::Construct_ray_3 Construct_ray_3; Construct_ray_3 construct_ray_3_object() const { return Construct_ray_3(); } typedef CartesianKernelFunctors::Construct_scaled_vector_2 Construct_scaled_vector_2; Construct_scaled_vector_2 construct_scaled_vector_2_object() const { return Construct_scaled_vector_2(); } typedef CartesianKernelFunctors::Construct_divided_vector_2 Construct_divided_vector_2; Construct_divided_vector_2 construct_divided_vector_2_object() const { return Construct_divided_vector_2(); } typedef CartesianKernelFunctors::Construct_divided_vector_3 Construct_divided_vector_3; Construct_divided_vector_3 construct_divided_vector_3_object() const { return Construct_divided_vector_3(); } typedef CartesianKernelFunctors::Construct_scaled_vector_3 Construct_scaled_vector_3; Construct_scaled_vector_3 construct_scaled_vector_3_object() const { return Construct_scaled_vector_3(); } typedef CartesianKernelFunctors::Construct_second_point_2 Construct_second_point_2; Construct_second_point_2 construct_second_point_2_object() const { return Construct_second_point_2(); } typedef CartesianKernelFunctors::Construct_second_point_3 Construct_second_point_3; Construct_second_point_3 construct_second_point_3_object() const { return Construct_second_point_3(); } typedef CartesianKernelFunctors::Construct_segment_2 Construct_segment_2; Construct_segment_2 construct_segment_2_object() const { return Construct_segment_2(); } typedef CartesianKernelFunctors::Construct_segment_3 Construct_segment_3; Construct_segment_3 construct_segment_3_object() const { return Construct_segment_3(); } typedef CartesianKernelFunctors::Construct_source_2 Construct_source_2; Construct_source_2 construct_source_2_object() const { return Construct_source_2(); } typedef CartesianKernelFunctors::Construct_source_3 Construct_source_3; Construct_source_3 construct_source_3_object() const { return Construct_source_3(); } typedef CartesianKernelFunctors::Construct_sphere_3 Construct_sphere_3; Construct_sphere_3 construct_sphere_3_object() const { return Construct_sphere_3(); } typedef CartesianKernelFunctors::Construct_supporting_plane_3 Construct_supporting_plane_3; Construct_supporting_plane_3 construct_supporting_plane_3_object() const { return Construct_supporting_plane_3(); } typedef CartesianKernelFunctors::Construct_target_2 Construct_target_2; Construct_target_2 construct_target_2_object() const { return Construct_target_2(); } typedef CartesianKernelFunctors::Construct_target_3 Construct_target_3; Construct_target_3 construct_target_3_object() const { return Construct_target_3(); } typedef CartesianKernelFunctors::Construct_tetrahedron_3 Construct_tetrahedron_3; Construct_tetrahedron_3 construct_tetrahedron_3_object() const { return Construct_tetrahedron_3(); } typedef CartesianKernelFunctors::Construct_translated_point_2 Construct_translated_point_2; Construct_translated_point_2 construct_translated_point_2_object() const { return Construct_translated_point_2(); } typedef CartesianKernelFunctors::Construct_translated_point_3 Construct_translated_point_3; Construct_translated_point_3 construct_translated_point_3_object() const { return Construct_translated_point_3(); } typedef CartesianKernelFunctors::Construct_triangle_2 Construct_triangle_2; Construct_triangle_2 construct_triangle_2_object() const { return Construct_triangle_2(); } typedef CartesianKernelFunctors::Construct_triangle_3 Construct_triangle_3; Construct_triangle_3 construct_triangle_3_object() const { return Construct_triangle_3(); } typedef CartesianKernelFunctors::Construct_unit_normal_3 Construct_unit_normal_3; Construct_unit_normal_3 construct_unit_normal_3_object() const { return Construct_unit_normal_3(); } typedef CartesianKernelFunctors::Construct_vector_2 Construct_vector_2; Construct_vector_2 construct_vector_2_object() const { return Construct_vector_2(); } typedef CartesianKernelFunctors::Construct_vector_3 Construct_vector_3; Construct_vector_3 construct_vector_3_object() const { return Construct_vector_3(); } typedef CartesianKernelFunctors::Construct_vertex_2 Construct_vertex_2; Construct_vertex_2 construct_vertex_2_object() const { return Construct_vertex_2(); } typedef CartesianKernelFunctors::Construct_vertex_3 Construct_vertex_3; Construct_vertex_3 construct_vertex_3_object() const { return Construct_vertex_3(); } typedef CartesianKernelFunctors::Construct_bbox_2 Construct_bbox_2; Construct_bbox_2 construct_bbox_2_object() const { return Construct_bbox_2(); } typedef CartesianKernelFunctors::Construct_bbox_3 Construct_bbox_3; Construct_bbox_3 construct_bbox_3_object() const { return Construct_bbox_3(); } typedef CartesianKernelFunctors::Construct_cartesian_const_iterator_2 Construct_cartesian_const_iterator_2; Construct_cartesian_const_iterator_2 construct_cartesian_const_iterator_2_object() const { return Construct_cartesian_const_iterator_2(); } typedef CartesianKernelFunctors::Construct_cartesian_const_iterator_3 Construct_cartesian_const_iterator_3; Construct_cartesian_const_iterator_3 construct_cartesian_const_iterator_3_object() const { return Construct_cartesian_const_iterator_3(); } typedef CartesianKernelFunctors::Coplanar_orientation_3 Coplanar_orientation_3; Coplanar_orientation_3 coplanar_orientation_3_object() const { return Coplanar_orientation_3(); } typedef CartesianKernelFunctors::Coplanar_side_of_bounded_circle_3 Coplanar_side_of_bounded_circle_3; Coplanar_side_of_bounded_circle_3 coplanar_side_of_bounded_circle_3_object() const { return Coplanar_side_of_bounded_circle_3(); } typedef CartesianKernelFunctors::Coplanar_3 Coplanar_3; Coplanar_3 coplanar_3_object() const { return Coplanar_3(); } typedef CartesianKernelFunctors::Counterclockwise_in_between_2 Counterclockwise_in_between_2; Counterclockwise_in_between_2 counterclockwise_in_between_2_object() const { return Counterclockwise_in_between_2(); } typedef CartesianKernelFunctors::Do_intersect_2 Do_intersect_2; Do_intersect_2 do_intersect_2_object() const { return Do_intersect_2(); } typedef CartesianKernelFunctors::Do_intersect_3 Do_intersect_3; Do_intersect_3 do_intersect_3_object() const { return Do_intersect_3(); } typedef CartesianKernelFunctors::Equal_xy_3 Equal_xy_3; Equal_xy_3 equal_xy_3_object() const { return Equal_xy_3(); } typedef CartesianKernelFunctors::Equal_x_2 Equal_x_2; Equal_x_2 equal_x_2_object() const { return Equal_x_2(); } typedef CartesianKernelFunctors::Equal_x_3 Equal_x_3; Equal_x_3 equal_x_3_object() const { return Equal_x_3(); } typedef CartesianKernelFunctors::Equal_y_2 Equal_y_2; Equal_y_2 equal_y_2_object() const { return Equal_y_2(); } typedef CartesianKernelFunctors::Equal_y_3 Equal_y_3; Equal_y_3 equal_y_3_object() const { return Equal_y_3(); } typedef CartesianKernelFunctors::Equal_z_3 Equal_z_3; Equal_z_3 equal_z_3_object() const { return Equal_z_3(); } typedef CartesianKernelFunctors::Equal_2 Equal_2; Equal_2 equal_2_object() const { return Equal_2(); } typedef CartesianKernelFunctors::Equal_3 Equal_3; Equal_3 equal_3_object() const { return Equal_3(); } typedef CartesianKernelFunctors::Has_on_boundary_2 Has_on_boundary_2; Has_on_boundary_2 has_on_boundary_2_object() const { return Has_on_boundary_2(); } typedef CartesianKernelFunctors::Has_on_boundary_3 Has_on_boundary_3; Has_on_boundary_3 has_on_boundary_3_object() const { return Has_on_boundary_3(); } typedef CartesianKernelFunctors::Has_on_bounded_side_2 Has_on_bounded_side_2; Has_on_bounded_side_2 has_on_bounded_side_2_object() const { return Has_on_bounded_side_2(); } typedef CartesianKernelFunctors::Has_on_bounded_side_3 Has_on_bounded_side_3; Has_on_bounded_side_3 has_on_bounded_side_3_object() const { return Has_on_bounded_side_3(); } typedef CartesianKernelFunctors::Has_on_negative_side_2 Has_on_negative_side_2; Has_on_negative_side_2 has_on_negative_side_2_object() const { return Has_on_negative_side_2(); } typedef CartesianKernelFunctors::Has_on_negative_side_3 Has_on_negative_side_3; Has_on_negative_side_3 has_on_negative_side_3_object() const { return Has_on_negative_side_3(); } typedef CartesianKernelFunctors::Has_on_positive_side_2 Has_on_positive_side_2; Has_on_positive_side_2 has_on_positive_side_2_object() const { return Has_on_positive_side_2(); } typedef CartesianKernelFunctors::Has_on_positive_side_3 Has_on_positive_side_3; Has_on_positive_side_3 has_on_positive_side_3_object() const { return Has_on_positive_side_3(); } typedef CartesianKernelFunctors::Has_on_unbounded_side_2 Has_on_unbounded_side_2; Has_on_unbounded_side_2 has_on_unbounded_side_2_object() const { return Has_on_unbounded_side_2(); } typedef CartesianKernelFunctors::Has_on_unbounded_side_3 Has_on_unbounded_side_3; Has_on_unbounded_side_3 has_on_unbounded_side_3_object() const { return Has_on_unbounded_side_3(); } typedef CartesianKernelFunctors::Has_on_2 Has_on_2; Has_on_2 has_on_2_object() const { return Has_on_2(); } typedef CartesianKernelFunctors::Has_on_3 Has_on_3; Has_on_3 has_on_3_object() const { return Has_on_3(); } typedef CartesianKernelFunctors::Intersect_2 Intersect_2; Intersect_2 intersect_2_object() const { return Intersect_2(); } typedef CartesianKernelFunctors::Intersect_3 Intersect_3; Intersect_3 intersect_3_object() const { return Intersect_3(); } typedef CartesianKernelFunctors::Is_degenerate_2 Is_degenerate_2; Is_degenerate_2 is_degenerate_2_object() const { return Is_degenerate_2(); } typedef CartesianKernelFunctors::Is_degenerate_3 Is_degenerate_3; Is_degenerate_3 is_degenerate_3_object() const { return Is_degenerate_3(); } typedef CartesianKernelFunctors::Is_horizontal_2 Is_horizontal_2; Is_horizontal_2 is_horizontal_2_object() const { return Is_horizontal_2(); } typedef CartesianKernelFunctors::Is_vertical_2 Is_vertical_2; Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } typedef CartesianKernelFunctors::Left_turn_2 Left_turn_2; Left_turn_2 left_turn_2_object() const { return Left_turn_2(); } typedef CartesianKernelFunctors::Less_distance_to_point_2 Less_distance_to_point_2; Less_distance_to_point_2 less_distance_to_point_2_object() const { return Less_distance_to_point_2(); } typedef CartesianKernelFunctors::Less_distance_to_point_3 Less_distance_to_point_3; Less_distance_to_point_3 less_distance_to_point_3_object() const { return Less_distance_to_point_3(); } typedef CartesianKernelFunctors::Less_rotate_ccw_2 Less_rotate_ccw_2; Less_rotate_ccw_2 less_rotate_ccw_2_object() const { return Less_rotate_ccw_2(); } typedef CartesianKernelFunctors::Less_signed_distance_to_line_2 Less_signed_distance_to_line_2; Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object() const { return Less_signed_distance_to_line_2(); } typedef CartesianKernelFunctors::Less_signed_distance_to_plane_3 Less_signed_distance_to_plane_3; Less_signed_distance_to_plane_3 less_signed_distance_to_plane_3_object() const { return Less_signed_distance_to_plane_3(); } typedef CartesianKernelFunctors::Less_xyz_3 Less_xyz_3; Less_xyz_3 less_xyz_3_object() const { return Less_xyz_3(); } typedef CartesianKernelFunctors::Less_xy_2 Less_xy_2; Less_xy_2 less_xy_2_object() const { return Less_xy_2(); } typedef CartesianKernelFunctors::Less_xy_3 Less_xy_3; Less_xy_3 less_xy_3_object() const { return Less_xy_3(); } typedef CartesianKernelFunctors::Less_x_2 Less_x_2; Less_x_2 less_x_2_object() const { return Less_x_2(); } typedef CartesianKernelFunctors::Less_x_3 Less_x_3; Less_x_3 less_x_3_object() const { return Less_x_3(); } typedef CartesianKernelFunctors::Less_yx_2 Less_yx_2; Less_yx_2 less_yx_2_object() const { return Less_yx_2(); } typedef CartesianKernelFunctors::Less_y_2 Less_y_2; Less_y_2 less_y_2_object() const { return Less_y_2(); } typedef CartesianKernelFunctors::Less_y_3 Less_y_3; Less_y_3 less_y_3_object() const { return Less_y_3(); } typedef CartesianKernelFunctors::Less_z_3 Less_z_3; Less_z_3 less_z_3_object() const { return Less_z_3(); } typedef CartesianKernelFunctors::Orientation_2 Orientation_2; Orientation_2 orientation_2_object() const { return Orientation_2(); } typedef CartesianKernelFunctors::Orientation_3 Orientation_3; Orientation_3 orientation_3_object() const { return Orientation_3(); } typedef CartesianKernelFunctors::Oriented_side_2 Oriented_side_2; Oriented_side_2 oriented_side_2_object() const { return Oriented_side_2(); } typedef CartesianKernelFunctors::Oriented_side_3 Oriented_side_3; Oriented_side_3 oriented_side_3_object() const { return Oriented_side_3(); } typedef CartesianKernelFunctors::Side_of_bounded_circle_2 Side_of_bounded_circle_2; Side_of_bounded_circle_2 side_of_bounded_circle_2_object() const { return Side_of_bounded_circle_2(); } typedef CartesianKernelFunctors::Side_of_bounded_sphere_3 Side_of_bounded_sphere_3; Side_of_bounded_sphere_3 side_of_bounded_sphere_3_object() const { return Side_of_bounded_sphere_3(); } typedef CartesianKernelFunctors::Side_of_oriented_circle_2 Side_of_oriented_circle_2; Side_of_oriented_circle_2 side_of_oriented_circle_2_object() const { return Side_of_oriented_circle_2(); } typedef CartesianKernelFunctors::Side_of_oriented_sphere_3 Side_of_oriented_sphere_3; Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const { return Side_of_oriented_sphere_3(); } # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Simple_cartesian.h" 2 }; template < typename FT_ > struct Simple_cartesian : public Type_equality_wrapper< Cartesian_base_no_ref_count >, Simple_cartesian > {}; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_predicates_inexact_constructions_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel_fwd.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel_fwd.h" namespace CGAL { template < typename CK, bool UseStaticFilters = true > struct Filtered_kernel; } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_predicate.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_predicate.h" namespace CGAL { # 49 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_predicate.h" template class Filtered_predicate { EP ep; AP ap; C2E c2e; C2A c2a; typedef typename AP::result_type Ares; public: typedef AP Approximate_predicate; typedef EP Exact_predicate; typedef C2E To_exact_converter; typedef C2A To_approximate_converter; typedef typename EP::result_type result_type; Filtered_predicate() {} template Filtered_predicate(const O &o1) : ep(c2e(o1)), ap(c2a(o1)) {} template Filtered_predicate(const O1 &o1, const O2 &o2) : ep(c2e(o1), c2e(o2)), ap(c2a(o1), c2a(o2)) {} template result_type operator()(const Args&... args) const; # 146 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_predicate.h" }; template template typename Filtered_predicate::result_type Filtered_predicate:: operator()(const Args&... args) const { ; { Protect_FPU_rounding p; try { Ares res = ap(c2a(args)...); if (is_certain(res)) return get_certain(res); } catch (Uncertain_conversion_exception) {} } ; Protect_FPU_rounding p(FE_TONEAREST); return ep(c2e(args)...); } # 417 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_predicate.h" } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian_converter.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian_converter.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/NT_converter.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/NT_converter.h" template class Interval_nt; namespace CGAL { template < class NT1, class NT2 > struct NT_converter : public std::unary_function< NT1, NT2 > { NT2 operator()(const NT1 &a) const { return NT2(a); } }; template < class NT1 > struct NT_converter < NT1, NT1 > : public std::unary_function< NT1, NT1 > { const NT1 & operator()(const NT1 &a) const { return a; } }; template < class NT1 > struct NT_converter < NT1, double > : public std::unary_function< NT1, double > { double operator()(const NT1 &a) const { return ::CGAL:: to_double(a); } }; template <> struct NT_converter < double, double > : public std::unary_function< double, double > { const double & operator()(const double &a) const { return a; } }; template < class NT1, bool b > struct NT_converter < NT1, Interval_nt > : public std::unary_function< NT1, Interval_nt > { Interval_nt operator()(const NT1 &a) const { return ::CGAL:: to_interval(a); } }; template < bool b > struct NT_converter < Interval_nt, Interval_nt > : public std::unary_function< Interval_nt, Interval_nt > { const Interval_nt & operator()(const Interval_nt &a) const { return a; } }; } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian_converter.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Enum_converter.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Enum_converter.h" namespace CGAL { struct Enum_converter { bool operator()(bool b) const { return b; } Sign operator()(Sign s) const { return s; } Bounded_side operator()(Bounded_side bs) const { return bs; } Angle operator()(Angle a) const { return a; } }; } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian_converter.h" 2 namespace CGAL { namespace internal { template < typename K1, typename K2 > struct Default_converter { typedef typename K1::FT FT1; typedef typename K2::FT FT2; typedef ::CGAL::NT_converter Type; }; } template < class K1, class K2, class Converter = typename internal::Default_converter::Type > class Cartesian_converter : public Enum_converter { typedef Enum_converter Base; public: typedef K1 Source_kernel; typedef K2 Target_kernel; typedef Converter Number_type_converter; using Base::operator(); Origin operator()(const Origin& o) const { return o; } Null_vector operator()(const Null_vector& n) const { return n; } Bbox_2 operator()(const Bbox_2& b) const { return b; } Bbox_3 operator()(const Bbox_3& b) const { return b; } typename K2::FT operator()(const typename K1::FT &a) const { return c(a); } typename K2::Object_2 operator()(const typename K1::Object_2 &obj) const { # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" if (const typename K1::Point_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Vector_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Direction_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Segment_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Ray_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Line_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Triangle_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Iso_rectangle_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Circle_2 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Point_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Plane_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Vector_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Direction_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Segment_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Ray_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Line_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Triangle_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Tetrahedron_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Iso_cuboid_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Sphere_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); if (const typename K1::Circle_3 * ptr = object_cast(&obj)) return make_object(operator()(*ptr)); # 106 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian_converter.h" 2 # 117 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian_converter.h" if (const std::vector * ptr = object_cast >(&obj)) { std::vector res; res.reserve((*ptr).size()); for(unsigned int i=0; i < (*ptr).size(); i++){ res.push_back(operator()((*ptr)[i])); } return make_object(res); } if (const std::vector * ptr = object_cast >(&obj)) { std::vector res; res.reserve((*ptr).size()); for(unsigned int i=0; i < (*ptr).size(); i++){ res.push_back(operator()((*ptr)[i])); } return make_object(res); } ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian_converter.h", 121, "Cartesian_converter is unable to determine what is wrapped in the Object" ); return Object(); } std::vector operator()(const std::vector& v) const { std::vector res; res.reserve(v.size()); for(unsigned int i = 0; i < v.size(); i++) { res.push_back(operator()(v[i])); } return res; } typename K2::Point_2 operator()(const typename K1::Point_2 &a) const { typedef typename K2::Point_2 Point_2; return Point_2(c(a.x()), c(a.y())); } typename K2::Vector_2 operator()(const typename K1::Vector_2 &a) const { typedef typename K2::Vector_2 Vector_2; return Vector_2(c(a.x()), c(a.y())); } typename K2::Direction_2 operator()(const typename K1::Direction_2 &a) const { typedef typename K2::Direction_2 Direction_2; return Direction_2(c(a.dx()), c(a.dy())); } typename K2::Segment_2 operator()(const typename K1::Segment_2 &a) const { typedef typename K2::Segment_2 Segment_2; return Segment_2(operator()(a.source()), operator()(a.target())); } typename K2::Line_2 operator()(const typename K1::Line_2 &a) const { typedef typename K2::Line_2 Line_2; return Line_2(c(a.a()), c(a.b()), c(a.c())); } typename K2::Ray_2 operator()(const typename K1::Ray_2 &a) const { typedef typename K2::Ray_2 Ray_2; return Ray_2(operator()(a.source()), operator()(a.second_point())); } typename K2::Circle_2 operator()(const typename K1::Circle_2 &a) const { typedef typename K2::Circle_2 Circle_2; return Circle_2(operator()(a.center()), c(a.squared_radius()), a.rep().orientation()); } typename K2::Triangle_2 operator()(const typename K1::Triangle_2 &a) const { typedef typename K2::Triangle_2 Triangle_2; return Triangle_2(operator()(a.vertex(0)), operator()(a.vertex(1)), operator()(a.vertex(2))); } typename K2::Iso_rectangle_2 operator()(const typename K1::Iso_rectangle_2 &a) const { typedef typename K2::Iso_rectangle_2 Iso_rectangle_2; return Iso_rectangle_2(operator()((a.min)()), operator()((a.max)()), 0); } typename K2::Point_3 operator()(const typename K1::Point_3 &a) const { typedef typename K2::Point_3 Point_3; return Point_3(c(a.x()), c(a.y()), c(a.z())); } typename K2::Vector_3 operator()(const typename K1::Vector_3 &a) const { typedef typename K2::Vector_3 Vector_3; return Vector_3(c(a.x()), c(a.y()), c(a.z())); } typename K2::Direction_3 operator()(const typename K1::Direction_3 &a) const { typedef typename K2::Direction_3 Direction_3; return Direction_3(c(a.dx()), c(a.dy()), c(a.dz())); } typename K2::Segment_3 operator()(const typename K1::Segment_3 &a) const { typedef typename K2::Segment_3 Segment_3; return Segment_3(operator()(a.source()), operator()(a.target())); } typename K2::Line_3 operator()(const typename K1::Line_3 &a) const { typedef typename K2::Line_3 Line_3; return Line_3(operator()(a.point()), operator()(a.to_vector())); } typename K2::Ray_3 operator()(const typename K1::Ray_3 &a) const { typedef typename K2::Ray_3 Ray_3; return Ray_3(operator()(a.source()), operator()(a.second_point())); } typename K2::Sphere_3 operator()(const typename K1::Sphere_3 &a) const { typedef typename K2::Sphere_3 Sphere_3; return Sphere_3(operator()(a.center()), c(a.squared_radius()), a.rep().orientation()); } typename K2::Circle_3 operator()(const typename K1::Circle_3 &a) const { typedef typename K2::Circle_3 Circle_3; return Circle_3(operator()(a.diametral_sphere()), operator()(a.supporting_plane()),1); } typename K2::Triangle_3 operator()(const typename K1::Triangle_3 &a) const { typedef typename K2::Triangle_3 Triangle_3; return Triangle_3(operator()(a.vertex(0)), operator()(a.vertex(1)), operator()(a.vertex(2))); } typename K2::Tetrahedron_3 operator()(const typename K1::Tetrahedron_3 &a) const { typedef typename K2::Tetrahedron_3 Tetrahedron_3; return Tetrahedron_3(operator()(a.vertex(0)), operator()(a.vertex(1)), operator()(a.vertex(2)), operator()(a.vertex(3))); } typename K2::Plane_3 operator()(const typename K1::Plane_3 &a) const { typedef typename K2::Plane_3 Plane_3; return Plane_3(c(a.a()), c(a.b()), c(a.c()), c(a.d())); } typename K2::Iso_cuboid_3 operator()(const typename K1::Iso_cuboid_3 &a) const { typedef typename K2::Iso_cuboid_3 Iso_cuboid_3; return Iso_cuboid_3(operator()((a.min)()), operator()((a.max)()), 0); } std::pair operator() (const std::pair& pp) const { return std::make_pair(operator()(pp.first), operator()(pp.second)); } private: Converter c; K2 k; }; template < class K, class C > class Cartesian_converter { public: typedef K Source_kernel; typedef K Target_kernel; typedef C Number_type_converter; template < typename T > const T& operator()(const T&t) const { return t; } }; } # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" namespace CGAL { template < typename NT > inline void simplify_quotient(NT &, NT &) {} template < typename NT > struct Split_double { void operator()(double d, NT &num, NT &den) const { num = NT(d); den = 1; } }; template class Quotient : boost::ordered_field_operators1< Quotient , boost::ordered_field_operators2< Quotient, NT_ , boost::ordered_field_operators2< Quotient, typename First_if_different::Type , boost::ordered_field_operators2< Quotient, typename First_if_different::Type > > > > { public: typedef NT_ NT; Quotient() : num(0), den(1) {} Quotient(const NT& n) : num(n), den(1) {} Quotient(const typename First_if_different::Type & n) { Split_double()(n, num, den); } Quotient(const typename First_if_different::Type & n) : num(n), den(1) {} template explicit Quotient(const T& n) : num(n), den(1) {} template Quotient(const Quotient& n) : num(n.numerator()), den(n.denominator()) {} Quotient& operator=(const NT & n) { num = n; den = 1; return *this; } Quotient& operator=(const typename First_if_different::Type & n) { num = n; den = 1; return *this; } Quotient& operator=(const typename First_if_different::Type & n) { num = n; den = 1; return *this; } # 129 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" template Quotient(T1 && n, T2 && d) : num(std::forward(n)), den(std::forward(d)) { (CGAL::possibly(den != 0)?(static_cast(0)): ::CGAL::postcondition_fail( "den != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h", 132)); } Quotient(NT && n) : num(std::move(n)), den(1) {} Quotient& operator=(NT && n) { num = std::move(n); den = 1; return *this; } Quotient& operator+= (const Quotient& r); Quotient& operator-= (const Quotient& r); Quotient& operator*= (const Quotient& r); Quotient& operator/= (const Quotient& r); Quotient& operator+= (const NT& r); Quotient& operator-= (const NT& r); Quotient& operator*= (const NT& r); Quotient& operator/= (const NT& r); Quotient& operator+= (const typename First_if_different::Type& r); Quotient& operator-= (const typename First_if_different::Type& r); Quotient& operator*= (const typename First_if_different::Type& r); Quotient& operator/= (const typename First_if_different::Type& r); Quotient& operator+= (const typename First_if_different::Type& r); Quotient& operator-= (const typename First_if_different::Type& r); Quotient& operator*= (const typename First_if_different::Type& r); Quotient& operator/= (const typename First_if_different::Type& r); Quotient& normalize(); const NT& numerator() const { return num; } const NT& denominator() const { return den; } void swap(Quotient &q) { using std::swap; swap(num, q.num); swap(den, q.den); } public: NT num; NT den; }; template inline void swap(Quotient &p, Quotient &q) { p.swap(q); } template inline Quotient& Quotient::normalize() { if (num == den) { num = den = 1; return *this; } if (-num == den) { num = -1; den = 1; return *this; } NT ggt = ::CGAL:: gcd(num, den); if (ggt != 1 ) { num = CGAL::integral_division(num, ggt); den = CGAL::integral_division(den, ggt); } return *this; } template inline Quotient& Quotient::operator+= (const Quotient& r) { num = num * r.den + r.num * den; den *= r.den; simplify_quotient(num, den); return *this; } template inline Quotient& Quotient::operator-= (const Quotient& r) { num = num * r.den - r.num * den; den *= r.den; simplify_quotient(num, den); return *this; } template inline Quotient& Quotient::operator*= (const Quotient& r) { num *= r.num; den *= r.den; simplify_quotient(num, den); return *this; } template inline Quotient& Quotient::operator/= (const Quotient& r) { (CGAL::possibly(r.num != 0)?(static_cast(0)): ::CGAL::precondition_fail( "r.num != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h", 253)); num *= r.den; den *= r.num; simplify_quotient(num, den); return *this; } template inline Quotient& Quotient::operator+= (const NT& r) { num += r * den; return *this; } template inline Quotient& Quotient::operator-= (const NT& r) { num -= r * den; return *this; } template inline Quotient& Quotient::operator*= (const NT& r) { num *= r; return *this; } template inline Quotient& Quotient::operator/= (const NT& r) { (CGAL::possibly(r != 0)?(static_cast(0)): ::CGAL::precondition_fail( "r != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h", 292)); den *= r; return *this; } template inline Quotient& Quotient::operator+= (const typename First_if_different::Type& r) { num += r * den; return *this; } template inline Quotient& Quotient::operator-= (const typename First_if_different::Type& r) { num -= r * den; return *this; } template inline Quotient& Quotient::operator*= (const typename First_if_different::Type& r) { num *= r; return *this; } template inline Quotient& Quotient::operator/= (const typename First_if_different::Type& r) { (CGAL::possibly(r != 0)?(static_cast(0)): ::CGAL::precondition_fail( "r != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h", 329)); den *= r; return *this; } template inline Quotient& Quotient::operator+= (const typename First_if_different::Type& r) { NT r_num, r_den; Split_double()(r,r_num,r_den); num = num*r_den + r_num*den; den *=r_den; return *this; } template inline Quotient& Quotient::operator-= (const typename First_if_different::Type& r) { NT r_num, r_den; Split_double()(r,r_num,r_den); num = num*r_den - r_num*den; den *= r_den; return *this; } template inline Quotient& Quotient::operator*= (const typename First_if_different::Type& r) { NT r_num, r_den; Split_double()(r,r_num,r_den); num *= r_num; den *= r_den; return *this; } template inline Quotient& Quotient::operator/= (const typename First_if_different::Type& r) { (CGAL::possibly(r != 0)?(static_cast(0)): ::CGAL::precondition_fail( "r != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h", 379)); NT r_num, r_den; Split_double()(r,r_num,r_den); num *= r_den; den *= r_num; return *this; } template inline Comparison_result quotient_cmp(const Quotient& x, const Quotient& y) { (CGAL::possibly(SMALLER == static_cast(-1))?(static_cast(0)): ::CGAL::precondition_fail( "SMALLER == static_cast(-1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h", 395)); int xsign = ::CGAL:: sign(x.num) * ::CGAL:: sign(x.den) ; int ysign = ::CGAL:: sign(y.num) * ::CGAL:: sign(y.den) ; if (xsign == 0) return static_cast(-ysign); if (ysign == 0) return static_cast(xsign); int diff = xsign - ysign; if (diff == 0) { int msign = ::CGAL:: sign(x.den) * ::CGAL:: sign(y.den); NT leftop = x.num * y.den * msign; NT rightop = y.num * x.den * msign; return ::CGAL:: compare(leftop, rightop); } else { return (xsign < ysign) ? SMALLER : LARGER; } } template std::ostream& operator<<(std::ostream& s, const Quotient& r) { return s << r.numerator() << '/' << r.denominator(); } template std::istream& operator>>(std::istream& in, Quotient& r) { NT num,den=1; in >> num; if(!in) return in; std::istream::sentry s(in); if(in.peek()!='/'){ if(!in.good()){ in.clear(std::ios_base::eofbit); } } else { char c; in.get(c); in >> den; if(!in) return in; } r=Quotient(num,den); return in; } template< class NT > inline Quotient operator+( const Quotient& x ) { return Quotient(x); } template inline Quotient operator-(const Quotient& x) { return Quotient(-x.num,x.den); } template inline NT quotient_truncation(const Quotient& r) { return (r.num / r.den); } template inline bool operator==(const Quotient& x, const Quotient& y) { return x.num * y.den == x.den * y.num; } template inline bool operator==(const Quotient& x, const NT& y) { return x.den * y == x.num; } template inline bool operator==(const Quotient& x, const typename First_if_different::Type & y) { return x.den * y == x.num; } template inline bool operator==(const Quotient& x, const typename First_if_different::Type & y) { return x.den * y == x.num; } template inline bool operator<(const Quotient& x, const Quotient& y) { return quotient_cmp(x,y) == SMALLER; } template inline bool operator<(const Quotient& x, const NT& y) { return quotient_cmp(x,Quotient(y)) == SMALLER; } template inline bool operator<(const Quotient& x, const typename First_if_different::Type& y) { return quotient_cmp(x,Quotient(y)) == SMALLER; } template inline bool operator<(const Quotient& x, const typename First_if_different::Type& y) { return quotient_cmp(x,Quotient(y)) == SMALLER; } template inline bool operator>(const Quotient& x, const NT& y) { return quotient_cmp(x,Quotient(y)) == LARGER; } template inline bool operator>(const Quotient& x, const typename First_if_different::Type& y) { return quotient_cmp(x, Quotient(y)) == LARGER; } template inline bool operator>(const Quotient& x, const typename First_if_different::Type& y) { return quotient_cmp(x, Quotient(y)) == LARGER; } template< class NT > class Is_valid< Quotient > : public std::unary_function< Quotient, bool > { public : bool operator()( const Quotient& x ) const { return is_valid(x.num) && is_valid(x.den); } }; template inline const NT& denominator(const Quotient& q) { return q.den ; } template inline const NT& numerator(const Quotient& q) { return q.num ; } template inline const Quotient& min (const Quotient& p, const Quotient& q) { return (std::min)(p, q); } template inline const Quotient& max (const Quotient& p, const Quotient& q) { return (std::max)(p, q); } # 605 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" namespace INTERN_QUOTIENT { template< class NT, class Sqrt_functor > class Sqrt_selector { public: class Sqrt : public std::unary_function< NT, NT > { public: NT operator()( const NT& x ) const { (CGAL::possibly(x > 0)?(static_cast(0)): ::CGAL::precondition_fail( "x > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h", 613)); return NT(::CGAL:: sqrt(x.numerator()*x.denominator()), x.denominator()); } }; }; template< class NT > class Sqrt_selector< NT, Null_functor > { public: typedef Null_functor Sqrt; }; template class Algebraic_structure_traits_quotient_base; template< class NT > class Algebraic_structure_traits_quotient_base< Quotient > : public Algebraic_structure_traits_base< Quotient, Field_tag > { public: typedef Quotient Type; typedef typename Algebraic_structure_traits::Is_exact Is_exact; typedef Tag_false Is_numerical_sensitive; class Is_square : public std::binary_function< Quotient, Quotient&, bool > { public: bool operator()( Quotient x, Quotient& y ) const { NT x_num, x_den, y_num, y_den; x.normalize(); x_num = x.numerator(); x_den = x.denominator(); typename Algebraic_structure_traits::Is_square is_square; bool num_is_square = is_square(x_num,y_num); bool den_is_square = is_square(x_den,y_den); y= Quotient(y_num,y_den); return num_is_square && den_is_square; } bool operator()(Quotient x) const { x.normalize(); typename Algebraic_structure_traits::Is_square is_square; return is_square(x.numerator())&&is_square(x.denominator()); } }; typedef typename boost::mpl::if_c< !boost::is_same< typename Algebraic_structure_traits::Sqrt, Null_functor >::value, typename INTERN_QUOTIENT::Sqrt_selector< Type, Is_exact >::Sqrt, Null_functor >::type Sqrt; class Simplify : public std::unary_function< Type&, void > { public: void operator()( Type& x) const { x.normalize(); } }; }; template class Real_embeddable_traits_quotient_base; template < class NT > class Real_embeddable_traits_quotient_base< Quotient > : public INTERN_RET::Real_embeddable_traits_base< Quotient, typename Real_embeddable_traits< NT >::Is_real_embeddable > { public: typedef Quotient Type; class Compare : public std::binary_function< Type, Type, Comparison_result > { public: Comparison_result operator()( const Type& x, const Type& y ) const { return quotient_cmp(x, y); } }; class To_double : public std::unary_function< Type, double > { public: double operator()( const Type& x ) const { if (x.num == 0 ) return 0; double nd = ::CGAL:: to_double( x.num ); if (x.den == 1 ) return nd; double dd = ::CGAL:: to_double( x.den ); if ( ::CGAL:: is_finite( x.den ) && ::CGAL:: is_finite( x.num ) ) return nd/dd; if ( ::CGAL:: abs(x.num) > ::CGAL:: abs(x.den) ) { NT nt_div = x.num / x.den; double divd = ::CGAL:: to_double(nt_div); if ( divd >= std::ldexp(1.0,53) ) { return divd; } } if ( ::CGAL:: abs(x.num) < ::CGAL:: abs(x.den) ) { return 1.0 / ::CGAL:: to_double( NT(1) / x ); } return nd/dd; } }; class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { Interval_nt<> quot = Interval_nt<>(::CGAL:: to_interval(x.numerator())) / Interval_nt<>(::CGAL:: to_interval(x.denominator())); return std::make_pair(quot.inf(), quot.sup()); } }; class Is_finite : public std::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { return ::CGAL:: is_finite(x.num) && ::CGAL:: is_finite(x.den); } }; }; } template< class NT > class Algebraic_structure_traits< Quotient > : public INTERN_QUOTIENT::Algebraic_structure_traits_quotient_base< Quotient >{}; template< class NT > class Real_embeddable_traits< Quotient > : public INTERN_QUOTIENT::Real_embeddable_traits_quotient_base< Quotient >{}; template struct Coercion_traits< Quotient , Quotient >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Quotient Type; struct Cast{ typedef Type result_type; Type operator()(const Quotient& x) const {return x;} }; }; template struct Coercion_traits::Type,Quotient > { typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Quotient Type; struct Cast{ typedef Type result_type; Type operator()(const Quotient& x) const { return x;} Type operator()( const typename First_if_different::Type& x) const { return Type(x);} }; }; template struct Coercion_traits,typename First_if_different::Type> :public Coercion_traits::Type, Quotient >{}; template struct Coercion_traits::Type, Quotient >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Quotient Type; struct Cast{ typedef Type result_type; Type operator()(const Quotient& x) const { return x;} Type operator()( const typename First_if_different::Type& x) const { return Type(x);} }; }; template struct Coercion_traits, typename First_if_different::Type> :public Coercion_traits::Type, Quotient > {}; template struct Coercion_traits< NT , Quotient >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Quotient Type; struct Cast{ typedef Type result_type; Type operator()(const Quotient& x) const { return x;} Type operator()(const NT& x) const { return Type(x);} }; }; template struct Coercion_traits< Quotient , NT >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Quotient Type; struct Cast{ typedef Type result_type; Type operator()(const Quotient& x) const { return x;} Type operator()(const NT& x) const { return Type(x);} }; }; template class Fraction_traits< Quotient > { public: typedef Quotient Type; typedef ::CGAL::Tag_true Is_fraction; typedef NT Numerator_type; typedef Numerator_type Denominator_type; typedef typename Algebraic_structure_traits< Numerator_type >::Gcd Common_factor; class Decompose { public: typedef Type first_argument_type; typedef Numerator_type& second_argument_type; typedef Numerator_type& third_argument_type; void operator () ( const Type& rat, Numerator_type& num, Numerator_type& den) { num = rat.numerator(); den = rat.denominator(); } }; class Compose { public: typedef Numerator_type first_argument_type; typedef Numerator_type second_argument_type; typedef Type result_type; Type operator ()( const Numerator_type& num , const Numerator_type& den ) { Type result(num, den); return result; } }; }; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 1 # 55 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h" 1 # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Interval_arithmetic.h" 1 # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension_fwd.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension_fwd.h" namespace CGAL{ template class Sqrt_extension; } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h" 2 # 1 "/localhome/glisse2/include/boost/optional.hpp" 1 # 15 "/localhome/glisse2/include/boost/optional.hpp" # 1 "/localhome/glisse2/include/boost/optional/optional.hpp" 1 # 22 "/localhome/glisse2/include/boost/optional/optional.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 68 "/usr/include/assert.h" 3 4 extern "C" { extern void __assert_fail (__const char *__assertion, __const char *__file, unsigned int __line, __const char *__function) throw () __attribute__ ((__noreturn__)); extern void __assert_perror_fail (int __errnum, __const char *__file, unsigned int __line, __const char *__function) throw () __attribute__ ((__noreturn__)); extern void __assert (const char *__assertion, const char *__file, int __line) throw () __attribute__ ((__noreturn__)); } # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 81 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 82 "/localhome/glisse2/include/boost/assert.hpp" 2 # 1 "/localhome/glisse2/include/boost/current_function.hpp" 1 # 22 "/localhome/glisse2/include/boost/current_function.hpp" namespace boost { namespace detail { inline void current_function_helper() { # 61 "/localhome/glisse2/include/boost/current_function.hpp" } } } # 84 "/localhome/glisse2/include/boost/assert.hpp" 2 namespace boost { namespace assertion { namespace detail { inline void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line) { std::cerr << "***** Internal Program Error - assertion (" << expr << ") failed in " << function << ":\n" << file << '(' << line << "): " << msg << std::endl; std::abort(); } } } } # 23 "/localhome/glisse2/include/boost/optional/optional.hpp" 2 # 1 "/localhome/glisse2/include/boost/type.hpp" 1 # 9 "/localhome/glisse2/include/boost/type.hpp" namespace boost { template struct type {}; } # 24 "/localhome/glisse2/include/boost/optional/optional.hpp" 2 # 32 "/localhome/glisse2/include/boost/optional/optional.hpp" # 1 "/localhome/glisse2/include/boost/detail/reference_content.hpp" 1 # 28 "/localhome/glisse2/include/boost/detail/reference_content.hpp" namespace boost { namespace detail { template class reference_content { private: RefT content_; public: ~reference_content() { } reference_content(RefT r) : content_( r ) { } reference_content(const reference_content& operand) : content_( operand.content_ ) { } private: reference_content& operator=(const reference_content&); public: RefT get() const { return content_; } }; template struct make_reference_content; template struct make_reference_content { typedef T type; }; template struct make_reference_content< T& > { typedef reference_content type; }; # 109 "/localhome/glisse2/include/boost/detail/reference_content.hpp" template <> struct make_reference_content< mpl::void_ > { template struct apply : make_reference_content { }; typedef mpl::void_ type; }; } template struct has_nothrow_copy< ::boost::detail::reference_content< T& > > : mpl::true_ { }; } # 33 "/localhome/glisse2/include/boost/optional/optional.hpp" 2 # 1 "/localhome/glisse2/include/boost/none.hpp" 1 # 15 "/localhome/glisse2/include/boost/none.hpp" # 1 "/localhome/glisse2/include/boost/none_t.hpp" 1 # 15 "/localhome/glisse2/include/boost/none_t.hpp" namespace boost { namespace detail { struct none_helper{}; } typedef int detail::none_helper::*none_t ; } # 16 "/localhome/glisse2/include/boost/none.hpp" 2 namespace boost { none_t const none = (static_cast(0)) ; } # 34 "/localhome/glisse2/include/boost/optional/optional.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/compare_pointees.hpp" 1 # 17 "/localhome/glisse2/include/boost/utility/compare_pointees.hpp" namespace boost { # 28 "/localhome/glisse2/include/boost/utility/compare_pointees.hpp" template inline bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y ) { return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ; } template struct equal_pointees_t : std::binary_function { bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return equal_pointees(x,y) ; } } ; # 51 "/localhome/glisse2/include/boost/utility/compare_pointees.hpp" template inline bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) { return !y ? false : ( !x ? true : (*x) < (*y) ) ; } template struct less_pointees_t : std::binary_function { bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return less_pointees(x,y) ; } } ; } # 37 "/localhome/glisse2/include/boost/optional/optional.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 16 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" # 1 "/localhome/glisse2/include/boost/utility/detail/in_place_factory_prefix.hpp" 1 # 17 "/localhome/glisse2/include/boost/utility/detail/in_place_factory_prefix.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 18 "/localhome/glisse2/include/boost/utility/detail/in_place_factory_prefix.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/punctuation/paren.hpp" 1 # 21 "/localhome/glisse2/include/boost/utility/detail/in_place_factory_prefix.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/enum.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/repetition/enum.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 21 "/localhome/glisse2/include/boost/preprocessor/repetition/enum.hpp" 2 # 24 "/localhome/glisse2/include/boost/utility/detail/in_place_factory_prefix.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/enum_binary_params.hpp" 1 # 26 "/localhome/glisse2/include/boost/utility/detail/in_place_factory_prefix.hpp" 2 # 17 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 2 namespace boost { class in_place_factory_base {} ; # 1 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 # 12 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/slot/detail/shared.hpp" 1 # 13 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 # 18 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 # 12 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/slot/detail/shared.hpp" 1 # 13 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 # 20 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 47 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 37 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" class in_place_factory0 : public in_place_factory_base { public: explicit in_place_factory0 ( ) {} template void* apply(void* address ) const { return new(address) T( ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } }; # 79 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" inline in_place_factory0 in_place() { return in_place_factory0(); } # 48 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 > class in_place_factory1 : public in_place_factory_base { public: explicit in_place_factory1 ( A0 const& a0 ) : m_a0 ( a0 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; }; template< class A0 > inline in_place_factory1< A0 > in_place( A0 const& a0 ) { return in_place_factory1< A0 > ( a0 ); } # 53 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 > class in_place_factory2 : public in_place_factory_base { public: explicit in_place_factory2 ( A0 const& a0 , A1 const& a1 ) : m_a0 ( a0 ) , m_a1 ( a1 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; }; template< class A0 , class A1 > inline in_place_factory2< A0 , A1 > in_place( A0 const& a0 , A1 const& a1 ) { return in_place_factory2< A0 , A1 > ( a0 , a1 ); } # 58 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 > class in_place_factory3 : public in_place_factory_base { public: explicit in_place_factory3 ( A0 const& a0 , A1 const& a1 , A2 const& a2 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; }; template< class A0 , class A1 , class A2 > inline in_place_factory3< A0 , A1 , A2 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 ) { return in_place_factory3< A0 , A1 , A2 > ( a0 , a1 , a2 ); } # 63 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 , class A3 > class in_place_factory4 : public in_place_factory_base { public: explicit in_place_factory4 ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; }; template< class A0 , class A1 , class A2 , class A3 > inline in_place_factory4< A0 , A1 , A2 , A3 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 ) { return in_place_factory4< A0 , A1 , A2 , A3 > ( a0 , a1 , a2 , a3 ); } # 68 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 , class A3 , class A4 > class in_place_factory5 : public in_place_factory_base { public: explicit in_place_factory5 ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; }; template< class A0 , class A1 , class A2 , class A3 , class A4 > inline in_place_factory5< A0 , A1 , A2 , A3 , A4 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 ) { return in_place_factory5< A0 , A1 , A2 , A3 , A4 > ( a0 , a1 , a2 , a3 , a4 ); } # 73 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 > class in_place_factory6 : public in_place_factory_base { public: explicit in_place_factory6 ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; }; template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 > inline in_place_factory6< A0 , A1 , A2 , A3 , A4 , A5 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 ) { return in_place_factory6< A0 , A1 , A2 , A3 , A4 , A5 > ( a0 , a1 , a2 , a3 , a4 , a5 ); } # 78 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 > class in_place_factory7 : public in_place_factory_base { public: explicit in_place_factory7 ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6; }; template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 > inline in_place_factory7< A0 , A1 , A2 , A3 , A4 , A5 , A6 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 ) { return in_place_factory7< A0 , A1 , A2 , A3 , A4 , A5 , A6 > ( a0 , a1 , a2 , a3 , a4 , a5 , a6 ); } # 83 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 > class in_place_factory8 : public in_place_factory_base { public: explicit in_place_factory8 ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 ) , m_a7 ( a7 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 , m_a7 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6; A7 const& m_a7; }; template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 > inline in_place_factory8< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 ) { return in_place_factory8< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 > ( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 ); } # 88 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 > class in_place_factory9 : public in_place_factory_base { public: explicit in_place_factory9 ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 ) , m_a7 ( a7 ) , m_a8 ( a8 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 , m_a7 , m_a8 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6; A7 const& m_a7; A8 const& m_a8; }; template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 > inline in_place_factory9< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 ) { return in_place_factory9< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 > ( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 ); } # 93 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 1 # 35 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 > class in_place_factory10 : public in_place_factory_base { public: explicit in_place_factory10 ( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 ) : m_a0 ( a0 ) , m_a1 ( a1 ) , m_a2 ( a2 ) , m_a3 ( a3 ) , m_a4 ( a4 ) , m_a5 ( a5 ) , m_a6 ( a6 ) , m_a7 ( a7 ) , m_a8 ( a8 ) , m_a9 ( a9 ) {} template void* apply(void* address ) const { return new(address) T( m_a0 , m_a1 , m_a2 , m_a3 , m_a4 , m_a5 , m_a6 , m_a7 , m_a8 , m_a9 ); } template void* apply(void* address, std::size_t n ) const { for(char* next = address = this->template apply(address); !! --n;) this->template apply(next = next+sizeof(T)); return address; } A0 const& m_a0; A1 const& m_a1; A2 const& m_a2; A3 const& m_a3; A4 const& m_a4; A5 const& m_a5; A6 const& m_a6; A7 const& m_a7; A8 const& m_a8; A9 const& m_a9; }; template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 > inline in_place_factory10< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 > in_place( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 ) { return in_place_factory10< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 > ( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 ); } # 98 "/localhome/glisse2/include/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 # 25 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 2 } # 1 "/localhome/glisse2/include/boost/utility/detail/in_place_factory_suffix.hpp" 1 # 29 "/localhome/glisse2/include/boost/utility/in_place_factory.hpp" 2 # 38 "/localhome/glisse2/include/boost/optional/optional.hpp" 2 # 1 "/localhome/glisse2/include/boost/optional/optional_fwd.hpp" 1 # 18 "/localhome/glisse2/include/boost/optional/optional_fwd.hpp" namespace boost { template class optional ; template void swap ( optional& , optional& ) ; template struct optional_swap_should_use_default_constructor ; } # 40 "/localhome/glisse2/include/boost/optional/optional.hpp" 2 # 99 "/localhome/glisse2/include/boost/optional/optional.hpp" namespace boost_optional_detail { template inline void construct(Factory const& factory, void* address) { factory.template apply(address); } } namespace boost { class in_place_factory_base ; class typed_in_place_factory_base ; template void swap ( optional& x, optional& y ); namespace optional_detail { template class aligned_storage { union __attribute__((may_alias)) dummy_u { char data[ sizeof(T) ]; typename type_with_alignment< ::boost::alignment_of::value >::type aligner_; } dummy_ ; public: void const* address() const { return &dummy_; } void * address() { return &dummy_; } } ; template struct types_when_isnt_ref { typedef T const& reference_const_type ; typedef T & reference_type ; typedef T const* pointer_const_type ; typedef T * pointer_type ; typedef T const& argument_type ; } ; template struct types_when_is_ref { typedef typename remove_reference::type raw_type ; typedef raw_type& reference_const_type ; typedef raw_type& reference_type ; typedef raw_type* pointer_const_type ; typedef raw_type* pointer_type ; typedef raw_type& argument_type ; } ; struct optional_tag {} ; template class optional_base : public optional_tag { private : typedef typename ::boost::detail::make_reference_content::type internal_type ; typedef aligned_storage storage_type ; typedef types_when_isnt_ref types_when_not_ref ; typedef types_when_is_ref types_when_ref ; typedef optional_base this_type ; protected : typedef T value_type ; typedef mpl::true_ is_reference_tag ; typedef mpl::false_ is_not_reference_tag ; typedef typename is_reference::type is_reference_predicate ; public: typedef typename mpl::if_::type types ; protected: typedef bool (this_type::*unspecified_bool_type)() const; typedef typename types::reference_type reference_type ; typedef typename types::reference_const_type reference_const_type ; typedef typename types::pointer_type pointer_type ; typedef typename types::pointer_const_type pointer_const_type ; typedef typename types::argument_type argument_type ; optional_base() : m_initialized(false) {} optional_base ( none_t ) : m_initialized(false) {} optional_base ( argument_type val ) : m_initialized(false) { construct(val); } optional_base ( bool cond, argument_type val ) : m_initialized(false) { if ( cond ) construct(val); } optional_base ( optional_base const& rhs ) : m_initialized(false) { if ( rhs.is_initialized() ) construct(rhs.get_impl()); } template explicit optional_base ( Expr const& expr, Expr const* tag ) : m_initialized(false) { construct(expr,tag); } ~optional_base() { destroy() ; } void assign ( optional_base const& rhs ) { if (is_initialized()) { if ( rhs.is_initialized() ) assign_value(rhs.get_impl(), is_reference_predicate() ); else destroy(); } else { if ( rhs.is_initialized() ) construct(rhs.get_impl()); } } template void assign ( optional const& rhs ) { if (is_initialized()) { if ( rhs.is_initialized() ) assign_value(static_cast(rhs.get()), is_reference_predicate() ); else destroy(); } else { if ( rhs.is_initialized() ) construct(static_cast(rhs.get())); } } void assign ( argument_type val ) { if (is_initialized()) assign_value(val, is_reference_predicate() ); else construct(val); } void assign ( none_t ) { destroy(); } template void assign_expr ( Expr const& expr, Expr const* tag ) { if (is_initialized()) assign_expr_to_initialized(expr,tag); else construct(expr,tag); } public : void reset() { destroy(); } void reset ( argument_type val ) { assign(val); } pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } bool is_initialized() const { return m_initialized ; } protected : void construct ( argument_type val ) { new (m_storage.address()) internal_type(val) ; m_initialized = true ; } template void construct ( Expr const& factory, in_place_factory_base const* ) { static_assert(::boost::mpl::not_::value, "::boost::mpl::not_::value") ; boost_optional_detail::construct(factory, m_storage.address()); m_initialized = true ; } template void construct ( Expr const& factory, typed_in_place_factory_base const* ) { static_assert(::boost::mpl::not_::value, "::boost::mpl::not_::value") ; factory.apply(m_storage.address()) ; m_initialized = true ; } template void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag ) { destroy(); construct(factory,tag); } template void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag ) { destroy(); construct(factory,tag); } template void construct ( Expr const& expr, void const* ) { new (m_storage.address()) internal_type(expr) ; m_initialized = true ; } template void assign_expr_to_initialized ( Expr const& expr, void const* ) { assign_value(expr, is_reference_predicate()); } # 433 "/localhome/glisse2/include/boost/optional/optional.hpp" void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; } void assign_value ( argument_type val, is_reference_tag ) { construct(val); } void destroy() { if ( m_initialized ) destroy_impl(is_reference_predicate()) ; } unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; } reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; } reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; } pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; } pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; } private : internal_type const* get_object() const { union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() }; return caster.as_ptype; } internal_type * get_object() { union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() }; return caster.as_ptype; } reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; } reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; } reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; } reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; } void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } void destroy_impl ( is_reference_tag ) { m_initialized = false ; } pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; } pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; } pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; } pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; } bool m_initialized ; storage_type m_storage ; } ; } template class optional : public optional_detail::optional_base { typedef optional_detail::optional_base base ; typedef typename base::unspecified_bool_type unspecified_bool_type ; public : typedef optional this_type ; typedef typename base::value_type value_type ; typedef typename base::reference_type reference_type ; typedef typename base::reference_const_type reference_const_type ; typedef typename base::pointer_type pointer_type ; typedef typename base::pointer_const_type pointer_const_type ; typedef typename base::argument_type argument_type ; optional() : base() {} optional( none_t none_ ) : base(none_) {} optional ( argument_type val ) : base(val) {} optional ( bool cond, argument_type val ) : base(cond,val) {} template explicit optional ( optional const& rhs ) : base() { if ( rhs.is_initialized() ) this->construct(rhs.get()); } # 558 "/localhome/glisse2/include/boost/optional/optional.hpp" template explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {} optional ( optional const& rhs ) : base( static_cast(rhs) ) {} ~optional() {} template optional& operator= ( Expr const& expr ) { this->assign_expr(expr,boost::addressof(expr)); return *this ; } template optional& operator= ( optional const& rhs ) { this->assign(rhs); return *this ; } optional& operator= ( optional const& rhs ) { this->assign( static_cast(rhs) ) ; return *this ; } optional& operator= ( argument_type val ) { this->assign( val ) ; return *this ; } optional& operator= ( none_t none_ ) { this->assign( none_ ) ; return *this ; } void swap( optional & arg ) { using boost::swap; swap(*this, arg); } reference_const_type get() const { ((this->is_initialized()) ? static_cast (0) : __assert_fail ("this->is_initialized()", "/localhome/glisse2/include/boost/optional/optional.hpp", 630, __PRETTY_FUNCTION__)) ; return this->get_impl(); } reference_type get() { ((this->is_initialized()) ? static_cast (0) : __assert_fail ("this->is_initialized()", "/localhome/glisse2/include/boost/optional/optional.hpp", 631, __PRETTY_FUNCTION__)) ; return this->get_impl(); } reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } pointer_const_type operator->() const { ((this->is_initialized()) ? static_cast (0) : __assert_fail ("this->is_initialized()", "/localhome/glisse2/include/boost/optional/optional.hpp", 640, __PRETTY_FUNCTION__)) ; return this->get_ptr_impl() ; } pointer_type operator->() { ((this->is_initialized()) ? static_cast (0) : __assert_fail ("this->is_initialized()", "/localhome/glisse2/include/boost/optional/optional.hpp", 641, __PRETTY_FUNCTION__)) ; return this->get_ptr_impl() ; } reference_const_type operator *() const { return this->get() ; } reference_type operator *() { return this->get() ; } operator unspecified_bool_type() const { return this->safe_bool() ; } bool operator!() const { return !this->is_initialized() ; } } ; template inline optional make_optional ( T const& v ) { return optional(v); } template inline optional make_optional ( bool cond, T const& v ) { return optional(cond,v); } template inline typename optional::reference_const_type get ( optional const& opt ) { return opt.get() ; } template inline typename optional::reference_type get ( optional& opt ) { return opt.get() ; } template inline typename optional::pointer_const_type get ( optional const* opt ) { return opt->get_ptr() ; } template inline typename optional::pointer_type get ( optional* opt ) { return opt->get_ptr() ; } template inline typename optional::reference_const_type get_optional_value_or ( optional const& opt, typename optional::reference_const_type v ) { return opt.get_value_or(v) ; } template inline typename optional::reference_type get_optional_value_or ( optional& opt, typename optional::reference_type v ) { return opt.get_value_or(v) ; } template inline typename optional::pointer_const_type get_pointer ( optional const& opt ) { return opt.get_ptr() ; } template inline typename optional::pointer_type get_pointer ( optional& opt ) { return opt.get_ptr() ; } # 754 "/localhome/glisse2/include/boost/optional/optional.hpp" template inline bool operator == ( optional const& x, optional const& y ) { return equal_pointees(x,y); } template inline bool operator < ( optional const& x, optional const& y ) { return less_pointees(x,y); } template inline bool operator != ( optional const& x, optional const& y ) { return !( x == y ) ; } template inline bool operator > ( optional const& x, optional const& y ) { return y < x ; } template inline bool operator <= ( optional const& x, optional const& y ) { return !( y < x ) ; } template inline bool operator >= ( optional const& x, optional const& y ) { return !( x < y ) ; } template inline bool operator == ( optional const& x, T const& y ) { return equal_pointees(x, optional(y)); } template inline bool operator < ( optional const& x, T const& y ) { return less_pointees(x, optional(y)); } template inline bool operator != ( optional const& x, T const& y ) { return !( x == y ) ; } template inline bool operator > ( optional const& x, T const& y ) { return y < x ; } template inline bool operator <= ( optional const& x, T const& y ) { return !( y < x ) ; } template inline bool operator >= ( optional const& x, T const& y ) { return !( x < y ) ; } template inline bool operator == ( T const& x, optional const& y ) { return equal_pointees( optional(x), y ); } template inline bool operator < ( T const& x, optional const& y ) { return less_pointees( optional(x), y ); } template inline bool operator != ( T const& x, optional const& y ) { return !( x == y ) ; } template inline bool operator > ( T const& x, optional const& y ) { return y < x ; } template inline bool operator <= ( T const& x, optional const& y ) { return !( y < x ) ; } template inline bool operator >= ( T const& x, optional const& y ) { return !( x < y ) ; } template inline bool operator == ( optional const& x, none_t ) { return equal_pointees(x, optional() ); } template inline bool operator < ( optional const& x, none_t ) { return less_pointees(x,optional() ); } template inline bool operator != ( optional const& x, none_t y ) { return !( x == y ) ; } template inline bool operator > ( optional const& x, none_t y ) { return y < x ; } template inline bool operator <= ( optional const& x, none_t y ) { return !( y < x ) ; } template inline bool operator >= ( optional const& x, none_t y ) { return !( x < y ) ; } template inline bool operator == ( none_t x, optional const& y ) { return equal_pointees(optional() ,y); } template inline bool operator < ( none_t x, optional const& y ) { return less_pointees(optional() ,y); } template inline bool operator != ( none_t x, optional const& y ) { return !( x == y ) ; } template inline bool operator > ( none_t x, optional const& y ) { return y < x ; } template inline bool operator <= ( none_t x, optional const& y ) { return !( y < x ) ; } template inline bool operator >= ( none_t x, optional const& y ) { return !( x < y ) ; } namespace optional_detail { template struct swap_selector; template<> struct swap_selector { template static void optional_swap ( optional& x, optional& y ) { const bool hasX = !!x; const bool hasY = !!y; if ( !hasX && !hasY ) return; if( !hasX ) x = boost::in_place(); else if ( !hasY ) y = boost::in_place(); boost::swap(x.get(),y.get()); if( !hasX ) y = boost::none ; else if( !hasY ) x = boost::none ; } }; template<> struct swap_selector { template static void optional_swap ( optional& x, optional& y ) { const bool hasX = !!x; const bool hasY = !!y; if ( !hasX && hasY ) { x = y.get(); y = boost::none ; } else if ( hasX && !hasY ) { y = x.get(); x = boost::none ; } else if ( hasX && hasY ) { boost::swap(x.get(),y.get()); } } }; } template struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor {} ; template inline void swap ( optional& x, optional& y ) { optional_detail::swap_selector::value>::optional_swap(x, y); } } # 16 "/localhome/glisse2/include/boost/optional.hpp" 2 # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h" 2 namespace CGAL { template void output_maple(std::ostream&, const Sqrt_extension&); # 79 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h" namespace internal { template class Interval_optional_caching; template <> class Interval_optional_caching< ::CGAL::Tag_false > { protected: void invalidate_interval() {} bool is_cached() const {return false;} std::pair cached_value() const {return std::pair();} void update_cached_value(const std::pair&) const {} }; template <> class Interval_optional_caching< ::CGAL::Tag_true > { protected: typedef boost::optional< std::pair > Cached_interval; mutable Cached_interval interval_; void invalidate_interval() {interval_=Cached_interval();} bool is_cached() const {return (interval_?true:false);} std::pair cached_value() const {return *interval_;} void update_cached_value(const std::pair& i) const {interval_=i;} }; } template class Sqrt_extension : public internal::Interval_optional_caching, boost::ordered_field_operators1< Sqrt_extension, boost::ordered_field_operators2< Sqrt_extension, NT_ , boost::ordered_field_operators2< Sqrt_extension, typename First_if_different::Type > > >{ public: typedef NT_ NT; typedef ROOT_ ROOT; typedef ACDE_TAG_ ACDE_TAG; typedef Sqrt_extension Self; private: NT a0_; NT a1_; ROOT root_; bool is_extended_; typedef CGAL::Algebraic_structure_traits Algebraic_structure_traits_nt; typedef CGAL::Real_embeddable_traits Real_embeddable_traits_nt; typedef typename CGAL::Coercion_traits< ROOT, NT >::Cast Root_nt_cast; public: Sqrt_extension() : a0_( NT(0)), a1_( NT(0)), root_(ROOT(0)), is_extended_(false) {} Sqrt_extension(typename First_if_different::Type i) : a0_(NT(i)), a1_(NT(0)), root_(ROOT(0)), is_extended_(false) {} Sqrt_extension(const NT& i) : a0_(NT(i)), a1_(NT(0)), root_(ROOT(0)), is_extended_(false) {} Sqrt_extension(const ROOT& root,bool) :a0_(NT(0)), a1_(NT(1)), root_(root), is_extended_(true) {} template explicit Sqrt_extension(const NTX& i) : a0_(NT(i)), a1_(NT(0)), root_(ROOT(0)), is_extended_(false) {} Sqrt_extension(const Self& x) : a0_(x.a0()), a1_(x.a1()), root_(x.root()), is_extended_(x.is_extended()){} # 175 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h" template explicit Sqrt_extension(const NTX& a0, const NTX& a1, const ROOTX& root) : a0_(a0), a1_(a1), root_(root), is_extended_( true ){ (CGAL::possibly(ACDE_TAG_::value || !::CGAL:: is_zero(root))?(static_cast(0)): ::CGAL::precondition_fail( "ACDE_TAG_::value || !CGAL_NTS is_zero(root)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 181)); } template explicit Sqrt_extension(const NTX& a, const NTX& b, const NTX& c, const bool is_smaller, typename boost::enable_if< boost::mpl::and_< boost::is_same< typename Fraction_traits::Numerator_type,NTX >, boost::is_same< typename Fraction_traits::Numerator_type,NTX > > >::type* = 0 ) { typename Fraction_traits::Compose compose_nt; if ( a != 0 ) { a0_ = compose_nt(-b,2*a); root_ = ::CGAL:: square(a0_) - ROOT(c,a); if(::CGAL:: is_zero(root_)) { is_extended_ = false; } else { a1_ = (is_smaller ? -1 : 1); is_extended_ = true; } } else { (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::assertion_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 208)); is_extended_ = false; a0_ = compose_nt(-c,b); a1_ = 0; root_ = 0; } } Self conjugate() const { if(!is_extended_) return *this; return Self(a0_,-a1_,root_); } inline const NT& a0() const { return a0_; } inline const NT& alpha() const { return a0_; } NT& a0() { return a0_; } NT& alpha() { return a0_; } inline const NT& a1() const { return a1_; } inline const NT& beta() const { return a1_; } NT& a1() { return a1_; } NT& beta() { return a1_; } inline const ROOT& root() const { return root_; } inline const ROOT& gamma() const { return root_; } inline const bool& is_extended() const { return is_extended_; } inline bool is_rational() const { (CGAL::possibly((boost::is_same::value) || !"NT and ROOT should be identical and rational")?(static_cast(0)): ::CGAL::precondition_fail( "(boost::is_same::value) || !\"NT and ROOT should be identical and rational\"" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 241)); return !is_extended_;} inline bool check_if_is_extended() { if(::CGAL:: is_zero(a1_) || ::CGAL:: is_zero(root_)) is_extended_ = false; return is_extended_; } static void check_roots(const Self& a, const Self& b ) { if(a.is_extended() && b.is_extended()) (CGAL::possibly(a.root() == b.root())?(static_cast(0)): ::CGAL::precondition_fail( "a.root() == b.root()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 257)); } inline void output_maple(std::ostream& os ) const { CGAL::output_maple( os, *this ); } std::pair compute_to_interval() const { if (! is_extended_) return ::CGAL:: to_interval(a0_); CGAL::Interval_nt::Protector p; const CGAL::Interval_nt& a0_int = ::CGAL:: to_interval(a0_); const CGAL::Interval_nt& a1_int = ::CGAL:: to_interval(a1_); const CGAL::Interval_nt& root_int = ::CGAL:: to_interval(root_); const CGAL::Interval_nt& x_int = a0_int + (a1_int * CGAL::sqrt(root_int)); std::pair res(x_int.inf(), x_int.sup()); this->update_cached_value(res); return res; } std::pair to_interval() const { std::pair ret=this->is_cached()?this->cached_value():compute_to_interval(); return ret; } void simplify(){ if(is_extended_){ if(::CGAL:: is_zero(a1_)){ is_extended_ = false; }else{ ::CGAL:: simplify(a1_); ::CGAL:: simplify(root_); } } ::CGAL:: simplify(a0_); } ::CGAL::Sign sign_() const { ::CGAL::Sign s0,s1; s0 = ::CGAL:: sign(a0_); s1 = ::CGAL:: sign(a1_); if (s0 == s1) return s0; if (s0 == CGAL::ZERO) return s1; if (s1 == CGAL::ZERO) return s0; NT r = a1_*a1_*Root_nt_cast()(root_) - a0_*a0_; if (s1 == CGAL::POSITIVE) return ::CGAL:: sign(r); else return CGAL::opposite (::CGAL:: sign(r)); } ::CGAL::Sign sign() const { if (! is_extended_) return ::CGAL:: sign(a0()); if (FP_TAG::value){ const std::pair& x_in = this->to_interval(); if (x_in.first > 0) return (CGAL::POSITIVE); else if (x_in.second < 0) return (CGAL::NEGATIVE); } return (this->sign_()); } template < class BOOL_TAG > bool is_zero_(const BOOL_TAG&) const{ return sign()==CGAL::ZERO; } bool is_zero_(const CGAL::Tag_false) const { if(is_extended()){ if(a0() == (NT)0 && a1()== (NT)0) { return true; }else{ return (a0()*a0()-a1()*a1()*(NT)root() == NT(0)); } }else{ return a0() == NT(0); } } bool is_zero() const { typedef typename Real_embeddable_traits_nt::Is_real_embeddable Is_real_embeddable; return is_zero_(Is_real_embeddable()); } Self abs() const { if (sign() == CGAL::NEGATIVE) return -*this; return *this; } Self& operator += (const Self& p) { this->invalidate_interval(); if(is_extended_){ if (p.is_extended_){ Self::check_roots(*this, p); return *this = Self (a0_+p.a0_, a1_+p.a1_, root_); }else{ return *this = Self (a0_+p.a0_, a1_, root_); } }else{ if (p.is_extended_) return *this = Self (a0_+p.a0_, p.a1_, p.root_); else return *this = Self (a0_+p.a0_); } } Self& operator -= (const Self& p) { this->invalidate_interval(); if(is_extended_){ if (p.is_extended_){ Self::check_roots(*this, p); return *this = Self (a0_-p.a0_, a1_-p.a1_, root_); }else{ return *this = Self (a0_-p.a0_, a1_, root_); } }else{ if (p.is_extended_) return *this = Self (a0_-p.a0_, -p.a1_, p.root_); else return *this = Self (a0_-p.a0_); } } Self& operator *= (const Self& p){ this->invalidate_interval(); if(is_extended_){ if (p.is_extended_){ Self::check_roots(*this, p); return *this = Self ( a0_*p.a0_+a1_*p.a1_*Root_nt_cast()(root_), a0_*p.a1_+a1_*p.a0_, root_); }else{ return *this = Self (a0_*p.a0_, a1_*p.a0_, root_); } }else{ if (p.is_extended_) return *this = Self (a0_*p.a0_, a0_*p.a1_, p.root_); else return *this = Self (a0_*p.a0_); } } Self& operator /= (const Self& p) { this->invalidate_interval(); (CGAL::possibly(! ::CGAL:: is_zero(p))?(static_cast(0)): ::CGAL::assertion_fail( "! CGAL_NTS is_zero(p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 435)); typename CGAL::Algebraic_structure_traits::Integral_division idiv; if(p.is_extended_){ NT denom = p.a0_*p.a0_ - p.a1_*p.a1_ * Root_nt_cast()(p.root_); if ( ::CGAL:: is_zero(denom) ) { *this = Self(idiv(a0_, NT(2)*p.a0_) + idiv( a1_, NT(2)*p.a1_)); }else{ *this *= Self(p.a0_,-p.a1_,p.root_); *this = Self( idiv(a0_,denom), idiv(a1_,denom), root_); } }else{ if(is_extended_){ *this = Self(idiv(a0_,p.a0_), idiv(a1_,p.a0_), root_); }else{ *this = Self(idiv(a0_,p.a0_)); } } return *this; } Self& operator += (const NT& num) { this->invalidate_interval(); a0() += NT(num); return *this; } Self& operator -= (const NT& num) { this->invalidate_interval(); a0() -= NT(num); return *this; } Self& operator *= (const NT& num) { this->invalidate_interval(); a0() *= NT(num); a1() *= NT(num); return *this; } Self& operator /= (const NT& num) { this->invalidate_interval(); (CGAL::possibly(! ::CGAL:: is_zero(num))?(static_cast(0)): ::CGAL::assertion_fail( "! CGAL_NTS is_zero(num)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 479)); a0() /= NT(num); a1() /= NT(num); return *this; } Self& operator += (typename First_if_different::Type num) { this->invalidate_interval(); a0() += NT(num); return *this; } Self& operator -= (typename First_if_different::Type num) { this->invalidate_interval(); a0() -= NT(num); return *this; } Self& operator *= (typename First_if_different::Type num) { this->invalidate_interval(); a0() *= NT(num); a1() *= NT(num); return *this; } Self& operator /= (typename First_if_different::Type num) { this->invalidate_interval(); (CGAL::possibly(! ::CGAL:: is_zero(num))?(static_cast(0)): ::CGAL::assertion_fail( "! CGAL_NTS is_zero(num)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 503)); a0() /= NT(num); a1() /= NT(num); return *this; } CGAL::Comparison_result compare (const typename First_if_different::Type& num) const { return this->compare(NT(num)); } CGAL::Comparison_result compare (const NT& num) const { if (! is_extended_) return (CGAL::compare (a0_, num)); if (FP_TAG::value){ const std::pair& x_in = this->to_interval(); const std::pair& y_in = CGAL::to_interval (num); if (x_in.second < y_in.first) return (SMALLER); else if (x_in.first > y_in.second) return (LARGER); } return ((Self(a0_ - num, a1_, root_)).sign_()); } CGAL::Comparison_result compare(const Self& y, bool in_same_extension = !ACDE_TAG::value ) const { if (! is_extended_) return (CGAL::opposite (y.compare (a0_))); else if (! y.is_extended_) return (this->compare (y.a0_)); if (in_same_extension) return ((*this) - y).sign(); if (FP_TAG::value) { const std::pair& x_in = this->to_interval(); const std::pair& y_in = y.to_interval(); if (x_in.second < y_in.first) return (SMALLER); else if (x_in.first > y_in.second) return (LARGER); } const NT diff_a0 = a0_ - y.a0_; const CGAL::Sign sign_left = CGAL::sign (diff_a0); const NT x_sqr = a1_*a1_ * Root_nt_cast()(root_); const NT y_sqr = y.a1_*y.a1_ * Root_nt_cast()(y.root_); Comparison_result right_res = CGAL::compare (y_sqr, x_sqr); CGAL::Sign sign_right = ZERO; if (right_res == LARGER) { sign_right = CGAL::sign (y.a1_); } else if (right_res == SMALLER) { switch (CGAL::sign (a1_)) { case POSITIVE : sign_right = NEGATIVE; break; case NEGATIVE: sign_right = POSITIVE; break; case ZERO: sign_right = ZERO; break; default: ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Sqrt_extension_type.h", 592 ); } } else { sign_right = CGAL::sign (y.a1_); if (sign_right == CGAL::sign (a1_)) sign_right = ZERO; } if (sign_left == ZERO) { if (sign_right == POSITIVE) return (SMALLER); else if (sign_right == NEGATIVE) return (LARGER); else return (EQUAL); } else if (sign_right == ZERO) { if (sign_left == POSITIVE) return (LARGER); else if (sign_left == NEGATIVE) return (SMALLER); else return (EQUAL); } if (sign_left != sign_right) { if (sign_left == POSITIVE) return (LARGER); else return (SMALLER); } const NT A = diff_a0*diff_a0 - (x_sqr + y_sqr); const NT B = 2 * a1_ * y.a1_; const ROOT C = root_ * y.root_; const CGAL::Sign sgn = (Self(A, B, C)).sign_(); const bool swap_res = (sign_left == NEGATIVE); if (sgn == POSITIVE) return (swap_res ? SMALLER : LARGER); else if (sgn == NEGATIVE) return (swap_res ? LARGER : SMALLER); return (EQUAL); } }; template Sqrt_extension square (const Sqrt_extension& x) { if (!x.is_extended()) return Sqrt_extension (x.alpha() * x.alpha()); return (Sqrt_extension (x.alpha()*x.alpha() + x.beta()*x.beta() * NT(x.gamma()), 2 * x.alpha() * x.beta(), x.gamma())); } template Sqrt_extension operator + (const Sqrt_extension& p) { return p; } template Sqrt_extension operator - (const Sqrt_extension& p){ if(p.is_extended()) return Sqrt_extension(-p.a0(),-p.a1(),p.root()); else return Sqrt_extension(-p.a0()); } template bool operator == (const Sqrt_extension& p1, const Sqrt_extension& p2) { return (p1-p2).is_zero(); } template bool operator == (const Sqrt_extension& p1, const Sqrt_extension& p2) { return ( p1.compare(p2) == CGAL::ZERO ); } template bool operator < (const Sqrt_extension& p1, const Sqrt_extension& p2) { return ( p1.compare(p2) == CGAL::SMALLER ); } template bool operator == (const Sqrt_extension& p, const NT& num) { return (p-num).is_zero();} template bool operator < (const Sqrt_extension& p, const NT& num) { return ( p.compare(num) == CGAL::SMALLER ); } template bool operator > (const Sqrt_extension& p, const NT& num) { return ( p.compare(num) == CGAL::LARGER ); } template bool operator == (const NT& num, const Sqrt_extension& p) { return ( p == num );} template bool operator < (const NT& num, const Sqrt_extension& p) { return ( p.compare(num) == CGAL::LARGER ); } template bool operator > (const NT& num, const Sqrt_extension& p) { return ( p.compare(num) == CGAL::SMALLER ); } template bool operator == (const Sqrt_extension& p, typename First_if_different::Type num) { return (p-num).is_zero();} template bool operator < (const Sqrt_extension& p, typename First_if_different::Type num) { return ( p.compare(num) == CGAL::SMALLER ); } template bool operator > (const Sqrt_extension& p, typename First_if_different::Type num) { return ( p.compare(num) == CGAL::LARGER ); } template bool operator == (typename First_if_different::Type num, const Sqrt_extension& p) { return ( p == num );} template bool operator < (typename First_if_different::Type num, const Sqrt_extension& p) { return ( p.compare(num) == CGAL::LARGER ); } template bool operator > (typename First_if_different::Type num, const Sqrt_extension& p) { return ( p.compare(num) == CGAL::SMALLER ); } template inline Sqrt_extension min ( const Sqrt_extension & x, const Sqrt_extension & y){ return (std::min)(x,y); } template inline Sqrt_extension max ( const Sqrt_extension & x, const Sqrt_extension & y){ return (std::max)(x,y); } template inline CGAL::Comparison_result compare ( const Sqrt_extension& x, const Sqrt_extension& y, bool in_same_extension = !ACDE_TAG::value ){ return x.compare(y,in_same_extension); } template void print(std::ostream &os, const Sqrt_extension &r) { if(!r.is_extended()) { os << "(" << r.a0() << ")"; } else { os << "(" << r.a0() << " + " << r.a1() << "*sqrt(" << r.root() << ")"<< ")"; } } } # 56 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Algebraic_structure_traits.h" namespace CGAL { namespace internal { template< class Type, class Algebraic_type > class Sqrt_extension_algebraic_structure_traits_base; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Integral_domain_without_division_tag > : public Algebraic_structure_traits_base< Type, CGAL::Integral_domain_without_division_tag > { public: typedef CGAL::Integral_domain_without_division_tag Algebraic_category; class Simplify : public std::unary_function< Type&, void > { public: typedef void result_type; typedef Type& argument_type; void operator()( Type& x ) const { x.simplify(); } }; }; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Integral_domain_tag > : public Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Integral_domain_without_division_tag > { public: typedef CGAL::Integral_domain_tag Algebraic_category; class Integral_division : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x,const Type& y ) const { return x/y; } template < class CT_Type_1, class CT_Type_2 > Type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; private: typedef typename Type::NT COEFF; typedef typename Type::ROOT ROOT; typedef typename CGAL::Coercion_traits< ROOT, COEFF >::Cast Root_nt_cast; typedef CGAL::Algebraic_structure_traits AST_COEFF; typedef typename AST_COEFF::Divides Divides_coeff; public: class Divides : public std::binary_function{ typedef typename Divides_coeff::result_type BOOL; public: BOOL operator()( const Type& x, const Type& y) const { Type q; return (*this)(x,y,q); } BOOL operator()( const Type& x, const Type& y, Type& q) const { Divides_coeff divides; BOOL result; COEFF q1, q2; if(x.is_extended()){ COEFF denom = x.a0()*x.a0() - x.a1()*x.a1() * Root_nt_cast()(x.root()); if ( denom == COEFF(0) ) { result = divides(COEFF(2)*x.a0(),y.a0(),q1); if(!result) return false; result = divides(COEFF(2)*x.a1(),y.a1(),q2); if(!result) return false; q = Type(q1 + q2); }else{ q = y; q *= Type(x.a0(),-x.a1(),x.root()); result = divides(denom,q.a0(),q1); if(!result) return false; result = divides(denom,q.a1(),q2); if(!result) return false; q = Type( q1, q2, y.root()); } }else{ if(y.is_extended()){ result = divides(x.a0(),y.a0(),q1); if(!result) return false; result = divides(x.a0(),y.a1(),q2); if(!result) return false; q = Type(q1, q2, y.root()); }else{ result = divides(x.a0(),y.a0(),q1); if(!result) return false; q = q1; } } if(q*x==y) return true; else return false; } template < class CT_Type_1, class CT_Type_2 > BOOL operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Unique_factorization_domain_tag > : public Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Integral_domain_tag > { }; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Euclidean_ring_tag > : public Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Integral_domain_tag > { }; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Field_tag > : public Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Integral_domain_tag > { public: typedef Field_tag Algebraic_category; class Unit_part : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return( x == Type(0) ? Type(1) : x ); } }; class Inverse : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return Type(1)/x ; } }; }; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Field_with_sqrt_tag > : public Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Field_tag > { }; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Field_with_kth_root_tag > : public Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Field_with_sqrt_tag > { }; template< class Type > class Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Field_with_root_of_tag > : public Sqrt_extension_algebraic_structure_traits_base< Type, CGAL::Field_with_sqrt_tag > { }; } template< class COEFF_, class ROOT_, class ACDE_TAG,class FP_TAG> class Algebraic_structure_traits< Sqrt_extension< COEFF_, ROOT_, ACDE_TAG,FP_TAG > > : public internal::Sqrt_extension_algebraic_structure_traits_base< Sqrt_extension< COEFF_, ROOT_, ACDE_TAG,FP_TAG >, typename Algebraic_structure_traits< COEFF_ >::Algebraic_category > { public: typedef Sqrt_extension< COEFF_, ROOT_, ACDE_TAG,FP_TAG > Type; typedef typename ::boost::mpl::if_c< bool( ::boost::is_same::Is_exact,::CGAL::Tag_true>::value )&& bool( ::boost::is_same::Is_exact,::CGAL::Tag_true>::value ) ,::CGAL::Tag_true,::CGAL::Tag_false>::type Is_exact; typedef typename Algebraic_structure_traits::Is_numerical_sensitive Is_numerical_sensitive; }; } # 57 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Real_embeddable_traits.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Real_embeddable_traits.h" namespace CGAL { template< class COEFF, class ROOT, class ACDE_TAG, class FP_TAG > class Real_embeddable_traits< Sqrt_extension > : public INTERN_RET::Real_embeddable_traits_base< Sqrt_extension, typename Real_embeddable_traits::Is_real_embeddable > { public: typedef Sqrt_extension Type; class Sgn : public std::unary_function< Type, ::CGAL::Sign >{ public: ::CGAL::Sign operator()( const Type& x ) const { return x.sign(); } }; class Compare : public std::binary_function< Type, Type, Comparison_result > { public: Comparison_result operator()( const Type& x, const Type& y) const { return x.compare(y); } Comparison_result operator()( const Type& x, const COEFF& y) const { return x.compare(y); } Comparison_result operator()( const COEFF& x, const Type& y) const { return CGAL::opposite( y.compare(x) ); } template < class CT_Type_1, class CT_Type_2 > Comparison_result operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()(const Type& x) const { return x.to_interval(); } }; class To_double : public std::unary_function< Type, double > { public: double operator()(const Type& x) const { if(x.is_extended()){ return to_double(x.a0()) + to_double(x.a1()) * (std::sqrt) (to_double(x.root())); }else{ return ::CGAL:: to_double(x.a0()); } } }; }; } # 58 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Fraction_traits.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Fraction_traits.h" namespace CGAL { # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Fraction_traits.h" namespace Intern{ template class Sqrt_ext_Ftr_base_2; template class Sqrt_ext_Ftr_base_1; } # 60 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Fraction_traits.h" template class Fraction_traits< Sqrt_extension > : public Intern::Sqrt_ext_Ftr_base_1< Sqrt_extension, typename CGAL::Fraction_traits::Is_fraction > { }; namespace Intern { template class Sqrt_ext_Ftr_base_2< NT_, false > { public: typedef NT_ NT; typedef ::CGAL::Tag_false Is_fraction; typedef ::CGAL::Null_tag Numerator_type; typedef ::CGAL::Null_tag Denominator_type; typedef ::CGAL::Null_tag Common_factor; typedef ::CGAL::Null_tag Decompose; typedef ::CGAL::Null_tag Compose; }; template class Sqrt_ext_Ftr_base_2< Sqrt_extension, true > { private: typedef Fraction_traits CFT; public: typedef Sqrt_extension NT; typedef CGAL::Tag_true Is_fraction; typedef Sqrt_extension Numerator_type; typedef typename CFT::Denominator_type Denominator_type; typedef typename Algebraic_structure_traits::Gcd Common_factor; class Decompose { public: typedef NT first_argument_type; typedef Numerator_type second_argument_type; typedef Denominator_type& third_argument_type; void operator () (const NT& ext, Numerator_type& num, Denominator_type& den){ typename CFT::Decompose decompose; typename CFT::Common_factor common_factor; typedef typename CFT::Numerator_type NUM; typedef typename CFT::Denominator_type DEN; if(ext.is_extended()){ NUM a0_num, a1_num; DEN a0_den, a1_den; DEN common_den; decompose(ext.a0(),a0_num,a0_den); decompose(ext.a1(),a1_num,a1_den); common_den=common_factor(a0_den,a1_den); typename CGAL::Coercion_traits::Cast cast; a0_num = cast(a0_num) * cast(CGAL::integral_division(a1_den,common_den)); a1_num = cast(a1_num) * cast(CGAL::integral_division(a0_den,common_den)); den = CGAL::integral_division(a0_den,common_den)*a1_den; num = Numerator_type(a0_num,a1_num,ext.root()); }else{ NUM a0_num; decompose(ext.a0(),a0_num,den); num = Numerator_type(a0_num); } } }; class Compose { public: typedef Numerator_type first_argument_type; typedef Denominator_type second_argument_type; typedef NT result_type; NT operator () (const Numerator_type& num, const Denominator_type& den){ if(num.is_extended()){ typename CFT::Compose compose; COEFF a0=compose(num.a0(),den); COEFF a1=compose(num.a1(),den); return NT(a0,a1,num.root()); }else{ typename CFT::Compose compose; COEFF a0=compose(num.a0(),den); return NT(a0); } } }; }; template class Sqrt_ext_Ftr_base_1; template class Sqrt_ext_Ftr_base_1< Sqrt_extension, CGAL::Tag_true > : public Sqrt_ext_Ftr_base_2< Sqrt_extension, ::boost::is_same< typename CGAL::Coercion_traits::Numerator_type>::Type, typename CGAL::Fraction_traits::Numerator_type>::value > { }; template class Sqrt_ext_Ftr_base_1< Sqrt_extension, CGAL::Tag_false > : public Sqrt_ext_Ftr_base_2< Sqrt_extension, false> { }; } # 232 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Fraction_traits.h" } # 59 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Coercion_traits.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Coercion_traits.h" namespace CGAL { template struct Coercion_traits_for_level,typename First_if_different::Type,CTL_SQRT_EXT>{ public: typedef Sqrt_extension Type; typedef CGAL::Tag_true Are_explicit_interoperable; typedef CGAL::Tag_true Are_implicit_interoperable; struct Cast{ typedef Type result_type; Type operator()(const Type& x) const { return x;} Type operator()(int x) const { return Type(x);} }; }; template struct Coercion_traits_for_level::Type, Sqrt_extension,CTL_SQRT_EXT> : public Coercion_traits_for_level,typename First_if_different::Type,CTL_SQRT_EXT>{}; template struct Coercion_traits_for_level,COEFF,CTL_SQRT_EXT>{ public: typedef Sqrt_extension Type; typedef CGAL::Tag_true Are_explicit_interoperable; typedef CGAL::Tag_true Are_implicit_interoperable; struct Cast{ typedef Type result_type; Type operator()(const Type& x) const { return x;} Type operator()(COEFF x) const { return Type(x);} }; }; template struct Coercion_traits_for_level,CTL_SQRT_EXT> : public Coercion_traits_for_level,COEFF,CTL_SQRT_EXT>{}; template struct Coercion_traits_for_level, Sqrt_extension, CTL_SQRT_EXT>{ private: typedef Coercion_traits CT; typedef Sqrt_extension A; typedef Sqrt_extension B; public: typedef CGAL::Tag_true Are_explicit_interoperable; typedef CGAL::Tag_false Are_implicit_interoperable; typedef Sqrt_extension Type; struct Cast{ private: inline Type cast(const Type& x) const{ return x; } template inline Type cast(const T& x) const{ typename CT::Cast cast; if (x.is_extended()) { return result_type(cast(x.a0()),cast(x.a1()),x.root()); } else { return result_type(cast(x.a0())); } } public: typedef Type result_type; Type operator()(const A& x) const { return cast(x);} Type operator()(const B& x) const { return cast(x);} }; }; template struct Coercion_traits_for_level,ROOT_2,ACDE_TAG,FP_TAG>, Sqrt_extension, CTL_SQRT_EXT>{ private: typedef Sqrt_extension, ROOT_2,ACDE_TAG,FP_TAG> A; typedef Sqrt_extension B; public: typedef CGAL::Tag_true Are_explicit_interoperable; typedef CGAL::Tag_true Are_implicit_interoperable; typedef Sqrt_extension, ROOT_2,ACDE_TAG,FP_TAG> Type; struct Cast{ typedef Type result_type; Type operator()(const A& x) const { return x;} Type operator()(const B& x) const { return Type(x);} }; }; template struct Coercion_traits_for_level < Sqrt_extension, Sqrt_extension, ROOT_2, ACDE_TAG,FP_TAG> ,CTL_SQRT_EXT> :public Coercion_traits_for_level < Sqrt_extension, ROOT_2, ACDE_TAG,FP_TAG>, Sqrt_extension ,CTL_SQRT_EXT> {}; template struct Coercion_traits_for_level < Sqrt_extension, ROOT_1, ACDE_TAG,FP_TAG>, Sqrt_extension ,CTL_SQRT_EXT>{ private: typedef Sqrt_extension, ROOT_1,ACDE_TAG,FP_TAG> A; typedef Sqrt_extension B; public: typedef CGAL::Tag_true Are_explicit_interoperable; typedef CGAL::Tag_true Are_implicit_interoperable; typedef Sqrt_extension, ROOT_1, ACDE_TAG,FP_TAG> Type; struct Cast{ typedef Type result_type; Type operator()(const A& x) const { return x;} Type operator()(const B& x) const { return Type(x);} }; }; template struct Coercion_traits_for_level < Sqrt_extension, Sqrt_extension, ROOT_1,ACDE_TAG,FP_TAG> ,CTL_SQRT_EXT> :public Coercion_traits_for_level < Sqrt_extension, ROOT_1,ACDE_TAG,FP_TAG>, Sqrt_extension ,CTL_SQRT_EXT> {}; namespace INTERN_CT{ template struct CT_ext_to_fwsqrt; template struct CT_ext_not_to_fwsqrt; } template struct Coercion_traits_for_level, B , CTL_SQRT_EXT> :public ::boost::mpl::if_c< ::boost::is_base_and_derived< Field_with_sqrt_tag, typename Algebraic_structure_traits::Algebraic_category >::value || ::boost::is_same< Field_with_sqrt_tag, typename Algebraic_structure_traits::Algebraic_category >::value , INTERN_CT::CT_ext_to_fwsqrt, B> , INTERN_CT::CT_ext_not_to_fwsqrt< Sqrt_extension ,B> >::type {}; template struct Coercion_traits_for_level ,CTL_SQRT_EXT > :public Coercion_traits_for_level,B,CTL_SQRT_EXT> {}; namespace INTERN_CT{ template struct CT_ext_to_fwsqrt, FieldWithSqrt>{ private: typedef Sqrt_extension A; typedef FieldWithSqrt B; public: typedef CGAL::Tag_true Are_explicit_interoperable; typedef CGAL::Tag_false Are_implicit_interoperable; typedef FieldWithSqrt Type; struct Cast{ typedef Type result_type; Type operator()(const A& x) const { typedef Coercion_traits CT_coeff; typedef Coercion_traits CT_root; typename CT_coeff::Cast coeff_cast; typename CT_root::Cast root_cast; if (x.is_extended()) { typename CGAL::Algebraic_structure_traits< typename CT_root::Type>::Sqrt sqrt; return coeff_cast(x.a0())+ coeff_cast(x.a1())* sqrt(root_cast(x.root())); } else { return coeff_cast(x.a0()); } } Type operator()(const B& x) const { return x;} }; }; template struct CT_ext_not_to_fwsqrt, B_>{ private: typedef Sqrt_extension A; typedef B_ B; typedef Coercion_traits CT; public: typedef CGAL::Tag_true Are_explicit_interoperable; typedef CGAL::Tag_false Are_implicit_interoperable; typedef Sqrt_extension Type; struct Cast{ typedef Type result_type; Type operator()(const A& x) const { typename CT::Cast cast; if (x.is_extended()) { return Type(cast(x.a0()),cast(x.a1()),x.root()); } else { return Type(cast(x.a0())); } } Type operator()(const B& x) const { typename CT::Cast cast; return Type(cast(x)); } }; }; } } # 60 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Modular_traits.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Modular_traits.h" namespace CGAL { template< class COEFF, class ROOT, class ACDE_TAG, class FP_TAG> class Modular_traits< Sqrt_extension > { private: typedef Sqrt_extension EXT; typedef Modular_traits MT_COEFF; typedef Modular_traits MT_ROOT; typedef typename MT_COEFF::Residue_type Residue_type_coeff; typedef typename MT_ROOT::Residue_type Residue_type_root; public: typedef EXT NT; typedef typename MT_COEFF::Is_modularizable Is_modularizable; typedef Sqrt_extension Residue_type; struct Modular_image{ Residue_type operator()(const EXT& a){ typename MT_ROOT::Modular_image mod_image_root; typename MT_COEFF::Modular_image mod_image_coeff; Residue_type_root root_mod = mod_image_root(a.root()); if(root_mod != Residue_type_root(0)){ return Residue_type(mod_image_coeff(a.a0()), mod_image_coeff(a.a1()), root_mod); }else{ return Residue_type(mod_image_coeff(a.a0())); } } }; struct Modular_image_representative{ NT operator()(const Residue_type& a){ typename MT_ROOT::Modular_image_representative mod_image_inv_root; typename MT_COEFF::Modular_image_representative mod_image_inv_coeff; if(a.is_extended()){ return NT( mod_image_inv_coeff(a.a0()), mod_image_inv_coeff(a.a1()), mod_image_inv_root(a.root())); }else{ return NT(mod_image_inv_coeff(a.a0())); } } }; }; } # 61 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Scalar_factor_traits.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Scalar_factor_traits.h" namespace CGAL { template class Scalar_factor_traits< Sqrt_extension > { public: typedef Sqrt_extension NT; typedef typename Scalar_factor_traits::Scalar Scalar; class Scalar_factor { public: typedef NT argument_type; typedef NT first_argument_type; typedef Scalar second_argument_type; typedef Scalar result_type; Scalar operator () (const NT& x, const Scalar& d_ = Scalar(0) ) { typename Scalar_factor_traits::Scalar_factor sfac; Scalar d(d_); Scalar unity(1); if(d==unity) return d; d=sfac(x.a0(),d); if(d==unity) return d; if(x.is_extended()) d=sfac(x.a1(),d); return d; } }; class Scalar_div { public: typedef NT first_argument_type; typedef Scalar second_argument_type; void operator () (NT& a, const Scalar& b) { (CGAL::possibly(b != Scalar(0))?(static_cast(0)): ::CGAL::precondition_fail( "b != Scalar(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Scalar_factor_traits.h", 75)); typename Scalar_factor_traits::Scalar_div sdiv; sdiv(a.a0(), b); sdiv(a.a1(), b); } }; }; } # 62 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h" namespace CGAL { template class Algebraic_extension_traits > { template class Standardise { public: typedef Type_ argument_type; typedef Type_ result_type; Type_ operator () (const Type_&) const { return Type_(1); } }; template class Standardise > { Standardise standardise; public: typedef CGAL::Sqrt_extension Type_; typedef Type_ argument_type; typedef Type_ result_type; Type_ operator () (const Type_& a) const { if (a.a1() != COEFF_(0)){ return Type_(standardise(a.a0()),standardise(a.a1()),a.root()); }else{ return Type_(standardise(a.a0())); } } }; public: typedef CGAL::Sqrt_extension Type; typedef ::CGAL::Tag_true Is_extended; class Normalization_factor{ public: typedef Type argument_type; typedef Type result_type; Type operator () (const Type& a) { typedef Algebraic_extension_traits SET; typename SET::Normalization_factor normalization_factor; (CGAL::possibly(a != Type(0))?(static_cast(0)): ::CGAL::precondition_fail( "a != Type(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h", 82)); Type result; if(a.is_extended() && a.a1() != COEFF(0) ){ Type tmp1(a.a0(),-a.a1(),a.root()); Type tmp2= a*tmp1; (CGAL::possibly(tmp2.a1()==COEFF(0))?(static_cast(0)): ::CGAL::postcondition_fail( "tmp2.a1()==COEFF(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h", 88)); result = tmp1*Type(normalization_factor(tmp2.a0())); (CGAL::possibly(result.a1() != COEFF(0))?(static_cast(0)): ::CGAL::postcondition_fail( "result.a1() != COEFF(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h", 90)); }else{ result = Type(normalization_factor(a.a0())); } return result; } }; class Denominator_for_algebraic_integers { public: typedef Type argument_type; typedef Type result_type; public: Type operator () (const Type& a) { typedef Algebraic_extension_traits AET; typename AET::Denominator_for_algebraic_integers dfai; Standardise standardise; if (a.a1() != COEFF(0)) { COEFF tmp = standardise(a.a0()) + standardise(a.a1()) + standardise(COEFF(a.root())); return Type(COEFF(4) * COEFF(a.root()))* Type(dfai(tmp)); } else { return Type(dfai(a.a0())); }; } template Type operator () (InputIterator begin, InputIterator end) { Type a = std::accumulate(::boost::make_transform_iterator(begin,Standardise()), ::boost::make_transform_iterator(end ,Standardise()), Type(0)); return (*this)(a); } }; }; } # 63 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/extended_euclidean_algorithm.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/extended_euclidean_algorithm.h" namespace CGAL { # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/extended_euclidean_algorithm.h" template< class AS > AS extended_euclidean_algorithm(const AS& f, const AS& g, AS& s_, AS& t_){ typename Algebraic_structure_traits::Integral_division idiv; typename Algebraic_structure_traits::Div div; typename Algebraic_structure_traits::Unit_part unit_part; std::vector p,r,s,t,q; p.push_back(unit_part(f)); r.push_back(idiv(f,p[0])); s.push_back(idiv(AS(1),p[0])); t.push_back(AS(0)); q.push_back(AS(0)); p.push_back(unit_part(g)); r.push_back(idiv(g,p[1])); s.push_back(AS(0)); t.push_back(idiv(AS(1),p[1])); int i = 1; while(!is_zero(r[i])){ q.push_back(div(r[i-1],r[i])); r.push_back(r[i-1]-q[i]*r[i]); p.push_back(unit_part(r[i+1])); r[i+1] = idiv(r[i+1],p[i+1]); s.push_back(idiv(s[i-1]-q[i]*s[i],p[i+1])); t.push_back(idiv(t[i-1]-q[i]*t[i],p[i+1])); i++; } s_=s[i-1]; t_=t[i-1]; AS h = r[i-1]; (CGAL::possibly(h == f*s_ + g*t_)?(static_cast(0)): ::CGAL::precondition_fail( "h == f*s_ + g*t_" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/extended_euclidean_algorithm.h", 71)); return h; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h" 2 namespace CGAL{ namespace internal{ template class Chinese_remainder_traits_base{ public: typedef T_ Type; typedef ::CGAL::Null_tag Scalar_type; typedef ::CGAL::Null_functor Chinese_remainder; }; } template class Chinese_remainder_traits :public internal::Chinese_remainder_traits_base::Algebraic_category>{}; namespace internal { template class Chinese_remainder_traits_base{ public: typedef NT Type; typedef NT Scalar_type; struct Chinese_remainder{ void operator() ( const Scalar_type& m1, const Scalar_type& m2, const Scalar_type& m, const Scalar_type& s, const Scalar_type& t, NT u1, NT u2, NT& u) const { NT tmp,s_,t_; tmp = CGAL::extended_euclidean_algorithm(m1,m2,s_,t_); (CGAL::possibly(tmp == NT(1))?(static_cast(0)): ::CGAL::precondition_fail( "tmp == NT(1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 67)); (CGAL::possibly(s_ == s)?(static_cast(0)): ::CGAL::precondition_fail( "s_ == s" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 68)); (CGAL::possibly(t_ == t)?(static_cast(0)): ::CGAL::precondition_fail( "t_ == t" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 69)); typedef Algebraic_structure_traits AST; typename AST::Mod mod; typename AST::Integral_division idiv; if(u1 < NT(0) ) u1 += m1; if(u2 < NT(0) ) u2 += m2; (CGAL::possibly(0 < m1)?(static_cast(0)): ::CGAL::precondition_fail( "0 < m1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 80)); (CGAL::possibly(u1 < m1)?(static_cast(0)): ::CGAL::precondition_fail( "u1 < m1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 81)); (CGAL::possibly(u1 >= NT(0))?(static_cast(0)): ::CGAL::precondition_fail( "u1 >= NT(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 82)); (CGAL::possibly(0 < m2)?(static_cast(0)): ::CGAL::precondition_fail( "0 < m2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 84)); (CGAL::possibly(u2 < m2)?(static_cast(0)): ::CGAL::precondition_fail( "u2 < m2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 85)); (CGAL::possibly(u2 >= NT(0))?(static_cast(0)): ::CGAL::precondition_fail( "u2 >= NT(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Chinese_remainder_traits.h", 86)); NT v = mod(s*(u2-u1),m2); u = m1*v + u1; NT m_half = idiv(m-mod(m,NT(2)),NT(2)); if (u > m_half) u -= m ; if (u <= -m_half) u += m ; } void operator() ( const Scalar_type& m1, const Type& u1, const Scalar_type& m2, const Type& u2, Scalar_type& m, Type& u) const { Scalar_type s,t; CGAL::extended_euclidean_algorithm(m1,m2,s,t); m = m1 * m2; this->operator()(m1,m2,m,s,t,u1,u2,u); } }; }; } } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h" 2 namespace CGAL { template class Chinese_remainder_traits >{ private: typedef CGAL::Sqrt_extension EXT; typedef Chinese_remainder_traits CRT_NT; typedef Chinese_remainder_traits CRT_ROOT; public : typedef EXT Type; typedef typename CRT_NT::Scalar_type Scalar_type; struct Chinese_remainder{ void operator() ( const Scalar_type& m1, const Scalar_type& m2, const Scalar_type& m, const Scalar_type& s, const Scalar_type& t, const Type& u1, const Type& u2, Type& u) const { NT a0,a1; ROOT root; typename CRT_NT::Chinese_remainder chinese_remainder_nt; chinese_remainder_nt(m1,m2,m,s,t,u1.a0(),u2.a0(),a0); (CGAL::possibly(!((u1.is_extended() && !u2.is_extended()) || (!u1.is_extended() && u2.is_extended())))?(static_cast(0)): ::CGAL::postcondition_fail( "!((u1.is_extended() && !u2.is_extended()) || (!u1.is_extended() && u2.is_extended()))" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h" # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h" , 56 # 54 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Chinese_remainder_traits.h" , " chinese remainder not possible for these numbers")) ; if(u1.is_extended() || u2.is_extended()){ chinese_remainder_nt(m1,m2,m,s,t,u1.a1(),u2.a1(),a1); typename CRT_ROOT::Chinese_remainder chinese_remainder_root; chinese_remainder_root(m1,m2,m,s,t,u1.root(),u2.root(),root); u=Type(a0,a1,root); }else{ u=Type(a0); } } void operator() ( const Scalar_type& m1, const Type& u1, const Scalar_type& m2, const Type& u2, Scalar_type& m, Type& u) const { Scalar_type s,t; CGAL::extended_euclidean_algorithm(m1,m2,s,t); m = m1 * m2; this->operator()(m1,m2,m,s,t,u1,u2,u); } }; }; } # 64 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/io.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/io.h" namespace CGAL { template void input_ascii(std::istream& is , Sqrt_extension& result){ typedef Sqrt_extension EXT; char c; NT a0; NT a1; ROOT root; swallow(is, 'E'); swallow(is, 'X'); swallow(is, 'T'); swallow(is, '['); is >> iformat(a0); do c = is.get(); while (isspace(c)); if (c != ',') ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/io.h", 51, "input error: , expected" ); is >> iformat(a1); do c = is.get(); while (isspace(c)); if (c != ',') ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/io.h", 55, "input error: , expected" ); is >> iformat(root); do c = is.get(); while (isspace(c)); if (c != ']') ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/io.h", 59, "input error: ] expected" ); if ( root < ROOT(0)) ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/io.h", 61, "input error: non-negative root expected" ); if ( root == ROOT(0)) result = EXT(a0); else result = EXT(a0,a1,root); } template void output_maple(std::ostream& os, const Sqrt_extension& x){ CGAL::IO::Mode o_mode=::CGAL::get_mode(os); ::CGAL::set_mode(os,CGAL::IO::PRETTY); if ( x.a0() != NT(0)){ if ( x.a1() != NT(0)){ os << x.a0() << "+" << CGAL::oformat(x.a1(),CGAL::Parens_as_product_tag()) << "*sqrt(" << x.root() << ")"; }else{ os << x.a0(); } } else{ if (x.a1() != NT(0)){ os << CGAL::oformat(x.a1(),CGAL::Parens_as_product_tag()) << "*sqrt(" << x.root() << ")"; }else{ os << 0; } } ::CGAL::set_mode(os,o_mode); return; } template< class NT, class ROOT, class ACDE_TAG, class FP_TAG > void output_benchmark( std::ostream& os, const Sqrt_extension& x ) { os << "Sqrt_extension( " << bmformat( x.a0() ) << ", " << bmformat( x.a1() ) << ", " << bmformat( x.root()) << " )"; } template < class NT, class ROOT, class ACDE_TAG, class FP_TAG > class Benchmark_rep< CGAL::Sqrt_extension< NT,ROOT, ACDE_TAG, FP_TAG> > { const CGAL::Sqrt_extension< NT,ROOT,ACDE_TAG,FP_TAG>& t; public: Benchmark_rep( const CGAL::Sqrt_extension< NT,ROOT,ACDE_TAG,FP_TAG>& tt) : t(tt) {} std::ostream& operator()( std::ostream& out) const { output_benchmark( out, t ); return out; } static std::string get_benchmark_name() { std::stringstream ss; ss << "Sqrt_extension< " << Benchmark_rep< NT >::get_benchmark_name() << ", " << Benchmark_rep< ROOT>::get_benchmark_name() << " >"; return ss.str(); } }; template struct Needs_parens_as_product< Sqrt_extension >{ public: typedef Sqrt_extension NT; bool operator()(const NT& t){ if( t.a0() != NT(0) && t.a1() != NT(0)){ return true; } if( t.a1() == NT(0) ){ Needs_parens_as_product npap; return npap(t.a0()); } return false; } }; template std::ostream& operator << (std::ostream& os, const Sqrt_extension& ext){ switch(CGAL::get_mode(os)) { case CGAL::IO::PRETTY: output_maple(os,ext); break; default: os<<"EXT["< std::istream& operator >> (std::istream& is, Sqrt_extension& ext) { (CGAL::possibly(!CGAL::is_pretty(is))?(static_cast(0)): ::CGAL::precondition_fail( "!CGAL::is_pretty(is)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/io.h", 162)); input_ascii(is,ext); return is; } } # 65 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Get_arithmetic_kernel.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Get_arithmetic_kernel.h" namespace CGAL { template< class NT > struct Get_arithmetic_kernel{}; } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Get_arithmetic_kernel.h" 2 namespace CGAL { template struct Get_arithmetic_kernel >{ typedef Get_arithmetic_kernel GET; typedef typename GET::Arithmetic_kernel Arithmetic_kernel; }; } # 66 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/convert_to_bfi.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/convert_to_bfi.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/convert_to_bfi.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/convert_to_bfi.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cache.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cache.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/function_objects.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/function_objects.h" namespace CGAL { template < class Value> struct Identity { typedef Value argument_type; typedef Value result_type; Value& operator()( Value& x) const { return x; } const Value& operator()( const Value& x) const { return x; } }; template < class Value> struct Dereference { typedef Value* argument_type; typedef Value result_type; Value& operator()( Value* x) const { return *x;} const Value& operator()( const Value* x) const { return *x;} }; template < class Value> struct Get_address { typedef Value argument_type; typedef Value* result_type; Value* operator()( Value& x) const { return &x;} const Value* operator()( const Value& x) const { return &x;} }; template < class Arg, class Result> struct Cast_function_object { typedef Arg argument_type; typedef Result result_type; Result& operator()( Arg& x) const { return (Result&)(x); } const Result& operator()( const Arg& x) const { return (const Result&)(x); } }; template < class Node> struct Project_vertex { typedef Node argument_type; typedef typename Node::Vertex Vertex; typedef Vertex result_type; Vertex& operator()( Node& x) const { return x.vertex(); } const Vertex& operator()( const Node& x) const { return x.vertex(); } }; template < class Node> struct Project_facet { typedef Node argument_type; typedef typename Node::Facet Facet; typedef Facet result_type; Facet& operator()( Node& x) const { return x.facet(); } const Facet& operator()( const Node& x) const { return x.facet(); } }; template < class Node> struct Project_point { typedef Node argument_type; typedef typename Node::Point Point; typedef Point result_type; Point& operator()( Node& x) const { return x.point(); } const Point& operator()( const Node& x) const { return x.point(); } }; template < class Node> struct Project_normal { typedef Node argument_type; typedef typename Node::Normal Normal; typedef Normal result_type; Normal& operator()( Node& x) const { return x.normal(); } const Normal& operator()( const Node& x) const { return x.normal(); } }; template < class Node> struct Project_plane { typedef Node argument_type; typedef typename Node::Plane Plane; typedef Plane result_type; Plane& operator()( Node& x) const { return x.plane(); } const Plane& operator()( const Node& x) const { return x.plane(); } }; template < class Node> struct Project_next { typedef Node* argument_type; typedef Node* result_type; Node* operator()( Node* x) const { return x->next(); } const Node* operator()( const Node* x) const { return x->next(); } }; template < class Node> struct Project_prev { typedef Node* argument_type; typedef Node* result_type; Node* operator()( Node* x) const { return x->prev(); } const Node* operator()( const Node* x) const { return x->prev(); } }; template < class Node> struct Project_next_opposite { typedef Node* argument_type; typedef Node* result_type; Node* operator()( Node* x) const { return x->next()->opposite(); } const Node* operator()( const Node* x) const { return x->next()->opposite(); } }; template < class Node> struct Project_opposite_prev { typedef Node* argument_type; typedef Node* result_type; Node* operator()( Node* x) const { return x->opposite()->prev(); } const Node* operator()( const Node* x) const { return x->opposite()->prev(); } }; template < class Arg, class Result > class Creator_1 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Result result_type; Result operator()(Arg a) const { return Result(a);} }; template < class Arg1, class Arg2, class Result > class Creator_2 { public: typedef Arg1 argument1_type; typedef Arg2 argument2_type; typedef Result result_type; Result operator()(Arg1 a1, Arg2 a2) const { return Result(a1,a2);} }; template < class Arg1, class Arg2, class Arg3, class Result > class Creator_3 { public: typedef Arg1 argument1_type; typedef Arg2 argument2_type; typedef Arg3 argument3_type; typedef Result result_type; Result operator()(Arg1 a1, Arg2 a2, Arg3 a3) const { return Result(a1,a2,a3); } }; template < class Arg1, class Arg2, class Arg3, class Arg4, class Result > class Creator_4 { public: typedef Arg1 argument1_type; typedef Arg2 argument2_type; typedef Arg3 argument3_type; typedef Arg4 argument4_type; typedef Result result_type; Result operator()(Arg1 a1, Arg2 a2, Arg3 a3, Arg4 a4) const { return Result(a1,a2,a3,a4); } }; template < class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Result > class Creator_5 { public: typedef Arg1 argument1_type; typedef Arg2 argument2_type; typedef Arg3 argument3_type; typedef Arg4 argument4_type; typedef Arg5 argument5_type; typedef Result result_type; Result operator()(Arg1 a1, Arg2 a2, Arg3 a3, Arg4 a4, Arg5 a5) const { return Result(a1,a2,a3,a4,a5); } }; template < class Arg, class Result > class Creator_uniform_2 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Result result_type; Result operator()(Arg a1, Arg a2) const { return Result(a1,a2);} }; template < class Arg, class Result > class Creator_uniform_3 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Arg argument3_type; typedef Result result_type; Result operator()(Arg a1, Arg a2, Arg a3) const { return Result(a1,a2,a3); } }; template < class Arg, class Result > class Creator_uniform_4 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Arg argument3_type; typedef Arg argument4_type; typedef Result result_type; Result operator()(Arg a1, Arg a2, Arg a3, Arg a4) const { return Result(a1,a2,a3,a4); } }; template < class Arg, class Result > class Creator_uniform_5 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Arg argument3_type; typedef Arg argument4_type; typedef Arg argument5_type; typedef Result result_type; Result operator()(Arg a1, Arg a2, Arg a3, Arg a4, Arg a5) const { return Result(a1,a2,a3,a4,a5); } }; template < class Arg, class Result > class Creator_uniform_6 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Arg argument3_type; typedef Arg argument4_type; typedef Arg argument5_type; typedef Arg argument6_type; typedef Result result_type; Result operator()(Arg a1, Arg a2, Arg a3, Arg a4, Arg a5, Arg a6 ) const { return Result(a1,a2,a3,a4,a5,a6); } }; template < class Arg, class Result > class Creator_uniform_7 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Arg argument3_type; typedef Arg argument4_type; typedef Arg argument5_type; typedef Arg argument6_type; typedef Arg argument7_type; typedef Result result_type; Result operator()(Arg a1, Arg a2, Arg a3, Arg a4, Arg a5, Arg a6, Arg a7) const { return Result(a1,a2,a3,a4,a5,a6,a7); } }; template < class Arg, class Result > class Creator_uniform_8 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Arg argument3_type; typedef Arg argument4_type; typedef Arg argument5_type; typedef Arg argument6_type; typedef Arg argument7_type; typedef Arg argument8_type; typedef Result result_type; Result operator()(Arg a1, Arg a2, Arg a3, Arg a4, Arg a5, Arg a6, Arg a7, Arg a8) const { return Result(a1,a2,a3,a4,a5,a6,a7,a8); } }; template < class Arg, class Result > class Creator_uniform_9 { public: typedef Arg argument_type; typedef Arg argument1_type; typedef Arg argument2_type; typedef Arg argument3_type; typedef Arg argument4_type; typedef Arg argument5_type; typedef Arg argument6_type; typedef Arg argument7_type; typedef Arg argument8_type; typedef Arg argument9_type; typedef Result result_type; Result operator()(Arg a1, Arg a2, Arg a3, Arg a4, Arg a5, Arg a6, Arg a7, Arg a8, Arg a9) const { return Result(a1,a2,a3,a4,a5,a6,a7,a8,a9); } }; template < class Arg, class Result > class Creator_uniform_d { int d; private: Creator_uniform_d(){} public: typedef Arg argument1_type; typedef Result result_type; Creator_uniform_d(int dim) : d(dim) {} Result operator()(Arg a1, Arg a2) const { return Result(d, a1,a2);} }; template < class Op1, class Op2 > class Unary_compose_1 : public std::unary_function< typename Op2::argument_type, typename Op1::result_type > { protected: Op1 op1; Op2 op2; public: typedef typename Op2::argument_type argument_type; typedef typename Op1::result_type result_type; Unary_compose_1(const Op1& x, const Op2& y) : op1(x), op2(y) {} result_type operator()(const argument_type& x) const { return op1(op2(x)); } }; template < class Op1, class Op2 > inline Unary_compose_1< Op1, Op2 > compose1_1(const Op1& op1, const Op2& op2) { return Unary_compose_1< Op1, Op2 >(op1, op2); } template < class Op1, class Op2, class Op3 > class Binary_compose_1 : public std::unary_function< typename Op2::argument_type, typename Op1::result_type > { protected: Op1 op1; Op2 op2; Op3 op3; public: typedef typename Op2::argument_type argument_type; typedef typename Op1::result_type result_type; Binary_compose_1(const Op1& x, const Op2& y, const Op3& z) : op1(x), op2(y), op3(z) {} result_type operator()(const argument_type& x) const { return op1(op2(x), op3(x)); } }; template < class Op1, class Op2, class Op3 > inline Binary_compose_1< Op1, Op2, Op3 > compose2_1(const Op1& op1, const Op2& op2, const Op3& op3) { return Binary_compose_1< Op1, Op2, Op3 >(op1, op2, op3); } template < class Op1, class Op2 > class Unary_compose_2 : public std::binary_function< typename Op2::first_argument_type, typename Op2::second_argument_type, typename Op1::result_type > { protected: Op1 op1; Op2 op2; public: typedef typename Op2::first_argument_type first_argument_type; typedef typename Op2::second_argument_type second_argument_type; typedef typename Op1::result_type result_type; Unary_compose_2(const Op1& x, const Op2& y) : op1(x), op2(y) {} result_type operator()(const first_argument_type& x, const second_argument_type& y) const { return op1(op2(x, y)); } }; template < class Op1, class Op2 > inline Unary_compose_2< Op1, Op2 > compose1_2(const Op1& op1, const Op2& op2) { return Unary_compose_2< Op1, Op2 >(op1, op2); } template < class Op1, class Op2, class Op3 > class Binary_compose_2 : public std::binary_function< typename Op2::argument_type, typename Op3::argument_type, typename Op1::result_type > { protected: Op1 op1; Op2 op2; Op3 op3; public: typedef typename Op2::argument_type first_argument_type; typedef typename Op3::argument_type second_argument_type; typedef typename Op1::result_type result_type; Binary_compose_2(const Op1& x, const Op2& y, const Op3& z) : op1(x), op2(y), op3(z) {} result_type operator()(const first_argument_type& x, const second_argument_type& y) const { return op1(op2(x), op3(y)); } }; template < class Op1, class Op2, class Op3 > inline Binary_compose_2< Op1, Op2, Op3 > compose2_2(const Op1& op1, const Op2& op2, const Op3& op3) { return Binary_compose_2< Op1, Op2, Op3 >(op1, op2, op3); } template < class Op > class Compare_to_less : public Op { public: typedef Op Type; typedef bool result_type; Compare_to_less(const Op& op) : Op(op) {} template < typename A1 > bool operator()(const A1 &a1) const { return Op::operator()(a1) == SMALLER; } template < typename A1, typename A2 > bool operator()(const A1 &a1, const A2 &a2) const { return Op::operator()(a1, a2) == SMALLER; } template < typename A1, typename A2, typename A3 > bool operator()(const A1 &a1, const A2 &a2, const A3 &a3) const { return Op::operator()(a1, a2, a3) == SMALLER; } template < typename A1, typename A2, typename A3, typename A4 > bool operator()(const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const { return Op::operator()(a1, a2, a3, a4) == SMALLER; } }; template < class Op > inline Compare_to_less compare_to_less(const Op& op) { return Compare_to_less(op); } template < class T1, class T2, class Less1 = std::less, class Less2 = std::less > struct Pair_lexicographical_less_than { typedef bool result_type; typedef std::pair first_argument_type; typedef std::pair second_argument_type; bool operator () (const std::pair& x, const std::pair& y) const { Less1 lt1; Less2 lt2; if (lt1(x.first, y.first)) { return true; } else if (lt1(y.first, x.first)) { return false; } else { return lt2(x.second, y.second); } } }; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cache.h" 2 namespace CGAL { # 52 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cache.h" template < class Input_, class Output_, class Creator_ = Creator_1, class Canonicalizer_ = Creator_1, class Compare_ = std::less > class Cache{ public: typedef Input_ Input; typedef Output_ Output; typedef Creator_ Creator; typedef Canonicalizer_ Canonicalizer; typedef Compare_ Compare; typedef Cache Self; private: typedef std::map Map; Map map; public: typedef Map _Rep_type; typedef typename _Rep_type::iterator Iterator; typedef typename _Rep_type::const_iterator Const_iterator; typedef typename _Rep_type::reverse_iterator Reverse_iterator; typedef typename _Rep_type::const_reverse_iterator Const_reverse_iterator; typedef typename _Rep_type::size_type Size_type; public: Cache() : map() {}; Output operator () (const Input& input) { Canonicalizer canonicalize; Input key = canonicalize(input); typename Map::iterator it = map.find(key); if (it == map.end()) { Creator create; Output out = create(key); map.insert(it,typename Map::value_type(key,out)); return out; } else { return (*it).second; } } void clear() { map.clear(); } bool is_empty() const { return map.empty(); } Size_type size() { return map.size(); } Size_type max_size() const { return map.max_size(); } Iterator begin() { return map.begin(); } Iterator end() { return map.end(); } Const_iterator begin() const { return map.begin(); } Const_iterator end() const { return map.end(); } Reverse_iterator rbegin() { return map.rbegin(); } Reverse_iterator rend() { return map.rend(); } Const_reverse_iterator rbegin() const { return map.rbegin(); } Const_reverse_iterator rend() const { return map.rend(); } }; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/convert_to_bfi.h" 2 namespace CGAL { template typename Get_arithmetic_kernel::Arithmetic_kernel::Bigfloat_interval convert_to_bfi(const NTX& x) { typedef typename Get_arithmetic_kernel::Arithmetic_kernel AK; typedef typename AK::Bigfloat_interval BFI; typedef CGAL::Coercion_traits CT; return typename CT::Cast()(x); } } # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/convert_to_bfi.h" 2 # 67 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Wang_traits.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension/Wang_traits.h" namespace CGAL { namespace internal{ template class Wang_traits; template class Wang_traits< CGAL::Sqrt_extension >{ typedef Wang_traits WT; public: typedef CGAL::Sqrt_extension NT; typedef typename WT::Scalar Scalar; struct Wang { bool operator() (const NT& ext, const Scalar& m, NT& n, Scalar& d) const { typename Algebraic_structure_traits::Integral_division idiv; typename WT::Wang wang; AS a0,a1; Scalar d0,d1; ROOT root; n = NT(0); d = Scalar(0); if(!wang(ext.a0(),m,a0,d0)) return false; if(ext.is_extended()){ if(!wang(ext.a1(),m,a1,d1)) return false; d = d0 * idiv(d1,CGAL::gcd(d0,d1)); a0 = a0 * idiv(d,d0); a1 = a1 * idiv(d,d1); n = NT(a0,a1,ext.root()); }else{ d = d0; n = NT(a0); } return true; } }; }; } } # 68 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Sqrt_extension.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" 2 # 61 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" namespace CGAL { class MP_Float; template < typename > class Quotient; namespace INTERN_MP_FLOAT { Comparison_result compare(const MP_Float&, const MP_Float&); MP_Float square(const MP_Float&); double to_double(const MP_Float&); double to_double(const Quotient&); std::pair to_interval(const MP_Float &); std::pair to_interval(const Quotient&); MP_Float div(const MP_Float& n1, const MP_Float& n2); MP_Float gcd(const MP_Float& a, const MP_Float& b); } std::pair to_double_exp(const MP_Float &b); std::pair, int> to_interval_exp(const MP_Float &b); std::ostream & operator<< (std::ostream & os, const MP_Float &b); std::ostream & print (std::ostream & os, const MP_Float &b); std::istream & operator>> (std::istream & is, MP_Float &b); MP_Float operator+(const MP_Float &a, const MP_Float &b); MP_Float operator-(const MP_Float &a, const MP_Float &b); MP_Float operator*(const MP_Float &a, const MP_Float &b); MP_Float operator%(const MP_Float &a, const MP_Float &b); class MP_Float { public: typedef short limb; typedef int limb2; typedef double exponent_type; typedef std::vector V; typedef V::const_iterator const_iterator; typedef V::iterator iterator; private: void remove_leading_zeros() { while (!v.empty() && v.back() == 0) v.pop_back(); } void remove_trailing_zeros() { if (v.empty() || v.front() != 0) return; iterator i = v.begin(); for (++i; *i == 0; ++i) ; exp += i-v.begin(); v.erase(v.begin(), i); } template < typename T > void construct_from_builtin_fp_type(T d); public: static void split(limb2 l, limb & high, limb & low) { const unsigned int sizeof_limb=8*sizeof(limb); const limb2 mask= ~( static_cast(-1) << sizeof_limb ); low=static_cast(l & mask); high = (l - low) >> sizeof_limb; (CGAL::possibly(l == low + ( static_cast(high) << sizeof_limb ))?(static_cast(0)): ::CGAL::postcondition_fail( "l == low + ( static_cast(high) << sizeof_limb )" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 156)); } static limb higher_limb(limb2 l) { limb high, low; split(l, high, low); return high; } void canonicalize() { remove_leading_zeros(); remove_trailing_zeros(); } MP_Float() : exp(0) { (CGAL::possibly(sizeof(limb2) == 2*sizeof(limb))?(static_cast(0)): ::CGAL::assertion_fail( "sizeof(limb2) == 2*sizeof(limb)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 177)); (CGAL::possibly(v.empty())?(static_cast(0)): ::CGAL::assertion_fail( "v.empty()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 178)); } # 191 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" MP_Float(limb2 i) : v(2), exp(0) { split(i, v[1], v[0]); canonicalize(); } MP_Float(float d); MP_Float(double d); MP_Float(long double d); MP_Float operator+() const { return *this; } MP_Float operator-() const { return MP_Float() - *this; } MP_Float& operator+=(const MP_Float &a) { return *this = *this + a; } MP_Float& operator-=(const MP_Float &a) { return *this = *this - a; } MP_Float& operator*=(const MP_Float &a) { return *this = *this * a; } MP_Float& operator%=(const MP_Float &a) { return *this = *this % a; } exponent_type max_exp() const { return v.size() + exp; } exponent_type min_exp() const { return exp; } limb of_exp(exponent_type i) const { if (i < exp || i >= max_exp()) return 0; return v[static_cast(i-exp)]; } bool is_zero() const { return v.empty(); } Sign sign() const { if (v.empty()) return ZERO; if (v.back()>0) return POSITIVE; (CGAL::possibly(v.back()<0)?(static_cast(0)): ::CGAL::assertion_fail( "v.back()<0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 246)); return NEGATIVE; } void clear() { v.clear(); exp = 0; } void swap(MP_Float &m) { std::swap(v, m.v); std::swap(exp, m.exp); } template < typename T > T to_rational() const { const unsigned log_limb = 8 * sizeof(MP_Float::limb); if (is_zero()) return 0; MP_Float::const_iterator i; exponent_type exp2 = min_exp() * log_limb; T res = 0; for (i = v.begin(); i != v.end(); ++i) { res += T(std::ldexp(static_cast(*i),static_cast(exp2))); exp2 += log_limb; } return res; } std::size_t size() const { return v.size(); } exponent_type find_scale() const { return exp + v.size(); } void rescale(exponent_type scale) { if (v.size() != 0) exp -= scale; } static unsigned short lsb(limb l) { unsigned short nb = 0; for (; (l&1)==0; ++nb, l>>=1) ; return nb; } void gcd_normalize() { const unsigned log_limb = 8 * sizeof(MP_Float::limb); if (is_zero()) return; unsigned short nb = lsb(v[0]); if (nb != 0) *this = *this * (1<<(log_limb-nb)); (CGAL::possibly((v[0]&1) != 0)?(static_cast(0)): ::CGAL::assertion_fail( "(v[0]&1) != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 324)); exp=0; if (sign() == NEGATIVE) *this = - *this; } MP_Float unit_part() const { if (is_zero()) return 1; MP_Float r = (sign() > 0) ? *this : - *this; (CGAL::possibly(r.v.begin() != r.v.end())?(static_cast(0)): ::CGAL::assertion_fail( "r.v.begin() != r.v.end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 335)); unsigned short nb = lsb(r.v[0]); r.v.clear(); r.v.push_back(1< 0) ? r : -r; } bool is_integer() const { return is_zero() || (exp >= 0); } V v; exponent_type exp; }; namespace internal{ std::pair division(const MP_Float & n, const MP_Float & d); } inline void swap(MP_Float &m, MP_Float &n) { m.swap(n); } inline bool operator<(const MP_Float &a, const MP_Float &b) { return INTERN_MP_FLOAT::compare(a, b) == SMALLER; } inline bool operator>(const MP_Float &a, const MP_Float &b) { return b < a; } inline bool operator>=(const MP_Float &a, const MP_Float &b) { return ! (a < b); } inline bool operator<=(const MP_Float &a, const MP_Float &b) { return ! (a > b); } inline bool operator==(const MP_Float &a, const MP_Float &b) { return (a.v == b.v) && (a.v.empty() || (a.exp == b.exp)); } inline bool operator!=(const MP_Float &a, const MP_Float &b) { return ! (a == b); } MP_Float approximate_sqrt(const MP_Float &d); MP_Float approximate_division(const MP_Float &n, const MP_Float &d); template <> class Algebraic_structure_traits< MP_Float > : public Algebraic_structure_traits_base< MP_Float, Unique_factorization_domain_tag > { public: typedef Tag_true Is_exact; typedef Tag_true Is_numerical_sensitive; struct Unit_part : public std::unary_function< Type , Type > { Type operator()(const Type &x) const { return x.unit_part(); } }; struct Integral_division : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { std::pair res = internal::division(x, y); (CGAL::possibly(res.second == 0)?(static_cast(0)): ::CGAL::assertion_fail( "res.second == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" # 420 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" , 421 # 420 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" , "exact_division() called with operands which do not divide")) ; return res.first; } }; class Square : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { return INTERN_MP_FLOAT::square(x); } }; class Gcd : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { return INTERN_MP_FLOAT::gcd( x, y ); } }; class Div : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { return INTERN_MP_FLOAT::div( x, y ); } }; typedef INTERN_AST::Mod_per_operator< Type > Mod; class Divides : public std::binary_function{ public: bool operator()( const Type& x, const Type& y) const { return internal::division(y,x).second == 0 ; } bool operator()( const Type& x, const Type& y, Type& q) const { std::pair qr = internal::division(y,x); q=qr.first; return qr.second == 0; } template < class CT_Type_1, class CT_Type_2 > bool operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; template <> class Real_embeddable_traits< MP_Float > : public INTERN_RET::Real_embeddable_traits_base< MP_Float , CGAL::Tag_true > { public: class Sgn : public std::unary_function< Type, ::CGAL::Sign > { public: ::CGAL::Sign operator()( const Type& x ) const { return x.sign(); } }; class Compare : public std::binary_function< Type, Type, Comparison_result > { public: Comparison_result operator()( const Type& x, const Type& y ) const { return INTERN_MP_FLOAT::compare( x, y ); } }; class To_double : public std::unary_function< Type, double > { public: double operator()( const Type& x ) const { return INTERN_MP_FLOAT::to_double( x ); } }; class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { return INTERN_MP_FLOAT::to_interval( x ); } }; }; namespace INTERN_MP_FLOAT{ template double to_double(const Sqrt_extension &x) { typedef MP_Float RT; typedef Quotient FT; typedef CGAL::Rational_traits< FT > Rational; Rational r; const RT r1 = r.numerator(x.a0()); const RT d1 = r.denominator(x.a0()); if(x.is_rational()) { std::pair n = to_double_exp(r1); std::pair d = to_double_exp(d1); double scale = std::ldexp(1.0, n.second - d.second); return (n.first / d.first) * scale; } const RT r2 = r.numerator(x.a1()); const RT d2 = r.denominator(x.a1()); const RT r3 = r.numerator(x.root()); const RT d3 = r.denominator(x.root()); std::pair n1 = to_double_exp(r1); std::pair v1 = to_double_exp(d1); double scale1 = std::ldexp(1.0, n1.second - v1.second); std::pair n2 = to_double_exp(r2); std::pair v2 = to_double_exp(d2); double scale2 = std::ldexp(1.0, n2.second - v2.second); std::pair n3 = to_double_exp(r3); std::pair v3 = to_double_exp(d3); double scale3 = std::ldexp(1.0, n3.second - v3.second); return ((n1.first / v1.first) * scale1) + ((n2.first / v2.first) * scale2) * std::sqrt((n3.first / v3.first) * scale3); } } namespace internal { inline Sign compare_bitlength(const MP_Float &a, const MP_Float &b) { if (a.is_zero()) return b.is_zero() ? EQUAL : SMALLER; if (b.is_zero()) return LARGER; MP_Float aa = ::CGAL:: abs(a); MP_Float bb = ::CGAL:: abs(b); if (aa.size() > (bb.size() + 2)) return LARGER; if (bb.size() > (aa.size() + 2)) return SMALLER; while (((aa.v[0]) & 1) == 0) aa = aa + aa; while (((bb.v[0]) & 1) == 0) bb = bb + bb; if (aa.size() > bb.size()) return LARGER; if (aa.size() < bb.size()) return SMALLER; for (std::size_t i = aa.size(); i > 0; --i) { if (aa.v[i-1] > bb.v[i-1]) return LARGER; if (aa.v[i-1] < bb.v[i-1]) return SMALLER; } return EQUAL; } inline std::pair division(const MP_Float & n, const MP_Float & d) { typedef MP_Float::exponent_type exponent_type; MP_Float remainder = n, divisor = d; (CGAL::possibly(divisor != 0)?(static_cast(0)): ::CGAL::precondition_fail( "divisor != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 611)); exponent_type scale_d = divisor.find_scale(); divisor.rescale(scale_d); const double dd = INTERN_MP_FLOAT::to_double(divisor); MP_Float res = 0; exponent_type scale_remainder = 0; bool first_time_smaller_than_divisor = true; while ( remainder != 0 ) { exponent_type tmp_scale = remainder.find_scale(); remainder.rescale(tmp_scale); res.rescale(tmp_scale); scale_remainder += tmp_scale; double approx = INTERN_MP_FLOAT::to_double(remainder) / dd; (CGAL::possibly(approx != 0)?(static_cast(0)): ::CGAL::assertion_fail( "approx != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 636)); res += approx; remainder -= approx * divisor; if (remainder == 0) break; # 651 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" double direction = (::CGAL:: sign(remainder) == ::CGAL:: sign(dd)) ? std::numeric_limits::infinity() : -std::numeric_limits::infinity(); while (true) { const double approx2 = nextafter(approx, direction); const double delta = approx2 - approx; MP_Float new_remainder = remainder - delta * divisor; if (::CGAL:: abs(new_remainder) < ::CGAL:: abs(remainder)) { remainder = new_remainder; res += delta; approx = approx2; } else { break; } } if (remainder == 0) break; if (compare_bitlength(remainder, divisor) == SMALLER) { if (! first_time_smaller_than_divisor) { res.rescale(scale_d - scale_remainder); remainder.rescale(- scale_remainder); (CGAL::possibly(res * d + remainder == n)?(static_cast(0)): ::CGAL::postcondition_fail( "res * d + remainder == n" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 681)); return std::make_pair(res, remainder); } first_time_smaller_than_divisor = false; } } res.rescale(scale_d - scale_remainder); (CGAL::possibly(res * d == n)?(static_cast(0)): ::CGAL::postcondition_fail( "res * d == n" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 690)); return std::make_pair(res, MP_Float(0)); } inline bool divides(const MP_Float & d, const MP_Float & n) { return internal::division(n, d).second == 0; } } inline bool is_integer(const MP_Float &m) { return m.is_integer(); } inline MP_Float operator%(const MP_Float& n1, const MP_Float& n2) { return internal::division(n1, n2).second; } # 729 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" namespace INTERN_MP_FLOAT { inline MP_Float div(const MP_Float& n1, const MP_Float& n2) { return internal::division(n1, n2).first; } inline MP_Float gcd( const MP_Float& a, const MP_Float& b) { if (a == 0) { if (b == 0) return 0; MP_Float tmp=b; tmp.gcd_normalize(); return tmp; } if (b == 0) { MP_Float tmp=a; tmp.gcd_normalize(); return tmp; } MP_Float x = a, y = b; while (true) { x = x % y; if (x == 0) { (CGAL::possibly(internal::divides(y, a) & internal::divides(y, b))?(static_cast(0)): ::CGAL::postcondition_fail( "internal::divides(y, a) & internal::divides(y, b)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h", 758)); y.gcd_normalize(); return y; } swap(x, y); } } } inline void simplify_quotient(MP_Float & numerator, MP_Float & denominator) { # 782 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" numerator.exp -= denominator.exp; denominator.exp = 0; # 795 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" } inline void simplify_root_of_2(MP_Float & , MP_Float & , MP_Float& ) { # 819 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" } namespace internal { inline void simplify_3_exp(int &a, int &b, int &c) { int min = (std::min)((std::min)(a,b),c); int max = (std::max)((std::max)(a,b),c); int med = (min+max)/2; a -= med; b -= med; c -= med; } } template<> class Real_embeddable_traits< Quotient > : public INTERN_QUOTIENT::Real_embeddable_traits_quotient_base< Quotient >{ public: struct To_double: public std::unary_function, double>{ inline double operator()(const Quotient& q) const { return INTERN_MP_FLOAT::to_double(q); } }; struct To_interval : public std::unary_function, std::pair > { inline std::pair operator()(const Quotient& q) const { return INTERN_MP_FLOAT::to_interval(q); } }; }; inline MP_Float min (const MP_Float& x,const MP_Float& y){ return (x<=y)?x:y; } inline MP_Float max (const MP_Float& x,const MP_Float& y){ return (x>=y)?x:y; } template <> struct Coercion_traits< MP_Float , MP_Float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef MP_Float Type; struct Cast{ typedef Type result_type; Type operator()(const MP_Float& x) const { return x;} }; }; template <> struct Coercion_traits< int , MP_Float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef MP_Float Type; struct Cast{ typedef Type result_type; Type operator()(const MP_Float& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< MP_Float , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef MP_Float Type; struct Cast{ typedef Type result_type; Type operator()(const MP_Float& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float_arithmetic_kernel.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float_arithmetic_kernel.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Arithmetic_kernel/Arithmetic_kernel_base.h" namespace CGAL { namespace internal{ class Arithmetic_kernel_base{ public: typedef CGAL::Null_tag Integer; typedef CGAL::Null_tag Rational; typedef CGAL::Null_tag Field_with_sqrt; typedef CGAL::Null_tag Field_with_kth_root; typedef CGAL::Null_tag Field_with_root_of; typedef CGAL::Null_tag Bigfloat; typedef CGAL::Null_tag Bigfloat_interval; }; } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float_arithmetic_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float_arithmetic_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float_arithmetic_kernel.h" 2 namespace CGAL { class MP_Float_arithmetic_kernel : public internal::Arithmetic_kernel_base { public: typedef MP_Float Integer; typedef CGAL::Quotient Rational; typedef MP_Float Bigfloat; struct Not_implemented{} Bigfloat_interval; }; template <> struct Get_arithmetic_kernel { typedef MP_Float_arithmetic_kernel Arithmetic_kernel; }; template <> struct Get_arithmetic_kernel > { typedef MP_Float_arithmetic_kernel Arithmetic_kernel; }; } # 871 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/MP_Float.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Exact_type_selector.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Exact_type_selector.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Exact_type_selector.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle.h" 2 namespace CGAL { class Rep { friend class Handle; protected: Rep() { count = 1; } virtual ~Rep() {} int count; }; class Handle { public: typedef std::ptrdiff_t Id_type ; Handle() : PTR(static_cast(0)) {} Handle(const Handle& x) { (CGAL::possibly(x.PTR != static_cast(0))?(static_cast(0)): ::CGAL::precondition_fail( "x.PTR != static_cast(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle.h", 55)); PTR = x.PTR; PTR->count++; } ~Handle() { if ( PTR && (--PTR->count == 0)) delete PTR; } Handle& operator=(const Handle& x) { (CGAL::possibly(x.PTR != static_cast(0))?(static_cast(0)): ::CGAL::precondition_fail( "x.PTR != static_cast(0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Handle.h", 69)); x.PTR->count++; if ( PTR && (--PTR->count == 0)) delete PTR; PTR = x.PTR; return *this; } int refs() const { return PTR->count; } Id_type id() const { return PTR - static_cast(0); } bool identical(const Handle& h) const { return PTR == h.PTR; } protected: Rep* PTR; }; inline bool identical(const Handle &h1, const Handle &h2) { return h1.identical(h2); } } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Type_mapper.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Type_mapper.h" namespace CGAL { template < typename T, typename K1, typename K2 > struct Type_mapper { typedef T type; }; # 50 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Type_mapper.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" template < typename K1, typename K2 > struct Type_mapper < typename K1::Point_2, K1, K2 > { typedef typename K2::Point_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Vector_2, K1, K2 > { typedef typename K2::Vector_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Direction_2, K1, K2 > { typedef typename K2::Direction_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Segment_2, K1, K2 > { typedef typename K2::Segment_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Ray_2, K1, K2 > { typedef typename K2::Ray_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Line_2, K1, K2 > { typedef typename K2::Line_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Triangle_2, K1, K2 > { typedef typename K2::Triangle_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Iso_rectangle_2, K1, K2 > { typedef typename K2::Iso_rectangle_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Circle_2, K1, K2 > { typedef typename K2::Circle_2 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Point_3, K1, K2 > { typedef typename K2::Point_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Plane_3, K1, K2 > { typedef typename K2::Plane_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Vector_3, K1, K2 > { typedef typename K2::Vector_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Direction_3, K1, K2 > { typedef typename K2::Direction_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Segment_3, K1, K2 > { typedef typename K2::Segment_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Ray_3, K1, K2 > { typedef typename K2::Ray_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Line_3, K1, K2 > { typedef typename K2::Line_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Triangle_3, K1, K2 > { typedef typename K2::Triangle_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Tetrahedron_3, K1, K2 > { typedef typename K2::Tetrahedron_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Iso_cuboid_3, K1, K2 > { typedef typename K2::Iso_cuboid_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Sphere_3, K1, K2 > { typedef typename K2::Sphere_3 type; }; template < typename K1, typename K2 > struct Type_mapper < typename K1::Circle_3, K1, K2 > { typedef typename K2::Circle_3 type; }; # 51 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/Type_mapper.h" 2 } # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/min_max_n.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/min_max_n.h" namespace CGAL { # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/min_max_n.h" template < typename T > inline const T& min_n(const T& t0, const T& t1) { return (std::min)(t0, t1); } template < typename T > inline const T& min_n(const T& t0, const T& t1, const T& t2) { return (std::min)(t0, (std::min)(t1, t2)); } template < typename T > inline const T& min_n(const T& t0, const T& t1, const T& t2, const T& t3) { return (std::min)(t0, min_n(t1, t2, t3)); } template < typename T > inline const T& min_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4) { return (std::min)(t0, min_n(t1, t2, t3, t4)); } template < typename T > inline const T& min_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4, const T& t5) { return (std::min)(t0, min_n(t1, t2, t3, t4, t5)); } template < typename T > inline const T& min_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4, const T& t5, const T& t6) { return (std::min)(t0, min_n(t1, t2, t3, t4, t5, t6)); } template < typename T > inline const T& min_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4, const T& t5, const T& t6, const T& t7) { return (std::min)(t0, min_n(t1, t2, t3, t4, t5, t6, t7)); } template < typename T > inline const T& max_n(const T& t0, const T& t1) { return (std::max)(t0, t1); } template < typename T > inline const T& max_n(const T& t0, const T& t1, const T& t2) { return (std::max)(t0, (std::max)(t1, t2)); } template < typename T > inline const T& max_n(const T& t0, const T& t1, const T& t2, const T& t3) { return (std::max)(t0, max_n(t1, t2, t3)); } template < typename T > inline const T& max_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4) { return (std::max)(t0, max_n(t1, t2, t3, t4)); } template < typename T > inline const T& max_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4, const T& t5) { return (std::max)(t0, max_n(t1, t2, t3, t4, t5)); } template < typename T > inline const T& max_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4, const T& t5, const T& t6) { return (std::max)(t0, max_n(t1, t2, t3, t4, t5, t6)); } template < typename T > inline const T& max_n(const T& t0, const T& t1, const T& t2, const T& t3, const T& t4, const T& t5, const T& t6, const T& t7) { return (std::max)(t0, max_n(t1, t2, t3, t4, t5, t6, t7)); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Default.h" 1 # 22 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Default.h" namespace CGAL { struct Default { template struct Get { typedef Argument type; }; template struct Get { typedef Value type; }; }; } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 namespace CGAL { template class Lazy; template class Lazy_exact_nt; template inline const AT& approx(const Lazy& l) { return l.approx(); } template inline AT& approx(Lazy& l) { return l.approx(); } template inline const ET& exact(const Lazy& l) { return l.exact(); } template inline unsigned depth(const Lazy& l) { return l.depth(); } # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" inline const double & approx(const double& d) { return d; } inline const double & exact (const double& d) { return d; } inline unsigned depth (const double& ) { return 0; } inline const float & approx(const float& d) { return d; } inline const float & exact (const float& d) { return d; } inline unsigned depth (const float& ) { return 0; } inline const int & approx(const int& d) { return d; } inline const int & exact (const int& d) { return d; } inline unsigned depth (const int& ) { return 0; } inline const unsigned & approx(const unsigned& d) { return d; } inline const unsigned & exact (const unsigned& d) { return d; } inline unsigned depth (const unsigned& ) { return 0; } inline const Return_base_tag & approx(const Return_base_tag& d) { return d; } inline const Return_base_tag & exact (const Return_base_tag& d) { return d; } inline unsigned depth (const Return_base_tag& ) { return 0; } inline const Null_vector & approx(const Null_vector& d) { return d; } inline const Null_vector & exact (const Null_vector& d) { return d; } inline unsigned depth (const Null_vector& ) { return 0; } inline const Origin & approx(const Origin& d) { return d; } inline const Origin & exact (const Origin& d) { return d; } inline unsigned depth (const Origin& ) { return 0; } inline const Orientation & approx(const Orientation& d) { return d; } inline const Orientation & exact (const Orientation& d) { return d; } inline unsigned depth (const Orientation& ) { return 0; } inline const Bbox_2 & approx(const Bbox_2& d) { return d; } inline const Bbox_2 & exact (const Bbox_2& d) { return d; } inline unsigned depth (const Bbox_2& ) { return 0; } inline const Bbox_3 & approx(const Bbox_3& d) { return d; } inline const Bbox_3 & exact (const Bbox_3& d) { return d; } inline unsigned depth (const Bbox_3& ) { return 0; } # 179 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" struct Depth_base { # 191 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" unsigned depth() const { return 0; } void set_depth(unsigned) {} }; template class Lazy_rep : public Rep, public Depth_base { Lazy_rep (const Lazy_rep&); public: typedef AT_ AT; mutable AT at; mutable ET *et; Lazy_rep () : at(), et(__null) {} Lazy_rep (const AT& a) : at(a), et(__null) {} Lazy_rep (const AT& a, const ET& e) : at(a), et(new ET(e)) {} const AT& approx() const { return at; } AT& approx() { return at; } const ET & exact() const { if (et==__null) update_exact(); return *et; } ET & exact() { if (et==__null) update_exact(); return *et; } # 265 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" bool is_lazy() const { return et == __null; } virtual void update_exact() const = 0; virtual ~Lazy_rep() { delete et; } }; template class Lazy_rep_0 : public Lazy_rep { typedef Lazy_rep Base; public: void update_exact() const { this->et = new ET(); } Lazy_rep_0() : Lazy_rep() {} Lazy_rep_0(const AT& a, const ET& e) : Lazy_rep(a, e) {} Lazy_rep_0(const AT& a, void*) : Lazy_rep(a) {} Lazy_rep_0(const ET& e) : Lazy_rep(E2A()(e), e) {} void print_dag(std::ostream& os, int level) const { this->print_at_et(os, level); } }; template class Lazy_rep_1 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_))); this->at = E2A()(*(this->et)); l1_ = L1(); } Lazy_rep_1(const AC& ac, const EC& ec, const L1& l1) : Lazy_rep(ac(CGAL::approx(l1))), EC(ec), l1_(l1) { this->set_depth(CGAL::depth(l1_) + 1); } # 351 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_2 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_), CGAL::exact(l2_))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); } Lazy_rep_2(const AC& ac, const EC& , const L1& l1, const L2& l2) : Lazy_rep(ac(CGAL::approx(l1), CGAL::approx(l2))), l1_(l1), l2_(l2) { this->set_depth(max_n(CGAL::depth(l1_), CGAL::depth(l2_)) + 1); } # 402 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_3 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; mutable L3 l3_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_), CGAL::exact(l2_), CGAL::exact(l3_))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); l3_ = L3(); } Lazy_rep_3(const AC& ac, const EC& , const L1& l1, const L2& l2, const L3& l3) : Lazy_rep(ac(CGAL::approx(l1), CGAL::approx(l2), CGAL::approx(l3))), l1_(l1), l2_(l2), l3_(l3) { this->set_depth(max_n(CGAL::depth(l1_), CGAL::depth(l2_), CGAL::depth(l3_)) + 1); } # 461 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_4 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; mutable L3 l3_; mutable L4 l4_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_), CGAL::exact(l2_), CGAL::exact(l3_), CGAL::exact(l4_))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); l3_ = L3(); l4_ = L4(); } Lazy_rep_4(const AC& ac, const EC& , const L1& l1, const L2& l2, const L3& l3, const L4& l4) : Lazy_rep(ac(CGAL::approx(l1), CGAL::approx(l2), CGAL::approx(l3), CGAL::approx(l4))), l1_(l1), l2_(l2), l3_(l3), l4_(l4) { this->set_depth(max_n(CGAL::depth(l1_), CGAL::depth(l2_), CGAL::depth(l3_), CGAL::depth(l4_)) + 1); } # 525 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_5 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; mutable L3 l3_; mutable L4 l4_; mutable L5 l5_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_), CGAL::exact(l2_), CGAL::exact(l3_), CGAL::exact(l4_), CGAL::exact(l5_))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); l3_ = L3(); l4_ = L4(); l5_ = L5(); } Lazy_rep_5(const AC& ac, const EC& , const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5) : Lazy_rep(ac(CGAL::approx(l1), CGAL::approx(l2), CGAL::approx(l3), CGAL::approx(l4), CGAL::approx(l5))), l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5) { this->set_depth(max_n(CGAL::depth(l1_), CGAL::depth(l2_), CGAL::depth(l3_), CGAL::depth(l4_), CGAL::depth(l5_)) + 1); } # 596 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_6 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; mutable L3 l3_; mutable L4 l4_; mutable L5 l5_; mutable L6 l6_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_), CGAL::exact(l2_), CGAL::exact(l3_), CGAL::exact(l4_), CGAL::exact(l5_), CGAL::exact(l6_))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); l3_ = L3(); l4_ = L4(); l5_ = L5(); l6_ = L6(); } Lazy_rep_6(const AC& ac, const EC& , const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5, const L6& l6) : Lazy_rep(ac(CGAL::approx(l1), CGAL::approx(l2), CGAL::approx(l3), CGAL::approx(l4), CGAL::approx(l5), CGAL::approx(l6))), l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6) { this->set_depth(max_n(CGAL::depth(l1_), CGAL::depth(l2_), CGAL::depth(l3_), CGAL::depth(l4_), CGAL::depth(l5_), CGAL::depth(l6_)) + 1); } # 669 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_7 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; mutable L3 l3_; mutable L4 l4_; mutable L5 l5_; mutable L6 l6_; mutable L7 l7_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_), CGAL::exact(l2_), CGAL::exact(l3_), CGAL::exact(l4_), CGAL::exact(l5_), CGAL::exact(l6_), CGAL::exact(l7_))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); l3_ = L3(); l4_ = L4(); l5_ = L5(); l6_ = L6(); l7_ = L7(); } Lazy_rep_7(const AC& ac, const EC& , const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5, const L6& l6, const L7& l7) : Lazy_rep(ac(CGAL::approx(l1), CGAL::approx(l2), CGAL::approx(l3), CGAL::approx(l4), CGAL::approx(l5), CGAL::approx(l6), CGAL::approx(l7))), l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6), l7_(l7) { this->set_depth(max_n(CGAL::depth(l1_), CGAL::depth(l2_), CGAL::depth(l3_), CGAL::depth(l4_), CGAL::depth(l5_), CGAL::depth(l6_), CGAL::depth(l7_)) + 1); } # 748 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_8 : public Lazy_rep , private EC { typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; mutable L3 l3_; mutable L4 l4_; mutable L5 l5_; mutable L6 l6_; mutable L7 l7_; mutable L8 l8_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(ec()(CGAL::exact(l1_), CGAL::exact(l2_), CGAL::exact(l3_), CGAL::exact(l4_), CGAL::exact(l5_), CGAL::exact(l6_), CGAL::exact(l7_), CGAL::exact(l8_))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); l3_ = L3(); l4_ = L4(); l5_ = L5(); l6_ = L6(); l7_ = L7(); l8_ = L8(); } Lazy_rep_8(const AC& ac, const EC& , const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5, const L6& l6, const L7& l7, const L8& l8) : Lazy_rep(ac(CGAL::approx(l1), CGAL::approx(l2), CGAL::approx(l3), CGAL::approx(l4), CGAL::approx(l5), CGAL::approx(l6), CGAL::approx(l7), CGAL::approx(l8))), l1_(l1), l2_(l2), l3_(l3), l4_(l4), l5_(l5), l6_(l6), l7_(l7), l8_(l8) { this->set_depth(max_n(CGAL::depth(l1_), CGAL::depth(l2_), CGAL::depth(l3_), CGAL::depth(l4_), CGAL::depth(l5_), CGAL::depth(l6_), CGAL::depth(l7_), CGAL::depth(l8_)) + 1); } # 831 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template < typename K1, typename K2 > struct Approx_converter { typedef K1 Source_kernel; typedef K2 Target_kernel; template < typename T > const typename T::AT& operator()(const T&t) const { return t.approx(); } const Null_vector& operator()(const Null_vector& n) const { return n; } const Bbox_2& operator()(const Bbox_2& b) const { return b; } const Bbox_3& operator()(const Bbox_3& b) const { return b; } }; template < typename K1, typename K2 > struct Exact_converter { typedef K1 Source_kernel; typedef K2 Target_kernel; template < typename T > const typename T::ET& operator()(const T&t) const { return t.exact(); } const Null_vector& operator()(const Null_vector& n) const { return n; } const Bbox_2& operator()(const Bbox_2& b) const { return b; } const Bbox_3& operator()(const Bbox_3& b) const { return b; } }; template class Lazy_rep_with_vector_1 : public Lazy_rep, std::vector, E2A> , private EC { typedef std::vector AT; typedef std::vector ET; typedef Lazy_rep Base; mutable L1 l1_; const EC& ec() const { return *this; } public: void update_exact() const { std::vector vec; this->et = new ET(); ec()(CGAL::exact(l1_), std::back_inserter(*(this->et))); if(this->et==__null) E2A()(*(this->et)); this->at = E2A()(*(this->et)); l1_ = L1(); } Lazy_rep_with_vector_1(const AC& ac, const EC& , const L1& l1) : l1_(l1) { ac(CGAL::approx(l1), std::back_inserter(this->at)); } # 937 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_with_vector_2 : public Lazy_rep, std::vector, E2A> , private EC { typedef std::vector AT; typedef std::vector ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(); this->et->reserve(this->at.size()); ec()(CGAL::exact(l1_), CGAL::exact(l2_), std::back_inserter(*(this->et))); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); } Lazy_rep_with_vector_2(const AC& ac, const EC& , const L1& l1, const L2& l2) : l1_(l1), l2_(l2) { ac(CGAL::approx(l1), CGAL::approx(l2), std::back_inserter(this->at)); } # 987 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_2_1 : public Lazy_rep , private EC { typedef typename R1::AT AT; typedef typename R1::ET ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(); ec()(CGAL::exact(l1_), CGAL::exact(l2_), *(this->et)); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); } Lazy_rep_2_1(const AC& ac, const EC& , const L1& l1, const L2& l2) : Lazy_rep(), l1_(l1), l2_(l2) { ac(CGAL::approx(l1), CGAL::approx(l2), this->at); } # 1036 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy_rep_2_2 : public Lazy_rep, std::pair, E2A> , private EC { typedef std::pair AT; typedef std::pair ET; typedef Lazy_rep Base; mutable L1 l1_; mutable L2 l2_; const EC& ec() const { return *this; } public: void update_exact() const { this->et = new ET(); ec()(CGAL::exact(l1_), CGAL::exact(l2_), this->et->first, this->et->second ); this->at = E2A()(*(this->et)); l1_ = L1(); l2_ = L2(); } Lazy_rep_2_2(const AC& ac, const EC& , const L1& l1, const L2& l2) : Lazy_rep(), l1_(l1), l2_(l2) { ac(CGAL::approx(l1), CGAL::approx(l2), this->at.first, this->at.second); } # 1088 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" }; template class Lazy : public Handle { public : typedef Lazy Self; typedef Lazy_rep Self_rep; typedef AT_ AT; typedef ET_ ET; typedef AT Approximate_type; typedef ET Exact_type; # 1121 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" Lazy() : Handle(zero()) {} # 1134 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" Lazy(Self_rep *r) { PTR = r; } Lazy(const ET& e) { PTR = new Lazy_rep_0(e); } const AT& approx() const { return ptr()->approx(); } const ET& exact() const { return ptr()->exact(); } AT& approx() { return ptr()->approx(); } ET& exact() { return ptr()->exact(); } unsigned depth() const { return ptr()->depth(); } void print_dag(std::ostream& os, int level) const { ptr()->print_dag(os, level); } private: static const Self & zero() { static const Self z = new Lazy_rep_0(); return z; } Self_rep * ptr() const { return (Self_rep*) PTR; } }; template struct Lazy_construction_bbox { static const bool Protection = true; typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename AC::result_type result_type; AC ac; EC ec; template result_type operator()(const L1& l1) const { ; Protect_FPU_rounding P; try { return ac(CGAL::approx(l1)); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return ec(CGAL::exact(l1)); } } }; template struct Lazy_construction_nt { static const bool Protection = true; typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename LK::E2A E2A; typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy_exact_nt result_type; AC ac; EC ec; template result_type operator()(const L1& l1) const { ; Protect_FPU_rounding P; try { return new Lazy_rep_1, L1>(ac, ec, l1); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return new Lazy_rep_0 >(ec(CGAL::exact(l1))); } } template result_type operator()(const L1& l1, const L2& l2) const { ; Protect_FPU_rounding P; try { return new Lazy_rep_2, L1,L2>(ac, ec, l1,l2); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return new Lazy_rep_0 >(ec(CGAL::exact(l1), CGAL::exact(l2))); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3) const { ; Protect_FPU_rounding P; try { return new Lazy_rep_3, L1,L2,L3>(ac, ec, l1,l2,l3); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return new Lazy_rep_0 >(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3))); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3, const L4& l4) const { ; Protect_FPU_rounding P; try { return new Lazy_rep_4, L1,L2,L3,L4>(ac, ec, l1,l2,l3,l4); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return new Lazy_rep_0 >(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3), CGAL::exact(l4))); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5) const { ; Protect_FPU_rounding P; try { return new Lazy_rep_5, L1,L2,L3,L4,L5>(ac, ec, l1,l2,l3,l4,l5); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return new Lazy_rep_0 >(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3), CGAL::exact(l4), CGAL::exact(l5))); } } }; template Object make_lazy(const Object& eto) { typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename LK::E2A E2A; if (eto.is_empty()) return Object(); # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" if (const typename EK::Point_2* ptr = object_cast(&eto)) return make_object(typename LK::Point_2(new Lazy_rep_0(*ptr))); if (const typename EK::Vector_2* ptr = object_cast(&eto)) return make_object(typename LK::Vector_2(new Lazy_rep_0(*ptr))); if (const typename EK::Direction_2* ptr = object_cast(&eto)) return make_object(typename LK::Direction_2(new Lazy_rep_0(*ptr))); if (const typename EK::Segment_2* ptr = object_cast(&eto)) return make_object(typename LK::Segment_2(new Lazy_rep_0(*ptr))); if (const typename EK::Ray_2* ptr = object_cast(&eto)) return make_object(typename LK::Ray_2(new Lazy_rep_0(*ptr))); if (const typename EK::Line_2* ptr = object_cast(&eto)) return make_object(typename LK::Line_2(new Lazy_rep_0(*ptr))); if (const typename EK::Triangle_2* ptr = object_cast(&eto)) return make_object(typename LK::Triangle_2(new Lazy_rep_0(*ptr))); if (const typename EK::Iso_rectangle_2* ptr = object_cast(&eto)) return make_object(typename LK::Iso_rectangle_2(new Lazy_rep_0(*ptr))); if (const typename EK::Circle_2* ptr = object_cast(&eto)) return make_object(typename LK::Circle_2(new Lazy_rep_0(*ptr))); if (const typename EK::Point_3* ptr = object_cast(&eto)) return make_object(typename LK::Point_3(new Lazy_rep_0(*ptr))); if (const typename EK::Plane_3* ptr = object_cast(&eto)) return make_object(typename LK::Plane_3(new Lazy_rep_0(*ptr))); if (const typename EK::Vector_3* ptr = object_cast(&eto)) return make_object(typename LK::Vector_3(new Lazy_rep_0(*ptr))); if (const typename EK::Direction_3* ptr = object_cast(&eto)) return make_object(typename LK::Direction_3(new Lazy_rep_0(*ptr))); if (const typename EK::Segment_3* ptr = object_cast(&eto)) return make_object(typename LK::Segment_3(new Lazy_rep_0(*ptr))); if (const typename EK::Ray_3* ptr = object_cast(&eto)) return make_object(typename LK::Ray_3(new Lazy_rep_0(*ptr))); if (const typename EK::Line_3* ptr = object_cast(&eto)) return make_object(typename LK::Line_3(new Lazy_rep_0(*ptr))); if (const typename EK::Triangle_3* ptr = object_cast(&eto)) return make_object(typename LK::Triangle_3(new Lazy_rep_0(*ptr))); if (const typename EK::Tetrahedron_3* ptr = object_cast(&eto)) return make_object(typename LK::Tetrahedron_3(new Lazy_rep_0(*ptr))); if (const typename EK::Iso_cuboid_3* ptr = object_cast(&eto)) return make_object(typename LK::Iso_cuboid_3(new Lazy_rep_0(*ptr))); if (const typename EK::Sphere_3* ptr = object_cast(&eto)) return make_object(typename LK::Sphere_3(new Lazy_rep_0(*ptr))); if (const typename EK::Circle_3* ptr = object_cast(&eto)) return make_object(typename LK::Circle_3(new Lazy_rep_0(*ptr))); # 1323 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 # 1337 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" { const std::vector* v_ptr; if ( (v_ptr = object_cast >(&eto)) ) { std::vector V; V.resize(v_ptr->size()); for (unsigned int i = 0; i < v_ptr->size(); ++i) V[i] = typename LK::Point_2( new Lazy_rep_0((*v_ptr)[i])); return make_object(V); } } { const std::vector* v_ptr; if ( (v_ptr = object_cast >(&eto)) ) { std::vector V; V.resize(v_ptr->size()); for (unsigned int i = 0; i < v_ptr->size(); ++i) V[i] = typename LK::Point_3( new Lazy_rep_0((*v_ptr)[i])); return make_object(V); } } std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#2)" << std::endl; std::cerr << "dynamic type of the Object : " << eto.type().name() << std::endl; return Object(); } template struct Ith { typedef T2 result_type; # 1363 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" int i; Sign sgn; Ith(int i_) : i(i_) {sgn=NEGATIVE;} Ith(int i_, bool b_) : i(i_) { sgn= (b_) ? POSITIVE : ZERO;} const T2& operator()(const std::vector& v) const { if(sgn==NEGATIVE) return *object_cast(&v[i]); typedef std::pair Pair_type_1; typedef std::pair > Pair_type_2; if(const Pair_type_1 *p1 = object_cast(&v[i])) return p1->first; else if(const Pair_type_2 *p2 = object_cast(&v[i])) return p2->first; ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h", 1388, " Unexpected encapsulated type " ); } }; template struct Ith_for_intersection { typedef T2 result_type; int i; Ith_for_intersection(int i_) : i(i_) {} const T2& operator()(const Object& o) const { const std::vector* ptr = object_cast >(&o); return (*ptr)[i]; } }; template struct Lazy_cartesian_const_iterator_2 { typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename LK::Cartesian_const_iterator_2 result_type; AC ac; EC ec; public: template < typename L1> result_type operator()(const L1& l1) const { return result_type(&l1); } template < typename L1> result_type operator()(const L1& l1, int) const { return result_type(&l1,2); } }; template struct Lazy_cartesian_const_iterator_3 { typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename LK::Cartesian_const_iterator_3 result_type; AC ac; EC ec; public: template < typename L1> result_type operator()(const L1& l1) const { return result_type(&l1); } template < typename L1> result_type operator()(const L1& l1, int) const { return result_type(&l1,3); } }; template struct Lazy_functor_2_1 { static const bool Protection = true; typedef void result_type; AC ac; EC ec; public: template void operator()(const L1& l1, const L2& l2, R1& r1) const { ; Protect_FPU_rounding P; try { r1 = R1(new Lazy_rep_2_1(ac, ec, l1, l2)); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); typename R1::ET et; ec(CGAL::exact(l1), CGAL::exact(l2), et); r1 = R1(new Lazy_rep_0(et)); } } }; template struct First { typedef typename T::first_type result_type; const typename T::first_type& operator()(const T& p) const { return p.first; } }; template struct Second { typedef typename T::second_type result_type; const typename T::second_type& operator()(const T& p) const { return p.second; } }; template struct Lazy_functor_2_2 { static const bool Protection = true; typedef void result_type; typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename EK::FT EFT; typedef typename LK::E2A E2A; AC ac; EC ec; public: template void operator()(const L1& l1, const L2& l2, R1& r1, R2& r2) const { typedef Lazy Handle_1; typedef Lazy Handle_2; ; Protect_FPU_rounding P; try { typedef Lazy, std::pair, EFT, E2A> Lazy_pair; Lazy_pair lv(new Lazy_rep_2_2(ac, ec, l1, l2)); r1 = R1(Handle_1(new Lazy_rep_1 >, First >, E2A, Lazy_pair>(First >(), First >(), lv))); r2 = R2(Handle_2(new Lazy_rep_1 >, Second >, E2A, Lazy_pair>(Second >(), Second >(), lv))); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); typename R1::ET et1, et2; ec(CGAL::exact(l1), CGAL::exact(l2), et1, et2); r1 = R1(Handle_1(new Lazy_rep_0(et1))); r2 = R2(Handle_2(new Lazy_rep_0(et2))); } } }; template struct Lazy_intersect_with_iterators { static const bool Protection = true; typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename EK::FT EFT; typedef typename LK::E2A E2A; typedef void result_type; typedef Lazy Lazy_object; typedef Lazy, std::vector, EFT, E2A> Lazy_vector; AC ac; EC ec; public: template OutputIterator operator()(const L1& l1, const L2& l2, OutputIterator it) const { ; Protect_FPU_rounding P; try { Lazy_vector lv(new Lazy_rep_with_vector_2(ac, ec, l1, l2)); for (unsigned int i = 0; i < lv.approx().size(); i++) { # 1615 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Point_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Vector_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Direction_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Segment_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Ray_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Line_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Triangle_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Iso_rectangle_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Circle_2(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Point_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Plane_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Vector_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Direction_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Segment_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Ray_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Line_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Triangle_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Tetrahedron_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Iso_cuboid_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Sphere_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } if (object_cast(& (lv.approx()[i]))) { *it++ = make_object(typename LK::Circle_3(new Lazy_rep_1, Ith, E2A, Lazy_vector> (Ith(i), Ith(i), lv))); continue; } # 1616 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 std::cerr << "we need more casts" << std::endl; } } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); std::vector exact_objects; ec(CGAL::exact(l1), CGAL::exact(l2), std::back_inserter(exact_objects)); for (std::vector::const_iterator oit = exact_objects.begin(); oit != exact_objects.end(); ++oit){ *it++ = make_lazy(*oit); } } return it; } }; template struct Object_cast { typedef T result_type; const T& operator()(const Object& o) const { return *object_cast(&o); } }; template struct Lazy_construction_object { static const bool Protection = true; typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename EK::FT EFT; typedef typename LK::E2A E2A; typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Object result_type; typedef Lazy Lazy_object; AC ac; EC ec; public: template result_type operator()(const L1& l1) const { ; Protect_FPU_rounding P; try { Lazy_object lo(new Lazy_rep_1(ac, ec, l1)); if(lo.approx().is_empty()) return Object(); # 1694 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Point_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Vector_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Direction_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Segment_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Ray_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Line_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Triangle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Iso_rectangle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Point_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Plane_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Vector_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Direction_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Segment_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Ray_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Line_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Triangle_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Tetrahedron_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Iso_cuboid_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Sphere_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circle_3(lcr)); } # 1695 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl; std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl; } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); ET eto = ec(CGAL::exact(l1)); return make_lazy(eto); } return Object(); } template result_type operator()(const L1& l1, const L2& l2) const { ; Protect_FPU_rounding P; try { Lazy_object lo(new Lazy_rep_2(ac, ec, l1, l2)); if(lo.approx().is_empty()) return Object(); # 1727 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Point_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Vector_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Direction_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Segment_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Ray_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Line_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Triangle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Iso_rectangle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Point_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Plane_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Vector_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Direction_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Segment_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Ray_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Line_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Triangle_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Tetrahedron_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Iso_cuboid_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Sphere_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circle_3(lcr)); } # 1728 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 # 1746 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" { const std::vector* v_ptr; if ( (v_ptr = object_cast >(& (lo.approx()))) ) { std::vector V; V.resize(v_ptr->size()); for (unsigned int i = 0; i < v_ptr->size(); i++) { V[i] = typename LK::Point_2(new Lazy_rep_1, Ith_for_intersection, E2A, Lazy_object> (Ith_for_intersection(i), Ith_for_intersection(i), lo)); } return make_object(V); } } { const std::vector* v_ptr; if ( (v_ptr = object_cast >(& (lo.approx()))) ) { std::vector V; V.resize(v_ptr->size()); for (unsigned int i = 0; i < v_ptr->size(); i++) { V[i] = typename LK::Point_3(new Lazy_rep_1, Ith_for_intersection, E2A, Lazy_object> (Ith_for_intersection(i), Ith_for_intersection(i), lo)); } return make_object(V); } } std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl; std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl; } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); ET eto = ec(CGAL::exact(l1), CGAL::exact(l2)); return make_lazy(eto); } return Object(); } template result_type operator()(const L1& l1, const L2& l2, const L3& l3) const { ; Protect_FPU_rounding P; try { Lazy_object lo(new Lazy_rep_3(ac, ec, l1, l2, l3)); if(lo.approx().is_empty()) return Object(); # 1781 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Point_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Vector_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Direction_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Segment_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Ray_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Line_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Triangle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Iso_rectangle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circle_2(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Point_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Plane_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Vector_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Direction_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Segment_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Ray_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Line_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Triangle_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Tetrahedron_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Iso_cuboid_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Sphere_3(lcr)); } if (object_cast(& (lo.approx()))) { typedef Lazy_rep_1, Object_cast, E2A, Lazy_object> Lcr; Lcr * lcr = new Lcr(Object_cast(), Object_cast(), lo); return make_object(typename LK::Circle_3(lcr)); } # 1782 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy.h" 2 std::cerr << "object_cast inside Lazy_construction_rep::operator() failed. It needs more else if's (#1)" << std::endl; std::cerr << "dynamic type of the Object : " << lo.approx().type().name() << std::endl; } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); ET eto = ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3)); return make_lazy(eto); } return Object(); } }; template struct Lazy_construction { static const bool Protection = true; typedef typename LK::Approximate_kernel AK; typedef typename LK::Exact_kernel EK; typedef typename EK::FT EFT; typedef typename Default::Get::type E2A; typedef typename AC::result_type AT; typedef typename EC::result_type ET; typedef Lazy Handle; typedef typename Type_mapper::type result_type; AC ac; EC ec; public: result_type operator()() const { return result_type( Handle(new Lazy_rep_0()) ); } template result_type operator()(const L1& l1) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_1(ac, ec, l1)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1)))) ); } } template result_type operator()(const L1& l1, const L2& l2) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_2(ac, ec, l1, l2)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1), CGAL::exact(l2)))) ); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_3(ac, ec, l1, l2, l3)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3)))) ); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3, const L4& l4) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_4(ac, ec, l1, l2, l3, l4)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3), CGAL::exact(l4)))) ); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_5(ac, ec, l1, l2, l3, l4, l5)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3), CGAL::exact(l4), CGAL::exact(l5)))) ); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5, const L6& l6) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_6(ac, ec, l1, l2, l3, l4, l5, l6)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3), CGAL::exact(l4), CGAL::exact(l5), CGAL::exact(l6)))) ); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5, const L6& l6, const L7& l7) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_7(ac, ec, l1, l2, l3, l4, l5, l6, l7)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3), CGAL::exact(l4), CGAL::exact(l5), CGAL::exact(l6), CGAL::exact(l7)))) ); } } template result_type operator()(const L1& l1, const L2& l2, const L3& l3, const L4& l4, const L5& l5, const L6& l6, const L7& l7, const L8& l8) const { ; Protect_FPU_rounding P; try { return result_type( Handle(new Lazy_rep_8(ac, ec, l1, l2, l3, l4, l5, l6, l7, l8)) ); } catch (Uncertain_conversion_exception) { ; Protect_FPU_rounding P2(FE_TONEAREST); return result_type( Handle(new Lazy_rep_0(ec(CGAL::exact(l1), CGAL::exact(l2), CGAL::exact(l3), CGAL::exact(l4), CGAL::exact(l5), CGAL::exact(l6), CGAL::exact(l7), CGAL::exact(l8)))) ); } } }; } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" 2 # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" namespace CGAL { template class Lazy_exact_nt; template struct Lazy_exact_nt_rep : public Lazy_exact_nt::Self_rep { typedef typename Lazy_exact_nt::Self_rep Base; Lazy_exact_nt_rep (const Interval_nt & i) : Base(i) {} # 111 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" }; template struct Lazy_exact_Int_Cst : public Lazy_exact_nt_rep { Lazy_exact_Int_Cst (int i) : Lazy_exact_nt_rep(double(i)) {} void update_exact() const { this->et = new ET((int)this->approx().inf()); } }; template struct Lazy_exact_Cst : public Lazy_exact_nt_rep { Lazy_exact_Cst (double d) : Lazy_exact_nt_rep(d) {} void update_exact() const { this->et = new ET(this->approx().inf()); } }; template struct Lazy_exact_Ex_Cst : public Lazy_exact_nt_rep { Lazy_exact_Ex_Cst (const ET & e) : Lazy_exact_nt_rep(::CGAL:: to_interval(e)) { this->et = new ET(e); } void update_exact() const { ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 143 ); } }; template class Lazy_lazy_exact_Cst : public Lazy_exact_nt_rep { mutable Lazy_exact_nt l; public: Lazy_lazy_exact_Cst (const Lazy_exact_nt &x) : Lazy_exact_nt_rep(x.approx()), l(x) { this->set_depth(l.depth() + 1); } void update_exact() const { this->et = new ET(l.exact()); this->at = l.approx(); prune_dag(); } void prune_dag() const { l = Lazy_exact_nt(); } }; template struct Lazy_exact_unary : public Lazy_exact_nt_rep { mutable Lazy_exact_nt op1; Lazy_exact_unary (const Interval_nt &i, const Lazy_exact_nt &a) : Lazy_exact_nt_rep(i), op1(a) { this->set_depth(op1.depth() + 1); } void prune_dag() const { op1 = Lazy_exact_nt(); } # 199 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" }; template struct Lazy_exact_binary : public Lazy_exact_nt_rep { mutable Lazy_exact_nt op1; mutable Lazy_exact_nt op2; Lazy_exact_binary (const Interval_nt &i, const Lazy_exact_nt &a, const Lazy_exact_nt &b) : Lazy_exact_nt_rep(i), op1(a), op2(b) { this->set_depth((std::max)(op1.depth(), op2.depth()) + 1); } void prune_dag() const { op1 = Lazy_exact_nt(); op2 = Lazy_exact_nt(); } # 233 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" }; # 257 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" template struct Lazy_exact_Opp : public Lazy_exact_unary { typedef typename Lazy_exact_unary::AT::Protector P; Lazy_exact_Opp (const Lazy_exact_nt &a) : Lazy_exact_unary((P(), opposite(a.approx())), a) {} void update_exact() const { this->et = new ET(opposite(this->op1.exact())); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Abs : public Lazy_exact_unary { typedef typename Lazy_exact_unary::AT::Protector P; Lazy_exact_Abs (const Lazy_exact_nt &a) : Lazy_exact_unary((P(), ::CGAL:: abs(a.approx())), a) {} void update_exact() const { this->et = new ET(::CGAL:: abs(this->op1.exact())); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Square : public Lazy_exact_unary { typedef typename Lazy_exact_unary::AT::Protector P; Lazy_exact_Square (const Lazy_exact_nt &a) : Lazy_exact_unary((P(), ::CGAL:: square(a.approx())), a) {} void update_exact() const { this->et = new ET(::CGAL:: square(this->op1.exact())); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Sqrt : public Lazy_exact_unary { typedef typename Lazy_exact_unary::AT::Protector P; Lazy_exact_Sqrt (const Lazy_exact_nt &a) : Lazy_exact_unary((P(), ::CGAL:: sqrt(a.approx())), a) {} void update_exact() const { this->et = new ET(::CGAL:: sqrt(this->op1.exact())); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; # 280 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" template struct Lazy_exact_Add : public Lazy_exact_binary { typedef typename Lazy_exact_binary::AT::Protector P; Lazy_exact_Add (const Lazy_exact_nt &a, const Lazy_exact_nt &b) : Lazy_exact_binary((P(), a.approx() + b.approx()), a, b) {} void update_exact() const { this->et = new ET(this->op1.exact() + this->op2.exact()); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Sub : public Lazy_exact_binary { typedef typename Lazy_exact_binary::AT::Protector P; Lazy_exact_Sub (const Lazy_exact_nt &a, const Lazy_exact_nt &b) : Lazy_exact_binary((P(), a.approx() - b.approx()), a, b) {} void update_exact() const { this->et = new ET(this->op1.exact() - this->op2.exact()); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Mul : public Lazy_exact_binary { typedef typename Lazy_exact_binary::AT::Protector P; Lazy_exact_Mul (const Lazy_exact_nt &a, const Lazy_exact_nt &b) : Lazy_exact_binary((P(), a.approx() * b.approx()), a, b) {} void update_exact() const { this->et = new ET(this->op1.exact() * this->op2.exact()); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Div : public Lazy_exact_binary { typedef typename Lazy_exact_binary::AT::Protector P; Lazy_exact_Div (const Lazy_exact_nt &a, const Lazy_exact_nt &b) : Lazy_exact_binary((P(), a.approx() / b.approx()), a, b) {} void update_exact() const { this->et = new ET(this->op1.exact() / this->op2.exact()); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Min : public Lazy_exact_binary { Lazy_exact_Min (const Lazy_exact_nt &a, const Lazy_exact_nt &b) : Lazy_exact_binary((CGAL::min)(a.approx(), b.approx()), a, b) {} void update_exact() const { this->et = new ET((CGAL::min)(this->op1.exact(), this->op2.exact())); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template struct Lazy_exact_Max : public Lazy_exact_binary { Lazy_exact_Max (const Lazy_exact_nt &a, const Lazy_exact_nt &b) : Lazy_exact_binary((CGAL::max)(a.approx(), b.approx()), a, b) {} void update_exact() const { this->et = new ET((CGAL::max)(this->op1.exact(), this->op2.exact())); if (!this->approx().is_point()) this->at = ::CGAL:: to_interval(*(this->et)); this->prune_dag(); } }; template class Lazy_exact_nt : public Lazy, ET_, Lazy_exact_nt, To_interval > , boost::ordered_euclidian_ring_operators2< Lazy_exact_nt, int > , boost::ordered_euclidian_ring_operators2< Lazy_exact_nt, double > { public: typedef Lazy_exact_nt Self; typedef Lazy, ET_, Self, To_interval > Base; typedef typename Base::Self_rep Self_rep; typedef typename Base::ET ET; typedef typename Base::AT AT; typedef typename Base::Exact_type Exact_type; typedef typename Base::Approximate_type Approximate_type; public : Lazy_exact_nt () {} Lazy_exact_nt (Self_rep *r) : Base(r) {} Lazy_exact_nt (const typename First_if_different::Type & i) : Base(new Lazy_exact_Int_Cst(i)) {} Lazy_exact_nt (unsigned i) : Base(new Lazy_exact_Cst(i)){} Lazy_exact_nt (const typename First_if_different::Type & d) : Base(new Lazy_exact_Cst(d)){} Lazy_exact_nt (const ET & e) : Base(new Lazy_exact_Ex_Cst(e)){} template Lazy_exact_nt (const Lazy_exact_nt &x, typename boost::enable_if,int>::type=0) : Base(new Lazy_lazy_exact_Cst(x)){} template explicit Lazy_exact_nt (const Lazy_exact_nt &x, typename boost::disable_if,int>::type=0) : Base(new Lazy_lazy_exact_Cst(x)){} Self operator+ () const { return *this; } Self operator- () const { return new Lazy_exact_Opp(*this); } Self & operator+=(const Self& b) { return *this = new Lazy_exact_Add(*this, b); } Self & operator-=(const Self& b) { return *this = new Lazy_exact_Sub(*this, b); } Self & operator*=(const Self& b) { return *this = new Lazy_exact_Mul(*this, b); } Self & operator/=(const Self& b) { (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::precondition_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 383)); return *this = new Lazy_exact_Div(*this, b); } Self & operator+=(typename First_if_different::Type b) { return *this = new Lazy_exact_Add(*this, b); } Self & operator-=(typename First_if_different::Type b) { return *this = new Lazy_exact_Sub(*this, b); } Self & operator*=(typename First_if_different::Type b) { return *this = new Lazy_exact_Mul(*this, b); } Self & operator/=(typename First_if_different::Type b) { (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::precondition_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 399)); return *this = new Lazy_exact_Div(*this, b); } Self & operator+=(typename First_if_different::Type b) { return *this = new Lazy_exact_Add(*this, b); } Self & operator-=(typename First_if_different::Type b) { return *this = new Lazy_exact_Sub(*this, b); } Self & operator*=(typename First_if_different::Type b) { return *this = new Lazy_exact_Mul(*this, b); } Self & operator/=(typename First_if_different::Type b) { (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::precondition_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 414)); return *this = new Lazy_exact_Div(*this, b); } Self & operator%=(const Self& b) { (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::precondition_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 421)); ET res = this->exact(); res %= b.exact(); return *this = Lazy_exact_nt(res); } Self & operator%=(int b) { (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::precondition_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 429)); ET res = this->exact(); res %= b; return *this = Lazy_exact_nt(res); } Interval_nt interval() const { const Interval_nt& i = this->approx(); return Interval_nt(i.inf(), i.sup()); } Interval_nt_advanced approx_adv() const { return this->ptr()->approx(); } static const double & get_relative_precision_of_to_double() { return relative_precision_of_to_double; } static void set_relative_precision_of_to_double(const double & d) { (CGAL::possibly((0 < d) & (d < 1))?(static_cast(0)): ::CGAL::assertion_fail( "(0 < d) & (d < 1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 451)); relative_precision_of_to_double = d; } bool identical(const Self& b) const { return ::CGAL::identical( static_cast(*this), static_cast(b)); } template < typename T > bool identical(const T&) const { return false; } private: static double relative_precision_of_to_double; }; template double Lazy_exact_nt::relative_precision_of_to_double = 0.00001; template bool operator<(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { ; if (a.identical(b)) return false; Uncertain res = a.approx() < b.approx(); if (is_certain(res)) return get_certain(res); ; return a.exact() < b.exact(); } template bool operator==(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { ; if (a.identical(b)) return true; Uncertain res = a.approx() == b.approx(); if (is_certain(res)) return get_certain(res); ; return a.exact() == b.exact(); } template inline bool operator>(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { return b < a; } template inline bool operator>=(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { return ! (a < b); } template inline bool operator<=(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { return b >= a; } template inline bool operator!=(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { return ! (a == b); } template inline Lazy_exact_nt operator%(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { ; (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::precondition_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 534)); return Lazy_exact_nt(a) %= b; } template bool operator<(const Lazy_exact_nt& a, int b) { ; Uncertain res = a.approx() < b; if (is_certain(res)) return res; ; return a.exact() < b; } template bool operator>(const Lazy_exact_nt& a, int b) { ; Uncertain res = b < a.approx(); if (is_certain(res)) return get_certain(res); ; return b < a.exact(); } template bool operator==(const Lazy_exact_nt& a, int b) { ; Uncertain res = b == a.approx(); if (is_certain(res)) return get_certain(res); ; return b == a.exact(); } template bool operator<(const Lazy_exact_nt& a, double b) { ; Uncertain res = a.approx() < b; if (is_certain(res)) return res; ; return a.exact() < b; } template bool operator>(const Lazy_exact_nt& a, double b) { ; Uncertain res = b < a.approx(); if (is_certain(res)) return res; ; return b < a.exact(); } template bool operator==(const Lazy_exact_nt& a, double b) { ; Uncertain res = b == a.approx(); if (is_certain(res)) return res; ; return b == a.exact(); } template Lazy_exact_nt< typename Coercion_traits::Type > operator+(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { ; return new Lazy_exact_Add::Type, ET1, ET2>(a, b); } template Lazy_exact_nt< typename Coercion_traits::Type > operator-(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { ; return new Lazy_exact_Sub::Type, ET1, ET2>(a, b); } template Lazy_exact_nt< typename Coercion_traits::Type > operator*(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { ; return new Lazy_exact_Mul::Type, ET1, ET2>(a, b); } template Lazy_exact_nt< typename Coercion_traits::Type > operator/(const Lazy_exact_nt& a, const Lazy_exact_nt& b) { ; (CGAL::possibly(b != 0)?(static_cast(0)): ::CGAL::precondition_fail( "b != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 649)); return new Lazy_exact_Div::Type, ET1, ET2>(a, b); } namespace INTERN_LAZY_EXACT_NT { template< class NT, class Functor > struct Simplify_selector { struct Simplify : public std::unary_function { void operator()( NT& ) const { } }; }; template< class NT > struct Simplify_selector< NT, Null_functor > { typedef Null_functor Simplify; }; template< class NT, class Functor > struct Unit_part_selector { struct Unit_part : public std::unary_function { NT operator()( const NT& x ) const { return NT( ::CGAL:: unit_part( x.exact() ) ); } }; }; template< class NT > struct Unit_part_selector< NT, Null_functor > { typedef Null_functor Unit_part; }; template< class NT, class Functor > struct Is_zero_selector { struct Is_zero : public std::unary_function { bool operator()( const NT& x ) const { return ::CGAL:: is_zero( x.exact() ); } }; }; template< class NT > struct Is_zero_selector< NT, Null_functor > { typedef Null_functor Is_zero; }; template< class NT, class Functor > struct Is_one_selector { struct Is_one : public std::unary_function { bool operator()( const NT& x ) const { return ::CGAL:: is_one( x.exact() ); } }; }; template< class NT > struct Is_one_selector< NT, Null_functor > { typedef Null_functor Is_one; }; template< class NT, class Functor > struct Square_selector { struct Square : public std::unary_function { NT operator()( const NT& x ) const { ; return new Lazy_exact_Square(x); } }; }; template< class NT > struct Square_selector< NT, Null_functor > { typedef Null_functor Square; }; template< class NT, class Functor > struct Integral_division_selector { struct Integral_division : public std::binary_function { NT operator()( const NT& x, const NT& y ) const { return NT( ::CGAL:: integral_division( x.exact(), y.exact() ) ); } template < class CT_Type_1, class CT_Type_2 > NT operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; template< class NT > struct Integral_division_selector< NT, Null_functor > { typedef Null_functor Integral_division; }; template< class NT, class Functor > struct Is_square_selector { struct Is_square : public std::binary_function { bool operator()( const NT& x, NT& y ) const { typename NT::ET y_et; bool result = ::CGAL:: is_square( x.exact(), y_et ); y = NT(y_et); return result; } bool operator()( const NT& x) const { typename NT::ET y_et; return ::CGAL:: is_square( x.exact(), y_et ); } }; }; template< class NT > struct Is_square_selector< NT, Null_functor > { typedef Null_functor Is_square; }; template struct Sqrt_selector{ struct Sqrt : public std::unary_function { NT operator ()(const NT& x) const { ; (CGAL::possibly(x >= 0)?(static_cast(0)): ::CGAL::precondition_fail( "x >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h", 775)); return new Lazy_exact_Sqrt(x); } }; }; template struct Sqrt_selector { typedef Null_functor Sqrt; }; template< class NT, class Functor > struct Kth_root_selector { struct Kth_root : public std::binary_function { NT operator()( int k, const NT& x ) const { return NT( ::CGAL:: kth_root( k, x.exact() ) ); } }; }; template< class NT > struct Kth_root_selector< NT, Null_functor > { typedef Null_functor Kth_root; }; template< class NT, class Functor > struct Root_of_selector { private: struct Cast{ typedef typename NT::ET result_type; result_type operator()(const NT& lazy_exact) const { return lazy_exact.exact(); } }; public: struct Root_of { typedef NT result_type; template< class Input_iterator > NT operator()( int k, Input_iterator begin, Input_iterator end ) const { Cast cast; return NT( typename Algebraic_structure_traits:: Root_of()( k, ::boost::make_transform_iterator( begin, cast ), ::boost::make_transform_iterator( end, cast ) ) ); } }; }; template< class NT > struct Root_of_selector< NT, Null_functor > { typedef Null_functor Root_of; }; template< class NT, class Functor > struct Gcd_selector { struct Gcd : public std::binary_function { NT operator()( const NT& x, const NT& y ) const { ; return NT( ::CGAL:: gcd( x.exact(), y.exact() ) ); } template < class CT_Type_1, class CT_Type_2 > NT operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; template< class NT > struct Gcd_selector< NT, Null_functor > { typedef Null_functor Gcd; }; template< class NT, class Functor > struct Div_selector { struct Div : public std::binary_function { NT operator()( const NT& x, const NT& y ) const { return NT( ::CGAL:: div( x.exact(), y.exact() ) ); } template < class CT_Type_1, class CT_Type_2 > NT operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; template< class NT > struct Div_selector< NT, Null_functor > { typedef Null_functor Div; }; template< class NT, class Functor > struct Inverse_selector { struct Inverse { typedef NT result_type; NT operator()( const NT& x ) const { return NT( 1 ) / x ; } }; }; template< class NT > struct Inverse_selector< NT, Null_functor > { typedef Null_functor Inverse; }; template< class NT, class Functor > struct Mod_selector { struct Mod : public std::binary_function { NT operator()( const NT& x, const NT& y ) const { return NT( ::CGAL:: mod( x.exact(), y.exact() ) ); } template < class CT_Type_1, class CT_Type_2 > NT operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; }; template< class NT > struct Mod_selector< NT, Null_functor > { typedef Null_functor Mod; }; template< class NT, class Functor > struct Div_mod_selector { struct Div_mod { typedef void result_type; typedef NT first_argument_type; typedef NT second_argument_type; typedef NT& third_argument_type; typedef NT& fourth_argument_type; void operator()( const NT& x, const NT& y, NT& q, NT& r ) const { typename NT::ET q_et; typename NT::ET r_et; ::CGAL:: div_mod( x.exact(), y.exact(), q_et, r_et ); q = NT( q_et ); r = NT( r_et ); } template< class NT1, class NT2 > void operator()( const NT1& x, const NT2& y, NT& q, NT& r ) const { static_assert((::boost::is_same< typename Coercion_traits< NT1, NT2 >::Type, NT >::value), "(::boost::is_same< typename Coercion_traits< NT1, NT2 >::Type, NT >::value)") ; typename Coercion_traits< NT1, NT2 >::Cast cast; operator()( cast(x), cast(y), q, r ); } }; }; template< class NT > struct Div_mod_selector< NT, Null_functor >{ typedef Null_functor Div_mod; }; } template class Algebraic_structure_traits< Lazy_exact_nt > :public Algebraic_structure_traits_base < Lazy_exact_nt, typename Algebraic_structure_traits::Algebraic_category > { private: typedef Algebraic_structure_traits AST_ET; typedef typename AST_ET::Algebraic_category ET_as_tag; public: typedef typename AST_ET::Is_exact Is_exact; typedef typename AST_ET::Is_numerical_sensitive Is_numerical_sensitive; typedef typename INTERN_LAZY_EXACT_NT::Simplify_selector , typename AST_ET::Simplify > ::Simplify Simplify; typedef typename INTERN_LAZY_EXACT_NT::Unit_part_selector , typename AST_ET::Unit_part > ::Unit_part Unit_part; typedef typename INTERN_LAZY_EXACT_NT::Is_zero_selector , typename AST_ET::Is_zero > ::Is_zero Is_zero; typedef typename INTERN_LAZY_EXACT_NT::Is_one_selector , typename AST_ET::Is_one > ::Is_one Is_one; typedef typename INTERN_LAZY_EXACT_NT::Square_selector , typename AST_ET::Square > ::Square Square; typedef typename INTERN_LAZY_EXACT_NT::Integral_division_selector , typename AST_ET::Integral_division> ::Integral_division Integral_division; typedef typename INTERN_LAZY_EXACT_NT::Is_square_selector , typename AST_ET::Is_square > ::Is_square Is_square; typedef typename INTERN_LAZY_EXACT_NT::Sqrt_selector , typename AST_ET::Sqrt> ::Sqrt Sqrt; typedef typename INTERN_LAZY_EXACT_NT::Kth_root_selector , typename AST_ET::Kth_root > ::Kth_root Kth_root; typedef typename INTERN_LAZY_EXACT_NT::Root_of_selector , typename AST_ET::Root_of > ::Root_of Root_of; typedef typename INTERN_LAZY_EXACT_NT::Gcd_selector , typename AST_ET::Gcd > ::Gcd Gcd; typedef typename INTERN_LAZY_EXACT_NT::Div_selector , typename AST_ET::Div > ::Div Div; typedef typename INTERN_LAZY_EXACT_NT::Mod_selector , typename AST_ET::Mod > ::Mod Mod; typedef typename INTERN_LAZY_EXACT_NT::Div_mod_selector , typename AST_ET::Div_mod > ::Div_mod Div_mod; typedef typename INTERN_LAZY_EXACT_NT::Inverse_selector , typename AST_ET::Inverse > ::Inverse Inverse; }; template < typename ET > class Real_embeddable_traits< Lazy_exact_nt > : public INTERN_RET::Real_embeddable_traits_base< Lazy_exact_nt , CGAL::Tag_true > { static_assert((::boost::is_same< typename Real_embeddable_traits< ET > ::Is_real_embeddable, Tag_true >::value), "(::boost::is_same< typename Real_embeddable_traits< ET > ::Is_real_embeddable, Tag_true >::value)") ; public: typedef Lazy_exact_nt Type; class Abs : public std::unary_function< Type, Type > { public: Type operator()( const Type& a ) const { ; return new Lazy_exact_Abs(a); } }; class Sgn : public std::unary_function< Type, ::CGAL::Sign > { public: ::CGAL::Sign operator()( const Type& a ) const { ; Uncertain< ::CGAL::Sign> res = ::CGAL:: sign(a.approx()); if (is_certain(res)) return get_certain(res); ; return ::CGAL:: sign(a.exact()); } }; class Compare : public std::binary_function< Type, Type, Comparison_result > { public: Comparison_result operator()( const Type& a, const Type& b ) const { ; if (a.identical(b)) return EQUAL; Uncertain res = ::CGAL:: compare(a.approx(), b.approx()); if (is_certain(res)) return get_certain(res); ; return ::CGAL:: compare(a.exact(), b.exact()); } template < class CT_Type_1, class CT_Type_2 > Comparison_result operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, Type >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class To_double : public std::unary_function< Type, double > { public: double operator()( const Type& a ) const { ; const Interval_nt& app = a.approx(); double r; if (fit_in_double(app, r)) return r; if (has_smaller_relative_precision(app, Lazy_exact_nt::get_relative_precision_of_to_double())) return ::CGAL:: to_double(app); ; a.exact(); return ::CGAL:: to_double(a.approx()); } }; class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& a ) const { ; return a.approx().pair(); } }; class Is_finite : public std::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { return ::CGAL:: is_finite(x.approx()) || ::CGAL:: is_finite(x.exact()); } }; }; template class Lazy_exact_nt_coercion_traits_base { public: typedef Tag_false Are_explicit_interoperable; typedef Tag_false Are_implicit_interoperable; typedef Null_functor Cast; }; template class Lazy_exact_nt_coercion_traits_base < Lazy_exact_nt, Lazy_exact_nt, Tag_true > { typedef Coercion_traits CT; typedef Lazy_exact_nt A; typedef Lazy_exact_nt B; public: typedef Lazy_exact_nt Type; typedef typename CT::Are_implicit_interoperable Are_explicit_interoperable; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; class Cast{ private: template Type cast(const T& x) const{ return Type(x); } Type cast(const Type& x) const{ return x; } public: typedef Type result_type; Type operator()(const A& x) const { return cast(x);} Type operator()(const B& x) const { return cast(x);} }; }; template struct Coercion_traits< Lazy_exact_nt , Lazy_exact_nt >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Lazy_exact_nt Type; struct Cast{ typedef Type result_type; Type operator()(const Lazy_exact_nt& x) const {return x;} }; }; template struct Coercion_traits< ET , Lazy_exact_nt >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Lazy_exact_nt Type; struct Cast{ typedef Type result_type; Type operator()(const Lazy_exact_nt& x) const { return x;} Type operator()(const ET& x) const { return Type(x);} }; }; template struct Coercion_traits< Lazy_exact_nt , ET >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Lazy_exact_nt Type; struct Cast{ typedef Type result_type; Type operator()(const Lazy_exact_nt& x) const { return x;} Type operator()(const ET& x) const { return Type(x);} }; }; template struct Coercion_traits< Lazy_exact_nt, Lazy_exact_nt > :public Lazy_exact_nt_coercion_traits_base , Lazy_exact_nt, typename Coercion_traits::Are_implicit_interoperable>{}; # 1164 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Lazy_exact_nt.h" template struct Coercion_traits< int, Lazy_exact_nt >{ private: typedef Coercion_traits CT; typedef Lazy_exact_nt NT; public: typedef typename CT::Are_explicit_interoperable Are_explicit_interoperable; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; private: static const bool interoperable =boost::is_same< Are_implicit_interoperable, Tag_false>::value; public: typedef typename boost::mpl::if_c ::type Type; typedef typename boost::mpl::if_c >::type Cast; }; template struct Coercion_traits< Lazy_exact_nt, int > :public Coercion_traits >{}; template struct Coercion_traits< short, Lazy_exact_nt >{ private: typedef Coercion_traits CT; typedef Lazy_exact_nt NT; public: typedef typename CT::Are_explicit_interoperable Are_explicit_interoperable; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; private: static const bool interoperable =boost::is_same< Are_implicit_interoperable, Tag_false>::value; public: typedef typename boost::mpl::if_c ::type Type; typedef typename boost::mpl::if_c >::type Cast; }; template struct Coercion_traits< Lazy_exact_nt, short > :public Coercion_traits >{}; template struct Coercion_traits< double, Lazy_exact_nt >{ private: typedef Coercion_traits CT; typedef Lazy_exact_nt NT; public: typedef typename CT::Are_explicit_interoperable Are_explicit_interoperable; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; private: static const bool interoperable =boost::is_same< Are_implicit_interoperable, Tag_false>::value; public: typedef typename boost::mpl::if_c ::type Type; typedef typename boost::mpl::if_c >::type Cast; }; template struct Coercion_traits< Lazy_exact_nt, double > :public Coercion_traits >{}; template struct Coercion_traits< float, Lazy_exact_nt >{ private: typedef Coercion_traits CT; typedef Lazy_exact_nt NT; public: typedef typename CT::Are_explicit_interoperable Are_explicit_interoperable; typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable; private: static const bool interoperable =boost::is_same< Are_implicit_interoperable, Tag_false>::value; public: typedef typename boost::mpl::if_c ::type Type; typedef typename boost::mpl::if_c >::type Cast; }; template struct Coercion_traits< Lazy_exact_nt, float > :public Coercion_traits >{}; namespace INTERN_LAZY_EXACT_NT { template < typename NT, typename TAG > class Fraction_traits_base; template < class ET > class Fraction_traits_base , CGAL::Tag_false> : public Fraction_traits { public: typedef Lazy_exact_nt Type; }; template < class ET > class Fraction_traits_base , CGAL::Tag_true>{ typedef Fraction_traits ETT; typedef typename ETT::Numerator_type ET_numerator; typedef typename ETT::Denominator_type ET_denominator; public: typedef Lazy_exact_nt Type; typedef Tag_true Is_fraction; typedef Lazy_exact_nt Numerator_type; typedef Lazy_exact_nt Denominator_type; struct Common_factor : std::binary_function{ Denominator_type operator()(const Denominator_type& a, const Denominator_type& b) const { typename ETT::Common_factor common_factor; return Denominator_type(common_factor(a.exact(),b.exact())); } }; struct Compose : std::binary_function{ Type operator()(const Numerator_type& n, const Denominator_type& d) const { typename ETT::Compose compose; return Type(compose(n.exact(),d.exact())); } }; struct Decompose { typedef void result_type; typedef Type first_argument_type; typedef Numerator_type second_argument_type; typedef Denominator_type third_argument_type; void operator()(const Type& f, Numerator_type& n, Denominator_type& d) const { typename ETT::Decompose decompose; ET_numerator nn; ET_denominator dd; decompose(f.exact(),nn,dd); n = Numerator_type(nn); d = Denominator_type(dd); } }; }; } template < class ET > class Fraction_traits< Lazy_exact_nt< ET > > :public INTERN_LAZY_EXACT_NT::Fraction_traits_base, typename Fraction_traits::Is_fraction> {}; template < class ET > struct Min > : public std::binary_function,Lazy_exact_nt,Lazy_exact_nt > { Lazy_exact_nt operator()( const Lazy_exact_nt& x, const Lazy_exact_nt& y) const { if (x.identical(y)){ return x; } Uncertain res = x.approx() < y.approx(); if(is_certain(res)){ return res.make_certain() ? x : y; } ; return new Lazy_exact_Min(x, y); } }; template < class ET > struct Max > : public std::binary_function,Lazy_exact_nt,Lazy_exact_nt > { Lazy_exact_nt operator()( const Lazy_exact_nt& x, const Lazy_exact_nt& y) const { if (x.identical(y)){ return x; } Uncertain res = x.approx() > y.approx(); if(is_certain(res)){ return res.make_certain() ? x : y; } ; return new Lazy_exact_Max(x, y); } }; template inline Lazy_exact_nt min ( const Lazy_exact_nt & x, const Lazy_exact_nt & y){ return CGAL::Min > ()(x,y); } template inline Lazy_exact_nt max ( const Lazy_exact_nt & x, const Lazy_exact_nt & y){ return CGAL::Max > ()(x,y); } template std::ostream & operator<< (std::ostream & os, const Lazy_exact_nt & a) { return os << ::CGAL:: to_double(a); } template std::istream & operator>> (std::istream & is, Lazy_exact_nt & a) { ET e; is >> e; if (is) a = e; return is; } template< class ET > class Is_valid< Lazy_exact_nt > : public std::unary_function< Lazy_exact_nt, bool > { public : bool operator()( const Lazy_exact_nt& x ) const { return is_valid(x.approx()); } }; template < typename ET > struct NT_converter < Lazy_exact_nt, ET > { const ET& operator()(const Lazy_exact_nt &a) const { return a.exact(); } }; namespace internal { template < typename ET > inline bool fit_in_double(const Lazy_exact_nt& l, double& r) { return fit_in_double(l.approx(), r); } } template void print(std::ostream &os, const CGAL::Lazy_exact_nt< Sqrt_extension > &r) { print(os,r.exact()); } namespace INTERN_LAZY_EXACT_NT { template< typename ET , typename Tag> class Modular_traits_base{ public: typedef Lazy_exact_nt NT; typedef ::CGAL::Tag_false Is_modularizable; typedef ::CGAL::Null_functor Residue_type; typedef ::CGAL::Null_functor Modular_image; typedef ::CGAL::Null_functor Modular_image_representative; }; template< typename ET > class Modular_traits_base{ typedef Modular_traits MT_ET; public: typedef Lazy_exact_nt NT; typedef CGAL::Tag_true Is_modularizable; typedef typename MT_ET::Residue_type Residue_type; struct Modular_image{ Residue_type operator()(const NT& a){ typename MT_ET::Modular_image modular_image; return modular_image(a.exact()); } }; struct Modular_image_representative{ NT operator()(const Residue_type& x){ typename MT_ET::Modular_image_representative modular_image_representative; return NT(modular_image_representative(x)); } }; }; } template < typename ET > class Modular_traits > :public INTERN_LAZY_EXACT_NT::Modular_traits_base ::Is_modularizable>{}; } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Exact_type_selector.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmp_coercion_traits.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmp_coercion_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmp.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmp.h" # 1 "/usr/include/gmp.h" 1 3 4 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/gmp.h" 2 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" 2 # 1 "/usr/include/mpfr.h" 1 3 4 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" 2 namespace CGAL { struct Gmpz_rep { mpz_t mpZ; Gmpz_rep() {} ~Gmpz_rep() { __gmpz_clear(mpZ); } private: Gmpz_rep(const Gmpz_rep &); Gmpz_rep & operator= (const Gmpz_rep &); }; class Gmpz : Handle_for, boost::ordered_euclidian_ring_operators1< Gmpz , boost::ordered_euclidian_ring_operators2< Gmpz, int , boost::ordered_euclidian_ring_operators2< Gmpz, long , boost::ordered_euclidian_ring_operators2< Gmpz, unsigned long , boost::shiftable< Gmpz , long , boost::unit_steppable > > > > > > { typedef Handle_for Base; public: typedef Tag_true Has_gcd; typedef Tag_true Has_division; typedef Tag_true Has_sqrt; typedef Tag_true Has_exact_ring_operations; typedef Tag_true Has_exact_division; typedef Tag_false Has_exact_sqrt; Gmpz() { __gmpz_init(mpz()); } Gmpz(const mpz_t z) { __gmpz_init_set(mpz(), z); } Gmpz(int i) { __gmpz_init_set_si(mpz(), i); } Gmpz(long l) { __gmpz_init_set_si(mpz(), l); } Gmpz(unsigned long l) { __gmpz_init_set_ui(mpz(), l); } Gmpz(double d) { (CGAL::possibly(is_integer(d))?(static_cast(0)): ::CGAL::warning_fail( "is_integer(d)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 102, "Gmpz constructed from non-integer double value")); (CGAL::possibly(is_finite(d))?(static_cast(0)): ::CGAL::assertion_fail( "is_finite(d)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 103)); __gmpz_init_set_d(mpz(), d); } Gmpz(const std::string& str, int base = 10) { __gmpz_init_set_str(mpz(), str.c_str(), base); } size_t bit_size() const { return __gmpz_sizeinbase(mpz(),2); } size_t size() const { return __gmpz_size(mpz()) / (__gmp_bits_per_limb/8); } size_t approximate_decimal_length() const { return __gmpz_sizeinbase(mpz(),10); } double to_double() const {return __gmpz_get_d(mpz());} Sign sign() const { return static_cast(((mpz())->_mp_size < 0 ? -1 : (mpz())->_mp_size > 0));} const mpz_t & mpz() const { return Ptr()->mpZ; } mpz_t & mpz() { return ptr()->mpZ; } # 139 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" Gmpz& operator+=(const Gmpz& z){ Gmpz Res; __gmpz_add(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; Gmpz& operator-=(const Gmpz& z){ Gmpz Res; __gmpz_sub(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; Gmpz& operator*=(const Gmpz& z){ Gmpz Res; __gmpz_mul(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; Gmpz& operator/=(const Gmpz& z){ Gmpz Res; __gmpz_tdiv_q(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; Gmpz& operator%=(const Gmpz& z){ Gmpz Res; __gmpz_tdiv_r(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; Gmpz& operator&=(const Gmpz& z){ Gmpz Res; __gmpz_and(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; Gmpz& operator|=(const Gmpz& z){ Gmpz Res; __gmpz_ior(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; Gmpz& operator^=(const Gmpz& z){ Gmpz Res; __gmpz_xor(Res.mpz(), mpz(), z.mpz()); swap(Res); return *this; }; bool operator<(const Gmpz &b) const { return __gmpz_cmp(this->mpz(), b.mpz()) < 0; } bool operator==(const Gmpz &b) const { return __gmpz_cmp(this->mpz(), b.mpz()) == 0; } Gmpz operator+() const {return Gmpz( mpz() );} Gmpz operator-() const { Gmpz Res; __gmpz_neg(Res.mpz(), mpz()); return Res; } Gmpz& operator <<= (const unsigned long& i){ Gmpz Res; __gmpz_mul_2exp(Res.mpz(),this->mpz(), i); swap(Res); return *this; } Gmpz& operator >>= (const unsigned long& i){ Gmpz Res; __gmpz_tdiv_q_2exp(Res.mpz(),this->mpz(), i); swap(Res); return *this; } Gmpz& operator++(){return *this+=1;} Gmpz& operator--(){return *this-=1;} Gmpz& operator+=(int i); Gmpz& operator-=(int i); Gmpz& operator*=(int i); Gmpz& operator/=(int i); bool operator==(int i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __builtin_constant_p (i) && (i) > 0 ? __gmpz_cmp_ui (this->mpz(), (static_cast (i))) : __gmpz_cmp_si (this->mpz(),i)) == 0;}; bool operator< (int i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __builtin_constant_p (i) && (i) > 0 ? __gmpz_cmp_ui (this->mpz(), (static_cast (i))) : __gmpz_cmp_si (this->mpz(),i)) < 0;}; bool operator> (int i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __builtin_constant_p (i) && (i) > 0 ? __gmpz_cmp_ui (this->mpz(), (static_cast (i))) : __gmpz_cmp_si (this->mpz(),i)) > 0;}; Gmpz& operator+=(long i); Gmpz& operator-=(long i); Gmpz& operator*=(long i); Gmpz& operator/=(long i); bool operator==(long i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __builtin_constant_p (i) && (i) > 0 ? __gmpz_cmp_ui (this->mpz(), (static_cast (i))) : __gmpz_cmp_si (this->mpz(),i)) == 0;}; bool operator< (long i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __builtin_constant_p (i) && (i) > 0 ? __gmpz_cmp_ui (this->mpz(), (static_cast (i))) : __gmpz_cmp_si (this->mpz(),i)) < 0;}; bool operator> (long i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __builtin_constant_p (i) && (i) > 0 ? __gmpz_cmp_ui (this->mpz(), (static_cast (i))) : __gmpz_cmp_si (this->mpz(),i)) > 0;}; Gmpz& operator+=(unsigned long i); Gmpz& operator-=(unsigned long i); Gmpz& operator*=(unsigned long i); Gmpz& operator/=(unsigned long i); bool operator==(unsigned long i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __gmpz_cmp_ui (this->mpz(),i)) == 0;}; bool operator< (unsigned long i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __gmpz_cmp_ui (this->mpz(),i)) < 0;}; bool operator> (unsigned long i) const {return (__builtin_constant_p (i) && (i) == 0 ? ((this->mpz())->_mp_size < 0 ? -1 : (this->mpz())->_mp_size > 0) : __gmpz_cmp_ui (this->mpz(),i)) > 0;}; }; # 217 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" inline Gmpz& Gmpz::operator*=(int z) { Gmpz Res; __gmpz_mul_si(Res.mpz(), mpz(), z); swap(Res); return *this; } inline Gmpz& Gmpz::operator*=(long z) { Gmpz Res; __gmpz_mul_si(Res.mpz(), mpz(), z); swap(Res); return *this; } inline Gmpz& Gmpz::operator+=(unsigned long z) { Gmpz Res; __gmpz_add_ui(Res.mpz(), mpz(), z); swap(Res); return *this; } inline Gmpz& Gmpz::operator-=(unsigned long z) { Gmpz Res; __gmpz_sub_ui(Res.mpz(), mpz(), z); swap(Res); return *this; } inline Gmpz& Gmpz::operator*=(unsigned long z) { Gmpz Res; __gmpz_mul_ui(Res.mpz(), mpz(), z); swap(Res); return *this; } inline Gmpz& Gmpz::operator/=(unsigned long z) { Gmpz Res; __gmpz_tdiv_q_ui(Res.mpz(), mpz(), z); swap(Res); return *this; } inline Gmpz& Gmpz::operator+=(int i) { Gmpz Res; if (i >= 0) __gmpz_add_ui(Res.mpz(), mpz(), i); else __gmpz_sub_ui(Res.mpz(), mpz(), -i); swap(Res); return *this; } inline Gmpz& Gmpz::operator+=(long i) { Gmpz Res; if (i >= 0) __gmpz_add_ui(Res.mpz(), mpz(), i); else __gmpz_sub_ui(Res.mpz(), mpz(), -i); swap(Res); return *this; } inline Gmpz& Gmpz::operator-=(int i){return *this+=-i;} inline Gmpz& Gmpz::operator-=(long i){return *this+=-i;} inline Gmpz& Gmpz::operator/=(int b) { if (b>0) { Gmpz Res; __gmpz_tdiv_q_ui(Res.mpz(), mpz(), b); swap(Res); return *this; } return *this /= Gmpz(b); } inline Gmpz& Gmpz::operator/=(long b) { if (b>0) { Gmpz Res; __gmpz_tdiv_q_ui(Res.mpz(), mpz(), b); swap(Res); return *this; } return *this /= Gmpz(b); } inline std::ostream& operator<<(std::ostream& os, const Gmpz &z) { char *str = new char [__gmpz_sizeinbase(z.mpz(),10) + 2]; str = __gmpz_get_str(str, 10, z.mpz()); os << str ; delete[] str; return os; } inline void gmpz_eat_white_space(std::istream &is) { std::istream::int_type c; do { c= is.peek(); if (c== std::istream::traits_type::eof()) return; else { std::istream::char_type cc= c; if ( std::isspace(cc, std::locale::classic()) ) { is.get(); (CGAL::possibly(!is.fail())?(static_cast(0)): ::CGAL::assertion_fail( "!is.fail()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 298)); } else { return; } } } while (true); } inline std::istream & gmpz_new_read(std::istream &is, Gmpz &z) { bool negative = false; const std::istream::char_type zero = '0'; std::istream::int_type c; Gmpz r; std::ios::fmtflags old_flags = is.flags(); is.unsetf(std::ios::skipws); gmpz_eat_white_space(is); c=is.peek(); if (c=='-' || c=='+'){ is.get(); (CGAL::possibly(!is.fail())?(static_cast(0)): ::CGAL::assertion_fail( "!is.fail()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 323)); negative=(c=='-'); gmpz_eat_white_space(is); c=is.peek(); } std::istream::char_type cc= c; if (c== std::istream::traits_type::eof() || !std::isdigit(cc, std::locale::classic() ) ){ is.setstate(std::ios_base::failbit); } else { (CGAL::possibly(cc==c)?(static_cast(0)): ::CGAL::assertion_fail( "cc==c" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 335)); r= cc-zero; is.get(); (CGAL::possibly(!is.fail())?(static_cast(0)): ::CGAL::assertion_fail( "!is.fail()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 338)); while (true) { c=is.peek(); if (c== std::istream::traits_type::eof()) { break; } cc=c; if ( !std::isdigit(cc, std::locale::classic() )) { break; } is.get(); (CGAL::possibly(!is.fail())?(static_cast(0)): ::CGAL::assertion_fail( "!is.fail()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 349)); (CGAL::possibly(cc==c)?(static_cast(0)): ::CGAL::assertion_fail( "cc==c" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h", 350)); r= r*10+(cc-zero); } } is.flags(old_flags); if (!is.fail()) { if (negative) { z=-r; } else { z=r; } } return is; } # 409 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" inline std::istream& operator>>(std::istream& is, Gmpz &z) { return gmpz_new_read(is, z); } template <> struct Split_double { void operator()(double d, Gmpz &num, Gmpz &den) const { std::pair p = split_numerator_denominator(d); num = Gmpz(p.first); den = Gmpz(p.second); } }; inline Gmpz min (const Gmpz& x,const Gmpz& y){ return (x<=y)?x:y; } inline Gmpz max (const Gmpz& x,const Gmpz& y){ return (x>=y)?x:y; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/GMP.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/GMP.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/auto_link.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/GMP.h" 2 # 436 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/MPFR.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/MPFR.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/auto_link.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/auto_link/MPFR.h" 2 # 437 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpz_type.h" 2 } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmp_coercion_traits.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h" # 1 "/usr/include/mpfr.h" 1 3 4 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h" 2 namespace CGAL { class Gmpzf; bool operator<(const Gmpzf &a, const Gmpzf &b); bool operator==(const Gmpzf &a, const Gmpzf &b); bool operator<(const Gmpzf &a, int b); bool operator==(const Gmpzf &a, int b); bool operator>(const Gmpzf &a, int b); Gmpzf approximate_sqrt(const Gmpzf &f); struct Gmpzf_rep { mpz_t mpZ; Gmpzf_rep() {} ~Gmpzf_rep() { __gmpz_clear(mpZ); } private: Gmpzf_rep(const Gmpzf_rep &); Gmpzf_rep & operator= (const Gmpzf_rep &); }; class Gmpzf : Handle_for, boost::ordered_euclidian_ring_operators1< Gmpzf , boost::ordered_euclidian_ring_operators2< Gmpzf, int > > { typedef Handle_for Base; public: typedef long Exponent; friend Gmpzf approximate_sqrt(const Gmpzf &f); private: Exponent e; public: const mpz_t& man() const { return Ptr()->mpZ; } mpz_t& man() { return ptr()->mpZ; } const Exponent& exp() const { return e; } Gmpzf( ) : e(0) { __gmpz_init(man()); (CGAL::possibly(is_canonical())?(static_cast(0)): ::CGAL::postcondition_fail( "is_canonical()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h", 124)); } Gmpzf(const mpz_t z) : e(0) { __gmpz_init_set(man(), z); canonicalize(); } Gmpzf(const Gmpz& n ) : e(0) { __gmpz_init_set(man(), n.mpz()); canonicalize(); } Gmpzf( int i) : e(0) { __gmpz_init_set_si( man(), i); canonicalize(); } Gmpzf( long l) : e(0) { __gmpz_init_set_si( man(), l); canonicalize(); } Gmpzf( double d) { Protect_FPU_rounding<> P(FE_TONEAREST); if (d == 0) { __gmpz_init (man()); e = 0; return; } static int p = std::numeric_limits::digits; (CGAL::possibly(::CGAL:: is_finite(d) & is_valid(d))?(static_cast(0)): ::CGAL::assertion_fail( "CGAL_NTS is_finite(d) & is_valid(d)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h", 167)); int exp; double x = std::frexp(d, &exp); __gmpz_init_set_d (man(), std::ldexp( x, p)); e = exp - p; canonicalize(); } Gmpzf operator+() const; Gmpzf operator-() const; Gmpzf& operator+=( const Gmpzf& b); Gmpzf& operator+=( int i); Gmpzf& operator-=( const Gmpzf& b); Gmpzf& operator-=( int i); Gmpzf& operator*=( const Gmpzf& b); Gmpzf& operator*=( int i); Gmpzf& div(const Gmpzf& b); Gmpzf& operator%= (const Gmpzf& b); Gmpzf& div(int i); Gmpzf& operator%= (int i); bool is_zero() const; Sign sign() const; Gmpzf integral_division(const Gmpzf& b) const; Gmpzf gcd (const Gmpzf& b) const; Comparison_result compare (const Gmpzf &b) const; double to_double() const ; std::pair to_interval() const ; std::pair to_double_exp() const; std::pair, long> to_interval_exp() const ; private: void canonicalize(); bool is_canonical() const; static void align ( const mpz_t*& a_aligned, const mpz_t*& b_aligned, Exponent& rexp, const Gmpzf& a, const Gmpzf& b); }; # 216 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h" inline Gmpzf Gmpzf::operator+() const { return *this; } inline Gmpzf Gmpzf::operator-() const { Gmpzf result; __gmpz_neg (result.man(), man()); result.e = exp(); (CGAL::possibly(is_canonical())?(static_cast(0)): ::CGAL::postcondition_fail( "is_canonical()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h", 228)); return result; } inline Gmpzf& Gmpzf::operator+=( const Gmpzf& b) { Gmpzf result; if (b.is_zero()) return *this; const mpz_t *a_aligned, *b_aligned; align (a_aligned, b_aligned, e, *this, b); __gmpz_add(result.man(), *a_aligned, *b_aligned); swap(result); canonicalize(); return(*this); } inline Gmpzf& Gmpzf::operator+=( int i) { return operator+=(Gmpzf (i)); } inline Gmpzf& Gmpzf::operator-=( const Gmpzf& b) { Gmpzf result; if (b.is_zero()) return *this; const mpz_t *a_aligned, *b_aligned; align (a_aligned, b_aligned, e, *this, b); __gmpz_sub(result.man(), *a_aligned, *b_aligned); swap(result); canonicalize(); return(*this); } inline Gmpzf& Gmpzf::operator-=( int i) { return operator-=(Gmpzf (i)); } inline Gmpzf& Gmpzf::operator*=( const Gmpzf& b) { Gmpzf result; __gmpz_mul(result.man(), man(), b.man()); e += b.exp(); swap (result); canonicalize(); return *this; } inline Gmpzf& Gmpzf::operator*=( int i) { Gmpzf result; __gmpz_mul_si(result.man(), man(), i); swap (result); canonicalize(); return *this; } inline Gmpzf& Gmpzf::div(const Gmpzf& b) { (CGAL::possibly(!b.is_zero())?(static_cast(0)): ::CGAL::precondition_fail( "!b.is_zero()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h", 299)); Gmpzf result; const mpz_t *a_aligned, *b_aligned; align (a_aligned, b_aligned, e, *this, b); __gmpz_tdiv_q (result.man(), *a_aligned, *b_aligned); e = 0; swap(result); canonicalize(); return(*this); } inline Gmpzf& Gmpzf::operator%= (const Gmpzf& b) { (CGAL::possibly(!b.is_zero())?(static_cast(0)): ::CGAL::precondition_fail( "!b.is_zero()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h", 313)); Gmpzf result; const mpz_t *a_aligned, *b_aligned; align (a_aligned, b_aligned, e, *this, b); __gmpz_tdiv_r (result.man(), *a_aligned, *b_aligned); swap(result); canonicalize(); return(*this); } inline Gmpzf& Gmpzf::div(int i) { return div(Gmpzf(i)); } inline Gmpzf& Gmpzf::operator%= (int i) { return operator%= (Gmpzf(i)); } inline bool Gmpzf::is_zero() const { return ((man())->_mp_size < 0 ? -1 : (man())->_mp_size > 0) == 0; } inline Sign Gmpzf::sign() const { return static_cast(((man())->_mp_size < 0 ? -1 : (man())->_mp_size > 0)); } inline Gmpzf Gmpzf::integral_division(const Gmpzf& b) const { Gmpzf result; __gmpz_divexact(result.man(), man(), b.man()); result.e = exp()-b.exp(); result.canonicalize(); (CGAL::possibly(*this == b * result)?(static_cast(0)): ::CGAL::postcondition_fail( "*this == b * result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h", 354)); return result; } inline Gmpzf Gmpzf::gcd (const Gmpzf& b) const { Gmpzf result; __gmpz_gcd (result.man(), man(), b.man()); result.canonicalize(); return result; } inline Gmpzf approximate_sqrt(const Gmpzf &f) { Gmpzf result; if (f.exp() % 2 == 0) { __gmpz_set (result.man(), f.man()); } else { __gmpz_mul_2exp (result.man(), f.man(), 1); } __gmpz_sqrt(result.man(), result.man()); result.e = f.exp() / 2; result.canonicalize(); return result; } inline Comparison_result Gmpzf::compare (const Gmpzf &b) const { const mpz_t *a_aligned, *b_aligned; Exponent rexp; align (a_aligned, b_aligned, rexp, *this, b); int c = __gmpz_cmp(*a_aligned, *b_aligned); if (c < 0) return SMALLER; if (c > 0) return LARGER; return EQUAL; } inline double Gmpzf::to_double() const { Exponent k; double l = __gmpz_get_d_2exp (&k, man()); return std::ldexp(l, k+exp()); } inline std::pair Gmpzf::to_double_exp() const { Exponent k = 0; double l = __gmpz_get_d_2exp (&k, man()); return std::pair(l, k+exp()); } inline std::pair, long> Gmpzf::to_interval_exp() const { long k = 0; double l = __gmpz_get_d_2exp (&k, man()); double u = l; if (l < 0) l -= std::ldexp(1.0, -53); else u += std::ldexp(1.0, -53); return std::pair, long> (std::pair(l, u), k + exp()); } inline std::pair Gmpzf::to_interval() const { std::pair, long> lue = to_interval_exp(); double l = lue.first.first; double u = lue.first.second; long k = lue.second; return std::pair (std::ldexp (l, k), std::ldexp (u, k)); } inline void Gmpzf::canonicalize() { if (!is_zero()) { unsigned long zeros = __gmpz_scan1(man(), 0); __gmpz_tdiv_q_2exp( man(), man(), zeros); e += zeros; } else { e = 0; } (CGAL::possibly(is_canonical())?(static_cast(0)): ::CGAL::postcondition_fail( "is_canonical()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpzf_type.h", 464)); } inline bool Gmpzf::is_canonical() const { return (is_zero() && e==0) || (((man())->_mp_size != 0) & (static_cast ((man())->_mp_d[0]))); } inline void Gmpzf::align ( const mpz_t*& a_aligned, const mpz_t*& b_aligned, Exponent& rexp, const Gmpzf& a, const Gmpzf& b) { static Gmpz s; switch (::CGAL:: compare (b.exp(), a.exp())) { case SMALLER: { __gmpz_mul_2exp (s.mpz(), a.man(), a.exp() - b.exp()); const mpz_t& smpzref = s.mpz(); a_aligned = &smpzref; const mpz_t& bmanref = b.man(); b_aligned = &bmanref; rexp = b.exp(); break; } case LARGER: { __gmpz_mul_2exp (s.mpz(), b.man(), b.exp() - a.exp()); const mpz_t& amanref = a.man(); a_aligned = &amanref; const mpz_t& smpzref = s.mpz(); b_aligned = &smpzref; rexp = a.exp(); break; } case EQUAL: { const mpz_t& amanref = a.man(); a_aligned = &amanref; const mpz_t& bmanref = b.man(); b_aligned = &bmanref; rexp = a.exp(); } } } inline std::ostream& operator<< (std::ostream& os, const Gmpzf& a) { return os << a.to_double(); } inline std::ostream& print (std::ostream& os, const Gmpzf& a) { return os << a.man() << "*2^" << a.exp(); } inline std::istream& operator>> ( std::istream& is, Gmpzf& a) { double d; is >> d; if (is.good()) a = Gmpzf(d); return is; } inline bool operator<(const Gmpzf &a, const Gmpzf &b) { return a.compare(b) == SMALLER; } inline bool operator==(const Gmpzf &a, const Gmpzf &b) { return ( (__gmpz_cmp(a.man(), b.man()) == 0) && a.exp() == b.exp() ); } inline bool operator<(const Gmpzf &a, int b) { return operator<(a, Gmpzf(b)); } inline bool operator==(const Gmpzf &a, int b) { return operator==(a, Gmpzf(b)); } inline bool operator>(const Gmpzf &a, int b) { return operator>(a, Gmpzf(b)); } inline Gmpzf min (const Gmpzf& x,const Gmpzf& y){ return (x<=y)?x:y; } inline Gmpzf max (const Gmpzf& x,const Gmpzf& y){ return (x>=y)?x:y; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmp_coercion_traits.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" 1 # 23 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" # 1 "/usr/include/mpfr.h" 1 3 4 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ipower.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ipower.h" namespace CGAL { template inline NT ipower(const NT& base, int expn) { (CGAL::possibly(expn >= 0)?(static_cast(0)): ::CGAL::precondition_fail( "expn >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ipower.h", 35)); if (expn == 0) return NT(1); if (expn == 1) return base; int e = expn, msb = 0; while (e >>= 1) msb++; NT res = base; int b = 1<>= 1) { res *= res; if (expn & b) res *= base; } return res; } template inline NT ipower(const NT& base, long expn) { (CGAL::possibly(expn >= 0)?(static_cast(0)): ::CGAL::precondition_fail( "expn >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/ipower.h", 59)); if (expn == 0) return NT(1); if (expn == 1) return base; int e = expn, msb = 0; while (e >>= 1) msb++; NT res = base; int b = 1<>= 1) { res *= res; if (expn & b) res *= base; } return res; } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" 2 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" namespace CGAL{ class Gmpfr; bool operator<(const Gmpfr&,const Gmpfr&); bool operator==(const Gmpfr&,const Gmpfr&); bool operator<(const Gmpfr&,long); bool operator>(const Gmpfr&,long); bool operator==(const Gmpfr&,long); bool operator<(const Gmpfr&,unsigned long); bool operator>(const Gmpfr&,unsigned long); bool operator==(const Gmpfr&,unsigned long); bool operator<(const Gmpfr&,int); bool operator>(const Gmpfr&,int); bool operator==(const Gmpfr&,int); bool operator<(const Gmpfr&,double); bool operator>(const Gmpfr&,double); bool operator==(const Gmpfr&,double); bool operator<(const Gmpfr&,long double); bool operator>(const Gmpfr&,long double); bool operator==(const Gmpfr&,long double); bool operator<(const Gmpfr&,const Gmpz&); bool operator>(const Gmpfr&,const Gmpz&); bool operator==(const Gmpfr&,const Gmpz&); struct Gmpfr_rep{ mpfr_t floating_point_number; bool clear_on_destruction; Gmpfr_rep():clear_on_destruction(true){} ~Gmpfr_rep(){ if(clear_on_destruction) mpfr_clear(floating_point_number); } }; namespace internal{ template <> struct Minmax_traits{ static const mpfr_rnd_t min=MPFR_RNDN; static const mpfr_rnd_t max=MPFR_RNDF; }; } # 105 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" class Gmpfr: Handle_for, boost::ordered_euclidian_ring_operators1 > > > > > > { private: typedef Handle_for Base; static Uncertain _gmp_rnd(std::float_round_style r){ switch(r){ case std::round_toward_infinity: return MPFR_RNDU; case std::round_toward_neg_infinity: return MPFR_RNDD; case std::round_toward_zero: return MPFR_RNDZ; case std::round_to_nearest: return MPFR_RNDN; default: return Uncertain::indeterminate(); } }; static std::float_round_style _cgal_rnd(mpfr_rnd_t r){ switch(r){ case MPFR_RNDU: return std::round_toward_infinity; case MPFR_RNDD: return std::round_toward_neg_infinity; case MPFR_RNDZ: return std::round_toward_zero; case MPFR_RNDN: return std::round_to_nearest; default: return std::round_indeterminate; } }; public: typedef mpfr_prec_t Precision_type; mpfr_srcptr fr()const{ return Ptr()->floating_point_number; } mpfr_ptr fr(){ return ptr()->floating_point_number; } # 179 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" void dont_clear_on_destruction(){ ptr()->clear_on_destruction=false; } bool is_unique(){ return unique(); } Gmpfr(){ mpfr_init(fr()); } Gmpfr(mpfr_srcptr f){ do { mpfr_ptr _x = (fr()); mpfr_exp_t _e; mpfr_kind_t _t; mpfr_int _s, _k; _k = (( (f)->_mpfr_exp > (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_REGULAR_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_INF_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_NAN_KIND : (mpfr_int) MPFR_ZERO_KIND * ((f)->_mpfr_sign) )); if (_k >= 0) { _t = (mpfr_kind_t) _k; _s = 1; } else { _t = (mpfr_kind_t) -( (f)->_mpfr_exp > (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_REGULAR_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_INF_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_NAN_KIND : (mpfr_int) MPFR_ZERO_KIND * ((f)->_mpfr_sign) ); _s = -1; } _e = _t == MPFR_REGULAR_KIND ? (((f)->_mpfr_exp)) : _t == MPFR_NAN_KIND ? (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) : _t == MPFR_INF_KIND ? (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) : (0 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))); _x->_mpfr_prec = ((0 ? ((f)->_mpfr_prec) : ((f)->_mpfr_prec))); _x->_mpfr_sign = _s; _x->_mpfr_exp = _e; _x->_mpfr_d = (mp_limb_t*) (((mpfr_void*)((f)->_mpfr_d))); } while (0) ; dont_clear_on_destruction(); (CGAL::possibly((((f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0 && ((fr())->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0) || (mpfr_unordered_p(f,fr())==0 && mpfr_equal_p(f,fr())!=0))?(static_cast(0)): ::CGAL::assertion_fail( "(mpfr_nan_p(f)!=0 && mpfr_nan_p(fr())!=0) || (mpfr_unordered_p(f,fr())==0 && mpfr_equal_p(f,fr())!=0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" # 209 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" , 211 # 209 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" )) ; } Gmpfr(mpfr_srcptr f, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 217)); if(p==(0 ? ((f)->_mpfr_prec) : ((f)->_mpfr_prec))){ do { mpfr_ptr _x = (fr()); mpfr_exp_t _e; mpfr_kind_t _t; mpfr_int _s, _k; _k = (( (f)->_mpfr_exp > (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_REGULAR_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_INF_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_NAN_KIND : (mpfr_int) MPFR_ZERO_KIND * ((f)->_mpfr_sign) )); if (_k >= 0) { _t = (mpfr_kind_t) _k; _s = 1; } else { _t = (mpfr_kind_t) -( (f)->_mpfr_exp > (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_REGULAR_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_INF_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_NAN_KIND : (mpfr_int) MPFR_ZERO_KIND * ((f)->_mpfr_sign) ); _s = -1; } _e = _t == MPFR_REGULAR_KIND ? (((f)->_mpfr_exp)) : _t == MPFR_NAN_KIND ? (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) : _t == MPFR_INF_KIND ? (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) : (0 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))); _x->_mpfr_prec = ((0 ? ((f)->_mpfr_prec) : ((f)->_mpfr_prec))); _x->_mpfr_sign = _s; _x->_mpfr_exp = _e; _x->_mpfr_d = (mp_limb_t*) (((mpfr_void*)((f)->_mpfr_d))); } while (0) ; dont_clear_on_destruction(); (CGAL::possibly((((f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0&&((fr())->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0)|| (mpfr_unordered_p(f,fr())==0&& mpfr_equal_p(f,fr())!=0))?(static_cast(0)): ::CGAL::assertion_fail( "(mpfr_nan_p(f)!=0&&mpfr_nan_p(fr())!=0)|| (mpfr_unordered_p(f,fr())==0&& mpfr_equal_p(f,fr())!=0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" # 226 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" , 228 # 226 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" )) ; }else{ mpfr_init2(fr(),p); mpfr_set4(fr(),f,_gmp_rnd(r),((f)->_mpfr_sign)); (CGAL::possibly((0 ? ((fr())->_mpfr_prec) : ((fr())->_mpfr_prec))<(0 ? ((f)->_mpfr_prec) : ((f)->_mpfr_prec))|| mpfr_equal_p(fr(),f)!=0)?(static_cast(0)): ::CGAL::assertion_fail( "mpfr_get_prec(fr())=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 238)); if(p==(0 ? ((f)->_mpfr_prec) : ((f)->_mpfr_prec))){ do { mpfr_ptr _x = (fr()); mpfr_exp_t _e; mpfr_kind_t _t; mpfr_int _s, _k; _k = (( (f)->_mpfr_exp > (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_REGULAR_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_INF_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_NAN_KIND : (mpfr_int) MPFR_ZERO_KIND * ((f)->_mpfr_sign) )); if (_k >= 0) { _t = (mpfr_kind_t) _k; _s = 1; } else { _t = (mpfr_kind_t) -( (f)->_mpfr_exp > (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_REGULAR_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_INF_KIND * ((f)->_mpfr_sign) : (f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (mpfr_int) MPFR_NAN_KIND : (mpfr_int) MPFR_ZERO_KIND * ((f)->_mpfr_sign) ); _s = -1; } _e = _t == MPFR_REGULAR_KIND ? (((f)->_mpfr_exp)) : _t == MPFR_NAN_KIND ? (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) : _t == MPFR_INF_KIND ? (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) : (0 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))); _x->_mpfr_prec = ((0 ? ((f)->_mpfr_prec) : ((f)->_mpfr_prec))); _x->_mpfr_sign = _s; _x->_mpfr_exp = _e; _x->_mpfr_d = (mp_limb_t*) (((mpfr_void*)((f)->_mpfr_d))); } while (0) ; dont_clear_on_destruction(); (CGAL::possibly((((f)->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0&&((fr())->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0)|| (mpfr_unordered_p(f,fr())==0&& mpfr_equal_p(f,fr())!=0))?(static_cast(0)): ::CGAL::assertion_fail( "(mpfr_nan_p(f)!=0&&mpfr_nan_p(fr())!=0)|| (mpfr_unordered_p(f,fr())==0&& mpfr_equal_p(f,fr())!=0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" # 247 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" , 249 # 247 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" )) ; }else{ mpfr_init2(fr(),p); mpfr_set4(fr(),f,mpfr_get_default_rounding_mode(),((f)->_mpfr_sign)); (CGAL::possibly(p<(0 ? ((f)->_mpfr_prec) : ((f)->_mpfr_prec))|| mpfr_equal_p(fr(),f)!=0)?(static_cast(0)): ::CGAL::assertion_fail( "p=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 261)); mpfr_init2(fr(),p); mpfr_set_z(fr(),f.man(),_gmp_rnd(r)); mpfr_mul_2si(fr(),fr(),f.exp(),_gmp_rnd(r)); } Gmpfr(Gmpzf f,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 268)); mpfr_init2(fr(),p); mpfr_set_z(fr(),f.man(),mpfr_get_default_rounding_mode()); mpfr_mul_2si(fr(), fr(), f.exp(), mpfr_get_default_rounding_mode()); } Gmpfr(Gmpzf f){ mpfr_init2(fr(), static_cast( __gmpz_sizeinbase(f.man(),2)<2? 2: __gmpz_sizeinbase(f.man(),2))); mpfr_set_z(fr(),f.man(),MPFR_RNDN); (CGAL::possibly(mpfr_cmp_z(fr(),f.man())==0)?(static_cast(0)): ::CGAL::assertion_fail( "mpfr_cmp_z(fr(),f.man())==0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" # 284 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" , 285 # 284 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" , "inexact conversion of a Gmpzf mantissa")) ; int inexact= mpfr_mul_2si(fr(),fr(),f.exp(),MPFR_RNDN); (CGAL::possibly(inexact==0)?(static_cast(0)): ::CGAL::assertion_fail( "inexact==0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 288, "inexact conversion from Gmpzf")); } Gmpfr(std::pair intexp, std::float_round_style r=Gmpfr::get_default_rndmode(), Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 294)); mpfr_init2(fr(),p); mpfr_set_z(fr(),intexp.first.mpz(),_gmp_rnd(r)); mpfr_mul_2si(fr(),fr(),intexp.second,_gmp_rnd(r)); } Gmpfr(std::pair intexp,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 301)); mpfr_init2(fr(),p); mpfr_set_z(fr(), intexp.first.mpz(), mpfr_get_default_rounding_mode()); mpfr_mul_2si(fr(), fr(), intexp.second, mpfr_get_default_rounding_mode()); } # 330 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" Gmpfr(int x, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 330)); mpfr_init2(fr(),p); mpfr_set_si(fr(),x,_gmp_rnd(r)); } Gmpfr(int x,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 330)); mpfr_init2(fr(),p); mpfr_set_si(fr(),x,mpfr_get_default_rounding_mode()); } Gmpfr(int x){ mpfr_init2(fr(),__gmp_bits_per_limb*sizeof(int)); mpfr_set_si(fr(),x,mpfr_get_default_rounding_mode()); }; Gmpfr(long x, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 331)); mpfr_init2(fr(),p); mpfr_set_si(fr(),x,_gmp_rnd(r)); } Gmpfr(long x,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 331)); mpfr_init2(fr(),p); mpfr_set_si(fr(),x,mpfr_get_default_rounding_mode()); } Gmpfr(long x){ mpfr_init2(fr(),__gmp_bits_per_limb*sizeof(long)); mpfr_set_si(fr(),x,mpfr_get_default_rounding_mode()); }; Gmpfr(unsigned x, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 332)); mpfr_init2(fr(),p); mpfr_set_ui(fr(),x,_gmp_rnd(r)); } Gmpfr(unsigned x,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 332)); mpfr_init2(fr(),p); mpfr_set_ui(fr(),x,mpfr_get_default_rounding_mode()); } Gmpfr(unsigned x){ mpfr_init2(fr(),__gmp_bits_per_limb*sizeof(unsigned)); mpfr_set_ui(fr(),x,mpfr_get_default_rounding_mode()); }; Gmpfr(unsigned long x, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 333)); mpfr_init2(fr(),p); mpfr_set_ui(fr(),x,_gmp_rnd(r)); } Gmpfr(unsigned long x,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 333)); mpfr_init2(fr(),p); mpfr_set_ui(fr(),x,mpfr_get_default_rounding_mode()); } Gmpfr(unsigned long x){ mpfr_init2(fr(),__gmp_bits_per_limb*sizeof(unsigned long)); mpfr_set_ui(fr(),x,mpfr_get_default_rounding_mode()); }; Gmpfr(double x, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 334)); mpfr_init2(fr(),p); mpfr_set_d(fr(),x,_gmp_rnd(r)); } Gmpfr(double x,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 334)); mpfr_init2(fr(),p); mpfr_set_d(fr(),x,mpfr_get_default_rounding_mode()); } Gmpfr(double x){ mpfr_init2(fr(),__gmp_bits_per_limb*sizeof(double)); mpfr_set_d(fr(),x,mpfr_get_default_rounding_mode()); }; # 352 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" Gmpfr(long double x, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 352)); mpfr_init2(fr(),p); mpfr_set_ld(fr(),x,_gmp_rnd(r)); } Gmpfr(long double x,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 352)); mpfr_init2(fr(),p); mpfr_set_ld(fr(),x,mpfr_get_default_rounding_mode()); } Gmpfr(long double x){ mpfr_init2(fr(),__gmp_bits_per_limb*sizeof(long double)); mpfr_set_ld(fr(),x,mpfr_get_default_rounding_mode()); }; # 375 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" Gmpfr(const Gmpz &x, std::float_round_style r, Gmpfr::Precision_type p=Gmpfr::get_default_precision()){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" # 375 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" , 379 # 375 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" )); mpfr_init2(fr(),p); mpfr_set_z(fr(),x.mpz(),_gmp_rnd(r)); } Gmpfr(const Gmpz &x,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" # 375 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" , 379 # 375 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" )); mpfr_init2(fr(),p); mpfr_set_z(fr(),x.mpz(),mpfr_get_default_rounding_mode()); } Gmpfr(const Gmpz &x){ Gmpfr::Precision_type p=(static_cast( x.bit_size())); mpfr_init2(fr(),2=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 401)); if(p==a.get_precision()){ Gmpfr temp(a); dont_clear_on_destruction(); swap(temp); }else { mpfr_init2(fr(),p); mpfr_set4(fr(),a.fr(),_gmp_rnd(r),((a.fr())->_mpfr_sign)); } } Gmpfr(const Gmpfr &a,Gmpfr::Precision_type p){ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 418)); if(p==a.get_precision()){ Gmpfr temp(a); dont_clear_on_destruction(); swap(temp); }else { mpfr_init2(fr(),p); mpfr_set4(fr(),a.fr(),mpfr_get_default_rounding_mode(),((a.fr())->_mpfr_sign)); } } static std::float_round_style get_default_rndmode(); static std::float_round_style set_default_rndmode(std::float_round_style); static Gmpfr::Precision_type get_default_precision(); static Gmpfr::Precision_type set_default_precision(Gmpfr::Precision_type); Gmpfr::Precision_type get_precision()const; Gmpfr round(Gmpfr::Precision_type,std::float_round_style)const; static void clear_flags(); static bool underflow_flag(); static bool overflow_flag(); static bool nan_flag(); static bool inex_flag(); static bool erange_flag(); Gmpfr operator+()const; Gmpfr operator-()const; Gmpfr& operator+=(const Gmpfr&); Gmpfr& operator-=(const Gmpfr&); Gmpfr& operator*=(const Gmpfr&); Gmpfr& operator/=(const Gmpfr&); Gmpfr& operator%=(const Gmpfr&); Gmpfr& operator+=(long); Gmpfr& operator-=(long); Gmpfr& operator*=(long); Gmpfr& operator/=(long); Gmpfr& operator+=(unsigned long); Gmpfr& operator-=(unsigned long); Gmpfr& operator*=(unsigned long); Gmpfr& operator/=(unsigned long); Gmpfr& operator+=(int); Gmpfr& operator-=(int); Gmpfr& operator*=(int); Gmpfr& operator/=(int); Gmpfr& operator+=(const Gmpz&); Gmpfr& operator-=(const Gmpz&); Gmpfr& operator*=(const Gmpz&); Gmpfr& operator/=(const Gmpz&); # 495 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" static Gmpfr add (const Gmpfr&, const Gmpfr&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, const Gmpfr&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, const Gmpfr&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, const Gmpfr&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, const Gmpfr&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, const Gmpfr&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, const Gmpfr&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, const Gmpfr&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, unsigned long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, unsigned long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, unsigned long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, unsigned long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, unsigned long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, unsigned long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, unsigned long, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, unsigned long, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, int, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, int, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, int, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, int, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, int, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, int, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, int, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, int, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, const Gmpz&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr add (const Gmpfr&, const Gmpz&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, const Gmpz&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr sub (const Gmpfr&, const Gmpz&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, const Gmpz&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr mul (const Gmpfr&, const Gmpz&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, const Gmpz&, std::float_round_style=Gmpfr::get_default_rndmode()); static Gmpfr div (const Gmpfr&, const Gmpz&, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()); # 509 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" Gmpfr abs (std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr abs (Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr sqrt (std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr sqrt (Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr cbrt (std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr cbrt (Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr kthroot (int,std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr kthroot (int, Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr square (std::float_round_style=Gmpfr::get_default_rndmode()) const; Gmpfr square (Gmpfr::Precision_type, std::float_round_style=Gmpfr::get_default_rndmode()) const; bool is_zero()const; bool is_one()const; bool is_nan()const; bool is_inf()const; bool is_number()const; Sign sign()const; bool is_square()const; bool is_square(Gmpfr&)const; Comparison_result compare(const Gmpfr&)const; double to_double(std::float_round_style=Gmpfr::get_default_rndmode()) const; std::pair to_interval()const; std::pair to_double_exp(std::float_round_style= Gmpfr::get_default_rndmode())const; std::pair,long> to_interval_exp()const; std::pair to_integer_exp()const; }; # 553 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" inline std::float_round_style Gmpfr::get_default_rndmode(){ return _cgal_rnd(mpfr_get_default_rounding_mode()); } inline std::float_round_style Gmpfr::set_default_rndmode(std::float_round_style rnd_mode){ std::float_round_style old_rnd_mode=Gmpfr::get_default_rndmode(); mpfr_set_default_rounding_mode(_gmp_rnd(rnd_mode)); return old_rnd_mode; } inline Gmpfr::Precision_type Gmpfr::get_default_precision(){ return static_cast(mpfr_get_default_prec()); } inline Gmpfr::Precision_type Gmpfr::set_default_precision(Gmpfr::Precision_type prec){ Gmpfr::Precision_type old_prec=Gmpfr::get_default_precision(); (CGAL::possibly(prec>=2&&prec<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "prec>=MPFR_PREC_MIN&&prec<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 575)); mpfr_set_default_prec(prec); return old_prec; } inline Gmpfr::Precision_type Gmpfr::get_precision()const{ return (0 ? ((fr())->_mpfr_prec) : ((fr())->_mpfr_prec)); } inline Gmpfr Gmpfr::round(Gmpfr::Precision_type p,std::float_round_style r)const{ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 589)); return Gmpfr(*this,r,p); } inline void Gmpfr::clear_flags(){ mpfr_clear_flags(); } inline bool Gmpfr::underflow_flag(){ return mpfr_underflow_p()!=0; } inline bool Gmpfr::overflow_flag(){ return mpfr_overflow_p()!=0; } inline bool Gmpfr::nan_flag(){ return mpfr_nanflag_p()!=0; } inline bool Gmpfr::inex_flag(){ return mpfr_inexflag_p()!=0; } inline bool Gmpfr::erange_flag(){ return mpfr_erangeflag_p()!=0; } inline Gmpfr Gmpfr::operator+()const{ return(*this); } inline Gmpfr Gmpfr::operator-()const{ Gmpfr result(0,get_precision()); mpfr_neg(result.fr(),fr(),MPFR_RNDN); return result; } # 808 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" inline Gmpfr& Gmpfr::operator+=(const Gmpfr &b){ Gmpfr::Precision_type _p=( get_precision() >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( get_precision()>(Gmpfr::get_default_precision())? get_precision():(Gmpfr::get_default_precision())): ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec))>(Gmpfr::get_default_precision())? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): (Gmpfr::get_default_precision())) ); if(unique()&&(_p==get_precision())){ mpfr_add(fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); }else{ Gmpfr result(0,_p); mpfr_add(result.fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator-=(const Gmpfr &b){ Gmpfr::Precision_type _p=( get_precision() >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( get_precision()>(Gmpfr::get_default_precision())? get_precision():(Gmpfr::get_default_precision())): ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec))>(Gmpfr::get_default_precision())? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): (Gmpfr::get_default_precision())) ); if(unique()&&(_p==get_precision())){ mpfr_sub(fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); }else{ Gmpfr result(0,_p); mpfr_sub(result.fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator*=(const Gmpfr &b){ Gmpfr::Precision_type _p=( get_precision() >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( get_precision()>(Gmpfr::get_default_precision())? get_precision():(Gmpfr::get_default_precision())): ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec))>(Gmpfr::get_default_precision())? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): (Gmpfr::get_default_precision())) ); if(unique()&&(_p==get_precision())){ mpfr_mul(fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); }else{ Gmpfr result(0,_p); mpfr_mul(result.fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator/=(const Gmpfr &b){ Gmpfr::Precision_type _p=( get_precision() >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( get_precision()>(Gmpfr::get_default_precision())? get_precision():(Gmpfr::get_default_precision())): ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec))>(Gmpfr::get_default_precision())? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): (Gmpfr::get_default_precision())) ); if(unique()&&(_p==get_precision())){ mpfr_div(fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); }else{ Gmpfr result(0,_p); mpfr_div(result.fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator%=(const Gmpfr &b){ Gmpfr::Precision_type _p=( get_precision() >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( get_precision()>(Gmpfr::get_default_precision())? get_precision():(Gmpfr::get_default_precision())): ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec))>(Gmpfr::get_default_precision())? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): (Gmpfr::get_default_precision())) ); if(unique()&&(_p==get_precision())){ mpfr_remainder(fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); }else{ Gmpfr result(0,_p); mpfr_remainder(result.fr(), fr(), b.fr(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } # 837 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" inline Gmpfr& Gmpfr::operator+=(long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_add_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_add_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_add_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator-=(long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_sub_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_sub_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_sub_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator*=(long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_mul_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_mul_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_mul_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator/=(long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_div_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_div_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_div_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator+=(unsigned long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_add_ui(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_add_ui(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_add_ui(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator-=(unsigned long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_sub_ui(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_sub_ui(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_sub_ui(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator*=(unsigned long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_mul_ui(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_mul_ui(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_mul_ui(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator/=(unsigned long x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_div_ui(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_div_ui(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_div_ui(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator+=(int x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_add_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_add_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_add_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator-=(int x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_sub_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_sub_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_sub_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator*=(int x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_mul_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_mul_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_mul_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator/=(int x){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_div_si(fr(), fr(), x, mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_div_si(_temp.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_div_si(result.fr(), fr(), x, mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator+=(const Gmpz &b){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_add_z(fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_add_z(_temp.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_add_z(result.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator-=(const Gmpz &b){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_sub_z(fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_sub_z(_temp.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_sub_z(result.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator*=(const Gmpz &b){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_mul_z(fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_mul_z(_temp.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_mul_z(result.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } inline Gmpfr& Gmpfr::operator/=(const Gmpz &b){ if(unique()){ if(get_precision()>Gmpfr::get_default_precision()) { mpfr_div_z(fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); }else{ Gmpfr _temp(0,Gmpfr::get_default_precision()); mpfr_div_z(_temp.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(_temp); } }else{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_div_z(result.fr(), fr(), b.mpz(), mpfr_get_default_rounding_mode()); swap(result); } return *this; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type_static.h" 1 # 85 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type_static.h" inline Gmpfr Gmpfr::add (const Gmpfr &a, const Gmpfr &b, std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) : ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) )); mpfr_add(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a, const Gmpfr &b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_add(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a, const Gmpfr &b, std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) : ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) )); mpfr_sub(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a, const Gmpfr &b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_sub(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a, const Gmpfr &b, std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) : ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) )); mpfr_mul(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a, const Gmpfr &b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_mul(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a, const Gmpfr &b, std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) >= (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) ? ( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) : ( (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((b.fr())->_mpfr_prec) : ((b.fr())->_mpfr_prec)): Gmpfr::get_default_precision() ) )); mpfr_div(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a, const Gmpfr &b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_div(result.fr(),a.fr(),b.fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a,long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_add_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a, long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_add_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a,long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_sub_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a, long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_sub_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a,long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_mul_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a, long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_mul_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a,long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_div_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a, long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_div_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a,unsigned long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_add_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a, unsigned long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_add_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a,unsigned long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_sub_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a, unsigned long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_sub_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a,unsigned long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_mul_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a, unsigned long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_mul_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a,unsigned long b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_div_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a, unsigned long b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_div_ui(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a,int b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_add_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a, int b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_add_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a,int b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_sub_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a, int b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_sub_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a,int b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_mul_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a, int b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_mul_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a,int b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_div_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a, int b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_div_si(result.fr(),a.fr(),b,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a,const Gmpz& b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_add_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::add (const Gmpfr &a, const Gmpz& b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_add_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a,const Gmpz& b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_sub_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sub (const Gmpfr &a, const Gmpz& b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_sub_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a,const Gmpz& b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_mul_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::mul (const Gmpfr &a, const Gmpz& b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_mul_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a,const Gmpz& b,std::float_round_style r){ Gmpfr result(0,( (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)) > Gmpfr::get_default_precision() ? (0 ? ((a.fr())->_mpfr_prec) : ((a.fr())->_mpfr_prec)): Gmpfr::get_default_precision() )); mpfr_div_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::div (const Gmpfr &a, const Gmpz& b, Gmpfr::Precision_type p, std::float_round_style r){ Gmpfr result(0,p); mpfr_div_z(result.fr(),a.fr(),b.mpz(),_gmp_rnd(r)); return result; } # 863 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" 2 # 880 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" inline Gmpfr Gmpfr::abs (std::float_round_style r)const{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_set4(result.fr(),fr(),_gmp_rnd(r),1); return result; } inline Gmpfr Gmpfr::abs (Gmpfr::Precision_type p, std::float_round_style r)const{ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 880)); Gmpfr result(0,p); mpfr_set4(result.fr(),fr(),_gmp_rnd(r),1); return result; } inline Gmpfr Gmpfr::sqrt (std::float_round_style r)const{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_sqrt(result.fr(),fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::sqrt (Gmpfr::Precision_type p, std::float_round_style r)const{ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 881)); Gmpfr result(0,p); mpfr_sqrt(result.fr(),fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::cbrt (std::float_round_style r)const{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_cbrt(result.fr(),fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::cbrt (Gmpfr::Precision_type p, std::float_round_style r)const{ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 882)); Gmpfr result(0,p); mpfr_cbrt(result.fr(),fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::kthroot(int k,std::float_round_style r)const{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_root(result.fr(),fr(),k,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::kthroot(int k, Gmpfr::Precision_type p, std::float_round_style r)const{ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 895)); Gmpfr result(0,p); mpfr_root(result.fr(),fr(),k,_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::square (std::float_round_style r)const{ Gmpfr result(0,(get_precision()>Gmpfr::get_default_precision()? get_precision(): Gmpfr::get_default_precision())); mpfr_sqr(result.fr(),fr(),_gmp_rnd(r)); return result; } inline Gmpfr Gmpfr::square (Gmpfr::Precision_type p, std::float_round_style r)const{ (CGAL::possibly(p>=2&&p<=((mpfr_prec_t)((mpfr_uprec_t)(~(mpfr_uprec_t)0)>>1)))?(static_cast(0)): ::CGAL::assertion_fail( "p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 901)); Gmpfr result(0,p); mpfr_sqr(result.fr(),fr(),_gmp_rnd(r)); return result; } inline bool Gmpfr::is_zero()const{ return ((fr())->_mpfr_exp == (0 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0; } inline bool Gmpfr::is_one()const{ return mpfr_cmp_ui_2exp((fr()),(1),0)==0; } inline bool Gmpfr::is_nan()const{ return ((fr())->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0; } inline bool Gmpfr::is_inf()const{ return ((fr())->_mpfr_exp == (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))))!=0; } inline bool Gmpfr::is_number()const{ return mpfr_number_p(fr())!=0; } inline Sign Gmpfr::sign()const{ int s=((fr())->_mpfr_exp < (2 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1))) ? (((fr())->_mpfr_exp == (1 - ((mpfr_exp_t) (((mpfr_uexp_t) -1) >> 1)))) ? mpfr_set_erangeflag () : (mpfr_void) 0), 0 : ((fr())->_mpfr_sign)); return(s==0?ZERO:(s>0?POSITIVE:NEGATIVE)); } inline bool Gmpfr::is_square()const{ Sign s=sign(); if(s==NEGATIVE) return false; if(s==ZERO) return true; std::pair r=Gmpfr::to_integer_exp(); if(r.second%2) r.first=r.first*2; return __gmpz_perfect_square_p(r.first.mpz())!=0; } inline bool Gmpfr::is_square(Gmpfr &y)const{ bool ret=is_square(); if(ret) y=sqrt(); return ret; } inline Comparison_result Gmpfr::compare(const Gmpfr& b)const{ int c=mpfr_cmp3(fr(), b.fr(), 1); return(c?(c>0?LARGER:SMALLER):EQUAL); } inline double Gmpfr::to_double(std::float_round_style r)const{ return mpfr_get_d(fr(),_gmp_rnd(r)); } inline std::pairGmpfr::to_interval()const{ return std::make_pair( mpfr_get_d(fr(),MPFR_RNDD), mpfr_get_d(fr(),MPFR_RNDU)); } inline std::pair Gmpfr::to_double_exp(std::float_round_style r)const{ long e; double d=mpfr_get_d_2exp(&e,fr(),_gmp_rnd(r)); return std::make_pair(d,e); } inline std::pair,long> Gmpfr::to_interval_exp()const{ long e1,e2; double d_low=mpfr_get_d_2exp(&e1,fr(),MPFR_RNDD); double d_upp=mpfr_get_d_2exp(&e2,fr(),MPFR_RNDU); (CGAL::possibly(e1==e2)?(static_cast(0)): ::CGAL::assertion_fail( "e1==e2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 993)); return std::make_pair(std::make_pair(d_low,d_upp),e1); } inline std::pair Gmpfr::to_integer_exp()const{ if(this->is_zero()) return std::make_pair(Gmpz(0),long(0)); Gmpz z; long e=mpfr_get_z_2exp(z.mpz(),this->fr()); long zeros = __gmpz_scan1(z.mpz(),0); (CGAL::possibly(z==(z>>zeros)<(0)): ::CGAL::assertion_fail( "z==(z>>zeros)<>= zeros; (CGAL::possibly(z%2!=0)?(static_cast(0)): ::CGAL::assertion_fail( "z%2!=0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 1009)); e += zeros; if (e >= 0) (CGAL::possibly((*this) == (Gmpfr(z) * CGAL::ipower(Gmpfr(2),e)))?(static_cast(0)): ::CGAL::postcondition_fail( "(*this) == (Gmpfr(z) * CGAL::ipower(Gmpfr(2),e))" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 1013)); else (CGAL::possibly(( (*this) * (Gmpz(1)<<(-e)) ) == z)?(static_cast(0)): ::CGAL::postcondition_fail( "( (*this) * (Gmpz(1)<<(-e)) ) == z" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h", 1015)); return std::make_pair(z,e); } # 1027 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" inline std::istream& operator>>(std::istream& is,Gmpfr &f){ std::istream::int_type c; std::ios::fmtflags old_flags = is.flags(); is.unsetf(std::ios::skipws); gmpz_eat_white_space(is); Gmpz mant(0); Gmpz exp(0); bool neg_mant=false; bool neg_exp=false; c=is.peek(); switch(c){ case '-': neg_mant=true; is.get(); gmpz_eat_white_space(is); break; case '+': is.get(); gmpz_eat_white_space(is); break; case 'n': is.get(); if(is.get()=='a'&&is.get()=='n'){ f=Gmpfr(); return is; } else goto invalid_number; default: if(c!='i'&&(c<'0'||c>'9')){ invalid_number: is.setstate(std::ios_base::failbit); is.flags(old_flags); return is; } } c=is.get(); if(c=='i'){ if(is.get()=='n'&&is.get()=='f'){ f=Gmpfr(); mpfr_set_inf(f.fr(),neg_mant?-1:1); return is; } else goto invalid_number; } while(c>='0'&&c<='9'){ mant=10*mant+(c-'0'); c=is.get(); } is.putback(c); gmpz_eat_white_space(is); switch(c=is.get()){ case 'e': break; default: is.setstate(std::ios_base::failbit); is.flags(old_flags); return is; } c=is.peek(); switch(c){ case '-': neg_exp=true; is.get(); gmpz_eat_white_space(is); break; case '+': is.get(); gmpz_eat_white_space(is); break; default: if(c<'0'||c>'9') goto invalid_number; } gmpz_eat_white_space(is); while((c=is.get())>='0'&&c<='9') exp=10*exp+(c-'0'); is.putback(c); if(exp.bit_size()>8*sizeof(mpfr_exp_t)) mpfr_set_erangeflag(); f=Gmpfr(mant, static_cast( mant.bit_size()>2? mant.bit_size(): 2)); if(neg_exp) mpfr_div_2ui(f.fr(),f.fr(),__gmpz_get_ui(exp.mpz()),MPFR_RNDN); else mpfr_mul_2ui(f.fr(),f.fr(),__gmpz_get_ui(exp.mpz()),MPFR_RNDN); # 1147 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" (static_cast(0)); return is; } inline std::ostream& operator<<(std::ostream& os,const Gmpfr &a){ if(a.is_nan()) return os<<"nan"; if(a.is_inf()) return os<<(a<0?"-inf":"+inf"); std::pair ie=a.to_integer_exp(); os<(const Gmpfr &a,long b){ return(mpfr_cmp_si_2exp((a.fr()),(b),0)>0); } inline bool operator==(const Gmpfr &a,long b){ return !mpfr_cmp_si_2exp((a.fr()),(b),0); } inline bool operator<(const Gmpfr &a,unsigned long b){ return(mpfr_cmp_ui_2exp((a.fr()),(b),0)<0); } inline bool operator>(const Gmpfr &a,unsigned long b){ return(mpfr_cmp_ui_2exp((a.fr()),(b),0)>0); } inline bool operator==(const Gmpfr &a,unsigned long b){ return !mpfr_cmp_ui_2exp((a.fr()),(b),0); } inline bool operator<(const Gmpfr &a,int b){ return(mpfr_cmp_si_2exp((a.fr()),(b),0)<0); } inline bool operator>(const Gmpfr &a,int b){ return(mpfr_cmp_si_2exp((a.fr()),(b),0)>0); } inline bool operator==(const Gmpfr &a,int b){ return !mpfr_cmp_si_2exp((a.fr()),(b),0); } inline bool operator<(const Gmpfr &a,double b){ return(mpfr_cmp_d(a.fr(),b)<0); } inline bool operator>(const Gmpfr &a,double b){ return(mpfr_cmp_d(a.fr(),b)>0); } inline bool operator==(const Gmpfr &a,double b){ return !mpfr_cmp_d(a.fr(),b); } # 1252 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpfr_type.h" inline bool operator<(const Gmpfr &a,long double b){ return(mpfr_cmp_ld(a.fr(),b)<0); } inline bool operator>(const Gmpfr &a,long double b){ return(mpfr_cmp_ld(a.fr(),b)>0); } inline bool operator==(const Gmpfr &a,long double b){ return !mpfr_cmp_ld(a.fr(),b); } inline bool operator<(const Gmpfr &a,const Gmpz &b){ return(mpfr_cmp_z(a.fr(),b.mpz())<0); } inline bool operator>(const Gmpfr &a,const Gmpz &b){ return(mpfr_cmp_z(a.fr(),b.mpz())>0); } inline bool operator==(const Gmpfr &a,const Gmpz &b){ return !mpfr_cmp_z(a.fr(),b.mpz()); } inline Gmpfr min (const Gmpfr& x,const Gmpfr& y){ return (x<=y)?x:y; } inline Gmpfr max (const Gmpfr& x,const Gmpfr& y){ return (x>=y)?x:y; } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmp_coercion_traits.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" # 1 "/usr/include/mpfr.h" 1 3 4 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" 2 namespace CGAL { struct Gmpq_rep { mpq_t mpQ; Gmpq_rep() { __gmpq_init(mpQ); } ~Gmpq_rep() { __gmpq_clear(mpQ); } private: Gmpq_rep(const Gmpq_rep &); Gmpq_rep & operator= (const Gmpq_rep &); }; class Gmpq : Handle_for, boost::ordered_field_operators1< Gmpq , boost::ordered_field_operators2< Gmpq, int , boost::ordered_field_operators2< Gmpq, long , boost::ordered_field_operators2< Gmpq, double , boost::ordered_field_operators2< Gmpq, Gmpz , boost::ordered_field_operators2< Gmpq, Gmpfr > > > > > > { typedef Handle_for Base; public: typedef Tag_false Has_gcd; typedef Tag_true Has_division; typedef Tag_false Has_sqrt; typedef Tag_true Has_exact_ring_operations; typedef Tag_true Has_exact_division; typedef Tag_false Has_exact_sqrt; Gmpq() {} Gmpq(const mpq_t q) { __gmpq_set(mpq(), q); } Gmpq(int n) { __gmpq_set_si(mpq(), n, 1); } Gmpq(unsigned int n) { __gmpq_set_ui(mpq(), n, 1); } Gmpq(long n) { __gmpq_set_si(mpq(), n, 1); } Gmpq(unsigned long n) { __gmpq_set_ui(mpq(), n, 1); } Gmpq(const Gmpz& n) { __gmpq_set_z(mpq(), n.mpz()); } Gmpq(int n, int d) { if (d < 0) { n = -n; d = -d; } __gmpq_set_si(mpq(), n, d); __gmpq_canonicalize(mpq()); } Gmpq(signed long n, unsigned long d) { __gmpq_set_si(mpq(), n, d); __gmpq_canonicalize(mpq()); } Gmpq(unsigned long n, unsigned long d) { __gmpq_set_ui(mpq(), n, d); __gmpq_canonicalize(mpq()); } Gmpq(const Gmpz& n, const Gmpz& d) { __gmpz_set((&((mpq())->_mp_num)), n.mpz()); __gmpz_set((&((mpq())->_mp_den)), d.mpz()); __gmpq_canonicalize(mpq()); } Gmpq(double d) { (CGAL::possibly(is_finite(d))?(static_cast(0)): ::CGAL::assertion_fail( "is_finite(d)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h", 132)); __gmpq_set_d(mpq(), d); } Gmpq(Gmpfr f) { std::pair intexp=f.to_integer_exp(); __gmpq_set_z(mpq(),intexp.first.mpz()); if(intexp.second>0){ __gmpz_mul_2exp((&((mpq())->_mp_num)), (&((mpq())->_mp_num)), (unsigned long)intexp.second); }else{ __gmpz_mul_2exp((&((mpq())->_mp_den)), (&((mpq())->_mp_den)), (unsigned long)(-intexp.second)); } if(__gmpz_tstbit(intexp.first.mpz(),0)==0 && ((intexp.first.mpz())->_mp_size < 0 ? -1 : (intexp.first.mpz())->_mp_size > 0)!=0) __gmpq_canonicalize(mpq()); (CGAL::possibly(mpfr_cmp_q(f.fr(),mpq())==0)?(static_cast(0)): ::CGAL::assertion_fail( "mpfr_cmp_q(f.fr(),mpq())==0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" # 152 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" , 153 # 152 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" , "error in conversion Gmpfr->Gmpq")) ; } Gmpq(const std::string& str, int base = 10) { __gmpq_set_str(mpq(), str.c_str(), base); __gmpq_canonicalize(mpq()); } # 173 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" std::size_t size() const { std::size_t s_num = __gmpz_size((&((mpq())->_mp_num))) * (__gmp_bits_per_limb/8); std::size_t s_den = __gmpz_size((&((mpq())->_mp_den))) * (__gmp_bits_per_limb/8); return s_num + s_den; } Gmpz numerator() const { return Gmpz((&((mpq())->_mp_num))); } Gmpz denominator() const { return Gmpz((&((mpq())->_mp_den))); } Gmpq operator+() const; Gmpq operator-() const; Gmpq& operator+=(const Gmpq &q); Gmpq& operator-=(const Gmpq &q); Gmpq& operator*=(const Gmpq &q); Gmpq& operator/=(const Gmpq &q); bool operator==(const Gmpq &q) const { return __gmpq_equal(this->mpq(), q.mpq()) != 0;} bool operator< (const Gmpq &q) const { return __gmpq_cmp(this->mpq(), q.mpq()) < 0; } double to_double() const; Sign sign() const; const mpq_t & mpq() const { return Ptr()->mpQ; } mpq_t & mpq() { return ptr()->mpQ; } ~Gmpq() { ; } Gmpq& operator+=(int z){return (*this)+= Gmpq(z);} Gmpq& operator-=(int z){return (*this)-= Gmpq(z);} Gmpq& operator*=(int z){return (*this)*= Gmpq(z);} Gmpq& operator/=(int z){return (*this)/= Gmpq(z);} bool operator==(int z) const {return (__builtin_constant_p ((z) >= 0) && (z) >= 0 ? (__builtin_constant_p ((static_cast (z))) && ((static_cast (z))) == 0 ? ((mpq())->_mp_num._mp_size < 0 ? -1 : (mpq())->_mp_num._mp_size > 0) : __gmpq_cmp_ui (mpq(),(static_cast (z)),1)) : __gmpq_cmp_si (mpq(), z, 1))==0;} bool operator< (int z) const {return (__builtin_constant_p ((z) >= 0) && (z) >= 0 ? (__builtin_constant_p ((static_cast (z))) && ((static_cast (z))) == 0 ? ((mpq())->_mp_num._mp_size < 0 ? -1 : (mpq())->_mp_num._mp_size > 0) : __gmpq_cmp_ui (mpq(),(static_cast (z)),1)) : __gmpq_cmp_si (mpq(), z, 1))<0;} bool operator> (int z) const {return (__builtin_constant_p ((z) >= 0) && (z) >= 0 ? (__builtin_constant_p ((static_cast (z))) && ((static_cast (z))) == 0 ? ((mpq())->_mp_num._mp_size < 0 ? -1 : (mpq())->_mp_num._mp_size > 0) : __gmpq_cmp_ui (mpq(),(static_cast (z)),1)) : __gmpq_cmp_si (mpq(), z, 1))>0;} Gmpq& operator+=(long z){return (*this)+= Gmpq(z);} Gmpq& operator-=(long z){return (*this)-= Gmpq(z);} Gmpq& operator*=(long z){return (*this)*= Gmpq(z);} Gmpq& operator/=(long z){return (*this)/= Gmpq(z);} bool operator==(long z) const {return (__builtin_constant_p ((z) >= 0) && (z) >= 0 ? (__builtin_constant_p ((static_cast (z))) && ((static_cast (z))) == 0 ? ((mpq())->_mp_num._mp_size < 0 ? -1 : (mpq())->_mp_num._mp_size > 0) : __gmpq_cmp_ui (mpq(),(static_cast (z)),1)) : __gmpq_cmp_si (mpq(), z, 1))==0;} bool operator< (long z) const {return (__builtin_constant_p ((z) >= 0) && (z) >= 0 ? (__builtin_constant_p ((static_cast (z))) && ((static_cast (z))) == 0 ? ((mpq())->_mp_num._mp_size < 0 ? -1 : (mpq())->_mp_num._mp_size > 0) : __gmpq_cmp_ui (mpq(),(static_cast (z)),1)) : __gmpq_cmp_si (mpq(), z, 1))<0;} bool operator> (long z) const {return (__builtin_constant_p ((z) >= 0) && (z) >= 0 ? (__builtin_constant_p ((static_cast (z))) && ((static_cast (z))) == 0 ? ((mpq())->_mp_num._mp_size < 0 ? -1 : (mpq())->_mp_num._mp_size > 0) : __gmpq_cmp_ui (mpq(),(static_cast (z)),1)) : __gmpq_cmp_si (mpq(), z, 1))>0;} Gmpq& operator+=(double d){return (*this)+= Gmpq(d);} Gmpq& operator-=(double d){return (*this)-= Gmpq(d);} Gmpq& operator*=(double d){return (*this)*= Gmpq(d);} Gmpq& operator/=(double d){return (*this)/= Gmpq(d);} bool operator==(double d) const {return (*this)== Gmpq(d);} bool operator< (double d) const {return (*this)< Gmpq(d);} bool operator> (double d) const {return (*this)> Gmpq(d);} Gmpq& operator+=(const Gmpz&); Gmpq& operator-=(const Gmpz&); Gmpq& operator*=(const Gmpz&); Gmpq& operator/=(const Gmpz&); bool operator==(const Gmpz &z) const {return (*this)== Gmpq(z);} bool operator< (const Gmpz &z) const {return (*this)< Gmpq(z);} bool operator> (const Gmpz &z) const {return (*this)> Gmpq(z);} Gmpq& operator+=(const Gmpfr &f){return (*this)+= Gmpq(f);} Gmpq& operator-=(const Gmpfr &f){return (*this)-= Gmpq(f);} Gmpq& operator*=(const Gmpfr &f){return (*this)*= Gmpq(f);} Gmpq& operator/=(const Gmpfr &f){return (*this)/= Gmpq(f);} bool operator==(const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())==0;} bool operator< (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())>0;} bool operator> (const Gmpfr &f) const {return mpfr_cmp_q(f.fr(),mpq())<0;} }; inline Gmpq Gmpq::operator-() const { Gmpq Res; __gmpq_neg(Res.mpq(), mpq()); return Res; } inline Gmpq Gmpq::operator+() const { return Gmpq(mpq()); } inline Gmpq& Gmpq::operator+=(const Gmpq &z) { Gmpq Res; __gmpq_add(Res.mpq(), mpq(), z.mpq()); swap(Res); return *this; } inline Gmpq& Gmpq::operator-=(const Gmpq &z) { Gmpq Res; __gmpq_sub(Res.mpq(), mpq(), z.mpq()); swap(Res); return *this; } inline Gmpq& Gmpq::operator*=(const Gmpq &z) { Gmpq Res; __gmpq_mul(Res.mpq(), mpq(), z.mpq()); swap(Res); return *this; } inline Gmpq& Gmpq::operator/=(const Gmpq &z) { (CGAL::possibly(z != 0)?(static_cast(0)): ::CGAL::precondition_fail( "z != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h", 306)); Gmpq Res; __gmpq_div(Res.mpq(), mpq(), z.mpq()); swap(Res); return *this; } inline Gmpq& Gmpq::operator+=(const Gmpz &z){ if(unique()){ __gmpz_addmul((&((mpq())->_mp_num)),(&((mpq())->_mp_den)),z.mpz()); }else{ Gmpq result; __gmpz_mul((&((result.mpq())->_mp_num)), (&((mpq())->_mp_den)), z.mpz()); __gmpz_add((&((result.mpq())->_mp_num)), (&((mpq())->_mp_num)), (&((result.mpq())->_mp_num))); __gmpz_set((&((result.mpq())->_mp_den)),(&((mpq())->_mp_den))); swap(result); } return *this; } inline Gmpq& Gmpq::operator-=(const Gmpz &z){ if(unique()){ __gmpz_submul((&((mpq())->_mp_num)),(&((mpq())->_mp_den)),z.mpz()); }else{ Gmpq result; __gmpz_mul((&((result.mpq())->_mp_num)), (&((mpq())->_mp_den)), z.mpz()); __gmpz_sub((&((result.mpq())->_mp_num)), (&((mpq())->_mp_num)), (&((result.mpq())->_mp_num))); __gmpz_set((&((result.mpq())->_mp_den)),(&((mpq())->_mp_den))); swap(result); } return *this; } inline Gmpq& Gmpq::operator*=(const Gmpz &z){ if(unique()){ __gmpz_mul((&((mpq())->_mp_num)),(&((mpq())->_mp_num)),z.mpz()); __gmpq_canonicalize(mpq()); }else{ Gmpq result; __gmpz_mul((&((result.mpq())->_mp_num)),(&((mpq())->_mp_num)),z.mpz()); __gmpz_set((&((result.mpq())->_mp_den)),(&((mpq())->_mp_den))); __gmpq_canonicalize(result.mpq()); swap(result); } return *this; } inline Gmpq& Gmpq::operator/=(const Gmpz &z){ if(unique()){ __gmpz_mul((&((mpq())->_mp_den)),(&((mpq())->_mp_den)),z.mpz()); __gmpq_canonicalize(mpq()); }else{ Gmpq result; __gmpz_mul((&((result.mpq())->_mp_den)),(&((mpq())->_mp_den)),z.mpz()); __gmpz_set((&((result.mpq())->_mp_num)),(&((mpq())->_mp_num))); __gmpq_canonicalize(result.mpq()); swap(result); } return *this; } inline double Gmpq::to_double() const { return __gmpq_get_d(mpq()); } inline Sign Gmpq::sign() const { return static_cast(((mpq())->_mp_num._mp_size < 0 ? -1 : (mpq())->_mp_num._mp_size > 0)); } inline std::ostream& operator<<(std::ostream& os, const Gmpq &z) { os << z.numerator() << "/" << z.denominator(); return os; } # 417 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP/Gmpq_type.h" namespace Gmpq_detail { inline bool is_space (const std::istream& , std::istream::int_type c) { std::istream::char_type cc= c; return (c == std::istream::traits_type::eof()) || std::isspace(cc, std::locale::classic() ); } inline bool is_eof (const std::istream& , std::istream::int_type c) { return c == std::istream::traits_type::eof(); } inline bool is_digit (const std::istream& , std::istream::int_type c) { std::istream::char_type cc= c; return std::isdigit(cc, std::locale::classic() ); } } inline std::istream& operator>>(std::istream& is, Gmpq &z) { const std::istream::char_type zero = '0'; std::istream::int_type c; std::ios::fmtflags old_flags = is.flags(); is.unsetf(std::ios::skipws); gmpz_eat_white_space(is); Gmpz n(0); Gmpz d(1); bool negative = false; bool digits = false; c = is.peek(); if (c != '.') { if (c == '-' || c == '+') { is.get(); negative = (c == '-'); gmpz_eat_white_space(is); c=is.peek(); } while (!Gmpq_detail::is_eof(is, c) && Gmpq_detail::is_digit(is, c)) { digits = true; n = n*10 + (c-zero); is.get(); c = is.peek(); } if (Gmpq_detail::is_eof(is, c) || Gmpq_detail::is_space(is, c)) { is.flags(old_flags); if (digits && !is.fail()) z = negative? Gmpq(-n,1): Gmpq(n,1); return is; } } else n = 0; if (c == '/' || c == '.') { is.get(); if (c == '/') { is >> d; is.flags(old_flags); if (!is.fail()) z = negative? Gmpq(-n,d): Gmpq(n,d); return is; } while (true) { c = is.peek(); if (Gmpq_detail::is_eof(is, c) || !Gmpq_detail::is_digit(is, c)) break; is.get(); digits = true; d *= 10; n = n*10 + (c-zero); } } int e = 0; if (c == 'e' || c == 'E') { is.get(); is >> e; } if (!digits) { is.setstate(std::ios_base::failbit); is.flags(old_flags); return is; } if (e > 0) while (e--) n *= 10; else while (e++) d *= 10; is.flags(old_flags); if (!is.fail()) z = (negative ? Gmpq(-n,d) : Gmpq(n,d)); return is; } inline Gmpq min (const Gmpq& x,const Gmpq& y){ return (x<=y)?x:y; } inline Gmpq max (const Gmpq& x,const Gmpq& y){ return (x>=y)?x:y; } } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmp_coercion_traits.h" 2 namespace CGAL { template <> struct Coercion_traits< Gmpz , Gmpz >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpz Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpz& x) const { return x;} }; }; template <> struct Coercion_traits< Gmpzf , Gmpzf >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} }; }; template <> struct Coercion_traits< Gmpq , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} }; }; template <> struct Coercion_traits< Gmpz , Gmpzf >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const Gmpz& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpzf , Gmpz >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const Gmpz& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpz , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const Gmpz& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpq , Gmpz >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const Gmpz& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpfr , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const Gmpfr& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpq , Gmpfr >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const Gmpfr& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , Gmpz >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpz Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpz& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpz , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpz Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpz& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , Gmpz >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpz Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpz& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpz , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpz Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpz& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , Gmpz >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpz Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpz& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpz , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpz Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpz& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , Gmpzf >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpzf , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , Gmpzf >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpzf , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , Gmpzf >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpzf , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , Gmpzf >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpzf , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , Gmpzf >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const double& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpzf , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpzf Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpzf& x) const { return x;} Type operator()(const double& x) const { return Type(x);} }; }; template <> struct Coercion_traits< short , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpq , short >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const short& x) const { return Type(x);} }; }; template <> struct Coercion_traits< int , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpq , int >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const int& x) const { return Type(x);} }; }; template <> struct Coercion_traits< long , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpq , long >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const long& x) const { return Type(x);} }; }; template <> struct Coercion_traits< float , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpq , float >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const float& x) const { return Type(x);} }; }; template <> struct Coercion_traits< double , Gmpq >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const double& x) const { return Type(x);} }; }; template <> struct Coercion_traits< Gmpq , double >{ typedef Tag_true Are_explicit_interoperable; typedef Tag_true Are_implicit_interoperable; typedef Gmpq Type; struct Cast{ typedef Type result_type; Type operator()(const Gmpq& x) const { return x;} Type operator()(const double& x) const { return Type(x);} }; }; } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h" 2 namespace CGAL { template <> class Algebraic_structure_traits< Gmpz > : public Algebraic_structure_traits_base< Gmpz, Euclidean_ring_tag > { public: typedef Tag_true Is_exact; typedef Tag_false Is_numerical_sensitive; typedef INTERN_AST::Is_square_per_sqrt< Type > Is_square; class Integral_division : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { Gmpz result; __gmpz_divexact(result.mpz(), x.mpz(), y.mpz()); (CGAL::possibly(result * y == x)?(static_cast(0)): ::CGAL::postcondition_fail( "result * y == x" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h", 61, "exact_division failed\n")); return result; } }; class Gcd : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { Gmpz result; __gmpz_gcd(result.mpz(), x.mpz(), y.mpz()); return result; } Type operator()( const Type& x, const int& y ) const { if (y > 0) { Gmpz Res; __gmpz_gcd_ui(Res.mpz(), x.mpz(), y); return Res; } return ::CGAL:: gcd(x, Gmpz(y)); } Type operator()( const int& x, const Type& y ) const { return ::CGAL:: gcd(Gmpz(x), y ); } }; typedef INTERN_AST::Div_per_operator< Type > Div; typedef INTERN_AST::Mod_per_operator< Type > Mod; class Sqrt : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { Gmpz result; __gmpz_sqrt(result.mpz(), x.mpz()); return result; } }; }; template <> class Real_embeddable_traits< Gmpz > : public INTERN_RET::Real_embeddable_traits_base< Gmpz , CGAL::Tag_true > { public: class Sgn : public std::unary_function< Type, ::CGAL::Sign > { public: ::CGAL::Sign operator()( const Type& x ) const { return x.sign(); } }; class To_double : public std::unary_function< Type, double > { public: double operator()( const Type& x ) const { return x.to_double(); } }; class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { mpfr_t y; mpfr_init2 (y, 53); mpfr_set_z (y, x.mpz(), MPFR_RNDD); double i = mpfr_get_d (y, MPFR_RNDD); mpfr_set_z (y, x.mpz(), MPFR_RNDU); double s = mpfr_get_d (y, MPFR_RNDU); mpfr_clear (y); return std::pair(i, s); } }; }; template<> class Algebraic_structure_traits< Quotient > : public INTERN_QUOTIENT::Algebraic_structure_traits_quotient_base >{ public: typedef Quotient Type; struct To_double: public std::unary_function, double>{ double operator()(const Quotient& quot){ mpq_t mpQ; __gmpq_init(mpQ); const Gmpz& n = quot.numerator(); const Gmpz& d = quot.denominator(); __gmpz_set((&((mpQ)->_mp_num)), n.mpz()); __gmpz_set((&((mpQ)->_mp_den)), d.mpz()); __gmpq_canonicalize(mpQ); double ret = __gmpq_get_d(mpQ); __gmpq_clear(mpQ); return ret; } }; }; template <> struct Needs_parens_as_product { bool operator()(const Gmpz& x) { return ::CGAL:: is_negative(x); } }; template<> class Modular_traits< Gmpz > { typedef Residue RES; public: typedef Gmpz NT; typedef CGAL::Tag_true Is_modularizable; typedef Residue Residue_type; struct Modular_image{ Residue_type operator()(const NT& a){ NT tmp_1(a % NT(RES::get_current_prime())); return CGAL::Residue(int(__gmpz_get_si(tmp_1.mpz()))); } }; struct Modular_image_representative{ NT operator()(const Residue_type& x){ return NT(x.get_value()); } }; }; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h" 1 # 214 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpq.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpq.h" namespace CGAL { template <> class Algebraic_structure_traits< Gmpq > : public Algebraic_structure_traits_base< Gmpq, Field_tag > { public: typedef Tag_true Is_exact; typedef Tag_false Is_numerical_sensitive; class Is_square : public std::binary_function< Type, Type&, bool > { public: bool operator()( const Type& x_, Type& y ) const { Gmpq x( x_ ); __gmpq_canonicalize( x.mpq() ); Algebraic_structure_traits< Gmpz >::Sqrt sqrt; y = Gmpq( sqrt( x.numerator() ), sqrt( x.denominator() ) ); return y*y == x; } bool operator()( const Type& x) const { Type y; return operator()(x,y); } }; class Simplify : public std::unary_function< Type&, void > { public: void operator()( Type& x) const { __gmpq_canonicalize( x.mpq() ); } }; }; template <> class Real_embeddable_traits< Gmpq > : public INTERN_RET::Real_embeddable_traits_base< Gmpq , CGAL::Tag_true > { public: class Sgn : public std::unary_function< Type, ::CGAL::Sign > { public: ::CGAL::Sign operator()( const Type& x ) const { return x.sign(); } }; class To_double : public std::unary_function< Type, double > { public: double operator()( const Type& x ) const { return x.to_double(); } }; class To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { mpfr_t y; mpfr_init2 (y, 53); mpfr_set_q (y, x.mpq(), MPFR_RNDD); double i = mpfr_get_d (y, MPFR_RNDD); mpfr_set_q (y, x.mpq(), MPFR_RNDU); double s = mpfr_get_d (y, MPFR_RNDU); mpfr_clear (y); return std::pair(i, s); } }; }; template <> class Fraction_traits< Gmpq > { public: typedef Gmpq Type; typedef ::CGAL::Tag_true Is_fraction; typedef Gmpz Numerator_type; typedef Gmpz Denominator_type; typedef Algebraic_structure_traits< Gmpz >::Gcd Common_factor; class Decompose { public: typedef Gmpq first_argument_type; typedef Gmpz& second_argument_type; typedef Gmpz& third_argument_type; void operator () (const Gmpq& rat, Gmpz& num,Gmpz& den) { num = rat.numerator(); den = rat.denominator(); } }; class Compose { public: typedef Gmpz first_argument_type; typedef Gmpz second_argument_type; typedef Gmpq result_type; Gmpq operator () (const Gmpz& num,const Gmpz& den) { return Gmpq(num, den); } }; }; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpq.h" 1 # 140 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpq.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpzf.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpzf.h" namespace CGAL { template <> class Algebraic_structure_traits< Gmpzf > : public Algebraic_structure_traits_base< Gmpzf, Euclidean_ring_tag > { public: typedef Tag_true Is_exact; struct Is_zero : public std::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { return x.is_zero(); } }; struct Integral_division : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { return x.integral_division(y); } }; struct Gcd : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { return x.gcd(y); } template < class CT_Type_1, class CT_Type_2 > int operator()( const CT_Type_1& x, const CT_Type_2& y ) const { static_assert((::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, int >::value), "(::boost::is_same< typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, int >::value)"); typename Coercion_traits< CT_Type_1, CT_Type_2 >::Cast cast; return operator()( cast(x), cast(y) ); } }; class Div : public std::binary_function< Type, Type, Type > { public: Type operator()( const Type& x, const Type& y ) const { return Type(x).div( y ); } }; typedef INTERN_AST::Mod_per_operator< Type > Mod; class Is_square : public std::binary_function< Type, Type&, bool > { public: bool operator()( const Type& x, Type& y ) const { y = CGAL::approximate_sqrt(x); return y * y == x; } bool operator()( const Type& x) const { Type dummy; return operator()(x,dummy); } }; }; template <> class Real_embeddable_traits< Gmpzf > : public INTERN_RET::Real_embeddable_traits_base< Gmpzf , CGAL::Tag_true > { typedef Algebraic_structure_traits AST; public: typedef AST::Is_zero Is_zero; struct Sgn : public std::unary_function< Type, ::CGAL::Sign > { public: ::CGAL::Sign operator()( const Type& x ) const { return x.sign(); } }; struct Compare : public std::binary_function< Type, Type, Comparison_result > { public: Comparison_result operator()( const Type& x, const Type& y ) const { return x.compare(y); } }; struct To_double : public std::unary_function< Type, double > { public: double operator()( const Type& x ) const { return x.to_double(); } }; struct To_interval : public std::unary_function< Type, std::pair< double, double > > { public: std::pair operator()( const Type& x ) const { return x.to_interval(); } }; }; template<> class Real_embeddable_traits< Quotient > : public INTERN_QUOTIENT::Real_embeddable_traits_quotient_base< Quotient > { public: struct To_double: public std::unary_function, double>{ inline double operator()(const Quotient& q) const { std::pair n = q.numerator().to_double_exp(); std::pair d = q.denominator().to_double_exp(); double scale = std::ldexp(1.0, n.second - d.second); return (n.first / d.first) * scale; } }; struct To_interval : public std::unary_function, std::pair >{ inline std::pair operator()(const Quotient& q) const { std::pair, long> n = q.numerator().to_interval_exp(); std::pair, long> d = q.denominator().to_interval_exp(); (CGAL::possibly(CGAL::abs(1.0*n.second - d.second) < (1<<30)*2.0)?(static_cast(0)): ::CGAL::assertion_fail( "CGAL::abs(1.0*n.second - d.second) < (1<<30)*2.0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpzf.h" # 168 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpzf.h" , 169 # 168 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpzf.h" , "Exponent overflow in Quotient to_interval")) ; return ldexp(Interval_nt<>(n.first) / Interval_nt<>(d.first), n.second - d.second).pair(); } }; }; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpzf.h" 1 # 182 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpzf.h" 2 # 141 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpq.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP_arithmetic_kernel.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP_arithmetic_kernel.h" namespace CGAL { class GMP_arithmetic_kernel : public internal::Arithmetic_kernel_base { public: typedef CGAL::Gmpz Integer; typedef CGAL::Gmpq Rational; }; template <> struct Get_arithmetic_kernel { typedef GMP_arithmetic_kernel Arithmetic_kernel; }; template <> struct Get_arithmetic_kernel{ typedef GMP_arithmetic_kernel Arithmetic_kernel; }; # 80 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/GMP_arithmetic_kernel.h" } # 142 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpq.h" 2 # 215 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Gmpz.h" 2 # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Exact_type_selector.h" 2 # 49 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Exact_type_selector.h" namespace CORE { class Expr; } namespace CGAL { namespace internal { template < typename > struct Exact_type_selector { typedef Gmpq Type; }; template <> struct Exact_type_selector { typedef Quotient Type; }; template <> struct Exact_type_selector > { typedef Quotient Type; }; template <> struct Exact_type_selector { typedef Gmpq Type; }; template <> struct Exact_type_selector { typedef Gmpq Type; }; template <> struct Exact_type_selector< ::mpz_class> { typedef ::mpq_class Type; }; template <> struct Exact_type_selector< ::mpq_class> { typedef ::mpq_class Type; }; # 112 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Exact_type_selector.h" template <> struct Exact_type_selector { typedef CORE::Expr Type; }; template < typename ET > struct Exact_type_selector > { typedef ET Type; }; } } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 1 # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/tools.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/tools.h" namespace CGAL { template < typename ET > class Lazy_exact_nt; namespace internal { inline bool diff_was_exact(double a, double b, double ab) { return ab+b == a && a-ab == b; } # 56 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/tools.h" template < typename T > inline bool fit_in_double(const T&, double&) { return false; } inline bool fit_in_double(const double& d, double& r) { r = d; return true; } inline bool fit_in_double(const float& f, double& r) { r = f; return true; } inline bool fit_in_double(const int& i, double& r) { r = i; return true; } template < typename ET > inline bool fit_in_double(const Lazy_exact_nt&, double&); namespace Static_filters_predicates { template< typename T, typename fallback_ = boost::mpl::bool_ > struct Kernel_object_has_approx { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; template ::value> struct Get_approx : public CGAL::Identity { }; template struct Get_approx { const typename T::Approximate_type& operator()(const T& x) const { return x.approx(); } typename T::Approximate_type& operator()(T& x) const { return x.approx(); } }; } } } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_2.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" 1 # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" namespace CGAL { namespace internal { struct Static_filter_error { typedef Static_filter_error Sfe; Static_filter_error () {} Static_filter_error (const int &i, const double &e = 0, const int &d = 1) : _b(i), _e(e), _d(d) {} Static_filter_error (const double &b, const double &e = 0, const int &d = 1) : _b(b), _e(e), _d(d) {} static double ulp () { FPU_CW_t backup = FPU_get_and_set_cw(FE_UPWARD); double e = ulp(1); FPU_set_cw(backup); return e; } static double ulp (double d) { d = (d); (CGAL::possibly(d>=0)?(static_cast(0)): ::CGAL::assertion_fail( "d>=0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h", 67)); double u; if (d == 1) u = (d + std::numeric_limits::denorm_min()) - d; else { u = d * ulp(); } u += u / (1<<11); (CGAL::possibly(u!=0)?(static_cast(0)): ::CGAL::assertion_fail( "u!=0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h", 81)); return u; } Sfe operator+ (const Sfe &f) const { (CGAL::possibly(_d == f._d)?(static_cast(0)): ::CGAL::warning_fail( "_d == f._d" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" # 87 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" , 88 # 87 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" , "you are adding variables of different homogeneous degree")) ; FPU_CW_t backup = FPU_get_and_set_cw(FE_UPWARD); double b = _b + f._b; double u = ulp(b) / 2; b += u; double e = u + _e + f._e; FPU_set_cw(backup); return Sfe(b, e, _d); } Sfe operator* (const Sfe &f) const { FPU_CW_t backup = FPU_get_and_set_cw(FE_UPWARD); double b = _b * f._b; double u = ulp(b) / 2; b += u; double e = u + _e * f._e + _e * f._b + _b * f._e; FPU_set_cw(backup); return Sfe(b, e, _d+f._d); } Sfe operator- (const Sfe &f) const { return *this + f; } Sfe operator- () const { return *this; } Sfe& operator+=(const Sfe &f) { return *this = *this + f; } Sfe& operator-=(const Sfe &f) { return *this = *this - f; } Sfe& operator*=(const Sfe &f) { return *this = *this * f; } double error() const { return _e; } double bound() const { return _b; } int degree() const { return _d; } bool operator< (const Sfe &f) const { Sfe e = *this + f; std::cerr << "Static error is : " << e.error() << std::endl; ::CGAL::assertion_fail( "", "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h", 131 ); return false; } bool operator> (const Sfe &f) const { return *this < f; } bool operator<=(const Sfe &f) const { return *this < f; } bool operator>=(const Sfe &f) const { return *this < f; } bool operator==(const Sfe &f) const { return *this < f; } bool operator!=(const Sfe &f) const { return *this < f; } private: double _b, _e; int _d; }; inline Static_filter_error sqrt(const Static_filter_error &f) { (CGAL::possibly((f.degree() & 1) == 0)?(static_cast(0)): ::CGAL::warning_fail( "(f.degree() & 1) == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" # 154 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" , 155 # 154 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filter_error.h" , "Do you really want a non integral degree ???")) ; FPU_CW_t backup = FPU_get_and_set_cw(FE_UPWARD); double b = std::sqrt(f.bound()); double u = Static_filter_error::ulp(b) / 2; b += u; double e = std::sqrt(f.error()) + u; FPU_set_cw(backup); return Static_filter_error(b, e, f.degree()/2); } } } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_2.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_2.h" 2 namespace CGAL { namespace internal { namespace Static_filters_predicates { template < typename K_base > class Orientation_2 : public K_base::Orientation_2 { typedef typename K_base::Point_2 Point_2; typedef typename K_base::Vector_2 Vector_2; typedef typename K_base::Circle_2 Circle_2; typedef typename K_base::Orientation_2 Base; public: typedef typename Base::result_type result_type; using Base::operator(); # 61 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_2.h" Orientation operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r) const { ; double px, py, qx, qy, rx, ry; Get_approx get_approx; if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry)) { ; double pqx = qx - px; double pqy = qy - py; double prx = rx - px; double pry = ry - py; double det = CGAL::determinant(pqx, pqy, prx, pry); double maxx = CGAL::abs(pqx); double maxy = CGAL::abs(pqy); double aprx = CGAL::abs(prx); double apry = CGAL::abs(pry); if (maxx < aprx) maxx = aprx; if (maxy < apry) maxy = apry; if (maxx > maxy) std::swap(maxx, maxy); if (maxx < 1e-146) { if (maxx == 0) return ZERO; } else if (maxy < 1e153) { double eps = 8.8872057372592798e-16 * maxx * maxy; if (det > eps) return POSITIVE; if (det < -eps) return NEGATIVE; } ; } return Base::operator()(p, q, r); } static double compute_epsilon() { typedef Static_filter_error F; F t1 = F(1, F::ulp()/2); F det = CGAL::determinant(t1, t1, t1, t1); double err = det.error(); err += err * 2 * F::ulp(); std::cerr << "*** epsilon for Orientation_2 = " << err << std::endl; return err; } }; } } } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_3.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_3.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_3.h" 2 namespace CGAL { namespace internal { namespace Static_filters_predicates { template < typename K_base > class Orientation_3 : public K_base::Orientation_3 { typedef typename K_base::Point_3 Point_3; typedef typename K_base::Vector_3 Vector_3; typedef typename K_base::Sphere_3 Sphere_3; typedef typename K_base::Tetrahedron_3 Tetrahedron_3; typedef typename K_base::Orientation_3 Base; public: typedef typename Base::result_type result_type; using Base::operator(); # 70 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_3.h" result_type operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s) const { ; Get_approx get_approx; double px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz; if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && fit_in_double(get_approx(p).z(), pz) && fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && fit_in_double(get_approx(q).z(), qz) && fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry) && fit_in_double(get_approx(r).z(), rz) && fit_in_double(get_approx(s).x(), sx) && fit_in_double(get_approx(s).y(), sy) && fit_in_double(get_approx(s).z(), sz)) { ; double pqx = qx - px; double pqy = qy - py; double pqz = qz - pz; double prx = rx - px; double pry = ry - py; double prz = rz - pz; double psx = sx - px; double psy = sy - py; double psz = sz - pz; double maxx = CGAL::abs(pqx); double maxy = CGAL::abs(pqy); double maxz = CGAL::abs(pqz); double aprx = CGAL::abs(prx); double apsx = CGAL::abs(psx); double apry = CGAL::abs(pry); double apsy = CGAL::abs(psy); double aprz = CGAL::abs(prz); double apsz = CGAL::abs(psz); if (maxx < aprx) maxx = aprx; if (maxx < apsx) maxx = apsx; if (maxy < apry) maxy = apry; if (maxy < apsy) maxy = apsy; if (maxz < aprz) maxz = aprz; if (maxz < apsz) maxz = apsz; double det = CGAL::determinant(pqx, pqy, pqz, prx, pry, prz, psx, psy, psz); double eps = 5.1107127829973299e-15 * maxx * maxy * maxz; # 149 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Orientation_3.h" if (maxx > maxz) std::swap(maxx, maxz); if (maxy > maxz) std::swap(maxy, maxz); else if (maxy < maxx) std::swap(maxx, maxy); if (maxx < 1e-97) { if (maxx == 0) return ZERO; } else if (maxz < 1e102) { if (det > eps) return POSITIVE; if (det < -eps) return NEGATIVE; } ; } return Base::operator()(p, q, r, s); } static double compute_epsilon() { typedef Static_filter_error F; F t1 = F(1, F::ulp()/2); F det = CGAL::determinant(t1, t1, t1, t1, t1, t1, t1, t1, t1); double err = det.error(); err += err * 2 * F::ulp(); std::cerr << "*** epsilon for Orientation_3 = " << err << std::endl; return err; } }; } } } # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Compare_y_at_x_2.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Compare_y_at_x_2.h" namespace CGAL { namespace internal { namespace Static_filters_predicates { template < typename K_base, typename Kernel > class Compare_y_at_x_2 : public K_base::Compare_y_at_x_2 { typedef typename K_base::Point_2 Point_2; typedef typename K_base::Segment_2 Segment_2; typedef typename K_base::FT FT; typedef typename K_base::Compare_y_at_x_2 Base; public: using Base::operator(); Comparison_result operator()( const Point_2& p, const Segment_2& s ) const { typename Kernel::Less_x_2 less_x = Kernel().less_x_2_object(); typename Kernel::Less_y_2 less_y = Kernel().less_y_2_object(); typename Kernel::Orientation_2 orientation = Kernel().orientation_2_object(); (CGAL::possibly(are_ordered(s.source(), p, s.target(), less_x))?(static_cast(0)): ::CGAL::precondition_fail( "are_ordered(s.source(), p, s.target(), less_x)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Compare_y_at_x_2.h", 51)); if( less_x( s.source(), s.target() ) ) return orientation(p, s.source(), s.target()); else if ( less_x( s.target(), s.source() ) ) return orientation(p, s.target(), s.source()); else { if( less_y(p, s.source()) && less_y(p, s.target()) ) return SMALLER; if( less_y(s.source(), p) && less_y(s.target(), p) ) return LARGER; return EQUAL; } } }; } } } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Side_of_oriented_circle_2.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Side_of_oriented_circle_2.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Side_of_oriented_circle_2.h" 2 namespace CGAL { namespace internal { namespace Static_filters_predicates { template < typename K_base > class Side_of_oriented_circle_2 : public K_base::Side_of_oriented_circle_2 { typedef typename K_base::Point_2 Point_2; typedef typename K_base::Side_of_oriented_circle_2 Base; public: Oriented_side operator()(const Point_2 &p, const Point_2 &q, const Point_2 &r, const Point_2 &t) const { ; Get_approx get_approx; double px, py, qx, qy, rx, ry, tx, ty; if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry) && fit_in_double(get_approx(t).x(), tx) && fit_in_double(get_approx(t).y(), ty)) { ; double qpx = qx-px; double qpy = qy-py; double rpx = rx-px; double rpy = ry-py; double tpx = tx-px; double tpy = ty-py; double tqx = tx-qx; double tqy = ty-qy; double rqx = rx-qx; double rqy = ry-qy; double det = CGAL::determinant(qpx*tpy - qpy*tpx, tpx*tqx + tpy*tqy, qpx*rpy - qpy*rpx, rpx*rqx + rpy*rqy); double maxx = CGAL::abs(qpx); double maxy = CGAL::abs(qpy); double arpx = CGAL::abs(rpx); double arpy = CGAL::abs(rpy); double atqx = CGAL::abs(tqx); double atqy = CGAL::abs(tqy); double atpx = CGAL::abs(tpx); double atpy = CGAL::abs(tpy); double arqx = CGAL::abs(rqx); double arqy = CGAL::abs(rqy); if (maxx < arpx) maxx = arpx; if (maxx < atpx) maxx = atpx; if (maxx < atqx) maxx = atqx; if (maxx < arqx) maxx = arqx; if (maxy < arpy) maxy = arpy; if (maxy < atpy) maxy = atpy; if (maxy < atqy) maxy = atqy; if (maxy < arqy) maxy = arqy; if (maxx > maxy) std::swap(maxx, maxy); if (maxx < 1e-73) { if (maxx == 0) return ON_ORIENTED_BOUNDARY; } else if (maxy < 1e76) { double eps = 8.8878565762001373e-15 * maxx * maxy * (maxy*maxy); if (det > eps) return ON_POSITIVE_SIDE; if (det < -eps) return ON_NEGATIVE_SIDE; } ; } return Base::operator()(p, q, r, t); } static double compute_epsilon() { typedef internal::Static_filter_error F; F t1 = F(1, F::ulp()/2); F a = t1*t1 - t1*t1; F b = t1*t1 + t1*t1; F det = CGAL::determinant(a, b, a, b); double err = det.error(); err += err * 3 * F::ulp(); std::cerr << "*** epsilon for Side_of_oriented_circle_2 = " << err << std::endl; return err; } }; } } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h" namespace CGAL { namespace internal { namespace Static_filters_predicates { template < typename K_base > class Side_of_oriented_sphere_3 : public K_base::Side_of_oriented_sphere_3 { typedef typename K_base::Point_3 Point_3; typedef typename K_base::Side_of_oriented_sphere_3 Base; public: Oriented_side operator()(const Point_3 &p, const Point_3 &q, const Point_3 &r, const Point_3 &s, const Point_3 &t) const { ; Get_approx get_approx; double px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz, tx, ty, tz; if (fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && fit_in_double(get_approx(p).z(), pz) && fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && fit_in_double(get_approx(q).z(), qz) && fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry) && fit_in_double(get_approx(r).z(), rz) && fit_in_double(get_approx(s).x(), sx) && fit_in_double(get_approx(s).y(), sy) && fit_in_double(get_approx(s).z(), sz) && fit_in_double(get_approx(t).x(), tx) && fit_in_double(get_approx(t).y(), ty) && fit_in_double(get_approx(t).z(), tz)) { ; double ptx = px - tx; double pty = py - ty; double ptz = pz - tz; double pt2 = ::CGAL:: square(ptx) + ::CGAL:: square(pty) + ::CGAL:: square(ptz); double qtx = qx - tx; double qty = qy - ty; double qtz = qz - tz; double qt2 = ::CGAL:: square(qtx) + ::CGAL:: square(qty) + ::CGAL:: square(qtz); double rtx = rx - tx; double rty = ry - ty; double rtz = rz - tz; double rt2 = ::CGAL:: square(rtx) + ::CGAL:: square(rty) + ::CGAL:: square(rtz); double stx = sx - tx; double sty = sy - ty; double stz = sz - tz; double st2 = ::CGAL:: square(stx) + ::CGAL:: square(sty) + ::CGAL:: square(stz); double maxx = CGAL::abs(ptx); double maxy = CGAL::abs(pty); double maxz = CGAL::abs(ptz); double aqtx = CGAL::abs(qtx); double artx = CGAL::abs(rtx); double astx = CGAL::abs(stx); double aqty = CGAL::abs(qty); double arty = CGAL::abs(rty); double asty = CGAL::abs(sty); double aqtz = CGAL::abs(qtz); double artz = CGAL::abs(rtz); double astz = CGAL::abs(stz); if (maxx < aqtx) maxx = aqtx; if (maxx < artx) maxx = artx; if (maxx < astx) maxx = astx; if (maxy < aqty) maxy = aqty; if (maxy < arty) maxy = arty; if (maxy < asty) maxy = asty; if (maxz < aqtz) maxz = aqtz; if (maxz < artz) maxz = artz; if (maxz < astz) maxz = astz; double eps = 1.2466136531027298e-13 * maxx * maxy * maxz; # 134 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h" if (maxx > maxz) std::swap(maxx, maxz); if (maxy > maxz) std::swap(maxy, maxz); else if (maxy < maxx) std::swap(maxx, maxy); double det = CGAL::determinant(ptx,pty,ptz,pt2, rtx,rty,rtz,rt2, qtx,qty,qtz,qt2, stx,sty,stz,st2); if (maxx < 1e-58) { if (maxx == 0) return ON_ORIENTED_BOUNDARY; } else if (maxz < 1e61) { eps *= (maxz * maxz); if (det > eps) return ON_POSITIVE_SIDE; if (det < -eps) return ON_NEGATIVE_SIDE; } ; } return Base::operator()(p, q, r, s, t); } static double compute_epsilon() { typedef internal::Static_filter_error F; F t1 = F(1,F::ulp()/2); F sq = t1*t1+t1*t1+t1*t1; F det = CGAL::determinant(t1, t1, t1, sq, t1, t1, t1, sq, t1, t1, t1, sq, t1, t1, t1, sq); double err = det.error(); err += err * 3 * F::ulp(); std::cerr << "*** epsilon for Side_of_oriented_sphere_3 = " << err << std::endl; return err; } }; } } } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h" 2 namespace CGAL { namespace internal { namespace Static_filters_predicates { template class Compare_squared_radius_3 : public K_base::Compare_squared_radius_3 { typedef typename K_base::Point_3 Point_3; typedef typename K_base::FT FT; typedef typename K_base::Compare_squared_radius_3 Base; public: typedef typename Base::result_type result_type; using Base::operator(); # 53 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h" result_type operator() ( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const FT& w ) const { ; Get_approx get_approx; Get_approx get_approx_ft; double px, py, pz, qx, qy, qz, rx, ry, rz, sx, sy, sz, alpha; if( fit_in_double(get_approx(p).x(), px) && fit_in_double(get_approx(p).y(), py) && fit_in_double(get_approx(p).z(), pz) && fit_in_double(get_approx(q).x(), qx) && fit_in_double(get_approx(q).y(), qy) && fit_in_double(get_approx(q).z(), qz) && fit_in_double(get_approx(r).x(), rx) && fit_in_double(get_approx(r).y(), ry) && fit_in_double(get_approx(r).z(), rz) && fit_in_double(get_approx(s).x(), sx) && fit_in_double(get_approx(s).y(), sy) && fit_in_double(get_approx(s).z(), sz) && fit_in_double(get_approx_ft(w), alpha) ) { ; double qpx; qpx = (qx - px); double qpy; qpy = (qy - py); double qpz; qpz = (qz - pz); double qp2; qp2 = ((square( qpx ) + square( qpy )) + square( qpz )); double rpx; rpx = (rx - px); double rpy; rpy = (ry - py); double rpz; rpz = (rz - pz); double rp2; rp2 = ((square( rpx ) + square( rpy )) + square( rpz )); double spx; spx = (sx - px); double spy; spy = (sy - py); double spz; spz = (sz - pz); double sp2; sp2 = ((square( spx ) + square( spy )) + square( spz )); double num_x; num_x = CGAL::determinant( qpy, qpz, qp2, rpy, rpz, rp2, spy, spz, sp2 ); double num_y; num_y = CGAL::determinant( qpx, qpz, qp2, rpx, rpz, rp2, spx, spz, sp2 ); double num_z; num_z = CGAL::determinant( qpx, qpy, qp2, rpx, rpy, rp2, spx, spy, sp2 ); double den; den = CGAL::determinant( qpx, qpy, qpz, rpx, rpy, rpz, spx, spy, spz ); int int_tmp_result; double double_tmp_result; double eps; double_tmp_result = (((square( num_x ) + square( num_y )) + square( num_z )) - ((alpha * 4.00000000000000000000e+00) * square( den ))); double max1; double aqpx = CGAL::abs(qpx); double aqpz = CGAL::abs(qpz); double arpx = CGAL::abs(rpx); double arpy = CGAL::abs(rpy); double arpz = CGAL::abs(rpz); double aspx = CGAL::abs(spx); double aspy = CGAL::abs(spy); double aspz = CGAL::abs(spz); double max2 = CGAL::abs(qpy); if( (max2 < aqpz) ) { max2 = aqpz; } if( (max2 < arpy) ) { max2 = arpy; } if( (max2 < arpz) ) { max2 = arpz; } if( (max2 < aspy) ) { max2 = aspy; } if( (max2 < aspz) ) { max2 = aspz; } max1 = max2; if( (max1 < aqpx) ) { max1 = aqpx; } if( (max1 < arpx) ) { max1 = arpx; } if( (max1 < aspx) ) { max1 = aspx; } double max3 = CGAL::abs(alpha); double lower_bound_1; double upper_bound_1; lower_bound_1 = max1; upper_bound_1 = max1; if( (max2 < lower_bound_1) ) { lower_bound_1 = max2; } if( ((lower_bound_1 < 1.00913582207214915294e-37) || (max3 < 1.01835510738923227819e-74 && max3!=0)) ) { ; return Base::operator()(p,q,r,s,w); } else { if( ((upper_bound_1 > 2.59614842926741294957e+33) || (max3 > 6.73998666678765545893e+66)) ) { ; return Base::operator()(p,q,r,s,w); } eps = (2.92119946853791784711e-12 * ((((((max1 * max1) * max1) * max1) * max1) * max2) * CGAL::max ( max3, (max1 * max1) ))); if( (double_tmp_result > eps) ) { int_tmp_result = 1; } else { if( (double_tmp_result < -eps) ) { int_tmp_result = -1; } else { ; return Base::operator()(p,q,r,s,w); } } } return static_cast(int_tmp_result); } else return Base::operator()(p,q,r,s,w); } result_type operator() ( const Point_3& p, const Point_3& q, const Point_3& s, const FT& w ) const { ; double px, py, pz, qx, qy, qz, sx, sy, sz, alpha; if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py) && fit_in_double(p.z(), pz) && fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) && fit_in_double(q.z(), qz) && fit_in_double(s.x(), sx) && fit_in_double(s.y(), sy) && fit_in_double(s.z(), sz) && fit_in_double(w, alpha) ) { ; double psx; psx = (px - sx); double psy; psy = (py - sy); double psz; psz = (pz - sz); double ps2; ps2 = ((square( psx ) + square( psy )) + square( psz )); double qsx; qsx = (qx - sx); double qsy; qsy = (qy - sy); double qsz; qsz = (qz - sz); double qs2; qs2 = ((square( qsx ) + square( qsy )) + square( qsz )); double rsx; rsx = ((psy * qsz) - (psz * qsy)); double rsy; rsy = ((psz * qsx) - (psx * qsz)); double rsz; rsz = ((psx * qsy) - (psy * qsx)); double num_x; num_x = ((ps2 * CGAL::determinant( qsy, qsz, rsy, rsz )) - (qs2 * CGAL::determinant( psy, psz, rsy, rsz ))); double num_y; num_y = ((ps2 * CGAL::determinant( qsx, qsz, rsx, rsz )) - (qs2 * CGAL::determinant( psx, psz, rsx, rsz ))); double num_z; num_z = ((ps2 * CGAL::determinant( qsx, qsy, rsx, rsy )) - (qs2 * CGAL::determinant( psx, psy, rsx, rsy ))); double den; den = CGAL::determinant( psx, psy, psz, qsx, qsy, qsz, rsx, rsy, rsz ); int int_tmp_result; double double_tmp_result; double eps; double_tmp_result = (((square( num_x ) + square( num_y )) + square( num_z )) - ((alpha * 4.00000000000000000000e+00) * square( den ))); double max1; double max2 = CGAL::abs(psx); double apsy = CGAL::abs(psy); double apsz = CGAL::abs(psz); double aqsx = CGAL::abs(qsx); double aqsy = CGAL::abs(qsy); double aqsz = CGAL::abs(qsz); if( (max2 < apsy) ) { max2 = apsy; } if( (max2 < aqsx) ) { max2 = aqsx; } if( (max2 < aqsy) ) { max2 = aqsy; } max1 = max2; if( (max1 < apsz) ) { max1 = apsz; } if( (max1 < aqsz) ) { max1 = aqsz; } double max3 = CGAL::abs(alpha); double lower_bound_1; double upper_bound_1; lower_bound_1 = max1; upper_bound_1 = max1; if( (max2 < lower_bound_1) ) { lower_bound_1 = max2; } if( ((lower_bound_1 < 2.26156385701827020260e-30) || (max3 < 5.11467107937135531427e-60 && max3!=0)) ) { ; return Base::operator()(p,q,s,w); } else { if( ((upper_bound_1 > 1.23794003928538000002e+27) || (max3 > 1.53249554086588817779e+54)) ) { ; return Base::operator()(p,q,s,w); } eps = (6.35705373458387935514e-12 * ((((((((max1 * max1) * max2) * max1) * max1) * max1) * max1) * max1) * CGAL::max ( max3, (max1 * max1) ))); if( (double_tmp_result > eps) ) { int_tmp_result = 1; } else { if( (double_tmp_result < -eps) ) { int_tmp_result = -1; } else { ; return Base::operator()(p,q,s,w); } } } return static_cast(int_tmp_result); } else return Base::operator()(p,q,s,w); } result_type operator() ( const Point_3& p, const Point_3& q, const FT& w ) const { ; double px, py, pz, qx, qy, qz, alpha; if( fit_in_double(p.x(), px) && fit_in_double(p.y(), py) && fit_in_double(p.z(), pz) && fit_in_double(q.x(), qx) && fit_in_double(q.y(), qy) && fit_in_double(q.z(), qz) && fit_in_double(w, alpha) ) { ; double px_qx = (px - qx); double py_qy = (py - qy); double pz_qz = (pz - qz); int int_tmp_result; double double_tmp_result; double eps; double_tmp_result = (((square( px_qx ) + square( py_qy )) + square( pz_qz )) - (alpha * 4.00000000000000000000e+00)); double max1 = CGAL::abs(px_qx); double apy_qy = CGAL::abs(py_qy); double apz_qz = CGAL::abs(pz_qz); if( (max1 < apy_qy) ) { max1 = apy_qy; } if( (max1 < apz_qz) ) { max1 = apz_qz; } double max2 = CGAL::abs(alpha); if( ((max1 < 8.85464260923320109378e-147) || (max2 < 7.84046957372481590760e-293 && max2!=0)) ) { ; return Base::operator()(p,q,w); } else { if( ((max1 > 2.23974474217780371323e+102) || (max2 > 5.01645651011311642768e+204)) ) { ; return Base::operator()(p,q,w); } eps = (2.11094186805729591487e-15 * CGAL::max ( max2, (max1 * max1) )); if( (double_tmp_result > eps) ) { int_tmp_result = 1; } else { if( (double_tmp_result < -eps) ) { int_tmp_result = -1; } else { ; return Base::operator()(p,q,w); } } } return static_cast(int_tmp_result); } else return Base::operator()(p,q,w); } }; } } } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" 2 # 71 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" namespace CGAL { namespace internal { template < typename K_base, bool has_cheap_access_to_cartesian_coordinates = true> class Static_filters : public K_base { typedef Static_filters Self; public: typedef Static_filters_predicates::Orientation_2 Orientation_2; typedef Static_filters_predicates::Orientation_3 Orientation_3; typedef Static_filters_predicates::Side_of_oriented_circle_2 Side_of_oriented_circle_2; typedef Static_filters_predicates::Side_of_oriented_sphere_3 Side_of_oriented_sphere_3; typedef Static_filters_predicates::Compare_squared_radius_3 Compare_squared_radius_3; Orientation_2 orientation_2_object() const { return Orientation_2(); } Orientation_3 orientation_3_object() const { return Orientation_3(); } Side_of_oriented_circle_2 side_of_oriented_circle_2_object() const { return Side_of_oriented_circle_2(); } Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const { return Side_of_oriented_sphere_3(); } Compare_squared_radius_3 compare_squared_radius_3_object() const { return Compare_squared_radius_3(); } }; template < typename K_base> class Static_filters : public Static_filters { typedef Static_filters Self; public: typedef Static_filters_predicates::Compare_y_at_x_2 Compare_y_at_x_2; typedef CommonKernelFunctors::Left_turn_2 Left_turn_2; typedef CartesianKernelFunctors::Less_x_2 Less_x_2; typedef CartesianKernelFunctors::Less_y_2 Less_y_2; typedef CartesianKernelFunctors::Less_xy_2 Less_xy_2; typedef CartesianKernelFunctors::Less_yx_2 Less_yx_2; typedef CartesianKernelFunctors::Less_x_3 Less_x_3; typedef CartesianKernelFunctors::Less_y_3 Less_y_3; typedef CartesianKernelFunctors::Less_z_3 Less_z_3; typedef CartesianKernelFunctors::Less_xy_3 Less_xy_3; typedef CartesianKernelFunctors::Less_xyz_3 Less_xyz_3; typedef CartesianKernelFunctors::Compare_xy_2 Compare_xy_2; typedef CartesianKernelFunctors::Compare_x_3 Compare_x_3; typedef CartesianKernelFunctors::Compare_y_3 Compare_y_3; typedef CartesianKernelFunctors::Compare_z_3 Compare_z_3; typedef CartesianKernelFunctors::Compare_xy_3 Compare_xy_3; typedef CartesianKernelFunctors::Compare_xyz_3 Compare_xyz_3; Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } Compare_x_3 compare_x_3_object() const { return Compare_x_3(); } Compare_y_3 compare_y_3_object() const { return Compare_y_3(); } Compare_z_3 compare_z_3_object() const { return Compare_z_3(); } Compare_xy_3 compare_xy_3_object() const { return Compare_xy_3(); } Compare_xyz_3 compare_xyz_3_object() const { return Compare_xyz_3(); } Left_turn_2 left_turn_2_object() const { return Left_turn_2(); } Less_x_2 less_x_2_object() const { return Less_x_2(); } Less_y_2 less_y_2_object() const { return Less_y_2(); } Less_xy_2 less_xy_2_object() const { return Less_xy_2(); } Less_yx_2 less_yx_2_object() const { return Less_yx_2(); } Less_x_3 less_x_3_object() const { return Less_x_3(); } Less_y_3 less_y_3_object() const { return Less_y_3(); } Less_z_3 less_z_3_object() const { return Less_z_3(); } Less_xy_3 less_xy_3_object() const { return Less_xy_3(); } Less_xyz_3 less_xyz_3_object() const { return Less_xyz_3(); } Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(); } # 234 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/internal/Static_filters/Static_filters.h" }; } } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 # 48 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" namespace CGAL { template < typename CK > struct Filtered_kernel_base : public CK { typedef typename internal::Exact_type_selector::Type Exact_nt; typedef Simple_cartesian Exact_kernel; typedef Simple_cartesian Approximate_kernel; typedef Cartesian_converter C2E; typedef Cartesian_converter C2F; enum { Has_filtered_predicates = true }; typedef Boolean_tag Has_filtered_predicates_tag; template < typename Kernel2 > struct Base { typedef typename CK::template Base CK2; typedef Filtered_kernel_base Type; }; template < typename T > struct Ambient_dimension { typedef typename T::Ambient_dimension type; }; template < typename T > struct Feature_dimension { typedef typename T::Feature_dimension type; }; # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" typedef Filtered_predicate Angle_2; Angle_2 angle_2_object() const { return Angle_2(); } typedef Filtered_predicate Angle_3; Angle_3 angle_3_object() const { return Angle_3(); } typedef Filtered_predicate Are_ordered_along_line_2; Are_ordered_along_line_2 are_ordered_along_line_2_object() const { return Are_ordered_along_line_2(); } typedef Filtered_predicate Are_ordered_along_line_3; Are_ordered_along_line_3 are_ordered_along_line_3_object() const { return Are_ordered_along_line_3(); } typedef Filtered_predicate Are_parallel_2; Are_parallel_2 are_parallel_2_object() const { return Are_parallel_2(); } typedef Filtered_predicate Are_parallel_3; Are_parallel_3 are_parallel_3_object() const { return Are_parallel_3(); } typedef Filtered_predicate Are_strictly_ordered_along_line_2; Are_strictly_ordered_along_line_2 are_strictly_ordered_along_line_2_object() const { return Are_strictly_ordered_along_line_2(); } typedef Filtered_predicate Are_strictly_ordered_along_line_3; Are_strictly_ordered_along_line_3 are_strictly_ordered_along_line_3_object() const { return Are_strictly_ordered_along_line_3(); } typedef Filtered_predicate Bounded_side_2; Bounded_side_2 bounded_side_2_object() const { return Bounded_side_2(); } typedef Filtered_predicate Bounded_side_3; Bounded_side_3 bounded_side_3_object() const { return Bounded_side_3(); } typedef Filtered_predicate Collinear_are_ordered_along_line_2; Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const { return Collinear_are_ordered_along_line_2(); } typedef Filtered_predicate Collinear_are_ordered_along_line_3; Collinear_are_ordered_along_line_3 collinear_are_ordered_along_line_3_object() const { return Collinear_are_ordered_along_line_3(); } typedef Filtered_predicate Collinear_are_strictly_ordered_along_line_2; Collinear_are_strictly_ordered_along_line_2 collinear_are_strictly_ordered_along_line_2_object() const { return Collinear_are_strictly_ordered_along_line_2(); } typedef Filtered_predicate Collinear_are_strictly_ordered_along_line_3; Collinear_are_strictly_ordered_along_line_3 collinear_are_strictly_ordered_along_line_3_object() const { return Collinear_are_strictly_ordered_along_line_3(); } typedef Filtered_predicate Collinear_has_on_2; Collinear_has_on_2 collinear_has_on_2_object() const { return Collinear_has_on_2(); } typedef Filtered_predicate Collinear_2; Collinear_2 collinear_2_object() const { return Collinear_2(); } typedef Filtered_predicate Collinear_3; Collinear_3 collinear_3_object() const { return Collinear_3(); } typedef Filtered_predicate Compare_angle_with_x_axis_2; Compare_angle_with_x_axis_2 compare_angle_with_x_axis_2_object() const { return Compare_angle_with_x_axis_2(); } typedef Filtered_predicate Compare_dihedral_angle_3; Compare_dihedral_angle_3 compare_dihedral_angle_3_object() const { return Compare_dihedral_angle_3(); } typedef Filtered_predicate Compare_distance_2; Compare_distance_2 compare_distance_2_object() const { return Compare_distance_2(); } typedef Filtered_predicate Compare_distance_3; Compare_distance_3 compare_distance_3_object() const { return Compare_distance_3(); } typedef Filtered_predicate Compare_slope_2; Compare_slope_2 compare_slope_2_object() const { return Compare_slope_2(); } typedef Filtered_predicate Compare_squared_distance_2; Compare_squared_distance_2 compare_squared_distance_2_object() const { return Compare_squared_distance_2(); } typedef Filtered_predicate Compare_squared_distance_3; Compare_squared_distance_3 compare_squared_distance_3_object() const { return Compare_squared_distance_3(); } typedef Filtered_predicate Compare_squared_radius_3; Compare_squared_radius_3 compare_squared_radius_3_object() const { return Compare_squared_radius_3(); } typedef Filtered_predicate Compare_x_at_y_2; Compare_x_at_y_2 compare_x_at_y_2_object() const { return Compare_x_at_y_2(); } typedef Filtered_predicate Compare_xyz_3; Compare_xyz_3 compare_xyz_3_object() const { return Compare_xyz_3(); } typedef Filtered_predicate Compare_xy_2; Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } typedef Filtered_predicate Compare_xy_3; Compare_xy_3 compare_xy_3_object() const { return Compare_xy_3(); } typedef Filtered_predicate Compare_x_2; Compare_x_2 compare_x_2_object() const { return Compare_x_2(); } typedef Filtered_predicate Compare_x_3; Compare_x_3 compare_x_3_object() const { return Compare_x_3(); } typedef Filtered_predicate Compare_y_at_x_2; Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(); } typedef Filtered_predicate Compare_y_2; Compare_y_2 compare_y_2_object() const { return Compare_y_2(); } typedef Filtered_predicate Compare_y_3; Compare_y_3 compare_y_3_object() const { return Compare_y_3(); } typedef Filtered_predicate Compare_yx_2; Compare_yx_2 compare_yx_2_object() const { return Compare_yx_2(); } typedef Filtered_predicate Compare_z_3; Compare_z_3 compare_z_3_object() const { return Compare_z_3(); } typedef Filtered_predicate Coplanar_orientation_3; Coplanar_orientation_3 coplanar_orientation_3_object() const { return Coplanar_orientation_3(); } typedef Filtered_predicate Coplanar_side_of_bounded_circle_3; Coplanar_side_of_bounded_circle_3 coplanar_side_of_bounded_circle_3_object() const { return Coplanar_side_of_bounded_circle_3(); } typedef Filtered_predicate Coplanar_3; Coplanar_3 coplanar_3_object() const { return Coplanar_3(); } typedef Filtered_predicate Counterclockwise_in_between_2; Counterclockwise_in_between_2 counterclockwise_in_between_2_object() const { return Counterclockwise_in_between_2(); } typedef Filtered_predicate Do_intersect_2; Do_intersect_2 do_intersect_2_object() const { return Do_intersect_2(); } typedef Filtered_predicate Do_intersect_3; Do_intersect_3 do_intersect_3_object() const { return Do_intersect_3(); } typedef Filtered_predicate Equal_xy_3; Equal_xy_3 equal_xy_3_object() const { return Equal_xy_3(); } typedef Filtered_predicate Equal_x_2; Equal_x_2 equal_x_2_object() const { return Equal_x_2(); } typedef Filtered_predicate Equal_x_3; Equal_x_3 equal_x_3_object() const { return Equal_x_3(); } typedef Filtered_predicate Equal_y_2; Equal_y_2 equal_y_2_object() const { return Equal_y_2(); } typedef Filtered_predicate Equal_y_3; Equal_y_3 equal_y_3_object() const { return Equal_y_3(); } typedef Filtered_predicate Equal_z_3; Equal_z_3 equal_z_3_object() const { return Equal_z_3(); } typedef Filtered_predicate Equal_2; Equal_2 equal_2_object() const { return Equal_2(); } typedef Filtered_predicate Equal_3; Equal_3 equal_3_object() const { return Equal_3(); } typedef Filtered_predicate Has_on_boundary_2; Has_on_boundary_2 has_on_boundary_2_object() const { return Has_on_boundary_2(); } typedef Filtered_predicate Has_on_boundary_3; Has_on_boundary_3 has_on_boundary_3_object() const { return Has_on_boundary_3(); } typedef Filtered_predicate Has_on_bounded_side_2; Has_on_bounded_side_2 has_on_bounded_side_2_object() const { return Has_on_bounded_side_2(); } typedef Filtered_predicate Has_on_bounded_side_3; Has_on_bounded_side_3 has_on_bounded_side_3_object() const { return Has_on_bounded_side_3(); } typedef Filtered_predicate Has_on_negative_side_2; Has_on_negative_side_2 has_on_negative_side_2_object() const { return Has_on_negative_side_2(); } typedef Filtered_predicate Has_on_negative_side_3; Has_on_negative_side_3 has_on_negative_side_3_object() const { return Has_on_negative_side_3(); } typedef Filtered_predicate Has_on_positive_side_2; Has_on_positive_side_2 has_on_positive_side_2_object() const { return Has_on_positive_side_2(); } typedef Filtered_predicate Has_on_positive_side_3; Has_on_positive_side_3 has_on_positive_side_3_object() const { return Has_on_positive_side_3(); } typedef Filtered_predicate Has_on_unbounded_side_2; Has_on_unbounded_side_2 has_on_unbounded_side_2_object() const { return Has_on_unbounded_side_2(); } typedef Filtered_predicate Has_on_unbounded_side_3; Has_on_unbounded_side_3 has_on_unbounded_side_3_object() const { return Has_on_unbounded_side_3(); } typedef Filtered_predicate Has_on_2; Has_on_2 has_on_2_object() const { return Has_on_2(); } typedef Filtered_predicate Has_on_3; Has_on_3 has_on_3_object() const { return Has_on_3(); } typedef Filtered_predicate Is_degenerate_2; Is_degenerate_2 is_degenerate_2_object() const { return Is_degenerate_2(); } typedef Filtered_predicate Is_degenerate_3; Is_degenerate_3 is_degenerate_3_object() const { return Is_degenerate_3(); } typedef Filtered_predicate Is_horizontal_2; Is_horizontal_2 is_horizontal_2_object() const { return Is_horizontal_2(); } typedef Filtered_predicate Is_vertical_2; Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } typedef Filtered_predicate Left_turn_2; Left_turn_2 left_turn_2_object() const { return Left_turn_2(); } typedef Filtered_predicate Less_distance_to_point_2; Less_distance_to_point_2 less_distance_to_point_2_object() const { return Less_distance_to_point_2(); } typedef Filtered_predicate Less_distance_to_point_3; Less_distance_to_point_3 less_distance_to_point_3_object() const { return Less_distance_to_point_3(); } typedef Filtered_predicate Less_rotate_ccw_2; Less_rotate_ccw_2 less_rotate_ccw_2_object() const { return Less_rotate_ccw_2(); } typedef Filtered_predicate Less_signed_distance_to_line_2; Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object() const { return Less_signed_distance_to_line_2(); } typedef Filtered_predicate Less_signed_distance_to_plane_3; Less_signed_distance_to_plane_3 less_signed_distance_to_plane_3_object() const { return Less_signed_distance_to_plane_3(); } typedef Filtered_predicate Less_xyz_3; Less_xyz_3 less_xyz_3_object() const { return Less_xyz_3(); } typedef Filtered_predicate Less_xy_2; Less_xy_2 less_xy_2_object() const { return Less_xy_2(); } typedef Filtered_predicate Less_xy_3; Less_xy_3 less_xy_3_object() const { return Less_xy_3(); } typedef Filtered_predicate Less_x_2; Less_x_2 less_x_2_object() const { return Less_x_2(); } typedef Filtered_predicate Less_x_3; Less_x_3 less_x_3_object() const { return Less_x_3(); } typedef Filtered_predicate Less_yx_2; Less_yx_2 less_yx_2_object() const { return Less_yx_2(); } typedef Filtered_predicate Less_y_2; Less_y_2 less_y_2_object() const { return Less_y_2(); } typedef Filtered_predicate Less_y_3; Less_y_3 less_y_3_object() const { return Less_y_3(); } typedef Filtered_predicate Less_z_3; Less_z_3 less_z_3_object() const { return Less_z_3(); } typedef Filtered_predicate Orientation_2; Orientation_2 orientation_2_object() const { return Orientation_2(); } typedef Filtered_predicate Orientation_3; Orientation_3 orientation_3_object() const { return Orientation_3(); } typedef Filtered_predicate Oriented_side_2; Oriented_side_2 oriented_side_2_object() const { return Oriented_side_2(); } typedef Filtered_predicate Oriented_side_3; Oriented_side_3 oriented_side_3_object() const { return Oriented_side_3(); } typedef Filtered_predicate Side_of_bounded_circle_2; Side_of_bounded_circle_2 side_of_bounded_circle_2_object() const { return Side_of_bounded_circle_2(); } typedef Filtered_predicate Side_of_bounded_sphere_3; Side_of_bounded_sphere_3 side_of_bounded_sphere_3_object() const { return Side_of_bounded_sphere_3(); } typedef Filtered_predicate Side_of_oriented_circle_2; Side_of_oriented_circle_2 side_of_oriented_circle_2_object() const { return Side_of_oriented_circle_2(); } typedef Filtered_predicate Side_of_oriented_sphere_3; Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const { return Side_of_oriented_sphere_3(); } # 91 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_kernel.h" 2 }; template < typename CK > struct Static_filters_base : public internal::Static_filters< Filtered_kernel_base > { template < typename Kernel2 > struct Base { typedef typename CK::template Base::Type CK2; typedef Static_filters_base Type; }; }; template < typename CK, bool UseStaticFilters = true > struct Filtered_kernel_adaptor : public Filtered_kernel_base { enum { Has_static_filters = false }; }; template < typename CK > struct Filtered_kernel_adaptor : public Static_filters_base { enum { Has_static_filters = true }; }; template < typename CK, bool UseStaticFilters > struct Filtered_kernel : public Filtered_kernel_adaptor< Type_equality_wrapper< typename CK:: template Base< Filtered_kernel >::Type, Filtered_kernel >, UseStaticFilters > {}; } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_predicates_inexact_constructions_kernel.h" 2 namespace CGAL { class Epick : public Filtered_kernel_adaptor< Type_equality_wrapper< Simple_cartesian::Base::Type, Epick >, true > {}; typedef Epick Exact_predicates_inexact_constructions_kernel; } # 22 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/cmake/platforms/x64_linux_gcc-snapshot_cxx0x/test/CGAL_ipelets_Demo/alpha_shapes.cpp" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" # 1 "/usr/include/ipelib.h" 1 3 4 # 37 "/usr/include/ipelib.h" 3 4 # 1 "/usr/include/ipebase.h" 1 3 4 # 35 "/usr/include/ipebase.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 1 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 4 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 36 "/usr/include/ipebase.h" 2 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 1 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 4 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 37 "/usr/include/ipebase.h" 2 3 4 typedef unsigned char uchar; # 54 "/usr/include/ipebase.h" 3 4 extern void ipeAssertionFailed(const char *, int, const char *); extern void ipeDebug(const char *msg, ...); template class IpeAutoPtr { public: IpeAutoPtr(T *ptr) : iPtr(ptr) { } ~IpeAutoPtr() { delete iPtr; } T *operator->() { return iPtr; } T &operator*() { return *iPtr; } T *ptr() { return iPtr; } T *take() { T *p = iPtr; iPtr = 0; return p; } private: T *iPtr; }; namespace ipe { const int IPELIB_VERSION = 70100; const int OLDEST_FILE_FORMAT = 70000; const int FILE_FORMAT = 70005; class Stream; class String { public: String(); String(const char *str); String(const String &rhs); String(const String &rhs, int index, int len); String &operator=(const String &rhs); ~String(); inline char operator[](int i) const { return iImp->iData[i]; } inline bool empty() const { return (size() == 0); } inline bool isEmpty() const { return (size() == 0); } const char *data() const { return iImp->iData; } inline int size() const { return iImp->iSize; } inline void operator+=(const String &rhs) { append(rhs); } void operator+=(char ch) { append(ch); } inline String substr(int i, int len = -1) const { return String(*this, i, len); } inline String left(int i) const { return String(*this, 0, i); } String right(int i) const; inline bool operator!=(const String &rhs) const { return !(*this == rhs); } int find(char ch) const; int rfind(char ch) const; int find(const char *rhs) const; void erase(); void append(const String &rhs); void append(char ch); bool operator==(const String &rhs) const; bool operator<(const String &rhs) const; String operator+(const String &rhs) const; int unicode(int &index) const; const char *z() const; private: void detach(int n); private: struct Imp { int iRefCount; int iSize; int iCapacity; char *iData; }; Imp *iImp; }; class Fixed { public: explicit Fixed(int val) : iValue(val * 1000) { } explicit Fixed() { } inline static Fixed fromInternal(int val); static Fixed fromDouble(double val); inline int toInt() const { return iValue / 1000; } inline double toDouble() const { return iValue / 1000.0; } inline int internal() const { return iValue; } Fixed mult(int a, int b) const; inline bool operator==(const Fixed &rhs) const; inline bool operator!=(const Fixed &rhs) const; inline bool operator<(const Fixed &rhs) const; private: int iValue; friend Stream &operator<<(Stream &stream, const Fixed &f); }; class Lex { public: explicit Lex(String str); String token(); String nextToken(); int getInt(); int getHexByte(); Fixed getFixed(); unsigned long int getHexNumber(); double getDouble(); inline char getChar() { return iString[iPos++]; } void skipWhitespace(); inline Lex &operator>>(int &i) { i = getInt(); return *this; } inline Lex &operator>>(double &d) { d = getDouble(); return *this; } inline Lex &operator>>(Fixed &d) { d = getFixed(); return *this; } inline void mark() { iMark = iPos; } inline void fromMark() { iPos = iMark; } inline bool eos() const { return (iPos == iString.size()); } private: String iString; int iPos; int iMark; }; class Buffer { public: Buffer(); ~Buffer(); Buffer(const Buffer &rhs); Buffer &operator=(const Buffer &rhs); explicit Buffer(int size); explicit Buffer(const char *data, int size); inline char &operator[](int index) { return iImp->iData[index]; } inline const char &operator[](int index) const { return iImp->iData[index]; } inline int size() const { return iImp->iSize; } inline char *data() { return iImp->iData; } inline const char *data() const { return iImp->iData; } private: struct Imp { int iRefCount; char *iData; int iSize; }; Imp *iImp; }; class Stream { public: virtual ~Stream(); virtual void putChar(char ch) = 0; virtual void close(); virtual void putString(String s); virtual void putCString(const char *s); virtual void putRaw(const char *data, int size); inline Stream &operator<<(char ch) { putChar(ch); return *this; } inline Stream &operator<<(const String &s) { putString(s); return *this; } inline Stream &operator<<(const char *s) { putCString(s); return *this; } Stream &operator<<(int i); Stream &operator<<(double d); void putHexByte(char b); void putXmlString(String s); }; class TellStream : public Stream { public: virtual long tell() const = 0; }; class StringStream : public TellStream { public: StringStream(String &string); virtual void putChar(char ch); virtual void putString(String s); virtual void putCString(const char *s); virtual void putRaw(const char *data, int size); virtual long tell() const; private: String &iString; }; class FileStream : public TellStream { public: FileStream(std::FILE *file); virtual void putChar(char ch); virtual void putString(String s); virtual void putCString(const char *s); virtual void putRaw(const char *data, int size); virtual long tell() const; private: std::FILE *iFile; }; class DataSource { public: virtual ~DataSource() = 0; virtual int getChar() = 0; }; class FileSource : public DataSource { public: FileSource(std::FILE *file); virtual int getChar(); private: std::FILE *iFile; }; class BufferSource : public DataSource { public: BufferSource(const Buffer &buffer); virtual int getChar(); private: const Buffer &iBuffer; int iPos; }; class Platform { public: typedef void (*DebugHandler)(const char *); static int libVersion(); static void initLib(int version); static void setDebug(bool debug); static char pathSeparator(); static String currentDirectory(); static String latexDirectory(); static String fontmapFile(); static bool fileExists(String fname); static String readFile(String fname); static int runPdfLatex(String dir); }; inline bool Fixed::operator==(const Fixed &rhs) const { return iValue == rhs.iValue; } inline bool Fixed::operator!=(const Fixed &rhs) const { return iValue != rhs.iValue; } inline bool Fixed::operator<(const Fixed &rhs) const { return iValue < rhs.iValue; } inline Fixed Fixed::fromInternal(int val) { Fixed f; f.iValue = val; return f; } } # 38 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipegeo.h" 1 3 4 # 37 "/usr/include/ipegeo.h" 3 4 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 4 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 4 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 38 "/usr/include/ipegeo.h" 2 3 4 namespace ipe { template inline T max(const T &lhs, const T &rhs) { return (lhs > rhs) ? lhs : rhs; } template inline T min(const T &lhs, const T &rhs) { return (lhs < rhs) ? lhs : rhs; } inline double abs(double val) { return (val > 0) ? val : -val; } class Angle { public: inline explicit Angle() { } inline Angle(double alpha) : iAlpha(alpha) { } inline static Angle Degrees(double alpha) { return Angle(alpha * 3.1415926535897932385 / 180.0); } inline operator double() const { return iAlpha; } double degrees() const; Angle normalize(double lowlimit); bool liesBetween(Angle small, Angle large) const; private: double iAlpha; }; class Vector { public: Vector() { } explicit Vector(Angle alpha); explicit Vector(double x0, double y0) : x(x0), y(y0) { } inline double sqLen() const; double len() const; Angle angle() const; Vector normalized() const; Vector orthogonal() const; double factorize(Vector &unit) const; bool snap(const Vector &mouse, Vector &pos, double &bound) const; inline bool operator==(const Vector &rhs) const; inline bool operator!=(const Vector &rhs) const; inline void operator+=(const Vector &rhs); inline void operator-=(const Vector &rhs); inline void operator*=(double rhs); inline Vector operator+(const Vector &rhs) const; inline Vector operator-(const Vector &rhs) const; inline Vector operator*(double rhs) const; inline Vector operator-() const; static Vector ZERO; public: double x; double y; }; Stream &operator<<(Stream &stream, const Vector &rhs); class Rect { public: explicit Rect() : iMin(1,0), iMax(-1,0) { } explicit Rect(const Vector &c) : iMin(c), iMax(c) { } explicit Rect(const Vector &c1, const Vector &c2); void clear() { iMin.x = 1.0; iMax.x = -1.0; iMin.y = iMax.y = 0; } int isEmpty() const { return iMin.x > iMax.x; } inline double left() const { return iMin.x; } inline double right() const { return iMax.x; } inline double bottom() const { return iMin.y; } inline double top() const { return iMax.y; } inline Vector topRight() const { return iMax; } inline Vector bottomLeft() const { return iMin; } inline Vector topLeft() const { return Vector(iMin.x, iMax.y); } inline Vector bottomRight() const { return Vector(iMax.x, iMin.y); } double width() const { return iMax.x - iMin.x; } double height() const { return iMax.y - iMin.y; } void addPoint(const Vector &rhs); void addRect(const Rect &rhs); void clipTo(const Rect &rhs); bool contains(const Vector &rhs) const; bool contains(const Rect &rhs) const; bool certainClearance(const Vector &v, double bound) const; bool intersects(const Rect &rhs) const; private: Vector iMin; Vector iMax; }; Stream &operator<<(Stream &stream, const Rect &rhs); class Line { public: explicit Line() : iP(0.0, 0.0), iDir(1.0, 0.0) { } explicit Line(const Vector &p, const Vector &dir); static Line through(const Vector &p, const Vector &q); double side(const Vector &p) const; inline Vector normal() const; double distance(const Vector &v) const; bool intersects(const Line &line, Vector &pt); Vector project(const Vector &v) const; inline Vector dir() const; public: Vector iP; private: Vector iDir; }; class Segment { public: Segment() { } explicit Segment(const Vector &p, const Vector &q) : iP(p), iQ(q) { } inline Line line() const; double distance(const Vector &v, double bound) const; double distance(const Vector &v) const; bool project(const Vector &v, Vector &projection) const; bool intersects(const Segment &seg, Vector &pt) const; bool intersects(const Line &l, Vector &pt) const; bool snap(const Vector &mouse, Vector &pos, double &bound) const; public: Vector iP; Vector iQ; }; class Bezier { public: inline Bezier() { } inline Bezier(const Vector &p0, const Vector &p1, const Vector &p2, const Vector &p3); Vector point(double t) const; Vector tangent(double t) const; double distance(const Vector &v, double bound); bool straight(double precision) const; void subdivide(Bezier &l, Bezier &r) const; void approximate(double precision, std::vector &result) const; Rect bbox() const; bool snap(const Vector &v, double &t, Vector &pos, double &bound) const; static Bezier quadBezier(const Vector &p0, const Vector &p1, const Vector &p2); static void spline(int n, const Vector *v, std::vector &result); static void closedSpline(int n, const Vector *v, std::vector &result); void intersect(const Line &l, std::vector &result) const; void intersect(const Segment &l, std::vector &result) const; void intersect(const Bezier &b, std::vector &result) const; public: Vector iV[4]; }; class Linear { public: Linear(); explicit Linear(Angle angle); inline explicit Linear(double m11, double m21, double m12, double m22); explicit Linear(String str); Linear inverse() const; inline bool isIdentity() const; inline Vector operator*(const Vector &rhs) const; inline bool operator==(const Linear &rhs) const; inline double determinant() const; public: double a[4]; }; Stream &operator<<(Stream &stream, const Linear &rhs); class Matrix { public: Matrix(); inline Matrix(const Linear &linear); inline explicit Matrix(const Linear &linear, const Vector &t); inline explicit Matrix(double m11, double m21, double m12, double m22, double t1, double t2); inline explicit Matrix(const Vector &v); explicit Matrix(String str); Matrix inverse() const; inline Vector operator*(const Vector &rhs) const; inline Bezier operator*(const Bezier &rhs) const; inline Vector translation() const; inline Linear linear() const; inline bool isIdentity() const; inline bool operator==(const Matrix &rhs) const; public: double a[6]; }; Stream &operator<<(Stream &stream, const Matrix &rhs); class Arc { public: inline Arc(); inline Arc(const Matrix &m, Angle alpha, Angle beta); inline Arc(const Matrix &m); Arc(const Matrix &m0, const Vector &begp, const Vector &endp); inline bool isEllipse() const; double distance(const Vector &v, double bound) const; double distance(const Vector &v, double bound, Vector &pos, Angle &angle) const; Rect bbox() const; inline Vector beginp() const; inline Vector endp() const; void intersect(const Line &l, std::vector &result) const; void intersect(const Segment &s, std::vector &result) const; void intersect(const Arc &a, std::vector &result) const; void intersect(const Bezier &b, std::vector &result) const; private: void subdivide(Arc &l, Arc &r) const; bool straight(const double precision) const; public: Matrix iM; Angle iAlpha; Angle iBeta; }; inline double Vector::sqLen() const { return (x * x + y * y); } inline bool Vector::operator==(const Vector &rhs) const { return x == rhs.x && y == rhs.y; } inline bool Vector::operator!=(const Vector &rhs) const { return x != rhs.x || y != rhs.y; } inline void Vector::operator+=(const Vector &rhs) { x += rhs.x; y += rhs.y; } inline void Vector::operator-=(const Vector &rhs) { x -= rhs.x; y -= rhs.y; } inline void Vector::operator*=(double rhs) { x *= rhs; y *= rhs; } inline Vector Vector::operator+(const Vector &rhs) const { Vector result = *this; result += rhs; return result; } inline Vector Vector::operator-(const Vector &rhs) const { Vector result = *this; result -= rhs; return result; } inline Vector Vector::operator*(double rhs) const { Vector result = *this; result *= rhs; return result; } inline Vector operator*(double lhs, const Vector &rhs) { return Vector(lhs * rhs.x, lhs * rhs.y); } inline double dot(const Vector &lhs, const Vector &rhs) { return lhs.x * rhs.x + lhs.y * rhs.y; } inline Vector Line::normal() const { return Vector(-iDir.y, iDir.x); } inline Vector Line::dir() const { return iDir; } inline Line Segment::line() const { return Line(iP, (iQ - iP).normalized()); } inline Vector Vector::operator-() const { return -1 * *this; } inline Bezier::Bezier(const Vector &p0, const Vector &p1, const Vector &p2, const Vector &p3) { iV[0] = p0; iV[1] = p1; iV[2] = p2; iV[3] = p3; } inline Bezier Matrix::operator*(const Bezier &rhs) const { return Bezier(*this * rhs.iV[0], *this * rhs.iV[1], *this * rhs.iV[2], *this * rhs.iV[3]); }; inline Arc::Arc() : iAlpha(0.0), iBeta(6.2831853071795862) { } inline Arc::Arc(const Matrix &m, Angle alpha, Angle beta) : iM(m), iAlpha(alpha), iBeta(beta) { } inline Arc::Arc(const Matrix &m) : iM(m), iAlpha(0.0), iBeta(6.2831853071795862) { } inline bool Arc::isEllipse() const { return iAlpha == 0.0 && iBeta == 6.2831853071795862; } inline Vector Arc::beginp() const { return iM * Vector(Angle(iAlpha)); } inline Vector Arc::endp() const { return iM * Vector(Angle(iBeta)); } inline Linear::Linear() { a[0] = a[3] = 1.0; a[1] = a[2] = 0.0; } inline Linear::Linear(double m11, double m21, double m12, double m22) { a[0] = m11; a[1] = m21; a[2] = m12; a[3] = m22; } inline Vector Linear::operator*(const Vector &rhs) const { return Vector(a[0] * rhs.x + a[2] * rhs.y, a[1] * rhs.x + a[3] * rhs.y); }; inline bool Linear::isIdentity() const { return (a[0] == 1.0 && a[1] == 0.0 && a[2] == 0.0 && a[3] == 1.0); } inline Linear operator*(const Linear &lhs, const Linear &rhs) { Linear m; m.a[0] = lhs.a[0] * rhs.a[0] + lhs.a[2] * rhs.a[1]; m.a[1] = lhs.a[1] * rhs.a[0] + lhs.a[3] * rhs.a[1]; m.a[2] = lhs.a[0] * rhs.a[2] + lhs.a[2] * rhs.a[3]; m.a[3] = lhs.a[1] * rhs.a[2] + lhs.a[3] * rhs.a[3]; return m; } inline bool Linear::operator==(const Linear &rhs) const { return (a[0] == rhs.a[0] && a[1] == rhs.a[1] && a[2] == rhs.a[2] && a[3] == rhs.a[3]); } inline double Linear::determinant() const { return (a[0] * a[3] - a[1] * a[2]); } inline Matrix::Matrix(double m11, double m21, double m12, double m22, double t1, double t2) { a[0] = m11; a[1] = m21; a[2] = m12; a[3] = m22; a[4] = t1; a[5] = t2; } inline Matrix::Matrix(const Linear &linear) { a[0] = linear.a[0]; a[1] = linear.a[1]; a[2] = linear.a[2]; a[3] = linear.a[3]; a[4] = a[5] = 0.0; } inline Matrix::Matrix(const Linear &linear, const Vector &t) { a[0] = linear.a[0]; a[1] = linear.a[1]; a[2] = linear.a[2]; a[3] = linear.a[3]; a[4] = t.x; a[5] = t.y; } inline Vector Matrix::operator*(const Vector &rhs) const { return Vector(a[0] * rhs.x + a[2] * rhs.y + a[4], a[1] * rhs.x + a[3] * rhs.y + a[5]); }; inline bool Matrix::isIdentity() const { return (a[0] == 1.0 && a[1] == 0.0 && a[2] == 0.0 && a[3] == 1.0 && a[4] == 0.0 && a[5] == 0.0); } inline Matrix::Matrix() { a[0] = a[3] = 1.0; a[1] = a[2] = a[4] = a[5] = 0.0; } inline Matrix operator*(const Matrix &lhs, const Matrix &rhs) { Matrix m; m.a[0] = lhs.a[0] * rhs.a[0] + lhs.a[2] * rhs.a[1]; m.a[1] = lhs.a[1] * rhs.a[0] + lhs.a[3] * rhs.a[1]; m.a[2] = lhs.a[0] * rhs.a[2] + lhs.a[2] * rhs.a[3]; m.a[3] = lhs.a[1] * rhs.a[2] + lhs.a[3] * rhs.a[3]; m.a[4] = lhs.a[0] * rhs.a[4] + lhs.a[2] * rhs.a[5] + lhs.a[4]; m.a[5] = lhs.a[1] * rhs.a[4] + lhs.a[3] * rhs.a[5] + lhs.a[5]; return m; } inline Matrix::Matrix(const Vector &v) { a[0] = a[3] = 1.0; a[1] = a[2] = 0.0; a[4] = v.x; a[5] = v.y; } inline Vector Matrix::translation() const { return Vector(a[4], a[5]); } inline bool Matrix::operator==(const Matrix &rhs) const { return (a[0] == rhs.a[0] && a[1] == rhs.a[1] && a[2] == rhs.a[2] && a[3] == rhs.a[3] && a[4] == rhs.a[4] && a[5] == rhs.a[5]); } inline Linear Matrix::linear() const { return Linear(a[0], a[1], a[2], a[3]); } inline Arc operator*(const Matrix &lhs, const Arc &rhs) { return Arc(lhs * rhs.iM, rhs.iAlpha, rhs.iBeta); } } # 39 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipepath.h" 1 3 4 # 35 "/usr/include/ipepath.h" 3 4 # 1 "/usr/include/ipeobject.h" 1 3 4 # 35 "/usr/include/ipeobject.h" 3 4 # 1 "/usr/include/ipeattributes.h" 1 3 4 # 40 "/usr/include/ipeattributes.h" 3 4 namespace ipe { # 53 "/usr/include/ipeattributes.h" 3 4 enum Kind { EPen = 0, ESymbolSize, EArrowSize, EColor, EDashStyle, ETextSize, ETextStretch, ETextStyle, EGridSize, EAngleSize, EOpacity, ETiling, ESymbol, EGradient, EEffect }; extern const char * const kind_names[]; # 69 "/usr/include/ipeattributes.h" 3 4 enum Property { EPropPen = 0, EPropSymbolSize, EPropFArrow, EPropRArrow, EPropFArrowSize, EPropRArrowSize, EPropFArrowShape, EPropRArrowShape, EPropStrokeColor, EPropFillColor, EPropMarkShape, EPropPathMode, EPropDashStyle, EPropTextSize, EPropTextStyle, EPropOpacity, EPropTiling, EPropGradient, EPropHorizontalAlignment, EPropVerticalAlignment, EPropLineJoin, EPropLineCap, EPropFillRule, EPropPinned, EPropTransformations, EPropTransformableText, EPropMinipage, EPropWidth, }; extern const char * const property_names[]; enum TPathMode { EStrokedOnly, EStrokedAndFilled, EFilledOnly }; enum THorizontalAlignment { EAlignLeft, EAlignRight, EAlignHCenter }; enum TVerticalAlignment { EAlignBottom, EAlignBaseline, EAlignTop, EAlignVCenter }; enum TLineJoin { EDefaultJoin, EMiterJoin, ERoundJoin, EBevelJoin }; enum TLineCap { EDefaultCap, EButtCap, ERoundCap, ESquareCap }; enum TFillRule { EDefaultRule, EWindRule, EEvenOddRule }; enum TPinned { ENoPin = 0x00, EHorizontalPin = 0x01, EVerticalPin = 0x02, EFixedPin = 0x03 }; enum TTransformations { ETransformationsTranslations, ETransformationsRigidMotions, ETransformationsAffine }; enum TSelect { ENotSelected = 0, EPrimarySelected, ESecondarySelected }; class Color { public: Color() { } explicit Color(String str); explicit Color(int r, int g, int b); void save(Stream &stream) const; void saveRGB(Stream &stream) const; bool isGray() const; bool operator==(const Color &rhs) const; inline bool operator!=(const Color &rhs) const {return !(*this == rhs); } public: Fixed iRed, iGreen, iBlue; }; struct Tiling { Angle iAngle; double iStep; double iWidth; }; struct Gradient { struct Stop { double offset; Color color; }; enum TType { EAxial = 2, ERadial = 3 }; TType iType; Vector iV[2]; double iRadius[2]; bool iExtend; Matrix iMatrix; std::vector iStops; }; struct Layout { Layout() { iPaperSize.x = -1.0; } bool isNull() const { return iPaperSize.x < 0.0; } Rect paper() const { return Rect(-iOrigin, iPaperSize - iOrigin); } Vector iPaperSize; Vector iOrigin; Vector iFrameSize; double iParagraphSkip; bool iCrop; }; struct Effect { public: enum TEffect { ENormal, ESplitHI, ESplitHO, ESplitVI, ESplitVO, EBlindsH, EBlindsV, EBoxI, EBoxO, EWipeLR, EWipeBT, EWipeRL, EWipeTB, EDissolve, EGlitterLR, EGlitterTB, EGlitterD }; Effect(); void pageDictionary(Stream &stream) const; public: TEffect iEffect; int iTransitionTime; int iDuration; }; class Repository { public: static Repository *get(); static void cleanup(); String toString(int index) const; int toIndex(String str); private: Repository(); static Repository *singleton; std::vector iStrings; }; class Attribute { enum { EMiniMask = 0xc0000000, ETypeMask = 0xe0000000, ESymbolic = 0x80000000, EFixed = 0x40000000, EAbsolute = 0xc0000000, EEnum = 0xe0000000, EFixedMask = 0x3fffffff, ENameMask = 0x1fffffff, EWhiteValue = ((1000 << 20) + (1000 << 10) + 1000), EOneValue = EFixed|1000 }; public: explicit Attribute() { } explicit Attribute(bool symbolic, String name); explicit Attribute(Fixed value); explicit Attribute(Color color); static Attribute Boolean(bool flag) { return Attribute(EEnum + flag); } explicit Attribute(THorizontalAlignment align) { iName = EEnum + align +2; } explicit Attribute(TVerticalAlignment align) { iName = EEnum + align + 5; } explicit Attribute(TLineJoin join) { iName = EEnum + join + 9; } explicit Attribute(TLineCap cap) { iName = EEnum + cap + 13; } explicit Attribute(TFillRule rule) { iName = EEnum + rule + 17; } explicit Attribute(TPinned pin) { iName = EEnum + pin + 20; } explicit Attribute(TTransformations trans) { iName = EEnum + trans + 24; } explicit Attribute(TPathMode pm) { iName = EEnum + pm + 27; } inline bool isSymbolic() const { return ((iName & ETypeMask) == ESymbolic); } inline bool isString() const { return ((iName & ETypeMask) == EAbsolute); } inline bool isColor() const { return ((iName & EMiniMask) == 0); } inline bool isNumber() const { return ((iName & EMiniMask) == EFixed); } inline bool isEnum() const { return ((iName & ETypeMask) == EEnum); } inline bool isBoolean() const { return (isEnum() && 0 <= index() && index() <= 1); } inline bool isNormal() const { return (iName == ESymbolic); } inline int index() const { return iName & ENameMask; } int internal() const { return iName; } String string() const; Fixed number() const; Color color() const; bool boolean() const { return bool(index()); } THorizontalAlignment horizontalAlignment() const { return THorizontalAlignment(index() - 2); } TVerticalAlignment verticalAlignment() const { return TVerticalAlignment(index() - 5); } TLineJoin lineJoin() const {return TLineJoin(index() - 9); } TLineCap lineCap() const { return TLineCap(index() - 13); } TFillRule fillRule() const { return TFillRule(index() - 17); } TPinned pinned() const { return TPinned(index() - 20); } TTransformations transformations() const { return TTransformations(index() - 24); } TPathMode pathMode() const { return TPathMode(index() - 27); } inline bool operator==(const Attribute &rhs) const { return iName == rhs.iName; } inline bool operator!=(const Attribute &rhs) const { return iName != rhs.iName; } inline static Attribute BLACK() { return Attribute(0); } inline static Attribute WHITE() { return Attribute(EWhiteValue); } inline static Attribute ONE() { return Attribute(EOneValue); } inline static Attribute NORMAL() { return Attribute(ESymbolic); } inline static Attribute UNDEFINED() { return Attribute(ESymbolic + 1); } inline static Attribute BACKGROUND() { return Attribute(ESymbolic + 2); } inline static Attribute SYM_STROKE() { return Attribute(ESymbolic + 3); } inline static Attribute SYM_FILL() { return Attribute(ESymbolic + 4); } inline static Attribute SYM_PEN() { return Attribute(ESymbolic + 5); } inline static Attribute ARROW_NORMAL() { return Attribute(ESymbolic + 6); } inline static Attribute OPAQUE() { return Attribute(ESymbolic + 7); } inline static Attribute ARROW_ARC() { return Attribute(ESymbolic + 8); } inline static Attribute ARROW_FARC() { return Attribute(ESymbolic + 9); } static Attribute makeColor(String str, Attribute deflt); static Attribute makeScalar(String str, Attribute deflt); static Attribute makeDashStyle(String str); static Attribute makeTextSize(String str); static Attribute normal(Kind kind); private: inline Attribute(int index) : iName(index) { } explicit Attribute(bool symbolic, int index); private: unsigned int iName; friend class StyleSheet; }; typedef std::vector AttributeSeq; class AllAttributes { public: AllAttributes(); TPathMode iPathMode; Attribute iStroke; Attribute iFill; Attribute iDashStyle; Attribute iPen; bool iFArrow; bool iRArrow; Attribute iFArrowShape; Attribute iRArrowShape; Attribute iFArrowSize; Attribute iRArrowSize; Attribute iSymbolSize; Attribute iTextSize; THorizontalAlignment iHorizontalAlignment; TVerticalAlignment iVerticalAlignment; Attribute iTextStyle; TPinned iPinned; bool iTransformableText; TTransformations iTransformations; TLineJoin iLineJoin; TLineCap iLineCap; TFillRule iFillRule; Attribute iOpacity; Attribute iTiling; Attribute iGradient; Attribute iMarkShape; }; inline Stream &operator<<(Stream &stream, const Color &attr) { attr.save(stream); return stream; } } # 36 "/usr/include/ipeobject.h" 2 3 4 # 1 "/usr/include/ipexml.h" 1 3 4 # 39 "/usr/include/ipexml.h" 3 4 namespace ipe { class XmlAttributes { private: typedef std::map Map; public: typedef Map::const_iterator const_iterator; const_iterator begin() const { return iMap.begin(); } const_iterator end() const { return iMap.end(); } XmlAttributes(); void clear(); String operator[](String str) const; bool has(String str) const; bool has(String str, String &val) const; void add(String key, String val); inline void setSlash() { iSlash = true; } inline bool slash() const { return iSlash; } private: Map iMap; bool iSlash; }; class XmlParser { public: XmlParser(DataSource &source); virtual ~XmlParser(); int parsePosition() const { return iPos; } String parseToTag(); bool parseAttributes(XmlAttributes &attr, bool qm = false); bool parsePCDATA(String tag, String &pcdata); inline bool isTagChar(int ch) { return ('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z') || ch == '-'; } inline void getChar() { iCh = iSource.getChar(); ++iPos; } inline bool eos() { return (iCh == (-1)); } void skipWhitespace(); protected: String parseToTagX(); protected: DataSource &iSource; String iTopElement; int iCh; int iPos; }; } # 37 "/usr/include/ipeobject.h" 2 3 4 namespace ipe { class Visitor; class Painter; class Group; class Text; class Path; class Image; class Reference; class StyleSheet; class Cascade; class Object { public: enum Type { EGroup, EPath, EText, EImage, EReference }; virtual ~Object() = 0; virtual void accept(Visitor &visitor) const = 0; virtual Object *clone() const = 0; virtual Group *asGroup(); virtual Text *asText(); virtual Path *asPath(); virtual Image *asImage(); virtual Reference *asReference(); virtual Type type() const = 0; virtual TPinned pinned() const; void setPinned(TPinned pin); inline TTransformations transformations() const { return iTransformations; } void setTransformations(TTransformations trans); void setMatrix(const Matrix &matrix); inline const Matrix &matrix() const { return iMatrix; } virtual bool setAttribute(Property prop, Attribute value, Attribute stroke, Attribute fill); virtual Attribute getAttribute(Property prop); virtual void saveAsXml(Stream &stream, String layer) const = 0; virtual void draw(Painter &painter) const = 0; virtual void drawSimple(Painter &painter) const = 0; virtual double distance(const Vector &v, const Matrix &m, double bound) const = 0; # 116 "/usr/include/ipeobject.h" 3 4 virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const = 0; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const = 0; virtual void checkStyle(const Cascade *sheet, AttributeSeq &seq) const; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; protected: explicit Object(); explicit Object(const AllAttributes &attr); Object(const Object &rhs); explicit Object(const XmlAttributes &attr); void saveAttributesAsXml(Stream &stream, String layer) const; static void checkSymbol(Kind kind, Attribute attr, const Cascade *sheet, AttributeSeq &seq); protected: Matrix iMatrix; TPinned iPinned : 8; TTransformations iTransformations : 8; }; class Visitor { public: virtual ~Visitor(); virtual void visitGroup(const Group *obj); virtual void visitPath(const Path *obj); virtual void visitText(const Text *obj); virtual void visitImage(const Image *obj); virtual void visitReference(const Reference *obj); }; } # 36 "/usr/include/ipepath.h" 2 3 4 # 1 "/usr/include/ipeshape.h" 1 3 4 # 39 "/usr/include/ipeshape.h" 3 4 namespace ipe { class Painter; class Ellipse; class ClosedSpline; class Curve; class CurveSegment { public: enum Type { EArc, ESegment, EQuad, EBezier, ESpline }; inline Type type() const { return iType; } inline int countCP() const { return iNumCP; } inline Vector cp(int i) const { return iCP[i]; } inline Vector last() const { return iCP[iNumCP - 1]; } inline Matrix matrix() const { return *iM; } Bezier bezier() const; Arc arc() const; void beziers(std::vector &bez) const; void draw(Painter &painter) const; void addToBBox(Rect &box, const Matrix &m, bool cp) const; double distance(const Vector &v, const Matrix &m, double bound) const; void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; private: CurveSegment(Type type, int num, const Vector *cp, const Matrix *m = 0); private: Type iType; const Vector *iCP; int iNumCP; const Matrix *iM; friend class Curve; }; class SubPath { public: enum Type { ECurve, EEllipse, EClosedSpline }; virtual ~SubPath() = 0; virtual Type type() const = 0; virtual bool closed() const; virtual const Ellipse *asEllipse() const; virtual const ClosedSpline *asClosedSpline() const; virtual const Curve *asCurve() const; virtual void save(Stream &stream) const = 0; virtual void draw(Painter &painter) const = 0; virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const = 0; virtual double distance(const Vector &v, const Matrix &m, double bound) const = 0; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const = 0; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const = 0; }; class Ellipse : public SubPath { public: Ellipse(const Matrix &m); virtual Type type() const; virtual const Ellipse *asEllipse() const; inline Matrix matrix() const { return iM; } virtual void save(Stream &stream) const; virtual void draw(Painter &painter) const; virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; private: Matrix iM; }; class ClosedSpline : public SubPath { public: ClosedSpline(const std::vector &v); virtual Type type() const; virtual const ClosedSpline *asClosedSpline() const; void beziers(std::vector &bez) const; virtual void save(Stream &stream) const; virtual void draw(Painter &painter) const; virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; public: std::vector iCP; }; class Curve : public SubPath { public: Curve(); virtual Type type() const; inline virtual bool closed() const { return iClosed; } virtual const Curve *asCurve() const; virtual void save(Stream &stream) const; virtual void draw(Painter &painter) const; virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; int countSegments() const { return iSeg.size(); } CurveSegment segment(int i) const; CurveSegment closingSegment(Vector u[2]) const; void appendSegment(const Vector &v0, const Vector &v1); void appendArc(const Matrix &m, const Vector &v0, const Vector &v1); void appendQuad(const Vector &v0, const Vector &v1, const Vector &v2); void appendBezier(const Vector &v0, const Vector &v1, const Vector &v2, const Vector &v3); void appendSpline(const std::vector &v); void setClosed(bool closed); private: struct Seg { CurveSegment::Type iType; int iLastCP; int iMatrix; }; bool iClosed; std::vector iSeg; std::vector iCP; std::vector iM; }; class Shape { public: Shape(); explicit Shape(const Rect &rect); explicit Shape(const Segment &seg); explicit Shape(const Vector ¢er, double radius); explicit Shape(const Vector ¢er, double radius, double alpha0, double alpha1); ~Shape(); Shape(const Shape &rhs); Shape &operator=(const Shape &rhs); bool load(String data); void save(Stream &stream) const; void addToBBox(Rect &box, const Matrix &m, bool cp) const; double distance(const Vector &v, const Matrix &m, double bound) const; void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; inline int countSubPaths() const { return iImp->iSubPaths.size(); } inline const SubPath *subPath(int i) const { return iImp->iSubPaths[i]; } void appendSubPath(SubPath *sp); void draw(Painter &painter) const; private: typedef std::vector SubPathSeq; struct Imp { ~Imp(); int iRefCount; SubPathSeq iSubPaths; }; Imp *iImp; }; } # 37 "/usr/include/ipepath.h" 2 3 4 namespace ipe { class Path : public Object { public: explicit Path(const AllAttributes &attr, const Shape &shape, bool withArrows = false); static Path *create(const XmlAttributes &attr, String data); virtual Object *clone() const; virtual Path *asPath(); virtual Type type() const; void setPathMode(TPathMode pm); void setStroke(Attribute stroke); void setFill(Attribute fill); void setPen(Attribute pen); void setDashStyle(Attribute dash); void setLineCap(TLineCap s); void setLineJoin(TLineJoin s); void setFillRule(TFillRule s); void setOpacity(Attribute opaq); void setTiling(Attribute a); void setGradient(Attribute a); inline Attribute opacity() const { return iOpacity; } inline Attribute tiling() const { return iTiling; } inline Attribute gradient() const { return iGradient; } inline TPathMode pathMode() const; inline Attribute stroke() const; inline Attribute fill() const; inline Attribute pen() const; inline Attribute dashStyle() const; inline TLineCap lineCap() const; inline TLineJoin lineJoin() const; inline TFillRule fillRule() const; virtual void saveAsXml(Stream &stream, String layer) const; virtual void draw(Painter &painter) const; virtual void drawSimple(Painter &painter) const; virtual void accept(Visitor &visitor) const; virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void checkStyle(const Cascade *sheet, AttributeSeq &seq) const; virtual bool setAttribute(Property prop, Attribute value, Attribute stroke, Attribute fill); virtual Attribute getAttribute(Property prop); inline bool arrow() const; inline bool rArrow() const; inline Attribute arrowShape() const; inline Attribute rArrowShape() const; inline Attribute arrowSize() const; inline Attribute rArrowSize() const; void setArrow(bool arrow, Attribute shape, Attribute size); void setRarrow(bool arrow, Attribute shape, Attribute size); static void drawArrow(Painter &painter, Vector pos, Angle alpha, Attribute shape, Attribute size, double radius); const Shape &shape() const { return iShape; } void setShape(const Shape &shape); private: explicit Path(const XmlAttributes &attr); void init(const AllAttributes &attr, bool withArrows); void makeArrowData(); private: TPathMode iPathMode : 2; int iHasFArrow : 1; int iHasRArrow : 1; TLineJoin iLineJoin : 3; TLineCap iLineCap : 3; TFillRule iFillRule : 2; int iFArrowOk : 1; int iRArrowOk : 1; int iFArrowArc : 1; int iRArrowArc : 1; Attribute iStroke; Attribute iFill; Attribute iDashStyle; Attribute iPen; Attribute iOpacity; Attribute iTiling; Attribute iGradient; Attribute iFArrowShape; Attribute iRArrowShape; Attribute iFArrowSize; Attribute iRArrowSize; Vector iFArrowPos; Angle iFArrowDir; Vector iRArrowPos; Angle iRArrowDir; Shape iShape; }; inline TPathMode Path::pathMode() const { return iPathMode; } inline Attribute Path::stroke() const { return iStroke; } inline Attribute Path::fill() const { return iFill; } inline Attribute Path::pen() const { return iPen; } inline Attribute Path::dashStyle() const { return iDashStyle; } inline TLineCap Path::lineCap() const { return TLineCap(iLineCap); } inline TLineJoin Path::lineJoin() const { return TLineJoin(iLineJoin); } inline TFillRule Path::fillRule() const { return TFillRule(iFillRule); } inline bool Path::arrow() const { return iHasFArrow; } inline bool Path::rArrow() const { return iHasRArrow; } inline Attribute Path::arrowShape() const { return iFArrowShape; } inline Attribute Path::rArrowShape() const { return iRArrowShape; } inline Attribute Path::arrowSize() const { return iFArrowSize; } inline Attribute Path::rArrowSize() const { return iRArrowSize; } } # 40 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipetext.h" 1 3 4 # 39 "/usr/include/ipetext.h" 3 4 namespace ipe { class Text : public Object { public: enum TextType { ELabel = 1, EMinipage }; explicit Text(); explicit Text(const AllAttributes &attr, String data, const Vector &pos, TextType type, double width = 10.0); Text(const Text &rhs); ~Text(); explicit Text(const XmlAttributes &attr, String data); virtual Object *clone() const; virtual Text *asText(); virtual Type type() const; virtual void saveAsXml(Stream &stream, String layer) const; virtual void draw(Painter &painter) const; virtual void drawSimple(Painter &painter) const; virtual void accept(Visitor &visitor) const; virtual void addToBBox(Rect &box, const Matrix &m, bool) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void checkStyle(const Cascade *sheet, AttributeSeq &seq) const; virtual bool setAttribute(Property prop, Attribute value, Attribute stroke, Attribute fill); virtual Attribute getAttribute(Property prop); private: void quadrilateral(const Matrix &m, Vector v[4]) const; public: Vector align() const; TextType textType() const; inline Vector position() const; inline String text() const; void setStroke(Attribute stroke); void setOpacity(Attribute opaq); inline Attribute stroke() const; inline Attribute size() const; inline Attribute style() const; inline Attribute opacity() const { return iOpacity; } inline bool isMinipage() const; void setTextType(TextType type); inline THorizontalAlignment horizontalAlignment() const; inline TVerticalAlignment verticalAlignment() const; void setHorizontalAlignment(THorizontalAlignment align); void setVerticalAlignment(TVerticalAlignment align); static TVerticalAlignment makeVAlign(String str, TVerticalAlignment def); static THorizontalAlignment makeHAlign(String str, THorizontalAlignment def); static void saveAlignment(Stream &stream, THorizontalAlignment h, TVerticalAlignment v); inline double width() const; inline double height() const; inline double depth() const; inline double totalHeight() const; void setSize(Attribute size); void setStyle(Attribute style); void setWidth(double width); void setText(String text); struct XForm { unsigned long int iRefCount; Buffer iStream; Rect iBBox; int iDepth; std::vector iFonts; double iStretch; }; bool isInternal() const { return iType == 0; } void setXForm(XForm *xform) const; inline const XForm *getXForm() const; private: Vector iPos; String iText; Attribute iStroke; Attribute iSize; Attribute iStyle; Attribute iOpacity; mutable double iWidth; mutable double iHeight; mutable double iDepth; TextType iType; THorizontalAlignment iHorizontalAlignment; TVerticalAlignment iVerticalAlignment; mutable XForm *iXForm; }; inline Vector Text::position() const { return iPos; } inline String Text::text() const { return iText; } inline Attribute Text::stroke() const { return iStroke; } inline Attribute Text::size() const { return iSize; } inline Attribute Text::style() const { return iStyle; } inline double Text::width() const { return iWidth; } inline double Text::height() const { return iHeight; } inline double Text::depth() const { return iDepth; } inline double Text::totalHeight() const { return iHeight + iDepth; } inline bool Text::isMinipage() const { return (iType == EMinipage); } inline THorizontalAlignment Text::horizontalAlignment() const { return iHorizontalAlignment; } inline TVerticalAlignment Text::verticalAlignment() const { return iVerticalAlignment; } inline const Text::XForm *Text::getXForm() const { return iXForm; } } # 41 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipeimage.h" 1 3 4 # 35 "/usr/include/ipeimage.h" 3 4 # 1 "/usr/include/ipebitmap.h" 1 3 4 # 40 "/usr/include/ipebitmap.h" 3 4 namespace ipe { class Bitmap { public: enum TFilter { EDirect, EFlateDecode, EDCTDecode }; enum TColorSpace { EDeviceRGB, EDeviceGray, EDeviceCMYK }; class MRenderData { public: virtual ~MRenderData(); }; Bitmap(); Bitmap(int width, int height, TColorSpace colorSpace, int bitsPerComponent, Buffer data, TFilter filter, bool deflate = false); Bitmap(const XmlAttributes &attr, String data); Bitmap(const XmlAttributes &attr, Buffer data); Bitmap(const Bitmap &rhs); ~Bitmap(); Bitmap &operator=(const Bitmap &rhs); void saveAsXml(Stream &stream, int id, int pdfObjNum = -1) const; inline bool isNull() const; bool equal(Bitmap rhs) const; inline TColorSpace colorSpace() const; inline TFilter filter() const; inline int components() const; inline int bitsPerComponent() const; inline int width() const; inline int height() const; int colorKey() const; void setColorKey(int key); inline const char *data() const; inline int size() const; inline int objNum() const; inline void setObjNum(int objNum) const; inline MRenderData *renderData() const; void setRenderData(MRenderData *data) const; Buffer pixelData() const; inline bool operator==(const Bitmap &rhs) const; inline bool operator!=(const Bitmap &rhs) const; inline bool operator<(const Bitmap &rhs) const; private: int init(const XmlAttributes &attr); void computeChecksum(); private: struct Imp { int iRefCount; TColorSpace iColorSpace; int iBitsPerComponent; int iWidth; int iHeight; int iComponents; int iColorKey; Buffer iData; TFilter iFilter; int iChecksum; mutable int iObjNum; mutable MRenderData *iRender; }; Imp *iImp; }; inline bool Bitmap::isNull() const { return (iImp == 0); } inline Bitmap::TColorSpace Bitmap::colorSpace() const { return iImp->iColorSpace; } inline int Bitmap::components() const { return iImp->iComponents; } inline int Bitmap::bitsPerComponent() const { return iImp->iBitsPerComponent; } inline int Bitmap::width() const { return iImp->iWidth; } inline int Bitmap::height() const { return iImp->iHeight; } inline Bitmap::TFilter Bitmap::filter() const { return iImp->iFilter; } inline const char *Bitmap::data() const { return iImp->iData.data(); } inline int Bitmap::size() const { return iImp->iData.size(); } inline int Bitmap::objNum() const { return iImp->iObjNum; } inline void Bitmap::setObjNum(int objNum) const { iImp->iObjNum = objNum; } inline Bitmap::MRenderData *Bitmap::renderData() const { return iImp->iRender; } inline bool Bitmap::operator==(const Bitmap &rhs) const { return iImp == rhs.iImp; } inline bool Bitmap::operator!=(const Bitmap &rhs) const { return iImp != rhs.iImp; } inline bool Bitmap::operator<(const Bitmap &rhs) const { return (iImp->iChecksum < rhs.iImp->iChecksum || (iImp->iChecksum == rhs.iImp->iChecksum && iImp < rhs.iImp)); } } # 36 "/usr/include/ipeimage.h" 2 3 4 namespace ipe { class Image : public Object { public: explicit Image(const Rect &rect, Bitmap bitmap); explicit Image(const XmlAttributes &attr, String data); explicit Image(const XmlAttributes &attr, Bitmap bitmap); virtual Object *clone() const; virtual Image *asImage(); virtual Type type() const; virtual void saveAsXml(Stream &stream, String layer) const; virtual void draw(Painter &painter) const; virtual void drawSimple(Painter &painter) const; virtual void accept(Visitor &visitor) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void addToBBox(Rect &box, const Matrix &m, bool) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; inline Rect rect() const; inline Bitmap bitmap() const; private: void init(const XmlAttributes &attr); private: Rect iRect; Bitmap iBitmap; }; inline Rect Image::rect() const { return iRect; } inline Bitmap Image::bitmap() const { return iBitmap; } } # 42 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipereference.h" 1 3 4 # 39 "/usr/include/ipereference.h" 3 4 namespace ipe { class Cascade; class Reference : public Object { public: enum { EHasStroke = 0x001, EHasFill = 0x002, EHasPen = 0x004, EHasSize = 0x008, EIsMark = 0x010, EIsArrow = 0x020 }; explicit Reference(const AllAttributes &attr, Attribute name, Vector pos); explicit Reference(const XmlAttributes &attr, String data); virtual Object *clone() const; virtual Reference *asReference(); virtual Type type() const; virtual void accept(Visitor &visitor) const; virtual void saveAsXml(Stream &stream, String layer) const; virtual void draw(Painter &painter) const; virtual void drawSimple(Painter &painter) const; virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void checkStyle(const Cascade *sheet, AttributeSeq &seq) const; void setName(Attribute name); inline Attribute name() const { return iName; } void setStroke(Attribute color); inline Attribute stroke() const { return iStroke; } void setFill(Attribute color); inline Attribute fill() const { return iFill; } inline Attribute pen() const { return iPen; } void setPen(Attribute pen); void setSize(Attribute size); inline Attribute size() const { return iSize; } inline Vector position() const { return iPos; } virtual bool setAttribute(Property prop, Attribute value, Attribute stroke, Attribute fill); virtual Attribute getAttribute(Property prop); inline uint flags() const { return iFlags; } static uint flagsFromName(String name); private: Attribute iName; Vector iPos; Attribute iSize; Attribute iStroke; Attribute iFill; Attribute iPen; uint iFlags; }; } # 43 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipegroup.h" 1 3 4 # 40 "/usr/include/ipegroup.h" 3 4 namespace ipe { class Shape; class Group : public Object { private: typedef std::vector List; public: typedef List::const_iterator const_iterator; explicit Group(); Group(const Group &rhs); virtual ~Group(); explicit Group(const XmlAttributes &attr); Group &operator=(const Group &rhs); virtual Object *clone() const; virtual Group *asGroup(); virtual Type type() const; virtual TPinned pinned() const; virtual void accept(Visitor &visitor) const; virtual void saveAsXml(Stream &stream, String layer) const; virtual void draw(Painter &painter) const; virtual void drawSimple(Painter &painter) const; virtual void addToBBox(Rect &box, const Matrix &m, bool cp) const; virtual double distance(const Vector &v, const Matrix &m, double bound) const; virtual void snapVtx(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; virtual void snapBnd(const Vector &mouse, const Matrix &m, Vector &pos, double &bound) const; inline const Shape &clip() const { return iClip; } void setClip(const Shape &clip); inline int count() const { return iImp->iObjects.size(); } inline const Object *object(int i) const { return iImp->iObjects[i]; } inline const_iterator begin() const { return iImp->iObjects.begin(); } inline const_iterator end() const { return iImp->iObjects.end(); } void push_back(Object *); void saveComponentsAsXml(Stream &stream) const; virtual void checkStyle(const Cascade *sheet, AttributeSeq &seq) const; virtual bool setAttribute(Property prop, Attribute value, Attribute stroke, Attribute fill); private: void detach(); private: struct Imp { List iObjects; int iRefCount; TPinned iPinned; }; Imp *iImp; Shape iClip; }; } # 44 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipepage.h" 1 3 4 # 39 "/usr/include/ipepage.h" 3 4 namespace ipe { class StyleSheet; class Page { public: explicit Page(); static Page *basic(); void saveAsXml(Stream &stream) const; void saveAsIpePage(Stream &stream) const; void saveSelection(Stream &stream) const; inline int countLayers() const { return iLayers.size(); } inline String layer(int index) const { return iLayers[index].iName; } inline bool isLocked(int i) const { return !!(iLayers[i].iFlags & ELocked); } inline bool hasSnapping(int i) const { return !(iLayers[i].iFlags & ENoSnapping); } void setLocked(int i, bool flag); void setSnapping(int i, bool flag); int findLayer(String name) const; void addLayer(String name); void addLayer(); void removeLayer(String name); void renameLayer(String oldName, String newName); inline int countViews() const { return iViews.size(); } int countMarkedViews() const; inline Attribute effect(int index) const { return iViews[index].iEffect; } void setEffect(int index, Attribute sym); inline String active(int index) const { return iViews[index].iActive; } void setActive(int index, String name); bool markedView(int index) const { return iViews[index].iMarked; } void setMarkedView(int index, bool marked); void insertView(int i, String active); void removeView(int i); void clearViews(); inline bool visible(int view, int layer) const { return iLayers[layer].iVisible[view]; } inline bool objectVisible(int view, int objno) const { return iLayers[layerOf(objno)].iVisible[view]; } void setVisible(int view, String layer, bool vis); Rect textBox(const Cascade *sheet) const; String title() const; void setTitle(String title); String section(int level) const; void setSection(int level, bool useTitle, String name); bool sectionUsesTitle(int level) const { return iUseTitle[level]; } const Text *titleText() const; void applyTitleStyle(const Cascade *sheet); bool marked() const { return iMarked; } void setMarked(bool marked); String notes() const { return iNotes; } void setNotes(String notes); inline int count() const { return int(iObjects.size()); } inline Object *object(int i) { return iObjects[i].iObject; } inline const Object *object(int i) const { return iObjects[i].iObject; } inline TSelect select(int i) const { return iObjects[i].iSelect; } inline int layerOf(int i) const { return iObjects[i].iLayer; } inline void setSelect(int i, TSelect sel) { iObjects[i].iSelect = sel; } inline void setLayerOf(int i, int layer) { iObjects[i].iLayer = layer; } Rect pageBBox(const Cascade *sheet) const; Rect viewBBox(const Cascade *sheet, int view) const; Rect bbox(int i) const; void transform(int i, const Matrix &m); double distance(int i, const Vector &v, double bound) const; void snapVtx(int i, const Vector &mouse, Vector &pos, double &bound) const; void snapBnd(int i, const Vector &mouse, Vector &pos, double &bound) const; void invalidateBBox(int i) const; void insert(int i, TSelect sel, int layer, Object *obj); void append(TSelect sel, int layer, Object *obj); void remove(int i); void replace(int i, Object *obj); bool setAttribute(int i, Property prop, Attribute value, Attribute stroke, Attribute fill); int primarySelection() const; bool hasSelection() const; void deselectAll(); void ensurePrimarySelection(); private: enum { ELocked = 0x01, ENoSnapping = 0x02 }; struct SLayer { public: SLayer(String name); public: String iName; int iFlags; std::vector iVisible; }; typedef std::vector LayerSeq; struct SView { public: SView() { iEffect = Attribute::NORMAL(); } public: Attribute iEffect; String iActive; bool iMarked; }; typedef std::vector ViewSeq; struct SObject { SObject(); SObject(const SObject &rhs); ~SObject(); SObject &operator=(const SObject &rhs); TSelect iSelect; int iLayer; mutable Rect iBBox; Object *iObject; }; typedef std::vector ObjSeq; LayerSeq iLayers; ViewSeq iViews; String iTitle; Text iTitleObject; bool iUseTitle[2]; String iSection[2]; ObjSeq iObjects; String iNotes; bool iMarked; }; } # 45 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipedoc.h" 1 3 4 # 38 "/usr/include/ipedoc.h" 3 4 # 1 "/usr/include/ipestyle.h" 1 3 4 # 40 "/usr/include/ipestyle.h" 3 4 namespace ipe { struct Symbol { Symbol(); Symbol(Object *object); Symbol(const Symbol &rhs); Symbol &operator=(const Symbol &rhs); ~Symbol(); bool iXForm; TTransformations iTransformations; Object *iObject; }; class StyleSheet { public: struct TitleStyle { bool iDefined; Vector iPos; Attribute iSize; Attribute iColor; THorizontalAlignment iHorizontalAlignment; TVerticalAlignment iVerticalAlignment; }; struct PageNumberStyle { bool iDefined; Vector iPos; double iFontSize; Color iColor; }; StyleSheet(); static StyleSheet *standard(); void addSymbol(Attribute name, const Symbol &symbol); const Symbol *findSymbol(Attribute sym) const; void addGradient(Attribute name, const Gradient &s); const Gradient *findGradient(Attribute sym) const; void addTiling(Attribute name, const Tiling &s); const Tiling *findTiling(Attribute sym) const; void addEffect(Attribute name, const Effect &e); const Effect *findEffect(Attribute sym) const; void add(Kind kind, Attribute name, Attribute value); bool has(Kind kind, Attribute sym) const; Attribute find(Kind, Attribute sym) const; void saveAsXml(Stream &stream, bool saveBitmaps = false) const; void allNames(Kind kind, AttributeSeq &seq) const; inline bool isStandard() const { return iStandard; } inline String preamble() const { return iPreamble; } inline void setPreamble(const String &str) { iPreamble = str; } inline String encoding() const { return iEncoding; } inline void setEncoding(const String &enc) { iEncoding = enc; } const Layout *layout() const; void setLayout(const Layout &margins); const TitleStyle *titleStyle() const; void setTitleStyle(const TitleStyle &ts); const PageNumberStyle *pageNumberStyle(); void setPageNumberStyle(const PageNumberStyle &pns); void addCMap(String s); void allCMaps(std::vector &seq) const; void setLineCap(TLineCap s); void setLineJoin(TLineJoin s); void setFillRule(TFillRule s); TLineCap lineCap() const { return iLineCap; } TLineJoin lineJoin() const { return iLineJoin; } TFillRule fillRule() const { return iFillRule; } inline String name() const { return iName; } inline void setName(const String &name) { iName = name; } private: typedef std::map SymbolMap; typedef std::map GradientMap; typedef std::map TilingMap; typedef std::map EffectMap; typedef std::map Map; bool iStandard; String iName; SymbolMap iSymbols; GradientMap iGradients; TilingMap iTilings; EffectMap iEffects; Map iMap; String iEncoding; String iPreamble; Layout iLayout; TitleStyle iTitleStyle; PageNumberStyle iPageNumberStyle; TLineJoin iLineJoin; TLineCap iLineCap; TFillRule iFillRule; std::vector iCMaps; }; class Cascade { public: Cascade(); Cascade(const Cascade &rhs); Cascade &operator=(const Cascade &rhs); ~Cascade(); inline int count() const { return iSheets.size(); } inline StyleSheet *sheet(int index) { return iSheets[index]; } void insert(int index, StyleSheet *sheet); void remove(int index); void saveAsXml(Stream &stream) const; bool has(Kind kind, Attribute sym) const; Attribute find(Kind, Attribute sym) const; const Symbol *findSymbol(Attribute sym) const; const Gradient *findGradient(Attribute sym) const; const Tiling *findTiling(Attribute sym) const; const Effect *findEffect(Attribute sym) const; const Layout *findLayout() const; const StyleSheet::TitleStyle *findTitleStyle() const; const StyleSheet::PageNumberStyle *findPageNumberStyle() const; String findPreamble() const; String findEncoding() const; TLineCap lineCap() const; TLineJoin lineJoin() const; TFillRule fillRule() const; void allNames(Kind kind, AttributeSeq &seq) const; int findDefinition(Kind kind, Attribute sym) const; void allCMaps(std::vector &seq) const; String update(String dir); private: std::vector iSheets; }; } # 39 "/usr/include/ipedoc.h" 2 3 4 # 1 "/usr/include/ipefontpool.h" 1 3 4 # 40 "/usr/include/ipefontpool.h" 3 4 namespace ipe { struct Font { enum TType { EType1, ETrueType }; TType iType; String iName; int iLatexNumber; String iFontDict; String iFontDescriptor; String iStreamDict; int iLength1, iLength2, iLength3; Buffer iStreamData; bool iHasEncoding; String iEncoding[0x100]; bool iStandardFont; int iWidth[0x100]; }; typedef std::vector FontPool; } # 40 "/usr/include/ipedoc.h" 2 3 4 namespace ipe { class BitmapFinder; class Document { public: struct SProperties { SProperties(); String iTitle; String iAuthor; String iSubject; String iKeywords; String iPreamble; bool iFullScreen; bool iNumberPages; String iCreated; String iModified; String iCreator; }; enum TFormat { EXml, EPdf, EEps, EIpe5, EUnknown }; enum { ESaveNormal = 0, EExport = 1, ENoZip = 2, EMarkedView = 4, ENoColor = 8, }; enum LoadErrors { EVersionTooOld = -1, EVersionTooRecent = -2, EFileOpenError = -3, }; Document(); Document(const Document &rhs); ~Document(); static TFormat fileFormat(DataSource &source); static TFormat formatFromFilename(String fn); static Document *load(DataSource &source, TFormat format, int &reason); static Document *load(const char *fname, int &reason); static Document *loadWithErrorReport(const char *fname); bool save(TellStream &stream, TFormat format, uint flags) const; bool save(const char *fname, TFormat format, uint flags) const; bool exportPages(const char *fname, uint flags, int fromPage, int toPage) const; bool exportView(const char *fname, TFormat format, uint flags, int pno, int vno) const; void saveAsXml(Stream &stream, bool usePdfBitmaps = false) const; int countPages() const { return int(iPages.size()); } int countTotalViews() const; const Page *page(int no) const { return iPages[no]; } Page *page(int no) { return iPages[no]; } Page *set(int no, Page *page); void insert(int no, Page *page); void push_back(Page *page); Page *remove(int no); inline SProperties properties() const { return iProperties; } void setProperties(const SProperties &info); Cascade *cascade() { return iCascade; } const Cascade *cascade() const { return iCascade; } Cascade *replaceCascade(Cascade *cascade); void setFontPool(FontPool *fontPool); inline const FontPool *fontPool() const { return iFontPool; } bool hasTrueTypeFonts() const; bool hasTransparency() const; bool hasTilings() const; bool hasGradients() const; void findBitmaps(BitmapFinder &bm) const; bool checkStyle(AttributeSeq &seq) const; enum { ErrNone, ErrNoText, ErrNoDir, ErrWritingSource, ErrOldPdfLatex, ErrRunLatex, ErrLatex, ErrLatexOutput, ErrNoIconv }; int runLatex(String &logFile); int runLatex(); private: Document &operator=(const Document &rhs); private: std::vector iPages; Cascade *iCascade; SProperties iProperties; FontPool *iFontPool; }; } # 46 "/usr/include/ipelib.h" 2 3 4 # 1 "/usr/include/ipelet.h" 1 3 4 # 37 "/usr/include/ipelet.h" 3 4 # 1 "/usr/include/ipesnap.h" 1 3 4 # 39 "/usr/include/ipesnap.h" 3 4 namespace ipe { class Page; class Snap { public: enum TSnapModes { ESnapNone = 0, ESnapVtx = 1, ESnapBd = 2, ESnapInt = 4, ESnapGrid = 8, ESnapAngle = 0x10, ESnapAuto = 0x20 }; int iSnap; bool iGridVisible; int iGridSize; double iAngleSize; int iSnapDistance; bool iWithAxes; Vector iOrigin; Angle iDir; bool intersectionSnap(Vector &pos, const Page *page, double snapDist) const; bool snapAngularIntersection(Vector &pos, const Line &l, const Page *page, double snapDist) const; bool simpleSnap(Vector &pos, const Page *page, double snapDist) const; bool snap(Vector &pos, const Page *page, double snapDist, Vector *autoOrg = 0) const; Line getLine(const Vector &mouse, const Vector &base) const; bool setEdge(const Vector &pos, const Page *page); }; } # 38 "/usr/include/ipelet.h" 2 3 4 # 47 "/usr/include/ipelet.h" 3 4 namespace ipe { class Page; class Document; class IpeletHelper { public: enum { EOkButton, EOkCancelButtons, EYesNoCancelButtons, EDiscardCancelButtons, ESaveDiscardCancelButtons }; virtual ~IpeletHelper() = 0; virtual void message(const char *msg) = 0; # 67 "/usr/include/ipelet.h" 3 4 virtual int messageBox(const char *text, const char *details, int buttons) = 0; virtual bool getString(const char *prompt, String &str) = 0; }; struct IpeletData { Page *iPage; const Document *iDoc; int iPageNo, iView, iLayer; AllAttributes iAttributes; Snap iSnap; }; class Ipelet { public: virtual ~Ipelet() = 0; virtual int ipelibVersion() const = 0; virtual bool run(int function, IpeletData *data, IpeletHelper *helper) = 0; }; } # 47 "/usr/include/ipelib.h" 2 3 4 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator_bases.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator_bases.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator_bases.h" 2 namespace CGAL { struct Circulator_tag {}; struct Iterator_tag {}; struct Forward_circulator_tag : public std::forward_iterator_tag {}; struct Bidirectional_circulator_tag : public std::bidirectional_iterator_tag {}; struct Random_access_circulator_tag : public std::random_access_iterator_tag {}; template struct Forward_circulator_base { typedef T value_type; typedef Dist difference_type; typedef Size size_type; typedef T* pointer; typedef T& reference; typedef Forward_circulator_tag iterator_category; }; template struct Bidirectional_circulator_base { typedef T value_type; typedef Dist difference_type; typedef Size size_type; typedef T* pointer; typedef T& reference; typedef Bidirectional_circulator_tag iterator_category; }; template struct Random_access_circulator_base { typedef T value_type; typedef Dist difference_type; typedef Size size_type; typedef T* pointer; typedef T& reference; typedef Random_access_circulator_tag iterator_category; }; template < class Category, class T, class Distance = std::ptrdiff_t, class Size = std::size_t, class Pointer = T*, class Reference = T&> struct Circulator_base { typedef Category iterator_category; typedef T value_type; typedef Distance difference_type; typedef Size size_type; typedef Pointer pointer; typedef Reference reference; }; template class Forward_circulator_ptrbase { protected: void* _ptr; public: typedef Forward_circulator_tag iterator_category; typedef T value_type; typedef Dist difference_type; typedef Size size_type; typedef T* pointer; typedef T& reference; Forward_circulator_ptrbase() : _ptr(__null) {} Forward_circulator_ptrbase(void* p) : _ptr(p) {} }; template class Bidirectional_circulator_ptrbase { protected: void* _ptr; public: typedef Bidirectional_circulator_tag iterator_category; typedef T value_type; typedef Dist difference_type; typedef Size size_type; typedef T* pointer; typedef T& reference; Bidirectional_circulator_ptrbase() : _ptr(__null) {} Bidirectional_circulator_ptrbase(void* p) : _ptr(p) {} }; template class Random_access_circulator_ptrbase { protected: void* _ptr; public: typedef Random_access_circulator_tag iterator_category; typedef T value_type; typedef Dist difference_type; typedef Size size_type; typedef T* pointer; typedef T& reference; Random_access_circulator_ptrbase() : _ptr(__null) {} Random_access_circulator_ptrbase(void* p) : _ptr(p) {} }; } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" 2 # 73 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" namespace CGAL { template struct I_Circulator_traits { typedef Iterator_tag category; }; template <> struct I_Circulator_traits { typedef Circulator_tag category; }; template <> struct I_Circulator_traits { typedef Circulator_tag category; }; template <> struct I_Circulator_traits { typedef Circulator_tag category; }; # 103 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" template struct I_Circulator_size_traits { typedef std::size_t size_type; }; template struct I_Circulator_size_traits< Forward_circulator_tag, C> { typedef typename C::size_type size_type; }; template struct I_Circulator_size_traits< Bidirectional_circulator_tag, C> { typedef typename C::size_type size_type; }; template struct I_Circulator_size_traits< Random_access_circulator_tag, C> { typedef typename C::size_type size_type; }; template struct I_Iterator_from_circulator_traits { typedef CCtg iterator_category; }; template <> struct I_Iterator_from_circulator_traits< Forward_circulator_tag> { typedef std::forward_iterator_tag iterator_category; }; template <> struct I_Iterator_from_circulator_traits< Bidirectional_circulator_tag> { typedef std::bidirectional_iterator_tag iterator_category; }; template <> struct I_Iterator_from_circulator_traits< Random_access_circulator_tag> { typedef std::random_access_iterator_tag iterator_category; }; template struct I_Circulator_from_iterator_traits { typedef ICtg iterator_category; }; template <> struct I_Circulator_from_iterator_traits< std::forward_iterator_tag> { typedef Forward_circulator_tag iterator_category; }; template <> struct I_Circulator_from_iterator_traits { typedef Bidirectional_circulator_tag iterator_category; }; template <> struct I_Circulator_from_iterator_traits { typedef Random_access_circulator_tag iterator_category; }; template struct Circulator_traits { typedef std::iterator_traits traits; typedef typename traits::iterator_category ICAT; typedef I_Circulator_traits C_traits; typedef typename C_traits::category category; typedef I_Iterator_from_circulator_traits Ic_traits; typedef typename Ic_traits::iterator_category iterator_category; typedef I_Circulator_from_iterator_traits Ci_traits; typedef typename Ci_traits::iterator_category circulator_category; }; template typename Circulator_traits::category query_circulator_or_iterator( const C&) { typedef typename Circulator_traits::category category; return category(); } # 199 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" template inline void Assert_circulator( const C &) { typedef typename Circulator_traits::category category; Assert_compile_time_tag( Circulator_tag(), category()); } template inline void Assert_iterator( const I &) { typedef typename Circulator_traits::category category; Assert_compile_time_tag( Iterator_tag(), category()); } template inline void Assert_input_category( const I & ) { typedef typename std::iterator_traits::iterator_category category; Assert_compile_time_tag( std::input_iterator_tag(), category()); } template inline void Assert_output_category( const I & ) { typedef typename std::iterator_traits::iterator_category category; Assert_compile_time_tag( std::output_iterator_tag(), category()); } template inline void Assert_forward_category( const IC & ) { typedef typename std::iterator_traits::iterator_category category; Assert_compile_time_tag( std::forward_iterator_tag(), category()); } template inline void Assert_bidirectional_category( const IC & ) { typedef typename std::iterator_traits::iterator_category category; Assert_compile_time_tag( std::bidirectional_iterator_tag(), category()); } template inline void Assert_random_access_category( const IC & ) { typedef typename std::iterator_traits::iterator_category category; Assert_compile_time_tag( std::random_access_iterator_tag(), category()); } inline void I_Has_to_be_at_least( std::input_iterator_tag, std::input_iterator_tag){} inline void I_Has_to_be_at_least( std::input_iterator_tag, std::forward_iterator_tag){} inline void I_Has_to_be_at_least( std::input_iterator_tag, std::bidirectional_iterator_tag){} inline void I_Has_to_be_at_least( std::input_iterator_tag, std::random_access_iterator_tag){} inline void I_Has_to_be_at_least( std::output_iterator_tag, std::output_iterator_tag){} inline void I_Has_to_be_at_least( std::output_iterator_tag, std::forward_iterator_tag){} inline void I_Has_to_be_at_least( std::output_iterator_tag, std::bidirectional_iterator_tag){} inline void I_Has_to_be_at_least( std::output_iterator_tag, std::random_access_iterator_tag){} inline void I_Has_to_be_at_least( std::forward_iterator_tag, std::forward_iterator_tag){} inline void I_Has_to_be_at_least( std::forward_iterator_tag, std::bidirectional_iterator_tag){} inline void I_Has_to_be_at_least( std::forward_iterator_tag, std::random_access_iterator_tag){} inline void I_Has_to_be_at_least( std::bidirectional_iterator_tag, std::bidirectional_iterator_tag){} inline void I_Has_to_be_at_least( std::bidirectional_iterator_tag, std::random_access_iterator_tag){} inline void I_Has_to_be_at_least( std::random_access_iterator_tag, std::random_access_iterator_tag){} template inline void Assert_is_at_least_input_category( const I& ) { typedef typename std::iterator_traits::iterator_category category; I_Has_to_be_at_least( std::input_iterator_tag(), category()); } template inline void Assert_is_at_least_output_category( const I& ) { typedef typename std::iterator_traits::iterator_category category; I_Has_to_be_at_least( std::output_iterator_tag(), category()); } template inline void Assert_is_at_least_forward_category( const IC& ) { typedef typename std::iterator_traits::iterator_category category; I_Has_to_be_at_least( std::forward_iterator_tag(), category()); } template inline void Assert_is_at_least_bidirectional_category( const IC& ) { typedef typename std::iterator_traits::iterator_category category; I_Has_to_be_at_least( std::bidirectional_iterator_tag(), category()); } template inline void Assert_is_at_least_random_access_category( const IC& ) { typedef typename std::iterator_traits::iterator_category category; I_Has_to_be_at_least( std::random_access_iterator_tag(), category()); } template< class C> inline bool I_is_empty_range( const C& c1, const C&, Circulator_tag){ return c1 == __null; } template< class I> inline bool I_is_empty_range( const I& i1, const I& i2, Iterator_tag){ return i1 == i2; } template< class IC> inline bool is_empty_range( const IC& ic1, const IC& ic2){ typedef typename Circulator_traits::category category; return I_is_empty_range( ic1, ic2, category()); } struct Circulator_or_iterator_tag {}; inline Circulator_or_iterator_tag check_circulator_or_iterator( Circulator_tag ){ return Circulator_or_iterator_tag(); } inline Circulator_or_iterator_tag check_circulator_or_iterator( Iterator_tag ){ return Circulator_or_iterator_tag(); } template< class IC> inline void Assert_circulator_or_iterator( const IC &){ typedef typename Circulator_traits::category category; Assert_compile_time_tag( Circulator_or_iterator_tag(), check_circulator_or_iterator( category())); } # 361 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h" template inline typename C::size_type I_min_circulator_size( const C& c) { Assert_circulator(c); Assert_random_access_category(c); typedef typename C::size_type size_type; size_type n = 0; if ( c != __null) { n = (c-1) - c + 1; (CGAL::possibly(n > 0)?(static_cast(0)): ::CGAL::assertion_fail( "n > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 370)); } return n; } template typename C::size_type I_circulator_size( const C& c, Forward_circulator_tag) { if ( c == __null) return 0; typedef typename C::size_type size_type; size_type n = 0; C d = c; do { ++n; ++d; } while( c != d); return n; } template inline typename C::size_type I_circulator_size( const C& c, Bidirectional_circulator_tag) { return I_circulator_size( c, Forward_circulator_tag()); } template inline typename C::size_type I_circulator_size( const C& c, Random_access_circulator_tag) { return I_min_circulator_size( c.min_circulator()); } template inline typename C::size_type circulator_size( const C& c) { typedef typename std::iterator_traits::iterator_category category; return I_circulator_size( c, category()); } template typename C::difference_type I_circulator_distance( C c, const C& d, Forward_circulator_tag) { if ( c == __null) return 0; typedef typename C::difference_type difference_type; difference_type n = 0; do { ++n; } while( ++c != d); return n; } template inline typename C::difference_type I_circulator_distance( const C& c, const C& d, Bidirectional_circulator_tag) { return I_circulator_distance( c, d, Forward_circulator_tag()); } template inline typename C::difference_type I_circulator_distance( const C& c, const C& d, Random_access_circulator_tag) { typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; if ( d - c > 0) return (d - c); return difference_type( size_type( I_min_circulator_size( c.min_circulator()))) - (c-d); } template inline typename C::difference_type circulator_distance( const C& c, const C& d) { typedef typename std::iterator_traits::iterator_category category; return I_circulator_distance( c, d, category()); } template inline typename std::iterator_traits::difference_type I_iterator_distance(const C& c1, const C& c2, Circulator_tag) { return circulator_distance( c1, c2); } template inline typename std::iterator_traits::difference_type I_iterator_distance(const I& i1, const I& i2, Iterator_tag) { return std::distance( i1, i2); } template inline typename std::iterator_traits::difference_type iterator_distance(const IC& ic1, const IC& ic2) { typedef typename Circulator_traits::category category; return I_iterator_distance( ic1, ic2, category()); } template inline C I_get_min_circulator( C c, Forward_circulator_tag) { return c; } template inline C I_get_min_circulator( C c, Bidirectional_circulator_tag) { return c; } template inline C I_get_min_circulator( C c, Random_access_circulator_tag) { return c.min_circulator(); } template inline C get_min_circulator( C c) { typedef std::iterator_traits Traits; typedef typename Traits::iterator_category Category; return I_get_min_circulator( c, Category()); } template inline I non_negative_mod(I n, U m) { (CGAL::possibly(m > 0)?(static_cast(0)): ::CGAL::precondition_fail( "m > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 484)); if (n < 0) n = m - 1 - (( - n - 1) % m) ; else n = n % m; (CGAL::possibly(n >= 0)?(static_cast(0)): ::CGAL::postcondition_fail( "n >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 493)); return n; } template < class C, class Ref, class Ptr> class Iterator_from_circulator { private: const C* m_anchor; C current; int m_winding; typedef std::iterator_traits I_traits; typedef typename I_traits::iterator_category I_Iter_cat; typedef I_Iterator_from_circulator_traits I__traits; public: typedef C Circulator; typedef Iterator_from_circulator Self; typedef typename I__traits::iterator_category iterator_category; typedef typename C::value_type value_type; typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; typedef typename C::reference reference; typedef typename C::pointer pointer; Iterator_from_circulator() : m_anchor(0), m_winding(0) {} Iterator_from_circulator( const C* circ, int n) : m_anchor( circ), current( *circ), m_winding(n) {} template Iterator_from_circulator( const Iterator_from_circulator& c) : m_anchor( c.anchor()), current( c.current_circulator()), m_winding(c.winding()) {} bool operator==( const Self& i) const { (CGAL::possibly(m_anchor == i.m_anchor)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor == i.m_anchor" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 544)); return ( current == i.current) && ( m_winding == i.m_winding); } bool operator!=( const Self& i) const { return !(*this == i); } Ref operator*() const { (CGAL::possibly(m_anchor != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 551)); (CGAL::possibly(current != __null)?(static_cast(0)): ::CGAL::assertion_fail( "current != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 552)); return Ref(*current); } Ptr operator->() const { (CGAL::possibly(m_anchor != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 556)); (CGAL::possibly(current != __null)?(static_cast(0)): ::CGAL::assertion_fail( "current != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 557)); return Ptr(current.operator->()); } Self& operator++() { (CGAL::possibly(m_anchor != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 561)); (CGAL::possibly(current != __null)?(static_cast(0)): ::CGAL::assertion_fail( "current != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 562)); ++current; if ( current == *m_anchor) ++m_winding; return *this; } Self operator++(int) { Self tmp = *this; ++*this; return tmp; } Self& operator--() { (CGAL::possibly(m_anchor != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 574)); (CGAL::possibly(current != __null)?(static_cast(0)): ::CGAL::assertion_fail( "current != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 575)); if ( current == *m_anchor) --m_winding; --current; return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self& operator+=( difference_type n) { (CGAL::possibly(m_anchor != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 587)); (CGAL::possibly(current != __null)?(static_cast(0)): ::CGAL::assertion_fail( "current != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 588)); if ( n < 0 && current == *m_anchor) --m_winding; current += n; if ( n > 0 && current == *m_anchor) ++m_winding; return *this; } Self operator+( difference_type n) const { Self tmp = *this; return tmp += n; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& i) const { (CGAL::possibly(m_anchor != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 608)); (CGAL::possibly(current != __null)?(static_cast(0)): ::CGAL::assertion_fail( "current != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 609)); (CGAL::possibly(m_anchor == i.m_anchor)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor == i.m_anchor" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 610)); if ( m_winding != i.m_winding) { difference_type s = I_min_circulator_size( *m_anchor); return (current - *m_anchor) - (i.current - *m_anchor) + s * (m_winding - i.m_winding); } return (current - *m_anchor) - (i.current - *m_anchor); } Ref operator[](difference_type n) const { Self tmp = *this; tmp += n; return tmp.operator*(); } bool operator<( const Self& i) const { (CGAL::possibly(m_anchor != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 625)); (CGAL::possibly(current != __null)?(static_cast(0)): ::CGAL::assertion_fail( "current != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 626)); (CGAL::possibly(m_anchor == i.m_anchor)?(static_cast(0)): ::CGAL::assertion_fail( "m_anchor == i.m_anchor" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 627)); return ( (m_winding < i.m_winding) || ( (m_winding == i.m_winding) && (current - *m_anchor) < (i.current - *m_anchor) ) ); } bool operator> ( const Self& i) const { return i < *this; } bool operator<=( const Self& i) const { return !(i < *this); } bool operator>=( const Self& i) const { return !(*this < i); } const C* anchor() const { return m_anchor;} int winding() const { return m_winding;} Circulator current_circulator() const { return current;} }; template < class Dist, class C, class Ref, class Ptr> Iterator_from_circulator operator+( Dist n, const Iterator_from_circulator& circ) { Iterator_from_circulator tmp = circ; return tmp += n; } template < class C > class Container_from_circulator { private: C anchor; public: Container_from_circulator() {} Container_from_circulator(const C& c) : anchor(get_min_circulator(c)) {} typedef C Circulator; typedef typename C::value_type value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef value_type* pointer; typedef const value_type* const_pointer; typedef typename C::size_type size_type; typedef typename C::difference_type difference_type; typedef Iterator_from_circulator< C, reference, pointer> iterator; typedef Iterator_from_circulator< C, const_reference, const_pointer> const_iterator; iterator begin() { return iterator( &anchor, 0); } const_iterator begin() const { return const_iterator( &anchor, 0); } iterator end() { return anchor == __null ? iterator( &anchor, 0) : iterator( &anchor, 1); } const_iterator end() const { return anchor == __null ? const_iterator( &anchor, 0) : const_iterator( &anchor, 1); } }; template < class Ctnr> class Circulator_from_container { public: typedef Circulator_from_container Self; typedef Ctnr Container; typedef typename Ctnr::iterator iterator; typedef typename Ctnr::value_type value_type; typedef typename Ctnr::reference reference; typedef value_type* pointer; typedef typename Ctnr::size_type size_type; typedef typename Ctnr::difference_type difference_type; typedef std::iterator_traits ITraits; typedef typename ITraits::iterator_category Icategory; typedef I_Circulator_from_iterator_traits CTraits; typedef typename CTraits::iterator_category iterator_category; private: Ctnr* ctnr; iterator i; public: Circulator_from_container() : ctnr(__null) {} Circulator_from_container( Ctnr* c) : ctnr(c), i(c->begin()) {} Circulator_from_container( Ctnr* c, iterator j) : ctnr(c), i(j) {} Self& operator=( const Self& c) { ctnr = c.ctnr; i = c.i; return *this; } bool operator==( Nullptr_t p) const { (CGAL::possibly(p == __null)?(static_cast(0)): ::CGAL::assertion_fail( "p == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 746)); return (ctnr == __null) || (ctnr->begin() == ctnr->end()); } bool operator!=( Nullptr_t p) const { return !(*this == p); } bool operator==( const Self& c) const { return i == c.i; } bool operator!=( const Self& c) const { return !(*this == c); } reference operator*() const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 753)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 754)); return *i; } pointer operator->() const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 758)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 759)); return i.operator->(); } Self& operator++() { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 763)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 764)); ++i; if ( i == ctnr->end()) i = ctnr->begin(); return *this; } Self operator++(int) { Self tmp= *this; ++*this; return tmp; } Self& operator--() { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 776)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 777)); if ( i == ctnr->begin()) i = ctnr->end(); --i; return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self& operator+=( difference_type n) { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 789)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 790)); typename Ctnr::difference_type j = i - ctnr->begin(); typename Ctnr::difference_type size = ctnr->size(); (CGAL::possibly(j >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "j >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 793)); (CGAL::possibly(size >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "size >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 794)); j = non_negative_mod( j + n, size); (CGAL::possibly(j >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "j >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 796)); (CGAL::possibly(j < size)?(static_cast(0)): ::CGAL::assertion_fail( "j < size" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 797)); i = ctnr->begin() + j; return *this; } Self operator+( difference_type n) const { Self tmp = *this; return tmp += n; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& c) const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 811)); (CGAL::possibly(c.ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "c.ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 812)); return i - c.i; } reference operator[]( difference_type n) const { Self tmp = *this; tmp += n; return *tmp; } iterator current_iterator() const { return i;} Self min_circulator() const { return Self(ctnr); } Ctnr* container() const { return ctnr; } }; template inline Circulator_from_container operator+( typename Circulator_from_container::difference_type n, const Circulator_from_container& c) { Circulator_from_container tmp = c; return tmp += n; } template < class Ctnr> class Const_circulator_from_container { public: typedef Const_circulator_from_container Self; typedef Circulator_from_container Mutable; typedef Ctnr Container; typedef typename Ctnr::const_iterator const_iterator; typedef typename Ctnr::value_type value_type; typedef typename Ctnr::const_reference reference; typedef const value_type* pointer; typedef typename Ctnr::size_type size_type; typedef typename Ctnr::difference_type difference_type; typedef std::iterator_traits ITraits; typedef typename ITraits::iterator_category Icategory; typedef I_Circulator_from_iterator_traits CTraits; typedef typename CTraits::iterator_category iterator_category; private: const Ctnr* ctnr; const_iterator i; public: Const_circulator_from_container() : ctnr(__null) {} Const_circulator_from_container( const Ctnr* c) : ctnr(c), i(c->begin()) {} Const_circulator_from_container( const Ctnr* c, const_iterator j) : ctnr(c), i(j) {} Const_circulator_from_container( const Mutable& c) : ctnr( c.container()), i( c.current_iterator()) {} Self& operator=( const Self& c) { ctnr = c.ctnr; i = c.i; return *this; } bool operator==( Nullptr_t p) const { (CGAL::possibly(p == __null)?(static_cast(0)): ::CGAL::assertion_fail( "p == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 879)); return (ctnr == __null) || (ctnr->begin() == ctnr->end()); } bool operator!=( Nullptr_t p) const { return !(*this == p); } bool operator==( const Self& c) const { return i == c.i; } bool operator!=( const Self& c) const { return !(*this == c); } reference operator*() const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 886)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 887)); return *i; } pointer operator->() const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 891)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 892)); return i.operator->(); } Self& operator++() { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 896)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 897)); ++i; if ( i == ctnr->end()) i = ctnr->begin(); return *this; } Self operator++(int) { Self tmp= *this; ++*this; return tmp; } Self& operator--() { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 909)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 910)); if ( i == ctnr->begin()) i = ctnr->end(); --i; return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self& operator+=( difference_type n) { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 922)); (CGAL::possibly(i != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "i != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 923)); typename Ctnr::difference_type j = i - ctnr->begin(); typename Ctnr::difference_type size = ctnr->size(); (CGAL::possibly(j >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "j >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 926)); (CGAL::possibly(size >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "size >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 927)); j = non_negative_mod( j + n, size); (CGAL::possibly(j >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "j >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 929)); (CGAL::possibly(j < size)?(static_cast(0)): ::CGAL::assertion_fail( "j < size" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 930)); i = ctnr->begin() + j; return *this; } Self operator+( difference_type n) const { Self tmp = *this; return tmp += n; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& c) const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 944)); (CGAL::possibly(c.ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "c.ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 945)); return i - c.i; } reference operator[]( difference_type n) const { Self tmp = *this; tmp += n; return *tmp; } const_iterator current_iterator() const { return i;} Self min_circulator() const { return Self(ctnr); } const Ctnr* container() const { return ctnr; } }; template inline Const_circulator_from_container operator+( typename Const_circulator_from_container::difference_type n, const Const_circulator_from_container& c) { Const_circulator_from_container tmp = c; return tmp += n; } template < class I, class Tt = int, class Ss = int, class Dd = int> class Circulator_from_iterator { public: typedef Circulator_from_iterator Self; typedef I iterator; typedef std::iterator_traits Traits; typedef typename Traits::value_type value_type; typedef std::size_t size_type; typedef typename Traits::difference_type difference_type; typedef typename Traits::reference reference; typedef typename Traits::pointer pointer; typedef typename Traits::iterator_category Icategory; typedef I_Circulator_from_iterator_traits CTraits; typedef typename CTraits::iterator_category iterator_category; private: I m_begin; I m_end; I current; bool empty; public: Circulator_from_iterator() : m_begin(), m_end(), current(), empty( true) {} Circulator_from_iterator( const I& bgn, const I& end) : m_begin(bgn), m_end(end), current(bgn), empty(bgn==end) {} Circulator_from_iterator( const I& bgn, const I& end, const I& cur) : m_begin(bgn), m_end(end), current(cur), empty(bgn==end) {} Circulator_from_iterator( const Self& c, const I& cur) : m_begin( c.m_begin), m_end( c.m_end), current(cur), empty(c.empty) {} template Circulator_from_iterator( const Circulator_from_iterator& ii) : m_begin( ii.begin()), m_end( ii.end()), current(ii.current_iterator()), empty(ii.begin()==ii.end()) {} bool operator==( Nullptr_t p) const { (CGAL::possibly(p == __null)?(static_cast(0)): ::CGAL::assertion_fail( "p == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1031)); return empty; } bool operator!=( Nullptr_t p) const { return !(*this == p); } bool operator==( const Self& c) const { return current == c.current;} bool operator!=( const Self& c) const { return !(*this == c); } reference operator*() const { (CGAL::possibly(current != m_end)?(static_cast(0)): ::CGAL::assertion_fail( "current != m_end" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1038)); return *current; } pointer operator->() const { (CGAL::possibly(current != m_end)?(static_cast(0)): ::CGAL::assertion_fail( "current != m_end" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1042)); return &(*current); } Self& operator++() { (CGAL::possibly(current != m_end)?(static_cast(0)): ::CGAL::assertion_fail( "current != m_end" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1046)); ++current; if ( current == m_end) current = m_begin; return *this; } Self operator++(int) { Self tmp= *this; ++*this; return tmp; } Self& operator--() { (CGAL::possibly(current != m_end)?(static_cast(0)): ::CGAL::assertion_fail( "current != m_end" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1058)); if ( current == m_begin) current = m_end; --current; return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self& operator+=( difference_type n) { (CGAL::possibly(current != m_end)?(static_cast(0)): ::CGAL::assertion_fail( "current != m_end" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1070)); difference_type i = current - m_begin; difference_type size = m_end - m_begin; (CGAL::possibly(i >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "i >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1073)); (CGAL::possibly(size >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "size >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1074)); i = non_negative_mod( i + n, size); (CGAL::possibly(i >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "i >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1076)); (CGAL::possibly(i < size)?(static_cast(0)): ::CGAL::assertion_fail( "i < size" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1077)); current = m_begin + i; return *this; } Self operator+( difference_type n) const { Self tmp = *this; return tmp += n; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& i) const { (CGAL::possibly((m_begin == i.m_begin) && (m_end == i.m_end))?(static_cast(0)): ::CGAL::assertion_fail( "(m_begin == i.m_begin) && (m_end == i.m_end)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/circulator.h", 1091)); return current - i.current; } reference operator[](difference_type n) const { Self tmp = *this; tmp += n; return tmp.operator*(); } iterator begin() const { return m_begin;} iterator end() const { return m_end;} iterator current_iterator() const { return current;} Self min_circulator() const { return Self( m_begin, m_end); } }; template < class D, class I, class T, class Size, class Dist> inline Circulator_from_iterator< I, T, Size, Dist> operator+( D n, const Circulator_from_iterator< I, T, Size, Dist>& circ) { Circulator_from_iterator< I, T, Size, Dist> tmp = circ; return tmp += Dist(n); } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2_algorithms.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2_algorithms.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2_algorithms.h" 2 namespace CGAL { template ForwardIterator left_vertex_2(ForwardIterator first, ForwardIterator last, const Traits& traits); template ForwardIterator right_vertex_2(ForwardIterator first, ForwardIterator last, const Traits& traits); template ForwardIterator top_vertex_2(ForwardIterator first, ForwardIterator last, const Traits& traits); template ForwardIterator bottom_vertex_2(ForwardIterator first, ForwardIterator last, const Traits& traits); template Bbox_2 bbox_2(InputIterator first, InputIterator last, const Traits& traits); template void area_2( ForwardIterator first, ForwardIterator last, typename Traits::FT &result, const Traits& traits) { typedef typename Traits::FT FT; result = FT(0); if (first == last) return; ForwardIterator second = first; ++second; if (second == last) return; typename Traits::Compute_area_2 compute_area_2 = traits.compute_area_2_object(); ForwardIterator third = second; while (++third != last) { result = result + compute_area_2(*first, *second, *third); second = third; } } template typename Traits::FT polygon_area_2( ForwardIterator first, ForwardIterator last, const Traits& traits) { typedef typename Traits::FT FT; FT result = FT(0); if (first == last) return result; ForwardIterator second = first; ++second; if (second == last) return result; typename Traits::Compute_area_2 compute_area_2 = traits.compute_area_2_object(); ForwardIterator third = second; while (++third != last) { result = result + compute_area_2(*first, *second, *third); second = third; } return result; } template bool is_convex_2(ForwardIterator first, ForwardIterator last, const Traits& traits); template bool is_simple_2(ForwardIterator first, ForwardIterator last, const Traits& traits); template Oriented_side oriented_side_2(ForwardIterator first, ForwardIterator last, const Point& point, const Traits& traits); template Bounded_side bounded_side_2(ForwardIterator first, ForwardIterator last, const Point& point, const Traits& traits); template Orientation orientation_2(ForwardIterator first, ForwardIterator last, const Traits& traits); template inline ForwardIterator left_vertex_2(ForwardIterator first, ForwardIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return left_vertex_2(first, last, K()); } template inline ForwardIterator right_vertex_2(ForwardIterator first, ForwardIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return right_vertex_2(first, last, K()); } template inline ForwardIterator top_vertex_2(ForwardIterator first, ForwardIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return top_vertex_2(first, last, K()); } template inline ForwardIterator bottom_vertex_2(ForwardIterator first, ForwardIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return bottom_vertex_2(first, last, K()); } template inline Bbox_2 bbox_2(InputIterator first, InputIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return bbox_2(first, last, K()); } template inline void area_2(ForwardIterator first, ForwardIterator last, Numbertype& result) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; area_2(first, last, result, K()); } template inline bool is_convex_2(ForwardIterator first, ForwardIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return is_convex_2(first, last, K()); } template inline bool is_simple_2(ForwardIterator first, ForwardIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return is_simple_2(first, last, K()); } template inline Oriented_side oriented_side_2( ForwardIterator first, ForwardIterator last, const typename std::iterator_traits::value_type& point) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return oriented_side_2(first, last, point, K()); } template inline Bounded_side bounded_side_2( ForwardIterator first, ForwardIterator last, const typename std::iterator_traits::value_type& point) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return bounded_side_2(first, last, point, K()); } template inline Orientation orientation_2(ForwardIterator first, ForwardIterator last) { typedef typename Kernel_traits< typename std::iterator_traits::value_type>::Kernel K; return orientation_2(first, last, K()); } } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/set" 1 3 # 58 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/set" 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/set" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 1 3 # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 89 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 template, typename _Alloc = std::allocator<_Key> > class set { typedef typename _Alloc::value_type _Alloc_value_type; public: typedef _Key key_type; typedef _Key value_type; typedef _Compare key_compare; typedef _Compare value_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; typedef _Rb_tree, key_compare, _Key_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Key_alloc_type::pointer pointer; typedef typename _Key_alloc_type::const_pointer const_pointer; typedef typename _Key_alloc_type::reference reference; typedef typename _Key_alloc_type::const_reference const_reference; typedef typename _Rep_type::const_iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::const_reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; set() : _M_t() { } explicit set(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) { } # 163 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 template set(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_unique(__first, __last); } # 180 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 template set(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) { _M_t._M_insert_unique(__first, __last); } # 194 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 set(const set& __x) : _M_t(__x._M_t) { } # 205 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 set(set&& __x) noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } # 219 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 set(initializer_list __l, const _Compare& __comp = _Compare(), const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) { _M_t._M_insert_unique(__l.begin(), __l.end()); } # 233 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 set& operator=(const set& __x) { _M_t = __x._M_t; return *this; } # 248 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 set& operator=(set&& __x) { this->clear(); this->swap(__x); return *this; } # 269 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 set& operator=(initializer_list __l) { this->clear(); this->insert(__l.begin(), __l.end()); return *this; } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return _M_t.key_comp(); } allocator_type get_allocator() const noexcept { return allocator_type(_M_t.get_allocator()); } iterator begin() const noexcept { return _M_t.begin(); } iterator end() const noexcept { return _M_t.end(); } reverse_iterator rbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator rend() const noexcept { return _M_t.rend(); } iterator cbegin() const noexcept { return _M_t.begin(); } iterator cend() const noexcept { return _M_t.end(); } reverse_iterator crbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator crend() const noexcept { return _M_t.rend(); } bool empty() const noexcept { return _M_t.empty(); } size_type size() const noexcept { return _M_t.size(); } size_type max_size() const noexcept { return _M_t.max_size(); } # 393 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 void swap(set& __x) { _M_t.swap(__x._M_t); } # 411 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 std::pair insert(const value_type& __x) { std::pair __p = _M_t._M_insert_unique(__x); return std::pair(__p.first, __p.second); } std::pair insert(value_type&& __x) { std::pair __p = _M_t._M_insert_unique(std::move(__x)); return std::pair(__p.first, __p.second); } # 448 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 iterator insert(const_iterator __position, const value_type& __x) { return _M_t._M_insert_unique_(__position, __x); } iterator insert(const_iterator __position, value_type&& __x) { return _M_t._M_insert_unique_(__position, std::move(__x)); } # 467 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_unique(__first, __last); } # 480 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 void insert(initializer_list __l) { this->insert(__l.begin(), __l.end()); } # 501 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 iterator erase(const_iterator __position) { return _M_t.erase(__position); } # 531 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 552 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 iterator erase(const_iterator __first, const_iterator __last) { return _M_t.erase(__first, __last); } # 579 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 void clear() noexcept { _M_t.clear(); } # 593 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 size_type count(const key_type& __x) const { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } # 611 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } const_iterator find(const key_type& __x) const { return _M_t.find(__x); } # 632 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } # 648 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 673 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); template friend bool operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); }; # 702 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 template inline bool operator==(const set<_Key, _Compare, _Alloc>& __x, const set<_Key, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 719 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_set.h" 3 template inline bool operator<(const set<_Key, _Compare, _Alloc>& __x, const set<_Key, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template inline bool operator!=(const set<_Key, _Compare, _Alloc>& __x, const set<_Key, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const set<_Key, _Compare, _Alloc>& __x, const set<_Key, _Compare, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const set<_Key, _Compare, _Alloc>& __x, const set<_Key, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const set<_Key, _Compare, _Alloc>& __x, const set<_Key, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/set" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 1 3 # 65 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 86 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 template , typename _Alloc = std::allocator<_Key> > class multiset { typedef typename _Alloc::value_type _Alloc_value_type; public: typedef _Key key_type; typedef _Key value_type; typedef _Compare key_compare; typedef _Compare value_compare; typedef _Alloc allocator_type; private: typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; typedef _Rb_tree, key_compare, _Key_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Key_alloc_type::pointer pointer; typedef typename _Key_alloc_type::const_pointer const_pointer; typedef typename _Key_alloc_type::reference reference; typedef typename _Key_alloc_type::const_reference const_reference; typedef typename _Rep_type::const_iterator iterator; typedef typename _Rep_type::const_iterator const_iterator; typedef typename _Rep_type::const_reverse_iterator reverse_iterator; typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; typedef typename _Rep_type::size_type size_type; typedef typename _Rep_type::difference_type difference_type; multiset() : _M_t() { } explicit multiset(const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) { } # 155 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 template multiset(_InputIterator __first, _InputIterator __last) : _M_t() { _M_t._M_insert_equal(__first, __last); } # 171 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 template multiset(_InputIterator __first, _InputIterator __last, const _Compare& __comp, const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) { _M_t._M_insert_equal(__first, __last); } # 185 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 multiset(const multiset& __x) : _M_t(__x._M_t) { } # 196 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 multiset(multiset&& __x) noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } # 210 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 multiset(initializer_list __l, const _Compare& __comp = _Compare(), const allocator_type& __a = allocator_type()) : _M_t(__comp, _Key_alloc_type(__a)) { _M_t._M_insert_equal(__l.begin(), __l.end()); } # 224 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 multiset& operator=(const multiset& __x) { _M_t = __x._M_t; return *this; } # 240 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 multiset& operator=(multiset&& __x) { this->clear(); this->swap(__x); return *this; } # 261 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 multiset& operator=(initializer_list __l) { this->clear(); this->insert(__l.begin(), __l.end()); return *this; } key_compare key_comp() const { return _M_t.key_comp(); } value_compare value_comp() const { return _M_t.key_comp(); } allocator_type get_allocator() const noexcept { return allocator_type(_M_t.get_allocator()); } iterator begin() const noexcept { return _M_t.begin(); } iterator end() const noexcept { return _M_t.end(); } reverse_iterator rbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator rend() const noexcept { return _M_t.rend(); } iterator cbegin() const noexcept { return _M_t.begin(); } iterator cend() const noexcept { return _M_t.end(); } reverse_iterator crbegin() const noexcept { return _M_t.rbegin(); } reverse_iterator crend() const noexcept { return _M_t.rend(); } bool empty() const noexcept { return _M_t.empty(); } size_type size() const noexcept { return _M_t.size(); } size_type max_size() const noexcept { return _M_t.max_size(); } # 385 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 void swap(multiset& __x) { _M_t.swap(__x._M_t); } # 401 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 iterator insert(const value_type& __x) { return _M_t._M_insert_equal(__x); } iterator insert(value_type&& __x) { return _M_t._M_insert_equal(std::move(__x)); } # 431 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 iterator insert(const_iterator __position, const value_type& __x) { return _M_t._M_insert_equal_(__position, __x); } iterator insert(const_iterator __position, value_type&& __x) { return _M_t._M_insert_equal_(__position, std::move(__x)); } # 449 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 template void insert(_InputIterator __first, _InputIterator __last) { _M_t._M_insert_equal(__first, __last); } # 462 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 void insert(initializer_list __l) { this->insert(__l.begin(), __l.end()); } # 483 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 iterator erase(const_iterator __position) { return _M_t.erase(__position); } # 513 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 size_type erase(const key_type& __x) { return _M_t.erase(__x); } # 534 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 iterator erase(const_iterator __first, const_iterator __last) { return _M_t.erase(__first, __last); } # 561 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 void clear() noexcept { _M_t.clear(); } # 572 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 size_type count(const key_type& __x) const { return _M_t.count(__x); } # 590 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 iterator find(const key_type& __x) { return _M_t.find(__x); } const_iterator find(const key_type& __x) const { return _M_t.find(__x); } # 611 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 iterator lower_bound(const key_type& __x) { return _M_t.lower_bound(__x); } const_iterator lower_bound(const key_type& __x) const { return _M_t.lower_bound(__x); } # 627 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 iterator upper_bound(const key_type& __x) { return _M_t.upper_bound(__x); } const_iterator upper_bound(const key_type& __x) const { return _M_t.upper_bound(__x); } # 652 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 std::pair equal_range(const key_type& __x) { return _M_t.equal_range(__x); } std::pair equal_range(const key_type& __x) const { return _M_t.equal_range(__x); } template friend bool operator==(const multiset<_K1, _C1, _A1>&, const multiset<_K1, _C1, _A1>&); template friend bool operator< (const multiset<_K1, _C1, _A1>&, const multiset<_K1, _C1, _A1>&); }; # 683 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 template inline bool operator==(const multiset<_Key, _Compare, _Alloc>& __x, const multiset<_Key, _Compare, _Alloc>& __y) { return __x._M_t == __y._M_t; } # 700 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_multiset.h" 3 template inline bool operator<(const multiset<_Key, _Compare, _Alloc>& __x, const multiset<_Key, _Compare, _Alloc>& __y) { return __x._M_t < __y._M_t; } template inline bool operator!=(const multiset<_Key, _Compare, _Alloc>& __x, const multiset<_Key, _Compare, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const multiset<_Key,_Compare,_Alloc>& __x, const multiset<_Key,_Compare,_Alloc>& __y) { return __y < __x; } template inline bool operator<=(const multiset<_Key, _Compare, _Alloc>& __x, const multiset<_Key, _Compare, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const multiset<_Key, _Compare, _Alloc>& __x, const multiset<_Key, _Compare, _Alloc>& __y) { return !(__x < __y); } template inline void swap(multiset<_Key, _Compare, _Alloc>& __x, multiset<_Key, _Compare, _Alloc>& __y) { __x.swap(__y); } } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/set" 2 3 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" 2 # 71 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" namespace CGAL { namespace i_polygon { typedef std::vector::size_type Index_t; struct Vertex_index { Vertex_index() {} explicit Vertex_index(Index_t i): m_i(i) {} Index_t as_int() const {return m_i;} Vertex_index operator++() {++m_i; return *this; } private: Index_t m_i; }; struct Vertex_order { explicit Vertex_order(Index_t i): m_i(i) {} Index_t as_int() {return m_i;} private: Index_t m_i; }; template class Vertex_data ; template class Less_segments { typedef VertexData Vertex_data; Vertex_data *m_vertex_data; bool less_than_in_tree(Vertex_index i, Vertex_index j); public: Less_segments(Vertex_data *vertex_data) : m_vertex_data(vertex_data) {} bool operator()(Vertex_index i, Vertex_index j); }; template struct Edge_data { typedef std::set Tree; Edge_data() : is_in_tree(false) {} Edge_data(typename Tree::iterator it) : tree_it(it), is_in_tree(false) {} typename Tree::iterator tree_it; bool is_in_tree :1; bool is_left_to_right :1; }; template class Vertex_data_base { public: typedef typename PolygonTraits::Point_2 Point_2; std::vector iterators; std::vector m_order_of; std::vector m_idx_at_rank; std::vector::size_type m_size; typename PolygonTraits::Orientation_2 orientation_2; typename PolygonTraits::Less_xy_2 less_xy_2; bool is_simple_result; Vertex_data_base(ForwardIterator begin, ForwardIterator end, const PolygonTraits& pgnt); bool ordered_left_to_right(Vertex_index v1, Vertex_index v2) { return m_order_of[v1.as_int()].as_int() < m_order_of[v2.as_int()].as_int();} Vertex_index index_at_rank(Vertex_order vo) const { return m_idx_at_rank[vo.as_int()];} Vertex_index next(Vertex_index k) const { ++k; return k.as_int() == m_size ? Vertex_index(0) : k;} Vertex_index prev(Vertex_index k) const { return k.as_int() == 0 ? Vertex_index(m_size-1) : Vertex_index(k.as_int()-1); } Point_2 point(Vertex_index i) { return *iterators[i.as_int()];} }; template class Vertex_data : public Vertex_data_base { public: typedef Less_segments Less_segs; typedef std::set Tree; typedef Vertex_data_base Base_class; using Base_class::ordered_left_to_right; using Base_class::next; using Base_class::prev; using Base_class::index_at_rank; using Base_class::point; std::vector > edges; Vertex_data(ForwardIterator begin, ForwardIterator end, const PolygonTraits& pgnt); void init(Tree *tree); void left_and_right_index(Vertex_index &left, Vertex_index &right, Vertex_index edge); Vertex_index left_index(Vertex_index edge) { return edges[edge.as_int()].is_left_to_right ? edge : next(edge); } void sweep(Tree *tree); bool insertion_event(Tree *tree, Vertex_index i, Vertex_index j, Vertex_index k); bool replacement_event(Tree *tree, Vertex_index cur, Vertex_index to_insert); bool deletion_event(Tree *tree, Vertex_index i, Vertex_index j); bool on_right_side(Vertex_index vt, Vertex_index edge, bool above); }; template class Less_vertex_data { VertexData *m_vertex_data; public: Less_vertex_data(VertexData *vd) : m_vertex_data(vd) {} bool operator()(Vertex_index i, Vertex_index j); }; } namespace i_polygon { template bool Less_segments:: operator()(Vertex_index i, Vertex_index j) { if (m_vertex_data->edges[j.as_int()].is_in_tree) { return less_than_in_tree(i,j); } else { return !less_than_in_tree(j,i); } } template bool Less_segments:: less_than_in_tree(Vertex_index new_edge, Vertex_index tree_edge) { (CGAL::possibly(m_vertex_data->edges[tree_edge.as_int()].is_in_tree)?(static_cast(0)): ::CGAL::precondition_fail( "m_vertex_data->edges[tree_edge.as_int()].is_in_tree" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" # 222 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" , 223 # 222 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" )) ; (CGAL::possibly(!m_vertex_data->edges[new_edge.as_int()].is_in_tree)?(static_cast(0)): ::CGAL::precondition_fail( "!m_vertex_data->edges[new_edge.as_int()].is_in_tree" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" # 224 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" , 225 # 224 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h" )) ; Vertex_index left, mid, right; m_vertex_data->left_and_right_index(left, right, tree_edge); mid = m_vertex_data->left_index(new_edge); if (mid.as_int() == left.as_int()) { return true; } switch (m_vertex_data->orientation_2( m_vertex_data->point(left), m_vertex_data->point(mid), m_vertex_data->point(right))) { case LEFT_TURN: return true; case RIGHT_TURN: return false; case COLLINEAR: break; } m_vertex_data->is_simple_result = false; return true; } template bool Less_vertex_data:: operator()(Vertex_index i, Vertex_index j) { return m_vertex_data->less_xy_2( m_vertex_data->point(i), m_vertex_data->point(j)); } template Vertex_data_base:: Vertex_data_base(ForwardIterator begin, ForwardIterator end, const PolygonTraits& pgn_traits) : orientation_2(pgn_traits.orientation_2_object()), less_xy_2(pgn_traits.less_xy_2_object()) { m_size = std::distance(begin, end); is_simple_result = true; m_idx_at_rank.reserve(m_size); iterators.reserve(m_size); m_order_of.insert(m_order_of.end(), m_size, Vertex_order(0)); for (Index_t i = 0; i< m_size; ++i, ++begin) { m_idx_at_rank.push_back(Vertex_index(i)); iterators.push_back(begin); } std::sort(m_idx_at_rank.begin(), m_idx_at_rank.end(), Less_vertex_data(this)); for (Index_t j = 0; j < m_size; ++j) { Vertex_order vo(j); m_order_of[index_at_rank(vo).as_int()] = vo; } } template void Vertex_data:: left_and_right_index(Vertex_index &left, Vertex_index &right, Vertex_index edge) { if (edges[edge.as_int()].is_left_to_right) { left = edge; right = next(edge); } else { right = edge; left = next(edge); } } template Vertex_data:: Vertex_data(ForwardIterator begin, ForwardIterator end, const PolygonTraits& pgn_traits) : Base_class(begin, end, pgn_traits) {} template void Vertex_data::init(Tree *tree) { edges.insert(edges.end(), this->m_size, Edge_data(tree->end())); } template bool Vertex_data:: insertion_event(Tree *tree, Vertex_index prev_vt, Vertex_index mid_vt, Vertex_index next_vt) { bool left_turn; switch(this->orientation_2(point(prev_vt), point(mid_vt), point(next_vt))) { case LEFT_TURN: left_turn = true; break; case RIGHT_TURN: left_turn = false; break; default: return false; } Edge_data &td_prev = edges[prev_vt.as_int()], &td_mid = edges[mid_vt.as_int()]; td_prev.is_in_tree = false; td_prev.is_left_to_right = false; td_mid.is_in_tree = false; td_mid.is_left_to_right = true; std::pair result; if (left_turn) { result = tree->insert(prev_vt); td_prev.tree_it = result.first; td_prev.is_in_tree = true; result = tree->insert(mid_vt); td_mid.tree_it = result.first; td_mid.is_in_tree = true; } else { result = tree->insert(mid_vt); td_mid.tree_it = result.first; td_mid.is_in_tree = true; result = tree->insert(prev_vt); td_prev.tree_it = result.first; td_prev.is_in_tree = true; } return true; } template bool Vertex_data:: on_right_side(Vertex_index vt, Vertex_index edge_id, bool above) { Orientation turn = this->orientation_2(point(edge_id), point(vt), point(next(edge_id))); bool left_turn = edges[edge_id.as_int()].is_left_to_right ? above : !above; if (left_turn) { if (turn != RIGHT_TURN) { return false; } } else { if (turn != LEFT_TURN) { return false; } } return true; } template bool Vertex_data:: replacement_event(Tree *tree, Vertex_index cur_edge, Vertex_index next_edge) { typedef typename Tree::iterator It; Edge_data &td = edges[cur_edge.as_int()]; (CGAL::possibly(td.is_in_tree)?(static_cast(0)): ::CGAL::assertion_fail( "td.is_in_tree" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_simplicity.h", 371)); It cur_seg = td.tree_it; Vertex_index cur_vt = (td.is_left_to_right) ? next_edge : cur_edge; if (cur_seg != tree->begin()) { It seg_below = cur_seg; --seg_below; if (!on_right_side(cur_vt, *seg_below, true)) { return false; } } It seg_above = cur_seg; ++ seg_above; if (seg_above != tree->end()) { if (!on_right_side(cur_vt, *seg_above, false)) { return false; } } Edge_data &new_td = edges[next_edge.as_int()]; new_td.is_left_to_right = td.is_left_to_right; new_td.is_in_tree = false; tree->erase(cur_seg); td.is_in_tree = false; new_td.tree_it = tree->insert(seg_above, next_edge); new_td.is_in_tree = true; return true; } template bool Vertex_data:: deletion_event(Tree *tree, Vertex_index prev_vt, Vertex_index mid_vt) { typedef typename Tree::iterator It; Edge_data &td_prev = edges[prev_vt.as_int()], &td_mid = edges[mid_vt.as_int()]; It prev_seg = td_prev.tree_it, mid_seg = td_mid.tree_it; Vertex_index cur_vt = (td_prev.is_left_to_right) ? mid_vt : prev_vt; It seg_above = prev_seg; ++seg_above; if (seg_above == mid_seg) { ++seg_above; } else { It prev_seg_copy = mid_seg; ++prev_seg_copy; if (prev_seg_copy != prev_seg) return false; } tree->erase(prev_seg); td_prev.is_in_tree = false; tree->erase(mid_seg); td_mid.is_in_tree = false; if (seg_above != tree->end()) { if (!on_right_side(cur_vt, *seg_above, false)) return false; } if (seg_above != tree->begin()) { --seg_above; if (!on_right_side(cur_vt, *seg_above, true)) return false; } return true; } template void Vertex_data:: sweep(Tree *tree) { if (this->m_size < 3) return; bool succes = true; for (Index_t i=0; i< this->m_size; ++i) { Vertex_index cur = index_at_rank(Vertex_order(i)); Vertex_index prev_vt = prev(cur), next_vt = next(cur); if (ordered_left_to_right(cur, next_vt)) { if (ordered_left_to_right(cur, prev_vt)) succes = insertion_event(tree, prev_vt, cur, next_vt); else succes = replacement_event(tree, prev_vt, cur); } else { if (ordered_left_to_right(cur, prev_vt)) succes = replacement_event(tree, cur, prev_vt); else succes = deletion_event(tree, prev_vt, cur); } if (!succes) break; } if (!succes) this->is_simple_result = false; } } template bool is_simple_polygon(Iterator points_begin, Iterator points_end, const PolygonTraits& polygon_traits) { typedef Iterator ForwardIterator; typedef i_polygon::Vertex_data Vertex_data; typedef std::set > Tree; std::vector points(points_begin,points_end); std::sort(points.begin(), points.end(), polygon_traits.less_xy_2_object()); typename std::vector::iterator succ(points.begin()) , it(succ++); for(;succ != points.end(); ++it,++succ){ if(*it == *succ){ return false; } } Vertex_data vertex_data(points_begin, points_end, polygon_traits); Tree tree(&vertex_data); vertex_data.init(&tree); vertex_data.sweep(&tree); return vertex_data.is_simple_result; } } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" 2 namespace CGAL { # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" template bool is_simple_2(ForwardIterator first, ForwardIterator last, const PolygonTraits& traits) { return is_simple_polygon(first, last, traits); } template ForwardIterator left_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits&traits) { (CGAL::possibly(first != last)?(static_cast(0)): ::CGAL::precondition_fail( "first != last" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h", 64)); return std::min_element(first, last, traits.less_xy_2_object()); } template ForwardIterator right_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits &traits) { (CGAL::possibly(first != last)?(static_cast(0)): ::CGAL::precondition_fail( "first != last" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h", 78)); return std::max_element(first, last, traits.less_xy_2_object()); } template ForwardIterator top_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits&traits) { (CGAL::possibly(first != last)?(static_cast(0)): ::CGAL::precondition_fail( "first != last" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h", 92)); return std::max_element(first, last, traits.less_yx_2_object()); } template ForwardIterator bottom_vertex_2(ForwardIterator first, ForwardIterator last, const PolygonTraits&traits) { (CGAL::possibly(first != last)?(static_cast(0)): ::CGAL::precondition_fail( "first != last" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h", 106)); return std::min_element(first, last, traits.less_yx_2_object()); } template Bbox_2 bbox_2(InputIterator first, InputIterator last, const PolygonTraits& traits) { typename PolygonTraits::Construct_bbox_2 construct_bbox = traits.construct_bbox_2_object(); (CGAL::possibly(first != last)?(static_cast(0)): ::CGAL::precondition_fail( "first != last" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h", 122)); Bbox_2 result = construct_bbox(*first); while (++first != last) result = result + construct_bbox(*first); return result; } # 145 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" template bool is_convex_2(ForwardIterator first, ForwardIterator last, const Traits& traits) { ForwardIterator previous = first; if (previous == last) return true; ForwardIterator current = previous; ++current; if (current == last) return true; ForwardIterator next = current; ++next; if (next == last) return true; typename Traits::Equal_2 equal = traits.equal_2_object(); while(equal(*previous, *current)) { current = next; ++next; if (next == last) return true; } typename Traits::Less_xy_2 less_xy_2 = traits.less_xy_2_object(); typename Traits::Orientation_2 orientation = traits.orientation_2_object(); bool HasClockwiseTriples = false; bool HasCounterClockwiseTriples = false; bool Order = less_xy_2(*previous, *current); int NumOrderChanges = 0; do { switch_orient: switch (orientation(*previous, *current, *next)) { case CLOCKWISE: HasClockwiseTriples = true; break; case COUNTERCLOCKWISE: HasCounterClockwiseTriples = true; break; case ZERO: if(equal(*current, *next)) { if(next == first) { first = current; } ++next; if (next == last) next = first; goto switch_orient; } break; } bool NewOrder = less_xy_2(*current, *next); if (Order != NewOrder) NumOrderChanges++; if (NumOrderChanges > 2) { return false; } if (HasClockwiseTriples && HasCounterClockwiseTriples) { return false; } previous = current; current = next; ++next; if (next == last) next = first; Order = NewOrder; } while (previous != first); return true; } # 233 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" template Oriented_side oriented_side_2(ForwardIterator first, ForwardIterator last, const Point& point, const Traits& traits) { Orientation o = orientation_2(first, last, traits); (CGAL::possibly(o != COLLINEAR)?(static_cast(0)): ::CGAL::assertion_fail( "o != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h", 240)); Bounded_side b = bounded_side_2(first, last, point, traits); switch (b) { case ON_BOUNDARY: return ON_ORIENTED_BOUNDARY; case ON_BOUNDED_SIDE: return (o == CLOCKWISE) ? ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE; default: return (o == CLOCKWISE) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE; } } # 274 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h" namespace i_polygon { template int which_side_in_slab(Point const &point, Point const &low, Point const &high, Orientation_2 &orientation_2, CompareX_2 &compare_x_2) { Comparison_result low_x_comp_res = compare_x_2(point, low); Comparison_result high_x_comp_res = compare_x_2(point, high); if (low_x_comp_res == SMALLER) { if (high_x_comp_res == SMALLER) return -1; } else { switch (high_x_comp_res) { case LARGER: return 1; case SMALLER: break; case EQUAL: return (low_x_comp_res == EQUAL) ? 0 : 1; } } switch (orientation_2(low, point, high)) { case LEFT_TURN: return 1; case RIGHT_TURN: return -1; default: return 0; } } } template Bounded_side bounded_side_2(ForwardIterator first, ForwardIterator last, const Point& point, const Traits& traits) { ForwardIterator current = first; if (current == last) return ON_UNBOUNDED_SIDE; ForwardIterator next = current; ++next; if (next == last) return ON_UNBOUNDED_SIDE; typename Traits::Compare_x_2 compare_x_2 = traits.compare_x_2_object(); typename Traits::Compare_y_2 compare_y_2 = traits.compare_y_2_object(); typename Traits::Orientation_2 orientation_2 = traits.orientation_2_object(); bool IsInside = false; Comparison_result cur_y_comp_res = compare_y_2(*current, point); do { Comparison_result next_y_comp_res = compare_y_2(*next, point); switch (cur_y_comp_res) { case SMALLER: switch (next_y_comp_res) { case SMALLER: break; case EQUAL: switch (compare_x_2(point, *next)) { case SMALLER: IsInside = !IsInside; break; case EQUAL: return ON_BOUNDARY; case LARGER: break; } break; case LARGER: switch (i_polygon::which_side_in_slab(point, *current, *next, orientation_2, compare_x_2)) { case -1: IsInside = !IsInside; break; case 0: return ON_BOUNDARY; } break; } break; case EQUAL: switch (next_y_comp_res) { case SMALLER: switch (compare_x_2(point, *current)) { case SMALLER: IsInside = !IsInside; break; case EQUAL: return ON_BOUNDARY; case LARGER: break; } break; case EQUAL: switch (compare_x_2(point, *current)) { case SMALLER: if (compare_x_2(point, *next) != SMALLER) return ON_BOUNDARY; break; case EQUAL: return ON_BOUNDARY; case LARGER: if (compare_x_2(point, *next) != LARGER) return ON_BOUNDARY; break; } break; case LARGER: if (compare_x_2(point, *current) == EQUAL) { return ON_BOUNDARY; } break; } break; case LARGER: switch (next_y_comp_res) { case SMALLER: switch (i_polygon::which_side_in_slab(point, *next, *current, orientation_2, compare_x_2)) { case -1: IsInside = !IsInside; break; case 0: return ON_BOUNDARY; } break; case EQUAL: if (compare_x_2(point, *next) == EQUAL) { return ON_BOUNDARY; } break; case LARGER: break; } break; } current = next; cur_y_comp_res = next_y_comp_res; ++next; if (next == last) next = first; } while (current != first); return IsInside ? ON_BOUNDED_SIDE : ON_UNBOUNDED_SIDE; } template Orientation orientation_2(ForwardIterator first, ForwardIterator last, const Traits& traits) { (CGAL::possibly(is_simple_2(first, last, traits))?(static_cast(0)): ::CGAL::precondition_fail( "is_simple_2(first, last, traits)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h", 421)); ForwardIterator i = left_vertex_2(first, last, traits); ForwardIterator prev = (i == first) ? last : i; --prev; ForwardIterator next = i; ++next; if (next == last) next = first; return traits.orientation_2_object()(*prev, *i, *next); } } # 272 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2_algorithms.h" 2 # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h" namespace CGAL { template < class Ctnr> class Polygon_circulator { public: typedef Polygon_circulator Self; typedef Circulator_from_container Mutable; typedef Ctnr Container; typedef typename Ctnr::iterator iterator; typedef typename Ctnr::const_iterator const_iterator; typedef typename Ctnr::value_type value_type; typedef typename Ctnr::const_reference reference; typedef const value_type* pointer; typedef typename Ctnr::size_type size_type; typedef typename Ctnr::difference_type difference_type; typedef std::iterator_traits ITraits; typedef typename ITraits::iterator_category Icategory; typedef I_Circulator_from_iterator_traits CTraits; typedef typename CTraits::iterator_category iterator_category; private: const Ctnr* ctnr; iterator i; public: Polygon_circulator() : ctnr(__null) {} Polygon_circulator( const Ctnr* c) : ctnr(c), i(c->begin()) {} Polygon_circulator( const Ctnr* c, iterator j) : ctnr(c), i(j) {} Polygon_circulator( const Mutable& c) : ctnr( c.container()), i( c.current_iterator()) {} Self& operator=( const Self& c) { ctnr = c.ctnr; i = c.i; return *this; } bool operator==( Nullptr_t p) const { (CGAL::possibly(p == __null)?(static_cast(0)): ::CGAL::assertion_fail( "p == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 76)); return (ctnr == __null) || (ctnr->begin() == ctnr->end()); } bool operator!=( Nullptr_t p) const { return !(*this == p); } bool operator==( const Self& c) const { return i == c.i; } bool operator!=( const Self& c) const { return !(*this == c); } reference operator*() const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 83)); (CGAL::possibly(current_iterator() != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "current_iterator() != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 84)); return *i; } private: template < typename T > static pointer deref(const T& t) { return t.operator->(); } template < typename T > static pointer deref(T* t) { return t; } public: pointer operator->() const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 98)); (CGAL::possibly(current_iterator() != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "current_iterator() != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 99)); return deref(i); } Self& operator++() { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 103)); (CGAL::possibly(current_iterator() != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "current_iterator() != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 104)); ++i; if ( current_iterator() == ctnr->end()) i = const_cast(ctnr)->begin(); return *this; } Self operator++(int) { Self tmp= *this; ++*this; return tmp; } Self& operator--() { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 116)); (CGAL::possibly(current_iterator() != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "current_iterator() != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 117)); if ( current_iterator() == ctnr->begin()) i = const_cast(ctnr)->end(); --i; return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self& operator+=( difference_type n) { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 129)); (CGAL::possibly(current_iterator() != ctnr->end())?(static_cast(0)): ::CGAL::assertion_fail( "current_iterator() != ctnr->end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 130)); typename Ctnr::difference_type j = current_iterator() - ctnr->begin(); typename Ctnr::difference_type size = ctnr->size(); (CGAL::possibly(j >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "j >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 133)); (CGAL::possibly(size >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "size >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 134)); j = non_negative_mod( j + n, size); (CGAL::possibly(j >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "j >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 136)); (CGAL::possibly(j < size)?(static_cast(0)): ::CGAL::assertion_fail( "j < size" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 137)); i = const_cast(ctnr)->begin() + j; return *this; } Self operator+( difference_type n) const { Self tmp = *this; return tmp += n; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& c) const { (CGAL::possibly(ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 151)); (CGAL::possibly(c.ctnr != __null)?(static_cast(0)): ::CGAL::assertion_fail( "c.ctnr != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_vertex_circulator.h", 152)); return i - c.i; } reference operator[]( difference_type n) const { Self tmp = *this; tmp += n; return *tmp; } const_iterator current_iterator() const { return i;} iterator mod_iterator() const { return i;} Self min_circulator() const { return Self(ctnr); } const Ctnr* container() const { return ctnr; } }; template inline Polygon_circulator operator+( typename Polygon_circulator:: difference_type n, const Polygon_circulator& c) { Polygon_circulator tmp = c; return tmp += n; } } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h" namespace CGAL { template class Polygon_2; template class Polygon_2__Segment_ptr { public: typedef Segment_ Segment; Polygon_2__Segment_ptr(Segment const &seg) :m_seg(seg){} Segment* operator->() {return &m_seg;} private: Segment m_seg; }; template class Polygon_2_edge_iterator { public: typedef typename std::iterator_traits::iterator_category iterator_category; typedef typename Traits_::Segment_2 Segment_2; typedef typename Traits_::Segment_2 value_type; typedef Container_ Container; typedef typename Container_::const_iterator const_iterator; typedef typename Container_::difference_type difference_type; typedef Segment_2* pointer; typedef Segment_2& reference; private: const Container_* container; const_iterator first_vertex; public: Polygon_2_edge_iterator() {} Polygon_2_edge_iterator(const Container_* c, const_iterator f) : container(c), first_vertex(f) {} bool operator==( const Polygon_2_edge_iterator& x) const { return first_vertex == x.first_vertex; } bool operator!=( const Polygon_2_edge_iterator& x) const { return !(first_vertex == x.first_vertex); } Segment_2 operator*() const { const_iterator second_vertex = first_vertex; ++second_vertex; if (second_vertex == container->end()) second_vertex = container->begin(); typename Traits_::Construct_segment_2 construct_segment_2 = Traits_().construct_segment_2_object(); return construct_segment_2(*first_vertex, *second_vertex); } Polygon_2__Segment_ptr operator->() const {return Polygon_2__Segment_ptr(operator*());} Polygon_2_edge_iterator& operator++() { ++first_vertex; return *this; } Polygon_2_edge_iterator operator++(int) { Polygon_2_edge_iterator tmp = *this; ++*this; return tmp; } Polygon_2_edge_iterator& operator--() { --first_vertex; return *this; } Polygon_2_edge_iterator operator--(int) { Polygon_2_edge_iterator tmp = *this; --*this; return tmp; } Polygon_2_edge_iterator& operator+=(difference_type n) { first_vertex += n; return *this; } Polygon_2_edge_iterator operator+(difference_type n) const { return Polygon_2_edge_iterator( container, first_vertex + n); } Polygon_2_edge_iterator& operator-=(difference_type n) { return (*this) -= n; } Polygon_2_edge_iterator operator-(difference_type n) const { return Polygon_2_edge_iterator( container, first_vertex - n); } difference_type operator-(const Polygon_2_edge_iterator& a) const { return first_vertex - a.first_vertex; } Segment_2 operator[](int n) const { return *Polygon_2_edge_iterator( container, first_vertex+n); } bool operator<(const Polygon_2_edge_iterator& a) const { return first_vertex < a.first_vertex; } bool operator>(const Polygon_2_edge_iterator& a) const { return first_vertex > a.first_vertex; } bool operator<=(const Polygon_2_edge_iterator& a) const { return first_vertex <= a.first_vertex; } bool operator>=(const Polygon_2_edge_iterator& a) const { return first_vertex >= a.first_vertex; } }; template typename Container_::difference_type distance_type(const Polygon_2_edge_iterator&) { return Container_::difference_type(); } template typename Traits_::Segment_2* value_type(const Polygon_2_edge_iterator&) { return (typename Traits_::Segment_2 *)(0); } # 195 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_iterator.h" } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/polygon_assertions.h" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h" 2 namespace CGAL { template class Polygon_2; template class Polygon_2_const_edge_circulator { public: typedef _Traits Traits; typedef typename _Traits::Segment_2 Segment_2; typedef _Container Container; typedef Polygon_circulator<_Container> Vertex_const_circulator; typedef Segment_2 value_type; typedef typename _Container::difference_type difference_type; typedef typename _Container::size_type size_type; typedef Segment_2* pointer; typedef const Segment_2* const_pointer; typedef Segment_2& reference; typedef const Segment_2& const_reference; typedef Bidirectional_circulator_tag iterator_category; private: Vertex_const_circulator first_vertex; public: Polygon_2_const_edge_circulator() {} Polygon_2_const_edge_circulator(Vertex_const_circulator f) : first_vertex(f) {} bool operator==( Nullptr_t p ) const { (CGAL::possibly(p == 0)?(static_cast(0)): ::CGAL::assertion_fail( "p == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h", 66)); return (first_vertex == 0); } bool operator!=( Nullptr_t p ) const { return !(*this == p); } bool operator==( const Polygon_2_const_edge_circulator<_Traits, _Container>& x) const { return first_vertex == x.first_vertex; } bool operator!=( const Polygon_2_const_edge_circulator<_Traits, _Container>& x) const { return !(first_vertex == x.first_vertex); } Segment_2 operator*() const { Vertex_const_circulator second_vertex = first_vertex; ++second_vertex; typename Traits::Construct_segment_2 construct_segment_2 = Traits().construct_segment_2_object(); return construct_segment_2(*first_vertex, *second_vertex); } Polygon_2_const_edge_circulator<_Traits, _Container>& operator++() { ++first_vertex; return *this; } Polygon_2_const_edge_circulator<_Traits, _Container> operator++(int) { Polygon_2_const_edge_circulator<_Traits, _Container> tmp = *this; ++*this; return tmp; } Polygon_2_const_edge_circulator<_Traits, _Container>& operator--() { --first_vertex; return *this; } Polygon_2_const_edge_circulator<_Traits, _Container> operator--(int) { Polygon_2_const_edge_circulator<_Traits, _Container> tmp = *this; --*this; return tmp; } Polygon_2_const_edge_circulator<_Traits, _Container>& operator+=(difference_type n) { first_vertex += n; return *this; } Polygon_2_const_edge_circulator<_Traits, _Container> operator+(difference_type n) const { return Polygon_2_const_edge_circulator<_Traits, _Container>( first_vertex + n); } Polygon_2_const_edge_circulator<_Traits, _Container>& operator-=(difference_type n) { return (*this) -= n; } Polygon_2_const_edge_circulator<_Traits, _Container> operator-(difference_type n) const { return Polygon_2_const_edge_circulator<_Traits, _Container>( first_vertex - n); } difference_type operator-( const Polygon_2_const_edge_circulator<_Traits, _Container>& a) const { return first_vertex - a.first_vertex; } Segment_2 operator[](int n) const { return *Polygon_2_const_edge_circulator<_Traits, _Container>( first_vertex+n); } bool operator<( const Polygon_2_const_edge_circulator<_Traits, _Container>& a) const { return first_vertex < a.first_vertex; } bool operator>( const Polygon_2_const_edge_circulator<_Traits, _Container>& a) const { return first_vertex > a.first_vertex; } bool operator<=( const Polygon_2_const_edge_circulator<_Traits, _Container>& a) const { return first_vertex <= a.first_vertex; } bool operator>=( const Polygon_2_const_edge_circulator<_Traits, _Container>& a) const { return first_vertex >= a.first_vertex; } }; # 223 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_edge_circulator.h" } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" 2 namespace CGAL { template > class Polygon_2 { public: typedef Traits_P Traits; typedef Container_P Container; typedef typename Traits_P::FT FT; typedef typename Traits_P::Point_2 Point_2; typedef typename Traits_P::Segment_2 Segment_2; typedef typename Container_P::difference_type difference_type; typedef typename Container_P::value_type value_type; typedef typename Container_P::pointer pointer; typedef typename Container_P::reference reference; typedef typename Container_P::const_reference const_reference; typedef typename Container_P::iterator iterator; typedef typename Container_P::const_iterator const_iterator; typedef typename Container::iterator Vertex_iterator; typedef typename Container::iterator Vertex_const_iterator; typedef Polygon_circulator Vertex_const_circulator; typedef Vertex_const_circulator Vertex_circulator; typedef Polygon_2_edge_iterator Edge_const_iterator; typedef Polygon_2_const_edge_circulator Edge_const_circulator; Polygon_2(const Traits & p_traits = Traits()) : traits(p_traits) {} Polygon_2(const Polygon_2& polygon) : d_container(polygon.d_container), traits(polygon.traits) {} template Polygon_2(InputIterator first, InputIterator last, Traits p_traits = Traits()) : d_container(), traits(p_traits) { std::copy(first, last, std::back_inserter(d_container)); } void set(Vertex_iterator pos, const Point_2& x) { *pos = x; } void set(Polygon_circulatorconst &pos, const Point_2& x) { *pos.mod_iterator() = x; } Vertex_iterator insert(Vertex_iterator pos, const Point_2& x) { return d_container.insert(pos,x); } Vertex_iterator insert(Vertex_circulator pos, const Point_2& x) { return d_container.insert(pos.mod_iterator(),x); } template void insert(Vertex_iterator pos, InputIterator first, InputIterator last) { d_container.insert(pos, first, last); } template void insert(Vertex_circulator pos, InputIterator first, InputIterator last) { d_container.insert(pos.mod_iterator(), first, last); } void push_back(const Point_2& x) { d_container.insert(d_container.end(), x); } void erase(Vertex_iterator pos) { d_container.erase(pos); } void erase(Vertex_circulator pos) { d_container.erase(pos.mod_iterator()); } void erase(Vertex_iterator first, Vertex_iterator last) { d_container.erase(first, last); } void clear() { d_container.clear(); } void reverse_orientation() { if (size() <= 1) return; typename Container_P::iterator i = d_container.begin(); std::reverse(++i, d_container.end()); } # 174 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" Vertex_const_iterator vertices_begin() const { return const_cast(*this).d_container.begin(); } Vertex_const_iterator vertices_end() const { return const_cast(*this).d_container.end(); } Vertex_const_circulator vertices_circulator() const { Polygon_2& self = const_cast(*this); return Vertex_const_circulator(&self.d_container, self.d_container.begin()); } Edge_const_iterator edges_begin() const { return Edge_const_iterator(&d_container, d_container.begin()); } Edge_const_iterator edges_end() const { return Edge_const_iterator(&d_container, d_container.end()); } Edge_const_circulator edges_circulator() const { return Edge_const_circulator(vertices_circulator()); } bool is_simple() const { return is_simple_2(d_container.begin(),d_container.end(), traits); } bool is_convex() const { return is_convex_2(d_container.begin(),d_container.end(), traits); } Orientation orientation() const { return orientation_2(d_container.begin(), d_container.end(), traits); } Oriented_side oriented_side(const Point_2& value) const { return oriented_side_2(d_container.begin(), d_container.end(), value, traits); } Bounded_side bounded_side(const Point_2& value) const { (CGAL::possibly(is_simple())?(static_cast(0)): ::CGAL::precondition_fail( "is_simple()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h", 226)); return bounded_side_2(d_container.begin(), d_container.end(), value, traits); } Bbox_2 bbox() const { return bbox_2(d_container.begin(), d_container.end()); } FT area() const { return polygon_area_2(d_container.begin(), d_container.end(), traits); } Vertex_const_iterator left_vertex() const { Polygon_2 &self = const_cast(*this); return left_vertex_2(self.d_container.begin(), self.d_container.end(), traits); } Vertex_const_iterator right_vertex() const { Polygon_2 &self = const_cast(*this); return right_vertex_2(self.d_container.begin(), self.d_container.end(), traits); } Vertex_const_iterator top_vertex() const { Polygon_2 &self = const_cast(*this); return top_vertex_2(self.d_container.begin(), self.d_container.end(), traits); } Vertex_const_iterator bottom_vertex() const { Polygon_2 &self = const_cast(*this); return bottom_vertex_2(self.d_container.begin(), self.d_container.end(), traits); } bool is_counterclockwise_oriented() const { return orientation() == COUNTERCLOCKWISE; } bool is_clockwise_oriented() const { return orientation() == CLOCKWISE; } bool is_collinear_oriented() const { return orientation() == COLLINEAR; } bool has_on_positive_side(const Point_2& q) const { return oriented_side(q) == ON_POSITIVE_SIDE; } bool has_on_negative_side(const Point_2& q) const { return oriented_side(q) == ON_NEGATIVE_SIDE; } bool has_on_boundary(const Point_2& q) const { return bounded_side(q) == ON_BOUNDARY; } bool has_on_bounded_side(const Point_2& q) const { return bounded_side(q) == ON_BOUNDED_SIDE; } bool has_on_unbounded_side(const Point_2& q) const { return bounded_side(q) == ON_UNBOUNDED_SIDE; } const Point_2& vertex(std::size_t i) const { return *(d_container.begin() + i); } const Point_2& operator[](std::size_t i) const { return vertex(i); } Segment_2 edge(std::size_t i) const { return *(edges_begin() + i); } std::size_t size() const { return d_container.size(); } bool is_empty() const { return d_container.empty(); } const Container_P& container() const { return d_container; } bool identical(const Polygon_2 &q) const { return this == &q; } Traits_P const &traits_member() const { return traits;} private: Container_P d_container; Traits_P traits; }; template bool operator==( const Polygon_2 &x, const Polygon_2 &y ); template inline bool operator!=(const Polygon_2 &x, const Polygon_2 &y); template Polygon_2 transform(const Transformation& t, const Polygon_2& p); template std::istream &operator>>(std::istream &is, Polygon_2& p); template std::ostream &operator<<(std::ostream &os, const Polygon_2& p); } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_impl.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2/Polygon_2_impl.h" namespace CGAL { namespace i_polygon { template class Equal_pred { Equal_2 m_equal_2; Point_2 m_pt; public: Equal_pred(Equal_2 equal_2, Point_2 const &pt) : m_equal_2(equal_2), m_pt(pt) {} bool operator()(Point_2 const &pt) const { return m_equal_2(m_pt, pt); } }; } template bool operator==( const Polygon_2 &x, const Polygon_2 &y ) { if (&x == &y) return true; typedef typename Traits_P::Equal_2 Equal_2; typedef typename Traits_P::Point_2 Point_2; if ((x.size() == 0) && (y.size() == 0)) return true; if (x.size() != y.size()) return false; Equal_2 equal_2 = x.traits_member().equal_2_object(); typename Polygon_2::Vertex_const_iterator x_iter = x.vertices_begin(); typename Polygon_2::Vertex_const_iterator y_iter = std::find_if(y.vertices_begin(), y.vertices_end(), i_polygon::Equal_pred(equal_2, *x.vertices_begin())); if (y_iter == y.vertices_end()) return false; ++x_iter; ++y_iter; while (y_iter != y.vertices_end()) { if (!equal_2(*x_iter, *y_iter)) return false; ++x_iter; ++y_iter; } y_iter = y.vertices_begin(); while (x_iter != x.vertices_end()) { if (!equal_2(*x_iter, *y_iter)) return false; ++x_iter; ++y_iter; } return true; } template std::istream & operator>>(std::istream &is, Polygon_2& p) { int n = 0; is >> n; typename Traits_P::Point_2 point; if (is) { p.erase(p.vertices_begin(),p.vertices_end()); for (int i=0; i> point; p.push_back(point); } } return is; } template std::ostream& operator<<(std::ostream &os, const Polygon_2& p) { typename Polygon_2::Vertex_const_iterator i; switch(os.iword(IO::mode)) { case IO::ASCII : os << p.size() << ' '; for (i = p.vertices_begin(); i != p.vertices_end(); ++i) { os << *i << ' '; } return os; case IO::BINARY : os << p.size(); for (i = p.vertices_begin(); i != p.vertices_end(); ++i) { os << *i; } return os; default: os << "Polygon_2(" << std::endl; for (i = p.vertices_begin(); i != p.vertices_end(); ++i) { os << " " << *i << std::endl; } os << ")" << std::endl; return os; } } template Polygon_2 transform(const Transformation& t, const Polygon_2& p) { typedef typename Polygon_2::Vertex_const_iterator VI; Polygon_2 result; for (VI i = p.vertices_begin(); i != p.vertices_end(); ++i) result.push_back(t(*i)); return result; } } # 392 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polygon_2.h" 2 namespace CGAL { template inline bool operator!=(const Polygon_2 &x, const Polygon_2 &y) { return !(x==y); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Weighted_point.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Weighted_point.h" # 1 "/localhome/glisse2/include/boost/mpl/logical.hpp" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Weighted_point.h" 2 # 1 "/localhome/glisse2/include/boost/utility.hpp" 1 # 13 "/localhome/glisse2/include/boost/utility.hpp" # 1 "/localhome/glisse2/include/boost/utility/base_from_member.hpp" 1 # 16 "/localhome/glisse2/include/boost/utility/base_from_member.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat_from_to.hpp" 1 # 23 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat_from_to.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 24 "/localhome/glisse2/include/boost/preprocessor/repetition/repeat_from_to.hpp" 2 # 17 "/localhome/glisse2/include/boost/utility/base_from_member.hpp" 2 # 53 "/localhome/glisse2/include/boost/utility/base_from_member.hpp" namespace boost { # 65 "/localhome/glisse2/include/boost/utility/base_from_member.hpp" template < typename MemberType, int UniqueID = 0 > class base_from_member { protected: MemberType member; base_from_member() : member() {} template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {} template < typename T0 , typename T1 > explicit base_from_member( T0 x0 , T1 x1 ) : member( x0 , x1 ) {} template < typename T0 , typename T1 , typename T2 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 ) : member( x0 , x1 , x2 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 ) : member( x0 , x1 , x2 , x3 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 ) : member( x0 , x1 , x2 , x3 , x4 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 ) : member( x0 , x1 , x2 , x3 , x4 , x5 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 , T9 x9 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 ) {} }; } # 14 "/localhome/glisse2/include/boost/utility.hpp" 2 # 1 "/localhome/glisse2/include/boost/utility/binary.hpp" 1 # 26 "/localhome/glisse2/include/boost/utility/binary.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/control/deduce_d.hpp" 1 # 16 "/localhome/glisse2/include/boost/preprocessor/control/deduce_d.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/control/deduce_d.hpp" 2 # 27 "/localhome/glisse2/include/boost/utility/binary.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/seq/cat.hpp" 1 # 18 "/localhome/glisse2/include/boost/preprocessor/seq/cat.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/seq/fold_left.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/seq/fold_left.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/detail/auto_rec.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/seq/fold_left.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/seq/seq.hpp" 1 # 16 "/localhome/glisse2/include/boost/preprocessor/seq/seq.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/seq/elem.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/seq/seq.hpp" 2 # 21 "/localhome/glisse2/include/boost/preprocessor/seq/fold_left.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/seq/size.hpp" 1 # 22 "/localhome/glisse2/include/boost/preprocessor/seq/fold_left.hpp" 2 # 19 "/localhome/glisse2/include/boost/preprocessor/seq/cat.hpp" 2 # 30 "/localhome/glisse2/include/boost/utility/binary.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/seq/transform.hpp" 1 # 31 "/localhome/glisse2/include/boost/utility/binary.hpp" 2 # 1 "/localhome/glisse2/include/boost/preprocessor/arithmetic/mod.hpp" 1 # 17 "/localhome/glisse2/include/boost/preprocessor/arithmetic/mod.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/arithmetic/detail/div_base.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/arithmetic/detail/div_base.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/comparison/less_equal.hpp" 1 # 19 "/localhome/glisse2/include/boost/preprocessor/comparison/less_equal.hpp" # 1 "/localhome/glisse2/include/boost/preprocessor/logical/not.hpp" 1 # 20 "/localhome/glisse2/include/boost/preprocessor/comparison/less_equal.hpp" 2 # 20 "/localhome/glisse2/include/boost/preprocessor/arithmetic/detail/div_base.hpp" 2 # 18 "/localhome/glisse2/include/boost/preprocessor/arithmetic/mod.hpp" 2 # 32 "/localhome/glisse2/include/boost/utility/binary.hpp" 2 # 15 "/localhome/glisse2/include/boost/utility.hpp" 2 # 1 "/localhome/glisse2/include/boost/checked_delete.hpp" 1 # 24 "/localhome/glisse2/include/boost/checked_delete.hpp" namespace boost { template inline void checked_delete(T * x) { typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; (void) sizeof(type_must_be_complete); delete x; } template inline void checked_array_delete(T * x) { typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; (void) sizeof(type_must_be_complete); delete [] x; } template struct checked_deleter { typedef void result_type; typedef T * argument_type; void operator()(T * x) const { boost::checked_delete(x); } }; template struct checked_array_deleter { typedef void result_type; typedef T * argument_type; void operator()(T * x) const { boost::checked_array_delete(x); } }; } # 17 "/localhome/glisse2/include/boost/utility.hpp" 2 # 1 "/localhome/glisse2/include/boost/noncopyable.hpp" 1 # 12 "/localhome/glisse2/include/boost/noncopyable.hpp" namespace boost { namespace noncopyable_ { class noncopyable { protected: noncopyable() {} ~noncopyable() {} private: noncopyable( const noncopyable& ); const noncopyable& operator=( const noncopyable& ); }; } typedef noncopyable_::noncopyable noncopyable; } # 19 "/localhome/glisse2/include/boost/utility.hpp" 2 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Weighted_point.h" 2 namespace CGAL { template < class Pt, class We > class Weighted_point : public Pt { typedef typename Kernel_traits::Kernel::FT FT; public: typedef We Weight; typedef Pt Point; Weighted_point () : Point(), _weight(0) {} Weighted_point (const Point &p) : Point(p), _weight(0) { } Weighted_point (const Point &p, const Weight &w) : Point(p), _weight(w) {} # 65 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Weighted_point.h" template < typename Tx, typename Ty > Weighted_point (const Tx &x, const Ty &y, typename boost::enable_if< boost::mpl::and_, boost::is_convertible, boost::mpl::bool_::value == 2> > >::type* = 0) : Point(x, y), _weight(0) {} template < typename Tx, typename Ty, typename Tz > Weighted_point (const Tx &x, const Ty &y, const Tz &z, typename boost::enable_if< boost::mpl::and_, boost::is_convertible, boost::is_convertible, boost::mpl::bool_::value == 3> > >::type* = 0) : Point(x, y, z), _weight(0) {} const Point & point() const { return *this; } const Weight & weight() const { return _weight; } # 103 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Weighted_point.h" private: Weight _weight; }; template < class Point, class Weight > std::ostream & operator<<(std::ostream &os, const Weighted_point &p) { switch(os.iword(IO::mode)) { case IO::ASCII : return os << p.point() << " " << p.weight(); case IO::BINARY : os << p.point(); write(os, p.weight()); return os; default: return os << "Weighted_point(" << p.point() << ", " << p.weight() << ")"; } } template < class Point, class Weight > std::istream & operator>>(std::istream &is, Weighted_point &wp) { Weight w; Point p; is >> p; if(is_ascii(is)) is >> w; else read(is, w); if (is) wp = Weighted_point(p,w); return is; } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tuple.h" 1 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tuple.h" namespace CGAL { namespace cpp0x { using std::tuple; using std::make_tuple; using std::tie; using std::get; using std::tuple_size; using std::tuple_element; # 70 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tuple.h" } template struct Is_in_tuple; template struct Is_in_tuple > { static const bool value = Is_in_tuple >::value; }; template struct Is_in_tuple > { static const bool value = true; }; template struct Is_in_tuple > { static const bool value = false; }; # 193 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/tuple.h" } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" 2 namespace CGAL { struct Emptyset_iterator : public std::iterator< std::output_iterator_tag, void, void, void, void > { template< class T > Emptyset_iterator& operator=(const T&) { return *this; } Emptyset_iterator& operator++() { return *this; } Emptyset_iterator& operator++(int) { return *this; } Emptyset_iterator& operator*() { return *this; } }; # 68 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" template < class Container > class Insert_iterator : public std::iterator< std::output_iterator_tag, void, void, void, void > { protected: Container *container; public: typedef Container container_type; explicit Insert_iterator(Container &c) : container(&c) {} Insert_iterator& operator=(typename Container::const_reference value) { container->insert(value); return *this; } Insert_iterator& operator*() { return *this; } Insert_iterator& operator++() { return *this; } Insert_iterator operator++(int) { return *this; } }; template < class Container > inline Insert_iterator inserter(Container &x) { return Insert_iterator(x); } # 109 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" template < class T > class Oneset_iterator : public std::iterator< std::bidirectional_iterator_tag, void, void, void, void > { T* t; public: typedef Oneset_iterator Self; public: Oneset_iterator(T& t) : t(&t) {} T& operator*() { return *t; } const T& operator*() const { return *t; } T* operator->() { return t; } const T* operator->() const { return t; } Self& operator++() { return *this; } Self& operator++(int) { return *this; } Self& operator--() { return *this; } Self& operator--(int) { return *this; } }; # 142 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" template < typename T > class Const_oneset_iterator { public: typedef std::random_access_iterator_tag iterator_category; typedef std::ptrdiff_t difference_type; typedef T value_type; typedef value_type* pointer; typedef value_type& reference; typedef Const_oneset_iterator Self; typedef difference_type Diff; typedef value_type Val; typedef pointer Ptr; typedef reference Ref; Const_oneset_iterator( const T& t = T(), Diff n = 0) : value( t), index( n) { } Ref operator * ( ) { return value; } const value_type& operator * ( ) const { return value; } Ptr operator -> ( ) { return &value; } const value_type* operator -> ( ) const { return &value; } bool operator == ( const Self& x) const { return ( index==x.index); } bool operator != ( const Self& x) const { return ( index!=x.index); } Self& operator ++ ( ) { ++index; return *this; } Self operator ++ ( int) { Self tmp = *this; ++index; return tmp; } Self& operator -- ( ) { --index; return *this; } Self operator -- ( int) { Self tmp = *this; --index; return tmp; } Ref operator [] ( Diff ) { return value;} const value_type& operator [] ( Diff ) const { return value;} bool operator < ( const Self& x) const { return ( index < x.index);} Self& operator += ( Diff n) { index += n; return *this; } Self& operator -= ( Diff n) { index -= n; return *this; } Self operator + ( Diff n) const { Self tmp = *this; return tmp+=n; } Self operator - ( Diff n) const { Self tmp = *this; return tmp-=n; } Diff operator - ( const Self& x) const { return index - x.index; } private: Val value; Diff index; }; # 217 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" class Counting_output_iterator : public std::iterator< std::output_iterator_tag, void, void, void, void > { std::size_t *c; public: Counting_output_iterator(std::size_t *cc) : c(cc) { *c = 0; } Counting_output_iterator& operator++() { return *this; } Counting_output_iterator& operator++(int) { return *this; } Counting_output_iterator& operator*() { return *this; } template void operator=(const T&) { ++*c; } std::size_t current_counter() const { return *c; } }; template < class I, class Val = typename std::iterator_traits::value_type > class Counting_iterator { protected: I nt; std::size_t d_i; public: typedef I Iterator; typedef Counting_iterator Self; typedef std::input_iterator_tag iterator_category; typedef Val value_type; typedef std::ptrdiff_t difference_type; typedef const value_type& reference; typedef const value_type* pointer; Counting_iterator( std::size_t i = 0) : d_i(i) {} Counting_iterator( Iterator j, std::size_t i = 0) : nt(j), d_i(i) {} Iterator current_iterator() const { return nt;} std::size_t current_counter() const { return d_i;} bool operator==( const Self& i) const { return ( d_i == i.d_i); } bool operator!=( const Self& i) const { return !(*this == i); } reference operator*() const { return *nt; } pointer operator->() const { return nt.operator->(); } Self& operator++() { ++nt; ++d_i; return *this; } Self operator++(int) { Self tmp = *this; ++*this; return tmp; } }; template < class I, int N, class Ref = typename std::iterator_traits::reference, class Ptr = typename std::iterator_traits::pointer, class Val = typename std::iterator_traits::value_type, class Dist = typename std::iterator_traits::difference_type, class Ctg = typename std::iterator_traits::iterator_category > class N_step_adaptor { protected: I nt; bool empty; public: typedef I Iterator; typedef N_step_adaptor Self; typedef std::iterator_traits ITI; typedef typename ITI::reference reference; typedef typename ITI::pointer pointer; typedef typename ITI::value_type value_type; typedef typename ITI::difference_type difference_type; typedef typename ITI::iterator_category iterator_category; typedef I_Circulator_size_traits C_S_Traits; typedef typename C_S_Traits::size_type size_type; N_step_adaptor(): empty(true) {} N_step_adaptor( Iterator j) : nt(j), empty(false) {} template N_step_adaptor( const N_step_adaptor& j) : nt( j.current_iterator()), empty(j.empty) {} typedef I Circulator; Circulator current_circulator() const { return nt;} Iterator current_iterator() const { return nt;} bool operator==( Nullptr_t p) const { (CGAL::possibly(p == 0)?(static_cast(0)): ::CGAL::assertion_fail( "p == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h", 321)); return empty; } bool operator!=( Nullptr_t p) const { return !(*this == p); } bool operator==( const Self& i) const { return (empty && i.empty) ||( nt == i.nt); } bool operator!=( const Self& i) const { return !(*this == i); } reference operator*() const { return *nt; } pointer operator->() const { return nt.operator->(); } Self& operator++() { std::advance( nt, N); return *this; } Self operator++(int) { Self tmp = *this; ++*this; return tmp; } Self& operator--() { std::advance( nt, -N); return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self min_circulator() const { return Self( nt.min_circulator()); } Self& operator+=( difference_type n) { nt += difference_type(N * n); return *this; } Self operator+( difference_type n) const { Self tmp = *this; tmp.nt += difference_type(N * n); return tmp; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& i) const { return (nt-i.nt)/N;} reference operator[]( difference_type n) const { Self tmp = *this; tmp += n; return tmp.operator*(); } bool operator<( const Self& i) const { return ( nt < i.nt); } bool operator>( const Self& i) const { return i < *this; } bool operator<=( const Self& i) const { return !(i < *this); } bool operator>=( const Self& i) const { return !(*this < i); } }; template < class I, int N, class Ref, class Ptr, class Val, class Dist, class Ctg > inline N_step_adaptor operator+(typename N_step_adaptor::difference_type n, N_step_adaptor i) { return i += n; } template < class I, int N> class N_step_adaptor_derived : public I { public: typedef I Iterator; typedef I Circulator; typedef N_step_adaptor_derived Self; typedef typename I::iterator_category iterator_category; typedef typename I::value_type value_type; typedef typename I::difference_type difference_type; typedef typename I::reference reference; typedef typename I::pointer pointer; typedef I_Circulator_size_traits C_S_Traits; typedef typename C_S_Traits::size_type size_type; N_step_adaptor_derived() {} N_step_adaptor_derived( Iterator j) : I(j) {} template N_step_adaptor_derived( const N_step_adaptor_derived& j) : I( j.current_iterator()) {} Circulator current_circulator() const { return *this;} Iterator current_iterator() const { return *this;} Self& operator++() { std::advance( (I&)*this, N); return *this; } Self operator++(int) { Self tmp = *this; ++*this; return tmp; } Self& operator--() { std::advance( (I&)*this, -N); return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self min_circulator() const { return Self( I::min_circulator()); } Self& operator+=( difference_type n) { I::operator+=( difference_type(N * n)); return *this; } Self operator+( difference_type n) const { Self tmp = *this; tmp += n; return tmp; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& i) const { return (I::operator-(i)) / N; } reference operator[]( difference_type n) const { Self tmp = *this; tmp += n; return tmp.operator*(); } }; template < class I, int N > inline N_step_adaptor_derived operator+( typename N_step_adaptor_derived::difference_type n, N_step_adaptor_derived i) { return i += n; } template < class I, class P > struct Filter_iterator; template < class I, class P > bool operator==(const Filter_iterator&, const Filter_iterator&); template < class I, class P > struct Filter_iterator { typedef I Iterator; typedef P Predicate; typedef Filter_iterator Self; typedef std::iterator_traits ITI; typedef typename ITI::reference reference; typedef typename ITI::pointer pointer; typedef typename ITI::value_type value_type; typedef typename ITI::difference_type difference_type; typedef typename ITI::iterator_category iterator_category; typedef I_Circulator_size_traits C_S_Traits; typedef typename C_S_Traits::size_type size_type; protected: Iterator e_; Iterator c_; Predicate p_; public: Filter_iterator() {} Filter_iterator(Iterator e, const Predicate& p) : e_(e), c_(e), p_(p) {} Filter_iterator(Iterator e, const Predicate& p, Iterator c) : e_(e), c_(c), p_(p) { while (c_ != e_ && p_(c_)) ++c_; } Self& operator++() { do { ++c_; } while (c_ != e_ && p_(c_)); return *this; } Self& operator--() { do { --c_; } while (p_(c_)); return *this; } Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } Self operator--(int) { Self tmp(*this); --(*this); return tmp; } reference operator*() const { return *c_; } pointer operator->() const { return &*c_; } const Predicate& predicate() const { return p_; } Iterator base() const { return c_; } bool is_end() const { return (c_ == e_); } friend bool operator== <>(const Self&, const Self&); }; template < class I, class P > inline Filter_iterator< I, P > filter_iterator(I e, const P& p) { return Filter_iterator< I, P >(e, p); } template < class I, class P > inline Filter_iterator< I, P > filter_iterator(I e, const P& p, I c) { return Filter_iterator< I, P >(e, p, c); } template < class I, class P > inline bool operator==(const Filter_iterator& it1, const Filter_iterator& it2) { (CGAL::possibly(it1.e_ == it2.e_)?(static_cast(0)): ::CGAL::precondition_fail( "it1.e_ == it2.e_" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h", 571)); return it1.base() == it2.base(); } template < class I, class P > inline bool operator!=(const Filter_iterator& it1, const Filter_iterator& it2) { return !(it1 == it2); } template class Join_input_iterator_1 : public std::iterator::iterator_category, typename Op::result_type, typename std::iterator_traits::difference_type, typename Op::result_type*, typename Op::result_type&> { public: typedef Join_input_iterator_1 Self; typedef typename Op::result_type value_type; typedef typename std::iterator_traits::difference_type difference_type; typedef value_type* pointer; typedef value_type& reference; protected: I1 i1; Op op; mutable value_type val; public: Join_input_iterator_1() {} Join_input_iterator_1(const Join_input_iterator_1& it) : i1(it.i1), op(it.op) {} Join_input_iterator_1(I1 i,const Op& o=Op()) : i1(i), op(o) {} I1 current_iterator1() const { return i1; } bool operator==(const Self& i) const { return i1 == i.i1; } bool operator!=(const Self& i) const { return !(*this == i); } bool operator< (const Self& i) const { return i1 < i.i1; } Join_input_iterator_1& operator=(const Join_input_iterator_1& it) { i1 = it.i1; op = it.op; return *this; } const value_type& operator*() const { val = op(*i1); return val; } Self& operator++( ) { ++i1; return *this; } Self operator++(int) { Self tmp = *this; ++(*this); return tmp; } Self& operator--( ) { --i1; return *this; } Self operator--(int) { Self tmp = *this; --(*this); return tmp; } const value_type& operator[](difference_type i) const { val = op(i1[i]); return val; } Self& operator+=(difference_type n) { i1 += n; return *this; } Self& operator-=(difference_type n) { i1 -= n; return *this; } Self operator+ (difference_type n) const { Self tmp = *this; return tmp += n; } Self operator- (difference_type n) const { Self tmp = *this; return tmp -= n; } difference_type operator-(const Self& i) const { return i1 - i.i1; } }; template class Join_input_iterator_2 : public std::iterator::iterator_category, typename Op::result_type, typename std::iterator_traits::difference_type, typename Op::result_type*, typename Op::result_type&> { public: typedef Join_input_iterator_2 Self; typedef typename Op::result_type value_type; typedef typename std::iterator_traits::difference_type difference_type; typedef value_type* pointer; typedef value_type& reference; protected: I1 i1; I2 i2; Op op; mutable value_type val; public: Join_input_iterator_2() {} Join_input_iterator_2(const Join_input_iterator_2& it) : i1(it.i1), i2(it.i2), op(it.op) {} Join_input_iterator_2(I1 i1,I2 i2,const Op& op=Op()) : i1(i1), i2(i2), op(op) {} I1 current_iterator1() const { return i1; } I2 current_iterator2() const { return i2; } bool operator==(const Self& i) const { return i1 == i.i1 && i2 == i.i2; } bool operator!=(const Self& i) const { return !(*this == i); } bool operator< (const Self& i) const { return i1 < i.i1 && i2 < i.i2; } Join_input_iterator_2& operator=(const Join_input_iterator_2& it) { i1 = it.i1; i2 = it.i2; op = it.op; return *this; } const value_type& operator*() const { val = op(*i1,*i2); return val; } Self& operator++( ) { ++i1; ++i2; return *this; } Self operator++(int) { Self tmp = *this; ++(*this); return tmp; } Self& operator--( ) { --i1; --i2; return *this; } Self operator--(int) { Self tmp = *this; --(*this); return tmp; } const value_type& operator[](difference_type i) const { val = op(i1[i],i2[i]); return val; } Self& operator+=(difference_type n) { i1 += n; i2 += n; return *this; } Self& operator-=(difference_type n) { i1 -= n; i2 -= n; return *this; } Self operator+ (difference_type n) const { Self tmp = *this; return tmp += n; } Self operator- (difference_type n) const { Self tmp = *this; return tmp -= n; } difference_type operator-(const Self& i) const { return i1 - i.i1; } }; template class Join_input_iterator_3 : public std::iterator::iterator_category, typename Op::result_type, typename std::iterator_traits::difference_type, typename Op::result_type*, typename Op::result_type&> { public: typedef Join_input_iterator_3 Self; typedef typename Op::result_type value_type; typedef typename std::iterator_traits::difference_type difference_type; typedef value_type* pointer; typedef value_type& reference; protected: I1 i1; I2 i2; I3 i3; Op op; mutable value_type val; public: Join_input_iterator_3() {} Join_input_iterator_3(const Join_input_iterator_3& it) : i1(it.i1), i2(it.i2), i3(it.i3), op(it.op) {} Join_input_iterator_3(I1 i1,I2 i2,I3 i3,const Op& op=Op()) : i1(i1), i2(i2), i3(i3), op(op) {} I1 current_iterator1() const { return i1; } I2 current_iterator2() const { return i2; } I2 current_iterator3() const { return i3; } bool operator==(const Self& i) const { return i1 == i.i1 && i2 == i.i2 && i3 == i.i3; } bool operator!=(const Self& i) const { return !(*this == i); } bool operator< (const Self& i) const { return i1 < i.i1 && i2 < i.i2 && i3 < i.i3; } Join_input_iterator_3& operator=(const Join_input_iterator_3& it) { i1 = it.i1; i2 = it.i1; i3 = it.i3; op = it.op; return *this; } const value_type& operator*() const { val = op(*i1,*i2,*i3); return val; } Self& operator++( ) { ++i1; ++i2; ++i3; return *this; } Self operator++(int) { Self tmp = *this; ++(*this); return tmp; } Self& operator--( ) { --i1; --i2; --i3; return *this; } Self operator--(int) { Self tmp = *this; --(*this); return tmp; } const value_type& operator[](difference_type i) const { val = op(i1[i],i2[i],i3[i]); return val; } Self& operator+=(difference_type n) { i1 += n; i2 += n; i3 += n; return *this; } Self& operator-=(difference_type n) { i1 -= n; i2 -= n; i3 -= n; return *this; } Self operator+ (difference_type n) const { Self tmp = *this; return tmp += n; } Self operator- (difference_type n) const { Self tmp = *this; return tmp -= n; } difference_type operator-(const Self& i) const { return i1 - i.i1; } }; template < class IC> class Inverse_index { # 878 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" protected: typedef std::map< const void*, std::size_t > Index; Index idx; IC start; typedef typename Index::iterator Index_iterator; typedef typename Index::const_iterator Index_const_iterator; typedef typename Index::value_type Item; protected: void ini_idx( IC i, const IC& j, std::input_iterator_tag); void ini_idx( const IC& i, const IC& j, std::forward_iterator_tag){ ini_idx( i, j, std::input_iterator_tag()); } void ini_idx(const IC& i,const IC& j, std::bidirectional_iterator_tag){ ini_idx( i, j, std::input_iterator_tag()); } void ini_idx( const IC& i, const IC& j, Forward_circulator_tag) { ini_idx( i, j, std::input_iterator_tag()); } void ini_idx( const IC& i, const IC& j, Bidirectional_circulator_tag){ ini_idx( i, j, std::input_iterator_tag()); } void ini_idx( const IC&, const IC&, std::random_access_iterator_tag){} void ini_idx( const IC&, const IC&, Random_access_circulator_tag){} public: void init_index( const IC& i, const IC& j) { typedef typename std::iterator_traits::iterator_category ICC; ini_idx( i, j, ICC()); } protected: void push_back( const IC& k, std::input_iterator_tag) { std::size_t d = idx.size(); idx[ &*k] = d; } void push_back( const IC& k, std::forward_iterator_tag){ push_back( k, std::input_iterator_tag()); } void push_back( const IC& k, std::bidirectional_iterator_tag){ push_back( k, std::input_iterator_tag()); } void push_back( const IC& k, Forward_circulator_tag){ push_back( k, std::input_iterator_tag()); } void push_back( const IC& k, Bidirectional_circulator_tag){ push_back( k, std::input_iterator_tag()); } void push_back( const IC&, std::random_access_iterator_tag){} void push_back( const IC&, Random_access_circulator_tag){} public: void push_back( const IC& k) { typedef typename std::iterator_traits::iterator_category ICC; push_back( k, ICC()); } std::size_t find( const IC& k, std::random_access_iterator_tag) const { return std::size_t(k - start); } std::size_t find( const IC& k, Random_access_circulator_tag) const { return std::size_t(k - start); } std::size_t find( const IC& k, std::input_iterator_tag) const { Index_const_iterator i = idx.find( &*k); (CGAL::possibly(i != idx.end())?(static_cast(0)): ::CGAL::assertion_fail( "i != idx.end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h", 945)); return (*i).second; } std::size_t find( const IC& k, std::forward_iterator_tag) const { return find( k, std::input_iterator_tag()); } std::size_t find( const IC& k, std::bidirectional_iterator_tag) const { return find( k, std::input_iterator_tag()); } std::size_t find( const IC& k, Forward_circulator_tag) const { return find( k, std::input_iterator_tag()); } std::size_t find( const IC& k, Bidirectional_circulator_tag) const { return find( k, std::input_iterator_tag()); } typedef IC iterator; typedef IC Circulator; typedef std::size_t size_type; Inverse_index() : start(IC()) {} Inverse_index( const IC& i) : start(i) {}; Inverse_index( const IC& i, const IC& j) : start(i) { init_index( i, j); } std::size_t operator[]( const IC& k) const { typedef typename std::iterator_traits::iterator_category category; return find( k, category()); } }; template < class IC> void Inverse_index< IC>::ini_idx( IC i, const IC& j, std::input_iterator_tag) { std::size_t n = 0; Index_iterator hint = idx.begin(); if ( ! is_empty_range( i, j)) { do { hint = idx.insert( hint, Item( &*i, n)); n++; } while ((++i) != (j)); } } template < class IC> class Random_access_adaptor { # 1013 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" protected: typedef std::vector< IC> Index; Index index; IC start; public: typedef typename Index::size_type size_type; void init_index( IC i, const IC& j, std::forward_iterator_tag); void init_index( const IC& i, const IC& j, std::bidirectional_iterator_tag){ init_index( i, j, std::forward_iterator_tag()); } void init_index( const IC& i, const IC&, std::random_access_iterator_tag){ start = i; } void init_index( const IC& i, const IC& j) { typedef typename std::iterator_traits::iterator_category ICC; init_index( i, j, ICC()); } void reserve( size_type r, std::forward_iterator_tag) { index.reserve( r); } void reserve( size_type r, std::bidirectional_iterator_tag){ reserve( r, std::forward_iterator_tag()); } void reserve( size_type, std::random_access_iterator_tag){} void push_back( const IC& k, std::forward_iterator_tag) { index.push_back(k); } void push_back( const IC& k, std::bidirectional_iterator_tag){ push_back( k, std::forward_iterator_tag()); } void push_back( const IC&, std::random_access_iterator_tag){} const IC& find( size_type n, std::forward_iterator_tag) const { (CGAL::possibly(n < index.size())?(static_cast(0)): ::CGAL::assertion_fail( "n < index.size()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h", 1056)); return index[n]; } const IC& find( size_type n, std::bidirectional_iterator_tag) const { return find( n, std::forward_iterator_tag()); } IC find( size_type n, std::random_access_iterator_tag) const { return start + n; } typedef IC iterator; typedef IC Circulator; Random_access_adaptor() : start(IC()) {} Random_access_adaptor( const IC& i) : start(i) {} Random_access_adaptor( const IC& i, const IC& j) : start(i) { init_index( i, j); } void reserve( size_type r) { typedef typename std::iterator_traits::iterator_category ICC; reserve( r, ICC()); } IC find( size_type n) const { typedef typename std::iterator_traits::iterator_category ICC; return find( n, ICC()); } IC operator[]( size_type n) const { return find(n); } void push_back( const IC& k) { typedef typename std::iterator_traits::iterator_category ICC; push_back( k, ICC()); } }; template < class IC> void Random_access_adaptor< IC>::init_index( IC i, const IC& j, std::forward_iterator_tag) { if ( ! is_empty_range( i, j)) { do { index.push_back( i); } while ((++i) != (j)); } } template < class IC, class T > class Random_access_value_adaptor : public Random_access_adaptor { public: typedef typename Random_access_adaptor::size_type size_type; Random_access_value_adaptor() {} Random_access_value_adaptor( const IC& i) : Random_access_adaptor(i) {} Random_access_value_adaptor( const IC& i, const IC& j) : Random_access_adaptor(i,j) {} T& operator[]( size_type n) const { return *(Random_access_adaptor::operator[](n)); } }; template class Filter_output_iterator : public std::iterator { protected: _Iterator iterator; Predicate predicate; public: typedef _Iterator iterator_type; explicit Filter_output_iterator(_Iterator& __x, const Predicate& pred) : iterator(__x), predicate(pred) {} template Filter_output_iterator& operator=(const T& t) { if(! predicate(t)) *iterator = t; return *this; } Filter_output_iterator& operator*() { return *this; } Filter_output_iterator& operator++() { ++iterator; return *this; } Filter_output_iterator operator++(int) { Filter_output_iterator res(*this); ++iterator; return res; } }; template < class I, class P > inline Filter_output_iterator< I, P > filter_output_iterator(I e, const P& p) { return Filter_output_iterator< I, P >(e, p); } namespace internal { template < typename D, typename V = cpp0x::tuple<>, typename O = cpp0x::tuple<> > struct Derivator { typedef Derivator Self; Self& operator=(const Self&) = delete; }; template < typename D, typename V1, typename O1, typename... V, typename... O> struct Derivator, cpp0x::tuple > : public Derivator, cpp0x::tuple > { typedef Derivator, cpp0x::tuple > Self; typedef Derivator, cpp0x::tuple > Base; Self& operator=(const Self&) = delete; using Base::operator=; D& operator=(const V1& v) { * cpp0x::get< D::size - sizeof...(V) - 1 >(static_cast(static_cast(*this))) ++ = v; return static_cast(*this); } }; } template < typename V, typename O > class Dispatch_output_iterator; template < typename... V, typename... O > class Dispatch_output_iterator < cpp0x::tuple, cpp0x::tuple > : private internal::Derivator, cpp0x::tuple >, cpp0x::tuple, cpp0x::tuple > , public cpp0x::tuple { static_assert(sizeof...(V) == sizeof...(O), "The number of explicit template parameters has to match the number of arguments") ; static const int size = sizeof...(V); template friend class internal::Derivator; public: typedef cpp0x::tuple Iterator_tuple; typedef cpp0x::tuple Value_type_tuple; typedef std::output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; private: typedef Dispatch_output_iterator Self; typedef internal::Derivator Base; public: using Base::operator=; Dispatch_output_iterator(O... o) : cpp0x::tuple(o...) {} Self& operator=(const Self& s) { static_cast(*this) = static_cast(s); return *this; } Self& operator++() { return *this; } Self& operator++(int) { return *this; } Self& operator*() { return *this; } const Iterator_tuple& get_iterator_tuple() const { return *this; } }; template < typename... V, typename... O> Dispatch_output_iterator, cpp0x::tuple > dispatch_output(O... o) { return Dispatch_output_iterator, cpp0x::tuple > (o...); } template < typename V, typename O > class Dispatch_or_drop_output_iterator; template < typename... V, typename... O > class Dispatch_or_drop_output_iterator < cpp0x::tuple, cpp0x::tuple > : public Dispatch_output_iterator< cpp0x::tuple, cpp0x::tuple > { typedef Dispatch_or_drop_output_iterator Self; typedef Dispatch_output_iterator< cpp0x::tuple, cpp0x::tuple > Base; template friend class internal::Derivator; public: Dispatch_or_drop_output_iterator(O... o) : Base(o...) {} using Base::operator=; Self& operator*() { return *this; } Self& operator++() { return *this; } Self& operator++(int) { return *this; } template Self& operator=(const T&) { return *this; } }; template < typename... V, typename... O> inline Dispatch_or_drop_output_iterator, cpp0x::tuple > dispatch_or_drop_output(O... o) { return Dispatch_or_drop_output_iterator, cpp0x::tuple >(o...); } # 2234 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/iterator.h" } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iterator_project.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iterator_project.h" namespace CGAL { # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Iterator_project.h" template struct I_TYPE_MATCH_IF { typedef R2 Result; }; template struct I_TYPE_MATCH_IF { typedef R1 Result; }; template < class I, class Fct, class D1 = int, class D2 = int, class D3 = int, class D4 = int > class Iterator_project { protected: I nt; public: typedef Iterator_project Self; typedef I Iterator; typedef std::iterator_traits traits; typedef typename traits::difference_type difference_type; typedef typename traits::iterator_category iterator_category; typedef typename traits::value_type base_value_type; typedef typename traits::pointer base_pointer; typedef typename traits::reference base_reference; typedef typename Fct::argument_type argument_type; typedef typename Fct::result_type value_type; typedef I_TYPE_MATCH_IF< base_reference, const base_value_type &, const value_type &, value_type &> Match1; typedef typename Match1::Result reference; typedef I_TYPE_MATCH_IF< base_pointer, const base_value_type *, const value_type *, value_type *> Match2; typedef typename Match2::Result pointer; Iterator_project() {} Iterator_project( I j) : nt(j) {} template Iterator_project( const Iterator_project& i2) : nt( i2.current_iterator()) {} template Self& operator= ( const Iterator_project& i2) { nt = i2.current_iterator(); return *this; } Iterator current_iterator() const { return nt;} pointer ptr() const { Fct fct; return &(fct(*nt)); } bool operator==( const Self& i) const { return ( nt == i.nt); } bool operator!=( const Self& i) const { return !(*this == i); } reference operator* () const { return *ptr(); } pointer operator->() const { return ptr(); } Self& operator++() { ++nt; return *this; } Self operator++(int) { Self tmp = *this; ++*this; return tmp; } Self& operator--() { --nt; return *this; } Self operator--(int) { Self tmp = *this; --*this; return tmp; } Self& operator+=( difference_type n) { nt += n; return *this; } Self operator+( difference_type n) const { Self tmp = *this; return tmp += n; } Self& operator-=( difference_type n) { return operator+=( -n); } Self operator-( difference_type n) const { Self tmp = *this; return tmp += -n; } difference_type operator-( const Self& i) const { return nt - i.nt; } reference operator[]( difference_type n) const { Self tmp = *this; tmp += n; return tmp.operator*(); } bool operator< ( const Self& i) const { return ( nt < i.nt); } bool operator> ( const Self& i) const { return i < *this; } bool operator<=( const Self& i) const { return !(i < *this); } bool operator>=( const Self& i) const { return !(*this < i); } }; template < class Dist, class Fct, class I, class D1, class D2, class D3, class D4> inline Iterator_project operator+( Dist n, Iterator_project i) { return i += n; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 2 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_utils_2.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_utils_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 2 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_utils_2.h" 2 namespace CGAL { template < class T = void > struct Triangulation_cw_ccw_static_2 { static const int ccw_map[3]; static const int cw_map[3]; }; template < class T > const int Triangulation_cw_ccw_static_2::ccw_map[3] = {1, 2, 0}; template < class T > const int Triangulation_cw_ccw_static_2::cw_map[3] = {2, 0, 1}; class Triangulation_cw_ccw_2 : public Triangulation_cw_ccw_static_2<> { public: static int ccw(const int i) { (CGAL::possibly(i >= 0 && i < 3)?(static_cast(0)): ::CGAL::precondition_fail( "i >= 0 && i < 3" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_utils_2.h", 46)); return ccw_map[i]; } static int cw(const int i) { (CGAL::possibly(i >= 0 && i < 3)?(static_cast(0)): ::CGAL::precondition_fail( "i >= 0 && i < 3" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_utils_2.h", 52)); return cw_map[i]; } }; } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stack" 1 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stack" 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stack" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/deque" 1 3 # 59 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/deque" 3 # 60 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/deque" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 1 3 # 67 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 89 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 inline size_t __deque_buf_size(size_t __size) { return (__size < 512 ? size_t(512 / __size) : size_t(1)); } # 106 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template struct _Deque_iterator { typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); } typedef std::random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef _Ptr pointer; typedef _Ref reference; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp** _Map_pointer; typedef _Deque_iterator _Self; _Tp* _M_cur; _Tp* _M_first; _Tp* _M_last; _Map_pointer _M_node; _Deque_iterator(_Tp* __x, _Map_pointer __y) : _M_cur(__x), _M_first(*__y), _M_last(*__y + _S_buffer_size()), _M_node(__y) { } _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { } _Deque_iterator(const iterator& __x) : _M_cur(__x._M_cur), _M_first(__x._M_first), _M_last(__x._M_last), _M_node(__x._M_node) { } reference operator*() const { return *_M_cur; } pointer operator->() const { return _M_cur; } _Self& operator++() { ++_M_cur; if (_M_cur == _M_last) { _M_set_node(_M_node + 1); _M_cur = _M_first; } return *this; } _Self operator++(int) { _Self __tmp = *this; ++*this; return __tmp; } _Self& operator--() { if (_M_cur == _M_first) { _M_set_node(_M_node - 1); _M_cur = _M_last; } --_M_cur; return *this; } _Self operator--(int) { _Self __tmp = *this; --*this; return __tmp; } _Self& operator+=(difference_type __n) { const difference_type __offset = __n + (_M_cur - _M_first); if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) _M_cur += __n; else { const difference_type __node_offset = __offset > 0 ? __offset / difference_type(_S_buffer_size()) : -difference_type((-__offset - 1) / _S_buffer_size()) - 1; _M_set_node(_M_node + __node_offset); _M_cur = _M_first + (__offset - __node_offset * difference_type(_S_buffer_size())); } return *this; } _Self operator+(difference_type __n) const { _Self __tmp = *this; return __tmp += __n; } _Self& operator-=(difference_type __n) { return *this += -__n; } _Self operator-(difference_type __n) const { _Self __tmp = *this; return __tmp -= __n; } reference operator[](difference_type __n) const { return *(*this + __n); } void _M_set_node(_Map_pointer __new_node) { _M_node = __new_node; _M_first = *__new_node; _M_last = _M_first + difference_type(_S_buffer_size()); } }; template inline bool operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return __x._M_cur == __y._M_cur; } template inline bool operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return __x._M_cur == __y._M_cur; } template inline bool operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return !(__x == __y); } template inline bool operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return !(__x == __y); } template inline bool operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); } template inline bool operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node); } template inline bool operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return __y < __x; } template inline bool operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return __y < __x; } template inline bool operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return !(__y < __x); } template inline bool operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return !(__y < __x); } template inline bool operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return !(__x < __y); } template inline bool operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return !(__x < __y); } template inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) { return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } template inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) { return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + (__y._M_last - __y._M_cur); } template inline _Deque_iterator<_Tp, _Ref, _Ptr> operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) { return __x + __n; } template void fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&); template _Deque_iterator<_Tp, _Tp&, _Tp*> copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template inline _Deque_iterator<_Tp, _Tp&, _Tp*> copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } template _Deque_iterator<_Tp, _Tp&, _Tp*> copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template inline _Deque_iterator<_Tp, _Tp&, _Tp*> copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } template _Deque_iterator<_Tp, _Tp&, _Tp*> move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template inline _Deque_iterator<_Tp, _Tp&, _Tp*> move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::move(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } template _Deque_iterator<_Tp, _Tp&, _Tp*> move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, const _Tp&, const _Tp*>, _Deque_iterator<_Tp, _Tp&, _Tp*>); template inline _Deque_iterator<_Tp, _Tp&, _Tp*> move_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, _Deque_iterator<_Tp, _Tp&, _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { return std::move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), __result); } # 439 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template class _Deque_base { public: typedef _Alloc allocator_type; allocator_type get_allocator() const noexcept { return allocator_type(_M_get_Tp_allocator()); } typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; _Deque_base() : _M_impl() { _M_initialize_map(0); } _Deque_base(size_t __num_elements) : _M_impl() { _M_initialize_map(__num_elements); } _Deque_base(const allocator_type& __a, size_t __num_elements) : _M_impl(__a) { _M_initialize_map(__num_elements); } _Deque_base(const allocator_type& __a) : _M_impl(__a) { } _Deque_base(_Deque_base&& __x) : _M_impl(std::move(__x._M_get_Tp_allocator())) { _M_initialize_map(0); if (__x._M_impl._M_map) { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_map, __x._M_impl._M_map); std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size); } } ~_Deque_base(); protected: typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type; typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _Deque_impl : public _Tp_alloc_type { _Tp** _M_map; size_t _M_map_size; iterator _M_start; iterator _M_finish; _Deque_impl() : _Tp_alloc_type(), _M_map(0), _M_map_size(0), _M_start(), _M_finish() { } _Deque_impl(const _Tp_alloc_type& __a) : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0), _M_start(), _M_finish() { } _Deque_impl(_Tp_alloc_type&& __a) : _Tp_alloc_type(std::move(__a)), _M_map(0), _M_map_size(0), _M_start(), _M_finish() { } }; _Tp_alloc_type& _M_get_Tp_allocator() noexcept { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } const _Tp_alloc_type& _M_get_Tp_allocator() const noexcept { return *static_cast(&this->_M_impl); } _Map_alloc_type _M_get_map_allocator() const noexcept { return _Map_alloc_type(_M_get_Tp_allocator()); } _Tp* _M_allocate_node() { return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp))); } void _M_deallocate_node(_Tp* __p) { _M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp))); } _Tp** _M_allocate_map(size_t __n) { return _M_get_map_allocator().allocate(__n); } void _M_deallocate_map(_Tp** __p, size_t __n) { _M_get_map_allocator().deallocate(__p, __n); } protected: void _M_initialize_map(size_t); void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish); void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish); enum { _S_initial_map_size = 8 }; _Deque_impl _M_impl; }; template _Deque_base<_Tp, _Alloc>:: ~_Deque_base() { if (this->_M_impl._M_map) { _M_destroy_nodes(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1); _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); } } # 580 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template void _Deque_base<_Tp, _Alloc>:: _M_initialize_map(size_t __num_elements) { const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp)) + 1); this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, size_t(__num_nodes + 2)); this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); _Tp** __nstart = (this->_M_impl._M_map + (this->_M_impl._M_map_size - __num_nodes) / 2); _Tp** __nfinish = __nstart + __num_nodes; try { _M_create_nodes(__nstart, __nfinish); } catch(...) { _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = 0; this->_M_impl._M_map_size = 0; throw; } this->_M_impl._M_start._M_set_node(__nstart); this->_M_impl._M_finish._M_set_node(__nfinish - 1); this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first + __num_elements % __deque_buf_size(sizeof(_Tp))); } template void _Deque_base<_Tp, _Alloc>:: _M_create_nodes(_Tp** __nstart, _Tp** __nfinish) { _Tp** __cur; try { for (__cur = __nstart; __cur < __nfinish; ++__cur) *__cur = this->_M_allocate_node(); } catch(...) { _M_destroy_nodes(__nstart, __cur); throw; } } template void _Deque_base<_Tp, _Alloc>:: _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish) { for (_Tp** __n = __nstart; __n < __nfinish; ++__n) _M_deallocate_node(*__n); } # 727 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template > class deque : protected _Deque_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; typedef _Deque_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: typedef _Tp value_type; typedef typename _Tp_alloc_type::pointer pointer; typedef typename _Tp_alloc_type::const_pointer const_pointer; typedef typename _Tp_alloc_type::reference reference; typedef typename _Tp_alloc_type::const_reference const_reference; typedef typename _Base::iterator iterator; typedef typename _Base::const_iterator const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Alloc allocator_type; protected: typedef pointer* _Map_pointer; static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); } using _Base::_M_initialize_map; using _Base::_M_create_nodes; using _Base::_M_destroy_nodes; using _Base::_M_allocate_node; using _Base::_M_deallocate_node; using _Base::_M_allocate_map; using _Base::_M_deallocate_map; using _Base::_M_get_Tp_allocator; using _Base::_M_impl; public: deque() : _Base() { } explicit deque(const allocator_type& __a) : _Base(__a, 0) { } # 799 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 explicit deque(size_type __n) : _Base(__n) { _M_default_initialize(); } # 812 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 deque(size_type __n, const value_type& __value, const allocator_type& __a = allocator_type()) : _Base(__a, __n) { _M_fill_initialize(__value); } # 839 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 deque(const deque& __x) : _Base(__x._M_get_Tp_allocator(), __x.size()) { std::__uninitialized_copy_a(__x.begin(), __x.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); } # 853 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 deque(deque&& __x) : _Base(std::move(__x)) { } # 867 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 deque(initializer_list __l, const allocator_type& __a = allocator_type()) : _Base(__a) { _M_range_initialize(__l.begin(), __l.end(), random_access_iterator_tag()); } # 891 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template deque(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) : _Base(__a) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } ~deque() noexcept { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } # 916 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 deque& operator=(const deque& __x); # 927 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 deque& operator=(deque&& __x) { this->clear(); this->swap(__x); return *this; } # 948 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 deque& operator=(initializer_list __l) { this->assign(__l.begin(), __l.end()); return *this; } # 966 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } # 982 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template void assign(_InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } # 1002 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void assign(initializer_list __l) { this->assign(__l.begin(), __l.end()); } allocator_type get_allocator() const noexcept { return _Base::get_allocator(); } iterator begin() noexcept { return this->_M_impl._M_start; } const_iterator begin() const noexcept { return this->_M_impl._M_start; } iterator end() noexcept { return this->_M_impl._M_finish; } const_iterator end() const noexcept { return this->_M_impl._M_finish; } reverse_iterator rbegin() noexcept { return reverse_iterator(this->_M_impl._M_finish); } const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(this->_M_impl._M_finish); } reverse_iterator rend() noexcept { return reverse_iterator(this->_M_impl._M_start); } const_reverse_iterator rend() const noexcept { return const_reverse_iterator(this->_M_impl._M_start); } const_iterator cbegin() const noexcept { return this->_M_impl._M_start; } const_iterator cend() const noexcept { return this->_M_impl._M_finish; } const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(this->_M_impl._M_finish); } const_reverse_iterator crend() const noexcept { return const_reverse_iterator(this->_M_impl._M_start); } size_type size() const noexcept { return this->_M_impl._M_finish - this->_M_impl._M_start; } size_type max_size() const noexcept { return _M_get_Tp_allocator().max_size(); } # 1141 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void resize(size_type __new_size) { const size_type __len = size(); if (__new_size > __len) _M_default_append(__new_size - __len); else if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); } # 1163 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void resize(size_type __new_size, const value_type& __x) { const size_type __len = size(); if (__new_size > __len) insert(this->_M_impl._M_finish, __new_size - __len, __x); else if (__new_size < __len) _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); } # 1199 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void shrink_to_fit() { _M_shrink_to_fit(); } bool empty() const noexcept { return this->_M_impl._M_finish == this->_M_impl._M_start; } # 1224 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 reference operator[](size_type __n) { return this->_M_impl._M_start[difference_type(__n)]; } # 1239 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 const_reference operator[](size_type __n) const { return this->_M_impl._M_start[difference_type(__n)]; } protected: void _M_range_check(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("deque::_M_range_check")); } public: # 1264 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; } # 1282 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; } reference front() { return *begin(); } const_reference front() const { return *begin(); } reference back() { iterator __tmp = end(); --__tmp; return *__tmp; } const_reference back() const { const_iterator __tmp = end(); --__tmp; return *__tmp; } # 1339 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void push_front(const value_type& __x) { if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) { this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x); --this->_M_impl._M_start._M_cur; } else _M_push_front_aux(__x); } void push_front(value_type&& __x) { emplace_front(std::move(__x)); } template void emplace_front(_Args&&... __args); # 1370 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void push_back(const value_type& __x) { if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_last - 1) { this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x); ++this->_M_impl._M_finish._M_cur; } else _M_push_back_aux(__x); } void push_back(value_type&& __x) { emplace_back(std::move(__x)); } template void emplace_back(_Args&&... __args); # 1401 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void pop_front() { if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_last - 1) { this->_M_impl.destroy(this->_M_impl._M_start._M_cur); ++this->_M_impl._M_start._M_cur; } else _M_pop_front_aux(); } # 1422 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void pop_back() { if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_first) { --this->_M_impl._M_finish._M_cur; this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); } else _M_pop_back_aux(); } # 1445 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template iterator emplace(iterator __position, _Args&&... __args); # 1459 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 iterator insert(iterator __position, const value_type& __x); # 1472 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 iterator insert(iterator __position, value_type&& __x) { return emplace(__position, std::move(__x)); } # 1485 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void insert(iterator __p, initializer_list __l) { this->insert(__p, __l.begin(), __l.end()); } # 1499 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void insert(iterator __position, size_type __n, const value_type& __x) { _M_fill_insert(__position, __n, __x); } # 1513 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template void insert(iterator __position, _InputIterator __first, _InputIterator __last) { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_insert_dispatch(__position, __first, __last, _Integral()); } # 1536 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 iterator erase(iterator __position); # 1555 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 iterator erase(iterator __first, iterator __last); # 1567 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void swap(deque& __x) { std::swap(this->_M_impl._M_start, __x._M_impl._M_start); std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); std::swap(this->_M_impl._M_map, __x._M_impl._M_map); std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size); std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), __x._M_get_Tp_allocator()); } void clear() noexcept { _M_erase_at_end(begin()); } protected: template void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) { _M_initialize_map(static_cast(__n)); _M_fill_initialize(__x); } template void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_initialize(__first, __last, _IterCategory()); } # 1629 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); # 1651 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void _M_fill_initialize(const value_type& __value); void _M_default_initialize(); # 1667 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) { _M_fill_assign(__n, __val); } template void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_assign_aux(__first, __last, _IterCategory()); } template void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __len = std::distance(__first, __last); if (__len > size()) { _ForwardIterator __mid = __first; std::advance(__mid, size()); std::copy(__first, __mid, begin()); insert(end(), __mid, __last); } else _M_erase_at_end(std::copy(__first, __last, begin())); } void _M_fill_assign(size_type __n, const value_type& __val) { if (__n > size()) { std::fill(begin(), end(), __val); insert(end(), __n - size(), __val); } else { _M_erase_at_end(begin() + difference_type(__n)); std::fill(begin(), end(), __val); } } # 1731 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template void _M_push_back_aux(_Args&&... __args); template void _M_push_front_aux(_Args&&... __args); void _M_pop_back_aux(); void _M_pop_front_aux(); # 1750 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type) { _M_fill_insert(__pos, __n, __x); } template void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type) { typedef typename std::iterator_traits<_InputIterator>:: iterator_category _IterCategory; _M_range_insert_aux(__pos, __first, __last, _IterCategory()); } template void _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag); template void _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag); void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); template iterator _M_insert_aux(iterator __pos, _Args&&... __args); void _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); template void _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n); void _M_destroy_data_aux(iterator __first, iterator __last); template void _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) { _M_destroy_data_aux(__first, __last); } void _M_destroy_data(iterator __first, iterator __last, const std::allocator<_Tp>&) { if (!__has_trivial_destructor(value_type)) _M_destroy_data_aux(__first, __last); } void _M_erase_at_begin(iterator __pos) { _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); this->_M_impl._M_start = __pos; } void _M_erase_at_end(iterator __pos) { _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); _M_destroy_nodes(__pos._M_node + 1, this->_M_impl._M_finish._M_node + 1); this->_M_impl._M_finish = __pos; } void _M_default_append(size_type __n); bool _M_shrink_to_fit(); iterator _M_reserve_elements_at_front(size_type __n) { const size_type __vacancies = this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first; if (__n > __vacancies) _M_new_elements_at_front(__n - __vacancies); return this->_M_impl._M_start - difference_type(__n); } iterator _M_reserve_elements_at_back(size_type __n) { const size_type __vacancies = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur) - 1; if (__n > __vacancies) _M_new_elements_at_back(__n - __vacancies); return this->_M_impl._M_finish + difference_type(__n); } void _M_new_elements_at_front(size_type __new_elements); void _M_new_elements_at_back(size_type __new_elements); # 1895 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 void _M_reserve_map_at_back(size_type __nodes_to_add = 1) { if (__nodes_to_add + 1 > this->_M_impl._M_map_size - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) _M_reallocate_map(__nodes_to_add, false); } void _M_reserve_map_at_front(size_type __nodes_to_add = 1) { if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node - this->_M_impl._M_map)) _M_reallocate_map(__nodes_to_add, true); } void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); }; # 1927 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template inline bool operator==(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return __x.size() == __y.size() && std::equal(__x.begin(), __x.end(), __y.begin()); } # 1945 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_deque.h" 3 template inline bool operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end()); } template inline bool operator!=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__x == __y); } template inline bool operator>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return __y < __x; } template inline bool operator<=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__y < __x); } template inline bool operator>=(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y) { return !(__x < __y); } template inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) { __x.swap(__y); } } # 66 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/deque" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/deque.tcc" 1 3 # 61 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/deque.tcc" 3 namespace std __attribute__ ((__visibility__ ("default"))) { template void deque<_Tp, _Alloc>:: _M_default_initialize() { _Map_pointer __cur; try { for (__cur = this->_M_impl._M_start._M_node; __cur < this->_M_impl._M_finish._M_node; ++__cur) std::__uninitialized_default_a(*__cur, *__cur + _S_buffer_size(), _M_get_Tp_allocator()); std::__uninitialized_default_a(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), _M_get_Tp_allocator()); throw; } } template deque<_Tp, _Alloc>& deque<_Tp, _Alloc>:: operator=(const deque& __x) { const size_type __len = size(); if (&__x != this) { if (__len >= __x.size()) _M_erase_at_end(std::copy(__x.begin(), __x.end(), this->_M_impl._M_start)); else { const_iterator __mid = __x.begin() + difference_type(__len); std::copy(__x.begin(), __mid, this->_M_impl._M_start); insert(this->_M_impl._M_finish, __mid, __x.end()); } } return *this; } template template void deque<_Tp, _Alloc>:: emplace_front(_Args&&... __args) { if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) { this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, std::forward<_Args>(__args)...); --this->_M_impl._M_start._M_cur; } else _M_push_front_aux(std::forward<_Args>(__args)...); } template template void deque<_Tp, _Alloc>:: emplace_back(_Args&&... __args) { if (this->_M_impl._M_finish._M_cur != this->_M_impl._M_finish._M_last - 1) { this->_M_impl.construct(this->_M_impl._M_finish._M_cur, std::forward<_Args>(__args)...); ++this->_M_impl._M_finish._M_cur; } else _M_push_back_aux(std::forward<_Args>(__args)...); } template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: insert(iterator __position, const value_type& __x) { if (__position._M_cur == this->_M_impl._M_start._M_cur) { push_front(__x); return this->_M_impl._M_start; } else if (__position._M_cur == this->_M_impl._M_finish._M_cur) { push_back(__x); iterator __tmp = this->_M_impl._M_finish; --__tmp; return __tmp; } else return _M_insert_aux(__position, __x); } template template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: emplace(iterator __position, _Args&&... __args) { if (__position._M_cur == this->_M_impl._M_start._M_cur) { push_front(std::forward<_Args>(__args)...); return this->_M_impl._M_start; } else if (__position._M_cur == this->_M_impl._M_finish._M_cur) { push_back(std::forward<_Args>(__args)...); iterator __tmp = this->_M_impl._M_finish; --__tmp; return __tmp; } else return _M_insert_aux(__position, std::forward<_Args>(__args)...); } template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: erase(iterator __position) { iterator __next = __position; ++__next; const difference_type __index = __position - begin(); if (static_cast(__index) < (size() >> 1)) { if (__position != begin()) std::move_backward(begin(), __position, __next); pop_front(); } else { if (__next != end()) std::move(__next, end(), __position); pop_back(); } return begin() + __index; } template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: erase(iterator __first, iterator __last) { if (__first == __last) return __first; else if (__first == begin() && __last == end()) { clear(); return end(); } else { const difference_type __n = __last - __first; const difference_type __elems_before = __first - begin(); if (static_cast(__elems_before) <= (size() - __n) / 2) { if (__first != begin()) std::move_backward(begin(), __first, __last); _M_erase_at_begin(begin() + __n); } else { if (__last != end()) std::move(__last, end(), __first); _M_erase_at_end(end() - __n); } return begin() + __elems_before; } } template template void deque<_Tp, _Alloc>:: _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { iterator __cur = begin(); for (; __first != __last && __cur != end(); ++__cur, ++__first) *__cur = *__first; if (__first == __last) _M_erase_at_end(__cur); else insert(end(), __first, __last); } template void deque<_Tp, _Alloc>:: _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) { if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); try { std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, __x, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); try { std::__uninitialized_fill_a(this->_M_impl._M_finish, __new_finish, __x, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } else _M_insert_aux(__pos, __n, __x); } template void deque<_Tp, _Alloc>:: _M_default_append(size_type __n) { if (__n) { iterator __new_finish = _M_reserve_elements_at_back(__n); try { std::__uninitialized_default_a(this->_M_impl._M_finish, __new_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } } template bool deque<_Tp, _Alloc>:: _M_shrink_to_fit() { const difference_type __front_capacity = (this->_M_impl._M_start._M_cur - this->_M_impl._M_start._M_first); if (__front_capacity == 0) return false; const difference_type __back_capacity = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); if (__front_capacity + __back_capacity < _S_buffer_size()) return false; return std::__shrink_to_fit_aux::_S_do_it(*this); } template void deque<_Tp, _Alloc>:: _M_fill_initialize(const value_type& __value) { _Map_pointer __cur; try { for (__cur = this->_M_impl._M_start._M_node; __cur < this->_M_impl._M_finish._M_node; ++__cur) std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), __value, _M_get_Tp_allocator()); std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, this->_M_impl._M_finish._M_cur, __value, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), _M_get_Tp_allocator()); throw; } } template template void deque<_Tp, _Alloc>:: _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag) { this->_M_initialize_map(0); try { for (; __first != __last; ++__first) push_back(*__first); } catch(...) { clear(); throw; } } template template void deque<_Tp, _Alloc>:: _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); this->_M_initialize_map(__n); _Map_pointer __cur_node; try { for (__cur_node = this->_M_impl._M_start._M_node; __cur_node < this->_M_impl._M_finish._M_node; ++__cur_node) { _ForwardIterator __mid = __first; std::advance(__mid, _S_buffer_size()); std::__uninitialized_copy_a(__first, __mid, *__cur_node, _M_get_Tp_allocator()); __first = __mid; } std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish._M_first, _M_get_Tp_allocator()); } catch(...) { std::_Destroy(this->_M_impl._M_start, iterator(*__cur_node, __cur_node), _M_get_Tp_allocator()); throw; } } template template void deque<_Tp, _Alloc>:: _M_push_back_aux(_Args&&... __args) { _M_reserve_map_at_back(); *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); try { this->_M_impl.construct(this->_M_impl._M_finish._M_cur, std::forward<_Args>(__args)...); this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node + 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; } catch(...) { _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); throw; } } template template void deque<_Tp, _Alloc>:: _M_push_front_aux(_Args&&... __args) { _M_reserve_map_at_front(); *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); try { this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node - 1); this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; this->_M_impl.construct(this->_M_impl._M_start._M_cur, std::forward<_Args>(__args)...); } catch(...) { ++this->_M_impl._M_start; _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); throw; } } template void deque<_Tp, _Alloc>:: _M_pop_back_aux() { _M_deallocate_node(this->_M_impl._M_finish._M_first); this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); } template void deque<_Tp, _Alloc>:: _M_pop_front_aux() { this->_M_impl.destroy(this->_M_impl._M_start._M_cur); _M_deallocate_node(this->_M_impl._M_start._M_first); this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; } template template void deque<_Tp, _Alloc>:: _M_range_insert_aux(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag) { std::copy(__first, __last, std::inserter(*this, __pos)); } template template void deque<_Tp, _Alloc>:: _M_range_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag) { const size_type __n = std::distance(__first, __last); if (__pos._M_cur == this->_M_impl._M_start._M_cur) { iterator __new_start = _M_reserve_elements_at_front(__n); try { std::__uninitialized_copy_a(__first, __last, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) { iterator __new_finish = _M_reserve_elements_at_back(__n); try { std::__uninitialized_copy_a(__first, __last, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } else _M_insert_aux(__pos, __first, __last, __n); } template template typename deque<_Tp, _Alloc>::iterator deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, _Args&&... __args) { value_type __x_copy(std::forward<_Args>(__args)...); difference_type __index = __pos - this->_M_impl._M_start; if (static_cast(__index) < size() / 2) { push_front(std::move(front())); iterator __front1 = this->_M_impl._M_start; ++__front1; iterator __front2 = __front1; ++__front2; __pos = this->_M_impl._M_start + __index; iterator __pos1 = __pos; ++__pos1; std::move(__front2, __pos1, __front1); } else { push_back(std::move(back())); iterator __back1 = this->_M_impl._M_finish; --__back1; iterator __back2 = __back1; --__back2; __pos = this->_M_impl._M_start + __index; std::move_backward(__pos, __back2, __back1); } *__pos = std::move(__x_copy); return __pos; } template void deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) { const difference_type __elems_before = __pos - this->_M_impl._M_start; const size_type __length = this->size(); value_type __x_copy = __x; if (__elems_before < difference_type(__length / 2)) { iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elems_before; try { if (__elems_before >= difference_type(__n)) { iterator __start_n = (this->_M_impl._M_start + difference_type(__n)); std::__uninitialized_move_a(this->_M_impl._M_start, __start_n, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::move(__start_n, __pos, __old_start); std::fill(__pos - difference_type(__n), __pos, __x_copy); } else { std::__uninitialized_move_fill(this->_M_impl._M_start, __pos, __new_start, this->_M_impl._M_start, __x_copy, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::fill(__old_start, __pos, __x_copy); } } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else { iterator __new_finish = _M_reserve_elements_at_back(__n); iterator __old_finish = this->_M_impl._M_finish; const difference_type __elems_after = difference_type(__length) - __elems_before; __pos = this->_M_impl._M_finish - __elems_after; try { if (__elems_after > difference_type(__n)) { iterator __finish_n = (this->_M_impl._M_finish - difference_type(__n)); std::__uninitialized_move_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::move_backward(__pos, __finish_n, __old_finish); std::fill(__pos, __pos + difference_type(__n), __x_copy); } else { std::__uninitialized_fill_move(this->_M_impl._M_finish, __pos + difference_type(__n), __x_copy, __pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::fill(__pos, __old_finish, __x_copy); } } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } } template template void deque<_Tp, _Alloc>:: _M_insert_aux(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n) { const difference_type __elemsbefore = __pos - this->_M_impl._M_start; const size_type __length = size(); if (static_cast(__elemsbefore) < __length / 2) { iterator __new_start = _M_reserve_elements_at_front(__n); iterator __old_start = this->_M_impl._M_start; __pos = this->_M_impl._M_start + __elemsbefore; try { if (__elemsbefore >= difference_type(__n)) { iterator __start_n = (this->_M_impl._M_start + difference_type(__n)); std::__uninitialized_move_a(this->_M_impl._M_start, __start_n, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::move(__start_n, __pos, __old_start); std::copy(__first, __last, __pos - difference_type(__n)); } else { _ForwardIterator __mid = __first; std::advance(__mid, difference_type(__n) - __elemsbefore); std::__uninitialized_move_copy(this->_M_impl._M_start, __pos, __first, __mid, __new_start, _M_get_Tp_allocator()); this->_M_impl._M_start = __new_start; std::copy(__mid, __last, __old_start); } } catch(...) { _M_destroy_nodes(__new_start._M_node, this->_M_impl._M_start._M_node); throw; } } else { iterator __new_finish = _M_reserve_elements_at_back(__n); iterator __old_finish = this->_M_impl._M_finish; const difference_type __elemsafter = difference_type(__length) - __elemsbefore; __pos = this->_M_impl._M_finish - __elemsafter; try { if (__elemsafter > difference_type(__n)) { iterator __finish_n = (this->_M_impl._M_finish - difference_type(__n)); std::__uninitialized_move_a(__finish_n, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::move_backward(__pos, __finish_n, __old_finish); std::copy(__first, __last, __pos); } else { _ForwardIterator __mid = __first; std::advance(__mid, __elemsafter); std::__uninitialized_copy_move(__mid, __last, __pos, this->_M_impl._M_finish, this->_M_impl._M_finish, _M_get_Tp_allocator()); this->_M_impl._M_finish = __new_finish; std::copy(__first, __mid, __pos); } } catch(...) { _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, __new_finish._M_node + 1); throw; } } } template void deque<_Tp, _Alloc>:: _M_destroy_data_aux(iterator __first, iterator __last) { for (_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) std::_Destroy(*__node, *__node + _S_buffer_size(), _M_get_Tp_allocator()); if (__first._M_node != __last._M_node) { std::_Destroy(__first._M_cur, __first._M_last, _M_get_Tp_allocator()); std::_Destroy(__last._M_first, __last._M_cur, _M_get_Tp_allocator()); } else std::_Destroy(__first._M_cur, __last._M_cur, _M_get_Tp_allocator()); } template void deque<_Tp, _Alloc>:: _M_new_elements_at_front(size_type __new_elems) { if (this->max_size() - this->size() < __new_elems) __throw_length_error(("deque::_M_new_elements_at_front")); const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) / _S_buffer_size()); _M_reserve_map_at_front(__new_nodes); size_type __i; try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); } catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); throw; } } template void deque<_Tp, _Alloc>:: _M_new_elements_at_back(size_type __new_elems) { if (this->max_size() - this->size() < __new_elems) __throw_length_error(("deque::_M_new_elements_at_back")); const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) / _S_buffer_size()); _M_reserve_map_at_back(__new_nodes); size_type __i; try { for (__i = 1; __i <= __new_nodes; ++__i) *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); } catch(...) { for (size_type __j = 1; __j < __i; ++__j) _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); throw; } } template void deque<_Tp, _Alloc>:: _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) { const size_type __old_num_nodes = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; _Map_pointer __new_nstart; if (this->_M_impl._M_map_size > 2 * __new_num_nodes) { __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size - __new_num_nodes) / 2 + (__add_at_front ? __nodes_to_add : 0); if (__new_nstart < this->_M_impl._M_start._M_node) std::copy(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart); else std::copy_backward(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart + __old_num_nodes); } else { size_type __new_map_size = this->_M_impl._M_map_size + std::max(this->_M_impl._M_map_size, __nodes_to_add) + 2; _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 + (__add_at_front ? __nodes_to_add : 0); std::copy(this->_M_impl._M_start._M_node, this->_M_impl._M_finish._M_node + 1, __new_nstart); _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); this->_M_impl._M_map = __new_map; this->_M_impl._M_map_size = __new_map_size; } this->_M_impl._M_start._M_set_node(__new_nstart); this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); } template void fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; for (typename _Self::_Map_pointer __node = __first._M_node + 1; __node < __last._M_node; ++__node) std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); if (__first._M_node != __last._M_node) { std::fill(__first._M_cur, __first._M_last, __value); std::fill(__last._M_first, __last._M_cur, __value); } else std::fill(__first._M_cur, __last._M_cur, __value); } template _Deque_iterator<_Tp, _Tp&, _Tp*> copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { const difference_type __clen = std::min(__len, std::min(__first._M_last - __first._M_cur, __result._M_last - __result._M_cur)); std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); __first += __clen; __result += __clen; __len -= __clen; } return __result; } template _Deque_iterator<_Tp, _Tp&, _Tp*> copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { difference_type __llen = __last._M_cur - __last._M_first; _Tp* __lend = __last._M_cur; difference_type __rlen = __result._M_cur - __result._M_first; _Tp* __rend = __result._M_cur; if (!__llen) { __llen = _Self::_S_buffer_size(); __lend = *(__last._M_node - 1) + __llen; } if (!__rlen) { __rlen = _Self::_S_buffer_size(); __rend = *(__result._M_node - 1) + __rlen; } const difference_type __clen = std::min(__len, std::min(__llen, __rlen)); std::copy_backward(__lend - __clen, __lend, __rend); __last -= __clen; __result -= __clen; __len -= __clen; } return __result; } template _Deque_iterator<_Tp, _Tp&, _Tp*> move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { const difference_type __clen = std::min(__len, std::min(__first._M_last - __first._M_cur, __result._M_last - __result._M_cur)); std::move(__first._M_cur, __first._M_cur + __clen, __result._M_cur); __first += __clen; __result += __clen; __len -= __clen; } return __result; } template _Deque_iterator<_Tp, _Tp&, _Tp*> move_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, _Deque_iterator<_Tp, _Tp&, _Tp*> __result) { typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; typedef typename _Self::difference_type difference_type; difference_type __len = __last - __first; while (__len > 0) { difference_type __llen = __last._M_cur - __last._M_first; _Tp* __lend = __last._M_cur; difference_type __rlen = __result._M_cur - __result._M_first; _Tp* __rend = __result._M_cur; if (!__llen) { __llen = _Self::_S_buffer_size(); __lend = *(__last._M_node - 1) + __llen; } if (!__rlen) { __rlen = _Self::_S_buffer_size(); __rend = *(__result._M_node - 1) + __rlen; } const difference_type __clen = std::min(__len, std::min(__llen, __rlen)); std::move_backward(__lend - __clen, __lend, __rend); __last -= __clen; __result -= __clen; __len -= __clen; } return __result; } } # 68 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/deque" 2 3 # 62 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stack" 2 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 1 3 # 64 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { # 94 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 3 template > class stack { typedef typename _Sequence::value_type _Sequence_value_type; template friend bool operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); template friend bool operator<(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&); public: typedef typename _Sequence::value_type value_type; typedef typename _Sequence::reference reference; typedef typename _Sequence::const_reference const_reference; typedef typename _Sequence::size_type size_type; typedef _Sequence container_type; protected: _Sequence c; public: # 132 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 3 explicit stack(const _Sequence& __c) : c(__c) { } explicit stack(_Sequence&& __c = _Sequence()) : c(std::move(__c)) { } bool empty() const { return c.empty(); } size_type size() const { return c.size(); } reference top() { ; return c.back(); } const_reference top() const { ; return c.back(); } # 184 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 3 void push(const value_type& __x) { c.push_back(__x); } void push(value_type&& __x) { c.push_back(std::move(__x)); } template void emplace(_Args&&... __args) { c.emplace_back(std::forward<_Args>(__args)...); } # 210 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 3 void pop() { ; c.pop_back(); } void swap(stack& __s) noexcept(noexcept(swap(c, __s.c))) { using std::swap; swap(c, __s.c); } }; # 240 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 3 template inline bool operator==(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return __x.c == __y.c; } # 258 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/bits/stl_stack.h" 3 template inline bool operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return __x.c < __y.c; } template inline bool operator!=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return !(__x == __y); } template inline bool operator>(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return __y < __x; } template inline bool operator<=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return !(__y < __x); } template inline bool operator>=(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y) { return !(__x < __y); } template inline void swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template struct uses_allocator, _Alloc> : public uses_allocator<_Seq, _Alloc>::type { }; } # 63 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/stack" 2 3 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 2 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" 2 # 83 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" namespace CGAL { # 92 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" class Compact_container_base { void * p; public: Compact_container_base() : p(__null) {} void * for_compact_container() const { return p; } void * & for_compact_container() { return p; } }; template < class T > struct Compact_container_traits { static void * pointer(const T &t) { return t.for_compact_container(); } static void * & pointer(T &t) { return t.for_compact_container(); } }; namespace internal { template < class DSC, bool Const > class CC_iterator; } template < class T, class Allocator_ = Default > class Compact_container { typedef Allocator_ Al; typedef typename Default::Get< Al, std::allocator< T > >::type Allocator; typedef Compact_container Self; typedef Compact_container_traits Traits; public: typedef T value_type; typedef Allocator allocator_type; typedef typename Allocator::reference reference; typedef typename Allocator::const_reference const_reference; typedef typename Allocator::pointer pointer; typedef typename Allocator::const_pointer const_pointer; typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; typedef internal::CC_iterator iterator; typedef internal::CC_iterator const_iterator; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; friend class internal::CC_iterator; friend class internal::CC_iterator; explicit Compact_container(const Allocator &a = Allocator()) : alloc(a) { init(); } template < class InputIterator > Compact_container(InputIterator first, InputIterator last, const Allocator & a = Allocator()) : alloc(a) { init(); std::copy(first, last, CGAL::inserter(*this)); } Compact_container(const Compact_container &c) : alloc(c.get_allocator()) { init(); block_size = c.block_size; std::copy(c.begin(), c.end(), CGAL::inserter(*this)); } Compact_container & operator=(const Compact_container &c) { if (&c != this) { Self tmp(c); swap(tmp); } return *this; } ~Compact_container() { clear(); } void swap(Self &c) { std::swap(alloc, c.alloc); std::swap(capacity_, c.capacity_); std::swap(size_, c.size_); std::swap(block_size, c.block_size); std::swap(first_item, c.first_item); std::swap(last_item, c.last_item); std::swap(free_list, c.free_list); all_items.swap(c.all_items); } iterator begin() { return iterator(first_item, 0, 0); } iterator end() { return iterator(last_item, 0); } const_iterator begin() const { return const_iterator(first_item, 0, 0); } const_iterator end() const { return const_iterator(last_item, 0); } reverse_iterator rbegin() { return reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } iterator iterator_to(reference value) const { return iterator(&value, 0); } const_iterator iterator_to(const_reference value) const { return const_iterator(&value, 0); } static iterator s_iterator_to(reference value) { return iterator(&value, 0); } static const_iterator s_iterator_to(const_reference value) { return const_iterator(&value, 0); } template < typename... Args > iterator emplace(const Args&... args) { if (free_list == __null) allocate_new_block(); pointer ret = free_list; free_list = clean_pointee(ret); new (ret) value_type(args...); (CGAL::possibly(type(ret) == USED)?(static_cast(0)): ::CGAL::assertion_fail( "type(ret) == USED" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 230)); ++size_; return iterator(ret, 0); } # 377 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" iterator insert(const T &t) { if (free_list == __null) allocate_new_block(); pointer ret = free_list; free_list = clean_pointee(ret); alloc.construct(ret, t); (CGAL::possibly(type(ret) == USED)?(static_cast(0)): ::CGAL::assertion_fail( "type(ret) == USED" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 385)); ++size_; return iterator(ret, 0); } template < class InputIterator > void insert(InputIterator first, InputIterator last) { for (; first != last; ++first) insert(*first); } template < class InputIterator > void assign(InputIterator first, InputIterator last) { clear(); insert(first, last); } void erase(iterator x) { (CGAL::possibly(type(&*x) == USED)?(static_cast(0)): ::CGAL::precondition_fail( "type(&*x) == USED" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 406)); alloc.destroy(&*x); std::memset(&*x, 0, sizeof(T)); put_on_free_list(&*x); --size_; } void erase(iterator first, iterator last) { while (first != last) erase(first++); } void clear(); void merge(Self &d); size_type size() const { (static_cast(0)) ; return size_; } size_type max_size() const { return alloc.max_size(); } size_type capacity() const { return capacity_; } bool empty() const { return size_ == 0; } allocator_type get_allocator() const { return alloc; } bool owns(const_iterator cit) const { if (cit == end()) return true; const_pointer c = &*cit; for (typename All_items::const_iterator it = all_items.begin(), itend = all_items.end(); it != itend; ++it) { const_pointer p = it->first; size_type s = it->second; if (c <= p || (p+s-1) <= c) continue; (CGAL::possibly((c-p)+p == c)?(static_cast(0)): ::CGAL::assertion_fail( "(c-p)+p == c" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 480, "wrong alignment of iterator")); return type(c) == USED; } return false; } bool owns_dereferencable(const_iterator cit) const { return cit != end() && owns(cit); } void reserve(size_type n) { if ( capacity_>=n ) return; size_type tmp = block_size; block_size = std::max( n - capacity_, block_size ); allocate_new_block(); block_size = tmp+16; } private: void allocate_new_block(); void put_on_free_list(pointer x) { set_type(x, free_list, FREE); free_list = x; } # 526 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" enum Type { USED = 0, BLOCK_BOUNDARY = 1, FREE = 2, START_END = 3 }; static char * clean_pointer(char * p) { return ((p - (char *) __null) & ~ (std::ptrdiff_t) START_END) + (char *) __null; } static pointer clean_pointee(const_pointer ptr) { return (pointer) clean_pointer((char *) Traits::pointer(*ptr)); } static Type type(const_pointer ptr) { char * p = (char *) Traits::pointer(*ptr); return (Type) (p - clean_pointer(p)); } static void set_type(pointer ptr, void * p, Type t) { (CGAL::possibly(0 <= t && t < 4)?(static_cast(0)): ::CGAL::precondition_fail( "0 <= t && t < 4" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 553)); Traits::pointer(*ptr) = (void *) ((clean_pointer((char *) p)) + (int) t); } # 564 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" typedef std::vector > All_items; void init() { block_size = 14; capacity_ = 0; size_ = 0; free_list = __null; first_item = __null; last_item = __null; all_items = All_items(); } allocator_type alloc; size_type capacity_; size_type size_; size_type block_size; pointer free_list; pointer first_item; pointer last_item; All_items all_items; }; template < class T, class Allocator > void Compact_container::merge(Self &d) { (CGAL::possibly(&d != this)?(static_cast(0)): ::CGAL::precondition_fail( "&d != this" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 590)); (CGAL::possibly(get_allocator() == d.get_allocator())?(static_cast(0)): ::CGAL::precondition_fail( "get_allocator() == d.get_allocator()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 593)); if (free_list == __null) { free_list = d.free_list; } else if (d.free_list != __null) { pointer p = free_list; while (clean_pointee(p) != __null) p = clean_pointee(p); set_type(p, d.free_list, FREE); } if (last_item == __null) { first_item = d.first_item; last_item = d.last_item; } else if (d.last_item != __null) { set_type(last_item, d.first_item, BLOCK_BOUNDARY); set_type(d.first_item, last_item, BLOCK_BOUNDARY); last_item = d.last_item; } size_ += d.size_; capacity_ += d.capacity_; block_size = (std::max)(block_size, d.block_size); d.init(); } template < class T, class Allocator > void Compact_container::clear() { for (typename All_items::iterator it = all_items.begin(), itend = all_items.end(); it != itend; ++it) { pointer p = it->first; size_type s = it->second; for (pointer pp = p + 1; pp != p + s - 1; ++pp) { if (type(pp) == USED) alloc.destroy(pp); } alloc.deallocate(p, s); } init(); } template < class T, class Allocator > void Compact_container::allocate_new_block() { pointer new_block = alloc.allocate(block_size + 2); all_items.push_back(std::make_pair(new_block, block_size + 2)); capacity_ += block_size; for (size_type i = block_size; i >= 1; --i) put_on_free_list(new_block + i); if (last_item == __null) { first_item = new_block; last_item = new_block + block_size + 1; set_type(first_item, __null, START_END); } else { set_type(last_item, new_block, BLOCK_BOUNDARY); set_type(new_block, last_item, BLOCK_BOUNDARY); last_item = new_block + block_size + 1; } set_type(last_item, __null, START_END); block_size += 16; } template < class T, class Allocator > inline bool operator==(const Compact_container &lhs, const Compact_container &rhs) { return lhs.size() == rhs.size() && std::equal(lhs.begin(), lhs.end(), rhs.begin()); } template < class T, class Allocator > inline bool operator!=(const Compact_container &lhs, const Compact_container &rhs) { return ! (lhs == rhs); } template < class T, class Allocator > inline bool operator< (const Compact_container &lhs, const Compact_container &rhs) { return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); } template < class T, class Allocator > inline bool operator> (const Compact_container &lhs, const Compact_container &rhs) { return rhs < lhs; } template < class T, class Allocator > inline bool operator<=(const Compact_container &lhs, const Compact_container &rhs) { return ! (lhs > rhs); } template < class T, class Allocator > inline bool operator>=(const Compact_container &lhs, const Compact_container &rhs) { return ! (lhs < rhs); } namespace internal { template < class DSC, bool Const > class CC_iterator { typedef typename DSC::iterator iterator; typedef CC_iterator Self; public: typedef typename DSC::value_type value_type; typedef typename DSC::size_type size_type; typedef typename DSC::difference_type difference_type; typedef typename boost::mpl::if_c< Const, const value_type*, value_type*>::type pointer; typedef typename boost::mpl::if_c< Const, const value_type&, value_type&>::type reference; typedef std::bidirectional_iterator_tag iterator_category; CC_iterator() { m_ptr.p = __null; } CC_iterator (const iterator &it) { m_ptr.p = &(*it); } CC_iterator & operator= (const iterator &it) { m_ptr.p = &(*it); return *this; } CC_iterator (Nullptr_t n) { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 758)); m_ptr.p = __null; } private: union { pointer p; void *vp; } m_ptr; friend class Compact_container; CC_iterator(pointer ptr, int, int) { m_ptr.p = ptr; if (m_ptr.p == __null) return; ++(m_ptr.p); if (DSC::type(m_ptr.p) == DSC::FREE) increment(); } CC_iterator(pointer ptr, int) { m_ptr.p = ptr; } void increment() { (CGAL::possibly(m_ptr.p != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_ptr.p != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 794 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 795 # 794 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Incrementing a singular iterator or an empty container iterator ?")) ; (CGAL::possibly(DSC::type(m_ptr.p) != DSC::START_END)?(static_cast(0)): ::CGAL::assertion_fail( "DSC::type(m_ptr.p) != DSC::START_END" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 796 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 797 # 796 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Incrementing end() ?")) ; do { ++(m_ptr.p); if (DSC::type(m_ptr.p) == DSC::USED || DSC::type(m_ptr.p) == DSC::START_END) return; if (DSC::type(m_ptr.p) == DSC::BLOCK_BOUNDARY) m_ptr.p = DSC::clean_pointee(m_ptr.p); } while (true); } void decrement() { (CGAL::possibly(m_ptr.p != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_ptr.p != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 814 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 815 # 814 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Decrementing a singular iterator or an empty container iterator ?")) ; (CGAL::possibly(DSC::type(m_ptr.p - 1) != DSC::START_END)?(static_cast(0)): ::CGAL::assertion_fail( "DSC::type(m_ptr.p - 1) != DSC::START_END" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 816 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 817 # 816 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Decrementing begin() ?")) ; do { --m_ptr.p; if (DSC::type(m_ptr.p) == DSC::USED || DSC::type(m_ptr.p) == DSC::START_END) return; if (DSC::type(m_ptr.p) == DSC::BLOCK_BOUNDARY) m_ptr.p = DSC::clean_pointee(m_ptr.p); } while (true); } public: Self & operator++() { (CGAL::possibly(m_ptr.p != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_ptr.p != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 835 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 836 # 835 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Incrementing a singular iterator or an empty container iterator ?")) ; (CGAL::possibly(DSC::type(m_ptr.p) == DSC::USED)?(static_cast(0)): ::CGAL::assertion_fail( "DSC::type(m_ptr.p) == DSC::USED" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 837 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 838 # 837 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Incrementing an invalid iterator.")) ; increment(); return *this; } Self & operator--() { (CGAL::possibly(m_ptr.p != __null)?(static_cast(0)): ::CGAL::assertion_fail( "m_ptr.p != NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 845 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 846 # 845 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Decrementing a singular iterator or an empty container iterator ?")) ; (CGAL::possibly(DSC::type(m_ptr.p) == DSC::USED || DSC::type(m_ptr.p) == DSC::START_END)?(static_cast(0)): ::CGAL::assertion_fail( "DSC::type(m_ptr.p) == DSC::USED || DSC::type(m_ptr.p) == DSC::START_END" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" # 847 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , 849 # 847 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h" , "Decrementing an invalid iterator.")) ; decrement(); return *this; } Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } Self operator--(int) { Self tmp(*this); --(*this); return tmp; } reference operator*() const { return *(m_ptr.p); } pointer operator->() const { return (m_ptr.p); } bool operator<(const CC_iterator& other) const { return (m_ptr.p < other.m_ptr.p); } bool operator>(const CC_iterator& other) const { return (m_ptr.p > other.m_ptr.p); } bool operator<=(const CC_iterator& other) const { return (m_ptr.p <= other.m_ptr.p); } bool operator>=(const CC_iterator& other) const { return (m_ptr.p >= other.m_ptr.p); } void * for_compact_container() const { return (m_ptr.vp); } void * & for_compact_container() { return (m_ptr.vp); } }; template < class DSC, bool Const1, bool Const2 > inline bool operator==(const CC_iterator &rhs, const CC_iterator &lhs) { return &*rhs == &*lhs; } template < class DSC, bool Const1, bool Const2 > inline bool operator!=(const CC_iterator &rhs, const CC_iterator &lhs) { return &*rhs != &*lhs; } template < class DSC, bool Const > inline bool operator==(const CC_iterator &rhs, Nullptr_t n) { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 909)); return &*rhs == __null; } template < class DSC, bool Const > inline bool operator!=(const CC_iterator &rhs, Nullptr_t n) { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Compact_container.h", 918)); return &*rhs != __null; } } } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 2 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Dummy_tds_2.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Dummy_tds_2.h" namespace CGAL { struct Dummy_tds_2 { struct Vertex {}; struct Face {}; struct Edge {}; struct Vertex_handle {}; struct Face_handle {}; struct Vertex_iterator {}; struct Face_iterator {}; struct Edge_iterator {}; struct Edge_circulator {}; struct Facet_circulator {}; struct Face_circulator {}; struct Vertex_circulator {}; typedef std::size_t size_type; }; } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h" 2 namespace CGAL { template < typename TDS = void> class Triangulation_ds_face_base_2 { public: typedef TDS Triangulation_data_structure; typedef typename TDS::Vertex_handle Vertex_handle; typedef typename TDS::Face_handle Face_handle; template struct Rebind_TDS { typedef Triangulation_ds_face_base_2 Other; }; private: Vertex_handle V[3]; Face_handle N[3]; public: Triangulation_ds_face_base_2(); Triangulation_ds_face_base_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2); Triangulation_ds_face_base_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Face_handle n0, Face_handle n1, Face_handle n2); Vertex_handle vertex(int i) const; bool has_vertex(Vertex_handle v) const; bool has_vertex(Vertex_handle v, int& i) const ; int index(Vertex_handle v) const ; Face_handle neighbor(int i) const ; bool has_neighbor(Face_handle n) const; bool has_neighbor(Face_handle n, int& i) const; int index(Face_handle n) const; void set_vertex(int i, Vertex_handle v); void set_vertices(); void set_vertices(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2); void set_neighbor(int i, Face_handle n) ; void set_neighbors(); void set_neighbors(Face_handle n0, Face_handle n1, Face_handle n2); void reorient(); void ccw_permute(); void cw_permute(); int dimension() const; bool is_valid(bool = false, int = 0) const {return true;} void * for_compact_container() const {return N[0].for_compact_container(); } void * & for_compact_container() { return N[0].for_compact_container();} static int ccw(int i) {return Triangulation_cw_ccw_2::ccw(i);} static int cw(int i) {return Triangulation_cw_ccw_2::cw(i);} }; template Triangulation_ds_face_base_2 :: Triangulation_ds_face_base_2() { set_vertices(); set_neighbors(); } template Triangulation_ds_face_base_2 :: Triangulation_ds_face_base_2( Vertex_handle v0, Vertex_handle v1, Vertex_handle v2) { set_vertices(v0, v1, v2); set_neighbors(); } template Triangulation_ds_face_base_2 :: Triangulation_ds_face_base_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Face_handle n0, Face_handle n1, Face_handle n2) { set_vertices(v0, v1, v2); set_neighbors(n0, n1, n2); } template inline typename Triangulation_ds_face_base_2::Vertex_handle Triangulation_ds_face_base_2:: vertex(int i) const { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 131)); return V[i]; } template inline bool Triangulation_ds_face_base_2 :: has_vertex(Vertex_handle v) const { return (V[0] == v) || (V[1] == v) || (V[2]== v); } template inline bool Triangulation_ds_face_base_2 :: has_vertex(Vertex_handle v, int& i) const { if (v == V[0]) { i = 0; return true; } if (v == V[1]) { i = 1; return true; } if (v == V[2]) { i = 2; return true; } return false; } template inline int Triangulation_ds_face_base_2 :: index(Vertex_handle v) const { if (v == V[0]) return 0; if (v == V[1]) return 1; (CGAL::possibly(v == V[2])?(static_cast(0)): ::CGAL::assertion_fail( "v == V[2]" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 171)); return 2; } template inline typename Triangulation_ds_face_base_2::Face_handle Triangulation_ds_face_base_2:: neighbor(int i) const { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 181)); return N[i]; } template inline bool Triangulation_ds_face_base_2 :: has_neighbor(Face_handle n) const { return (N[0] == n) || (N[1] == n) || (N[2] == n); } template inline bool Triangulation_ds_face_base_2 :: has_neighbor(Face_handle n, int& i) const { if(n == N[0]){ i = 0; return true; } if(n == N[1]){ i = 1; return true; } if(n == N[2]){ i = 2; return true; } return false; } template inline int Triangulation_ds_face_base_2 :: index(Face_handle n) const { if (n == N[0]) return 0; if (n == N[1]) return 1; (CGAL::possibly(n == N[2])?(static_cast(0)): ::CGAL::assertion_fail( "n == N[2]" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 223)); return 2; } template inline void Triangulation_ds_face_base_2 :: set_vertex(int i, Vertex_handle v) { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 232)); V[i] = v; } template inline void Triangulation_ds_face_base_2 :: set_neighbor(int i, Face_handle n) { (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 241)); (CGAL::possibly(this != &*n)?(static_cast(0)): ::CGAL::precondition_fail( "this != &*n" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 242)); N[i] = n; } template inline void Triangulation_ds_face_base_2 :: set_vertices() { V[0] = V[1] = V[2] = Vertex_handle(); } template inline void Triangulation_ds_face_base_2 :: set_vertices(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2) { V[0] = v0; V[1] = v1; V[2] = v2; } template inline void Triangulation_ds_face_base_2 :: set_neighbors() { N[0] = N[1] = N[2] = Face_handle(); } template inline void Triangulation_ds_face_base_2 :: set_neighbors(Face_handle n0,Face_handle n1, Face_handle n2) { (CGAL::possibly(this != &*n0)?(static_cast(0)): ::CGAL::precondition_fail( "this != &*n0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 277)); (CGAL::possibly(this != &*n1)?(static_cast(0)): ::CGAL::precondition_fail( "this != &*n1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 278)); (CGAL::possibly(this != &*n2)?(static_cast(0)): ::CGAL::precondition_fail( "this != &*n2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_face_base_2.h", 279)); N[0] = n0; N[1] = n1; N[2] = n2; } template void Triangulation_ds_face_base_2 :: reorient() { set_vertices (V[1],V[0],V[2]); set_neighbors(N[1],N[0],N[2]); } template inline void Triangulation_ds_face_base_2 :: ccw_permute() { set_vertices (V[2],V[0],V[1]); set_neighbors(N[2],N[0],N[1]); } template inline void Triangulation_ds_face_base_2 :: cw_permute() { set_vertices (V[1],V[2],V[0]); set_neighbors(N[1],N[2],N[0]); } template < class TDS> inline int Triangulation_ds_face_base_2 :: dimension() const { if (V[2] != Vertex_handle()) {return 2;} else return( V[1] != Vertex_handle() ? 1 : 0); } template < class TDS > inline std::istream& operator>>(std::istream &is, Triangulation_ds_face_base_2 &) { return is; } template < class TDS > inline std::ostream& operator<<(std::ostream &os, const Triangulation_ds_face_base_2 &) { return os; } template <> class Triangulation_ds_face_base_2 { public: typedef Dummy_tds_2 Triangulation_data_structure; typedef Triangulation_data_structure::Vertex_handle Vertex_handle; typedef Triangulation_data_structure::Face_handle Face_handle; template struct Rebind_TDS { typedef Triangulation_ds_face_base_2 Other; }; }; } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_vertex_base_2.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_vertex_base_2.h" namespace CGAL { template < class TDS = void > class Triangulation_ds_vertex_base_2 { public: typedef TDS Triangulation_data_structure; typedef typename TDS::Face_handle Face_handle; typedef typename TDS::Vertex_handle Vertex_handle; template struct Rebind_TDS { typedef Triangulation_ds_vertex_base_2 Other; }; Triangulation_ds_vertex_base_2 () : _f() {} Triangulation_ds_vertex_base_2(Face_handle f) : _f(f) {} Face_handle face() const { return _f;} void set_face(Face_handle f) { _f = f ;} bool is_valid(bool =false, int = 0) const {return face() != Face_handle();} void * for_compact_container() const { return _f.for_compact_container(); } void * & for_compact_container() { return _f.for_compact_container(); } private: Face_handle _f; }; template <> class Triangulation_ds_vertex_base_2 { public: typedef Dummy_tds_2 Triangulation_data_structure; typedef Triangulation_data_structure::Vertex_handle Vertex_handle; typedef Triangulation_data_structure::Face_handle Face_handle; template struct Rebind_TDS { typedef Triangulation_ds_vertex_base_2 Other; }; }; template < class TDS > inline std::istream& operator>>(std::istream &is, Triangulation_ds_vertex_base_2 &) { return is; } template < class TDS > inline std::ostream& operator<<(std::ostream &os, const Triangulation_ds_vertex_base_2 &) { return os; } } # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_iterators_2.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_iterators_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 2 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_iterators_2.h" 2 namespace CGAL { template class Triangulation_ds_edge_iterator_2 { public: typedef typename Tds::Edge Edge; typedef typename Tds::Face_iterator Face_iterator; typedef typename Tds::Face_handle Face_handle; typedef Edge value_type; typedef Edge* pointer; typedef Edge& reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef std::bidirectional_iterator_tag iterator_category; typedef Triangulation_ds_edge_iterator_2 Edge_iterator; private: const Tds* _tds; Face_iterator pos; mutable Edge edge; public: Triangulation_ds_edge_iterator_2() {} Triangulation_ds_edge_iterator_2(const Tds * tds); Triangulation_ds_edge_iterator_2(const Tds* tds, int ); bool operator==(const Edge_iterator& fi) const ; bool operator!=(const Edge_iterator& fi) const {return !(*this== fi);} Edge_iterator& operator++(); Edge_iterator& operator--(); Edge_iterator operator++(int); Edge_iterator operator--(int); Edge* operator->() const; Edge& operator*() const ; private: void increment(); void decrement(); bool associated_edge(); }; template Triangulation_ds_edge_iterator_2 :: Triangulation_ds_edge_iterator_2(const Tds * tds) : _tds(tds) { edge.second = 0; if (_tds->dimension()<= 0) { pos = _tds->faces().end(); return; } pos = _tds->faces().begin(); if (_tds->dimension() == 1) edge.second = 2; while ( pos != _tds->faces().end() && !associated_edge() ) increment(); } template Triangulation_ds_edge_iterator_2 :: Triangulation_ds_edge_iterator_2(const Tds * tds, int ) : _tds(tds) { pos = tds->faces().end(); edge.second = 0; if (_tds->dimension() == 1) {edge.second = 2;} } template inline bool Triangulation_ds_edge_iterator_2 :: operator==(const Edge_iterator& fi) const { return _tds == fi._tds && pos == fi.pos && edge.second == fi.edge.second; } template inline void Triangulation_ds_edge_iterator_2 :: increment() { (CGAL::possibly(_tds->dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "_tds->dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_iterators_2.h", 116)); if (_tds->dimension() == 1) ++pos; else if (edge.second == 2) {edge.second = 0; ++pos;} else edge.second += 1; return; } template inline void Triangulation_ds_edge_iterator_2 :: decrement() { (CGAL::possibly(_tds->dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "_tds->dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_iterators_2.h", 129)); if (_tds->dimension() == 1) --pos; else if (edge.second == 0) { edge.second = 2; --pos;} else edge.second -= 1; return; } template inline bool Triangulation_ds_edge_iterator_2 :: associated_edge() { if (_tds->dimension() == 1) {return true;} return Face_handle(pos) < pos->neighbor(edge.second); } template inline Triangulation_ds_edge_iterator_2& Triangulation_ds_edge_iterator_2 :: operator++() { do increment(); while( pos != _tds->faces().end() && !associated_edge()); return *this; } template inline Triangulation_ds_edge_iterator_2& Triangulation_ds_edge_iterator_2 :: operator--() { do decrement(); while ( !associated_edge() && *this != Edge_iterator(_tds) ); return *this; } template inline Triangulation_ds_edge_iterator_2 Triangulation_ds_edge_iterator_2 :: operator++(int) { Edge_iterator tmp(*this); ++(*this); return tmp; } template inline Triangulation_ds_edge_iterator_2 Triangulation_ds_edge_iterator_2 :: operator--(int) { Edge_iterator tmp(*this); --(*this); return tmp; } template inline typename Triangulation_ds_edge_iterator_2::Edge* Triangulation_ds_edge_iterator_2 :: operator->() const { edge.first = pos; return &edge; } template inline typename Triangulation_ds_edge_iterator_2::Edge& Triangulation_ds_edge_iterator_2 :: operator*() const { edge.first = pos; return edge; } } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 2 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" 2 namespace CGAL { template < class Tds> class Triangulation_ds_face_circulator_2 : public Bidirectional_circulator_base< typename Tds::Face, std::ptrdiff_t, std::size_t>, public Triangulation_cw_ccw_2 { private: typedef Bidirectional_circulator_base< typename Tds::Face, std::ptrdiff_t, std::size_t> Base_circulator; public: typedef Triangulation_ds_face_circulator_2 Face_circulator; typedef typename Tds::Face Face; typedef typename Tds::Vertex Vertex; typedef typename Tds::Face_handle Face_handle; typedef typename Tds::Vertex_handle Vertex_handle; private: Vertex_handle _v; Face_handle pos; public: Triangulation_ds_face_circulator_2() : _v(), pos() {} Triangulation_ds_face_circulator_2(Vertex_handle v, Face_handle f = Face_handle()); Face_circulator& operator=(const Face_circulator& other); Face_circulator& operator++(); Face_circulator operator++(int); Face_circulator& operator--(); Face_circulator operator--(int); bool operator==(const Face_circulator &fc) const; bool operator!=(const Face_circulator &fc) const; bool operator==(const Face_handle &fh) const { return pos == fh; } bool operator!=(const Face_handle &fh) const { return pos != fh; } bool is_empty() const; bool operator==(Nullptr_t n) const; bool operator!=(Nullptr_t n) const; Face& operator*() const { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 87 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 88 # 87 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; return *pos; } Face* operator->() const { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 95 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 96 # 95 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; return &*pos; } Face_handle base() const {return pos;} operator Face_handle() const {return pos;} }; template < class Tds_ > bool operator==(typename Tds_::Face_handle fh, Triangulation_ds_face_circulator_2 fc) { return (fc==fh); } template < class Tds_ > bool operator!=(typename Tds_::Face_handle fh, Triangulation_ds_face_circulator_2 fc) { return (fc!=fh); } template < class Tds > class Triangulation_ds_vertex_circulator_2 : public Bidirectional_circulator_base< typename Tds::Vertex, std::ptrdiff_t, std::size_t>, public Triangulation_cw_ccw_2 { public: typedef Triangulation_ds_vertex_circulator_2 Vertex_circulator; typedef typename Tds::Face Face; typedef typename Tds::Vertex Vertex; typedef typename Tds::Face_handle Face_handle; typedef typename Tds::Vertex_handle Vertex_handle; private: Vertex_handle _v; Face_handle pos; int _ri; public: Triangulation_ds_vertex_circulator_2() : _v(), pos() {} Triangulation_ds_vertex_circulator_2(Vertex_handle v, Face_handle f = Face_handle()); Vertex_circulator& operator++(); Vertex_circulator operator++(int); Vertex_circulator& operator--(); Vertex_circulator operator--(int); bool operator==(const Vertex_circulator &vc) const; bool operator!=(const Vertex_circulator &vc) const; bool operator==(const Vertex_handle &vh) const { return pos->vertex(_ri) == vh; } bool operator!=(const Vertex_handle &vh) const { return pos->vertex(_ri) != vh; } bool is_empty() const; bool operator==(Nullptr_t n) const; bool operator!=(Nullptr_t n) const; Vertex& operator*() const { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 168 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 169 # 168 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; return *(pos->vertex(_ri)); } Vertex* operator->() const { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 176 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 177 # 176 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; return &*(pos->vertex(_ri)); } Vertex_handle base() const {return pos->vertex(_ri);} operator Vertex_handle() const {return pos->vertex(_ri);} }; template < class Tds_ > inline bool operator==(typename Tds_::Vertex_handle vh, Triangulation_ds_vertex_circulator_2 vc) { return (vc==vh); } template < class Tds_ > inline bool operator!=(typename Tds_::Vertex_handle vh, Triangulation_ds_vertex_circulator_2 vc) { return !(vc==vh); } template < class Tds > class Triangulation_ds_edge_circulator_2 : public Bidirectional_circulator_base < typename Tds::Edge, std::ptrdiff_t, std::size_t>, public Triangulation_cw_ccw_2 { public: typedef Triangulation_ds_edge_circulator_2 Edge_circulator; typedef typename Tds::Face Face; typedef typename Tds::Vertex Vertex; typedef typename Tds::Edge Edge; typedef typename Tds::Face_handle Face_handle; typedef typename Tds::Vertex_handle Vertex_handle; private: int _ri; Vertex_handle _v; Face_handle pos; mutable Edge edge; public: Triangulation_ds_edge_circulator_2() : _v(), pos() {} Triangulation_ds_edge_circulator_2( Vertex_handle v, Face_handle f = Face_handle()); Edge_circulator& operator++(); Edge_circulator operator++(int); Edge_circulator& operator--(); Edge_circulator operator--(int); bool operator==(const Edge_circulator &vc) const; bool operator!=(const Edge_circulator &vc) const; bool is_empty() const; bool operator==(Nullptr_t n) const; bool operator!=(Nullptr_t n) const; Edge* operator->() const { edge.first=pos; edge.second= _ri; return &edge; } Edge& operator*() const { edge.first=pos; edge.second= _ri; return edge; } }; template < class Tds > Triangulation_ds_face_circulator_2 :: Triangulation_ds_face_circulator_2(Vertex_handle v, Face_handle f) : _v(v), pos(f) { if (_v == Vertex_handle()) pos = Face_handle(); else if ( pos == Face_handle()) pos = v->face(); if (pos == Face_handle()|| pos->dimension() < 2) { _v = Vertex_handle() ; pos = Face_handle(); return;} else (CGAL::possibly(pos->has_vertex(v))?(static_cast(0)): ::CGAL::precondition_fail( "pos->has_vertex(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h", 269)); } template < class Tds > Triangulation_ds_face_circulator_2& Triangulation_ds_face_circulator_2 :: operator=(const Face_circulator& other) { static_cast(*this) = static_cast (other); _v = other._v; pos = other.pos; return *this; } template < class Tds > Triangulation_ds_face_circulator_2& Triangulation_ds_face_circulator_2 :: operator++() { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 289 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 290 # 289 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; int i = pos->index(_v); pos = pos->neighbor(ccw(i)); return *this; } template < class Tds > Triangulation_ds_face_circulator_2 Triangulation_ds_face_circulator_2 :: operator++(int) { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 301 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 302 # 301 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; Face_circulator tmp(*this); ++(*this); return tmp; } template < class Tds > Triangulation_ds_face_circulator_2& Triangulation_ds_face_circulator_2 :: operator--() { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 313 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 314 # 313 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; int i = pos->index(_v); pos = pos->neighbor(cw(i)); return *this; } template < class Tds > Triangulation_ds_face_circulator_2 Triangulation_ds_face_circulator_2 :: operator--(int) { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 325 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 326 # 325 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; Face_circulator tmp(*this); --(*this); return tmp; } template < class Tds > inline bool Triangulation_ds_face_circulator_2 :: operator==(const Face_circulator &fc) const { return (_v == fc._v) && (pos == fc.pos); } template < class Tds > inline bool Triangulation_ds_face_circulator_2 :: operator!=(const Face_circulator &fc) const { return ! (*this == fc); } template < class Tds > inline bool Triangulation_ds_face_circulator_2 :: is_empty() const { return (_v == Vertex_handle() || pos == Face_handle() ); } template < class Tds > inline bool Triangulation_ds_face_circulator_2 :: operator==(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h", 361)); return (_v == Vertex_handle() || pos == Face_handle() ); } template < class Tds > inline bool Triangulation_ds_face_circulator_2 :: operator!=(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h", 370)); return ! (*this == __null); } template < class Tds > Triangulation_ds_vertex_circulator_2 :: Triangulation_ds_vertex_circulator_2 (Vertex_handle v, Face_handle f) : _v( v ), pos(f) { if (_v == Vertex_handle()) { pos = Face_handle();} else if (pos == Face_handle()) {pos = v->face();} if (pos == Face_handle() || pos->dimension() < 1){ _v = Vertex_handle(); pos = Face_handle(); return;} int i = pos->index(_v); if (pos->dimension() == 2) {_ri = ccw(i);} else {_ri = 1-i;} return; } template < class Tds > Triangulation_ds_vertex_circulator_2& Triangulation_ds_vertex_circulator_2 :: operator++() { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 397 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 398 # 397 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; int i = pos->index(_v); if (pos->dimension() == 1) { pos = pos->neighbor(1-i); _ri = 1 - pos->index(_v); } else{ pos = pos->neighbor(ccw(i)); i = pos->index(_v); _ri = ccw(i); } return *this; } template < class Tds > Triangulation_ds_vertex_circulator_2 Triangulation_ds_vertex_circulator_2 :: operator++(int) { Vertex_circulator tmp(*this); ++(*this); return tmp; } template < class Tds > Triangulation_ds_vertex_circulator_2& Triangulation_ds_vertex_circulator_2 :: operator--() { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 428 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 429 # 428 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; int i = pos->index(_v); if (pos->dimension() == 1) { pos = pos->neighbor(1-i); _ri = 1 - pos->index(_v); } else{ pos = pos->neighbor(cw(i)); i = pos->index(_v); _ri = ccw(i); } return *this; } template < class Tds > Triangulation_ds_vertex_circulator_2 Triangulation_ds_vertex_circulator_2 :: operator--(int) { Vertex_circulator tmp(*this); --(*this); return tmp; } template < class Tds > inline bool Triangulation_ds_vertex_circulator_2 :: operator==(const Vertex_circulator &vc) const { return (_v == vc._v) && (_ri == vc._ri) && (pos == vc.pos); } template < class Tds > inline bool Triangulation_ds_vertex_circulator_2 :: operator!=(const Vertex_circulator &vc) const { return ! (*this == vc); } template < class Tds > inline bool Triangulation_ds_vertex_circulator_2 :: is_empty() const { return (_v == Vertex_handle() || pos == Face_handle()); } template < class Tds > inline bool Triangulation_ds_vertex_circulator_2 :: operator==(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h", 483)); return (_v == Vertex_handle() || pos == Face_handle()); } template < class Tds > inline bool Triangulation_ds_vertex_circulator_2 :: operator!=(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h", 492)); return !(*this == __null); } template < class Tds > Triangulation_ds_edge_circulator_2 :: Triangulation_ds_edge_circulator_2(Vertex_handle v, Face_handle f) : _v(v), pos(f) { if (_v == Vertex_handle()) { pos = Face_handle();} else if (pos==Face_handle()) {pos = v->face();} if (pos == Face_handle() || pos->dimension() < 1){ _v = Vertex_handle(); pos = Face_handle();return;} int i = pos->index(_v); if (pos->dimension() == 2) {_ri = ccw(i);} else {_ri = 2;} return; } template < class Tds > Triangulation_ds_edge_circulator_2& Triangulation_ds_edge_circulator_2 :: operator++() { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 518 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 519 # 518 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; int i = pos->index(_v); if (pos->dimension() == 1) { pos = pos->neighbor(1-i); return *this; } else{ pos = pos->neighbor(ccw(i)); i = pos->index(_v); _ri = ccw(i); } return *this; } template < class Tds > Triangulation_ds_edge_circulator_2 Triangulation_ds_edge_circulator_2 :: operator++(int) { Edge_circulator tmp(*this); ++(*this); return tmp; } template < class Tds > Triangulation_ds_edge_circulator_2& Triangulation_ds_edge_circulator_2 :: operator--() { (CGAL::possibly(pos != Face_handle() && _v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && _v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" # 548 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" , 549 # 548 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h" )) ; int i = pos->index(_v); if (pos->dimension() == 1) { pos = pos->neighbor(1-i); return *this; } else{ pos = pos->neighbor(cw(i)); i = pos->index(_v); _ri = ccw(i); } return *this; } template < class Tds > Triangulation_ds_edge_circulator_2 Triangulation_ds_edge_circulator_2 :: operator--(int) { Edge_circulator tmp(*this); --(*this); return tmp; } template < class Tds > inline bool Triangulation_ds_edge_circulator_2 :: operator==(const Edge_circulator &vc) const { return (_v == vc._v) && (_ri == vc._ri) && (pos == vc.pos); } template < class Tds > inline bool Triangulation_ds_edge_circulator_2 :: operator!=(const Edge_circulator &vc) const { return ! (*this == vc); } template < class Tds > inline bool Triangulation_ds_edge_circulator_2 :: is_empty() const { return (_v == Vertex_handle() || pos == Face_handle()); } template < class Tds > inline bool Triangulation_ds_edge_circulator_2 :: operator==(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h", 603)); return (_v == Vertex_handle() || pos == Face_handle()); } template < class Tds > inline bool Triangulation_ds_edge_circulator_2 :: operator!=(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_ds_circulators_2.h", 612)); return !(*this == __null); } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_header_OFF.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_header_OFF.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_header_extended_OFF.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_header_extended_OFF.h" namespace CGAL { class File_header_extended_OFF { bool m_verbose; bool m_polyhedral_surface; std::size_t m_halfedges; bool m_triangulated; bool m_non_empty_facets; bool m_terrain; bool m_normalized_to_sphere; double m_radius; bool m_rounded; int m_rounded_bits; bool m_off_header; public: typedef File_header_extended_OFF Self; File_header_extended_OFF( bool verbose = false) : m_verbose ( verbose), m_polyhedral_surface ( false), m_halfedges ( 0), m_triangulated ( false), m_non_empty_facets ( false), m_terrain ( false), m_normalized_to_sphere ( false), m_radius ( 0.0), m_rounded ( false), m_rounded_bits ( 0), m_off_header ( true) {} bool verbose() const { return m_verbose; } bool polyhedral_surface() const { return m_polyhedral_surface; } std::size_t halfedges() const { return m_halfedges; } std::size_t size_of_halfedges() const { return m_halfedges; } bool triangulated() const { return m_triangulated; } bool non_empty_facets() const { return m_non_empty_facets; } bool terrain() const { return m_terrain; } bool normalized_to_sphere() const { return m_normalized_to_sphere; } double radius() const { return m_radius; } bool rounded() const { return m_rounded; } int rounded_bits() const { return m_rounded_bits; } bool off_header() const { return m_off_header; } bool is_OFF() const { return m_off_header; } bool is_POL() const; bool is_CBP() const; bool is_TRN() const; int is_CBPn() const; int is_TRNn() const; std::string suffix() const; std::string format_name() const; void set_verbose( bool b) { m_verbose = b; } void set_polyhedral_surface( bool b) { m_polyhedral_surface = b; } void set_halfedges( std::size_t h) { m_halfedges = h; } void set_triangulated( bool b) { m_triangulated = b; } void set_non_empty_facets( bool b) { m_non_empty_facets = b; } void set_terrain( bool b) { m_terrain = b; } void set_normalized_to_sphere( bool b) { m_normalized_to_sphere = b;} void set_radius( double d) { m_radius = d; } void set_rounded( bool b) { m_rounded = b; } void set_rounded_bits( int i) { m_rounded_bits = i; } void set_off_header( bool b) { m_off_header = b; } Self& operator+=( const Self& header); }; std::ostream& operator<<( std::ostream& out, const File_header_extended_OFF& h); std::istream& operator>>( std::istream& in, File_header_extended_OFF& h); inline std::istream& skip_until_EOL( std::istream& in) { char c; while ( in.get(c) && c != '\n') ; return in; } inline std::istream& skip_comment_OFF( std::istream& in) { char c; while( (in >> c) && c == '#') in >> skip_until_EOL; in.putback(c); return in; } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_header_OFF.h" 2 namespace CGAL { class File_header_OFF : public File_header_extended_OFF { private: std::size_t n_vertices; std::size_t n_facets; bool m_skel; bool m_binary; bool m_no_comments; std::size_t m_offset; bool m_colors; bool m_normals; bool m_tag4; bool m_tagDim; int m_dim; public: typedef File_header_OFF Self; typedef File_header_extended_OFF Base; explicit File_header_OFF( bool verbose = false); File_header_OFF( bool binary, bool noc, bool skel, bool verbose = false); File_header_OFF( std::size_t v, std::size_t h, std::size_t f, bool binary, bool noc, bool skel, bool verbose = false); File_header_OFF( const File_header_extended_OFF& ext_header); File_header_OFF( const File_header_extended_OFF& ext_header, bool binary, bool noc, bool skel); File_header_OFF( std::size_t v, std::size_t h, std::size_t f, const File_header_extended_OFF& ext_header); File_header_OFF( std::size_t v, std::size_t h, std::size_t f, const File_header_extended_OFF& ext_header, bool binary, bool noc, bool skel); Self& operator= ( const Base& base) { (Base&)(*this) = base; return *this; } std::size_t size_of_vertices() const { return n_vertices; } std::size_t size_of_facets() const { return n_facets; } bool skel() const { return m_skel; } bool off() const { return ! m_skel; } bool binary() const { return m_binary; } bool ascii() const { return ! m_binary; } bool no_comments() const { return m_no_comments; } bool comments() const { return ! m_no_comments; } std::size_t index_offset() const { return m_offset; } bool has_colors() const { return m_colors; } bool has_normals() const { return m_normals;} bool is_homogeneous() const { return m_tag4; } bool n_dimensional() const { return m_tagDim; } int dimension() const { return m_dim; } void set_vertices( std::size_t n) { n_vertices = n; } void set_facets( std::size_t n) { n_facets = n; } void set_skel( bool b) { m_skel = b; } void set_binary( bool b) { m_binary = b; } void set_no_comments( bool b) { m_no_comments = b; } void set_index_offset( std::size_t i) { m_offset = i; } void set_colors( bool b) { m_colors = b; } void set_normals( bool b) { m_normals = b;} void set_homogeneous( bool b) { m_tag4 = b; } void set_dimensional( bool b) { m_tagDim = b; } void set_dimension( int i) { m_dim = i; } Self& operator+=( const Self& header); }; std::ostream& operator<<( std::ostream& out, const File_header_OFF& h); std::istream& operator>>( std::istream& in, File_header_OFF& h); } # 44 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_scanner_OFF.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_scanner_OFF.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_scanner_OFF.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/binary_file_io.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/binary_file_io.h" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 100 "/localhome/glisse2/include/boost/cstdint.hpp" namespace boost { using ::int8_t; using ::int_least8_t; using ::int_fast8_t; using ::uint8_t; using ::uint_least8_t; using ::uint_fast8_t; using ::int16_t; using ::int_least16_t; using ::int_fast16_t; using ::uint16_t; using ::uint_least16_t; using ::uint_fast16_t; using ::int32_t; using ::int_least32_t; using ::int_fast32_t; using ::uint32_t; using ::uint_least32_t; using ::uint_fast32_t; using ::int64_t; using ::int_least64_t; using ::int_fast64_t; using ::uint64_t; using ::uint_least64_t; using ::uint_fast64_t; using ::intmax_t; using ::uintmax_t; } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/binary_file_io.h" 2 namespace CGAL { inline void I_Binary_write_integer32(std::ostream& out, boost::int32_t i) { out.write( (char*)(&i), 4); } inline void I_Binary_write_float32(std::ostream& out, float f) { out.write( (char*)(&f), 4); } inline void I_Binary_read_integer32(std::istream& in, boost::int32_t& i) { in.read( (char*)(&i), 4); } inline void I_Binary_read_float32(std::istream& in, float& f) { in.read( (char*)(&f), 4); } inline void I_swap_to_big_endian( boost::uint32_t& u) { (void) u; u = ((u >> 24) | (u << 24) | ((u >> 8) & 0xff00) | ((u << 8) & 0xff0000)); } inline void I_swap_to_big_endian( boost::int32_t& i) { union { boost::int32_t in; boost::uint32_t ui; } u; u.in = i; I_swap_to_big_endian(u.ui); i = u.in; } inline void I_swap_to_big_endian( float& f) { union { boost::uint32_t ui; float fl; } u; u.fl = f; I_swap_to_big_endian(u.ui); f = u.fl; } inline void I_Binary_write_big_endian_integer32(std::ostream& out, boost::int32_t i) { I_swap_to_big_endian( i); out.write( (char*)(&i), 4); } inline void I_Binary_write_big_endian_float32(std::ostream& out, float f) { I_swap_to_big_endian( f); out.write( (char*)(&f), 4); } inline void I_Binary_read_big_endian_integer32(std::istream& in, boost::int32_t& i) { in.read( (char*)(&i), 4); I_swap_to_big_endian( i); } inline void I_Binary_read_big_endian_float32(std::istream& in, float& f) { in.read( (char*)(&f), 4); I_swap_to_big_endian( f); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_scanner_OFF.h" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_scanner_OFF.h" 2 namespace CGAL { class File_scanner_OFF : public File_header_OFF { std::istream& m_in; bool normals_read; void skip_comment() { m_in >> skip_comment_OFF; } public: File_scanner_OFF( std::istream& in, bool verbose = false) : File_header_OFF(verbose), m_in(in), normals_read(false) { in >> static_cast( *this); } File_scanner_OFF( std::istream& in, const File_header_OFF& header) : File_header_OFF(header), m_in(in), normals_read(false) {} std::istream& in() { return m_in; } void scan_vertex( float& x, float& y, float& z) { if ( binary()) { I_Binary_read_big_endian_float32( m_in, x); I_Binary_read_big_endian_float32( m_in, y); I_Binary_read_big_endian_float32( m_in, z); if ( is_homogeneous()) { float w; I_Binary_read_big_endian_float32( m_in, w); x /= w; y /= w; z /= w; } } else { skip_comment(); m_in >> x >> y >> z; if ( is_homogeneous()) { float w; m_in >> w; x /= w; y /= w; z /= w; } } } void scan_vertex( double& x, double& y, double& z) { if ( binary()) { float f; I_Binary_read_big_endian_float32( m_in, f); x = f; I_Binary_read_big_endian_float32( m_in, f); y = f; I_Binary_read_big_endian_float32( m_in, f); z = f; if ( is_homogeneous()) { I_Binary_read_big_endian_float32( m_in, f); x /= f; y /= f; z /= f; } } else { skip_comment(); m_in >> x >> y >> z; if ( is_homogeneous()) { double w; m_in >> w; x /= w; y /= w; z /= w; } } } void scan_vertex( int& x, int& y, int& z) { if ( binary()) { float fx, fy, fz; I_Binary_read_big_endian_float32( m_in, fx); I_Binary_read_big_endian_float32( m_in, fy); I_Binary_read_big_endian_float32( m_in, fz); if ( is_homogeneous()) { float fw; I_Binary_read_big_endian_float32( m_in, fw); x = int( fx / fw); y = int( fy / fw); z = int( fz / fw); } else { x = int(fx); y = int(fy); z = int(fz); } } else { skip_comment(); if ( is_homogeneous()) { double fx, fy, fz, fw; m_in >> fx >> fy >> fz >> fw; x = int( fx / fw); y = int( fy / fw); z = int( fz / fw); } else { double d; m_in >> d; x = int(d); m_in >> d; y = int(d); m_in >> d; z = int(d); } } } void scan_vertex( float& x, float& y, float& z, float& w) { w = 1; if ( binary()) { I_Binary_read_big_endian_float32( m_in, x); I_Binary_read_big_endian_float32( m_in, y); I_Binary_read_big_endian_float32( m_in, z); if ( is_homogeneous()) I_Binary_read_big_endian_float32( m_in, w); } else { skip_comment(); m_in >> x >> y >> z; if ( is_homogeneous()) m_in >> w; } } void scan_vertex( double& x, double& y, double& z, double& w) { w = 1; if ( binary()) { float f; I_Binary_read_big_endian_float32( m_in, f); x = f; I_Binary_read_big_endian_float32( m_in, f); y = f; I_Binary_read_big_endian_float32( m_in, f); z = f; if ( is_homogeneous()) { I_Binary_read_big_endian_float32( m_in, f); w = f; } } else { skip_comment(); m_in >> x >> y >> z; if ( is_homogeneous()) m_in >> w; } } void scan_vertex( int& x, int& y, int& z, int& w) { w = 1; if ( binary()) { float f; I_Binary_read_big_endian_float32( m_in, f); x = int(f); I_Binary_read_big_endian_float32( m_in, f); y = int(f); I_Binary_read_big_endian_float32( m_in, f); z = int(f); if ( is_homogeneous()) { I_Binary_read_big_endian_float32( m_in, f); w = int(f); } } else { skip_comment(); double d; m_in >> d; x = int(d); m_in >> d; y = int(d); m_in >> d; z = int(d); if ( is_homogeneous()) { m_in >> d; w = int(d); } } } void scan_normal( float& x, float& y, float& z) { if ( has_normals()) { normals_read = true; if ( binary()) { I_Binary_read_big_endian_float32( m_in, x); I_Binary_read_big_endian_float32( m_in, y); I_Binary_read_big_endian_float32( m_in, z); if ( is_homogeneous()) { float w; I_Binary_read_big_endian_float32( m_in, w); x /= w; y /= w; z /= w; } } else { m_in >> x >> y >> z; if ( is_homogeneous()) { float w; m_in >> w; x /= w; y /= w; z /= w; } } } } void scan_normal( double& x, double& y, double& z) { if ( has_normals()) { normals_read = true; if ( binary()) { float fx, fy, fz; I_Binary_read_big_endian_float32( m_in, fx); I_Binary_read_big_endian_float32( m_in, fy); I_Binary_read_big_endian_float32( m_in, fz); if ( is_homogeneous()) { float fw; I_Binary_read_big_endian_float32( m_in, fw); x = fx / fw; y = fy / fw; z = fz / fw; } else { x = fx; y = fy; z = fz; } } else { if ( is_homogeneous()) { float fx, fy, fz, fw; m_in >> fx >> fy >> fz >> fw; x = fx / fw; y = fy / fw; z = fz / fw; } else m_in >> x >> y >> z; } } } void scan_normal( int& x, int& y, int& z) { if ( has_normals()) { normals_read = true; if ( binary()) { float fx, fy, fz; I_Binary_read_big_endian_float32( m_in, fx); I_Binary_read_big_endian_float32( m_in, fy); I_Binary_read_big_endian_float32( m_in, fz); if ( is_homogeneous()) { float fw; I_Binary_read_big_endian_float32( m_in, fw); x = int( fx / fw); y = int( fy / fw); z = int( fz / fw); } else { x = int(fx); y = int(fy); z = int(fz); } } else { if ( is_homogeneous()) { float fx, fy, fz, fw; m_in >> fx >> fy >> fz >> fw; x = int( fx / fw); y = int( fy / fw); z = int( fz / fw); } else { double d; m_in >> d; x = int(d); m_in >> d; y = int(d); m_in >> d; z = int(d); } } } } void scan_normal( float& x, float& y, float& z, float& w) { w = 1; if ( has_normals()) { normals_read = true; if ( binary()) { I_Binary_read_big_endian_float32( m_in, x); I_Binary_read_big_endian_float32( m_in, y); I_Binary_read_big_endian_float32( m_in, z); if ( is_homogeneous()) I_Binary_read_big_endian_float32( m_in, w); } else { m_in >> x >> y >> z; if ( is_homogeneous()) m_in >> w; } } } void scan_normal( double& x, double& y, double& z, double& w) { w = 1; if ( has_normals()) { normals_read = true; if ( binary()) { float f; I_Binary_read_big_endian_float32( m_in, f); x = f; I_Binary_read_big_endian_float32( m_in, f); y = f; I_Binary_read_big_endian_float32( m_in, f); z = f; if ( is_homogeneous()) { I_Binary_read_big_endian_float32( m_in, f); w = f; } } else { m_in >> x >> y >> z; if ( is_homogeneous()) m_in >> w; } } } void scan_normal( int& x, int& y, int& z, int& w) { w = 1; if ( has_normals()) { normals_read = true; if ( binary()) { float f; I_Binary_read_big_endian_float32( m_in, f); x = int(f); I_Binary_read_big_endian_float32( m_in, f); y = int(f); I_Binary_read_big_endian_float32( m_in, f); z = int(f); if ( is_homogeneous()) { I_Binary_read_big_endian_float32( m_in, f); w = int(f); } } else { double d; m_in >> d; x = int(d); m_in >> d; y = int(d); m_in >> d; z = int(d); if ( is_homogeneous()) { m_in >> d; w = int(d); } } } } void skip_to_next_vertex( std::size_t current_vertex); void scan_facet( std::size_t& size, std::size_t current_facet) { (CGAL::possibly(current_facet < size_of_facets())?(static_cast(0)): ::CGAL::assertion_fail( "current_facet < size_of_facets()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/IO/File_scanner_OFF.h", 381)); if ( binary()){ boost::int32_t i32; I_Binary_read_big_endian_integer32( m_in, i32); size = i32; } else { skip_comment(); m_in >> size; } } void scan_facet_vertex_index( std::size_t& index, std::size_t current_facet) { if ( binary()){ boost::int32_t i32; I_Binary_read_big_endian_integer32( m_in, i32); index = i32; } else m_in >> index; if( m_in.fail()) { if ( verbose()) { std::cerr << " " << std::endl; std::cerr << "File_scanner_OFF::" << std::endl; std::cerr << "scan_facet_vertex_index(): input error: " "cannot read OFF file beyond facet " << current_facet << "." << std::endl; } set_off_header( false); return; } bool error = index < index_offset(); index -= index_offset(); if(error || (index >= size_of_vertices())) { m_in.clear( std::ios::failbit); if ( verbose()) { std::cerr << " " << std::endl; std::cerr << "File_scanner_OFF::" << std::endl; std::cerr << "scan_facet_vertex_index(): input error: " "facet " << current_facet << ": vertex index " << index + index_offset() << ": is out of range." << std::endl; } set_off_header( false); return; } } void skip_to_next_facet( std::size_t current_facet); }; template < class Point> inline Point& file_scan_vertex( File_scanner_OFF& scanner, Point& p) { typedef typename Point::R R; typedef typename R::RT RT; double x, y, z, w; scanner.scan_vertex( x, y, z, w); if ( w == 1) p = Point( RT(x), RT(y), RT(z)); else p = Point( RT(x), RT(y), RT(z), RT(w)); return p; } template < class Vector> inline Vector& file_scan_normal( File_scanner_OFF& scanner, Vector& v) { typedef typename Vector::R R; typedef typename R::RT RT; double x, y, z, w; scanner.scan_normal( x, y, z, w); if ( w == 1) v = Vector( RT(x), RT(y), RT(z)); else v = Vector( RT(x), RT(y), RT(z), RT(w)); return v; } } # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" 2 namespace CGAL { template < class Vb = Triangulation_ds_vertex_base_2<>, class Fb = Triangulation_ds_face_base_2<> > class Triangulation_data_structure_2 :public Triangulation_cw_ccw_2 { typedef Triangulation_data_structure_2 Tds; typedef typename Vb::template Rebind_TDS::Other Vertex_base; typedef typename Fb::template Rebind_TDS::Other Face_base; friend class Triangulation_ds_edge_iterator_2; friend class Triangulation_ds_face_circulator_2; friend class Triangulation_ds_edge_circulator_2; friend class Triangulation_ds_vertex_circulator_2; public: typedef Vertex_base Vertex; typedef Face_base Face; typedef Compact_container Face_range; typedef Compact_container Vertex_range; typedef typename Face_range::size_type size_type; typedef typename Face_range::difference_type difference_type; typedef typename Face_range::iterator Face_iterator; typedef typename Vertex_range::iterator Vertex_iterator; typedef Triangulation_ds_edge_iterator_2 Edge_iterator; typedef Triangulation_ds_face_circulator_2 Face_circulator; typedef Triangulation_ds_vertex_circulator_2 Vertex_circulator; typedef Triangulation_ds_edge_circulator_2 Edge_circulator; typedef Vertex_iterator Vertex_handle; typedef Face_iterator Face_handle; typedef std::pair Edge; typedef std::list List_edges; protected: int _dimension; Face_range _faces; Vertex_range _vertices; public: Triangulation_data_structure_2(); Triangulation_data_structure_2(const Tds &tds); ~Triangulation_data_structure_2(); Tds& operator= (const Tds &tds); void swap(Tds &tds); Face_range& faces() { return _faces;} Face_range& faces() const { return const_cast(this)->_faces;} Vertex_range& vertices() {return _vertices;} Vertex_range& vertices() const {return const_cast(this)->_vertices;} int dimension() const { return _dimension; } size_type number_of_vertices() const {return vertices().size();} size_type number_of_faces() const ; size_type number_of_edges() const; size_type number_of_full_dim_faces() const; bool is_vertex(Vertex_handle v) const; bool is_edge(Face_handle fh, int i) const; bool is_edge(Vertex_handle va, Vertex_handle vb) const; bool is_edge(Vertex_handle va, Vertex_handle vb, Face_handle& fr, int& i) const; bool is_face(Face_handle fh) const; bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const; bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Face_handle& fr) const; public: Face_iterator face_iterator_base_begin() const { return faces().begin(); } Face_iterator face_iterator_base_end() const { return faces().end(); } public: Face_iterator faces_begin() const { if (dimension() < 2) return faces_end(); return faces().begin(); } Face_iterator faces_end() const { return faces().end(); } Vertex_iterator vertices_begin() const { return vertices().begin(); } Vertex_iterator vertices_end() const { return vertices().end(); } Edge_iterator edges_begin() const { return Edge_iterator(this); } Edge_iterator edges_end() const { return Edge_iterator(this,1); } Face_circulator incident_faces(Vertex_handle v, Face_handle f = Face_handle()) const{ return Face_circulator(v,f); } Vertex_circulator incident_vertices(Vertex_handle v, Face_handle f = Face_handle()) const { return Vertex_circulator(v,f); } Edge_circulator incident_edges(Vertex_handle v, Face_handle f = Face_handle()) const{ return Edge_circulator(v,f); } size_type degree(Vertex_handle v) const { int count = 0; Vertex_circulator vc = incident_vertices(v), done(vc); if ( ! vc.is_empty()) { do { count += 1; } while (++vc != done); } return count; } Vertex_handle mirror_vertex(Face_handle f, int i) const { (CGAL::possibly(f->neighbor(i) != Face_handle() && f->dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "f->neighbor(i) != Face_handle() && f->dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 201 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 202 # 201 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; return f->neighbor(i)->vertex(mirror_index(f,i)); } int mirror_index(Face_handle f, int i) const { (CGAL::possibly(f->neighbor(i) != Face_handle() && f->dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "f->neighbor(i) != Face_handle() && f->dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 210 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 211 # 210 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; if (f->dimension() == 1) { return 1 - (f->neighbor(i)->index(f->vertex(1-i))); } return ccw( f->neighbor(i)->index(f->vertex(ccw(i)))); } Edge mirror_edge(const Edge e) const { (CGAL::possibly(e.first->neighbor(e.second) != Face_handle() && e.first->dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "e.first->neighbor(e.second) != Face_handle() && e.first->dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 221 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 222 # 221 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; return Edge(e.first->neighbor(e.second), mirror_index(e.first, e.second)); } void flip(Face_handle f, int i); Vertex_handle insert_first(); Vertex_handle insert_second(); Vertex_handle insert_in_face(Face_handle f); Vertex_handle insert_in_edge(Face_handle f, int i); Vertex_handle insert_dim_up(Vertex_handle w = Vertex_handle(), bool orient=true); void remove_degree_3(Vertex_handle v, Face_handle f = Face_handle()); void remove_1D(Vertex_handle v); void remove_second(Vertex_handle v); void remove_first(Vertex_handle v); void remove_dim_down(Vertex_handle v); void dim_down(Face_handle f, int i); Vertex_handle star_hole(List_edges& hole); void star_hole(Vertex_handle v, List_edges& hole); void make_hole(Vertex_handle v, List_edges& hole); # 268 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" Vertex_handle create_vertex(const Vertex &v = Vertex()); Vertex_handle create_vertex(Vertex_handle v); Face_handle create_face(const Face& f = Face()); Face_handle create_face(Face_handle f); Face_handle create_face(Face_handle f1, int i1, Face_handle f2, int i2, Face_handle f3, int i3); Face_handle create_face(Face_handle f1, int i1, Face_handle f2, int i2); Face_handle create_face(Face_handle f1, int i1, Vertex_handle v); Face_handle create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3); Face_handle create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Face_handle f1, Face_handle f2, Face_handle f3); void set_adjacency(Face_handle f0, int i0, Face_handle f1, int i1) const; void delete_face(Face_handle); void delete_vertex(Vertex_handle); protected: Vertex_handle join_vertices(Face_handle f, int i, Vertex_handle v); typedef boost::tuples::tuple Fourtuple; public: Fourtuple split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1); inline Vertex_handle join_vertices(Face_handle f, int i) { return join_vertices(f, i, f->vertex( ccw(i) )); } inline Vertex_handle join_vertices(Edge e) { return join_vertices(e.first, e.second); } inline Vertex_handle join_vertices(Edge_iterator eit) { return join_vertices(*eit); } inline Vertex_handle join_vertices(Edge_circulator ec) { return join_vertices(*ec); } Vertex_handle insert_degree_2(Face_handle f, int i); void remove_degree_2(Vertex_handle v); bool is_valid(bool verbose = false, int level = 0) const; private: typedef std::pair Vh_pair; void set_adjacency(Face_handle fh, int ih, std::map< Vh_pair, Edge>& edge_map); void reorient_faces(); bool dim_down_precondition(Face_handle f, int i); public: void clear(); Vertex_handle copy_tds(const Tds &tds, Vertex_handle = Vertex_handle()); Vertex_handle file_input(std::istream& is, bool skip_first=false); void file_output(std::ostream& os, Vertex_handle v = Vertex_handle(), bool skip_first=false) const; Vertex_handle off_file_input(std::istream& is, bool verbose=false); void vrml_output(std::ostream& os, Vertex_handle v = Vertex_handle(), bool skip_first=false) const; void set_dimension (int n) {_dimension = n ;} public: template< class EdgeIt> Vertex_handle star_hole(EdgeIt edge_begin, EdgeIt edge_end) { Vertex_handle newv = create_vertex(); star_hole(newv, edge_begin, edge_end); return newv; } template< class EdgeIt> void star_hole(Vertex_handle v, EdgeIt edge_begin, EdgeIt edge_end) { std::list empty_list; star_hole(v, edge_begin, edge_end, empty_list.begin(), empty_list.end()); return; } template< class EdgeIt, class FaceIt> Vertex_handle star_hole(EdgeIt edge_begin, EdgeIt edge_end, FaceIt face_begin, FaceIt face_end) { Vertex_handle newv = create_vertex(); star_hole(newv, edge_begin, edge_end, face_begin, face_end); return newv; } template< class EdgeIt, class FaceIt> void star_hole(Vertex_handle newv, EdgeIt edge_begin, EdgeIt edge_end, FaceIt face_begin, FaceIt face_end) { (CGAL::possibly(dimension() == 2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension() == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 413)); EdgeIt eit = edge_begin; FaceIt fit = face_begin; Face_handle fn = (*eit).first; int in = (*eit).second; fn->vertex(cw(in))->set_face(fn); Face_handle first_f = reset_or_create_face(fn, in , newv, fit, face_end); Face_handle previous_f=first_f, next_f; ++eit; for( ; eit != edge_end ; eit++) { fn = (*eit).first; in = (*eit).second; fn->vertex(cw(in))->set_face(fn); next_f = reset_or_create_face(fn, in , newv, fit, face_end); set_adjacency(next_f, 1, previous_f, 0); previous_f=next_f; } set_adjacency(next_f, 0, first_f, 1); newv->set_face(first_f); return; } private: template< class FaceIt> Face_handle reset_or_create_face(Face_handle fn, int in, Vertex_handle v, FaceIt& fit, const FaceIt& face_end) { if (fit == face_end) return create_face(fn, in, v); (*fit)->set_vertices(fn->vertex(cw(in)), fn->vertex(ccw(in)), v); (*fit)->set_neighbors(Face_handle(),Face_handle(),fn); fn->set_neighbor(in, *fit); return *fit++; } }; template < class Gt , class Vb, class Fb> class Triangulation_default_data_structure_2 : public Triangulation_data_structure_2 { public: typedef Triangulation_data_structure_2 Tds; typedef Triangulation_default_data_structure_2 Tdds; typedef Gt Geom_traits; Triangulation_default_data_structure_2(const Geom_traits& = Geom_traits()) : Tds() {} Triangulation_default_data_structure_2(const Tdds &tdds) : Tds(tdds) {} }; template class Triangulation_data_structure_using_list_2 :public Triangulation_data_structure_2 { public: typedef Triangulation_data_structure_2 Tds; typedef Triangulation_data_structure_using_list_2 Tdsul; Triangulation_data_structure_using_list_2(): Tds() {} Triangulation_data_structure_using_list_2(const Tdsul &tdsul) : Tds(tdsul) {} }; template < class Vb, class Fb> Triangulation_data_structure_2 :: Triangulation_data_structure_2() : _dimension(-2) { } template < class Vb, class Fb> Triangulation_data_structure_2 :: Triangulation_data_structure_2(const Tds &tds) { copy_tds(tds); } template < class Vb, class Fb> Triangulation_data_structure_2 :: ~Triangulation_data_structure_2() { clear(); } template < class Vb, class Fb> Triangulation_data_structure_2& Triangulation_data_structure_2 :: operator= (const Tds &tds) { copy_tds(tds); return *this; } template < class Vb, class Fb> void Triangulation_data_structure_2:: clear() { faces().clear(); vertices().clear(); set_dimension(-2); return; } template < class Vb, class Fb> void Triangulation_data_structure_2:: swap(Tds &tds) { (static_cast(0)); std::swap(_dimension, tds._dimension); faces().swap(tds.faces()); vertices().swap(tds.vertices()); return; } template inline typename Triangulation_data_structure_2::size_type Triangulation_data_structure_2 :: number_of_faces() const { if (dimension() < 2) return 0; return faces().size(); } template inline typename Triangulation_data_structure_2::size_type Triangulation_data_structure_2:: number_of_edges() const { switch (dimension()) { case 1: return number_of_vertices(); case 2: return 3*number_of_faces()/2; default: return 0; } } template typename Triangulation_data_structure_2::size_type Triangulation_data_structure_2:: number_of_full_dim_faces() const { return faces().size(); } template inline bool Triangulation_data_structure_2:: is_vertex(Vertex_handle v) const { Vertex_iterator vit = vertices_begin(); while (vit != vertices_end() && v != vit) ++vit; return v == vit; } template inline bool Triangulation_data_structure_2:: is_edge(Face_handle fh, int i) const { if ( dimension() == 0 ) return false; if ( dimension() == 1 && i != 2) return false; if (i > 2) return false; Face_iterator fit = face_iterator_base_begin(); while (fit != face_iterator_base_end() && fh != fit ) ++fit; return fh == fit; } template bool Triangulation_data_structure_2:: is_edge(Vertex_handle va, Vertex_handle vb) const { Vertex_circulator vc = incident_vertices(va), done(vc); if ( vc == 0) return false; do { if( vb == vc ) {return true;} } while (++vc != done); return false; } template bool Triangulation_data_structure_2:: is_edge(Vertex_handle va, Vertex_handle vb, Face_handle &fr, int & i) const { Face_handle fc = va->face(); Face_handle start = fc; if (fc == 0) return false; int inda, indb; do { inda=fc->index(va); indb = (dimension() == 2 ? cw(inda) : 1-inda); if(fc->vertex(indb) == vb) { fr=fc; i = 3 - inda - indb; return true; } fc=fc->neighbor(indb); } while (fc != start); return false; } template inline bool Triangulation_data_structure_2:: is_face(Face_handle fh) const { if (dimension() < 2) return false; Face_iterator fit = faces_begin(); while (fit != faces_end() && fh != fit ) ++fit; return fh == fit; } template inline bool Triangulation_data_structure_2:: is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const { Face_handle f; return is_face(v1,v2,v3,f); } template bool Triangulation_data_structure_2:: is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Face_handle &f) const { if (dimension() != 2) return false; int i; bool b = is_edge(v1,v2,f,i); if (!b) return false; else if (v3== f->vertex(i)) return true; f = f-> neighbor(i); int ind1= f->index(v1); int ind2= f->index(v2); if (v3 == f->vertex(3-ind1-ind2)) { return true;} return false; } template void Triangulation_data_structure_2:: flip(Face_handle f, int i) { (CGAL::possibly(dimension()==2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension()==2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 686)); Face_handle n = f->neighbor(i); int ni = mirror_index(f,i); Vertex_handle v_cw = f->vertex(cw(i)); Vertex_handle v_ccw = f->vertex(ccw(i)); Face_handle tr = f->neighbor(ccw(i)); int tri = mirror_index(f,ccw(i)); Face_handle bl = n->neighbor(ccw(ni)); int bli = mirror_index(n,ccw(ni)); f->set_vertex(cw(i), n->vertex(ni)); n->set_vertex(cw(ni), f->vertex(i)); set_adjacency(f, i, bl, bli); set_adjacency(f, ccw(i), n, ccw(ni)); set_adjacency(n, ni, tr, tri); if(v_cw->face() == f) { v_cw->set_face(n); } if(v_ccw->face() == n) { v_ccw->set_face(f); } } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_first( ) { (CGAL::possibly(number_of_vertices() == 0 && dimension()==-2)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices() == 0 && dimension()==-2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 721 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 722 # 721 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; return insert_dim_up(); } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_second() { (CGAL::possibly(number_of_vertices() == 1 && dimension()==-1)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices() == 1 && dimension()==-1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 731 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 732 # 731 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; return insert_dim_up(); } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_in_face(Face_handle f) { (CGAL::possibly(f != Face_handle() && dimension()== 2)?(static_cast(0)): ::CGAL::precondition_fail( "f != Face_handle() && dimension()== 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 744)); Vertex_handle v = create_vertex(); Vertex_handle v0 = f->vertex(0); Vertex_handle v2 = f->vertex(2); Vertex_handle v1 = f->vertex(1); Face_handle n1 = f->neighbor(1); Face_handle n2 = f->neighbor(2); Face_handle f1 = create_face(v0, v, v2, f, n1, Face_handle()); Face_handle f2 = create_face(v0, v1, v, f, Face_handle(), n2); set_adjacency(f1, 2, f2, 1); if (n1 != Face_handle()) { int i1 = mirror_index(f,1); n1->set_neighbor(i1,f1); } if (n2 != Face_handle()) { int i2 = mirror_index(f,2); n2->set_neighbor(i2,f2);} f->set_vertex(0, v); f->set_neighbor(1, f1); f->set_neighbor(2, f2); if( v0->face() == f ) { v0->set_face(f2); } v->set_face(f); return v; } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_in_edge(Face_handle f, int i) { (CGAL::possibly(f != Face_handle() && dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "f != Face_handle() && dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 783)); if (dimension() == 1) {(CGAL::possibly(i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 784));} if (dimension() == 2) {(CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 785 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 787 # 785 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ;} Vertex_handle v; if (dimension() == 1) { v = create_vertex(); Face_handle ff = f->neighbor(0); Vertex_handle vv = f->vertex(1); Face_handle g = create_face(v,vv,Vertex_handle(),ff, f, Face_handle()); f->set_vertex(1,v);f->set_neighbor(0,g); ff->set_neighbor(1,g); v->set_face(g); vv->set_face(ff); } else { Face_handle n = f->neighbor(i); int in = mirror_index(f,i); v = insert_in_face(f); flip(n,in); } return v; } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_dim_up(Vertex_handle w, bool orient) { Vertex_handle v = create_vertex(); set_dimension( dimension() + 1); Face_handle f1; Face_handle f2; const int dim = dimension(); switch (dim) { case -1: f1 = create_face(v,Vertex_handle(),Vertex_handle()); v->set_face(f1); break; case 0 : f1 = face_iterator_base_begin(); f2 = create_face(v,Vertex_handle(),Vertex_handle()); set_adjacency(f1, 0, f2, 0); v->set_face(f2); break; case 1 : case 2 : { std::list faces_list; Face_iterator ib= face_iterator_base_begin(); Face_iterator ib_end = face_iterator_base_end(); for (; ib != ib_end ; ++ib){ faces_list.push_back( ib); } std::list to_delete; typename std::list::iterator lfit = faces_list.begin(); Face_handle f, g; for ( ; lfit != faces_list.end() ; ++lfit) { f = * lfit; g = create_face(f); f->set_vertex(dim,v); g->set_vertex(dim,w); set_adjacency(f, dim, g, dim); if (f->has_vertex(w)) to_delete.push_back(g); } lfit = faces_list.begin(); for ( ; lfit != faces_list.end() ; ++lfit) { f = * lfit; g = f->neighbor(dim); for(int j = 0; j < dim ; ++j) { g->set_neighbor(j, f->neighbor(j)->neighbor(dim)); } } lfit = faces_list.begin() ; if (dim == 1){ if (orient) { (*lfit)->reorient(); ++lfit ; (*lfit)->neighbor(1)->reorient(); } else { (*lfit)->neighbor(1)->reorient(); ++lfit ; (*lfit)->reorient(); } } else { for( ;lfit != faces_list.end(); ++lfit ) { if (orient) {(*lfit)->neighbor(2)->reorient();} else { (*lfit)->reorient();} } } lfit = to_delete.begin(); int i1, i2; for ( ;lfit != to_delete.end(); ++lfit){ f = *lfit ; int j ; if (f->vertex(0) == w) {j=0;} else {j=1;} f1= f->neighbor(dim); i1= mirror_index(f,dim); f2= f->neighbor(j); i2= mirror_index(f,j); set_adjacency(f1, i1, f2, i2); delete_face(f); } v->set_face( *(faces_list.begin())); } break; default: (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 907)); break; } return v; } template void Triangulation_data_structure_2:: remove_degree_3(Vertex_handle v, Face_handle f) { (CGAL::possibly(v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 919)); (CGAL::possibly(degree(v) == 3)?(static_cast(0)): ::CGAL::precondition_fail( "degree(v) == 3" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 920)); if (f == Face_handle()) {f= v->face();} else { (CGAL::possibly(f->has_vertex(v))?(static_cast(0)): ::CGAL::assertion_fail( "f->has_vertex(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 923));} int i = f->index(v); Face_handle left = f->neighbor(cw(i)); int li = mirror_index(f,cw(i)); Face_handle right = f->neighbor(ccw(i)); int ri = mirror_index(f,ccw(i)); Face_handle ll, rr; Vertex_handle q = left->vertex(li); (CGAL::possibly(left->vertex(li) == right->vertex(ri))?(static_cast(0)): ::CGAL::assertion_fail( "left->vertex(li) == right->vertex(ri)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 933)); ll = left->neighbor(cw(li)); if(ll != Face_handle()) { int lli = mirror_index(left,cw(li)); ll->set_neighbor(lli, f); } f->set_neighbor(cw(i), ll); if (f->vertex(ccw(i))->face() == left) f->vertex(ccw(i))->set_face(f); rr = right->neighbor(ccw(ri)); if(rr != Face_handle()) { int rri = mirror_index(right,ccw(ri)); rr->set_neighbor(rri, f); } f->set_neighbor(ccw(i), rr); if (f->vertex(cw(i))->face() == right) f->vertex(cw(i))->set_face(f); f->set_vertex(i, q); if (q->face() == right || q->face() == left) { q->set_face(f); } delete_face(right); delete_face(left); delete_vertex(v); } template void Triangulation_data_structure_2:: dim_down(Face_handle f, int i) { (static_cast(0)); (CGAL::possibly(dimension() == 2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension() == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 967)); (CGAL::possibly(number_of_vertices() > 3)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices() > 3" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 968)); (CGAL::possibly(degree( f->vertex(i) ) == number_of_vertices()-1)?(static_cast(0)): ::CGAL::precondition_fail( "degree( f->vertex(i) ) == number_of_vertices()-1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 969 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 970 # 969 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; Vertex_handle v = f->vertex(i); std::list to_delete; std::list to_downgrade; Face_iterator ib = face_iterator_base_begin(); for( ; ib != face_iterator_base_end(); ++ib ){ if ( ! ib->has_vertex(v) ) { to_delete.push_back(ib);} else { to_downgrade.push_back(ib);} } typename std::list::iterator lfit = to_downgrade.begin(); int j; for( ; lfit != to_downgrade.end() ; ++lfit) { Face_handle fs = *lfit; j = fs->index(v); if (j == 0) fs->cw_permute(); else if(j == 1) fs->ccw_permute(); fs->set_vertex(2, Vertex_handle()); fs->set_neighbor(2, Face_handle()); fs->vertex(0)->set_face(fs); } lfit = to_delete.begin(); for( ; lfit != to_delete.end() ; ++lfit) { delete_face(*lfit); } set_dimension(dimension() -1); Face_handle n0 = f->neighbor(0); Vertex_handle v1 = f->vertex(1); f->set_vertex(1, v); Face_handle fl = create_face(v, v1, Vertex_handle(), n0, f, Face_handle()); f->set_neighbor(0, fl); n0->set_neighbor(1, fl); v->set_face(f); } template void Triangulation_data_structure_2:: remove_dim_down(Vertex_handle v) { Face_handle f; switch( dimension()){ case -1: delete_face(v->face()); break; case 0: f = v->face(); f->neighbor(0)->set_neighbor(0,Face_handle()); delete_face(v->face()); break; case 1: case 2: std::list to_delete; std::list to_downgrade; Face_iterator ib = face_iterator_base_begin(); for( ; ib != face_iterator_base_end(); ++ib ){ if ( ! ib->has_vertex(v) ) { to_delete.push_back(ib);} else { to_downgrade.push_back(ib);} } typename std::list::iterator lfit = to_downgrade.begin(); int j; for( ; lfit != to_downgrade.end() ; ++lfit) { f = *lfit; j = f->index(v); if (dimension() == 1) { if (j == 0) f->reorient(); f->set_vertex(1,Vertex_handle()); f->set_neighbor(1, Face_handle()); } else { if (j == 0) f->cw_permute(); else if(j == 1) f->ccw_permute(); f->set_vertex(2, Vertex_handle()); f->set_neighbor(2, Face_handle()); } f->vertex(0)->set_face(f); } lfit = to_delete.begin(); for( ; lfit != to_delete.end() ; ++lfit) { delete_face(*lfit); } } delete_vertex(v); set_dimension(dimension() -1); return; } template < class Vb, class Fb> void Triangulation_data_structure_2:: remove_1D(Vertex_handle v) { (CGAL::possibly(dimension() == 1 && number_of_vertices() > 3)?(static_cast(0)): ::CGAL::precondition_fail( "dimension() == 1 && number_of_vertices() > 3" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 1071 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 1072 # 1071 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; Face_handle f = v->face(); int i = f->index(v); if (i==0) {f = f->neighbor(1);} (CGAL::possibly(f->index(v) == 1)?(static_cast(0)): ::CGAL::assertion_fail( "f->index(v) == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1076)); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); set_adjacency(f, 0, g->neighbor(0), 1); g->vertex(1)->set_face(f); delete_face(g); delete_vertex(v); return; } template inline void Triangulation_data_structure_2:: remove_second(Vertex_handle v) { (CGAL::possibly(number_of_vertices()== 2 && dimension() == 0)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices()== 2 && dimension() == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 1093 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 1094 # 1093 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; remove_dim_down(v); return; } template inline void Triangulation_data_structure_2:: remove_first(Vertex_handle v) { (CGAL::possibly(number_of_vertices()== 1 && dimension() == -1)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices()== 1 && dimension() == -1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 1105 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 1106 # 1105 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; remove_dim_down(v); return; } template inline typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: star_hole(List_edges& hole) { Vertex_handle newv = create_vertex(); star_hole(newv, hole); return newv; } template void Triangulation_data_structure_2:: star_hole(Vertex_handle newv, List_edges& hole) { star_hole(newv, hole.begin(), hole.end()); return; } template void Triangulation_data_structure_2:: make_hole(Vertex_handle v, List_edges& hole) { (CGAL::possibly(dimension() == 2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension() == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1142)); std::list to_delete; Face_handle f, fn; int i =0, in =0; Vertex_handle vv; Face_circulator fc = incident_faces(v); Face_circulator done(fc); do { f = fc ; i = f->index(v); fn = f->neighbor(i); in = mirror_index(f,i); vv = f->vertex(cw(i)); if( vv->face()== f) vv->set_face(fn); vv = fc->vertex(ccw(i)); if( vv->face()== f) vv->set_face(fn); fn->set_neighbor(in, Face_handle()); hole.push_back(Edge(fn,in)); to_delete.push_back(f); } while(++fc != done); while (! to_delete.empty()){ delete_face(to_delete.front()); to_delete.pop_front(); } delete_vertex(v); return; } template inline typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: create_vertex(const Vertex &v) { return vertices().insert(v); } template inline typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: create_vertex(Vertex_handle vh) { return vertices().insert(*vh); } template typename Triangulation_data_structure_2::Face_handle Triangulation_data_structure_2:: create_face(const Face& f) { return faces().insert(f); } template typename Triangulation_data_structure_2::Face_handle Triangulation_data_structure_2:: create_face( Face_handle fh) { return create_face(*fh); } template typename Triangulation_data_structure_2::Face_handle Triangulation_data_structure_2:: create_face(Face_handle f1, int i1, Face_handle f2, int i2, Face_handle f3, int i3) { Face_handle newf = faces().emplace(f1->vertex(cw(i1)), f2->vertex(cw(i2)), f3->vertex(cw(i3)), f2, f3, f1); f1->set_neighbor(i1,newf); f2->set_neighbor(i2,newf); f3->set_neighbor(i3,newf); return newf; } template typename Triangulation_data_structure_2::Face_handle Triangulation_data_structure_2:: create_face(Face_handle f1, int i1, Face_handle f2, int i2) { Face_handle newf = faces().emplace(f1->vertex(cw(i1)), f2->vertex(cw(i2)), f2->vertex(ccw(i2)), f2, Face_handle(), f1); f1->set_neighbor(i1,newf); f2->set_neighbor(i2,newf); return newf; } template typename Triangulation_data_structure_2::Face_handle Triangulation_data_structure_2:: create_face(Face_handle f1, int i1, Vertex_handle v) { Face_handle newf = create_face(); newf->set_vertices(f1->vertex(cw(i1)), f1->vertex(ccw(i1)), v); newf->set_neighbors(Face_handle(), Face_handle(), f1); f1->set_neighbor(i1,newf); return newf; } template typename Triangulation_data_structure_2::Face_handle Triangulation_data_structure_2:: create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) { Face_handle newf = faces().emplace(v1, v2, v3); return newf; } template typename Triangulation_data_structure_2::Face_handle Triangulation_data_structure_2:: create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Face_handle f1, Face_handle f2, Face_handle f3) { Face_handle newf = faces().emplace(v1, v2, v3, f1, f2, f3); return(newf); } template inline void Triangulation_data_structure_2:: set_adjacency(Face_handle f0, int i0, Face_handle f1, int i1) const { (CGAL::possibly(i0 >= 0 && i0 <= dimension())?(static_cast(0)): ::CGAL::assertion_fail( "i0 >= 0 && i0 <= dimension()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1279)); (CGAL::possibly(i1 >= 0 && i1 <= dimension())?(static_cast(0)): ::CGAL::assertion_fail( "i1 >= 0 && i1 <= dimension()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1280)); (CGAL::possibly(f0 != f1)?(static_cast(0)): ::CGAL::assertion_fail( "f0 != f1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1281)); f0->set_neighbor(i0,f1); f1->set_neighbor(i1,f0); } template inline void Triangulation_data_structure_2:: delete_face(Face_handle f) { (static_cast(0)); (static_cast(0)); (static_cast(0)) ; faces().erase(f); } template inline void Triangulation_data_structure_2:: delete_vertex(Vertex_handle v) { (static_cast(0)); vertices().erase(v); } template typename Triangulation_data_structure_2::Fourtuple Triangulation_data_structure_2:: split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1) { # 1359 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" (static_cast(0)); (CGAL::possibly(dimension() == 2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension() == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1361)); (CGAL::possibly(f1 != Face_handle() && f1->has_vertex(v))?(static_cast(0)): ::CGAL::precondition_fail( "f1 != Face_handle() && f1->has_vertex(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1362)); (CGAL::possibly(g1 != Face_handle() && g1->has_vertex(v))?(static_cast(0)): ::CGAL::precondition_fail( "g1 != Face_handle() && g1->has_vertex(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1363)); int i1 = f1->index(v); int j1 = g1->index(v); Face_handle f2 = f1->neighbor( cw(i1) ); Face_handle g2 = g1->neighbor( cw(j1) ); int i2 = f2->index(v); int j2 = g2->index(v); Vertex_handle v3 = f1->vertex( ccw(i1) ); Vertex_handle v4 = g1->vertex( ccw(j1) ); std::list lst; std::list idx; Face_circulator fc(v, g1); Face_handle ff(fc); while ( ff != f2 ) { lst.push_back( ff ); idx.push_back( ff->index(v) ); fc++; ff = Face_handle(fc); } lst.push_back( ff ); idx.push_back( ff->index(v) ); Vertex_handle v1 = v; Vertex_handle v2 = create_vertex(); Face_handle f = create_face(v1, v2, v3); Face_handle g = create_face(v2, v1, v4); f->set_neighbor(0, f2); f->set_neighbor(1, f1); f->set_neighbor(2, g); g->set_neighbor(0, g2); g->set_neighbor(1, g1); g->set_neighbor(2, f); v1->set_face(f); v2->set_face(g); typename std::list::iterator fit = lst.begin(); typename std::list::iterator iit = idx.begin(); for (; fit != lst.end(); ++fit, ++iit) { (*fit)->set_vertex(*iit, v2); } lst.clear(); idx.clear(); f1->set_neighbor( cw(i1), f ); f2->set_neighbor( ccw(i2), f ); g1->set_neighbor( cw(j1), g ); g2->set_neighbor( ccw(j2), g ); (static_cast(0)); return Fourtuple(v1, v2, f, g); } template typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: join_vertices(Face_handle f, int i, Vertex_handle v) { (static_cast(0)); (CGAL::possibly(f != Face_handle())?(static_cast(0)): ::CGAL::precondition_fail( "f != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1442)); (CGAL::possibly(i >= 0 && i <= 2)?(static_cast(0)): ::CGAL::precondition_fail( "i >= 0 && i <= 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1443)); Vertex_handle v1 = f->vertex( ccw(i) ); Vertex_handle v2 = f->vertex( cw(i) ); (CGAL::possibly(v == v1 || v == v2)?(static_cast(0)): ::CGAL::precondition_fail( "v == v1 || v == v2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1451)); if ( v == v2 ) { return join_vertices(f->neighbor(i), mirror_index(f,i), v); } int deg2 = degree(v2); (CGAL::possibly(deg2 >= 3)?(static_cast(0)): ::CGAL::precondition_fail( "deg2 >= 3" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1459)); if ( deg2 == 3 ) { remove_degree_3(v2, f->neighbor(ccw(i))); return v1; } # 1505 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" Face_handle g = f->neighbor(i); int j = mirror_index(f,i); Face_handle tl = f->neighbor( cw(i) ); Face_handle tr = f->neighbor( ccw(i) ); int itl = mirror_index(f, cw(i) ); int itr = mirror_index(f, ccw(i) ); Face_handle bl = g->neighbor( ccw(j) ); Face_handle br = g->neighbor( cw(j) ); int ibl = mirror_index(g, ccw(j) ); int ibr = mirror_index(g, cw(j) ); std::vector star_faces_of_v2; std::vector star_indices_of_v2; Face_circulator fc_start(v2); Face_circulator fc = fc_start; do { Face_handle ff(fc); star_faces_of_v2.push_back(ff); star_indices_of_v2.push_back(ff->index(v2)); ++fc; } while ( fc != fc_start ); (CGAL::possibly(int(star_faces_of_v2.size()) == deg2)?(static_cast(0)): ::CGAL::assertion_fail( "int(star_faces_of_v2.size()) == deg2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1535)); set_adjacency(tl, itl, tr, itr); set_adjacency(bl, ibl, br, ibr); for (unsigned int k = 0; k < star_faces_of_v2.size(); k++) { int id = star_indices_of_v2[k]; (CGAL::possibly(star_faces_of_v2[k]->vertex(id) == v2)?(static_cast(0)): ::CGAL::assertion_fail( "star_faces_of_v2[k]->vertex(id) == v2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1547)); star_faces_of_v2[k]->set_vertex( id, v1 ); } Vertex_handle v3 = f->vertex(i); Vertex_handle v4 = g->vertex(j); if ( v3->face() == f ) v3->set_face(tr); if ( v4->face() == g ) v4->set_face(br); if ( v1->face() == f || v1->face() == g ) v1->set_face(tl); for (Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) { int id; (CGAL::possibly(!fit->has_vertex(v2, id))?(static_cast(0)): ::CGAL::assertion_fail( "!fit->has_vertex(v2, id)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1563)); } star_faces_of_v2.clear(); star_indices_of_v2.clear(); delete_face(f); delete_face(g); delete_vertex(v2); (static_cast(0)); return v1; } template typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: insert_degree_2(Face_handle f, int i) { # 1611 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" Face_handle g = f->neighbor(i); int j = mirror_index(f,i); Vertex_handle v = create_vertex(); Vertex_handle v0 = f->vertex( ccw(i) ); Vertex_handle v1 = f->vertex( cw(i) ); Face_handle f_undef; Face_handle f1 = create_face(v0, v, v1, f_undef, f, f_undef); Face_handle f2 = create_face(v0, v1, v, f_undef, f_undef, g); set_adjacency(f1, 0, f2, 0); set_adjacency(f1, 2, f2, 1); f->set_neighbor(i, f1); g->set_neighbor(j, f2); v->set_face(f1); return v; } template void Triangulation_data_structure_2:: remove_degree_2(Vertex_handle v) { (CGAL::possibly(degree(v) == 2)?(static_cast(0)): ::CGAL::precondition_fail( "degree(v) == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1640)); Face_handle f1 = v->face(); int i = f1->index(v); Face_handle f2 = f1->neighbor( ccw(i) ); int j = f2->index(v); Face_handle ff1 = f1->neighbor( i ); Face_handle ff2 = f2->neighbor( j ); int id1 = mirror_index(f1,i); int id2 = mirror_index(f2,j); set_adjacency(ff1, id1, ff2, id2); Vertex_handle v1 = f1->vertex( ccw(i) ); v1->set_face(ff1); Vertex_handle v2 = f1->vertex( cw(i) ); v2->set_face(ff2); delete_face(f1); delete_face(f2); delete_vertex(v); } template < class Vb, class Fb> bool Triangulation_data_structure_2:: is_valid(bool verbose, int level) const { if(number_of_vertices() == 0){ return (dimension() == -2); } bool result = (dimension()>= -1); (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1684)); Face_iterator ib = face_iterator_base_begin(); Face_iterator ib_end = face_iterator_base_end(); size_type count_stored_faces =0; for ( ; ib != ib_end ; ++ib){ count_stored_faces += 1; if (dimension()>= 0) { result = result && ib->is_valid(verbose,level); (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1694)); } } result = result && (count_stored_faces == number_of_full_dim_faces()); (CGAL::possibly(count_stored_faces == number_of_full_dim_faces())?(static_cast(0)): ::CGAL::assertion_fail( "count_stored_faces == number_of_full_dim_faces()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" # 1699 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" , 1700 # 1699 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h" )) ; size_type vertex_count = 0; for(Vertex_iterator vit = vertices_begin(); vit != vertices_end(); ++vit) { (CGAL::possibly(vit->face() != Face_handle())?(static_cast(0)): ::CGAL::assertion_fail( "vit->face() != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1706)); result = result && vit->is_valid(verbose,level); (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1708)); ++vertex_count; } result = result && (number_of_vertices() == vertex_count); (CGAL::possibly(number_of_vertices() == vertex_count)?(static_cast(0)): ::CGAL::assertion_fail( "number_of_vertices() == vertex_count" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1712)); size_type edge_count = 0; for(Edge_iterator eit = edges_begin(); eit != edges_end(); ++eit) { ++edge_count; } size_type face_count = 0; for(Face_iterator fit = faces_begin(); fit != faces_end(); ++fit) { ++face_count; } switch(dimension()) { case -1: result = result && vertex_count == 1 && face_count == 0 && edge_count == 0; (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1730)); break; case 0: result = result && vertex_count == 2 && face_count == 0 && edge_count == 0; (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1735)); break; case 1: result = result && edge_count == vertex_count; (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1739)); result = result && face_count == 0; (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1741)); break; case 2: result = result && edge_count == 3*face_count/2 ; (CGAL::possibly(edge_count == 3*face_count/2)?(static_cast(0)): ::CGAL::assertion_fail( "edge_count == 3*face_count/2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1745)); break; default: result = false; (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1749)); } return result; } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: copy_tds(const Tds &tds, Vertex_handle vh) { if (this == &tds) return Vertex_handle(); if (vh != Vertex_handle()) (CGAL::possibly(tds.is_vertex(vh))?(static_cast(0)): ::CGAL::precondition_fail( "tds.is_vertex(vh)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 1762)); clear(); size_type n = tds.number_of_vertices(); set_dimension(tds.dimension()); int dim = (std::max)(1, dimension() + 1); if(n == 0) {return Vertex_handle();} std::map vmap; std::map fmap; Vertex_iterator vit1 = tds.vertices_begin(); for( ; vit1 != tds.vertices_end(); ++vit1) { vmap[vit1] = create_vertex(vit1); } Face_iterator fit1 = tds.faces().begin(); for( ; fit1 != tds.faces_end(); ++fit1) { fmap[fit1] = create_face(fit1); } vit1 = tds.vertices_begin(); for ( ; vit1 != tds.vertices_end(); vit1++) { vmap[vit1]->set_face(fmap[vit1->face()]); } fit1 = tds.faces().begin(); for ( ; fit1 != tds.faces_end(); ++fit1) { for (int j = 0; j < dim ; ++j) { fmap[fit1]->set_vertex(j, vmap[fit1->vertex(j)] ); fmap[fit1]->set_neighbor(j, fmap[fit1->neighbor(j)]); } } return (vh == Vertex_handle()) ? Vertex_handle() : vmap[vh]; } template < class Vb, class Fb> void Triangulation_data_structure_2:: file_output( std::ostream& os, Vertex_handle v, bool skip_first) const { size_type n = number_of_vertices(); size_type m = number_of_full_dim_faces(); if(is_ascii(os)) os << n << ' ' << m << ' ' << dimension() << std::endl; else os << n << m << dimension(); if (n==0) return; std::map V; std::map F; int inum = 0; if ( v != Vertex_handle()) { V[v] = inum++; if( ! skip_first){ os << *v ; if(is_ascii(os)) os << std::endl; } } for( Vertex_iterator vit= vertices_begin(); vit != vertices_end() ; ++vit) { if ( v != vit ) { V[vit] = inum++; os << *vit; if(is_ascii(os)) os << "\n"; } } if(is_ascii(os)) os << "\n"; inum = 0; int dim = (dimension() == -1 ? 1 : dimension() + 1); for( Face_iterator ib = face_iterator_base_begin(); ib != face_iterator_base_end(); ++ib) { F[ib] = inum++; for(int j = 0; j < dim ; ++j) { os << V[ib->vertex(j)]; if(is_ascii(os)) os << " "; } os << *ib ; if(is_ascii(os)) os << "\n"; } if(is_ascii(os)) os << "\n"; for( Face_iterator it = face_iterator_base_begin(); it != face_iterator_base_end(); ++it) { for(int j = 0; j < dimension()+1; ++j){ os << F[it->neighbor(j)]; if(is_ascii(os)) os << " "; } if(is_ascii(os)) os << "\n"; } return ; } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: file_input( std::istream& is, bool skip_first) { if(number_of_vertices() != 0) clear(); size_type n, m; int d; is >> n >> m >> d; if (n==0){ return Vertex_handle();} set_dimension(d); std::vector V(n); std::vector F(m); size_type i = 0; if(skip_first){ V[0] = create_vertex(); ++i; } for( ; i < n; ++i) { V[i] = create_vertex(); is >> *(V[i]); } int index; int dim = (dimension() == -1 ? 1 : dimension() + 1); { for(i = 0; i < m; ++i) { F[i] = create_face() ; for(int j = 0; j < dim ; ++j){ is >> index; F[i]->set_vertex(j, V[index]); V[index]->set_face(F[i]); } is >> *(F[i]) ; } } { for(i = 0; i < m; ++i) { for(int j = 0; j < dimension()+1; ++j){ is >> index; F[i]->set_neighbor(j, F[index]); } } } return V[0]; } template < class Vb, class Fb> void Triangulation_data_structure_2:: vrml_output( std::ostream& os, Vertex_handle v, bool skip_infinite) const { os << "#VRML V2.0 utf8" << std::endl; os << "Shape {" << std::endl; os << "\tgeometry IndexedFaceSet {" << std::endl; os << "\t\tcoord Coordinate {" << std::endl; os << "\t\t\tpoint [" << std::endl; std::map vmap; Vertex_iterator vit; Face_iterator fit; int inum = 0; if ( v != Vertex_handle()) { vmap[v] = inum++; if( ! skip_infinite) os << "\t\t\t\t" << *v << std::endl; } for( vit= vertices_begin(); vit != vertices_end() ; ++vit) { if ( v != vit) { vmap[vit] = inum++; os << "\t\t\t\t" << *vit << std::endl; } } os << "\t\t\t]" << std::endl; os << "\t\t}" << std::endl; os << "\t\tcoordIndex [" << std::endl; for(fit= faces_begin(); fit != faces_end(); ++fit) { if (!skip_infinite || !fit->has_vertex(v)) { os << "\t\t\t"; os << vmap[(*fit).vertex(0)] << ", "; os << vmap[(*fit).vertex(1)] << ", "; os << vmap[(*fit).vertex(2)] << ", "; os << "-1, " << std::endl; } } os << "\t\t]" << std::endl; os << "\t}" << std::endl; os << "}" << std::endl; return; } template < class Vb, class Fb> typename Triangulation_data_structure_2::Vertex_handle Triangulation_data_structure_2:: off_file_input( std::istream& is, bool verbose) { Vertex_handle vinf; File_scanner_OFF scanner(is, verbose); if (! is) { if (scanner.verbose()) { std::cerr << " " << std::endl; std::cerr << "TDS::off_file_input" << std::endl; std::cerr << " input error: file format is not OFF." << std::endl; } return vinf; } if(number_of_vertices() != 0) clear(); int dim = 2; set_dimension(dim); std::vector vvh(scanner.size_of_vertices()); std::map edge_map; typedef typename Vb::Point Point; int i; for ( i = 0; i < scanner.size_of_vertices(); i++) { Point p; file_scan_vertex( scanner, p); vvh[i] = create_vertex(); vvh[i]->set_point(p); scanner.skip_to_next_vertex( i); } if ( ! is ) { is.clear( std::ios::badbit); return vinf; } for ( i = 0; i < scanner.size_of_facets(); i++) { Face_handle fh = create_face(); std::size_t no; scanner.scan_facet( no, i); if( ! is || no != 3) { if ( scanner.verbose()) { std::cerr << " " << std::endl; std::cerr << "TDS::off_file_input" << std::endl; std::cerr << "facet " << i << "does not have 3 vertices." << std::endl; } is.clear( std::ios::badbit); return vinf; } for ( int j = 0; j < no; ++j) { std::size_t index; scanner.scan_facet_vertex_index( index, i); fh->set_vertex(j, vvh[index]); vvh[index]->set_face(fh); } for (int ih = 0; ih < no; ++ih) { set_adjacency(fh, ih, edge_map); } } if ( !edge_map.empty()) { vinf = create_vertex(); std::map inf_edge_map; while (!edge_map.empty()) { Face_handle fh = edge_map.begin()->second.first; int ih = edge_map.begin()->second.second; Face_handle fn = create_face( vinf, fh->vertex(cw(ih)), fh->vertex(ccw(ih))); vinf->set_face(fn); set_adjacency(fn, 0, fh, ih); set_adjacency(fn, 1, inf_edge_map); set_adjacency(fn, 2, inf_edge_map); edge_map.erase(edge_map.begin()); } (CGAL::possibly(inf_edge_map.empty())?(static_cast(0)): ::CGAL::assertion_fail( "inf_edge_map.empty()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_data_structure_2.h", 2090)); } reorient_faces(); return vinf; } template < class Vb, class Fb> void Triangulation_data_structure_2:: set_adjacency(Face_handle fh, int ih, std::map< Vh_pair, Edge>& edge_map) { Vertex_handle vhcw = fh->vertex(cw(ih)); Vertex_handle vhccw = fh->vertex(ccw(ih)); Vh_pair vhp = vhcw < vhccw ? std::make_pair(vhcw, vhccw) : std::make_pair(vhccw, vhcw) ; typename std::map::iterator emapit = edge_map.find(vhp); if (emapit == edge_map.end()) { edge_map.insert(std::make_pair(vhp, Edge(fh,ih))); } else { Edge e = emapit->second; set_adjacency( fh,ih, e.first, e.second); edge_map.erase(emapit); } } template < class Vb, class Fb> void Triangulation_data_structure_2:: reorient_faces() { std::set oriented_set; std::stack st; Face_iterator fit = faces_begin(); int nf = std::distance(faces_begin(),faces_end()); while (static_cast(oriented_set.size()) != nf) { while ( oriented_set.find(fit) != oriented_set.end()){ ++fit; } oriented_set.insert(fit); st.push(fit); while ( ! st.empty()) { Face_handle fh = st.top(); st.pop(); for(int ih = 0 ; ih < 3 ; ++ih){ Face_handle fn = fh->neighbor(ih); if (oriented_set.find(fn) == oriented_set.end()){ int in = fn->index(fh); if (fn->vertex(cw(in)) != fh->vertex(ccw(ih))) fn->reorient(); oriented_set.insert(fn); st.push(fn); } } } } return; } template < class Vb, class Fb> std::istream& operator>>(std::istream& is, Triangulation_data_structure_2& tds) { tds.file_input(is); return is; } template < class Vb, class Fb> std::ostream& operator<<(std::ostream& os, const Triangulation_data_structure_2 &tds) { tds.file_output(os); return os; } } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_vertex_base_2.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_vertex_base_2.h" namespace CGAL { template < typename GT, typename Vb = Triangulation_ds_vertex_base_2<> > class Triangulation_vertex_base_2 : public Vb { typedef typename Vb::Triangulation_data_structure Tds; public: typedef GT Geom_traits; typedef typename GT::Point_2 Point; typedef Tds Triangulation_data_structure; typedef typename Tds::Face_handle Face_handle; typedef typename Tds::Vertex_handle Vertex_handle; typedef typename Tds::Vertex_circulator Vertex_circulator; typedef typename Tds::Edge_circulator Edge_circulator; typedef typename Tds::Face_circulator Face_circulator; typedef typename Tds::size_type size_type; template < typename TDS2 > struct Rebind_TDS { typedef typename Vb::template Rebind_TDS::Other Vb2; typedef Triangulation_vertex_base_2 Other; }; private: Point _p; public: Triangulation_vertex_base_2 () : Vb() {} Triangulation_vertex_base_2(const Point & p) : Vb(), _p(p) {} Triangulation_vertex_base_2(const Point & p, Face_handle f) : Vb(f), _p(p) {} Triangulation_vertex_base_2(Face_handle f) : Vb(f) {} void set_point(const Point & p) { _p = p; } const Point& point() const { return _p; } Point& point() { return _p; } bool is_valid(bool = false, int = 0) const {return true;} size_type degree(); Vertex_circulator incident_vertices() {return Vertex_circulator(handle());} Vertex_circulator incident_vertices( Face_handle f) {return Vertex_circulator(handle(),f);} Face_circulator incident_faces() { return Face_circulator(handle()) ;} Face_circulator incident_faces( Face_handle f) { return Face_circulator(handle(), f);} Edge_circulator incident_edges() { return Edge_circulator(handle());} Edge_circulator incident_edges( Face_handle f) { return Edge_circulator(handle(), f);} Vertex_handle handle(); }; template < class GT, class Vb > std::istream& operator>>(std::istream &is, Triangulation_vertex_base_2 &v) { return is >> static_cast(v) >> v.point(); } template < class GT, class Vb > std::ostream& operator<<(std::ostream &os, const Triangulation_vertex_base_2 &v) { return os << static_cast(v) << v.point(); } template typename Triangulation_vertex_base_2 ::size_type Triangulation_vertex_base_2 :: degree() { int count = 0; Vertex_circulator vc = incident_vertices(), done(vc); if ( ! vc.is_empty()) { do { count += 1; } while (++vc != done); } return count; } template typename Triangulation_vertex_base_2::Vertex_handle Triangulation_vertex_base_2 :: handle() { Face_handle fh = this->face(); for(int i = 0 ; i < 3 ; ++i){ if ( &*fh->vertex(i) == this) return fh->vertex(i); } return Vertex_handle(); } } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/triangulation_assertions.h" 2 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" 2 namespace CGAL { template < typename Gt, typename Fb = Triangulation_ds_face_base_2<> > class Triangulation_face_base_2 : public Fb { public: typedef Gt Geom_traits; typedef typename Fb::Vertex_handle Vertex_handle; typedef typename Fb::Face_handle Face_handle; template < typename TDS2 > struct Rebind_TDS { typedef typename Fb::template Rebind_TDS::Other Fb2; typedef Triangulation_face_base_2 Other; }; public: Triangulation_face_base_2() : Fb() {} Triangulation_face_base_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2) : Fb(v0,v1,v2) {} Triangulation_face_base_2(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Face_handle n0, Face_handle n1, Face_handle n2) : Fb(v0,v1,v2,n0,n1,n2) {} static int ccw(int i) {return Triangulation_cw_ccw_2::ccw(i);} static int cw(int i) {return Triangulation_cw_ccw_2::cw(i);} Vertex_handle mirror_vertex(int i) const; int mirror_index(int i) const; }; template < class Gt, class Fb > inline typename Triangulation_face_base_2::Vertex_handle Triangulation_face_base_2:: mirror_vertex(int i) const { (CGAL::possibly(this->neighbor(i) != Face_handle() && this->dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "this->neighbor(i) != Face_handle() && this->dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" # 78 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" , 79 # 78 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" )) ; return this->neighbor(i)->vertex(mirror_index(i)); } template < class Gt, class Fb > inline int Triangulation_face_base_2:: mirror_index(int i) const { (CGAL::possibly(this->neighbor(i) != Face_handle() && this->dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "this->neighbor(i) != Face_handle() && this->dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" , 91 # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_face_base_2.h" )) ; if (this->dimension() == 1) { return 1 - (this->neighbor(i)->index(this->vertex(1-i))); } return this->ccw( this->neighbor(i)->index(this->vertex(this->ccw(i)))); } } # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" namespace CGAL { template class Triangulation_line_face_circulator_2 : public Bidirectional_circulator_base< typename Triangulation_::Triangulation_data_structure::Face, std::ptrdiff_t, std::size_t>, public Triangulation_cw_ccw_2 { public: typedef Triangulation_line_face_circulator_2 Line_face_circulator; typedef Triangulation_ Triangulation; typedef typename Triangulation::Geom_traits Gt; typedef typename Triangulation_::Triangulation_data_structure Tds; typedef typename Tds::Vertex Vertex; typedef typename Tds::Face Face; typedef typename Tds::Edge Edge; typedef typename Tds::Vertex_handle Vertex_handle; typedef typename Tds::Face_handle Face_handle; typedef typename Tds::Face_circulator Face_circulator; typedef typename Gt::Point_2 Point; typedef typename Triangulation::Locate_type Locate_type; enum State {undefined = -1, vertex_vertex, vertex_edge, edge_vertex, edge_edge}; private: Face_handle pos; const Triangulation* _tr; State s; int i; Point p, q; public: Triangulation_line_face_circulator_2() : pos(), _tr(__null), s(undefined), i(-1) {} Triangulation_line_face_circulator_2(Vertex_handle v, const Triangulation* tr, const Point& dir); Triangulation_line_face_circulator_2(const Point& pp, const Point& qq, const Triangulation * t); Triangulation_line_face_circulator_2(const Point& pp, const Point& qq, const Face_handle& ff, const Triangulation* t); Line_face_circulator& operator++() ; Line_face_circulator& operator--() ; Line_face_circulator operator++(int); Line_face_circulator operator--(int); Face* operator->() {return &*pos;} Face& operator*() { return *pos;} Face_handle handle() {return pos;} operator const Face_handle() const {return pos;} bool operator==(const Line_face_circulator& lfc) const; bool operator!=(const Line_face_circulator& lfc) const; bool operator==(const Face_handle& fh) const { return fh == pos; } bool operator!=(const Face_handle& fh) const { return fh != pos; } bool operator==(Nullptr_t n) const; bool operator!=(Nullptr_t n) const; bool is_empty() const; bool collinear_outside() const; bool locate(const Point& t, Locate_type <, int &li); Triangulation_line_face_circulator_2(const Face_handle& face, int index, State state, const Triangulation * t, const Point& pp, const Point& qq); private: void increment(); void decrement(); }; template < class Triangulation > inline bool operator==(typename Triangulation::Triangulation_data_structure::Face_handle fh, Triangulation_line_face_circulator_2 fc) { return (fc==fh); } template < class Triangulation > inline bool operator!=(typename Triangulation::Triangulation_data_structure::Face_handle fh, Triangulation_line_face_circulator_2 fc) { return (fc!=fh); } template < class Triangulation > Triangulation_line_face_circulator_2:: Triangulation_line_face_circulator_2(const Face_handle& face, int index, State state, const Triangulation * t, const Point& pp, const Point& qq) : pos(face), _tr(t), s(state), i(index), p(pp), q(qq) { (CGAL::possibly(! t->xy_equal(p, q))?(static_cast(0)): ::CGAL::precondition_fail( "! t->xy_equal(p, q)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h", 149)); } template < class Triangulation > Triangulation_line_face_circulator_2:: Triangulation_line_face_circulator_2(Vertex_handle v, const Triangulation* tr, const Point& dir) :pos(), _tr(tr), s(undefined) { (CGAL::possibly((!_tr->is_infinite(v)) && (_tr->dimension() == 2) && (! _tr->xy_equal(v->point(),dir)))?(static_cast(0)): ::CGAL::precondition_fail( "(!_tr->is_infinite(v)) && (_tr->dimension() == 2) && (! _tr->xy_equal(v->point(),dir))" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" # 163 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" , 165 # 163 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" )) ; p=v->point(); q=dir; Face_circulator fc = _tr->incident_faces(v); Face_circulator done(fc); int ic = fc->index(v); Vertex_handle vt= fc->vertex(cw(ic)); while( _tr->is_infinite(vt) || _tr->orientation(p, q, vt->point()) != LEFT_TURN) { ++fc; ic = fc->index(v); vt= fc->vertex(cw(ic)); if (fc == done) { *this = Line_face_circulator(); return;} } Vertex_handle vr = fc-> vertex(ccw(ic)); Orientation pqr = RIGHT_TURN; while ( (!_tr->is_infinite(vr)) && (pqr = _tr->orientation(p, q, vr->point()))== LEFT_TURN ) { --fc; ic = fc->index(v); vr = fc-> vertex(ccw(ic)); } ic = fc->index(v); vt= fc->vertex(cw(ic)); (CGAL::possibly(_tr->orientation(p,q, vt->point())== LEFT_TURN)?(static_cast(0)): ::CGAL::assertion_fail( "_tr->orientation(p,q, vt->point())== LEFT_TURN" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" # 198 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" , 199 # 198 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" )) ; if (_tr->is_infinite(vr)) { --fc; ic = fc->index(v); vr = fc->vertex(ccw(ic)); pqr = _tr->orientation(p, q, vr->point()); switch(pqr){ case RIGHT_TURN: case COLLINEAR: ++fc; ic = fc->index(_tr->infinite_vertex()); pos = fc; s = vertex_vertex; i = ic; break; case LEFT_TURN: *this = Line_face_circulator(); break; } } else if (pqr == COLLINEAR) { pos = fc; s = vertex_vertex; i = ccw(ic); } else { pos = fc; s = vertex_edge; i = ic ; } return; } template < class Triangulation > Triangulation_line_face_circulator_2:: Triangulation_line_face_circulator_2(const Point& pp, const Point& qq, const Triangulation * t) : pos(), _tr(t), s(undefined), p(pp), q(qq) { Vertex_handle inf = _tr->infinite_vertex(); Face_circulator fc = _tr->incident_faces(inf), done(fc); i = fc->index(inf); Point l = fc->vertex(cw(i))->point(); Point r = fc->vertex(ccw(i))->point(); Orientation pql = _tr->orientation(p, q, l); Orientation pqr = _tr->orientation(p, q, r); do{ if( (pql == LEFT_TURN) && (pqr == RIGHT_TURN) ){ *this = ++Line_face_circulator( fc, i, vertex_edge, t, p, q); return; } else if ( (pql == LEFT_TURN) && (pqr == COLLINEAR) ){ --fc; i = fc->index(inf); Point ss = fc->vertex(ccw(i))->point(); Orientation pqs = _tr->orientation(p, q, ss); Face_handle fn; int in; switch(pqs) { case LEFT_TURN: *this = Line_face_circulator(); return; case COLLINEAR: fn = fc->neighbor(i); in = fn->index(fc); *this = Line_face_circulator( fn, cw(in),vertex_vertex,t,p,q); return; case RIGHT_TURN: fn = fc->neighbor(i); Vertex_handle vr = fc->vertex(cw(i)); in = fn->index(vr); ss = fn->vertex(cw(in))->point(); pqs = _tr->orientation(p, q, ss); Orientation pqss = RIGHT_TURN; while ( pqs != LEFT_TURN) { pqss = pqs; fn = fn->neighbor(ccw(in)); in = fn->index(vr); ss = fn->vertex(cw(in))->point(); pqs = _tr->orientation(p, q, ss); } if (pqss == RIGHT_TURN) *this = Line_face_circulator( fn, in ,vertex_edge,t,p,q); else *this = Line_face_circulator(fn,ccw(in),vertex_vertex,t,p,q); return; } } --fc; l = r; pql = pqr; i = fc->index(inf); r = fc->vertex(ccw(i))->point(); pqr = _tr->orientation(p, q, r); }while(fc != done); *this=Line_face_circulator(); return; } template < class Triangulation > Triangulation_line_face_circulator_2:: Triangulation_line_face_circulator_2(const Point& pp, const Point& qq, const Face_handle& ff, const Triangulation* t) : pos(ff), _tr(t), s(undefined), p(pp), q(qq) # 327 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" { (CGAL::possibly(_tr->is_infinite(ff) || _tr->oriented_side(ff,p) != ON_NEGATIVE_SIDE)?(static_cast(0)): ::CGAL::precondition_fail( "_tr->is_infinite(ff) || _tr->oriented_side(ff,p) != ON_NEGATIVE_SIDE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" # 328 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" , 329 # 328 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" )) ; int j; if(_tr->is_infinite(pos)){ *this = Line_face_circulator(p, q, t); return; } for(j = 0; j < 3; j++){ if(_tr->xy_equal(pos->vertex(j)->point(), p)){ *this = Line_face_circulator( pos->vertex(j), t, q); if( (!is_empty()) && _tr->is_infinite(pos )) --(*this); return; } } for(j = 0; j < 3; j++) { if(_tr->orientation(pos->vertex(ccw(j))->point(), pos->vertex(cw(j))->point(), p) == COLLINEAR){ Orientation pqj = _tr->orientation(p, q, pos->vertex(j)->point()); Orientation pqcwj = _tr->orientation(p, q, pos->vertex(cw(j))->point()); switch(pqcwj) { case COLLINEAR : if(pqj == LEFT_TURN){ s = vertex_vertex; i = cw(j); return; } else if(! _tr->is_infinite(pos->neighbor(j))){ Face_handle n = pos->neighbor(j); i = cw(n->index(pos)); pos = n; s = vertex_vertex; return; } else { *this = Line_face_circulator(); return; } case LEFT_TURN : i = j; s = (pqj == COLLINEAR) ? vertex_edge : edge_edge; break; case RIGHT_TURN : switch(pqj){ case COLLINEAR: s = edge_vertex; i = j; return; case LEFT_TURN: s = edge_edge; i = ccw(j); return; case RIGHT_TURN: s = edge_edge; i = cw(j); return; } } } } Orientation orient[3]; for(j=0; j<3; j++) { orient[j] = _tr->orientation(p,q,pos->vertex(j)->point()); } for(j=0; j<3; j++) { if(orient[j] == COLLINEAR) { i = j; s = (orient[ccw(j)] == LEFT_TURN) ? edge_vertex : vertex_edge; return; } } s = edge_edge; for(j=0; j<3; j++){ if(orient[j] == RIGHT_TURN){ i = (orient[ccw(j)] == RIGHT_TURN) ? j : cw(j); return; } } } template < class Triangulation > inline void Triangulation_line_face_circulator_2:: increment() { (CGAL::possibly(pos != Face_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h", 426)); if(s == vertex_vertex || s == edge_vertex) { Orientation o; do{ Face_handle n = pos->neighbor(cw(i)); i = n->index(pos); pos = n; if (pos->vertex(i) == _tr->infinite_vertex()){ o = COLLINEAR; i = cw(i); break; } o = _tr->orientation(p, q, pos->vertex(i)->point()); i = cw(i); }while(o == LEFT_TURN); if(o == COLLINEAR) { s = vertex_vertex; i = ccw(i); } else { s = vertex_edge; } } else { Face_handle n = pos->neighbor(i); int ni = n->index(pos); pos = n ; Orientation o = _tr->is_infinite(pos->vertex(ni)) ? COLLINEAR : _tr->orientation(p,q,pos->vertex(ni)->point()); switch(o){ case LEFT_TURN: s = edge_edge; i = ccw(ni); break; case RIGHT_TURN: s = edge_edge; i = cw(ni); break; default: s = edge_vertex; i = ni; } } } template < class Triangulation > void Triangulation_line_face_circulator_2:: decrement() { (CGAL::possibly(pos != Face_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h", 479)); if(s == vertex_vertex || s == vertex_edge) { if(s == vertex_vertex){ i = cw(i); } Orientation o; do{ Face_handle n = pos->neighbor(ccw(i)); i = n->index(pos); pos = n; if (pos->vertex(i) == _tr->infinite_vertex()){ o = COLLINEAR; i = ccw(i); break; } o = _tr->orientation(p, q, pos->vertex(i)->point()); i = ccw(i); }while(o == LEFT_TURN); s = (o == COLLINEAR) ? vertex_vertex : edge_vertex; } else { if(s == edge_edge){ i = (_tr->orientation (p, q, pos->vertex(i)->point()) == LEFT_TURN) ? cw(i) : ccw(i); } Face_handle n = pos->neighbor(i); i = n->index(pos); pos = n; Orientation o = _tr->is_infinite(pos->vertex(i)) ? COLLINEAR : _tr->orientation(p, q, pos->vertex(i)->point()); s = (o == COLLINEAR) ? vertex_edge : edge_edge; } } template < class Triangulation > bool Triangulation_line_face_circulator_2:: locate(const Point& t, Locate_type <, int &li) { switch(s){ case edge_edge: case vertex_edge: { Orientation o = _tr->orientation(pos->vertex(ccw(i))->point(), pos->vertex(cw(i))->point(), t); if(o == RIGHT_TURN) return false; if(o == COLLINEAR){ lt = Triangulation::EDGE; li = i; return true; } lt = Triangulation::FACE; li = 4; return true; } case vertex_vertex: { if(_tr->is_infinite(pos->vertex(i))){ (CGAL::possibly(_tr->orientation( pos->vertex(cw(i))->point(), pos->vertex(ccw(i))->point(), t) != LEFT_TURN)?(static_cast(0)): ::CGAL::assertion_fail( "_tr->orientation( pos->vertex(cw(i))->point(), pos->vertex(ccw(i))->point(), t) != LEFT_TURN" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" # 548 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" , 551 # 548 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" )) ; lt = Triangulation::OUTSIDE_CONVEX_HULL; li = i; return true; } const Point &u = pos->vertex(cw(i))->point(); const Point &v = pos->vertex(i)->point(); if(_tr->compare_x(v,t)==EQUAL && _tr->compare_y(v,t)==EQUAL){ lt = Triangulation::VERTEX; li = i; return true; } if(_tr->collinear_between(u, t, v)) { lt = Triangulation::EDGE; li = ccw(i); return true; } return false; } default: { if(_tr->is_infinite(pos->vertex(i))){ lt = Triangulation::OUTSIDE_CONVEX_HULL; li = i; return true; } if(_tr->xy_equal(t,pos->vertex(i) ->point()) ){ li = i; lt = Triangulation::VERTEX; return true; } if(_tr->collinear_between(p, t, pos->vertex(i)->point())) { lt = Triangulation::FACE; return true; } return false; } } } template < class Triangulation > inline Triangulation_line_face_circulator_2& Triangulation_line_face_circulator_2:: operator++() { (CGAL::possibly(pos != Face_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h", 599)) ; increment(); return *this; } template < class Triangulation > inline Triangulation_line_face_circulator_2& Triangulation_line_face_circulator_2:: operator--() { (CGAL::possibly(pos != Face_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h", 610)) ; decrement(); return *this; } template < class Triangulation > inline Triangulation_line_face_circulator_2 Triangulation_line_face_circulator_2:: operator++(int) { Line_face_circulator tmp(*this); ++(*this); return tmp; } template < class Triangulation > inline Triangulation_line_face_circulator_2 Triangulation_line_face_circulator_2:: operator--(int) { Line_face_circulator tmp(*this); --(*this); return tmp; } template < class Triangulation > inline bool Triangulation_line_face_circulator_2:: operator==(const Line_face_circulator& lfc) const { (CGAL::possibly(pos != Face_handle() && lfc.pos != Face_handle())?(static_cast(0)): ::CGAL::precondition_fail( "pos != Face_handle() && lfc.pos != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" # 642 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" , 643 # 642 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h" )) ; return ( pos == lfc.pos && _tr == lfc._tr && s== lfc.s && p==lfc.p && q==lfc.q); } template < class Triangulation > inline bool Triangulation_line_face_circulator_2:: operator!=(const Line_face_circulator& lfc) const { return !(*this == lfc); } template < class Triangulation > inline bool Triangulation_line_face_circulator_2:: is_empty() const { return pos == Face_handle(); } template < class Triangulation > inline bool Triangulation_line_face_circulator_2:: operator==(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h", 669)); return pos == Face_handle(); } template < class Triangulation > inline bool Triangulation_line_face_circulator_2:: operator!=(Nullptr_t n) const { (CGAL::possibly(n == __null)?(static_cast(0)): ::CGAL::assertion_fail( "n == NULL" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_line_face_circulator_2.h", 678)); return !(*this == n); } template < class Triangulation > inline bool Triangulation_line_face_circulator_2:: collinear_outside() const { Face_handle fh = pos; return ( s == vertex_vertex && (! _tr->is_infinite(fh)) && _tr->is_infinite(fh->neighbor(ccw(i)))); } } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/spatial_sort.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/spatial_sort.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/hilbert_sort.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/hilbert_sort.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_policy_tags.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_policy_tags.h" namespace CGAL { struct Middle {}; struct Median {}; template < typename Tag > struct Hilbert_policy {}; typedef Hilbert_policy Hilbert_sort_middle_policy; typedef Hilbert_policy Hilbert_sort_median_policy; } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/hilbert_sort.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_2.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_2.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_2.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_base.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_base.h" namespace CGAL { namespace internal { template RandomAccessIterator hilbert_split (RandomAccessIterator begin, RandomAccessIterator end, Cmp cmp = Cmp ()) { if (begin >= end) return begin; RandomAccessIterator middle = begin + (end - begin) / 2; std::nth_element (begin, middle, end, cmp); return middle; } } } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_2.h" 2 namespace CGAL { namespace internal { template struct Hilbert_cmp_2; template struct Hilbert_cmp_2 : public std::binary_function { typedef typename K::Point_2 Point; K k; Hilbert_cmp_2 (const K &_k = K()) : k(_k) {} bool operator() (const Point &p, const Point &q) const { return Hilbert_cmp_2 (k) (q, p); } }; template struct Hilbert_cmp_2 : public std::binary_function { typedef typename K::Point_2 Point; K k; Hilbert_cmp_2 (const K &_k = K()) : k(_k) {} bool operator() (const Point &p, const Point &q) const { return k.less_x_2_object() (p, q); } }; template struct Hilbert_cmp_2 : public std::binary_function { typedef typename K::Point_2 Point; K k; Hilbert_cmp_2 (const K &_k = K()) : k(_k) {} bool operator() (const Point &p, const Point &q) const { return k.less_y_2_object() (p, q); } }; } template class Hilbert_sort_median_2 { public: typedef K Kernel; typedef typename Kernel::Point_2 Point; private: Kernel _k; std::ptrdiff_t _limit; template struct Cmp : public internal::Hilbert_cmp_2 { Cmp (const Kernel &k) : internal::Hilbert_cmp_2 (k) {} }; public: Hilbert_sort_median_2 (const Kernel &k = Kernel(), std::ptrdiff_t limit = 1) : _k(k), _limit (limit) {} template void sort (RandomAccessIterator begin, RandomAccessIterator end) const { const int y = (x + 1) % 2; if (end - begin <= _limit) return; RandomAccessIterator m0 = begin, m4 = end; RandomAccessIterator m2 = internal::hilbert_split (m0, m4, Cmp< x, upx> (_k)); RandomAccessIterator m1 = internal::hilbert_split (m0, m2, Cmp< y, upy> (_k)); RandomAccessIterator m3 = internal::hilbert_split (m2, m4, Cmp< y, !upy> (_k)); sort (m0, m1); sort (m1, m2); sort (m2, m3); sort (m3, m4); } template void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { sort <0, false, false> (begin, end); } }; } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_2.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_2.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_base.h" 1 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_base.h" namespace CGAL { namespace internal { template RandomAccessIterator fixed_hilbert_split (RandomAccessIterator begin, RandomAccessIterator end, Cmp cmp = Cmp ()) { if (begin >= end) return begin; return std::partition (begin, end, cmp); } } } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_2.h" 2 namespace CGAL { namespace internal { template struct Fixed_hilbert_cmp_2; template struct Fixed_hilbert_cmp_2 : public std::binary_function { typedef typename K::Point_2 Point; K k; double value; Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {} bool operator() (const Point &p) const { return ! Fixed_hilbert_cmp_2 (value, k) (p); } }; template struct Fixed_hilbert_cmp_2 : public std::binary_function { typedef typename K::Point_2 Point; K k; double value; Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {} bool operator() (const Point &p) const { return to_double(k.compute_x_2_object()(p)) < value; } }; template struct Fixed_hilbert_cmp_2 : public std::binary_function { typedef typename K::Point_2 Point; K k; double value; Fixed_hilbert_cmp_2 (double v, const K &_k = K()) : k(_k),value(v) {} bool operator() (const Point &p) const { return to_double(k.compute_y_2_object()(p)) < value; } }; } template class Hilbert_sort_middle_2 { public: typedef K Kernel; typedef typename Kernel::Point_2 Point; private: Kernel _k; std::ptrdiff_t _limit; template struct Cmp : public internal::Fixed_hilbert_cmp_2 { Cmp (double v, const Kernel &k) : internal::Fixed_hilbert_cmp_2 (v, k) {} }; public: Hilbert_sort_middle_2 (const Kernel &k = Kernel(), std::ptrdiff_t limit = 1) : _k(k), _limit (limit) {} template void sort (RandomAccessIterator begin, RandomAccessIterator end, double xmin, double ymin, double xmax, double ymax) const { const int y = (x + 1) % 2; if (end - begin <= _limit) return; double xmed= (xmin+xmax)/2; double ymed= (ymin+ymax)/2; RandomAccessIterator m0 = begin, m4 = end; RandomAccessIterator m2 = internal::fixed_hilbert_split (m0, m4, Cmp< x, upx> (xmed,_k)); RandomAccessIterator m1 = internal::fixed_hilbert_split (m0, m2, Cmp< y, upy> (ymed,_k)); RandomAccessIterator m3 = internal::fixed_hilbert_split (m2, m4, Cmp< y, !upy> (ymed,_k)); sort (m0, m1, ymin, xmin, ymed, xmed); sort (m1, m2, xmin, ymed, xmed, ymax); sort (m2, m3, xmed, ymed, xmax, ymax); sort (m3, m4, ymed, xmax, ymin, xmed); } template void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { Bbox_2 box=bbox_2(begin, end); sort <0, false, false> (begin, end, box.xmin(), box.ymin(), box.xmax(), box.ymax()); } }; } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_2.h" 2 namespace CGAL { template class Hilbert_sort_2; template class Hilbert_sort_2 : public Hilbert_sort_median_2 { public: Hilbert_sort_2 (const K &k=K() , std::ptrdiff_t limit=1 ) : Hilbert_sort_median_2 (k,limit) {} }; template class Hilbert_sort_2 : public Hilbert_sort_middle_2 { public: Hilbert_sort_2 (const K &k=K() , std::ptrdiff_t limit=1 ) : Hilbert_sort_middle_2 (k,limit) {} }; } # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/hilbert_sort.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_3.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_3.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_3.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_3.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_3.h" 2 namespace CGAL { namespace internal { template struct Hilbert_cmp_3; template struct Hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; Hilbert_cmp_3 (const K &_k = K()) : k(_k) {} bool operator() (const Point &p, const Point &q) const { return Hilbert_cmp_3 (k) (q, p); } }; template struct Hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; Hilbert_cmp_3 (const K &_k = K()) : k(_k) {} bool operator() (const Point &p, const Point &q) const { return k.less_x_3_object() (p, q); } }; template struct Hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; Hilbert_cmp_3 (const K &_k = K()) : k(_k) {} bool operator() (const Point &p, const Point &q) const { return k.less_y_3_object() (p, q); } }; template struct Hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; Hilbert_cmp_3 (const K &_k = K()) : k(_k) {} bool operator() (const Point &p, const Point &q) const { return k.less_z_3_object() (p, q); } }; } template class Hilbert_sort_median_3 { public: typedef K Kernel; typedef typename Kernel::Point_3 Point; private: Kernel _k; std::ptrdiff_t _limit; template struct Cmp : public internal::Hilbert_cmp_3 { Cmp (const Kernel &k) : internal::Hilbert_cmp_3 (k) {} }; public: Hilbert_sort_median_3 (const Kernel &k = Kernel(), std::ptrdiff_t limit = 1) : _k(k), _limit (limit) {} template void sort (RandomAccessIterator begin, RandomAccessIterator end) const { const int y = (x + 1) % 3, z = (x + 2) % 3; if (end - begin <= _limit) return; RandomAccessIterator m0 = begin, m8 = end; RandomAccessIterator m4 = internal::hilbert_split (m0, m8, Cmp< x, upx> (_k)); RandomAccessIterator m2 = internal::hilbert_split (m0, m4, Cmp< y, upy> (_k)); RandomAccessIterator m1 = internal::hilbert_split (m0, m2, Cmp< z, upz> (_k)); RandomAccessIterator m3 = internal::hilbert_split (m2, m4, Cmp< z, !upz> (_k)); RandomAccessIterator m6 = internal::hilbert_split (m4, m8, Cmp< y, !upy> (_k)); RandomAccessIterator m5 = internal::hilbert_split (m4, m6, Cmp< z, upz> (_k)); RandomAccessIterator m7 = internal::hilbert_split (m6, m8, Cmp< z, !upz> (_k)); sort (m0, m1); sort (m1, m2); sort (m2, m3); sort (m3, m4); sort (m4, m5); sort (m5, m6); sort (m6, m7); sort (m7, m8); } template void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { sort <0, false, false, false> (begin, end); } }; } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_3.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_3.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_3.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_3.h" 2 namespace CGAL { namespace internal { template struct Fixed_hilbert_cmp_3; template struct Fixed_hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; double value; Fixed_hilbert_cmp_3 (double v, const K &_k = K()) : k(_k),value(v) {} bool operator() (const Point &p) const { return ! Fixed_hilbert_cmp_3 (value,k) (p); } }; template struct Fixed_hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; double value; Fixed_hilbert_cmp_3 (double v, const K &_k = K()) : k(_k),value(v) {} bool operator() (const Point &p) const { return to_double(k.compute_x_3_object()(p)) < value; } }; template struct Fixed_hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; double value; Fixed_hilbert_cmp_3 (double v, const K &_k = K()) : k(_k),value(v) {} bool operator() (const Point &p) const { return to_double(k.compute_y_3_object()(p)) < value; } }; template struct Fixed_hilbert_cmp_3 : public std::binary_function { typedef typename K::Point_3 Point; K k; double value; Fixed_hilbert_cmp_3 (double v, const K &_k = K()) : k(_k),value(v) {} bool operator() (const Point &p) const { return to_double(k.compute_z_3_object()(p)) < value ; } }; } template class Hilbert_sort_middle_3 { public: typedef K Kernel; typedef typename Kernel::Point_3 Point; private: Kernel _k; std::ptrdiff_t _limit; template struct Cmp : public internal::Fixed_hilbert_cmp_3 { Cmp (double v,const Kernel &k) : internal::Fixed_hilbert_cmp_3 (v,k) {} }; public: Hilbert_sort_middle_3 (const Kernel &k = Kernel(), std::ptrdiff_t limit = 1) : _k(k), _limit (limit) {} template void sort (RandomAccessIterator begin, RandomAccessIterator end, double xmin, double ymin, double zmin, double xmax, double ymax, double zmax) const { const int y = (x + 1) % 3, z = (x + 2) % 3; if (end - begin <= _limit) return; double xmed= (xmin+xmax)/2; double ymed= (ymin+ymax)/2; double zmed= (zmin+zmax)/2; RandomAccessIterator m0 = begin, m8 = end; RandomAccessIterator m4 = internal::fixed_hilbert_split (m0, m8, Cmp< x, upx> (xmed,_k)); RandomAccessIterator m2 = internal::fixed_hilbert_split (m0, m4, Cmp< y, upy> (ymed,_k)); RandomAccessIterator m6 = internal::fixed_hilbert_split (m4, m8, Cmp< y, !upy> (ymed,_k)); RandomAccessIterator m1 = internal::fixed_hilbert_split (m0, m2, Cmp< z, upz> (zmed,_k)); RandomAccessIterator m3 = internal::fixed_hilbert_split (m2, m4, Cmp< z, !upz> (zmed,_k)); RandomAccessIterator m5 = internal::fixed_hilbert_split (m4, m6, Cmp< z, upz> (zmed,_k)); RandomAccessIterator m7 = internal::fixed_hilbert_split (m6, m8, Cmp< z, !upz> (zmed,_k)); sort (m0, m1, zmin, xmin, ymin, zmed, xmed, ymed); sort (m1, m2, ymin, zmed, xmin, ymed, zmax, xmed); sort (m2, m3, ymed, zmed, xmin, ymax, zmax, xmed); sort (m3, m4, xmin, ymax, zmed, xmed, ymed, zmin); sort (m4, m5, xmed, ymax, zmed, xmax, ymed, zmin); sort (m5, m6, ymax, zmed, xmax, ymed, zmax, xmed); sort (m6, m7, ymed, zmed, xmax, ymin, zmax, xmed); sort (m7, m8, zmed, xmax, ymin, zmin, xmed, ymed); } template void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { K k; double xmin=to_double(k.compute_x_3_object()(*begin)), ymin=to_double(k.compute_y_3_object()(*begin)), zmin=to_double(k.compute_z_3_object()(*begin)), xmax=xmin, ymax=ymin, zmax=zmin; for(RandomAccessIterator it=begin+1; it xmax) xmax = to_double(k.compute_x_3_object()(*it)); if ( to_double(k.compute_y_3_object()(*it)) > ymax) ymax = to_double(k.compute_y_3_object()(*it)); if ( to_double(k.compute_z_3_object()(*it)) > zmax) zmax = to_double(k.compute_z_3_object()(*it)); } sort <0, false, false, false> (begin, end, xmin,ymin,zmin,xmax,ymax,zmax); } }; } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_3.h" 2 namespace CGAL { template class Hilbert_sort_3; template class Hilbert_sort_3 : public Hilbert_sort_median_3 { public: Hilbert_sort_3 (const K &k=K() , std::ptrdiff_t limit=1 ) : Hilbert_sort_median_3 (k,limit) {} }; template class Hilbert_sort_3 : public Hilbert_sort_middle_3 { public: Hilbert_sort_3 (const K &k=K() , std::ptrdiff_t limit=1 ) : Hilbert_sort_middle_3 (k,limit) {} }; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/hilbert_sort.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_d.h" 1 # 24 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_d.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_d.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_d.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_median_d.h" 2 namespace CGAL { namespace internal { template struct Hilbert_cmp_d : public std::binary_function { typedef typename K::Point_d Point; K k; int axe; bool orient; Hilbert_cmp_d (int a, bool o, const K &_k = K()) : k(_k), axe(a), orient(o) {} bool operator() (const Point &p, const Point &q) const { return (orient ? (k.less_coordinate_d_object() (q,p,axe) ) : (k.less_coordinate_d_object() (p,q,axe) )); } }; } template class Hilbert_sort_median_d { public: typedef K Kernel; typedef typename Kernel::Point_d Point; typedef std::vector< bool > Starting_position; private: Kernel _k; std::ptrdiff_t _limit; mutable int _dimension; mutable int two_to_dim; struct Cmp : public internal::Hilbert_cmp_d { Cmp (int a, bool dir, const Kernel &k) : internal::Hilbert_cmp_d (a,dir,k) {} }; public: Hilbert_sort_median_d(const Kernel &k = Kernel(), std::ptrdiff_t limit = 1) : _k(k), _limit (limit) {} template void sort (RandomAccessIterator begin, RandomAccessIterator end, Starting_position start, int direction) const { if (end - begin <= _limit) return; int nb_directions = _dimension; int nb_splits = two_to_dim; if ( (end-begin) < (two_to_dim/2) ) { nb_splits = 1; nb_directions = 0; while ( (end-begin) > nb_splits) { ++nb_directions; nb_splits *= 2; } } std::vector places(nb_splits +1); std::vector dir (nb_splits +1); places[0]=begin; places[nb_splits]=end; int last_dir = (direction + nb_directions) % _dimension; int current_dir = direction; int current_level_step =nb_splits; do{ int half_step = current_level_step/2; int left=0; int middle = half_step; int right=current_level_step; bool orient = start[current_dir]; do{ dir[middle] = current_dir; places[middle] = internal::hilbert_split (places[left], places[right], Cmp (current_dir,orient,_k)); left =right; right+=current_level_step; middle+=current_level_step; orient = ! orient; }while( left< nb_splits); current_level_step = half_step; current_dir = (current_dir +1) % _dimension; }while (current_dir != last_dir); if ( end-begin < two_to_dim) return; last_dir = (direction + _dimension -1) % _dimension; sort( places[0], places[1], start, last_dir); for(int i=1; i void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { _dimension = _k.point_dimension_d_object()(*begin); two_to_dim = 1; Starting_position start(_dimension); typename std::iterator_traits::difference_type N=end-begin; N*=2; for (int i=0; i<_dimension; ++i) start[i]=false; for (int i=0; i<_dimension; ++i) { two_to_dim *= 2; N/=2; if (N==0) break; } sort (begin, end, start, 0); } }; } # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_d.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_d.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_d.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_d.h" 2 namespace CGAL { namespace internal { template struct Fixed_hilbert_cmp_d : public std::binary_function { typedef typename K::Point_d Point; K k; int axe; bool orient; double value; Fixed_hilbert_cmp_d (int a, bool o, double v, const K &_k = K()) : k(_k), axe(a), orient(o), value(v) {} bool operator() (const Point &p) const { return (orient ? ( to_double( k.compute_coordinate_d_object() (p,axe) ) > value) : ( to_double( k.compute_coordinate_d_object() (p,axe) ) <= value)); } }; } template class Hilbert_sort_middle_d { public: typedef K Kernel; typedef typename Kernel::Point_d Point; typedef std::vector< bool > Starting_position; typedef std::vector< double > Corner; private: Kernel _k; std::ptrdiff_t _limit; mutable int _dimension; mutable int two_to_dim; struct Cmp : public internal::Fixed_hilbert_cmp_d { Cmp (int a, bool dir, double v, const Kernel &k) : internal::Fixed_hilbert_cmp_d (a,dir,v,k) {} }; public: Hilbert_sort_middle_d (const Kernel &k = Kernel(), std::ptrdiff_t limit = 1) : _k(k), _limit (limit) {} template void sort (RandomAccessIterator begin, RandomAccessIterator end, Starting_position start, int direction, Corner mini, Corner maxi) const { if (end - begin <= _limit) return; Corner med(_dimension); for( int i=0; i<_dimension; ++i) med[i]=(mini[i]+maxi[i])/2; Corner cmin=mini,cmax=med; std::vector places(two_to_dim +1); std::vector dir (two_to_dim +1); places[0]=begin; places[two_to_dim]=end; int last_dir = (direction + _dimension) % _dimension; int current_dir = direction; int current_level_step =two_to_dim; do{ int half_step = current_level_step/2; int left=0; int middle = half_step; int right=current_level_step; bool orient = start[current_dir]; do{ dir[middle] = current_dir; places[middle] = internal::fixed_hilbert_split (places[left], places[right], Cmp (current_dir,orient,med[current_dir],_k)); left =right; right+=current_level_step; middle+=current_level_step; orient = ! orient; }while( left< two_to_dim); current_level_step = half_step; current_dir = (current_dir +1) % _dimension; }while (current_dir != last_dir); last_dir = (direction + _dimension -1) % _dimension; sort( places[0], places[1], start, last_dir,cmin,cmax); cmin[last_dir] = med[last_dir]; cmax[last_dir] = maxi[last_dir]; for(int i=1; i void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { _dimension = _k.point_dimension_d_object()(*begin); two_to_dim = 1; Starting_position start(_dimension); Corner mini(_dimension),maxi(_dimension); for (int i=0; i<_dimension; ++i) mini[i]=maxi[i]=to_double( _k.compute_coordinate_d_object() (*begin,i) ); for(RandomAccessIterator it=begin+1; it maxi[i]) maxi[i] = d; } } for (int i=0; i<_dimension; ++i) { start[i]=false; two_to_dim *= 2; if (two_to_dim*2 <= 0) { (CGAL::possibly(end-begin < two_to_dim)?(static_cast(0)): ::CGAL::assertion_fail( "end-begin < two_to_dim" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_middle_d.h", 169)); break; } } sort (begin, end, start, 0, mini, maxi); } }; } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Hilbert_sort_d.h" 2 namespace CGAL { template class Hilbert_sort_d; template class Hilbert_sort_d : public Hilbert_sort_median_d { public: Hilbert_sort_d (const K &k=K() , std::ptrdiff_t limit=1 ) : Hilbert_sort_median_d (k,limit) {} }; template class Hilbert_sort_d : public Hilbert_sort_middle_d { public: Hilbert_sort_d (const K &k=K() , std::ptrdiff_t limit=1 ) : Hilbert_sort_middle_d (k,limit) {} }; } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/hilbert_sort.h" 2 # 1 "/localhome/glisse2/include/boost/random.hpp" 1 # 36 "/localhome/glisse2/include/boost/random.hpp" # 1 "/localhome/glisse2/include/boost/random/additive_combine.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/additive_combine.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/additive_combine.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/additive_combine.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/operators.hpp" 1 # 16 "/localhome/glisse2/include/boost/random/detail/operators.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 17 "/localhome/glisse2/include/boost/random/detail/operators.hpp" 2 # 26 "/localhome/glisse2/include/boost/random/additive_combine.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/seed.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/detail/seed.hpp" namespace boost { namespace random { namespace detail { template struct disable_seed : boost::disable_if > {}; template struct disable_constructor : disable_seed {}; template struct disable_constructor {}; # 59 "/localhome/glisse2/include/boost/random/detail/seed.hpp" } } } # 27 "/localhome/glisse2/include/boost/random/additive_combine.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/limits.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/integer/static_log2.hpp" 1 # 19 "/localhome/glisse2/include/boost/integer/static_log2.hpp" # 1 "/localhome/glisse2/include/boost/integer_fwd.hpp" 1 # 12 "/localhome/glisse2/include/boost/integer_fwd.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 2 3 # 13 "/localhome/glisse2/include/boost/integer_fwd.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 14 "/localhome/glisse2/include/boost/integer_fwd.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 18 "/localhome/glisse2/include/boost/integer_fwd.hpp" 2 namespace boost { typedef boost::uintmax_t static_min_max_unsigned_type; typedef boost::intmax_t static_min_max_signed_type; typedef boost::uintmax_t static_log2_argument_type; typedef int static_log2_result_type; # 42 "/localhome/glisse2/include/boost/integer_fwd.hpp" template < class T > class integer_traits; template < > class integer_traits< bool >; template < > class integer_traits< char >; template < > class integer_traits< signed char >; template < > class integer_traits< unsigned char >; template < > class integer_traits< wchar_t >; template < > class integer_traits< short >; template < > class integer_traits< unsigned short >; template < > class integer_traits< int >; template < > class integer_traits< unsigned int >; template < > class integer_traits< long >; template < > class integer_traits< unsigned long >; template < > class integer_traits< ::boost::long_long_type>; template < > class integer_traits< ::boost::ulong_long_type >; # 97 "/localhome/glisse2/include/boost/integer_fwd.hpp" template < typename LeastInt > struct int_fast_t; template< int Bits > struct int_t; template< int Bits > struct uint_t; template< boost::long_long_type MaxValue > struct int_max_value_t; template< boost::long_long_type MinValue > struct int_min_value_t; template< boost::ulong_long_type MaxValue > struct uint_value_t; template < std::size_t Bit > struct high_bit_mask_t; template < std::size_t Bits > struct low_bits_mask_t; template < > struct low_bits_mask_t< ::std::numeric_limits::digits >; template struct static_log2; template <> struct static_log2<0u>; template struct static_signed_min; template struct static_signed_max; template struct static_unsigned_min; template struct static_unsigned_max; } # 20 "/localhome/glisse2/include/boost/integer/static_log2.hpp" 2 namespace boost { namespace detail { namespace static_log2_impl { # 44 "/localhome/glisse2/include/boost/integer/static_log2.hpp" typedef boost::static_log2_argument_type argument_type; typedef boost::static_log2_result_type result_type; template struct choose_initial_n { static const bool c = (argument_type(1) << n << n) != 0; static const result_type value = !c*n + choose_initial_n<2*c*n>::value ; }; template <> struct choose_initial_n<0> { static const result_type value = 0; }; const result_type n_zero = 16; const result_type initial_n = choose_initial_n::value; # 84 "/localhome/glisse2/include/boost/integer/static_log2.hpp" template struct static_log2_impl { static const bool c = (x >> n) > 0; static const result_type value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) ; }; template <> struct static_log2_impl<1, 0> { static const result_type value = 0; }; } } template struct static_log2 { static const static_log2_result_type value = detail::static_log2_impl::static_log2_impl::value ; }; template <> struct static_log2<0> { }; } # 27 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 30 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/const_mod.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/detail/const_mod.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 20 "/localhome/glisse2/include/boost/random/detail/const_mod.hpp" 2 # 1 "/localhome/glisse2/include/boost/integer_traits.hpp" 1 # 23 "/localhome/glisse2/include/boost/integer_traits.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 24 "/localhome/glisse2/include/boost/integer_traits.hpp" 2 # 1 "/usr/include/wchar.h" 1 3 4 # 28 "/localhome/glisse2/include/boost/integer_traits.hpp" 2 # 39 "/localhome/glisse2/include/boost/integer_traits.hpp" # 40 "/localhome/glisse2/include/boost/integer_traits.hpp" 3 namespace boost { template class integer_traits : public std::numeric_limits { public: static const bool is_integral = false; }; namespace detail { template class integer_traits_base { public: static const bool is_integral = true; static const T const_min = min_val; static const T const_max = max_val; }; template const bool integer_traits_base::is_integral; template const T integer_traits_base::const_min; template const T integer_traits_base::const_max; } template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base # 130 "/localhome/glisse2/include/boost/integer_traits.hpp" 3 { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1), 9223372036854775807LL> { }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL * 2ULL + 1)> { }; # 256 "/localhome/glisse2/include/boost/integer_traits.hpp" 3 } # 22 "/localhome/glisse2/include/boost/random/detail/const_mod.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/large_arithmetic.hpp" 1 # 16 "/localhome/glisse2/include/boost/random/detail/large_arithmetic.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 17 "/localhome/glisse2/include/boost/random/detail/large_arithmetic.hpp" 2 # 1 "/localhome/glisse2/include/boost/integer.hpp" 1 # 22 "/localhome/glisse2/include/boost/integer.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 23 "/localhome/glisse2/include/boost/integer.hpp" 2 # 33 "/localhome/glisse2/include/boost/integer.hpp" # 34 "/localhome/glisse2/include/boost/integer.hpp" 3 namespace boost { template< typename LeastInt > struct int_fast_t { typedef LeastInt fast; typedef fast type; }; namespace detail{ template< int Category > struct int_least_helper {}; template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; template<> struct int_least_helper<2> { typedef long least; }; template<> struct int_least_helper<3> { typedef int least; }; template<> struct int_least_helper<4> { typedef short least; }; template<> struct int_least_helper<5> { typedef signed char least; }; template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; }; template<> struct int_least_helper<7> { typedef unsigned long least; }; template<> struct int_least_helper<8> { typedef unsigned int least; }; template<> struct int_least_helper<9> { typedef unsigned short least; }; template<> struct int_least_helper<10> { typedef unsigned char least; }; template struct exact_signed_base_helper{}; template struct exact_unsigned_base_helper{}; template <> struct exact_signed_base_helper { typedef signed char exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; template <> struct exact_signed_base_helper { typedef short exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; template <> struct exact_signed_base_helper { typedef int exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; template <> struct exact_signed_base_helper { typedef long exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; # 106 "/localhome/glisse2/include/boost/integer.hpp" 3 } template< int Bits > struct int_t : public detail::exact_signed_base_helper { typedef typename detail::int_least_helper < (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) + (Bits-1 <= ::std::numeric_limits::digits) + (Bits-1 <= ::std::numeric_limits::digits) + (Bits-1 <= ::std::numeric_limits::digits) + (Bits-1 <= ::std::numeric_limits::digits) >::least least; typedef typename int_fast_t::type fast; }; template< int Bits > struct uint_t : public detail::exact_unsigned_base_helper { # 143 "/localhome/glisse2/include/boost/integer.hpp" 3 typedef typename detail::int_least_helper < 5 + (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) >::least least; typedef typename int_fast_t::type fast; }; template< boost::long_long_type MaxValue > struct int_max_value_t { typedef typename detail::int_least_helper < (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) >::least least; typedef typename int_fast_t::type fast; }; template< boost::long_long_type MinValue > struct int_min_value_t { typedef typename detail::int_least_helper < (MinValue >= ::boost::integer_traits::const_min) + (MinValue >= ::boost::integer_traits::const_min) + (MinValue >= ::boost::integer_traits::const_min) + (MinValue >= ::boost::integer_traits::const_min) + (MinValue >= ::boost::integer_traits::const_min) >::least least; typedef typename int_fast_t::type fast; }; template< boost::ulong_long_type MaxValue > struct uint_value_t { # 237 "/localhome/glisse2/include/boost/integer.hpp" 3 typedef typename detail::int_least_helper < 5 + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) >::least least; typedef typename int_fast_t::type fast; }; } # 18 "/localhome/glisse2/include/boost/random/detail/large_arithmetic.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/integer_log2.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/detail/integer_log2.hpp" # 1 "/localhome/glisse2/include/boost/pending/integer_log2.hpp" 1 # 18 "/localhome/glisse2/include/boost/pending/integer_log2.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 19 "/localhome/glisse2/include/boost/pending/integer_log2.hpp" 2 namespace boost { namespace detail { template int integer_log2_impl(T x, int n) { int result = 0; while (x != 1) { const T t = static_cast(x >> n); if (t) { result += n; x = t; } n /= 2; } return result; } template struct max_pow2_less { enum { c = 2*n < p }; static const int value = c ? (max_pow2_less< c*p, 2*c*n>::value) : n ; }; template <> struct max_pow2_less<0, 0> { static const int value = 0; }; template struct width { static const int value = (std::numeric_limits::digits); }; } template int integer_log2(T x) { ((x > 0) ? static_cast (0) : __assert_fail ("x > 0", "/localhome/glisse2/include/boost/pending/integer_log2.hpp", 96, __PRETTY_FUNCTION__)); const int n = detail::max_pow2_less< detail::width :: value, 4 > :: value; return detail::integer_log2_impl(x, n); } } # 20 "/localhome/glisse2/include/boost/random/detail/integer_log2.hpp" 2 namespace boost { namespace random { namespace detail { # 35 "/localhome/glisse2/include/boost/random/detail/integer_log2.hpp" template struct integer_log2_impl { template constexpr static int apply(T t, int accum, int update = 0) { return update = ((t >> Shift) != 0) * Shift, integer_log2_impl::apply(t >> update, accum + update); } }; template<> struct integer_log2_impl<1> { template constexpr static int apply(T t, int accum) { return int(t >> 1) + accum; } }; template constexpr int integer_log2(T t) { return integer_log2_impl< ::boost::detail::max_pow2_less< ::std::numeric_limits::digits, 4 >::value >::apply(t, 0); } } } } # 20 "/localhome/glisse2/include/boost/random/detail/large_arithmetic.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 22 "/localhome/glisse2/include/boost/random/detail/large_arithmetic.hpp" 2 namespace boost { namespace random { namespace detail { struct div_t { boost::uintmax_t quotient; boost::uintmax_t remainder; }; inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) { static const int bits = ::std::numeric_limits< ::boost::uintmax_t>::digits / 2; static const ::boost::uintmax_t mask = (::boost::uintmax_t(1) << bits) - 1; typedef ::boost::uint_t::fast digit_t; int shift = std::numeric_limits< ::boost::uintmax_t>::digits - 1 - detail::integer_log2(m); a <<= shift; m <<= shift; digit_t product[4] = { 0, 0, 0, 0 }; digit_t a_[2] = { digit_t(a & mask), digit_t((a >> bits) & mask) }; digit_t b_[2] = { digit_t(b & mask), digit_t((b >> bits) & mask) }; digit_t m_[2] = { digit_t(m & mask), digit_t((m >> bits) & mask) }; for(int i = 0; i < 2; ++i) { digit_t carry = 0; for(int j = 0; j < 2; ++j) { ::boost::uint64_t temp = ::boost::uintmax_t(a_[i]) * b_[j] + carry + product[i + j]; product[i + j] = digit_t(temp & mask); carry = digit_t(temp >> bits); } if(carry != 0) { product[i + 2] += carry; } } digit_t quotient[2]; if(m == 0) { div_t result = { ((::boost::uintmax_t(product[3]) << bits) | product[2]), ((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift, }; return result; } for(int i = 3; i >= 2; --i) { ::boost::uintmax_t temp = ::boost::uintmax_t(product[i]) << bits | product[i - 1]; digit_t q = digit_t((product[i] == m_[1]) ? mask : temp / m_[1]); ::boost::uintmax_t rem = ((temp - ::boost::uintmax_t(q) * m_[1]) << bits) + product[i - 2]; ::boost::uintmax_t diff = m_[0] * ::boost::uintmax_t(q); int error = 0; if(diff > rem) { if(diff - rem > m) { error = 2; } else { error = 1; } } q -= error; rem = rem + error * m - diff; quotient[i - 2] = q; product[i] = 0; product[i-1] = (rem >> bits) & mask; product[i-2] = rem & mask; } div_t result = { ((::boost::uintmax_t(quotient[1]) << bits) | quotient[0]), ((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift, }; return result; } inline boost::uintmax_t muldiv(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) { return detail::muldivmod(a, b, m).quotient; } inline boost::uintmax_t mulmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m) { return detail::muldivmod(a, b, m).remainder; } } } } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 121 "/localhome/glisse2/include/boost/random/detail/large_arithmetic.hpp" 2 # 24 "/localhome/glisse2/include/boost/random/detail/const_mod.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/detail/const_mod.hpp" 2 namespace boost { namespace random { template class const_mod { public: static IntType apply(IntType x) { if(((unsigned_m() - 1) & unsigned_m()) == 0) return (unsigned_type(x)) & (unsigned_m() - 1); else { IntType supress_warnings = (m == 0); ((supress_warnings == 0) ? static_cast (0) : __assert_fail ("supress_warnings == 0", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 40, __PRETTY_FUNCTION__)); return x % (m + supress_warnings); } } static IntType add(IntType x, IntType c) { if(((unsigned_m() - 1) & unsigned_m()) == 0) return (unsigned_type(x) + unsigned_type(c)) & (unsigned_m() - 1); else if(c == 0) return x; else if(x < m - c) return x + c; else return x - (m - c); } static IntType mult(IntType a, IntType x) { if(((unsigned_m() - 1) & unsigned_m()) == 0) return unsigned_type(a) * unsigned_type(x) & (unsigned_m() - 1); else if(a == 0) return 0; else if(a == 1) return x; else if(m <= traits::const_max/a) return mult_small(a, x); else if(traits::is_signed && (m%a < m/a)) return mult_schrage(a, x); else return mult_general(a, x); } static IntType mult_add(IntType a, IntType x, IntType c) { if(((unsigned_m() - 1) & unsigned_m()) == 0) return (unsigned_type(a) * unsigned_type(x) + unsigned_type(c)) & (unsigned_m() - 1); else if(a == 0) return c; else if(m <= (traits::const_max-c)/a) { IntType supress_warnings = (m == 0); ((supress_warnings == 0) ? static_cast (0) : __assert_fail ("supress_warnings == 0", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 81, __PRETTY_FUNCTION__)); return (a*x+c) % (m + supress_warnings); } else return add(mult(a, x), c); } static IntType pow(IntType a, boost::uintmax_t exponent) { IntType result = 1; while(exponent != 0) { if(exponent % 2 == 1) { result = mult(result, a); } a = mult(a, a); exponent /= 2; } return result; } static IntType invert(IntType x) { return x == 0 ? 0 : (m == 0? invert_euclidian0(x) : invert_euclidian(x)); } private: typedef integer_traits traits; typedef typename make_unsigned::type unsigned_type; const_mod(); static IntType mult_small(IntType a, IntType x) { IntType supress_warnings = (m == 0); ((supress_warnings == 0) ? static_cast (0) : __assert_fail ("supress_warnings == 0", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 112, __PRETTY_FUNCTION__)); return a*x % (m + supress_warnings); } static IntType mult_schrage(IntType a, IntType value) { const IntType q = m / a; const IntType r = m % a; ((r < q) ? static_cast (0) : __assert_fail ("r < q", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 121, __PRETTY_FUNCTION__)); return sub(a*(value%q), r*(value/q)); } static IntType mult_general(IntType a, IntType b) { IntType suppress_warnings = (m == 0); ((suppress_warnings == 0) ? static_cast (0) : __assert_fail ("suppress_warnings == 0", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 129, __PRETTY_FUNCTION__)); IntType modulus = m + suppress_warnings; ((modulus == m) ? static_cast (0) : __assert_fail ("modulus == m", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 131, __PRETTY_FUNCTION__)); if(::boost::uintmax_t(modulus) <= (::std::numeric_limits< ::boost::uintmax_t>::max)() / modulus) { return static_cast(boost::uintmax_t(a) * b % modulus); } else { return static_cast(detail::mulmod(a, b, modulus)); } } static IntType sub(IntType a, IntType b) { if(a < b) return m - (b - a); else return a - b; } static unsigned_type unsigned_m() { if(m == 0) { return unsigned_type((std::numeric_limits::max)()) + 1; } else { return unsigned_type(m); } } static IntType invert_euclidian(IntType c) { ((c > 0) ? static_cast (0) : __assert_fail ("c > 0", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 162, __PRETTY_FUNCTION__)); IntType l1 = 0; IntType l2 = 1; IntType n = c; IntType p = m; for(;;) { IntType q = p / n; l1 += q * l2; p -= q * n; if(p == 0) return l2; IntType q2 = n / p; l2 += q2 * l1; n -= q2 * p; if(n == 0) return m - l1; } } static IntType invert_euclidian0(IntType c) { ((c > 0) ? static_cast (0) : __assert_fail ("c > 0", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 185, __PRETTY_FUNCTION__)); if(c == 1) return 1; IntType l1 = 0; IntType l2 = 1; IntType n = c; IntType p = m; IntType max = (std::numeric_limits::max)(); IntType q = max / n; ((max % n != n - 1 && "c must be relatively prime to m.") ? static_cast (0) : __assert_fail ("max % n != n - 1 && \"c must be relatively prime to m.\"", "/localhome/glisse2/include/boost/random/detail/const_mod.hpp", 193, __PRETTY_FUNCTION__)); l1 += q * l2; p = max - q * n + 1; for(;;) { if(p == 0) return l2; IntType q2 = n / p; l2 += q2 * l1; n -= q2 * p; if(n == 0) return m - l1; q = p / n; l1 += q * l2; p -= q * n; } } }; } } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 215 "/localhome/glisse2/include/boost/random/detail/const_mod.hpp" 2 # 31 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 1 # 17 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 18 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/no_tr1/cmath.hpp" 1 # 21 "/localhome/glisse2/include/boost/config/no_tr1/cmath.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 22 "/localhome/glisse2/include/boost/config/no_tr1/cmath.hpp" 2 # 19 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 2 # 1 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" 1 # 18 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 2 3 # 19 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 20 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" 2 # 32 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" # 33 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" 3 namespace boost { template < std::size_t Bit > struct high_bit_mask_t { typedef typename uint_t<(Bit + 1)>::least least; typedef typename uint_t<(Bit + 1)>::fast fast; static const least high_bit = (least( 1u ) << Bit); static const fast high_bit_fast = (fast( 1u ) << Bit); static const std::size_t bit_position = Bit; }; template < std::size_t Bits > struct low_bits_mask_t { typedef typename uint_t::least least; typedef typename uint_t::fast fast; static const least sig_bits = (~( ~(least( 0u )) << Bits )); static const fast sig_bits_fast = fast(sig_bits); static const std::size_t bit_count = Bits; }; # 89 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" 3 template < > struct low_bits_mask_t< std::numeric_limits::digits > { typedef std::numeric_limits limits_type; typedef uint_t::least least; typedef uint_t::fast fast; static const least sig_bits = (~( least(0u) )); static const fast sig_bits_fast = fast(sig_bits); static const std::size_t bit_count = limits_type::digits; }; template < > struct low_bits_mask_t< std::numeric_limits::digits > { typedef std::numeric_limits limits_type; typedef uint_t::least least; typedef uint_t::fast fast; static const least sig_bits = (~( least(0u) )); static const fast sig_bits_fast = fast(sig_bits); static const std::size_t bit_count = limits_type::digits; }; template < > struct low_bits_mask_t< std::numeric_limits::digits > { typedef std::numeric_limits limits_type; typedef uint_t::least least; typedef uint_t::fast fast; static const least sig_bits = (~( least(0u) )); static const fast sig_bits_fast = fast(sig_bits); static const std::size_t bit_count = limits_type::digits; }; template < > struct low_bits_mask_t< std::numeric_limits::digits > { typedef std::numeric_limits limits_type; typedef uint_t::least least; typedef uint_t::fast fast; static const least sig_bits = (~( least(0u) )); static const fast sig_bits_fast = fast(sig_bits); static const std::size_t bit_count = limits_type::digits; }; # 123 "/localhome/glisse2/include/boost/integer/integer_mask.hpp" 3 } # 20 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 2 # 29 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/signed_unsigned_tools.hpp" 1 # 18 "/localhome/glisse2/include/boost/random/detail/signed_unsigned_tools.hpp" namespace boost { namespace random { namespace detail { template::is_signed> struct subtract { }; template struct subtract { typedef T result_type; result_type operator()(T x, T y) { return x - y; } }; template struct subtract { typedef typename make_unsigned::type result_type; result_type operator()(T x, T y) { if (y >= 0) return result_type(x) - result_type(y); if (x >= 0) return result_type(x) + result_type(-(y+1)) + 1; return result_type(x - y); } }; template::is_signed> struct add { }; template struct add { typedef T2 result_type; result_type operator()(T1 x, T2 y) { return T2(x) + y; } }; template struct add { typedef T2 result_type; result_type operator()(T1 x, T2 y) { if (y >= 0) return T2(x) + y; if (x >= T1(-(y+1))) return T2(x - T1(-(y+1)) - 1); return T2(x) + y; } }; } } } # 30 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/generator_bits.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/detail/generator_bits.hpp" namespace boost { namespace random { namespace detail { template struct generator_bits { static std::size_t value() { return std::numeric_limits::digits; } }; } } } # 31 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 33 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 2 namespace boost { namespace random { namespace detail { template struct seed_type { typedef typename boost::mpl::if_, T, boost::uint32_t >::type type; }; template struct const_pow_impl { template static T call(T arg, int n, T result) { return const_pow_impl::call(arg * arg, n / 2, n%2 == 0? result : result * arg); } }; template<> struct const_pow_impl<0> { template static T call(T, int, T result) { return result; } }; template inline T const_pow(T arg, int n) { return const_pow_impl::call(arg, n, T(1)); } template inline T pow2(int n) { typedef unsigned int_type; const int max_bits = std::numeric_limits::digits; T multiplier = T(int_type(1) << (max_bits - 1)) * 2; return (int_type(1) << (n % max_bits)) * const_pow::digits / max_bits>(multiplier, n / max_bits); } template void generate_from_real(Engine& eng, Iter begin, Iter end) { using std::fmod; typedef typename Engine::result_type RealType; const int Bits = detail::generator_bits::value(); int remaining_bits = 0; boost::uint_least32_t saved_bits = 0; RealType multiplier = pow2( Bits); RealType mult32 = RealType(4294967296.0); while(true) { RealType val = eng() * multiplier; int available_bits = Bits; if(Bits < 32 && available_bits < 32 - remaining_bits) { saved_bits |= boost::uint_least32_t(val) << remaining_bits; remaining_bits += Bits; } else { if(Bits < 32 || remaining_bits != 0) { boost::uint_least32_t divisor = (boost::uint_least32_t(1) << (32 - remaining_bits)); boost::uint_least32_t extra_bits = boost::uint_least32_t(fmod(val, mult32)) & (divisor - 1); val = val / divisor; *begin++ = saved_bits | (extra_bits << remaining_bits); if(begin == end) return; available_bits -= 32 - remaining_bits; remaining_bits = 0; } if(Bits >= 32) { for(; available_bits >= 32; available_bits -= 32) { boost::uint_least32_t word = boost::uint_least32_t(fmod(val, mult32)); val /= mult32; *begin++ = word; if(begin == end) return; } } remaining_bits = available_bits; saved_bits = static_cast(val); } } } template void generate_from_int(Engine& eng, Iter begin, Iter end) { typedef typename Engine::result_type IntType; typedef typename boost::make_unsigned::type unsigned_type; int remaining_bits = 0; boost::uint_least32_t saved_bits = 0; unsigned_type range = boost::random::detail::subtract()((eng.max)(), (eng.min)()); int bits = (range == (std::numeric_limits::max)()) ? std::numeric_limits::digits : detail::integer_log2(range + 1); { int discarded_bits = detail::integer_log2(bits); unsigned_type excess = (range + 1) >> (bits - discarded_bits); if(excess != 0) { int extra_bits = detail::integer_log2((excess - 1) ^ excess); bits = bits - discarded_bits + extra_bits; } } unsigned_type mask = (static_cast(2) << (bits - 1)) - 1; unsigned_type limit = ((range + 1) & ~mask) - 1; while(true) { unsigned_type val; do { val = boost::random::detail::subtract()(eng(), (eng.min)()); } while(limit != range && val > limit); val &= mask; int available_bits = bits; if(available_bits == 32) { *begin++ = static_cast(val) & 0xFFFFFFFFu; if(begin == end) return; } else if(available_bits % 32 == 0) { for(int i = 0; i < available_bits / 32; ++i) { boost::uint_least32_t word = boost::uint_least32_t(val) & 0xFFFFFFFFu; int supress_warning = (bits >= 32); ((supress_warning == 1) ? static_cast (0) : __assert_fail ("supress_warning == 1", "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp", 173, __PRETTY_FUNCTION__)); val >>= (32 * supress_warning); *begin++ = word; if(begin == end) return; } } else if(bits < 32 && available_bits < 32 - remaining_bits) { saved_bits |= boost::uint_least32_t(val) << remaining_bits; remaining_bits += bits; } else { if(bits < 32 || remaining_bits != 0) { boost::uint_least32_t extra_bits = boost::uint_least32_t(val) & ((boost::uint_least32_t(1) << (32 - remaining_bits)) - 1); val >>= 32 - remaining_bits; *begin++ = saved_bits | (extra_bits << remaining_bits); if(begin == end) return; available_bits -= 32 - remaining_bits; remaining_bits = 0; } if(bits >= 32) { for(; available_bits >= 32; available_bits -= 32) { boost::uint_least32_t word = boost::uint_least32_t(val) & 0xFFFFFFFFu; int supress_warning = (bits >= 32); ((supress_warning == 1) ? static_cast (0) : __assert_fail ("supress_warning == 1", "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp", 194, __PRETTY_FUNCTION__)); val >>= (32 * supress_warning); *begin++ = word; if(begin == end) return; } } remaining_bits = available_bits; saved_bits = static_cast(val); } } } template void generate_impl(Engine& eng, Iter first, Iter last, boost::mpl::true_) { return detail::generate_from_int(eng, first, last); } template void generate_impl(Engine& eng, Iter first, Iter last, boost::mpl::false_) { return detail::generate_from_real(eng, first, last); } template void generate(Engine& eng, Iter first, Iter last) { return detail::generate_impl(eng, first, last, boost::is_integral()); } template IntType seed_one_int(SeedSeq& seq) { static const int log = ::boost::mpl::if_c<(m == 0), ::boost::mpl::int_<(::std::numeric_limits::digits)>, ::boost::static_log2 >::type::value; static const int k = (log + ((~(static_cast(2) << (log - 1)) & m)? 32 : 31)) / 32; ::boost::uint_least32_t array[log / 32 + 4]; seq.generate(&array[0], &array[0] + k + 3); IntType s = 0; for(int j = 0; j < k; ++j) { IntType digit = const_mod::apply(IntType(array[j+3])); IntType mult = IntType(1) << 32*j; s = const_mod::mult_add(mult, digit, s); } return s; } template IntType get_one_int(Iter& first, Iter last) { static const int log = ::boost::mpl::if_c<(m == 0), ::boost::mpl::int_<(::std::numeric_limits::digits)>, ::boost::static_log2 >::type::value; static const int k = (log + ((~(static_cast(2) << (log - 1)) & m)? 32 : 31)) / 32; IntType s = 0; for(int j = 0; j < k; ++j) { if(first == last) { throw ::std::invalid_argument("Not enough elements in call to seed."); } IntType digit = const_mod::apply(IntType(*first++)); IntType mult = IntType(1) << 32*j; s = const_mod::mult_add(mult, digit, s); } return s; } template void seed_array_int_impl(SeedSeq& seq, UIntType (&x)[n]) { boost::uint_least32_t storage[((w+31)/32) * n]; seq.generate(&storage[0], &storage[0] + ((w+31)/32) * n); for(std::size_t j = 0; j < n; j++) { UIntType val = 0; for(std::size_t k = 0; k < (w+31)/32; ++k) { val += static_cast(storage[(w+31)/32*j + k]) << 32*k; } x[j] = val & ::boost::low_bits_mask_t::sig_bits; } } template inline void seed_array_int_impl(SeedSeq& seq, IntType (&x)[n], boost::mpl::true_) { typedef typename boost::make_unsigned::type unsigned_array[n]; seed_array_int_impl(seq, reinterpret_cast(x)); } template inline void seed_array_int_impl(SeedSeq& seq, IntType (&x)[n], boost::mpl::false_) { seed_array_int_impl(seq, x); } template inline void seed_array_int(SeedSeq& seq, IntType (&x)[n]) { seed_array_int_impl(seq, x, boost::is_signed()); } template void fill_array_int_impl(Iter& first, Iter last, UIntType (&x)[n]) { for(std::size_t j = 0; j < n; j++) { UIntType val = 0; for(std::size_t k = 0; k < (w+31)/32; ++k) { if(first == last) { throw std::invalid_argument("Not enough elements in call to seed."); } val += static_cast(*first++) << 32*k; } x[j] = val & ::boost::low_bits_mask_t::sig_bits; } } template inline void fill_array_int_impl(Iter& first, Iter last, IntType (&x)[n], boost::mpl::true_) { typedef typename boost::make_unsigned::type unsigned_array[n]; fill_array_int_impl(first, last, reinterpret_cast(x)); } template inline void fill_array_int_impl(Iter& first, Iter last, IntType (&x)[n], boost::mpl::false_) { fill_array_int_impl(first, last, x); } template inline void fill_array_int(Iter& first, Iter last, IntType (&x)[n]) { fill_array_int_impl(first, last, x, boost::is_signed()); } template void seed_array_real_impl(const boost::uint_least32_t* storage, RealType (&x)[n]) { boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32)); RealType two32 = 4294967296.0; const RealType divisor = RealType(1)/detail::pow2(w); unsigned int j; for(j = 0; j < n; ++j) { RealType val = RealType(0); RealType mult = divisor; for(int k = 0; k < w/32; ++k) { val += *storage++ * mult; mult *= two32; } if(mask != 0) { val += (*storage++ & mask) * mult; } ((val >= 0) ? static_cast (0) : __assert_fail ("val >= 0", "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp", 350, __PRETTY_FUNCTION__)); ((val < 1) ? static_cast (0) : __assert_fail ("val < 1", "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp", 351, __PRETTY_FUNCTION__)); x[j] = val; } } template void seed_array_real(SeedSeq& seq, RealType (&x)[n]) { using std::pow; boost::uint_least32_t storage[((w+31)/32) * n]; seq.generate(&storage[0], &storage[0] + ((w+31)/32) * n); seed_array_real_impl(storage, x); } template void fill_array_real(Iter& first, Iter last, RealType (&x)[n]) { boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32)); RealType two32 = 4294967296.0; const RealType divisor = RealType(1)/detail::pow2(w); unsigned int j; for(j = 0; j < n; ++j) { RealType val = RealType(0); RealType mult = divisor; for(int k = 0; k < w/32; ++k, ++first) { if(first == last) throw std::invalid_argument("Not enough elements in call to seed."); val += *first * mult; mult *= two32; } if(mask != 0) { if(first == last) throw std::invalid_argument("Not enough elements in call to seed."); val += (*first & mask) * mult; ++first; } ((val >= 0) ? static_cast (0) : __assert_fail ("val >= 0", "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp", 385, __PRETTY_FUNCTION__)); ((val < 1) ? static_cast (0) : __assert_fail ("val < 1", "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp", 386, __PRETTY_FUNCTION__)); x[j] = val; } } } } } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 396 "/localhome/glisse2/include/boost/random/detail/seed_impl.hpp" 2 # 33 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 36 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 namespace boost { namespace random { # 62 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" template class linear_congruential_engine { public: typedef IntType result_type; static const bool has_fixed_range = false; static const IntType multiplier = a; static const IntType increment = c; static const IntType modulus = m; static const IntType default_seed = 1; static_assert(std::numeric_limits::is_integer, "std::numeric_limits::is_integer"); static_assert(m == 0 || a < m, "m == 0 || a < m"); static_assert(m == 0 || c < m, "m == 0 || c < m"); linear_congruential_engine() { seed(); } explicit linear_congruential_engine(const IntType& x0) { seed(x0); } template explicit linear_congruential_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } # 108 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" template linear_congruential_engine(It& first, It last) { seed(first, last); } void seed() { seed(default_seed); } void seed(const IntType& x0) { if(modulus == 0) { _x = x0; } else { _x = x0 % modulus; } if(_x <= 0 && _x != 0) { _x += modulus; } if(increment == 0 && _x == 0) { _x = 1; } ((_x >= (min)()) ? static_cast (0) : __assert_fail ("_x >= (min)()", "/localhome/glisse2/include/boost/random/linear_congruential.hpp", 143, __PRETTY_FUNCTION__)); ((_x <= (max)()) ? static_cast (0) : __assert_fail ("_x <= (max)()", "/localhome/glisse2/include/boost/random/linear_congruential.hpp", 144, __PRETTY_FUNCTION__)); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { seed(detail::seed_one_int(seq)); } # 161 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" template void seed(It& first, It last) { seed(detail::get_one_int(first, last)); } static result_type min () { return c == 0 ? 1 : 0; } static result_type max () { return modulus-1; } IntType operator()() { _x = const_mod::mult_add(a, _x, c); return _x; } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } void discard(boost::uintmax_t z) { typedef const_mod mod_type; IntType b_inv = mod_type::invert(a-1); IntType b_gcd = mod_type::mult(a-1, b_inv); if(b_gcd == 1) { IntType a_z = mod_type::pow(a, z); _x = mod_type::mult_add(a_z, _x, mod_type::mult(mod_type::mult(c, b_inv), a_z - 1)); } else { IntType a_zm1_over_gcd = 0; IntType a_km1_over_gcd = (a - 1) / b_gcd; boost::uintmax_t exponent = z; while(exponent != 0) { if(exponent % 2 == 1) { a_zm1_over_gcd = mod_type::mult_add( b_gcd, mod_type::mult(a_zm1_over_gcd, a_km1_over_gcd), mod_type::add(a_zm1_over_gcd, a_km1_over_gcd)); } a_km1_over_gcd = mod_type::mult_add( b_gcd, mod_type::mult(a_km1_over_gcd, a_km1_over_gcd), mod_type::add(a_km1_over_gcd, a_km1_over_gcd)); exponent /= 2; } IntType a_z = mod_type::mult_add(b_gcd, a_zm1_over_gcd, 1); IntType num = mod_type::mult(c, a_zm1_over_gcd); b_inv = mod_type::invert((a-1)/b_gcd); _x = mod_type::mult_add(a_z, _x, mod_type::mult(b_inv, num)); } } friend bool operator==(const linear_congruential_engine& x, const linear_congruential_engine& y) { return x._x == y._x; } friend bool operator!=(const linear_congruential_engine& x, const linear_congruential_engine& y) { return !(x == y); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const linear_congruential_engine& lcg) { return os << lcg._x; } template friend std::basic_istream& operator>>(std::basic_istream& is, linear_congruential_engine& lcg) { lcg.read(is); return is; } private: template void read(std::basic_istream& is) { IntType x; if(is >> x) { if(x >= (min)() && x <= (max)()) { _x = x; } else { is.setstate(std::ios_base::failbit); } } } IntType _x; }; template const bool linear_congruential_engine::has_fixed_range; template const IntType linear_congruential_engine::multiplier; template const IntType linear_congruential_engine::increment; template const IntType linear_congruential_engine::modulus; template const IntType linear_congruential_engine::default_seed; template class linear_congruential : public linear_congruential_engine { typedef linear_congruential_engine base_type; public: linear_congruential(IntType x0 = 1) : base_type(x0) {} template linear_congruential(It& first, It last) : base_type(first, last) {} }; # 323 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" typedef linear_congruential_engine minstd_rand0; # 333 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" typedef linear_congruential_engine minstd_rand; # 347 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" class rand48 { public: typedef boost::uint32_t result_type; static const bool has_fixed_range = false; static uint32_t min () { return 0; } static uint32_t max () { return 0x7FFFFFFF; } rand48() : lcf(cnv(static_cast(1))) {} explicit rand48(const result_type& x0) { seed(x0); } template explicit rand48(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } template rand48(It& first, It last) : lcf(first, last) { } void seed() { seed(static_cast(1)); } void seed(const result_type& x0) { lcf.seed(cnv(x0)); } template void seed(It& first, It last) { lcf.seed(first,last); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { lcf.seed(seq); } uint32_t operator()() { return static_cast(lcf() >> 17); } void discard(boost::uintmax_t z) { lcf.discard(z); } template void generate(Iter first, Iter last) { for(; first != last; ++first) { *first = (*this)(); } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const rand48& r) { os << r.lcf; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, rand48& r) { is >> r.lcf; return is; } friend bool operator==(const rand48& x, const rand48& y) { return x.lcf == y.lcf; } friend bool operator!=(const rand48& x, const rand48& y) { return !(x == y); } private: typedef random::linear_congruential_engine lcf_t; lcf_t lcf; static boost::uint64_t cnv(boost::uint32_t x) { return (static_cast(x) << 16) | 0x330e; } }; } using random::minstd_rand0; using random::minstd_rand; using random::rand48; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 465 "/localhome/glisse2/include/boost/random/linear_congruential.hpp" 2 # 28 "/localhome/glisse2/include/boost/random/additive_combine.hpp" 2 namespace boost { namespace random { # 49 "/localhome/glisse2/include/boost/random/additive_combine.hpp" template class additive_combine_engine { public: typedef MLCG1 first_base; typedef MLCG2 second_base; typedef typename MLCG1::result_type result_type; static const bool has_fixed_range = false; static result_type min () { return 1; } static result_type max () { return MLCG1::modulus-1; } additive_combine_engine() : _mlcg1(), _mlcg2() { } explicit additive_combine_engine(const result_type& seed_arg) { _mlcg1.seed(seed_arg); _mlcg2.seed(seed_arg); } # 97 "/localhome/glisse2/include/boost/random/additive_combine.hpp" template explicit additive_combine_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { _mlcg1.seed(seq); _mlcg2.seed(seq); } additive_combine_engine(typename MLCG1::result_type seed1, typename MLCG2::result_type seed2) : _mlcg1(seed1), _mlcg2(seed2) { } # 121 "/localhome/glisse2/include/boost/random/additive_combine.hpp" template additive_combine_engine(It& first, It last) : _mlcg1(first, last), _mlcg2(first, last) { } void seed() { _mlcg1.seed(); _mlcg2.seed(); } void seed(const result_type& seed_arg) { _mlcg1.seed(seed_arg); _mlcg2.seed(seed_arg); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { _mlcg1.seed(seq); _mlcg2.seed(seq); } void seed(typename MLCG1::result_type seed1, typename MLCG2::result_type seed2) { _mlcg1.seed(seed1); _mlcg2.seed(seed2); } # 179 "/localhome/glisse2/include/boost/random/additive_combine.hpp" template void seed(It& first, It last) { _mlcg1.seed(first, last); _mlcg2.seed(first, last); } result_type operator()() { result_type val1 = _mlcg1(); result_type val2 = _mlcg2(); if(val2 < val1) return val1 - val2; else return val1 - val2 + MLCG1::modulus - 1; } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } void discard(boost::uintmax_t z) { _mlcg1.discard(z); _mlcg2.discard(z); } # 212 "/localhome/glisse2/include/boost/random/additive_combine.hpp" template friend std::basic_ostream& operator<<(std::basic_ostream& os, const additive_combine_engine& r) { os << r._mlcg1 << ' ' << r._mlcg2; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, additive_combine_engine& r) { is >> r._mlcg1 >> std::ws >> r._mlcg2; return is; } friend bool operator==(const additive_combine_engine& x, const additive_combine_engine& y) { return x._mlcg1 == y._mlcg1 && x._mlcg2 == y._mlcg2; } friend bool operator!=(const additive_combine_engine& lhs, const additive_combine_engine& rhs) { return !(lhs == rhs); } private: MLCG1 _mlcg1; MLCG2 _mlcg2; }; template const bool additive_combine_engine::has_fixed_range; template class additive_combine : public additive_combine_engine { typedef additive_combine_engine base_t; public: typedef typename base_t::result_type result_type; additive_combine() {} template additive_combine(T& arg) : base_t(arg) {} template additive_combine(const T& arg) : base_t(arg) {} template additive_combine(It& first, It last) : base_t(first, last) {} }; # 272 "/localhome/glisse2/include/boost/random/additive_combine.hpp" typedef additive_combine_engine< linear_congruential_engine, linear_congruential_engine > ecuyer1988; } using random::ecuyer1988; } # 37 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/discard_block.hpp" 1 # 22 "/localhome/glisse2/include/boost/random/discard_block.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/discard_block.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/discard_block.hpp" 2 namespace boost { namespace random { # 41 "/localhome/glisse2/include/boost/random/discard_block.hpp" template class discard_block_engine { typedef typename detail::seed_type< typename UniformRandomNumberGenerator::result_type>::type seed_type; public: typedef UniformRandomNumberGenerator base_type; typedef typename base_type::result_type result_type; static const std::size_t block_size = p; static const std::size_t used_block = r; static const bool has_fixed_range = false; static const std::size_t total_block = p; static const std::size_t returned_block = r; static_assert(total_block >= returned_block, "total_block >= returned_block"); discard_block_engine() : _rng(), _n(0) { } explicit discard_block_engine(const base_type & rng) : _rng(rng), _n(0) { } explicit discard_block_engine(base_type && rng) : _rng(rng), _n(0) { } explicit discard_block_engine(const seed_type& value) { _rng.seed(value); _n = 0; } template explicit discard_block_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { _rng.seed(seq); _n = 0; } template discard_block_engine(It& first, It last) : _rng(first, last), _n(0) { } void seed() { _rng.seed(); _n = 0; } void seed(const seed_type& s) { _rng.seed(s); _n = 0; } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { _rng.seed(seq); _n = 0; } template void seed(It& first, It last) { _rng.seed(first, last); _n = 0; } const base_type& base() const { return _rng; } result_type operator()() { if(_n >= returned_block) { for(std::size_t i = 0; i < total_block - _n; ++i) { _rng(); } _n = 0; } ++_n; return _rng(); } void discard(boost::uintmax_t z) { for(boost::uintmax_t j = 0; j < z; ++j) { (*this)(); } } template void generate(It first, It last) { detail::generate(*this, first, last); } static result_type min () { return (base_type::min)(); } static result_type max () { return (base_type::max)(); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const discard_block_engine& s) { os << s._rng << ' ' << s._n; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, discard_block_engine& s) { is >> s._rng >> std::ws >> s._n; return is; } friend bool operator==(const discard_block_engine& x, const discard_block_engine& y) { return x._rng == y._rng && x._n == y._n; } friend bool operator!=(const discard_block_engine& x, const discard_block_engine& y) { return !(x == y); } private: base_type _rng; std::size_t _n; }; template const bool discard_block_engine::has_fixed_range; template const std::size_t discard_block_engine::total_block; template const std::size_t discard_block_engine::returned_block; template const std::size_t discard_block_engine::block_size; template const std::size_t discard_block_engine::used_block; template class discard_block : public discard_block_engine { typedef discard_block_engine base_t; public: typedef typename base_t::result_type result_type; discard_block() {} template discard_block(T& arg) : base_t(arg) {} template discard_block(const T& arg) : base_t(arg) {} template discard_block(It& first, It last) : base_t(first, last) {} result_type min () { return (this->base().min)(); } result_type max () { return (this->base().max)(); } }; namespace detail { template struct generator_bits; template struct generator_bits > { static std::size_t value() { return generator_bits::value(); } }; template struct generator_bits > { static std::size_t value() { return generator_bits::value(); } }; } } } # 38 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/independent_bits.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/independent_bits.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 20 "/localhome/glisse2/include/boost/random/independent_bits.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/independent_bits.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/independent_bits.hpp" 2 namespace boost { namespace random { # 43 "/localhome/glisse2/include/boost/random/independent_bits.hpp" template class independent_bits_engine { public: typedef Engine base_type; typedef UIntType result_type; static const bool has_fixed_range = false; static result_type min () { return 0; } static result_type max () { return boost::low_bits_mask_t::sig_bits; } independent_bits_engine() { } explicit independent_bits_engine(const result_type& seed_arg) { _base.seed(seed_arg); } template explicit independent_bits_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { _base.seed(seq); } independent_bits_engine(const base_type& base_arg) : _base(base_arg) {} # 97 "/localhome/glisse2/include/boost/random/independent_bits.hpp" template independent_bits_engine(It& first, It last) : _base(first, last) { } void seed() { _base.seed(); } void seed(const result_type& seed_arg) { _base.seed(seed_arg); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { _base.seed(seq); } # 132 "/localhome/glisse2/include/boost/random/independent_bits.hpp" template void seed(It& first, It last) { _base.seed(first, last); } result_type operator()() { base_unsigned range = detail::subtract()((_base.max)(), (_base.min)()); std::size_t m = (range == (std::numeric_limits::max)()) ? std::numeric_limits::digits : detail::integer_log2(range + 1); std::size_t n = (w + m - 1) / m; std::size_t w0, n0; base_unsigned y0, y1; base_unsigned y0_mask, y1_mask; calc_params(n, range, w0, n0, y0, y1, y0_mask, y1_mask); if(base_unsigned(range - y0 + 1) > y0 / n) { ++n; calc_params(n, range, w0, n0, y0, y1, y0_mask, y1_mask); } ((n0*w0 + (n - n0)*(w0 + 1) == w) ? static_cast (0) : __assert_fail ("n0*w0 + (n - n0)*(w0 + 1) == w", "/localhome/glisse2/include/boost/random/independent_bits.hpp", 158, __PRETTY_FUNCTION__)); result_type S = 0; for(std::size_t k = 0; k < n0; ++k) { base_unsigned u; do { u = detail::subtract()(_base(), (_base.min)()); } while(u > base_unsigned(y0 - 1)); S = (S << w0) + (u & y0_mask); } for(std::size_t k = 0; k < (n - n0); ++k) { base_unsigned u; do { u = detail::subtract()(_base(), (_base.min)()); } while(u > base_unsigned(y1 - 1)); S = (S << (w0 + 1)) + (u & y1_mask); } return S; } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } void discard(boost::uintmax_t z) { for(boost::uintmax_t i = 0; i < z; ++i) { (*this)(); } } const base_type& base() const { return _base; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const independent_bits_engine& r) { os << r._base; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, independent_bits_engine& r) { is >> r._base; return is; } friend bool operator==(const independent_bits_engine& x, const independent_bits_engine& y) { return x._base == y._base; } friend bool operator!=(const independent_bits_engine& lhs, const independent_bits_engine& rhs) { return !(lhs == rhs); } private: typedef typename base_type::result_type base_result; typedef typename make_unsigned::type base_unsigned; void calc_params( std::size_t n, base_unsigned range, std::size_t& w0, std::size_t& n0, base_unsigned& y0, base_unsigned& y1, base_unsigned& y0_mask, base_unsigned& y1_mask) { ((w >= n) ? static_cast (0) : __assert_fail ("w >= n", "/localhome/glisse2/include/boost/random/independent_bits.hpp", 238, __PRETTY_FUNCTION__)); w0 = w/n; n0 = n - w % n; y0_mask = (base_unsigned(2) << (w0 - 1)) - 1; y1_mask = (y0_mask << 1) | 1; y0 = (range + 1) & ~y0_mask; y1 = (range + 1) & ~y1_mask; ((y0 != 0 || base_unsigned(range + 1) == 0) ? static_cast (0) : __assert_fail ("y0 != 0 || base_unsigned(range + 1) == 0", "/localhome/glisse2/include/boost/random/independent_bits.hpp", 245, __PRETTY_FUNCTION__)); } Engine _base; }; template const bool independent_bits_engine::has_fixed_range; } } # 39 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 32 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" 2 namespace boost { namespace random { # 66 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" template class inversive_congruential_engine { public: typedef IntType result_type; static const bool has_fixed_range = false; static const result_type multiplier = a; static const result_type increment = b; static const result_type modulus = p; static const IntType default_seed = 1; static result_type min () { return b == 0 ? 1 : 0; } static result_type max () { return p-1; } inversive_congruential_engine() { seed(); } explicit inversive_congruential_engine(const IntType& x0) { seed(x0); } template explicit inversive_congruential_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } # 110 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" template inversive_congruential_engine(It& first, It last) { seed(first, last); } void seed() { seed(default_seed); } void seed(const IntType& x0) { if(modulus == 0) { _value = x0; } else { _value = x0 % modulus; } if(_value <= 0 && _value != 0) { _value += modulus; } if(increment == 0 && _value == 0) { _value = 1; } ((_value >= (min)()) ? static_cast (0) : __assert_fail ("_value >= (min)()", "/localhome/glisse2/include/boost/random/inversive_congruential.hpp", 140, __PRETTY_FUNCTION__)); ((_value <= (max)()) ? static_cast (0) : __assert_fail ("_value <= (max)()", "/localhome/glisse2/include/boost/random/inversive_congruential.hpp", 141, __PRETTY_FUNCTION__)); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { seed(detail::seed_one_int(seq)); } # 158 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" template void seed(It& first, It last) { seed(detail::get_one_int(first, last)); } IntType operator()() { typedef const_mod do_mod; _value = do_mod::mult_add(a, do_mod::invert(_value), b); return _value; } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } void discard(boost::uintmax_t z) { for(boost::uintmax_t j = 0; j < z; ++j) { (*this)(); } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const inversive_congruential_engine& x) { os << x._value; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, inversive_congruential_engine& x) { is >> x._value; return is; } friend bool operator==(const inversive_congruential_engine& x, const inversive_congruential_engine& y) { return x._value == y._value; } friend bool operator!=(const inversive_congruential_engine& lhs, const inversive_congruential_engine& rhs) { return !(lhs == rhs); } private: IntType _value; }; template const bool inversive_congruential_engine::has_fixed_range; template const typename inversive_congruential_engine::result_type inversive_congruential_engine::multiplier; template const typename inversive_congruential_engine::result_type inversive_congruential_engine::increment; template const typename inversive_congruential_engine::result_type inversive_congruential_engine::modulus; template const typename inversive_congruential_engine::result_type inversive_congruential_engine::default_seed; template class inversive_congruential : public inversive_congruential_engine { typedef inversive_congruential_engine base_type; public: inversive_congruential(IntType x0 = 1) : base_type(x0) {} template inversive_congruential(It& first, It last) : base_type(first, last) {} }; # 256 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" typedef inversive_congruential_engine hellekalek1995; } using random::hellekalek1995; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 266 "/localhome/glisse2/include/boost/random/inversive_congruential.hpp" 2 # 40 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 27 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/uniform_01.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/uniform_01.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/uniform_01.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/ptr_helper.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/detail/ptr_helper.hpp" namespace boost { namespace random { namespace detail { template struct ptr_helper { typedef T value_type; typedef T& reference_type; typedef const T& rvalue_type; static reference_type ref(T& r) { return r; } static const T& ref(const T& r) { return r; } }; template struct ptr_helper { typedef T value_type; typedef T& reference_type; typedef T& rvalue_type; static reference_type ref(T& r) { return r; } static const T& ref(const T& r) { return r; } }; template struct ptr_helper { typedef T value_type; typedef T& reference_type; typedef T* rvalue_type; static reference_type ref(T * p) { return *p; } static const T& ref(const T * p) { return *p; } }; } } } # 25 "/localhome/glisse2/include/boost/random/uniform_01.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 27 "/localhome/glisse2/include/boost/random/uniform_01.hpp" 2 namespace boost { namespace random { # 78 "/localhome/glisse2/include/boost/random/uniform_01.hpp" namespace detail { template class new_uniform_01 { public: typedef RealType input_type; typedef RealType result_type; result_type min () const { return result_type(0); } result_type max () const { return result_type(1); } void reset() { } template result_type operator()(Engine& eng) { for (;;) { typedef typename Engine::result_type base_result; result_type factor = result_type(1) / (result_type((eng.max)()-(eng.min)()) + result_type(std::numeric_limits::is_integer ? 1 : 0)); result_type result = result_type(eng() - (eng.min)()) * factor; if (result < result_type(1)) return result; } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const new_uniform_01&) { return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, new_uniform_01&) { return is; } }; template class backward_compatible_uniform_01 { typedef boost::random::detail::ptr_helper traits; public: typedef UniformRandomNumberGenerator base_type; typedef RealType result_type; static const bool has_fixed_range = false; static_assert(!std::numeric_limits::is_integer, "!std::numeric_limits::is_integer"); explicit backward_compatible_uniform_01(typename traits::rvalue_type rng) : _rng(rng), _factor(result_type(1) / (result_type((base().max)()-(base().min)()) + result_type(std::numeric_limits::is_integer ? 1 : 0))) { } result_type min () const { return result_type(0); } result_type max () const { return result_type(1); } typename traits::value_type& base() { return traits::ref(_rng); } const typename traits::value_type& base() const { return traits::ref(_rng); } void reset() { } result_type operator()() { for (;;) { result_type result = result_type(base()() - (base().min)()) * _factor; if (result < result_type(1)) return result; } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const backward_compatible_uniform_01& u) { os << u._rng; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, backward_compatible_uniform_01& u) { is >> u._rng; return is; } private: typedef typename traits::value_type::result_type base_result; UniformRandomNumberGenerator _rng; result_type _factor; }; template const bool backward_compatible_uniform_01::has_fixed_range; template struct select_uniform_01 { template struct apply { typedef backward_compatible_uniform_01 type; }; }; template<> struct select_uniform_01 { template struct apply { typedef new_uniform_01 type; }; }; template<> struct select_uniform_01 { template struct apply { typedef new_uniform_01 type; }; }; template<> struct select_uniform_01 { template struct apply { typedef new_uniform_01 type; }; }; } template class uniform_01 : public detail::select_uniform_01::template apply::type { typedef typename detail::select_uniform_01::template apply::type impl_type; typedef boost::random::detail::ptr_helper traits; public: uniform_01() {} explicit uniform_01(typename traits::rvalue_type rng) : impl_type(rng) { } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const uniform_01& u) { os << static_cast(u); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, uniform_01& u) { is >> static_cast(u); return is; } }; } using random::uniform_01; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 276 "/localhome/glisse2/include/boost/random/uniform_01.hpp" 2 # 30 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 31 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/generator_seed_seq.hpp" 1 # 18 "/localhome/glisse2/include/boost/random/detail/generator_seed_seq.hpp" namespace boost { namespace random { namespace detail { template class generator_seed_seq { public: generator_seed_seq(Generator& g) : gen(&g) {} template void generate(It first, It last) { for(; first != last; ++first) { *first = (*gen)(); } } private: Generator* gen; }; } } } # 34 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" 2 namespace boost { namespace random { template class lagged_fibonacci_engine { public: typedef UIntType result_type; static const bool has_fixed_range = false; static const int word_size = w; static const unsigned int long_lag = p; static const unsigned int short_lag = q; static const UIntType default_seed = 331u; static result_type min () { return 0; } static result_type max () { return low_bits_mask_t::sig_bits; } lagged_fibonacci_engine() { seed(); } explicit lagged_fibonacci_engine(const UIntType& value) { seed(value); } template explicit lagged_fibonacci_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } template lagged_fibonacci_engine(It& first, It last) { seed(first, last); } void seed() { seed(default_seed); } void seed(const UIntType& value) { minstd_rand0 intgen(static_cast(value)); detail::generator_seed_seq gen(intgen); seed(gen); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { detail::seed_array_int(seq, x); i = long_lag; } template void seed(It& first, It last) { detail::fill_array_int(first, last, x); i = long_lag; } result_type operator()() { if(i >= long_lag) fill(); return x[i++]; } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } void discard(boost::uintmax_t z) { for(boost::uintmax_t j = 0; j < z; ++j) { (*this)(); } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const lagged_fibonacci_engine& f) { os << f.i; for(unsigned int i = 0; i < f.long_lag; ++i) os << ' ' << f.x[i]; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, lagged_fibonacci_engine& f) { is >> f.i >> std::ws; for(unsigned int i = 0; i < f.long_lag; ++i) is >> f.x[i] >> std::ws; return is; } friend bool operator==(const lagged_fibonacci_engine& x, const lagged_fibonacci_engine& y) { return x.i == y.i && std::equal(x.x, x.x+long_lag, y.x); } friend bool operator!=(const lagged_fibonacci_engine& lhs, const lagged_fibonacci_engine& rhs) { return !(lhs == rhs); } private: void fill(); unsigned int i; UIntType x[long_lag]; }; template const bool lagged_fibonacci_engine::has_fixed_range; template const unsigned int lagged_fibonacci_engine::long_lag; template const unsigned int lagged_fibonacci_engine::short_lag; template const UIntType lagged_fibonacci_engine::default_seed; template void lagged_fibonacci_engine::fill() { { for(unsigned int j = 0; j < short_lag; ++j) x[j] = (x[j] + x[j+(long_lag-short_lag)]) & low_bits_mask_t::sig_bits; } for(unsigned int j = short_lag; j < long_lag; ++j) x[j] = (x[j] + x[j-short_lag]) & low_bits_mask_t::sig_bits; i = 0; } template class lagged_fibonacci : public lagged_fibonacci_engine { typedef lagged_fibonacci_engine base_type; public: lagged_fibonacci() {} explicit lagged_fibonacci(const UIntType& val) { this->seed(val); } template explicit lagged_fibonacci(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { this->seed(seq); } template lagged_fibonacci(It& first, It last) : base_type(first, last) {} }; # 258 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" template class lagged_fibonacci_01_engine { public: typedef RealType result_type; static const bool has_fixed_range = false; static const int word_size = w; static const unsigned int long_lag = p; static const unsigned int short_lag = q; static const boost::uint32_t default_seed = 331u; lagged_fibonacci_01_engine() { seed(); } explicit lagged_fibonacci_01_engine(const uint32_t& value) { seed(value); } template explicit lagged_fibonacci_01_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } template lagged_fibonacci_01_engine(It& first, It last) { seed(first, last); } void seed() { seed(default_seed); } # 293 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" void seed(const boost::uint32_t& value) { minstd_rand0 intgen(value); detail::generator_seed_seq gen(intgen); seed(gen); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { detail::seed_array_real(seq, x); i = long_lag; } template void seed(It& first, It last) { detail::fill_array_real(first, last, x); i = long_lag; } static result_type min () { return result_type(0); } static result_type max () { return result_type(1); } result_type operator()() { if(i >= long_lag) fill(); return x[i++]; } template void generate(Iter first, Iter last) { return detail::generate_from_real(*this, first, last); } void discard(boost::uintmax_t z) { for(boost::uintmax_t j = 0; j < z; ++j) { (*this)(); } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const lagged_fibonacci_01_engine& f) { using std::pow; os << f.i; std::ios_base::fmtflags oldflags = os.flags(os.dec | os.fixed | os.left); for(unsigned int i = 0; i < f.long_lag; ++i) os << ' ' << f.x[i] * f.modulus(); os.flags(oldflags); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, lagged_fibonacci_01_engine& f) { is >> f.i; for(unsigned int i = 0; i < f.long_lag; ++i) { typename lagged_fibonacci_01_engine::result_type value; is >> std::ws >> value; f.x[i] = value / f.modulus(); } return is; } friend bool operator==(const lagged_fibonacci_01_engine& x, const lagged_fibonacci_01_engine& y) { return x.i == y.i && std::equal(x.x, x.x+long_lag, y.x); } friend bool operator!=(const lagged_fibonacci_01_engine& lhs, const lagged_fibonacci_01_engine& rhs) { return !(lhs == rhs); } private: void fill(); static RealType modulus() { using std::pow; return pow(RealType(2), word_size); } unsigned int i; RealType x[long_lag]; }; template const bool lagged_fibonacci_01_engine::has_fixed_range; template const unsigned int lagged_fibonacci_01_engine::long_lag; template const unsigned int lagged_fibonacci_01_engine::short_lag; template const int lagged_fibonacci_01_engine::word_size; template const boost::uint32_t lagged_fibonacci_01_engine::default_seed; template void lagged_fibonacci_01_engine::fill() { { for(unsigned int j = 0; j < short_lag; ++j) { RealType t = x[j] + x[j+(long_lag-short_lag)]; if(t >= RealType(1)) t -= RealType(1); x[j] = t; } } for(unsigned int j = short_lag; j < long_lag; ++j) { RealType t = x[j] + x[j-short_lag]; if(t >= RealType(1)) t -= RealType(1); x[j] = t; } i = 0; } template class lagged_fibonacci_01 : public lagged_fibonacci_01_engine { typedef lagged_fibonacci_01_engine base_type; public: lagged_fibonacci_01() {} explicit lagged_fibonacci_01(const boost::uint32_t& val) { this->seed(val); } template explicit lagged_fibonacci_01(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { this->seed(seq); } template lagged_fibonacci_01(It& first, It last) : base_type(first, last) {} }; namespace detail { template struct generator_bits; template struct generator_bits > { static std::size_t value() { return w; } }; template struct generator_bits > { static std::size_t value() { return w; } }; } # 504 "/localhome/glisse2/include/boost/random/lagged_fibonacci.hpp" typedef lagged_fibonacci_01_engine lagged_fibonacci607; typedef lagged_fibonacci_01_engine lagged_fibonacci1279; typedef lagged_fibonacci_01_engine lagged_fibonacci2281; typedef lagged_fibonacci_01_engine lagged_fibonacci3217; typedef lagged_fibonacci_01_engine lagged_fibonacci4423; typedef lagged_fibonacci_01_engine lagged_fibonacci9689; typedef lagged_fibonacci_01_engine lagged_fibonacci19937; typedef lagged_fibonacci_01_engine lagged_fibonacci23209; typedef lagged_fibonacci_01_engine lagged_fibonacci44497; } using random::lagged_fibonacci607; using random::lagged_fibonacci1279; using random::lagged_fibonacci2281; using random::lagged_fibonacci3217; using random::lagged_fibonacci4423; using random::lagged_fibonacci9689; using random::lagged_fibonacci19937; using random::lagged_fibonacci23209; using random::lagged_fibonacci44497; } # 41 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/linear_feedback_shift.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/linear_feedback_shift.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 22 "/localhome/glisse2/include/boost/random/linear_feedback_shift.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/linear_feedback_shift.hpp" 2 namespace boost { namespace random { # 42 "/localhome/glisse2/include/boost/random/linear_feedback_shift.hpp" template class linear_feedback_shift_engine { public: typedef UIntType result_type; static const bool has_fixed_range = false; static const int word_size = w; static const int exponent1 = k; static const int exponent2 = q; static const int step_size = s; static const UIntType default_seed = 341; static result_type min () { return 0; } static result_type max () { return wordmask(); } static_assert(w > 0, "w > 0"); static_assert(q > 0, "q > 0"); static_assert(k < w, "k < w"); static_assert(0 < 2*q && 2*q < k, "0 < 2*q && 2*q < k"); static_assert(0 < s && s <= k-q, "0 < s && s <= k-q"); linear_feedback_shift_engine() { seed(); } explicit linear_feedback_shift_engine(const UIntType& s0) { seed(s0); } template explicit linear_feedback_shift_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } template linear_feedback_shift_engine(It& first, It last) { seed(first, last); } void seed() { seed(default_seed); } void seed(const UIntType& s0) { value = s0 & wordmask(); if(value < (1 << (w-k))) { value += 1 << (w-k); } } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { seed(detail::seed_one_int(seq)); } template void seed(It& first, It last) { seed(detail::get_one_int(first, last)); } result_type operator()() { const UIntType b = (((value << q) ^ value) & wordmask()) >> (k-s); const UIntType mask = (wordmask() << (w-k)) & wordmask(); value = ((value & mask) << s) ^ b; return value; } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } void discard(boost::uintmax_t z) { for(boost::uintmax_t j = 0; j < z; ++j) { (*this)(); } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const linear_feedback_shift_engine& x) { os << x.value; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, linear_feedback_shift_engine& x) { is >> x.value; return is; } friend bool operator==(const linear_feedback_shift_engine& x, const linear_feedback_shift_engine& y) { return x.value == y.value; } friend bool operator!=(const linear_feedback_shift_engine& lhs, const linear_feedback_shift_engine& rhs) { return !(lhs == rhs); } private: static UIntType wordmask() { return boost::low_bits_mask_t::sig_bits; } UIntType value; }; template const bool linear_feedback_shift_engine::has_fixed_range; template const int linear_feedback_shift_engine::word_size; template const int linear_feedback_shift_engine::exponent1; template const int linear_feedback_shift_engine::exponent2; template const int linear_feedback_shift_engine::step_size; template const UIntType linear_feedback_shift_engine::default_seed; template class linear_feedback_shift : public linear_feedback_shift_engine { typedef linear_feedback_shift_engine base_type; public: linear_feedback_shift() {} template explicit linear_feedback_shift(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } explicit linear_feedback_shift(const UIntType& val) { seed(val); } template linear_feedback_shift(It& first, It last) : base_type(first, last) {} }; } } # 43 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 27 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" 2 namespace boost { namespace random { # 63 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" template class mersenne_twister_engine { public: typedef UIntType result_type; static const std::size_t word_size = w; static const std::size_t state_size = n; static const std::size_t shift_size = m; static const std::size_t mask_bits = r; static const UIntType xor_mask = a; static const std::size_t tempering_u = u; static const UIntType tempering_d = d; static const std::size_t tempering_s = s; static const UIntType tempering_b = b; static const std::size_t tempering_t = t; static const UIntType tempering_c = c; static const std::size_t tempering_l = l; static const UIntType initialization_multiplier = f; static const UIntType default_seed = 5489u; static const UIntType parameter_a = a; static const std::size_t output_u = u; static const std::size_t output_s = s; static const UIntType output_b = b; static const std::size_t output_t = t; static const UIntType output_c = c; static const std::size_t output_l = l; static const bool has_fixed_range = false; mersenne_twister_engine() { seed(); } explicit mersenne_twister_engine(const UIntType& value) { seed(value); } template mersenne_twister_engine(It& first, It last) { seed(first,last); } # 122 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" template explicit mersenne_twister_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } void seed() { seed(default_seed); } void seed(const UIntType& value) { const UIntType mask = (max)(); x[0] = value & mask; for (i = 1; i < n; i++) { x[i] = (f * (x[i-1] ^ (x[i-1] >> (w-2))) + i) & mask; } } template void seed(SeeqSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { detail::seed_array_int(seq, x); i = n; if((x[0] & (~static_cast(0) << r)) == 0) { for(std::size_t j = 1; j < n; ++j) { if(x[j] != 0) return; } x[0] = static_cast(1) << (w-1); } } template void seed(It& first, It last) { detail::fill_array_int(first, last, x); i = n; if((x[0] & (~static_cast(0) << r)) == 0) { for(std::size_t j = 1; j < n; ++j) { if(x[j] != 0) return; } x[0] = static_cast(1) << (w-1); } } static result_type min () { return 0; } static result_type max () { return boost::low_bits_mask_t::sig_bits; } result_type operator()(); template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } # 209 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" void discard(boost::uintmax_t z) { for(boost::uintmax_t j = 0; j < z; ++j) { (*this)(); } } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const mersenne_twister_engine& mt) { mt.print(os); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, mersenne_twister_engine& mt) { for(std::size_t j = 0; j < mt.state_size; ++j) is >> mt.x[j] >> std::ws; mt.i = mt.state_size; return is; } friend bool operator==(const mersenne_twister_engine& x, const mersenne_twister_engine& y) { if(x.i < y.i) return x.equal_imp(y); else return y.equal_imp(x); } friend bool operator!=(const mersenne_twister_engine& x, const mersenne_twister_engine& y) { return !(x == y); } private: void twist(); # 274 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" bool equal_imp(const mersenne_twister_engine& other) const { UIntType back[n]; std::size_t offset = other.i - i; for(std::size_t j = 0; j + offset < n; ++j) if(x[j] != other.x[j+offset]) return false; rewind(&back[n-1], offset); for(std::size_t j = 0; j < offset; ++j) if(back[j + n - offset] != other.x[j]) return false; return true; } template void print(std::basic_ostream& os) const { UIntType data[n]; for(std::size_t j = 0; j < i; ++j) { data[j + n - i] = x[j]; } if(i != n) { rewind(&data[n - i - 1], n - i); } os << data[0]; for(std::size_t j = 1; j < n; ++j) { os << ' ' << data[j]; } } void rewind(UIntType* last, std::size_t z) const { const UIntType upper_mask = (~static_cast(0)) << r; const UIntType lower_mask = ~upper_mask; UIntType y0 = x[m-1] ^ x[n-1]; if(y0 & (static_cast(1) << (w-1))) { y0 = ((y0 ^ a) << 1) | 1; } else { y0 = y0 << 1; } for(std::size_t sz = 0; sz < z; ++sz) { UIntType y1 = rewind_find(last, sz, m-1) ^ rewind_find(last, sz, n-1); if(y1 & (static_cast(1) << (w-1))) { y1 = ((y1 ^ a) << 1) | 1; } else { y1 = y1 << 1; } *(last - sz) = (y0 & upper_mask) | (y1 & lower_mask); y0 = y1; } } UIntType rewind_find(UIntType* last, std::size_t size, std::size_t j) const { std::size_t index = (j + n - size + n - 1) % n; if(index < n - size) { return x[index]; } else { return *(last - (n - 1 - index)); } } UIntType x[n]; std::size_t i; }; # 370 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" template const std::size_t mersenne_twister_engine::word_size; template const std::size_t mersenne_twister_engine::state_size; template const std::size_t mersenne_twister_engine::shift_size; template const std::size_t mersenne_twister_engine::mask_bits; template const UIntType mersenne_twister_engine::xor_mask; template const std::size_t mersenne_twister_engine::tempering_u; template const UIntType mersenne_twister_engine::tempering_d; template const std::size_t mersenne_twister_engine::tempering_s; template const UIntType mersenne_twister_engine::tempering_b; template const std::size_t mersenne_twister_engine::tempering_t; template const UIntType mersenne_twister_engine::tempering_c; template const std::size_t mersenne_twister_engine::tempering_l; template const UIntType mersenne_twister_engine::initialization_multiplier; template const UIntType mersenne_twister_engine::default_seed; template const UIntType mersenne_twister_engine::parameter_a; template const std::size_t mersenne_twister_engine::output_u; template const std::size_t mersenne_twister_engine::output_s; template const UIntType mersenne_twister_engine::output_b; template const std::size_t mersenne_twister_engine::output_t; template const UIntType mersenne_twister_engine::output_c; template const std::size_t mersenne_twister_engine::output_l; template const bool mersenne_twister_engine::has_fixed_range; template void mersenne_twister_engine::twist() { const UIntType upper_mask = (~static_cast(0)) << r; const UIntType lower_mask = ~upper_mask; const std::size_t unroll_factor = 6; const std::size_t unroll_extra1 = (n-m) % unroll_factor; const std::size_t unroll_extra2 = (m-1) % unroll_factor; { for(std::size_t j = 0; j < n-m-unroll_extra1; j++) { UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); x[j] = x[j+m] ^ (y >> 1) ^ ((x[j+1]&1) * a); } } { for(std::size_t j = n-m-unroll_extra1; j < n-m; j++) { UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); x[j] = x[j+m] ^ (y >> 1) ^ ((x[j+1]&1) * a); } } { for(std::size_t j = n-m; j < n-1-unroll_extra2; j++) { UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); x[j] = x[j-(n-m)] ^ (y >> 1) ^ ((x[j+1]&1) * a); } } { for(std::size_t j = n-1-unroll_extra2; j < n-1; j++) { UIntType y = (x[j] & upper_mask) | (x[j+1] & lower_mask); x[j] = x[j-(n-m)] ^ (y >> 1) ^ ((x[j+1]&1) * a); } } UIntType y = (x[n-1] & upper_mask) | (x[0] & lower_mask); x[n-1] = x[m-1] ^ (y >> 1) ^ ((x[0]&1) * a); i = 0; } template inline typename mersenne_twister_engine::result_type mersenne_twister_engine::operator()() { if(i == n) twist(); UIntType z = x[i]; ++i; z ^= ((z >> u) & d); z ^= ((z << s) & b); z ^= ((z << t) & c); z ^= (z >> l); return z; } # 474 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" typedef mersenne_twister_engine mt11213b; # 488 "/localhome/glisse2/include/boost/random/mersenne_twister.hpp" typedef mersenne_twister_engine mt19937; typedef mersenne_twister_engine mt19937_64; template class mersenne_twister : public mersenne_twister_engine { typedef mersenne_twister_engine base_type; public: mersenne_twister() {} template explicit mersenne_twister(Gen& gen, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(gen); } explicit mersenne_twister(const UIntType& val) { seed(val); } template mersenne_twister(It& first, It last) : base_type(first, last) {} void seed() { base_type::seed(); } template void seed(Gen& gen, typename ::boost::random::detail::disable_seed::type* = 0) { detail::generator_seed_seq seq(gen); base_type::seed(seq); } void seed(const UIntType& val) { base_type::seed(val); } template void seed(It& first, It last) { base_type::seed(first, last); } }; } using random::mt11213b; using random::mt19937; using random::mt19937_64; } # 44 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/ranlux.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/ranlux.hpp" # 1 "/localhome/glisse2/include/boost/random/subtract_with_carry.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/subtract_with_carry.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/subtract_with_carry.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 31 "/localhome/glisse2/include/boost/random/subtract_with_carry.hpp" 2 namespace boost { namespace random { namespace detail { struct subtract_with_carry_discard { template static void apply(Engine& eng, boost::uintmax_t z) { typedef typename Engine::result_type IntType; const std::size_t short_lag = Engine::short_lag; const std::size_t long_lag = Engine::long_lag; std::size_t k = eng.k; IntType carry = eng.carry; if(k != 0) { if(k < short_lag) { std::size_t limit = (short_lag - k) < z? short_lag : (k + static_cast(z)); for(std::size_t j = k; j < limit; ++j) { carry = eng.do_update(j, j + long_lag - short_lag, carry); } } std::size_t limit = (long_lag - k) < z? long_lag : (k + static_cast(z)); std::size_t start = (k < short_lag ? short_lag : k); for(std::size_t j = start; j < limit; ++j) { carry = eng.do_update(j, j - short_lag, carry); } } k = ((z % long_lag) + k) % long_lag; if(k < z) { for(std::size_t i = 0; i < (z - k) / long_lag; ++i) { for(std::size_t j = 0; j < short_lag; ++j) { carry = eng.do_update(j, j + long_lag - short_lag, carry); } for(std::size_t j = short_lag; j < long_lag; ++j) { carry = eng.do_update(j, j - short_lag, carry); } } std::size_t limit = short_lag < k? short_lag : k; for(std::size_t j = 0; j < limit; ++j) { carry = eng.do_update(j, j + long_lag - short_lag, carry); } for(std::size_t j = short_lag; j < k; ++j) { carry = eng.do_update(j, j - short_lag, carry); } } eng.carry = carry; eng.k = k; } }; } # 110 "/localhome/glisse2/include/boost/random/subtract_with_carry.hpp" template class subtract_with_carry_engine { public: typedef IntType result_type; static const std::size_t word_size = w; static const std::size_t long_lag = r; static const std::size_t short_lag = s; static const uint32_t default_seed = 19780503u; static const bool has_fixed_range = false; static const result_type modulus = (result_type(1) << w); static_assert(std::numeric_limits::is_integer, "std::numeric_limits::is_integer"); subtract_with_carry_engine() { seed(); } explicit subtract_with_carry_engine(const IntType& value) { seed(value); } template explicit subtract_with_carry_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } template subtract_with_carry_engine(It& first, It last) { seed(first,last); } void seed() { seed(default_seed); } void seed(const IntType& value) { typedef linear_congruential_engine gen_t; gen_t intgen(static_cast(value)); detail::generator_seed_seq gen(intgen); seed(gen); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { detail::seed_array_int(seq, x); carry = (x[long_lag-1] == 0); k = 0; } template void seed(It& first, It last) { detail::fill_array_int(first, last, x); carry = (x[long_lag-1] == 0); k = 0; } static result_type min () { return 0; } static result_type max () { return boost::low_bits_mask_t::sig_bits; } result_type operator()() { std::size_t short_index = (k < short_lag)? (k + long_lag - short_lag) : (k - short_lag); carry = do_update(k, short_index, carry); IntType result = x[k]; ++k; if(k >= long_lag) k = 0; return result; } void discard(boost::uintmax_t z) { detail::subtract_with_carry_discard::apply(*this, z); } template void generate(It first, It last) { detail::generate_from_int(*this, first, last); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const subtract_with_carry_engine& f) { for(unsigned int j = 0; j < f.long_lag; ++j) os << f.compute(j) << ' '; os << f.carry; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, subtract_with_carry_engine& f) { for(unsigned int j = 0; j < f.long_lag; ++j) is >> f.x[j] >> std::ws; is >> f.carry; f.k = 0; return is; } friend bool operator==(const subtract_with_carry_engine& x, const subtract_with_carry_engine& y) { for(unsigned int j = 0; j < r; ++j) if(x.compute(j) != y.compute(j)) return false; return true; } friend bool operator!=(const subtract_with_carry_engine& lhs, const subtract_with_carry_engine& rhs) { return !(lhs == rhs); } private: IntType compute(unsigned int index) const { return x[(k+index) % long_lag]; } friend struct detail::subtract_with_carry_discard; IntType do_update(std::size_t current, std::size_t short_index, IntType carry) { IntType delta; IntType temp = x[current] + carry; if (x[short_index] >= temp) { delta = x[short_index] - temp; carry = 0; } else { delta = modulus - temp + x[short_index]; carry = 1; } x[current] = delta; return carry; } # 303 "/localhome/glisse2/include/boost/random/subtract_with_carry.hpp" IntType x[long_lag]; std::size_t k; IntType carry; }; template const bool subtract_with_carry_engine::has_fixed_range; template const IntType subtract_with_carry_engine::modulus; template const std::size_t subtract_with_carry_engine::word_size; template const std::size_t subtract_with_carry_engine::long_lag; template const std::size_t subtract_with_carry_engine::short_lag; template const uint32_t subtract_with_carry_engine::default_seed; # 337 "/localhome/glisse2/include/boost/random/subtract_with_carry.hpp" template class subtract_with_carry_01_engine { public: typedef RealType result_type; static const bool has_fixed_range = false; static const std::size_t word_size = w; static const std::size_t long_lag = r; static const std::size_t short_lag = s; static const boost::uint32_t default_seed = 19780503u; static_assert(!std::numeric_limits::is_integer, "!std::numeric_limits::is_integer"); subtract_with_carry_01_engine() { init_modulus(); seed(); } explicit subtract_with_carry_01_engine(const boost::uint32_t& value) { init_modulus(); seed(value); } template explicit subtract_with_carry_01_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { init_modulus(); seed(seq); } template subtract_with_carry_01_engine(It& first, It last) { init_modulus(); seed(first,last); } private: void init_modulus() { using std::pow; _modulus = pow(RealType(2), RealType(word_size)); } public: void seed() { seed(default_seed); } void seed(const boost::uint32_t& value) { typedef linear_congruential_engine gen_t; gen_t intgen(value); detail::generator_seed_seq gen(intgen); seed(gen); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { detail::seed_array_real(seq, x); carry = (x[long_lag-1] ? 0 : 1 / _modulus); k = 0; } template void seed(It& first, It last) { detail::fill_array_real(first, last, x); carry = (x[long_lag-1] ? 0 : 1 / _modulus); k = 0; } static result_type min () { return result_type(0); } static result_type max () { return result_type(1); } result_type operator()() { std::size_t short_index = (k < short_lag) ? (k + long_lag - short_lag) : (k - short_lag); carry = do_update(k, short_index, carry); RealType result = x[k]; ++k; if(k >= long_lag) k = 0; return result; } void discard(boost::uintmax_t z) { detail::subtract_with_carry_discard::apply(*this, z); } template void generate(Iter first, Iter last) { detail::generate_from_real(*this, first, last); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const subtract_with_carry_01_engine& f) { std::ios_base::fmtflags oldflags = os.flags(os.dec | os.fixed | os.left); for(unsigned int j = 0; j < f.long_lag; ++j) os << (f.compute(j) * f._modulus) << ' '; os << (f.carry * f._modulus); os.flags(oldflags); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, subtract_with_carry_01_engine& f) { RealType value; for(unsigned int j = 0; j < long_lag; ++j) { is >> value >> std::ws; f.x[j] = value / f._modulus; } is >> value; f.carry = value / f._modulus; f.k = 0; return is; } friend bool operator==(const subtract_with_carry_01_engine& x, const subtract_with_carry_01_engine& y) { for(unsigned int j = 0; j < r; ++j) if(x.compute(j) != y.compute(j)) return false; return true; } friend bool operator!=(const subtract_with_carry_01_engine& lhs, const subtract_with_carry_01_engine& rhs) { return !(lhs == rhs); } private: RealType compute(unsigned int index) const { return x[(k+index) % long_lag]; } friend struct detail::subtract_with_carry_discard; RealType do_update(std::size_t current, std::size_t short_index, RealType carry) { RealType delta = x[short_index] - x[current] - carry; if(delta < 0) { delta += RealType(1); carry = RealType(1)/_modulus; } else { carry = 0; } x[current] = delta; return carry; } std::size_t k; RealType carry; RealType x[long_lag]; RealType _modulus; }; template const bool subtract_with_carry_01_engine::has_fixed_range; template const std::size_t subtract_with_carry_01_engine::word_size; template const std::size_t subtract_with_carry_01_engine::long_lag; template const std::size_t subtract_with_carry_01_engine::short_lag; template const uint32_t subtract_with_carry_01_engine::default_seed; template class subtract_with_carry : public subtract_with_carry_engine::value, s, r> { typedef subtract_with_carry_engine::value, s, r> base_type; public: subtract_with_carry() {} template explicit subtract_with_carry(Gen& gen, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(gen); } explicit subtract_with_carry(const IntType& val) { seed(val); } template subtract_with_carry(It& first, It last) : base_type(first, last) {} void seed() { base_type::seed(); } template void seed(Gen& gen, typename ::boost::random::detail::disable_seed::type* = 0) { detail::generator_seed_seq seq(gen); base_type::seed(seq); } void seed(const IntType& val) { base_type::seed(val); } template void seed(It& first, It last) { base_type::seed(first, last); } }; template class subtract_with_carry_01 : public subtract_with_carry_01_engine { typedef subtract_with_carry_01_engine base_type; public: subtract_with_carry_01() {} template explicit subtract_with_carry_01(Gen& gen, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(gen); } explicit subtract_with_carry_01(const uint32_t& val) { seed(val); } template subtract_with_carry_01(It& first, It last) : base_type(first, last) {} void seed() { base_type::seed(); } template void seed(Gen& gen, typename ::boost::random::detail::disable_seed::type* = 0) { detail::generator_seed_seq seq(gen); base_type::seed(seq); } void seed(const uint32_t& val) { base_type::seed(val); } template void seed(It& first, It last) { base_type::seed(first, last); } }; namespace detail { template struct generator_bits; template struct generator_bits > { static std::size_t value() { return w; } }; template struct generator_bits > { static std::size_t value() { return w; } }; } } } # 21 "/localhome/glisse2/include/boost/random/ranlux.hpp" 2 namespace boost { namespace random { namespace detail { # 45 "/localhome/glisse2/include/boost/random/ranlux.hpp" class ranlux_documentation {}; } typedef subtract_with_carry_engine ranlux_base; typedef subtract_with_carry_01_engine ranlux_base_01; typedef subtract_with_carry_01_engine ranlux64_base_01; typedef discard_block_engine ranlux3; typedef discard_block_engine ranlux4; typedef discard_block_engine ranlux3_01; typedef discard_block_engine ranlux4_01; typedef discard_block_engine ranlux64_3_01; typedef discard_block_engine ranlux64_4_01; typedef subtract_with_carry_engine ranlux64_base; typedef discard_block_engine ranlux64_3; typedef discard_block_engine ranlux64_4; typedef subtract_with_carry_engine ranlux24_base; typedef subtract_with_carry_engine ranlux48_base; typedef discard_block_engine ranlux24; typedef discard_block_engine ranlux48; } using random::ranlux3; using random::ranlux4; using random::ranlux3_01; using random::ranlux4_01; using random::ranlux64_3_01; using random::ranlux64_4_01; using random::ranlux64_3; using random::ranlux64_4; } # 45 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 1 3 # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 3 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 2 3 # 21 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 31 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" 2 namespace boost { namespace random { # 58 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" template class shuffle_order_engine { public: typedef UniformRandomNumberGenerator base_type; typedef typename base_type::result_type result_type; static const bool has_fixed_range = false; static const std::size_t buffer_size = k; static const std::size_t table_size = k; static_assert(std::numeric_limits::is_integer, "std::numeric_limits::is_integer"); static_assert(k > 0, "k > 0"); shuffle_order_engine() : _rng() { init(); } explicit shuffle_order_engine(const result_type& s) { _rng.seed(s); init(); } template explicit shuffle_order_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { _rng.seed(seq); init(); } # 99 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" explicit shuffle_order_engine(const base_type & rng) : _rng(rng) { init(); } explicit shuffle_order_engine(base_type&& rng) : _rng(rng) { init(); } template shuffle_order_engine(It& first, It last) : _rng(first, last) { init(); } void seed() { _rng.seed(); init(); } void seed(const result_type& seed_arg) { _rng.seed(seed_arg); init(); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { _rng.seed(seq); init(); } template void seed(It& first, It last) { _rng.seed(first, last); init(); } const base_type& base() const { return _rng; } result_type operator()() { typedef typename make_unsigned::type base_unsigned; const base_unsigned brange = detail::subtract()((max)(), (min)()); const base_unsigned off = detail::subtract()(y, (min)()); base_unsigned j; if(k == 1) { j = 0; } else if(brange < (std::numeric_limits::max)() / k) { j = k * off / (brange + 1); } else if(brange < (std::numeric_limits::max)() / k) { j = static_cast( static_cast(off) * k / (static_cast(brange) + 1)); } else { boost::uintmax_t divisor = static_cast(brange) + 1; j = static_cast(detail::muldiv(off, k, divisor)); } y = v[j]; v[j] = _rng(); return y; } void discard(boost::uintmax_t z) { for(boost::uintmax_t j = 0; j < z; ++j) { (*this)(); } } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } static result_type min () { return (base_type::min)(); } static result_type max () { return (base_type::max)(); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const shuffle_order_engine& s) { os << s._rng; for(std::size_t i = 0; i < k; ++i) os << ' ' << s.v[i]; os << ' ' << s.y; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, shuffle_order_engine& s) { is >> s._rng; for(std::size_t i = 0; i < k; ++i) is >> std::ws >> s.v[i]; is >> std::ws >> s.y; return is; } friend bool operator==(const shuffle_order_engine& x, const shuffle_order_engine& y) { return x._rng == y._rng && x.y == y.y && std::equal(x.v, x.v+k, y.v); } friend bool operator!=(const shuffle_order_engine& lhs, const shuffle_order_engine& rhs) { return !(lhs == rhs); } private: void init() { for(result_type * p = v; p != v+k; ++p) *p = _rng(); y = _rng(); } base_type _rng; result_type v[k]; result_type y; }; template const bool shuffle_order_engine::has_fixed_range; template const std::size_t shuffle_order_engine::table_size; template const std::size_t shuffle_order_engine::buffer_size; # 246 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" typedef shuffle_order_engine< linear_congruential_engine, 97> kreutzer1986; # 259 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" typedef shuffle_order_engine knuth_b; } using random::kreutzer1986; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 268 "/localhome/glisse2/include/boost/random/shuffle_order.hpp" 2 # 46 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/shuffle_output.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/shuffle_output.hpp" namespace boost { namespace random { template class shuffle_output : public shuffle_order_engine { typedef shuffle_order_engine base_t; typedef typename base_t::result_type result_type; public: shuffle_output() {} template shuffle_output(T& arg) : base_t(arg) {} template shuffle_output(const T& arg) : base_t(arg) {} template shuffle_output(It& first, It last) : base_t(first, last) {} result_type min () { return (this->base().min)(); } result_type max () { return (this->base().max)(); } }; } } # 47 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/taus88.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/taus88.hpp" # 1 "/localhome/glisse2/include/boost/random/xor_combine.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/xor_combine.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 1 3 # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 3 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 2 3 # 20 "/localhome/glisse2/include/boost/random/xor_combine.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/xor_combine.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/xor_combine.hpp" 2 namespace boost { namespace random { template class xor_combine_engine { public: typedef URNG1 base1_type; typedef URNG2 base2_type; typedef typename base1_type::result_type result_type; static const bool has_fixed_range = false; static const int shift1 = s1; static const int shift2 = s2; xor_combine_engine() : _rng1(), _rng2() { } xor_combine_engine(const base1_type & rng1, const base2_type & rng2) : _rng1(rng1), _rng2(rng2) { } # 67 "/localhome/glisse2/include/boost/random/xor_combine.hpp" explicit xor_combine_engine(const result_type& v) { seed(v); } template explicit xor_combine_engine(SeedSeq& seq, typename ::boost::random::detail::disable_constructor::type* = 0) { seed(seq); } # 86 "/localhome/glisse2/include/boost/random/xor_combine.hpp" template xor_combine_engine(It& first, It last) : _rng1(first, last), _rng2( first, last) { } void seed() { _rng1.seed(); _rng2.seed(); } void seed(const result_type& v) { _rng1.seed(v); _rng2.seed(v); } template void seed(SeedSeq& seq, typename ::boost::random::detail::disable_seed::type* = 0) { _rng1.seed(seq); _rng2.seed(seq); } template void seed(It& first, It last) { _rng1.seed(first, last); _rng2.seed(first, last); } const base1_type& base1() const { return _rng1; } const base2_type& base2() const { return _rng2; } result_type operator()() { return (_rng1() << s1) ^ (_rng2() << s2); } template void generate(Iter first, Iter last) { detail::generate_from_int(*this, first, last); } void discard(boost::uintmax_t z) { _rng1.discard(z); _rng2.discard(z); } static result_type min () { return (std::min)((URNG1::min)(), (URNG2::min)()); } static result_type max () { return (std::max)((URNG1::min)(), (URNG2::max)()); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const xor_combine_engine& s) { os << s._rng1 << ' ' << s._rng2; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, xor_combine_engine& s) { is >> s._rng1 >> std::ws >> s._rng2; return is; } friend bool operator==(const xor_combine_engine& x, const xor_combine_engine& y) { return x._rng1 == y._rng1 && x._rng2 == y._rng2; } friend bool operator!=(const xor_combine_engine& lhs, const xor_combine_engine& rhs) { return !(lhs == rhs); } private: base1_type _rng1; base2_type _rng2; }; template const bool xor_combine_engine::has_fixed_range; template const int xor_combine_engine::shift1; template const int xor_combine_engine::shift2; template class xor_combine : public xor_combine_engine { typedef xor_combine_engine base_type; public: typedef typename base_type::result_type result_type; xor_combine() {} xor_combine(result_type val) : base_type(val) {} template xor_combine(It& first, It last) : base_type(first, last) {} xor_combine(const URNG1 & rng1, const URNG2 & rng2) : base_type(rng1, rng2) { } result_type min () const { return (std::min)((this->base1().min)(), (this->base2().min)()); } result_type max () const { return (std::max)((this->base1().min)(), (this->base2().max)()); } }; } } # 20 "/localhome/glisse2/include/boost/random/taus88.hpp" 2 namespace boost { namespace random { # 33 "/localhome/glisse2/include/boost/random/taus88.hpp" typedef xor_combine_engine< xor_combine_engine< linear_feedback_shift_engine, 0, linear_feedback_shift_engine, 0>, 0, linear_feedback_shift_engine, 0> taus88; } using random::taus88; } # 49 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/generate_canonical.hpp" 1 # 18 "/localhome/glisse2/include/boost/random/generate_canonical.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 19 "/localhome/glisse2/include/boost/random/generate_canonical.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/special_functions.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/acosh.hpp" 1 # 20 "/localhome/glisse2/include/boost/math/special_functions/acosh.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/precision.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/tools/precision.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 15 "/localhome/glisse2/include/boost/math/tools/precision.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 1 # 9 "/localhome/glisse2/include/boost/math/policies/policy.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/list.hpp" # 1 "/localhome/glisse2/include/boost/mpl/limits/list.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/list.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/list.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/list20.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/list/list20.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/list10.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/list/list10.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" # 1 "/localhome/glisse2/include/boost/mpl/long.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/long.hpp" # 1 "/localhome/glisse2/include/boost/mpl/long_fwd.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/long_fwd.hpp" namespace mpl_ { template< long N > struct long_; } namespace boost { namespace mpl { using ::mpl_::long_; } } # 18 "/localhome/glisse2/include/boost/mpl/long.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" 1 # 40 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" namespace mpl_ { template< long N > struct long_ { static const long value = N; typedef long_ type; typedef long value_type; typedef integral_c_tag tag; # 72 "/localhome/glisse2/include/boost/mpl/aux_/integral_wrapper.hpp" typedef mpl_::long_< static_cast((value + 1)) > next; typedef mpl_::long_< static_cast((value - 1)) > prior; operator long() const { return static_cast(this->value); } }; template< long N > long const mpl_::long_< N >::value; } # 21 "/localhome/glisse2/include/boost/mpl/long.hpp" 2 # 18 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/push_front.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/push_front.hpp" # 1 "/localhome/glisse2/include/boost/mpl/push_front_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/push_front_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct push_front_impl; template< typename Sequence, typename T > struct push_front; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/push_front.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/item.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/item.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/tag.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/tag.hpp" namespace boost { namespace mpl { namespace aux { struct list_tag; struct l_iter_tag; }}} # 19 "/localhome/glisse2/include/boost/mpl/list/aux_/item.hpp" 2 namespace boost { namespace mpl { template< typename Size , typename T , typename Next > struct l_item { typedef aux::list_tag tag; typedef l_item type; typedef Size size; typedef T item; typedef Next next; }; struct l_end { typedef aux::list_tag tag; typedef l_end type; typedef long_<0> size; }; }} # 20 "/localhome/glisse2/include/boost/mpl/list/aux_/push_front.hpp" 2 namespace boost { namespace mpl { template<> struct push_front_impl< aux::list_tag > { template< typename List, typename T > struct apply { typedef l_item< typename next::type , T , typename List::type > type; }; }; }} # 20 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/pop_front.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/pop_front.hpp" # 1 "/localhome/glisse2/include/boost/mpl/pop_front_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/pop_front_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct pop_front_impl; template< typename Sequence > struct pop_front; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/pop_front.hpp" 2 namespace boost { namespace mpl { template<> struct pop_front_impl< aux::list_tag > { template< typename List > struct apply { typedef typename mpl::next::type type; }; }; }} # 21 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/push_back.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/push_back.hpp" # 1 "/localhome/glisse2/include/boost/mpl/push_back_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/push_back_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct push_back_impl; template< typename Sequence, typename T > struct push_back; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/push_back.hpp" 2 namespace boost { namespace mpl { template< typename Tag > struct has_push_back_impl; template<> struct has_push_back_impl< aux::list_tag > { template< typename Seq > struct apply : false_ { }; }; }} # 22 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/front.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/front.hpp" # 1 "/localhome/glisse2/include/boost/mpl/front_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/front_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct front_impl; template< typename Sequence > struct front; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/front.hpp" 2 namespace boost { namespace mpl { template<> struct front_impl< aux::list_tag > { template< typename List > struct apply { typedef typename List::item type; }; }; }} # 23 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/clear.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/clear.hpp" # 1 "/localhome/glisse2/include/boost/mpl/clear_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/clear_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct clear_impl; template< typename Sequence > struct clear; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/clear.hpp" 2 namespace boost { namespace mpl { template<> struct clear_impl< aux::list_tag > { template< typename List > struct apply { typedef l_end type; }; }; }} # 24 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/O1_size.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/O1_size.hpp" # 1 "/localhome/glisse2/include/boost/mpl/O1_size_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/O1_size_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct O1_size_impl; template< typename Sequence > struct O1_size; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/O1_size.hpp" 2 namespace boost { namespace mpl { template<> struct O1_size_impl< aux::list_tag > { template< typename List > struct apply : List::size { }; }; }} # 25 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/size.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/size.hpp" # 1 "/localhome/glisse2/include/boost/mpl/size_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/size_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct size_impl; template< typename Sequence > struct size; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/size.hpp" 2 namespace boost { namespace mpl { template<> struct size_impl< aux::list_tag > { template< typename List > struct apply : List::size { }; }; }} # 26 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/empty.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/empty.hpp" # 1 "/localhome/glisse2/include/boost/mpl/empty_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/empty_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct empty_impl; template< typename Sequence > struct empty; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/empty.hpp" 2 namespace boost { namespace mpl { template<> struct empty_impl< aux::list_tag > { template< typename List > struct apply : not_ { }; }; }} # 27 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/begin_end.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/begin_end.hpp" # 1 "/localhome/glisse2/include/boost/mpl/begin_end_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/begin_end_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct begin_impl; template< typename Tag > struct end_impl; template< typename Sequence > struct begin; template< typename Sequence > struct end; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/begin_end.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/iterator.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/list/aux_/iterator.hpp" # 1 "/localhome/glisse2/include/boost/mpl/iterator_tags.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/iterator_tags.hpp" namespace boost { namespace mpl { struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; }} # 18 "/localhome/glisse2/include/boost/mpl/list/aux_/iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/deref.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/deref.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/msvc_type.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/msvc_type.hpp" namespace boost { namespace mpl { namespace aux { # 48 "/localhome/glisse2/include/boost/mpl/aux_/msvc_type.hpp" template< typename T > struct msvc_type { typedef typename T::type type; }; template<> struct msvc_type { typedef int type; }; }}} # 18 "/localhome/glisse2/include/boost/mpl/deref.hpp" 2 namespace boost { namespace mpl { template< typename Iterator = na > struct deref { typedef typename Iterator::type type; }; template<> struct deref< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : deref< T1 > { }; }; template< typename Tag > struct lambda< deref< na > , Tag , int_<-1> > { typedef false_ is_le; typedef deref< na > result_; typedef deref< na > type; }; namespace aux { template< typename T1 > struct template_arity< deref< T1 > > : int_<1> { }; template<> struct template_arity< deref< na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/list/aux_/iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/lambda_spec.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/list/aux_/iterator.hpp" 2 namespace boost { namespace mpl { template< typename Node > struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; }; template< typename Node > struct deref< l_iter > { typedef typename Node::item type; }; template< typename Node > struct next< l_iter > { typedef l_iter< typename Node::next > type; }; # 62 "/localhome/glisse2/include/boost/mpl/list/aux_/iterator.hpp" template<> struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; }; template< typename T1 , typename Tag > struct lambda< l_iter< T1 > , Tag , int_<1> > { typedef false_ is_le; typedef l_iter< T1 > result_; typedef result_ type; }; }} # 19 "/localhome/glisse2/include/boost/mpl/list/aux_/begin_end.hpp" 2 namespace boost { namespace mpl { template<> struct begin_impl< aux::list_tag > { template< typename List > struct apply { typedef l_iter type; }; }; template<> struct end_impl< aux::list_tag > { template< typename > struct apply { typedef l_iter type; }; }; }} # 28 "/localhome/glisse2/include/boost/mpl/list/list0.hpp" 2 namespace boost { namespace mpl { template< typename Dummy = na > struct list0; template<> struct list0 : l_end { typedef l_end type; }; }} # 19 "/localhome/glisse2/include/boost/mpl/list/list10.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/list/list10.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/include_preprocessed.hpp" 1 # 30 "/localhome/glisse2/include/boost/mpl/list/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/list/aux_/preprocessed/plain/list10.hpp" namespace boost { namespace mpl { template< typename T0 > struct list1 : l_item< long_<1> , T0 , l_end > { typedef list1 type; }; template< typename T0, typename T1 > struct list2 : l_item< long_<2> , T0 , list1 > { typedef list2 type; }; template< typename T0, typename T1, typename T2 > struct list3 : l_item< long_<3> , T0 , list2< T1,T2 > > { typedef list3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list4 : l_item< long_<4> , T0 , list3< T1,T2,T3 > > { typedef list4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list5 : l_item< long_<5> , T0 , list4< T1,T2,T3,T4 > > { typedef list5 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list6 : l_item< long_<6> , T0 , list5< T1,T2,T3,T4,T5 > > { typedef list6 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list7 : l_item< long_<7> , T0 , list6< T1,T2,T3,T4,T5,T6 > > { typedef list7 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list8 : l_item< long_<8> , T0 , list7< T1,T2,T3,T4,T5,T6,T7 > > { typedef list8 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list9 : l_item< long_<9> , T0 , list8< T1,T2,T3,T4,T5,T6,T7,T8 > > { typedef list9 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list10 : l_item< long_<10> , T0 , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > > { typedef list10 type; }; }} # 31 "/localhome/glisse2/include/boost/mpl/list/aux_/include_preprocessed.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/list/list10.hpp" 2 # 19 "/localhome/glisse2/include/boost/mpl/list/list20.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/list/list20.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/include_preprocessed.hpp" 1 # 30 "/localhome/glisse2/include/boost/mpl/list/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/list/aux_/preprocessed/plain/list20.hpp" namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list11 : l_item< long_<11> , T0 , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > > { typedef list11 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list12 : l_item< long_<12> , T0 , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > > { typedef list12 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list13 : l_item< long_<13> , T0 , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > > { typedef list13 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list14 : l_item< long_<14> , T0 , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > > { typedef list14 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list15 : l_item< long_<15> , T0 , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > > { typedef list15 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list16 : l_item< long_<16> , T0 , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > > { typedef list16 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list17 : l_item< long_<17> , T0 , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > > { typedef list17 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list18 : l_item< long_<18> , T0 , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > > { typedef list18 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list19 : l_item< long_<19> , T0 , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > > { typedef list19 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list20 : l_item< long_<20> , T0 , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > > { typedef list20 type; }; }} # 31 "/localhome/glisse2/include/boost/mpl/list/aux_/include_preprocessed.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/list/list20.hpp" 2 # 37 "/localhome/glisse2/include/boost/mpl/list.hpp" 2 # 46 "/localhome/glisse2/include/boost/mpl/list.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/list.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/list.hpp" namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 47 "/localhome/glisse2/include/boost/mpl/list.hpp" 2 # 10 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/contains.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/contains.hpp" # 1 "/localhome/glisse2/include/boost/mpl/contains_fwd.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/contains_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct contains_impl; template< typename Sequence, typename T > struct contains; }} # 19 "/localhome/glisse2/include/boost/mpl/contains.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/sequence_tag.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/sequence_tag.hpp" # 1 "/localhome/glisse2/include/boost/mpl/sequence_tag_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/sequence_tag_fwd.hpp" namespace boost { namespace mpl { struct nested_begin_end_tag; struct non_sequence_tag; template< typename Sequence > struct sequence_tag; }} # 18 "/localhome/glisse2/include/boost/mpl/sequence_tag.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/has_begin.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/has_begin.hpp" namespace boost { namespace mpl { namespace aux { template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_begin { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; }}} # 20 "/localhome/glisse2/include/boost/mpl/sequence_tag.hpp" 2 namespace boost { namespace mpl { # 78 "/localhome/glisse2/include/boost/mpl/sequence_tag.hpp" namespace aux { template< bool has_tag_, bool has_begin_ > struct sequence_tag_impl { template< typename Sequence > struct result2_; }; # 98 "/localhome/glisse2/include/boost/mpl/sequence_tag.hpp" template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef nested_begin_end_tag type; }; }; template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef non_sequence_tag type; }; }; } template< typename Sequence = na > struct sequence_tag : aux::sequence_tag_impl< ::boost::mpl::aux::has_tag::value , ::boost::mpl::aux::has_begin::value >::template result2_ { }; template<> struct sequence_tag< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : sequence_tag< T1 > { }; }; template< typename Tag > struct lambda< sequence_tag< na > , Tag , int_<-1> > { typedef false_ is_le; typedef sequence_tag< na > result_; typedef sequence_tag< na > type; }; namespace aux { template< typename T1 > struct template_arity< sequence_tag< T1 > > : int_<1> { }; template<> struct template_arity< sequence_tag< na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/contains.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/contains_impl.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/contains_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/begin_end.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/begin_end.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/begin_end_impl.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/begin_end_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/traits_lambda_spec.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/aux_/begin_end_impl.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename Sequence > struct begin_type { typedef typename Sequence::begin type; }; template< typename Sequence > struct end_type { typedef typename Sequence::end type; }; } template< typename Tag > struct begin_impl { template< typename Sequence > struct apply { typedef typename eval_if, aux::begin_type, void_>::type type; }; }; template< typename Tag > struct end_impl { template< typename Sequence > struct apply { typedef typename eval_if, aux::end_type, void_>::type type; }; }; # 82 "/localhome/glisse2/include/boost/mpl/aux_/begin_end_impl.hpp" template<> struct begin_impl { template< typename Sequence > struct apply { typedef typename Sequence::begin type; }; }; template<> struct end_impl { template< typename Sequence > struct apply { typedef typename Sequence::end type; }; }; template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; }} # 19 "/localhome/glisse2/include/boost/mpl/begin_end.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na > struct begin { typedef typename sequence_tag::type tag_; typedef typename begin_impl< tag_ > ::template apply< Sequence >::type type; }; template< typename Sequence = na > struct end { typedef typename sequence_tag::type tag_; typedef typename end_impl< tag_ > ::template apply< Sequence >::type type; }; template<> struct begin< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : begin< T1 > { }; }; template< typename Tag > struct lambda< begin< na > , Tag , int_<-1> > { typedef false_ is_le; typedef begin< na > result_; typedef begin< na > type; }; namespace aux { template< typename T1 > struct template_arity< begin< T1 > > : int_<1> { }; template<> struct template_arity< begin< na > > : int_<-1> { }; } template<> struct end< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : end< T1 > { }; }; template< typename Tag > struct lambda< end< na > , Tag , int_<-1> > { typedef false_ is_le; typedef end< na > result_; typedef end< na > type; }; namespace aux { template< typename T1 > struct template_arity< end< T1 > > : int_<1> { }; template<> struct template_arity< end< na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/aux_/contains_impl.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/find.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/find.hpp" # 1 "/localhome/glisse2/include/boost/mpl/find_if.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/find_if.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/find_if_pred.hpp" 1 # 14 "/localhome/glisse2/include/boost/mpl/aux_/find_if_pred.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/iter_apply.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/aux_/iter_apply.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/iter_apply.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename F , typename Iterator > struct iter_apply1 : apply1< F,typename deref::type > { }; template< typename F , typename Iterator1 , typename Iterator2 > struct iter_apply2 : apply2< F , typename deref::type , typename deref::type > { }; }}} # 15 "/localhome/glisse2/include/boost/mpl/aux_/find_if_pred.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename Predicate > struct find_if_pred { template< typename Iterator > struct apply { typedef not_< aux::iter_apply1 > type; }; }; }}} # 18 "/localhome/glisse2/include/boost/mpl/find_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/arg.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/find_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/iter_fold_if.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/iter_fold_if.hpp" # 1 "/localhome/glisse2/include/boost/mpl/pair.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/pair.hpp" namespace boost { namespace mpl { template< typename T1 = na , typename T2 = na > struct pair { typedef pair type; typedef T1 first; typedef T2 second; }; template< typename P = na > struct first { typedef typename P::first type; }; template< typename P = na > struct second { typedef typename P::second type; }; template<> struct pair< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pair< T1 , T2 > { }; }; template< typename Tag > struct lambda< pair< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef pair< na , na > result_; typedef pair< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< pair< T1 , T2 > > : int_<2> { }; template<> struct template_arity< pair< na , na > > : int_<-1> { }; } template<> struct first< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : first< T1 > { }; }; template< typename Tag > struct lambda< first< na > , Tag , int_<-1> > { typedef false_ is_le; typedef first< na > result_; typedef first< na > type; }; namespace aux { template< typename T1 > struct template_arity< first< T1 > > : int_<1> { }; template<> struct template_arity< first< na > > : int_<-1> { }; } template<> struct second< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : second< T1 > { }; }; template< typename Tag > struct lambda< second< na > , Tag , int_<-1> > { typedef false_ is_le; typedef second< na > result_; typedef second< na > type; }; namespace aux { template< typename T1 > struct template_arity< second< T1 > > : int_<1> { }; template<> struct template_arity< second< na > > : int_<-1> { }; } }} # 24 "/localhome/glisse2/include/boost/mpl/iter_fold_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/iter_fold_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_if_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 2 # 32 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_if_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp" 1 # 13 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp" namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< not_last::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< not_last::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 33 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_if_impl.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/iter_fold_if.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename Predicate, typename LastIterator > struct iter_fold_if_pred { template< typename State, typename Iterator > struct apply : and_< not_< is_same > , apply1 > { }; }; } template< typename Sequence = na , typename State = na , typename ForwardOp = na , typename ForwardPredicate = na , typename BackwardOp = na , typename BackwardPredicate = na > struct iter_fold_if { typedef typename begin::type first_; typedef typename end::type last_; typedef typename eval_if< is_na , if_< is_na, always, always > , identity >::type backward_pred_; struct result_ : aux::iter_fold_if_impl< first_ , State , ForwardOp , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > > , BackwardOp , backward_pred_ > { }; public: typedef pair< typename result_::state , typename result_::iterator > type; }; template<> struct iter_fold_if< na , na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct apply : iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > { }; }; template< typename Tag > struct lambda< iter_fold_if< na , na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold_if< na , na , na , na , na , na > result_; typedef iter_fold_if< na , na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > > : int_<6> { }; template<> struct template_arity< iter_fold_if< na , na , na , na , na , na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/find_if.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename Predicate = na > struct find_if { typedef typename iter_fold_if< Sequence , void , mpl::arg<1> , protect< aux::find_if_pred > >::type result_; typedef typename second::type type; }; template<> struct find_if< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find_if< T1 , T2 > { }; }; template< typename Tag > struct lambda< find_if< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find_if< na , na > result_; typedef find_if< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find_if< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find_if< na , na > > : int_<-1> { }; } }} # 18 "/localhome/glisse2/include/boost/mpl/find.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/same_as.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/same_as.hpp" namespace boost { namespace mpl { template< typename T1 > struct same_as { template< typename T2 > struct apply : is_same { }; }; template< typename T1 > struct not_same_as { template< typename T2 > struct apply : not_< is_same > { }; }; }} # 19 "/localhome/glisse2/include/boost/mpl/find.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename T = na > struct find : find_if< Sequence,same_as > { }; template<> struct find< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find< T1 , T2 > { }; }; template< typename Tag > struct lambda< find< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find< na , na > result_; typedef find< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find< na , na > > : int_<-1> { }; } }} # 21 "/localhome/glisse2/include/boost/mpl/aux_/contains_impl.hpp" 2 namespace boost { namespace mpl { template< typename Tag > struct contains_impl { template< typename Sequence, typename T > struct apply : not_< is_same< typename find::type , typename end::type > > { # 54 "/localhome/glisse2/include/boost/mpl/aux_/contains_impl.hpp" }; }; template<> struct contains_impl {}; }} # 21 "/localhome/glisse2/include/boost/mpl/contains.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename T = na > struct contains : contains_impl< typename sequence_tag::type > ::template apply< Sequence,T > { }; template<> struct contains< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : contains< T1 , T2 > { }; }; template< typename Tag > struct lambda< contains< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef contains< na , na > result_; typedef contains< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< contains< T1 , T2 > > : int_<2> { }; template<> struct template_arity< contains< na , na > > : int_<-1> { }; } }} # 11 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/remove_if.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/remove_if.hpp" # 1 "/localhome/glisse2/include/boost/mpl/fold.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/fold.hpp" # 1 "/localhome/glisse2/include/boost/mpl/O1_size.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/O1_size.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/O1_size_impl.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/O1_size_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/has_size.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/has_size.hpp" namespace boost { namespace mpl { namespace aux { template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_size { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; }}} # 21 "/localhome/glisse2/include/boost/mpl/aux_/O1_size_impl.hpp" 2 namespace boost { namespace mpl { # 35 "/localhome/glisse2/include/boost/mpl/aux_/O1_size_impl.hpp" namespace aux { template< typename Sequence > struct O1_size_impl : Sequence::size { }; } template< typename Tag > struct O1_size_impl { template< typename Sequence > struct apply : if_< aux::has_size , aux::O1_size_impl , long_<-1> >::type { # 69 "/localhome/glisse2/include/boost/mpl/aux_/O1_size_impl.hpp" }; }; # 85 "/localhome/glisse2/include/boost/mpl/aux_/O1_size_impl.hpp" }} # 20 "/localhome/glisse2/include/boost/mpl/O1_size.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na > struct O1_size : O1_size_impl< typename sequence_tag::type > ::template apply< Sequence > { }; template<> struct O1_size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : O1_size< T1 > { }; }; template< typename Tag > struct lambda< O1_size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef O1_size< na > result_; typedef O1_size< na > type; }; namespace aux { template< typename T1 > struct template_arity< O1_size< T1 > > : int_<1> { }; template<> struct template_arity< O1_size< na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/fold.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/fold_impl.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/fold_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/fold_impl.hpp" 2 # 34 "/localhome/glisse2/include/boost/mpl/aux_/fold_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp" namespace boost { namespace mpl { namespace aux { template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 35 "/localhome/glisse2/include/boost/mpl/aux_/fold_impl.hpp" 2 # 21 "/localhome/glisse2/include/boost/mpl/fold.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename State = na , typename ForwardOp = na > struct fold { typedef typename aux::fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , ForwardOp >::state type; }; template<> struct fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef fold< na , na , na > result_; typedef fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< fold< na , na , na > > : int_<-1> { }; } }} # 19 "/localhome/glisse2/include/boost/mpl/remove_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/reverse_fold.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/reverse_fold.hpp" # 1 "/localhome/glisse2/include/boost/mpl/arg.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/reverse_fold.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/reverse_fold_impl.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/reverse_fold_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/aux_/reverse_fold_impl.hpp" 2 # 35 "/localhome/glisse2/include/boost/mpl/aux_/reverse_fold_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp" namespace boost { namespace mpl { namespace aux { template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/aux_/reverse_fold_impl.hpp" 2 # 22 "/localhome/glisse2/include/boost/mpl/reverse_fold.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename State = na , typename BackwardOp = na , typename ForwardOp = arg<1> > struct reverse_fold { typedef typename aux::reverse_fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , BackwardOp , ForwardOp >::state type; }; template<> struct reverse_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_fold< na , na , na > result_; typedef reverse_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_fold< na , na , na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/remove_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/remove_if.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/inserter_algorithm.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/inserter_algorithm.hpp" # 1 "/localhome/glisse2/include/boost/mpl/back_inserter.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/back_inserter.hpp" # 1 "/localhome/glisse2/include/boost/mpl/push_back.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/push_back.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/push_back_impl.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/aux_/push_back_impl.hpp" namespace boost { namespace mpl { struct has_push_back_arg {}; template< typename Tag > struct push_back_impl { template< typename Sequence, typename T > struct apply { struct REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST44 # 40 "/localhome/glisse2/include/boost/mpl/aux_/push_back_impl.hpp" : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } mpl_assert_arg44 # 40 "/localhome/glisse2/include/boost/mpl/aux_/push_back_impl.hpp" ; enum { mpl_assertion_in_line_44 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_back_arg >::value ))>( mpl_assert_arg44::assert_arg() ) ) } ; }; }; template< typename Tag > struct has_push_back_impl { template< typename Seq > struct apply : aux::has_type< push_back< Seq, has_push_back_arg > > { }; }; template<> struct push_back_impl {}; template<> struct has_push_back_impl {}; }} # 19 "/localhome/glisse2/include/boost/mpl/push_back.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename T = na > struct push_back : push_back_impl< typename sequence_tag::type > ::template apply< Sequence,T > { }; template< typename Sequence = na > struct has_push_back : has_push_back_impl< typename sequence_tag::type > ::template apply< Sequence > { }; template<> struct push_back< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_back< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_back< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_back< na , na > result_; typedef push_back< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_back< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_back< na , na > > : int_<-1> { }; } template<> struct has_push_back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_back< T1 > { }; }; template< typename Tag > struct lambda< has_push_back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_back< na > result_; typedef has_push_back< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_back< T1 > > : int_<1> { }; template<> struct template_arity< has_push_back< na > > : int_<-1> { }; } }} # 19 "/localhome/glisse2/include/boost/mpl/back_inserter.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/inserter.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/inserter.hpp" namespace boost { namespace mpl { template< typename Sequence , typename Operation > struct inserter { typedef Sequence state; typedef Operation operation; }; }} # 20 "/localhome/glisse2/include/boost/mpl/back_inserter.hpp" 2 namespace boost { namespace mpl { template< typename Sequence > struct back_inserter : inserter< Sequence,push_back<> > { }; }} # 19 "/localhome/glisse2/include/boost/mpl/aux_/inserter_algorithm.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/front_inserter.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/front_inserter.hpp" # 1 "/localhome/glisse2/include/boost/mpl/push_front.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/push_front.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/push_front_impl.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/aux_/push_front_impl.hpp" namespace boost { namespace mpl { struct has_push_front_arg {}; template< typename Tag > struct push_front_impl { template< typename Sequence, typename T > struct apply { struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST45 # 41 "/localhome/glisse2/include/boost/mpl/aux_/push_front_impl.hpp" : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } mpl_assert_arg45 # 41 "/localhome/glisse2/include/boost/mpl/aux_/push_front_impl.hpp" ; enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_front_arg >::value ))>( mpl_assert_arg45::assert_arg() ) ) } ; }; }; template< typename Tag > struct has_push_front_impl { template< typename Seq > struct apply : aux::has_type< push_front< Seq, has_push_front_arg > > { }; }; template<> struct push_front_impl {}; template<> struct has_push_front_impl {}; }} # 19 "/localhome/glisse2/include/boost/mpl/push_front.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename T = na > struct push_front : push_front_impl< typename sequence_tag::type > ::template apply< Sequence,T > { }; template< typename Sequence = na > struct has_push_front : has_push_front_impl< typename sequence_tag::type > ::template apply< Sequence > { }; template<> struct push_front< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_front< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_front< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_front< na , na > result_; typedef push_front< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_front< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_front< na , na > > : int_<-1> { }; } template<> struct has_push_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_front< T1 > { }; }; template< typename Tag > struct lambda< has_push_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_front< na > result_; typedef has_push_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_front< T1 > > : int_<1> { }; template<> struct template_arity< has_push_front< na > > : int_<-1> { }; } }} # 19 "/localhome/glisse2/include/boost/mpl/front_inserter.hpp" 2 namespace boost { namespace mpl { template< typename Sequence > struct front_inserter : inserter< Sequence,push_front<> > { }; }} # 20 "/localhome/glisse2/include/boost/mpl/aux_/inserter_algorithm.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/clear.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/clear.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/clear_impl.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/aux_/clear_impl.hpp" namespace boost { namespace mpl { template< typename Tag > struct clear_impl { template< typename Sequence > struct apply; }; template<> struct clear_impl {}; }} # 19 "/localhome/glisse2/include/boost/mpl/clear.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na > struct clear : clear_impl< typename sequence_tag::type > ::template apply< Sequence > { }; template<> struct clear< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : clear< T1 > { }; }; template< typename Tag > struct lambda< clear< na > , Tag , int_<-1> > { typedef false_ is_le; typedef clear< na > result_; typedef clear< na > type; }; namespace aux { template< typename T1 > struct template_arity< clear< T1 > > : int_<1> { }; template<> struct template_arity< clear< na > > : int_<-1> { }; } }} # 25 "/localhome/glisse2/include/boost/mpl/aux_/inserter_algorithm.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessor/default_params.hpp" 1 # 32 "/localhome/glisse2/include/boost/mpl/aux_/inserter_algorithm.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/remove_if.hpp" 2 namespace boost { namespace mpl { namespace aux { template< typename Pred, typename InsertOp > struct remove_if_helper { template< typename Sequence, typename U > struct apply { typedef typename eval_if< typename apply1::type , identity , apply2 >::type type; }; }; template< typename Sequence , typename Predicate , typename Inserter > struct remove_if_impl : fold< Sequence , typename Inserter::state , protect< aux::remove_if_helper< typename lambda::type , typename Inserter::operation > > > { }; template< typename Sequence , typename Predicate , typename Inserter > struct reverse_remove_if_impl : reverse_fold< Sequence , typename Inserter::state , protect< aux::remove_if_helper< typename lambda::type , typename Inserter::operation > > > { }; } template< typename P1 = na , typename P2 = na , typename P3 = na > struct remove_if : aux::remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct remove_if< P1 , P2,na > : if_< has_push_back< typename clear::type> , aux::remove_if_impl< P1 , P2 , back_inserter< typename clear::type > > , aux::reverse_remove_if_impl< P1 , P2 , front_inserter< typename clear::type > > >::type { }; template< typename P1 = na , typename P2 = na , typename P3 = na > struct reverse_remove_if : aux::reverse_remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct reverse_remove_if< P1 , P2,na > : if_< has_push_back , aux::reverse_remove_if_impl< P1 , P2 , back_inserter< typename clear::type > > , aux::remove_if_impl< P1 , P2 , front_inserter< typename clear::type > > >::type { }; template<> struct remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef remove_if< na , na , na > result_; typedef remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< remove_if< na , na , na > > : int_<-1> { }; } template<> struct reverse_remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_remove_if< na , na , na > result_; typedef reverse_remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_remove_if< na , na , na > > : int_<-1> { }; } }} # 14 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/vector.hpp" # 1 "/localhome/glisse2/include/boost/mpl/limits/vector.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/vector.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/vector.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/vector20.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/vector/vector20.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/vector10.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/vector/vector10.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/at.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/vector/aux_/at.hpp" # 1 "/localhome/glisse2/include/boost/mpl/at_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/at_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct at_impl; template< typename Sequence, typename N > struct at; }} # 18 "/localhome/glisse2/include/boost/mpl/vector/aux_/at.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/tag.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/vector/aux_/tag.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/config/typeof.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/vector/aux_/tag.hpp" 2 namespace boost { namespace mpl { namespace aux { struct v_iter_tag; struct vector_tag; }}} # 19 "/localhome/glisse2/include/boost/mpl/vector/aux_/at.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/vector/aux_/at.hpp" namespace boost { namespace mpl { template< typename Vector, long n_ > struct v_at_impl { typedef long_< (Vector::lower_bound_::value + n_) > index_; typedef __typeof__( Vector::item_(index_()) ) type; }; template< typename Vector, long n_ > struct v_at : aux::wrapped_type< typename v_at_impl::type > { }; template<> struct at_impl< aux::vector_tag > { template< typename Vector, typename N > struct apply : v_at< Vector , N::value > { }; }; # 114 "/localhome/glisse2/include/boost/mpl/vector/aux_/at.hpp" }} # 18 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/front.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/vector/aux_/front.hpp" namespace boost { namespace mpl { template<> struct front_impl< aux::vector_tag > { template< typename Vector > struct apply : v_at { }; }; # 54 "/localhome/glisse2/include/boost/mpl/vector/aux_/front.hpp" }} # 19 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/push_front.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/vector/aux_/push_front.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/item.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/vector/aux_/item.hpp" namespace boost { namespace mpl { template< typename T , typename Base , int at_front = 0 > struct v_item : Base { typedef typename Base::upper_bound_ index_; typedef typename next::type upper_bound_; typedef typename next::type size; typedef Base base; typedef v_item type; static aux::type_wrapper item_(index_); using Base::item_; }; template< typename T , typename Base > struct v_item : Base { typedef typename prior::type index_; typedef index_ lower_bound_; typedef typename next::type size; typedef Base base; typedef v_item type; static aux::type_wrapper item_(index_); using Base::item_; }; template< typename Base , int at_front > struct v_mask : Base { typedef typename prior::type index_; typedef index_ upper_bound_; typedef typename prior::type size; typedef Base base; typedef v_mask type; static aux::type_wrapper item_(index_); using Base::item_; }; template< typename Base > struct v_mask : Base { typedef typename Base::lower_bound_ index_; typedef typename next::type lower_bound_; typedef typename prior::type size; typedef Base base; typedef v_mask type; static aux::type_wrapper item_(index_); using Base::item_; }; }} # 23 "/localhome/glisse2/include/boost/mpl/vector/aux_/push_front.hpp" 2 namespace boost { namespace mpl { template<> struct push_front_impl< aux::vector_tag > { template< typename Vector, typename T > struct apply { typedef v_item type; }; }; }} # 20 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/pop_front.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/vector/aux_/pop_front.hpp" namespace boost { namespace mpl { template<> struct pop_front_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_mask type; }; }; }} # 21 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/push_back.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/vector/aux_/push_back.hpp" namespace boost { namespace mpl { template<> struct push_back_impl< aux::vector_tag > { template< typename Vector, typename T > struct apply { typedef v_item type; }; }; }} # 22 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/pop_back.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/vector/aux_/pop_back.hpp" # 1 "/localhome/glisse2/include/boost/mpl/pop_back_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/pop_back_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct pop_back_impl; template< typename Sequence > struct pop_back; }} # 18 "/localhome/glisse2/include/boost/mpl/vector/aux_/pop_back.hpp" 2 namespace boost { namespace mpl { template<> struct pop_back_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_mask type; }; }; }} # 23 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/back.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/vector/aux_/back.hpp" # 1 "/localhome/glisse2/include/boost/mpl/back_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/back_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct back_impl; template< typename Sequence > struct back; }} # 18 "/localhome/glisse2/include/boost/mpl/vector/aux_/back.hpp" 2 namespace boost { namespace mpl { template<> struct back_impl< aux::vector_tag > { template< typename Vector > struct apply : v_at< Vector , prior::type::value > { }; }; # 57 "/localhome/glisse2/include/boost/mpl/vector/aux_/back.hpp" }} # 24 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/clear.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/vector/aux_/clear.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/vector0.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/vector/aux_/vector0.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" # 1 "/localhome/glisse2/include/boost/mpl/plus.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/plus.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/largest_int.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/largest_int.hpp" namespace boost { namespace mpl { namespace aux { template< typename T > struct integral_rank; template<> struct integral_rank : int_<1> {}; template<> struct integral_rank : int_<2> {}; template<> struct integral_rank : int_<3> {}; template<> struct integral_rank : int_<4> {}; template<> struct integral_rank : int_<5> {}; template<> struct integral_rank : int_<6> {}; template<> struct integral_rank : int_<7> {}; template<> struct integral_rank : int_<8> {}; template<> struct integral_rank : int_<9> {}; template<> struct integral_rank : int_<10> {}; template<> struct integral_rank : int_<11> {}; template<> struct integral_rank : int_<12> {}; template<> struct integral_rank: int_<13> {}; template< typename T1, typename T2 > struct largest_int : if_c< ( integral_rank::value >= integral_rank::value ) , T1 , T2 > { }; }}} # 19 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/plus.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { }; template<> struct plus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : plus< T1 , T2 > { }; }; template< typename Tag > struct lambda< plus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef plus< na , na > result_; typedef plus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< plus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< plus< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( N1::value + N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 35 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/plus.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/minus.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/minus.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/minus.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { }; template<> struct minus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : minus< T1 , T2 > { }; }; template< typename Tag > struct lambda< minus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef minus< na , na > result_; typedef minus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< minus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< minus< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( N1::value - N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 35 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/minus.hpp" 2 # 21 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/advance_fwd.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/advance_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct advance_impl; template< typename Iterator, typename N > struct advance; }} # 22 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/distance_fwd.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/distance_fwd.hpp" namespace boost { namespace mpl { template< typename Tag > struct distance_impl; template< typename First, typename Last > struct distance; }} # 23 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/prior.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" 2 namespace boost { namespace mpl { template< typename Vector , long n_ > struct v_iter { typedef aux::v_iter_tag tag; typedef random_access_iterator_tag category; typedef typename v_at::type type; typedef Vector vector_; typedef mpl::long_ pos; # 56 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" }; template< typename Vector , long n_ > struct next< v_iter > { typedef v_iter type; }; template< typename Vector , long n_ > struct prior< v_iter > { typedef v_iter type; }; template< typename Vector , long n_ , typename Distance > struct advance< v_iter,Distance> { typedef v_iter< Vector , (n_ + Distance::value) > type; }; template< typename Vector , long n_ , long m_ > struct distance< v_iter, v_iter > : mpl::long_<(m_ - n_)> { }; # 128 "/localhome/glisse2/include/boost/mpl/vector/aux_/iterator.hpp" }} # 23 "/localhome/glisse2/include/boost/mpl/vector/aux_/vector0.hpp" 2 namespace boost { namespace mpl { template< typename Dummy = na > struct vector0; template<> struct vector0 { typedef aux::vector_tag tag; typedef vector0 type; typedef long_<32768> lower_bound_; typedef lower_bound_ upper_bound_; typedef long_<0> size; static aux::type_wrapper item_(...); # 48 "/localhome/glisse2/include/boost/mpl/vector/aux_/vector0.hpp" }; }} # 19 "/localhome/glisse2/include/boost/mpl/vector/aux_/clear.hpp" 2 namespace boost { namespace mpl { template<> struct clear_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef vector0<> type; }; }; # 53 "/localhome/glisse2/include/boost/mpl/vector/aux_/clear.hpp" }} # 25 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/O1_size.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/vector/aux_/O1_size.hpp" namespace boost { namespace mpl { template<> struct O1_size_impl< aux::vector_tag > { template< typename Vector > struct apply : Vector::size { }; }; # 54 "/localhome/glisse2/include/boost/mpl/vector/aux_/O1_size.hpp" }} # 26 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/size.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/vector/aux_/size.hpp" namespace boost { namespace mpl { template<> struct size_impl< aux::vector_tag > : O1_size_impl< aux::vector_tag > { }; # 47 "/localhome/glisse2/include/boost/mpl/vector/aux_/size.hpp" }} # 27 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/empty.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/vector/aux_/empty.hpp" namespace boost { namespace mpl { template<> struct empty_impl< aux::vector_tag > { template< typename Vector > struct apply : is_same< typename Vector::lower_bound_ , typename Vector::upper_bound_ > { }; }; # 66 "/localhome/glisse2/include/boost/mpl/vector/aux_/empty.hpp" }} # 28 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/begin_end.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/vector/aux_/begin_end.hpp" namespace boost { namespace mpl { template<> struct begin_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_iter type; }; }; template<> struct end_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_iter type; }; }; }} # 32 "/localhome/glisse2/include/boost/mpl/vector/vector0.hpp" 2 # 19 "/localhome/glisse2/include/boost/mpl/vector/vector10.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/vector/vector10.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 1 # 49 "/localhome/glisse2/include/boost/mpl/vector/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" namespace boost { namespace mpl { template< typename T0 > struct vector1 : v_item< T0 , vector0< > > { typedef vector1 type; }; template< typename T0, typename T1 > struct vector2 : v_item< T1 , vector1 > { typedef vector2 type; }; template< typename T0, typename T1, typename T2 > struct vector3 : v_item< T2 , vector2< T0,T1 > > { typedef vector3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector4 : v_item< T3 , vector3< T0,T1,T2 > > { typedef vector4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 : v_item< T4 , vector4< T0,T1,T2,T3 > > { typedef vector5 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 : v_item< T5 , vector5< T0,T1,T2,T3,T4 > > { typedef vector6 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 : v_item< T6 , vector6< T0,T1,T2,T3,T4,T5 > > { typedef vector7 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 : v_item< T7 , vector7< T0,T1,T2,T3,T4,T5,T6 > > { typedef vector8 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 : v_item< T8 , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > > { typedef vector9 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector10 : v_item< T9 , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > > { typedef vector10 type; }; }} # 50 "/localhome/glisse2/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/vector/vector10.hpp" 2 # 19 "/localhome/glisse2/include/boost/mpl/vector/vector20.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/vector/vector20.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 1 # 49 "/localhome/glisse2/include/boost/mpl/vector/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector11 : v_item< T10 , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > > { typedef vector11 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector12 : v_item< T11 , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > > { typedef vector12 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector13 : v_item< T12 , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > > { typedef vector13 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector14 : v_item< T13 , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > > { typedef vector14 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector15 : v_item< T14 , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > > { typedef vector15 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector16 : v_item< T15 , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > > { typedef vector16 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector17 : v_item< T16 , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > > { typedef vector17 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector18 : v_item< T17 , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > > { typedef vector18 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector19 : v_item< T18 , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > > { typedef vector19 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector20 : v_item< T19 , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > > { typedef vector20 type; }; }} # 50 "/localhome/glisse2/include/boost/mpl/vector/aux_/include_preprocessed.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/vector/vector20.hpp" 2 # 37 "/localhome/glisse2/include/boost/mpl/vector.hpp" 2 # 46 "/localhome/glisse2/include/boost/mpl/vector.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/vector.hpp" namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 47 "/localhome/glisse2/include/boost/mpl/vector.hpp" 2 # 15 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/at.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/at.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/at_impl.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/aux_/at_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/advance.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/advance.hpp" # 1 "/localhome/glisse2/include/boost/mpl/less.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/less.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/less.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/less.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { }; template<> struct less< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less< T1 , T2 > { }; }; template< typename Tag > struct lambda< less< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less< na , na > result_; typedef less< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( N2::value > N1::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/less.hpp" 2 # 19 "/localhome/glisse2/include/boost/mpl/advance.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/negate.hpp" 1 # 25 "/localhome/glisse2/include/boost/mpl/negate.hpp" namespace boost { namespace mpl { template< typename Tag > struct negate_impl; template< typename T > struct negate_tag { typedef typename T::tag type; }; template< typename N = na > struct negate : negate_impl< typename negate_tag::type >::template apply::type { }; template<> struct negate< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : negate< T1 > { }; }; template< typename Tag > struct lambda< negate< na > , Tag , int_<-1> > { typedef false_ is_le; typedef negate< na > result_; typedef negate< na > type; }; namespace aux { template< typename T1 > struct template_arity< negate< T1 > > : int_<1> { }; template<> struct template_arity< negate< na > > : int_<-1> { }; } # 65 "/localhome/glisse2/include/boost/mpl/negate.hpp" template<> struct negate_impl { template< typename N > struct apply : integral_c< typename N::value_type, (-N::value) > { }; }; }} # 20 "/localhome/glisse2/include/boost/mpl/advance.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/advance.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/advance_forward.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/advance_forward.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/aux_/advance_forward.hpp" 2 # 32 "/localhome/glisse2/include/boost/mpl/aux_/advance_forward.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp" namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 33 "/localhome/glisse2/include/boost/mpl/aux_/advance_forward.hpp" 2 # 25 "/localhome/glisse2/include/boost/mpl/advance.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/advance_backward.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/advance_backward.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/aux_/advance_backward.hpp" 2 # 32 "/localhome/glisse2/include/boost/mpl/aux_/advance_backward.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp" namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 33 "/localhome/glisse2/include/boost/mpl/aux_/advance_backward.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/advance.hpp" 2 namespace boost { namespace mpl { template< typename Tag > struct advance_impl { template< typename Iterator, typename N > struct apply { typedef typename less< N,long_<0> >::type backward_; typedef typename if_< backward_, negate, N >::type offset_; typedef typename if_< backward_ , aux::advance_backward< offset_::value > , aux::advance_forward< offset_::value > >::type f_; typedef typename apply_wrap1::type type; }; }; template< typename Iterator = na , typename N = na > struct advance : advance_impl< typename tag::type > ::template apply { }; template< typename Iterator , long N > struct advance_c : advance_impl< typename tag::type > ::template apply > { }; template<> struct advance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : advance< T1 , T2 > { }; }; template< typename Tag > struct lambda< advance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef advance< na , na > result_; typedef advance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< advance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< advance< na , na > > : int_<-1> { }; } }} # 19 "/localhome/glisse2/include/boost/mpl/aux_/at_impl.hpp" 2 namespace boost { namespace mpl { template< typename Tag > struct at_impl { template< typename Sequence, typename N > struct apply { typedef typename advance< typename begin::type , N >::type iter_; typedef typename deref::type type; }; }; template<> struct at_impl {}; }} # 19 "/localhome/glisse2/include/boost/mpl/at.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename N = na > struct at : at_impl< typename sequence_tag::type > ::template apply< Sequence,N > { }; template< typename Sequence , long N > struct at_c : at_impl< typename sequence_tag::type > ::template apply< Sequence,mpl::long_ > { }; template<> struct at< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : at< T1 , T2 > { }; }; template< typename Tag > struct lambda< at< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef at< na , na > result_; typedef at< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< at< T1 , T2 > > : int_<2> { }; template<> struct template_arity< at< na , na > > : int_<-1> { }; } }} # 17 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/size.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/size.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/size_impl.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/size_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/distance.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/distance.hpp" # 1 "/localhome/glisse2/include/boost/mpl/iter_fold.hpp" 1 # 21 "/localhome/glisse2/include/boost/mpl/iter_fold.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_impl.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_impl.hpp" 2 # 33 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_impl.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp" namespace boost { namespace mpl { namespace aux { template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 34 "/localhome/glisse2/include/boost/mpl/aux_/iter_fold_impl.hpp" 2 # 22 "/localhome/glisse2/include/boost/mpl/iter_fold.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na , typename State = na , typename ForwardOp = na > struct iter_fold { typedef typename aux::iter_fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , typename lambda::type >::state type; }; template<> struct iter_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : iter_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< iter_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold< na , na , na > result_; typedef iter_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< iter_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< iter_fold< na , na , na > > : int_<-1> { }; } }} # 19 "/localhome/glisse2/include/boost/mpl/distance.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/iterator_range.hpp" 1 # 20 "/localhome/glisse2/include/boost/mpl/iterator_range.hpp" namespace boost { namespace mpl { struct iterator_range_tag; template< typename First = na , typename Last = na > struct iterator_range { typedef iterator_range_tag tag; typedef iterator_range type; typedef First begin; typedef Last end; }; template<> struct iterator_range< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : iterator_range< T1 , T2 > { }; }; template< typename Tag > struct lambda< iterator_range< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iterator_range< na , na > result_; typedef iterator_range< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< iterator_range< T1 , T2 > > : int_<2> { }; template<> struct template_arity< iterator_range< na , na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/distance.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 24 "/localhome/glisse2/include/boost/mpl/distance.hpp" 2 namespace boost { namespace mpl { template< typename Tag > struct distance_impl { template< typename First, typename Last > struct apply : aux::msvc_eti_base< typename iter_fold< iterator_range , mpl::long_<0> , next<> >::type > { # 60 "/localhome/glisse2/include/boost/mpl/distance.hpp" }; }; template< typename First = na , typename Last = na > struct distance : distance_impl< typename tag::type > ::template apply { }; template<> struct distance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : distance< T1 , T2 > { }; }; template< typename Tag > struct lambda< distance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef distance< na , na > result_; typedef distance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< distance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< distance< na , na > > : int_<-1> { }; } }} # 20 "/localhome/glisse2/include/boost/mpl/aux_/size_impl.hpp" 2 namespace boost { namespace mpl { template< typename Tag > struct size_impl { template< typename Sequence > struct apply : distance< typename begin::type , typename end::type > { }; }; template<> struct size_impl {}; }} # 20 "/localhome/glisse2/include/boost/mpl/size.hpp" 2 namespace boost { namespace mpl { template< typename Sequence = na > struct size : aux::msvc_eti_base< typename size_impl< typename sequence_tag::type > ::template apply< Sequence >::type >::type { }; template<> struct size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : size< T1 > { }; }; template< typename Tag > struct lambda< size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef size< na > result_; typedef size< na > type; }; namespace aux { template< typename T1 > struct template_arity< size< T1 > > : int_<1> { }; template<> struct template_arity< size< na > > : int_<-1> { }; } }} # 18 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/comparison.hpp" 1 # 18 "/localhome/glisse2/include/boost/mpl/comparison.hpp" # 1 "/localhome/glisse2/include/boost/mpl/not_equal_to.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/not_equal_to.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { }; template<> struct not_equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< not_equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_equal_to< na , na > result_; typedef not_equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< not_equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< not_equal_to< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( N1::value != N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/not_equal_to.hpp" 2 # 19 "/localhome/glisse2/include/boost/mpl/comparison.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/greater.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/greater.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/greater.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/greater.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { }; template<> struct greater< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater< na , na > result_; typedef greater< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( N1::value > N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/greater.hpp" 2 # 21 "/localhome/glisse2/include/boost/mpl/comparison.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/less_equal.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/less_equal.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { }; template<> struct less_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< less_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less_equal< na , na > result_; typedef less_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less_equal< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( N1::value <= N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/less_equal.hpp" 2 # 22 "/localhome/glisse2/include/boost/mpl/comparison.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/greater_equal.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/greater_equal.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 1 # 27 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 28 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { }; template<> struct greater_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater_equal< na , na > result_; typedef greater_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater_equal< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( N1::value >= N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 36 "/localhome/glisse2/include/boost/mpl/aux_/comparison_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/greater_equal.hpp" 2 # 23 "/localhome/glisse2/include/boost/mpl/comparison.hpp" 2 # 19 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/tools/config.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/tools/config.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/tools/config.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 2 3 # 19 "/localhome/glisse2/include/boost/math/tools/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/tools/user.hpp" 1 # 24 "/localhome/glisse2/include/boost/math/tools/config.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/round_fwd.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/detail/round_fwd.hpp" namespace boost { namespace math { template T trunc(const T& v, const Policy& pol); template T trunc(const T& v); template int itrunc(const T& v, const Policy& pol); template int itrunc(const T& v); template long ltrunc(const T& v, const Policy& pol); template long ltrunc(const T& v); template boost::long_long_type lltrunc(const T& v, const Policy& pol); template boost::long_long_type lltrunc(const T& v); template T round(const T& v, const Policy& pol); template T round(const T& v); template int iround(const T& v, const Policy& pol); template int iround(const T& v); template long lround(const T& v, const Policy& pol); template long lround(const T& v); template boost::long_long_type llround(const T& v, const Policy& pol); template boost::long_long_type llround(const T& v); template T modf(const T& v, T* ipart, const Policy& pol); template T modf(const T& v, T* ipart); template T modf(const T& v, int* ipart, const Policy& pol); template T modf(const T& v, int* ipart); template T modf(const T& v, long* ipart, const Policy& pol); template T modf(const T& v, long* ipart); template T modf(const T& v, boost::long_long_type* ipart, const Policy& pol); template T modf(const T& v, boost::long_long_type* ipart); } } # 25 "/localhome/glisse2/include/boost/math/tools/config.hpp" 2 # 240 "/localhome/glisse2/include/boost/math/tools/config.hpp" namespace boost{ namespace math{ namespace tools { template inline T max (T a, T b, T c) { return (std::max)((std::max)(a, b), c); } template inline T max (T a, T b, T c, T d) { return (std::max)((std::max)(a, b), (std::max)(c, d)); } } template void suppress_unused_variable_warning(const T&) { } }} # 1 "/localhome/glisse2/include/boost/detail/fenv.hpp" 1 # 267 "/localhome/glisse2/include/boost/math/tools/config.hpp" 2 namespace boost{ namespace math{ namespace detail { struct fpu_guard { fpu_guard() { fegetexceptflag(&m_flags, (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)); feclearexcept((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)); } ~fpu_guard() { fesetexceptflag(&m_flags, (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)); } private: fexcept_t m_flags; }; } }} # 23 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 27 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 29 "/localhome/glisse2/include/boost/math/policies/policy.hpp" 2 namespace boost{ namespace math{ namespace tools{ template int digits(); template T epsilon(); } namespace policies{ # 176 "/localhome/glisse2/include/boost/math/policies/policy.hpp" enum error_policy_type { throw_on_error = 0, errno_on_error = 1, ignore_error = 2, user_error = 3 }; template struct domain_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const domain_error*); char test_is_default_arg(const domain_error*); template struct is_domain_error_imp { template static char test(const domain_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_domain_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_domain_error_imp::value>{}; template struct pole_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const pole_error*); char test_is_default_arg(const pole_error*); template struct is_pole_error_imp { template static char test(const pole_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_pole_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_pole_error_imp::value>{}; template struct overflow_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const overflow_error*); char test_is_default_arg(const overflow_error*); template struct is_overflow_error_imp { template static char test(const overflow_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_overflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_overflow_error_imp::value>{}; template struct underflow_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const underflow_error*); char test_is_default_arg(const underflow_error*); template struct is_underflow_error_imp { template static char test(const underflow_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_underflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_underflow_error_imp::value>{}; template struct denorm_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const denorm_error*); char test_is_default_arg(const denorm_error*); template struct is_denorm_error_imp { template static char test(const denorm_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_denorm_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_denorm_error_imp::value>{}; template struct evaluation_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const evaluation_error*); char test_is_default_arg(const evaluation_error*); template struct is_evaluation_error_imp { template static char test(const evaluation_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_evaluation_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_evaluation_error_imp::value>{}; template struct rounding_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const rounding_error*); char test_is_default_arg(const rounding_error*); template struct is_rounding_error_imp { template static char test(const rounding_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_rounding_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_rounding_error_imp::value>{}; template struct indeterminate_result_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const indeterminate_result_error*); char test_is_default_arg(const indeterminate_result_error*); template struct is_indeterminate_result_error_imp { template static char test(const indeterminate_result_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_indeterminate_result_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_indeterminate_result_error_imp::value>{}; template struct promote_float : public boost::mpl::bool_{}; namespace detail{ template char test_is_valid_arg(const promote_float*); char test_is_default_arg(const promote_float*); template struct is_promote_float_imp { template static char test(const promote_float*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_promote_float : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_float_imp::value>{}; template struct promote_double : public boost::mpl::bool_{}; namespace detail{ template char test_is_valid_arg(const promote_double*); char test_is_default_arg(const promote_double*); template struct is_promote_double_imp { template static char test(const promote_double*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_promote_double : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_double_imp::value>{}; template struct assert_undefined : public boost::mpl::bool_{}; namespace detail{ template char test_is_valid_arg(const assert_undefined*); char test_is_default_arg(const assert_undefined*); template struct is_assert_undefined_imp { template static char test(const assert_undefined*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_assert_undefined : public boost::mpl::bool_< ::boost::math::policies::detail::is_assert_undefined_imp::value>{}; enum discrete_quantile_policy_type { real, integer_round_outwards, integer_round_inwards, integer_round_down, integer_round_up, integer_round_nearest }; template struct discrete_quantile : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const discrete_quantile*); char test_is_default_arg(const discrete_quantile*); template struct is_discrete_quantile_imp { template static char test(const discrete_quantile*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_discrete_quantile : public boost::mpl::bool_< ::boost::math::policies::detail::is_discrete_quantile_imp::value>{}; template struct digits10 : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const digits10*); char test_is_default_arg(const digits10<0>*); template struct is_digits10_imp { template static char test(const digits10*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_digits10 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits10_imp::value>{}; template struct digits2 : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const digits2*); char test_is_default_arg(const digits2<0>*); template struct is_digits2_imp { template static char test(const digits2*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_digits2 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits2_imp::value>{}; template struct max_series_iterations : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const max_series_iterations*); char test_is_default_arg(const max_series_iterations<1000000>*); template struct is_max_series_iterations_imp { template static char test(const max_series_iterations*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_max_series_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_series_iterations_imp::value>{}; template struct max_root_iterations : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const max_root_iterations*); char test_is_default_arg(const max_root_iterations<200>*); template struct is_max_root_iterations_imp { template static char test(const max_root_iterations*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_max_root_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_root_iterations_imp::value>{}; struct default_policy{}; namespace detail{ template struct precision { typedef typename mpl::if_c< (Digits10::value == 0), digits2<0>, digits2<((Digits10::value + 1) * 1000L) / 301L> >::type digits2_type; public: typedef typename mpl::if_c< (Digits2::value > digits2_type::value), Digits2, digits2_type>::type type; }; template struct select_result { typedef A type; }; template struct select_result { typedef typename mpl::deref::type type; }; template struct find_arg { private: typedef typename mpl::find_if::type iter; typedef typename mpl::end::type end_type; public: typedef typename select_result< DefaultType, iter, ::boost::is_same::value>::type type; }; double test_is_valid_arg(...); double test_is_default_arg(...); char test_is_valid_arg(const default_policy*); char test_is_default_arg(const default_policy*); template struct is_valid_policy_imp { static const bool value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast(0))) == 1; }; template struct is_default_policy_imp { static const bool value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast(0))) == 1; }; template struct is_valid_policy : public mpl::bool_< ::boost::math::policies::detail::is_valid_policy_imp::value> {}; template struct is_default_policy : public mpl::bool_< ::boost::math::policies::detail::is_default_policy_imp::value> { template struct apply { typedef is_default_policy type; }; }; template struct append_N { typedef typename mpl::push_back::type new_seq; typedef typename append_N::type type; }; template struct append_N { typedef Seq type; }; template struct default_args { typedef promote_float arg1; typedef promote_double arg2; }; template <> struct default_args { typedef default_policy arg1; typedef default_policy arg2; }; template <> struct default_args { typedef promote_float arg1; typedef default_policy arg2; }; template <> struct default_args { typedef promote_double arg1; typedef default_policy arg2; }; typedef default_args::arg1 forwarding_arg1; typedef default_args::arg2 forwarding_arg2; } template struct policy { private: static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); static_assert(::boost::math::policies::detail::is_valid_policy::value, "::boost::math::policies::detail::is_valid_policy::value"); typedef mpl::list arg_list; public: typedef typename detail::find_arg, domain_error<> >::type domain_error_type; typedef typename detail::find_arg, pole_error<> >::type pole_error_type; typedef typename detail::find_arg, overflow_error<> >::type overflow_error_type; typedef typename detail::find_arg, underflow_error<> >::type underflow_error_type; typedef typename detail::find_arg, denorm_error<> >::type denorm_error_type; typedef typename detail::find_arg, evaluation_error<> >::type evaluation_error_type; typedef typename detail::find_arg, rounding_error<> >::type rounding_error_type; typedef typename detail::find_arg, indeterminate_result_error<> >::type indeterminate_result_error_type; private: typedef typename detail::find_arg, digits10<> >::type digits10_type; typedef typename detail::find_arg, digits2<> >::type bits_precision_type; public: typedef typename detail::precision::type precision_type; typedef typename detail::find_arg, promote_float<> >::type promote_float_type; typedef typename detail::find_arg, promote_double<> >::type promote_double_type; typedef typename detail::find_arg, discrete_quantile<> >::type discrete_quantile_type; typedef typename detail::find_arg, discrete_quantile<> >::type assert_undefined_type; typedef typename detail::find_arg, max_series_iterations<> >::type max_series_iterations_type; typedef typename detail::find_arg, max_root_iterations<> >::type max_root_iterations_type; }; template <> struct policy { public: typedef domain_error<> domain_error_type; typedef pole_error<> pole_error_type; typedef overflow_error<> overflow_error_type; typedef underflow_error<> underflow_error_type; typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; typedef indeterminate_result_error<> indeterminate_result_error_type; typedef digits2<> precision_type; typedef promote_float<> promote_float_type; typedef promote_double<> promote_double_type; typedef discrete_quantile<> discrete_quantile_type; typedef assert_undefined<> assert_undefined_type; typedef max_series_iterations<> max_series_iterations_type; typedef max_root_iterations<> max_root_iterations_type; }; template <> struct policy { public: typedef domain_error<> domain_error_type; typedef pole_error<> pole_error_type; typedef overflow_error<> overflow_error_type; typedef underflow_error<> underflow_error_type; typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; typedef indeterminate_result_error<> indeterminate_result_error_type; typedef digits2<> precision_type; typedef promote_float promote_float_type; typedef promote_double promote_double_type; typedef discrete_quantile<> discrete_quantile_type; typedef assert_undefined<> assert_undefined_type; typedef max_series_iterations<> max_series_iterations_type; typedef max_root_iterations<> max_root_iterations_type; }; template struct normalise { private: typedef mpl::list arg_list; typedef typename detail::find_arg, typename Policy::domain_error_type >::type domain_error_type; typedef typename detail::find_arg, typename Policy::pole_error_type >::type pole_error_type; typedef typename detail::find_arg, typename Policy::overflow_error_type >::type overflow_error_type; typedef typename detail::find_arg, typename Policy::underflow_error_type >::type underflow_error_type; typedef typename detail::find_arg, typename Policy::denorm_error_type >::type denorm_error_type; typedef typename detail::find_arg, typename Policy::evaluation_error_type >::type evaluation_error_type; typedef typename detail::find_arg, typename Policy::rounding_error_type >::type rounding_error_type; typedef typename detail::find_arg, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type; typedef typename detail::find_arg, digits10<> >::type digits10_type; typedef typename detail::find_arg, typename Policy::precision_type >::type bits_precision_type; typedef typename detail::precision::type precision_type; typedef typename detail::find_arg, typename Policy::promote_float_type >::type promote_float_type; typedef typename detail::find_arg, typename Policy::promote_double_type >::type promote_double_type; typedef typename detail::find_arg, typename Policy::discrete_quantile_type >::type discrete_quantile_type; typedef typename detail::find_arg, discrete_quantile<> >::type assert_undefined_type; typedef typename detail::find_arg, max_series_iterations<> >::type max_series_iterations_type; typedef typename detail::find_arg, max_root_iterations<> >::type max_root_iterations_type; typedef mpl::vector< domain_error_type, pole_error_type, overflow_error_type, underflow_error_type, denorm_error_type, evaluation_error_type, rounding_error_type, indeterminate_result_error_type, precision_type, promote_float_type, promote_double_type, discrete_quantile_type, assert_undefined_type, max_series_iterations_type, max_root_iterations_type> result_list; typedef typename mpl::remove_if >::type reduced_list; typedef typename detail::append_N::value)>::type result_type; public: typedef policy< typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type > type; }; template <> struct normalise, promote_float, promote_double, discrete_quantile<>, assert_undefined<>, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> { typedef policy type; }; template <> struct normalise, promote_float, promote_double, discrete_quantile<>, assert_undefined<>, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> { typedef policy type; }; inline policy<> make_policy() { return policy<>(); } template inline typename normalise, A1>::type make_policy(const A1&) { typedef typename normalise, A1>::type result_type; return result_type(); } template inline typename normalise, A1, A2>::type make_policy(const A1&, const A2&) { typedef typename normalise, A1, A2>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&) { typedef typename normalise, A1, A2, A3>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&) { typedef typename normalise, A1, A2, A3, A4>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&) { typedef typename normalise, A1, A2, A3, A4, A5>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&) { typedef typename normalise, A1, A2, A3, A4, A5, A6>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type; return result_type(); } template struct evaluation { typedef Real type; }; template struct evaluation { typedef typename mpl::if_::type type; }; template struct evaluation { typedef typename mpl::if_::type type; }; # 776 "/localhome/glisse2/include/boost/math/policies/policy.hpp" template struct precision { static_assert((::std::numeric_limits::radix == 2) || ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0)), "(::std::numeric_limits::radix == 2) || ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0))"); typedef typename Policy::precision_type precision_type; typedef typename mpl::if_c< ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0)), precision_type, typename mpl::if_c< ((::std::numeric_limits::digits <= precision_type::value) || (Policy::precision_type::value <= 0)), digits2< ::std::numeric_limits::digits>, precision_type >::type >::type type; # 812 "/localhome/glisse2/include/boost/math/policies/policy.hpp" }; namespace detail{ template inline int digits_imp(mpl::true_ const&) { static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); typedef typename boost::math::policies::precision::type p_t; return p_t::value; } template inline int digits_imp(mpl::false_ const&) { return tools::digits(); } } template inline int digits() { typedef mpl::bool_< std::numeric_limits::is_specialized > tag_type; return detail::digits_imp(tag_type()); } template inline unsigned long get_max_series_iterations() { typedef typename Policy::max_series_iterations_type iter_type; return iter_type::value; } template inline unsigned long get_max_root_iterations() { typedef typename Policy::max_root_iterations_type iter_type; return iter_type::value; } namespace detail{ template struct series_factor_calc { static T get() { return ldexp(T(1.0), 1 - Digits::value); } }; template struct series_factor_calc { static T get() { return boost::math::tools::epsilon(); } }; template struct series_factor_calc { static T get() { static const boost::uintmax_t v = static_cast(1u) << (Digits::value - 1); return 1 / static_cast(v); } }; template struct series_factor_calc { static T get() { return boost::math::tools::epsilon(); } }; template inline T get_epsilon_imp(mpl::true_ const&) { static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); static_assert(::std::numeric_limits::radix == 2, "::std::numeric_limits::radix == 2"); typedef typename boost::math::policies::precision::type p_t; typedef mpl::bool_::digits> is_small_int; typedef mpl::bool_= std::numeric_limits::digits> is_default_value; return series_factor_calc::get(); } template inline T get_epsilon_imp(mpl::false_ const&) { return tools::epsilon(); } } template inline T get_epsilon() { typedef mpl::bool_< (std::numeric_limits::is_specialized && (std::numeric_limits::radix == 2)) > tag_type; return detail::get_epsilon_imp(tag_type()); } namespace detail{ template char test_is_policy(const policy*); double test_is_policy(...); template struct is_policy_imp { static const bool value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast(0))) == 1); }; } template struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp

::value> {}; }}} # 20 "/localhome/glisse2/include/boost/math/tools/precision.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 25 "/localhome/glisse2/include/boost/math/tools/precision.hpp" 2 namespace boost{ namespace math { namespace tools { # 43 "/localhome/glisse2/include/boost/math/tools/precision.hpp" template inline int digits() { static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); static_assert(::std::numeric_limits::radix == 2, "::std::numeric_limits::radix == 2"); return std::numeric_limits::digits; } template inline T max_value() { static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); return (std::numeric_limits::max)(); } template inline T min_value() { static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); return (std::numeric_limits::min)(); } namespace detail{ # 88 "/localhome/glisse2/include/boost/math/tools/precision.hpp" template inline T log_max_value(const mpl::int_<128>& ) { return 88.0f; } template inline T log_min_value(const mpl::int_<128>& ) { return -87.0f; } template inline T log_max_value(const mpl::int_<1024>& ) { return 709.0; } template inline T log_min_value(const mpl::int_<1024>& ) { return -708.0; } template inline T log_max_value(const mpl::int_<16384>& ) { return 11356.0L; } template inline T log_min_value(const mpl::int_<16384>& ) { return -11355.0L; } template inline T log_max_value(const mpl::int_<0>& ) { static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T val = log((std::numeric_limits::max)()); return val; } template inline T log_min_value(const mpl::int_<0>& ) { static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T val = log((std::numeric_limits::max)()); return val; } template inline T epsilon(const mpl::true_& ) { return std::numeric_limits::epsilon(); } # 172 "/localhome/glisse2/include/boost/math/tools/precision.hpp" template inline T epsilon(const mpl::false_& ) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T eps = ldexp(static_cast(1), 1-policies::digits >()); return eps; } } template inline T log_max_value() { typedef typename mpl::if_c< std::numeric_limits::max_exponent == 128 || std::numeric_limits::max_exponent == 1024 || std::numeric_limits::max_exponent == 16384, mpl::int_::max_exponent>, mpl::int_<0> >::type tag_type; static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); return detail::log_max_value(tag_type()); } template inline T log_min_value() { typedef typename mpl::if_c< std::numeric_limits::max_exponent == 128 || std::numeric_limits::max_exponent == 1024 || std::numeric_limits::max_exponent == 16384, mpl::int_::max_exponent>, mpl::int_<0> >::type tag_type; static_assert(::std::numeric_limits::is_specialized, "::std::numeric_limits::is_specialized"); return detail::log_min_value(tag_type()); } template inline T epsilon() { return detail::epsilon(mpl::bool_< ::std::numeric_limits::is_specialized>()); } namespace detail{ template inline T root_epsilon_imp(const mpl::int_<24>&) { return static_cast(0.00034526698300124390839884978618400831996329879769945L); } template inline T root_epsilon_imp(const T*, const mpl::int_<53>&) { return static_cast(0.1490116119384765625e-7L); } template inline T root_epsilon_imp(const T*, const mpl::int_<64>&) { return static_cast(0.32927225399135962333569506281281311031656150598474e-9L); } template inline T root_epsilon_imp(const T*, const mpl::int_<113>&) { return static_cast(0.1387778780781445675529539585113525390625e-16L); } template inline T root_epsilon_imp(const T*, const Tag&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T r_eps = sqrt(tools::epsilon()); return r_eps; } template inline T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) { return static_cast(0.018581361171917516667460937040007436176452688944747L); } template inline T forth_root_epsilon_imp(const T*, const mpl::int_<53>&) { return static_cast(0.0001220703125L); } template inline T forth_root_epsilon_imp(const T*, const mpl::int_<64>&) { return static_cast(0.18145860519450699870567321328132261891067079047605e-4L); } template inline T forth_root_epsilon_imp(const T*, const mpl::int_<113>&) { return static_cast(0.37252902984619140625e-8L); } template inline T forth_root_epsilon_imp(const T*, const Tag&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T r_eps = sqrt(sqrt(tools::epsilon())); return r_eps; } } template inline T root_epsilon() { typedef mpl::int_< (::std::numeric_limits::radix == 2) ? std::numeric_limits::digits : 0> tag_type; return detail::root_epsilon_imp(static_cast(0), tag_type()); } template inline T forth_root_epsilon() { typedef mpl::int_< (::std::numeric_limits::radix == 2) ? std::numeric_limits::digits : 0> tag_type; return detail::forth_root_epsilon_imp(static_cast(0), tag_type()); } } } } # 21 "/localhome/glisse2/include/boost/math/special_functions/acosh.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/policies/error_handling.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/policies/error_handling.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 3 # 1 "/usr/include/errno.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cerrno" 2 3 # 15 "/localhome/glisse2/include/boost/math/policies/error_handling.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 21 "/localhome/glisse2/include/boost/math/policies/error_handling.hpp" 2 # 30 "/localhome/glisse2/include/boost/math/policies/error_handling.hpp" # 1 "/localhome/glisse2/include/boost/format.hpp" 1 # 27 "/localhome/glisse2/include/boost/format.hpp" # 1 "/localhome/glisse2/include/boost/format/detail/compat_workarounds.hpp" 1 # 33 "/localhome/glisse2/include/boost/format/detail/compat_workarounds.hpp" namespace boost { namespace io { template class CompatTraits; template class CompatAlloc; } } # 1 "/localhome/glisse2/include/boost/format/detail/config_macros.hpp" 1 # 33 "/localhome/glisse2/include/boost/format/detail/config_macros.hpp" # 1 "/localhome/glisse2/include/boost/format/detail/workarounds_gcc-2_95.hpp" 1 # 34 "/localhome/glisse2/include/boost/format/detail/config_macros.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/detail/workarounds_stlport.hpp" 1 # 35 "/localhome/glisse2/include/boost/format/detail/config_macros.hpp" 2 # 86 "/localhome/glisse2/include/boost/format/detail/config_macros.hpp" namespace boost { namespace io { namespace detail { typedef ::std:: locale locale_t; } } } # 51 "/localhome/glisse2/include/boost/format/detail/compat_workarounds.hpp" 2 # 65 "/localhome/glisse2/include/boost/format/detail/compat_workarounds.hpp" namespace boost { namespace io { template class CompatTraits { public: typedef Tr compatible_type; }; template class CompatAlloc { public: typedef Alloc compatible_type; }; } } # 28 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/format_fwd.hpp" 1 # 21 "/localhome/glisse2/include/boost/format/format_fwd.hpp" namespace boost { template , class Alloc = std::allocator > class basic_format; typedef basic_format format; typedef basic_format wformat; namespace io { enum format_error_bits { bad_format_string_bit = 1, too_few_args_bit = 2, too_many_args_bit = 4, out_of_range_bit = 8, all_error_bits = 255, no_error_bits=0 }; } } # 35 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/internals_fwd.hpp" 1 # 20 "/localhome/glisse2/include/boost/format/internals_fwd.hpp" namespace boost { namespace io { namespace detail { template struct stream_format_state; template struct format_item; template basic_format& modify_item_body (basic_format& self, int itemN, T manipulator); template basic_format& bind_arg_body (basic_format& self, int argN, const T& val); template void apply_manip_body (stream_format_state& self, T manipulator); template void distribute (basic_format& self, T x); template basic_format& feed (basic_format& self, T x); } } } # 36 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/internals.hpp" 1 # 19 "/localhome/glisse2/include/boost/format/internals.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 20 "/localhome/glisse2/include/boost/format/internals.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/alt_sstream.hpp" 1 # 21 "/localhome/glisse2/include/boost/format/alt_sstream.hpp" # 1 "/localhome/glisse2/include/boost/shared_ptr.hpp" 1 # 17 "/localhome/glisse2/include/boost/shared_ptr.hpp" # 1 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 1 # 27 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" # 1 "/localhome/glisse2/include/boost/config/no_tr1/memory.hpp" 1 # 28 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 30 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 1 "/localhome/glisse2/include/boost/throw_exception.hpp" 1 # 23 "/localhome/glisse2/include/boost/throw_exception.hpp" # 1 "/localhome/glisse2/include/boost/exception/detail/attribute_noreturn.hpp" 1 # 24 "/localhome/glisse2/include/boost/throw_exception.hpp" 2 # 37 "/localhome/glisse2/include/boost/throw_exception.hpp" # 1 "/localhome/glisse2/include/boost/exception/exception.hpp" 1 # 9 "/localhome/glisse2/include/boost/exception/exception.hpp" # 10 "/localhome/glisse2/include/boost/exception/exception.hpp" 3 namespace boost { namespace exception_detail { template class refcount_ptr { public: refcount_ptr(): px_(0) { } ~refcount_ptr() { release(); } refcount_ptr( refcount_ptr const & x ): px_(x.px_) { add_ref(); } refcount_ptr & operator=( refcount_ptr const & x ) { adopt(x.px_); return *this; } void adopt( T * px ) { release(); px_=px; add_ref(); } T * get() const { return px_; } private: T * px_; void add_ref() { if( px_ ) px_->add_ref(); } void release() { if( px_ && px_->release() ) px_=0; } }; } template class error_info; typedef error_info throw_function; typedef error_info throw_file; typedef error_info throw_line; template <> class error_info { public: typedef char const * value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; template <> class error_info { public: typedef char const * value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; template <> class error_info { public: typedef int value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; #pragma GCC visibility push (default) class exception; #pragma GCC visibility pop template class shared_ptr; namespace exception_detail { class error_info_base; struct type_info_; struct error_info_container { virtual char const * diagnostic_information( char const * ) const = 0; virtual shared_ptr get( type_info_ const & ) const = 0; virtual void set( shared_ptr const &, type_info_ const & ) = 0; virtual void add_ref() const = 0; virtual bool release() const = 0; virtual refcount_ptr clone() const = 0; protected: ~error_info_container() throw() { } }; template struct get_info; template <> struct get_info; template <> struct get_info; template <> struct get_info; char const * get_diagnostic_information( exception const &, char const * ); void copy_boost_exception( exception *, exception const * ); template E const & set_info( E const &, error_info const & ); template E const & set_info( E const &, throw_function const & ); template E const & set_info( E const &, throw_file const & ); template E const & set_info( E const &, throw_line const & ); } #pragma GCC visibility push (default) class exception { protected: exception(): throw_function_(0), throw_file_(0), throw_line_(-1) { } # 231 "/localhome/glisse2/include/boost/exception/exception.hpp" 3 virtual ~exception() throw() = 0 ; private: template friend E const & exception_detail::set_info( E const &, throw_function const & ); template friend E const & exception_detail::set_info( E const &, throw_file const & ); template friend E const & exception_detail::set_info( E const &, throw_line const & ); template friend E const & exception_detail::set_info( E const &, error_info const & ); friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); template friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend void exception_detail::copy_boost_exception( exception *, exception const * ); mutable exception_detail::refcount_ptr data_; mutable char const * throw_function_; mutable char const * throw_file_; mutable int throw_line_; }; #pragma GCC visibility pop inline exception:: ~exception() throw() { } namespace exception_detail { template E const & set_info( E const & x, throw_function const & y ) { x.throw_function_=y.v_; return x; } template E const & set_info( E const & x, throw_file const & y ) { x.throw_file_=y.v_; return x; } template E const & set_info( E const & x, throw_line const & y ) { x.throw_line_=y.v_; return x; } } namespace exception_detail { template struct error_info_injector: public T, public exception { explicit error_info_injector( T const & x ): T(x) { } ~error_info_injector() throw() { } }; struct large_size { char c[256]; }; large_size dispatch_boost_exception( exception const * ); struct small_size { }; small_size dispatch_boost_exception( void const * ); template struct enable_error_info_helper; template struct enable_error_info_helper { typedef T type; }; template struct enable_error_info_helper { typedef error_info_injector type; }; template struct enable_error_info_return_type { typedef typename enable_error_info_helper(0)))>::type type; }; } template inline typename exception_detail::enable_error_info_return_type::type enable_error_info( T const & x ) { typedef typename exception_detail::enable_error_info_return_type::type rt; return rt(x); } namespace exception_detail { class clone_base { public: virtual clone_base const * clone() const = 0; virtual void rethrow() const = 0; virtual ~clone_base() throw() { } }; inline void copy_boost_exception( exception * a, exception const * b ) { refcount_ptr data; if( error_info_container * d=b->data_.get() ) data = d->clone(); a->throw_file_ = b->throw_file_; a->throw_line_ = b->throw_line_; a->throw_function_ = b->throw_function_; a->data_ = data; } inline void copy_boost_exception( void *, void const * ) { } template class clone_impl: public T, public clone_base { public: explicit clone_impl( T const & x ): T(x) { copy_boost_exception(this,&x); } ~clone_impl() throw() { } private: clone_base const * clone() const { return new clone_impl(*this); } void rethrow() const { throw*this; } }; } template inline exception_detail::clone_impl enable_current_exception( T const & x ) { return exception_detail::clone_impl(x); } } # 38 "/localhome/glisse2/include/boost/throw_exception.hpp" 2 namespace boost { inline void throw_exception_assert_compatibility( std::exception const & ) { } template __attribute__((noreturn)) inline void throw_exception( E const & e ) { throw_exception_assert_compatibility(e); throw enable_current_exception(enable_error_info(e)); } namespace exception_detail { template __attribute__((noreturn)) void throw_exception_( E const & x, char const * current_function, char const * file, int line ) { boost::throw_exception( set_info( set_info( set_info( boost::enable_error_info(x), throw_function(current_function)), throw_file(file)), throw_line(line))); } } } # 32 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" 1 # 28 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" # 1 "/localhome/glisse2/include/boost/smart_ptr/bad_weak_ptr.hpp" 1 # 26 "/localhome/glisse2/include/boost/smart_ptr/bad_weak_ptr.hpp" namespace boost { # 39 "/localhome/glisse2/include/boost/smart_ptr/bad_weak_ptr.hpp" class bad_weak_ptr: public std::exception { public: virtual char const * what() const throw() { return "tr1::bad_weak_ptr"; } }; } # 29 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" 2 # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base.hpp" 1 # 21 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base.hpp" # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_has_sync.hpp" 1 # 22 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base.hpp" 2 # 33 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base.hpp" # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base_nt.hpp" 1 # 21 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base_nt.hpp" # 1 "/localhome/glisse2/include/boost/detail/sp_typeinfo.hpp" 1 # 111 "/localhome/glisse2/include/boost/detail/sp_typeinfo.hpp" namespace boost { namespace detail { typedef std::type_info sp_typeinfo; } } # 22 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base_nt.hpp" 2 namespace boost { namespace detail { class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); long use_count_; long weak_count_; public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() { } virtual void dispose() = 0; virtual void destroy() { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; void add_ref_copy() { ++use_count_; } bool add_ref_lock() { if( use_count_ == 0 ) return false; ++use_count_; return true; } void release() { if( --use_count_ == 0 ) { dispose(); weak_release(); } } void weak_add_ref() { ++weak_count_; } void weak_release() { if( --weak_count_ == 0 ) { destroy(); } } long use_count() const { return use_count_; } }; } } # 34 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_base.hpp" 2 # 30 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" 2 # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 1 # 38 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_impl.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 39 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_impl.hpp" 2 namespace boost { # 50 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_impl.hpp" namespace detail { template class sp_counted_impl_p: public sp_counted_base { private: X * px_; sp_counted_impl_p( sp_counted_impl_p const & ); sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); typedef sp_counted_impl_p this_type; public: explicit sp_counted_impl_p( X * px ): px_( px ) { } virtual void dispose() { boost::checked_delete( px_ ); } virtual void * get_deleter( detail::sp_typeinfo const & ) { return 0; } # 113 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_impl.hpp" }; # 122 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_impl.hpp" template class sp_counted_impl_pd: public sp_counted_base { private: P ptr; D del; sp_counted_impl_pd( sp_counted_impl_pd const & ); sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); typedef sp_counted_impl_pd this_type; public: sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d ) { } sp_counted_impl_pd( P p ): ptr( p ), del() { } virtual void dispose() { del( ptr ); } virtual void * get_deleter( detail::sp_typeinfo const & ti ) { return ti == typeid(D)? &reinterpret_cast( del ): 0; } # 183 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_counted_impl.hpp" }; template class sp_counted_impl_pda: public sp_counted_base { private: P p_; D d_; A a_; sp_counted_impl_pda( sp_counted_impl_pda const & ); sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); typedef sp_counted_impl_pda this_type; public: sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a ) { } sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a ) { } virtual void dispose() { d_( p_ ); } virtual void destroy() { typedef typename A::template rebind< this_type >::other A2; A2 a2( a_ ); this->~this_type(); a2.deallocate( this, 1 ); } virtual void * get_deleter( detail::sp_typeinfo const & ti ) { return ti == typeid(D)? &reinterpret_cast( d_ ): 0; } }; } } # 31 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" 2 # 40 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" namespace boost { namespace detail { # 53 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" struct sp_nothrow_tag {}; template< class D > struct sp_inplace_tag { }; class weak_count; class shared_count { private: sp_counted_base * pi_; friend class weak_count; public: shared_count(): pi_(0) { } template explicit shared_count( Y * p ): pi_( 0 ) { try { pi_ = new sp_counted_impl_p( p ); } catch(...) { boost::checked_delete( p ); throw; } # 110 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" } template shared_count( P p, D d ): pi_(0) { try { pi_ = new sp_counted_impl_pd(p, d); } catch(...) { d(p); throw; } # 147 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" } template< class P, class D > shared_count( P p, sp_inplace_tag ): pi_( 0 ) { try { pi_ = new sp_counted_impl_pd< P, D >( p ); } catch( ... ) { D()( p ); throw; } # 179 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" } template shared_count( P p, D d, A a ): pi_( 0 ) { typedef sp_counted_impl_pda impl_type; typedef typename A::template rebind< impl_type >::other A2; A2 a2( a ); try { pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); } catch(...) { d( p ); if( pi_ != 0 ) { a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); } throw; } # 227 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" } template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) { typedef sp_counted_impl_pda< P, D, A > impl_type; typedef typename A::template rebind< impl_type >::other A2; A2 a2( a ); try { pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); new( static_cast< void* >( pi_ ) ) impl_type( p, a ); } catch(...) { D()( p ); if( pi_ != 0 ) { a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); } throw; } # 275 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" } template explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) { # 298 "/localhome/glisse2/include/boost/smart_ptr/detail/shared_count.hpp" r.release(); } ~shared_count() { if( pi_ != 0 ) pi_->release(); } shared_count(shared_count const & r): pi_(r.pi_) { if( pi_ != 0 ) pi_->add_ref_copy(); } shared_count(shared_count && r): pi_(r.pi_) { r.pi_ = 0; } explicit shared_count(weak_count const & r); shared_count( weak_count const & r, sp_nothrow_tag ); shared_count & operator= (shared_count const & r) { sp_counted_base * tmp = r.pi_; if( tmp != pi_ ) { if( tmp != 0 ) tmp->add_ref_copy(); if( pi_ != 0 ) pi_->release(); pi_ = tmp; } return *this; } void swap(shared_count & r) { sp_counted_base * tmp = r.pi_; r.pi_ = pi_; pi_ = tmp; } long use_count() const { return pi_ != 0? pi_->use_count(): 0; } bool unique() const { return use_count() == 1; } bool empty() const { return pi_ == 0; } friend inline bool operator==(shared_count const & a, shared_count const & b) { return a.pi_ == b.pi_; } friend inline bool operator<(shared_count const & a, shared_count const & b) { return std::less()( a.pi_, b.pi_ ); } void * get_deleter( sp_typeinfo const & ti ) const { return pi_? pi_->get_deleter( ti ): 0; } }; class weak_count { private: sp_counted_base * pi_; friend class shared_count; public: weak_count(): pi_(0) { } weak_count(shared_count const & r): pi_(r.pi_) { if(pi_ != 0) pi_->weak_add_ref(); } weak_count(weak_count const & r): pi_(r.pi_) { if(pi_ != 0) pi_->weak_add_ref(); } weak_count(weak_count && r): pi_(r.pi_) { r.pi_ = 0; } ~weak_count() { if(pi_ != 0) pi_->weak_release(); } weak_count & operator= (shared_count const & r) { sp_counted_base * tmp = r.pi_; if( tmp != pi_ ) { if(tmp != 0) tmp->weak_add_ref(); if(pi_ != 0) pi_->weak_release(); pi_ = tmp; } return *this; } weak_count & operator= (weak_count const & r) { sp_counted_base * tmp = r.pi_; if( tmp != pi_ ) { if(tmp != 0) tmp->weak_add_ref(); if(pi_ != 0) pi_->weak_release(); pi_ = tmp; } return *this; } void swap(weak_count & r) { sp_counted_base * tmp = r.pi_; r.pi_ = pi_; pi_ = tmp; } long use_count() const { return pi_ != 0? pi_->use_count(): 0; } bool empty() const { return pi_ == 0; } friend inline bool operator==(weak_count const & a, weak_count const & b) { return a.pi_ == b.pi_; } friend inline bool operator<(weak_count const & a, weak_count const & b) { return std::less()(a.pi_, b.pi_); } }; inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) { if( pi_ == 0 || !pi_->add_ref_lock() ) { boost::throw_exception( boost::bad_weak_ptr() ); } } inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) { if( pi_ != 0 && !pi_->add_ref_lock() ) { pi_ = 0; } } } } # 33 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_convertible.hpp" 1 # 34 "/localhome/glisse2/include/boost/smart_ptr/detail/sp_convertible.hpp" namespace boost { namespace detail { template< class Y, class T > struct sp_convertible { typedef char (&yes) [1]; typedef char (&no) [2]; static yes f( T* ); static no f( ... ); enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; }; struct sp_empty { }; template< bool > struct sp_enable_if_convertible_impl; template<> struct sp_enable_if_convertible_impl { typedef sp_empty type; }; template<> struct sp_enable_if_convertible_impl { }; template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > { }; } } # 35 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock_pool.hpp" 1 # 25 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock_pool.hpp" # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock.hpp" 1 # 41 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock.hpp" # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock_sync.hpp" 1 # 18 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock_sync.hpp" # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/yield_k.hpp" 1 # 133 "/localhome/glisse2/include/boost/smart_ptr/detail/yield_k.hpp" namespace boost { namespace detail { inline void yield( unsigned ) { } } } # 19 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock_sync.hpp" 2 namespace boost { namespace detail { class spinlock { public: int v_; public: bool try_lock() { int r = __sync_lock_test_and_set( &v_, 1 ); return r == 0; } void lock() { for( unsigned k = 0; !try_lock(); ++k ) { boost::detail::yield( k ); } } void unlock() { __sync_lock_release( &v_ ); } public: class scoped_lock { private: spinlock & sp_; scoped_lock( scoped_lock const & ); scoped_lock & operator=( scoped_lock const & ); public: explicit scoped_lock( spinlock & sp ): sp_( sp ) { sp.lock(); } ~scoped_lock() { sp_.unlock(); } }; }; } } # 42 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock.hpp" 2 # 26 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock_pool.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 27 "/localhome/glisse2/include/boost/smart_ptr/detail/spinlock_pool.hpp" 2 namespace boost { namespace detail { template< int I > class spinlock_pool { private: static spinlock pool_[ 41 ]; public: static spinlock & spinlock_for( void const * pv ) { std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; return pool_[ i ]; } class scoped_lock { private: spinlock & sp_; scoped_lock( scoped_lock const & ); scoped_lock & operator=( scoped_lock const & ); public: explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) { sp_.lock(); } ~scoped_lock() { sp_.unlock(); } }; }; template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = { {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0} }; } } # 38 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 1 "/localhome/glisse2/include/boost/memory_order.hpp" 1 # 21 "/localhome/glisse2/include/boost/memory_order.hpp" namespace boost { # 41 "/localhome/glisse2/include/boost/memory_order.hpp" enum memory_order { memory_order_relaxed = 0, memory_order_acquire = 1, memory_order_release = 2, memory_order_acq_rel = 3, memory_order_seq_cst = 7, memory_order_consume = 8 }; } # 39 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 45 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 # 54 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" namespace boost { template class shared_ptr; template class weak_ptr; template class enable_shared_from_this; template class enable_shared_from_this2; namespace detail { struct static_cast_tag {}; struct const_cast_tag {}; struct dynamic_cast_tag {}; struct polymorphic_cast_tag {}; template struct shared_ptr_traits { typedef T & reference; }; template<> struct shared_ptr_traits { typedef void reference; }; template<> struct shared_ptr_traits { typedef void reference; }; template<> struct shared_ptr_traits { typedef void reference; }; template<> struct shared_ptr_traits { typedef void reference; }; template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) { if( pe != 0 ) { pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); } } template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe ) { if( pe != 0 ) { pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); } } # 132 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" inline void sp_enable_shared_from_this( ... ) { } template< class T, class R > struct sp_enable_if_auto_ptr { }; template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > { typedef R type; }; } # 164 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" template class shared_ptr { private: typedef shared_ptr this_type; public: typedef T element_type; typedef T value_type; typedef T * pointer; typedef typename boost::detail::shared_ptr_traits::reference reference; shared_ptr(): px(0), pn() { } template explicit shared_ptr( Y * p ): px( p ), pn( p ) { boost::detail::sp_enable_shared_from_this( this, p, p ); } template shared_ptr(Y * p, D d): px(p), pn(p, d) { boost::detail::sp_enable_shared_from_this( this, p, p ); } template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) { boost::detail::sp_enable_shared_from_this( this, p, p ); } shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) { } template explicit shared_ptr(weak_ptr const & r): pn(r.pn) { px = r.px; } template shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) { if( !pn.empty() ) { px = r.px; } } template shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) : px( r.px ), pn( r.pn ) { } template< class Y > shared_ptr( shared_ptr const & r, T * p ): px( p ), pn( r.pn ) { } template shared_ptr(shared_ptr const & r, boost::detail::static_cast_tag): px(static_cast(r.px)), pn(r.pn) { } template shared_ptr(shared_ptr const & r, boost::detail::const_cast_tag): px(const_cast(r.px)), pn(r.pn) { } template shared_ptr(shared_ptr const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) { if(px == 0) { pn = boost::detail::shared_count(); } } template shared_ptr(shared_ptr const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) { if(px == 0) { boost::throw_exception(std::bad_cast()); } } template explicit shared_ptr(std::auto_ptr & r): px(r.get()), pn() { Y * tmp = r.get(); pn = boost::detail::shared_count(r); boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); } template explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() { typename Ap::element_type * tmp = r.get(); pn = boost::detail::shared_count( r ); boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); } # 309 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" shared_ptr & operator=( shared_ptr const & r ) { this_type(r).swap(*this); return *this; } template shared_ptr & operator=(shared_ptr const & r) { this_type(r).swap(*this); return *this; } template shared_ptr & operator=( std::auto_ptr & r ) { this_type(r).swap(*this); return *this; } template typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) { this_type( r ).swap( *this ); return *this; } # 353 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" shared_ptr( shared_ptr && r ): px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; } template shared_ptr( shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) : px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; } shared_ptr & operator=( shared_ptr && r ) { this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; } template shared_ptr & operator=( shared_ptr && r ) { this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; } void reset() { this_type().swap(*this); } template void reset(Y * p) { ((p == 0 || p != px) ? static_cast (0) : __assert_fail ("p == 0 || p != px", "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp", 397, __PRETTY_FUNCTION__)); this_type(p).swap(*this); } template void reset( Y * p, D d ) { this_type( p, d ).swap( *this ); } template void reset( Y * p, D d, A a ) { this_type( p, d, a ).swap( *this ); } template void reset( shared_ptr const & r, T * p ) { this_type( r, p ).swap( *this ); } reference operator* () const { ((px != 0) ? static_cast (0) : __assert_fail ("px != 0", "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp", 418, __PRETTY_FUNCTION__)); return *px; } T * operator-> () const { ((px != 0) ? static_cast (0) : __assert_fail ("px != 0", "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp", 424, __PRETTY_FUNCTION__)); return px; } T * get() const { return px; } # 1 "/localhome/glisse2/include/boost/smart_ptr/detail/operator_bool.hpp" 1 # 43 "/localhome/glisse2/include/boost/smart_ptr/detail/operator_bool.hpp" typedef T * this_type::*unspecified_bool_type; operator unspecified_bool_type() const { return px == 0? 0: &this_type::px; } bool operator! () const { return px == 0; } # 435 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" 2 bool unique() const { return pn.unique(); } long use_count() const { return pn.use_count(); } void swap(shared_ptr & other) { std::swap(px, other.px); pn.swap(other.pn); } template bool _internal_less(shared_ptr const & rhs) const { return pn < rhs.pn; } void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const { return pn.get_deleter( ti ); } bool _internal_equiv( shared_ptr const & r ) const { return px == r.px && pn == r.pn; } private: template friend class shared_ptr; template friend class weak_ptr; T * px; boost::detail::shared_count pn; }; template inline bool operator==(shared_ptr const & a, shared_ptr const & b) { return a.get() == b.get(); } template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) { return a.get() != b.get(); } # 506 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" template inline bool operator<(shared_ptr const & a, shared_ptr const & b) { return a._internal_less(b); } template inline void swap(shared_ptr & a, shared_ptr & b) { a.swap(b); } template shared_ptr static_pointer_cast(shared_ptr const & r) { return shared_ptr(r, boost::detail::static_cast_tag()); } template shared_ptr const_pointer_cast(shared_ptr const & r) { return shared_ptr(r, boost::detail::const_cast_tag()); } template shared_ptr dynamic_pointer_cast(shared_ptr const & r) { return shared_ptr(r, boost::detail::dynamic_cast_tag()); } template shared_ptr shared_static_cast(shared_ptr const & r) { return shared_ptr(r, boost::detail::static_cast_tag()); } template shared_ptr shared_dynamic_cast(shared_ptr const & r) { return shared_ptr(r, boost::detail::dynamic_cast_tag()); } template shared_ptr shared_polymorphic_cast(shared_ptr const & r) { return shared_ptr(r, boost::detail::polymorphic_cast_tag()); } template shared_ptr shared_polymorphic_downcast(shared_ptr const & r) { ((dynamic_cast(r.get()) == r.get()) ? static_cast (0) : __assert_fail ("dynamic_cast(r.get()) == r.get()", "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp", 550, __PRETTY_FUNCTION__)); return shared_static_cast(r); } template inline T * get_pointer(shared_ptr const & p) { return p.get(); } # 583 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) { os << p.get(); return os; } # 613 "/localhome/glisse2/include/boost/smart_ptr/shared_ptr.hpp" template D * get_deleter(shared_ptr const & p) { return static_cast(p._internal_get_deleter(typeid(D))); } template inline bool atomic_is_lock_free( shared_ptr const * ) { return false; } template shared_ptr atomic_load( shared_ptr const * p ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); return *p; } template inline shared_ptr atomic_load_explicit( shared_ptr const * p, memory_order ) { return atomic_load( p ); } template void atomic_store( shared_ptr * p, shared_ptr r ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); p->swap( r ); } template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, memory_order ) { atomic_store( p, r ); } template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); sp.lock(); p->swap( r ); sp.unlock(); return r; } template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, memory_order ) { return atomic_exchange( p, r ); } template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); sp.lock(); if( p->_internal_equiv( *v ) ) { p->swap( w ); sp.unlock(); return true; } else { shared_ptr tmp( *p ); sp.unlock(); tmp.swap( *v ); return false; } } template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, memory_order , memory_order ) { return atomic_compare_exchange( p, v, w ); } template< class T > struct hash; template< class T > std::size_t hash_value( boost::shared_ptr const & p ) { return boost::hash< T* >()( p.get() ); } } # 18 "/localhome/glisse2/include/boost/shared_ptr.hpp" 2 # 22 "/localhome/glisse2/include/boost/format/alt_sstream.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 23 "/localhome/glisse2/include/boost/format/alt_sstream.hpp" 2 namespace boost { namespace io { template, class Alloc=::std::allocator > class basic_altstringbuf; template, class Alloc=::std::allocator > class basic_oaltstringstream; template class basic_altstringbuf : public ::std::basic_streambuf { typedef ::std::basic_streambuf streambuf_t; typedef typename CompatAlloc::compatible_type compat_allocator_type; typedef typename CompatTraits::compatible_type compat_traits_type; public: typedef Ch char_type; typedef Tr traits_type; typedef typename compat_traits_type::int_type int_type; typedef typename compat_traits_type::pos_type pos_type; typedef typename compat_traits_type::off_type off_type; typedef Alloc allocator_type; typedef ::std::basic_string string_type; typedef typename string_type::size_type size_type; typedef ::std::streamsize streamsize; explicit basic_altstringbuf(std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) : putend_(__null), is_allocated_(false), mode_(mode) {} explicit basic_altstringbuf(const string_type& s, ::std::ios_base::openmode mode = ::std::ios_base::in | ::std::ios_base::out) : putend_(__null), is_allocated_(false), mode_(mode) { dealloc(); str(s); } virtual ~basic_altstringbuf() { dealloc(); } using streambuf_t::pbase; using streambuf_t::pptr; using streambuf_t::epptr; using streambuf_t::eback; using streambuf_t::gptr; using streambuf_t::egptr; void clear_buffer(); void str(const string_type& s); Ch * begin() const; size_type size() const; size_type cur_size() const; Ch * pend() const { return ((putend_ < pptr()) ? pptr() : putend_); } size_type pcount() const { return static_cast( pptr() - pbase()) ;} string_type str() const { return string_type(begin(), size()); } string_type cur_str() const { return string_type(begin(), cur_size()); } protected: explicit basic_altstringbuf (basic_altstringbuf * s, ::std::ios_base::openmode mode = ::std::ios_base::in | ::std::ios_base::out) : putend_(__null), is_allocated_(false), mode_(mode) { dealloc(); str(s); } virtual pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which = ::std::ios_base::in | ::std::ios_base::out); virtual pos_type seekpos (pos_type pos, ::std::ios_base::openmode which = ::std::ios_base::in | ::std::ios_base::out); virtual int_type underflow(); virtual int_type pbackfail(int_type meta = compat_traits_type::eof()); virtual int_type overflow(int_type meta = compat_traits_type::eof()); void dealloc(); private: enum { alloc_min = 256}; Ch *putend_; bool is_allocated_; ::std::ios_base::openmode mode_; compat_allocator_type alloc_; }; template class basic_oaltstringstream : private base_from_member< shared_ptr< basic_altstringbuf< Ch, Tr, Alloc> > >, public ::std::basic_ostream { class No_Op { public: template const T & operator()(const T & arg) { return arg; } }; typedef ::std::basic_ostream stream_t; typedef boost::base_from_member > > pbase_type; typedef ::std::basic_string string_type; typedef typename string_type::size_type size_type; typedef basic_altstringbuf stringbuf_t; public: typedef Alloc allocator_type; basic_oaltstringstream() : pbase_type(new stringbuf_t), stream_t(rdbuf()) { } basic_oaltstringstream(::boost::shared_ptr buf) : pbase_type(buf), stream_t(rdbuf()) { } basic_oaltstringstream(stringbuf_t * buf) : pbase_type(buf, No_Op() ), stream_t(rdbuf()) { } stringbuf_t * rdbuf() const { return pbase_type::member.get(); } void clear_buffer() { rdbuf()->clear_buffer(); } Ch * begin() const { return rdbuf()->begin(); } size_type size() const { return rdbuf()->size(); } size_type cur_size() const { return rdbuf()->cur_size(); } string_type str() const { return rdbuf()->str(); } string_type cur_str() const { return rdbuf()->cur_str(); } void str(const string_type& s) { rdbuf()->str(s); } }; } } # 1 "/localhome/glisse2/include/boost/format/alt_sstream_impl.hpp" 1 # 16 "/localhome/glisse2/include/boost/format/alt_sstream_impl.hpp" namespace boost { namespace io { template void basic_altstringbuf:: clear_buffer () { const Ch * p = pptr(); const Ch * b = pbase(); if(p != __null && p != b) { seekpos(0, ::std::ios_base::out); } p = gptr(); b = eback(); if(p != __null && p != b) { seekpos(0, ::std::ios_base::in); } } template void basic_altstringbuf:: str (const string_type& s) { size_type sz=s.size(); if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) { Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0); dealloc(); sz = s.copy(new_ptr, sz); putend_ = new_ptr + sz; if(mode_ & ::std::ios_base::in) streambuf_t::setg(new_ptr, new_ptr, new_ptr + sz); if(mode_ & ::std::ios_base::out) { streambuf_t::setp(new_ptr, new_ptr + sz); if(mode_ & (::std::ios_base::app | ::std::ios_base::ate)) streambuf_t::pbump(static_cast(sz)); if(gptr() == __null) streambuf_t::setg(new_ptr, __null, new_ptr); } is_allocated_ = true; } else dealloc(); } template Ch* basic_altstringbuf:: begin () const { if(mode_ & ::std::ios_base::out && pptr() != __null) return pbase(); else if(mode_ & ::std::ios_base::in && gptr() != __null) return eback(); return __null; } template typename std::basic_string::size_type basic_altstringbuf:: size () const { if(mode_ & ::std::ios_base::out && pptr()) return static_cast(pend() - pbase()); else if(mode_ & ::std::ios_base::in && gptr()) return static_cast(egptr() - eback()); else return 0; } template typename std::basic_string::size_type basic_altstringbuf:: cur_size () const { if(mode_ & ::std::ios_base::out && pptr()) return static_cast( pptr() - pbase()); else if(mode_ & ::std::ios_base::in && gptr()) return static_cast( gptr() - eback()); else return 0; } template typename basic_altstringbuf::pos_type basic_altstringbuf:: seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { if(pptr() != __null && putend_ < pptr()) putend_ = pptr(); if(which & ::std::ios_base::in && gptr() != __null) { if(way == ::std::ios_base::end) off += static_cast(putend_ - gptr()); else if(way == ::std::ios_base::beg) off += static_cast(eback() - gptr()); else if(way != ::std::ios_base::cur || (which & ::std::ios_base::out) ) return pos_type(off_type(-1)); if(eback() <= off+gptr() && off+gptr() <= putend_ ) { streambuf_t::gbump(static_cast(off)); if(which & ::std::ios_base::out && pptr() != __null) streambuf_t::pbump(static_cast(gptr()-pptr())); } else off = off_type(-1); } else if(which & ::std::ios_base::out && pptr() != __null) { if(way == ::std::ios_base::end) off += static_cast(putend_ - pptr()); else if(way == ::std::ios_base::beg) off += static_cast(pbase() - pptr()); else if(way != ::std::ios_base::beg) return pos_type(off_type(-1)); if(pbase() <= off+pptr() && off+pptr() <= putend_) streambuf_t::pbump(static_cast(off)); else off = off_type(-1); } else off = off_type(-1); return (pos_type(off)); } template typename basic_altstringbuf::pos_type basic_altstringbuf:: seekpos (pos_type pos, ::std::ios_base::openmode which) { off_type off = off_type(pos); if(pptr() != __null && putend_ < pptr()) putend_ = pptr(); if(off != off_type(-1)) { if(which & ::std::ios_base::in && gptr() != __null) { if(0 <= off && off <= putend_ - eback()) { streambuf_t::gbump(static_cast(eback() - gptr() + off)); if(which & ::std::ios_base::out && pptr() != __null) { streambuf_t::pbump(static_cast(gptr()-pptr())); } } else off = off_type(-1); } else if(which & ::std::ios_base::out && pptr() != __null) { if(0 <= off && off <= putend_ - eback()) streambuf_t::pbump(static_cast(eback() - pptr() + off)); else off = off_type(-1); } else off = off_type(-1); return (pos_type(off)); } else { ((0) ? static_cast (0) : __assert_fail ("0", "/localhome/glisse2/include/boost/format/alt_sstream_impl.hpp", 176, __PRETTY_FUNCTION__)); return pos_type(off_type(-1)); } } template typename basic_altstringbuf::int_type basic_altstringbuf:: underflow () { if(gptr() == __null) return (compat_traits_type::eof()); else if(gptr() < egptr()) return (compat_traits_type::to_int_type(*gptr())); else if(mode_ & ::std::ios_base::in && pptr() != __null && (gptr() < pptr() || gptr() < putend_) ) { if(putend_ < pptr()) putend_ = pptr(); streambuf_t::setg(eback(), gptr(), putend_); return (compat_traits_type::to_int_type(*gptr())); } else return (compat_traits_type::eof()); } template typename basic_altstringbuf::int_type basic_altstringbuf:: pbackfail (int_type meta) { if(gptr() != __null && (eback() < gptr()) && (mode_ & (::std::ios_base::out) || compat_traits_type::eq_int_type(compat_traits_type::eof(), meta) || compat_traits_type::eq(compat_traits_type::to_char_type(meta), gptr()[-1]) ) ) { streambuf_t::gbump(-1); if(!compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) *gptr() = compat_traits_type::to_char_type(meta); return (compat_traits_type::not_eof(meta)); } else return (compat_traits_type::eof()); } template typename basic_altstringbuf::int_type basic_altstringbuf:: overflow (int_type meta) { if(compat_traits_type::eq_int_type(compat_traits_type::eof(), meta)) return compat_traits_type::not_eof(meta); else if(pptr() != __null && pptr() < epptr()) { streambuf_t::sputc(compat_traits_type::to_char_type(meta)); return meta; } else if(! (mode_ & ::std::ios_base::out)) return compat_traits_type::eof(); else { std::size_t prev_size = pptr() == __null ? 0 : epptr() - eback(); std::size_t new_size = prev_size; std::size_t add_size = new_size / 2; if(add_size < alloc_min) add_size = alloc_min; Ch * newptr = __null, *oldptr = eback(); while (0 < add_size && ((std::numeric_limits::max)() - add_size < new_size) ) add_size /= 2; if(0 < add_size) { new_size += add_size; newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); } if(0 < prev_size) compat_traits_type::copy(newptr, oldptr, prev_size); if(is_allocated_) alloc_.deallocate(oldptr, prev_size); is_allocated_=true; if(prev_size == 0) { putend_ = newptr; streambuf_t::setp(newptr, newptr + new_size); if(mode_ & ::std::ios_base::in) streambuf_t::setg(newptr, newptr, newptr + 1); else streambuf_t::setg(newptr, 0, newptr); } else { putend_ = putend_ - oldptr + newptr; int pptr_count = static_cast(pptr()-pbase()); int gptr_count = static_cast(gptr()-eback()); streambuf_t::setp(pbase() - oldptr + newptr, newptr + new_size); streambuf_t::pbump(pptr_count); if(mode_ & ::std::ios_base::in) streambuf_t::setg(newptr, newptr + gptr_count, pptr() + 1); else streambuf_t::setg(newptr, 0, newptr); } streambuf_t::sputc(compat_traits_type::to_char_type(meta)); return meta; } } template void basic_altstringbuf:: dealloc() { if(is_allocated_) alloc_.deallocate(eback(), (pptr() != __null ? epptr() : egptr()) - eback()); is_allocated_ = false; streambuf_t::setg(0, 0, 0); streambuf_t::setp(0, 0); putend_ = __null; } } } # 174 "/localhome/glisse2/include/boost/format/alt_sstream.hpp" 2 # 24 "/localhome/glisse2/include/boost/format/internals.hpp" 2 namespace boost { namespace io { namespace detail { template struct stream_format_state { typedef ::std:: basic_ios basic_ios; stream_format_state(Ch fill) { reset(fill); } void reset(Ch fill); void set_by_stream(const basic_ios& os); void apply_on(basic_ios & os, boost::io::detail::locale_t * loc_default = 0) const; template void apply_manip(T manipulator) { apply_manip_body( *this, manipulator) ; } std::streamsize width_; std::streamsize precision_; Ch fill_; std::ios_base::fmtflags flags_; std::ios_base::iostate rdstate_; std::ios_base::iostate exceptions_; boost::optional loc_; }; template struct format_item { enum pad_values { zeropad = 1, spacepad =2, centered=4, tabulation = 8 }; enum arg_values { argN_no_posit = -1, argN_tabulation = -2, argN_ignored = -3 }; typedef ::std:: basic_ios basic_ios; typedef detail::stream_format_state stream_format_state; typedef ::std::basic_string string_type; format_item(Ch fill) :argN_(argN_no_posit), fmtstate_(fill), truncate_(max_streamsize()), pad_scheme_(0) {} void reset(Ch fill); void compute_states(); static std::streamsize max_streamsize() { return (std::numeric_limits::max)(); } int argN_; string_type res_; string_type appendix_; stream_format_state fmtstate_; std::streamsize truncate_; unsigned int pad_scheme_; }; template void stream_format_state:: apply_on (basic_ios & os, boost::io::detail::locale_t * loc_default) const { if(width_ != -1) os.width(width_); if(precision_ != -1) os.precision(precision_); if(fill_ != 0) os.fill(fill_); os.flags(flags_); os.clear(rdstate_); os.exceptions(exceptions_); if(loc_) os.imbue(loc_.get()); else if(loc_default) os.imbue(*loc_default); } template void stream_format_state:: set_by_stream(const basic_ios& os) { flags_ = os.flags(); width_ = os.width(); precision_ = os.precision(); fill_ = os.fill(); rdstate_ = os.rdstate(); exceptions_ = os.exceptions(); } template void apply_manip_body( stream_format_state& self, T manipulator) { basic_oaltstringstream ss; self.apply_on( ss ); ss << manipulator; self.set_by_stream( ss ); } template inline void stream_format_state:: reset(Ch fill) { width_=0; precision_=6; fill_=fill; flags_ = std::ios_base::dec | std::ios_base::skipws; exceptions_ = std::ios_base::goodbit; rdstate_ = std::ios_base::goodbit; } template void format_item:: reset (Ch fill) { argN_=argN_no_posit; truncate_ = max_streamsize(); pad_scheme_ =0; res_.resize(0); appendix_.resize(0); fmtstate_.reset(fill); } template void format_item:: compute_states() { if(pad_scheme_ & zeropad) { if(fmtstate_.flags_ & std::ios_base::left) { ((!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))) ? static_cast (0) : __assert_fail ("!(fmtstate_.flags_ &(std::ios_base::adjustfield ^std::ios_base::left))", "/localhome/glisse2/include/boost/format/internals.hpp", 179, __PRETTY_FUNCTION__)); pad_scheme_ = pad_scheme_ & (~zeropad); } else { pad_scheme_ &= ~spacepad; fmtstate_.fill_='0'; fmtstate_.flags_ = (fmtstate_.flags_ & ~std::ios_base::adjustfield) | std::ios_base::internal; } } if(pad_scheme_ & spacepad) { if(fmtstate_.flags_ & std::ios_base::showpos) pad_scheme_ &= ~spacepad; } } } } } # 39 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/format_class.hpp" 1 # 27 "/localhome/glisse2/include/boost/format/format_class.hpp" namespace boost { template class basic_format { typedef typename io::CompatTraits::compatible_type compat_traits; public: typedef Ch CharT; typedef std::basic_string string_type; typedef typename string_type::size_type size_type; typedef io::detail::format_item format_item_t; typedef io::basic_altstringbuf internal_streambuf_t; explicit basic_format(const Ch* str=__null); explicit basic_format(const string_type& s); basic_format(const basic_format& x); basic_format& operator= (const basic_format& x); void swap(basic_format& x); explicit basic_format(const Ch* str, const std::locale & loc); explicit basic_format(const string_type& s, const std::locale & loc); io::detail::locale_t getloc() const; basic_format& clear(); basic_format& clear_binds(); basic_format& parse(const string_type&); size_type size() const; string_type str() const; template basic_format& operator%(const T& x) { return io::detail::feed(*this,x); } template basic_format& operator%(T& x) { return io::detail::feed(*this,x); } basic_format& operator%(const int& x) { return io::detail::feed(*this,x); } basic_format& operator%(int& x) { return io::detail::feed(*this,x); } int expected_args() const { return num_args_; } int bound_args() const; int fed_args() const; int cur_arg() const; int remaining_args() const; template basic_format& bind_arg(int argN, const T& val) { return io::detail::bind_arg_body(*this, argN, val); } basic_format& clear_bind(int argN); template basic_format& modify_item(int itemN, T manipulator) { return io::detail::modify_item_body (*this, itemN, manipulator);} unsigned char exceptions() const; unsigned char exceptions(unsigned char newexcept); # 116 "/localhome/glisse2/include/boost/format/format_class.hpp" template friend std::basic_ostream & operator<<( std::basic_ostream & , const basic_format& ); template friend basic_format& io::detail::feed (basic_format&, T); template friend void io::detail::distribute (basic_format&, T); template friend basic_format& io::detail::modify_item_body (basic_format&, int, T); template friend basic_format& io::detail::bind_arg_body (basic_format&, int, const T&); private: typedef io::detail::stream_format_state stream_format_state; enum style_values { ordered = 1, special_needs = 4 }; void make_or_reuse_data(std::size_t nbitems); std::vector items_; std::vector bound_; int style_; int cur_arg_; int num_args_; mutable bool dumped_; string_type prefix_; unsigned char exceptions_; internal_streambuf_t buf_; boost::optional loc_; }; } # 42 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/exceptions.hpp" 1 # 23 "/localhome/glisse2/include/boost/format/exceptions.hpp" namespace boost { namespace io { class format_error : public std::exception { public: format_error() {} virtual const char *what() const throw() { return "boost::format_error: " "format generic failure"; } }; class bad_format_string : public format_error { std::size_t pos_, next_; public: bad_format_string(std::size_t pos, std::size_t size) : pos_(pos), next_(size) {} std::size_t get_pos() const { return pos_; } std::size_t get_next() const { return next_; } virtual const char *what() const throw() { return "boost::bad_format_string: format-string is ill-formed"; } }; class too_few_args : public format_error { std::size_t cur_, expected_; public: too_few_args(std::size_t cur, std::size_t expected) : cur_(cur), expected_(expected) {} std::size_t get_cur() const { return cur_; } std::size_t get_expected() const { return expected_; } virtual const char *what() const throw() { return "boost::too_few_args: " "format-string referred to more arguments than were passed"; } }; class too_many_args : public format_error { std::size_t cur_, expected_; public: too_many_args(std::size_t cur, std::size_t expected) : cur_(cur), expected_(expected) {} std::size_t get_cur() const { return cur_; } std::size_t get_expected() const { return expected_; } virtual const char *what() const throw() { return "boost::too_many_args: " "format-string referred to less arguments than were passed"; } }; class out_of_range : public format_error { int index_, beg_, end_; public: out_of_range(int index, int beg, int end) : index_(index), beg_(beg), end_(end) {} int get_index() const { return index_; } int get_beg() const { return beg_; } int get_end() const { return end_; } virtual const char *what() const throw() { return "boost::out_of_range: " "tried to refer to an argument (or item) number which" " is out of range, according to the format string"; } }; } } # 45 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/format_implementation.hpp" 1 # 19 "/localhome/glisse2/include/boost/format/format_implementation.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 20 "/localhome/glisse2/include/boost/format/format_implementation.hpp" 2 namespace boost { template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const Ch* s) : style_(0), cur_arg_(0), num_args_(0), dumped_(false), exceptions_(io::all_error_bits) { if( s) parse( s ); } template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const Ch* s, const std::locale & loc) : style_(0), cur_arg_(0), num_args_(0), dumped_(false), exceptions_(io::all_error_bits), loc_(loc) { if(s) parse( s ); } template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const string_type& s, const std::locale & loc) : style_(0), cur_arg_(0), num_args_(0), dumped_(false), exceptions_(io::all_error_bits), loc_(loc) { parse(s); } template< class Ch, class Tr, class Alloc> io::detail::locale_t basic_format:: getloc() const { return loc_ ? loc_.get() : io::detail::locale_t(); } template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const string_type& s) : style_(0), cur_arg_(0), num_args_(0), dumped_(false), exceptions_(io::all_error_bits) { parse(s); } template< class Ch, class Tr, class Alloc> basic_format:: basic_format(const basic_format& x) : items_(x.items_), bound_(x.bound_), style_(x.style_), cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(x.dumped_), prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_) { } template< class Ch, class Tr, class Alloc> basic_format& basic_format:: operator= (const basic_format& x) { if(this == &x) return *this; (basic_format(x)).swap(*this); return *this; } template< class Ch, class Tr, class Alloc> void basic_format:: swap (basic_format & x) { std::swap(exceptions_, x.exceptions_); std::swap(style_, x.style_); std::swap(cur_arg_, x.cur_arg_); std::swap(num_args_, x.num_args_); std::swap(dumped_, x.dumped_); items_.swap(x.items_); prefix_.swap(x.prefix_); bound_.swap(x.bound_); } template< class Ch, class Tr, class Alloc> unsigned char basic_format:: exceptions() const { return exceptions_; } template< class Ch, class Tr, class Alloc> unsigned char basic_format:: exceptions(unsigned char newexcept) { unsigned char swp = exceptions_; exceptions_ = newexcept; return swp; } template void basic_format:: make_or_reuse_data (std::size_t nbitems) { Ch fill = ( std::use_facet< std::ctype >(getloc()) ). widen(' '); if(items_.size() == 0) items_.assign( nbitems, format_item_t(fill) ); else { if(nbitems>items_.size()) items_.resize(nbitems, format_item_t(fill)); bound_.resize(0); for(std::size_t i=0; i < nbitems; ++i) items_[i].reset(fill); } prefix_.resize(0); } template< class Ch, class Tr, class Alloc> basic_format& basic_format:: clear () { ((bound_.size()==0 || num_args_ == static_cast(bound_.size())) ? static_cast (0) : __assert_fail ("bound_.size()==0 || num_args_ == static_cast(bound_.size())", "/localhome/glisse2/include/boost/format/format_implementation.hpp", 135, __PRETTY_FUNCTION__)); for(unsigned long i=0; i basic_format& basic_format:: clear_binds () { bound_.resize(0); clear(); return *this; } template< class Ch, class Tr, class Alloc> basic_format& basic_format:: clear_bind (int argN) { if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] ) { if( exceptions() & io::out_of_range_bit) boost::throw_exception(io::out_of_range(argN, 1, num_args_+1 ) ); else return *this; } bound_[argN-1]=false; clear(); return *this; } template< class Ch, class Tr, class Alloc> int basic_format:: bound_args() const { if(bound_.size()==0) return 0; int n=0; for(int i=0; i int basic_format:: fed_args() const { if(bound_.size()==0) return cur_arg_; int n=0; for(int i=0; i int basic_format:: cur_arg() const { return cur_arg_+1; } template< class Ch, class Tr, class Alloc> int basic_format:: remaining_args() const { if(bound_.size()==0) return num_args_-cur_arg_; int n=0; for(int i=cur_arg_; i typename basic_format::string_type basic_format:: str () const { if(items_.size()==0) return prefix_; if( cur_arg_ < num_args_) if( exceptions() & io::too_few_args_bit ) boost::throw_exception(io::too_few_args(cur_arg_, num_args_)); unsigned long i; string_type res; res.reserve(size()); res += prefix_; for(i=0; i < items_.size(); ++i) { const format_item_t& item = items_[i]; res += item.res_; if( item.argN_ == format_item_t::argN_tabulation) { ((item.pad_scheme_ & format_item_t::tabulation) ? static_cast (0) : __assert_fail ("item.pad_scheme_ & format_item_t::tabulation", "/localhome/glisse2/include/boost/format/format_implementation.hpp", 234, __PRETTY_FUNCTION__)); if( static_cast(item.fmtstate_.width_) > res.size() ) res.append( static_cast(item.fmtstate_.width_) - res.size(), item.fmtstate_.fill_ ); } res += item.appendix_; } dumped_=true; return res; } template< class Ch, class Tr, class Alloc> typename std::basic_string::size_type basic_format:: size () const { using std::max; size_type sz = prefix_.size(); unsigned long i; for(i=0; i < items_.size(); ++i) { const format_item_t& item = items_[i]; sz += item.res_.size(); if( item.argN_ == format_item_t::argN_tabulation) sz = max (sz, static_cast(item.fmtstate_.width_) ); sz += item.appendix_.size(); } return sz; } namespace io { namespace detail { template basic_format& bind_arg_body (basic_format& self, int argN, const T& val) { if(self.dumped_) self.clear(); if(argN<1 || argN > self.num_args_) { if( self.exceptions() & io::out_of_range_bit ) boost::throw_exception(io::out_of_range(argN, 1, self.num_args_+1 ) ); else return self; } if(self.bound_.size()==0) self.bound_.assign(self.num_args_,false); else ((self.num_args_ == static_cast(self.bound_.size())) ? static_cast (0) : __assert_fail ("self.num_args_ == static_cast(self.bound_.size())", "/localhome/glisse2/include/boost/format/format_implementation.hpp", 289, __PRETTY_FUNCTION__)); int o_cur_arg = self.cur_arg_; self.cur_arg_ = argN-1; self.bound_[self.cur_arg_]=false; self.operator%(val); self.cur_arg_ = o_cur_arg; self.bound_[argN-1]=true; if(self.cur_arg_ == argN-1 ) { while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) ++self.cur_arg_; } ((self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]) ? static_cast (0) : __assert_fail ("self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]", "/localhome/glisse2/include/boost/format/format_implementation.hpp", 306, __PRETTY_FUNCTION__)); return self; } template basic_format& modify_item_body (basic_format& self, int itemN, T manipulator) { if(itemN<1 || itemN > static_cast(self.items_.size() )) { if( self.exceptions() & io::out_of_range_bit ) boost::throw_exception(io::out_of_range(itemN, 1, static_cast(self.items_.size()) )); else return self; } self.items_[itemN-1].fmtstate_. template apply_manip ( manipulator ); return self; } } } } # 48 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/group.hpp" 1 # 29 "/localhome/glisse2/include/boost/format/group.hpp" namespace boost { namespace io { namespace detail { struct group0 { group0() {} }; template inline ::std:: basic_ostream& operator << ( ::std:: basic_ostream& os, const group0& ) { return os; } template struct group1 { T1 a1_; group1(T1 a1) : a1_(a1) {} private: group1& operator=(const group1&); }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group1& x) { os << x.a1_; return os; } template struct group2 { T1 a1_; T2 a2_; group2(T1 a1,T2 a2) : a1_(a1),a2_(a2) {} private: group2& operator=(const group2&); }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group2& x) { os << x.a1_<< x.a2_; return os; } template struct group3 { T1 a1_; T2 a2_; T3 a3_; group3(T1 a1,T2 a2,T3 a3) : a1_(a1),a2_(a2),a3_(a3) {} private: group3& operator=(const group3&); }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group3& x) { os << x.a1_<< x.a2_<< x.a3_; return os; } template struct group4 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; group4(T1 a1,T2 a2,T3 a3,T4 a4) : a1_(a1),a2_(a2),a3_(a3),a4_(a4) {} private: group4& operator=(const group4&); }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group4& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_; return os; } template struct group5 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; group5(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5) {} }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group5& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_; return os; } template struct group6 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; group6(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6) {} }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group6& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_; return os; } template struct group7 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; group7(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7) {} }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group7& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_; return os; } template struct group8 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; T8 a8_; group8(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8) {} }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group8& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_; return os; } template struct group9 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; T8 a8_; T9 a9_; group9(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9) {} }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group9& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_; return os; } template struct group10 { T1 a1_; T2 a2_; T3 a3_; T4 a4_; T5 a5_; T6 a6_; T7 a7_; T8 a8_; T9 a9_; T10 a10_; group10(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9,T10 a10) : a1_(a1),a2_(a2),a3_(a3),a4_(a4),a5_(a5),a6_(a6),a7_(a7),a8_(a8),a9_(a9),a10_(a10) {} }; template inline ::std:: basic_ostream& operator << (::std:: basic_ostream& os, const group10& x) { os << x.a1_<< x.a2_<< x.a3_<< x.a4_<< x.a5_<< x.a6_<< x.a7_<< x.a8_<< x.a9_<< x.a10_; return os; } template inline group1 group_head( group2 const& x) { return group1 (x.a1_); } template inline group1 group_last( group2 const& x) { return group1 (x.a2_); } template inline group2 group_head( group3 const& x) { return group2 (x.a1_,x.a2_); } template inline group1 group_last( group3 const& x) { return group1 (x.a3_); } template inline group3 group_head( group4 const& x) { return group3 (x.a1_,x.a2_,x.a3_); } template inline group1 group_last( group4 const& x) { return group1 (x.a4_); } template inline group4 group_head( group5 const& x) { return group4 (x.a1_,x.a2_,x.a3_,x.a4_); } template inline group1 group_last( group5 const& x) { return group1 (x.a5_); } template inline group5 group_head( group6 const& x) { return group5 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_); } template inline group1 group_last( group6 const& x) { return group1 (x.a6_); } template inline group6 group_head( group7 const& x) { return group6 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_); } template inline group1 group_last( group7 const& x) { return group1 (x.a7_); } template inline group7 group_head( group8 const& x) { return group7 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_); } template inline group1 group_last( group8 const& x) { return group1 (x.a8_); } template inline group8 group_head( group9 const& x) { return group8 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_); } template inline group1 group_last( group9 const& x) { return group1 (x.a9_); } template inline group9 group_head( group10 const& x) { return group9 (x.a1_,x.a2_,x.a3_,x.a4_,x.a5_,x.a6_,x.a7_,x.a8_,x.a9_); } template inline group1 group_last( group10 const& x) { return group1 (x.a10_); } } inline detail::group1< detail::group0 > group() { return detail::group1< detail::group0 > ( detail::group0() ); } template inline detail::group1< detail::group2 > group(T1 a1, Var const& var) { return detail::group1< detail::group2 > ( detail::group2 (a1, var) ); } template inline detail::group1< detail::group3 > group(T1 a1,T2 a2, Var const& var) { return detail::group1< detail::group3 > ( detail::group3 (a1,a2, var) ); } template inline detail::group1< detail::group4 > group(T1 a1,T2 a2,T3 a3, Var const& var) { return detail::group1< detail::group4 > ( detail::group4 (a1,a2,a3, var) ); } template inline detail::group1< detail::group5 > group(T1 a1,T2 a2,T3 a3,T4 a4, Var const& var) { return detail::group1< detail::group5 > ( detail::group5 (a1,a2,a3,a4, var) ); } template inline detail::group1< detail::group6 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var const& var) { return detail::group1< detail::group6 > ( detail::group6 (a1,a2,a3,a4,a5, var) ); } template inline detail::group1< detail::group7 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var const& var) { return detail::group1< detail::group7 > ( detail::group7 (a1,a2,a3,a4,a5,a6, var) ); } template inline detail::group1< detail::group8 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var const& var) { return detail::group1< detail::group8 > ( detail::group8 (a1,a2,a3,a4,a5,a6,a7, var) ); } template inline detail::group1< detail::group9 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var const& var) { return detail::group1< detail::group9 > ( detail::group9 (a1,a2,a3,a4,a5,a6,a7,a8, var) ); } template inline detail::group1< detail::group10 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var const& var) { return detail::group1< detail::group10 > ( detail::group10 (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) ); } template inline detail::group1< detail::group2 > group(T1 a1, Var& var) { return detail::group1< detail::group2 > ( detail::group2 (a1, var) ); } template inline detail::group1< detail::group3 > group(T1 a1,T2 a2, Var& var) { return detail::group1< detail::group3 > ( detail::group3 (a1,a2, var) ); } template inline detail::group1< detail::group4 > group(T1 a1,T2 a2,T3 a3, Var& var) { return detail::group1< detail::group4 > ( detail::group4 (a1,a2,a3, var) ); } template inline detail::group1< detail::group5 > group(T1 a1,T2 a2,T3 a3,T4 a4, Var& var) { return detail::group1< detail::group5 > ( detail::group5 (a1,a2,a3,a4, var) ); } template inline detail::group1< detail::group6 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5, Var& var) { return detail::group1< detail::group6 > ( detail::group6 (a1,a2,a3,a4,a5, var) ); } template inline detail::group1< detail::group7 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6, Var& var) { return detail::group1< detail::group7 > ( detail::group7 (a1,a2,a3,a4,a5,a6, var) ); } template inline detail::group1< detail::group8 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7, Var& var) { return detail::group1< detail::group8 > ( detail::group8 (a1,a2,a3,a4,a5,a6,a7, var) ); } template inline detail::group1< detail::group9 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, Var& var) { return detail::group1< detail::group9 > ( detail::group9 (a1,a2,a3,a4,a5,a6,a7,a8, var) ); } template inline detail::group1< detail::group10 > group(T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8,T9 a9, Var& var) { return detail::group1< detail::group10 > ( detail::group10 (a1,a2,a3,a4,a5,a6,a7,a8,a9, var) ); } } } # 49 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/feed_args.hpp" 1 # 18 "/localhome/glisse2/include/boost/format/feed_args.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 19 "/localhome/glisse2/include/boost/format/feed_args.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/detail/msvc_disambiguater.hpp" 1 # 24 "/localhome/glisse2/include/boost/format/feed_args.hpp" 2 namespace boost { namespace io { namespace detail { template void mk_str( std::basic_string & res, const Ch * beg, typename std::basic_string::size_type size, std::streamsize w, const Ch fill_char, std::ios_base::fmtflags f, const Ch prefix_space, bool center) { typedef typename std::basic_string::size_type size_type; res.resize(0); if(w<=0 || static_cast(w) <=size) { res.reserve(size + !!prefix_space); if(prefix_space) res.append(1, prefix_space); if (size) res.append(beg, size); } else { std::streamsize n=static_cast(w-size-!!prefix_space); std::streamsize n_after = 0, n_before = 0; res.reserve(static_cast(w)); if(center) n_after = n/2, n_before = n - n_after; else if(f & std::ios_base::left) n_after = n; else n_before = n; if(n_before) res.append(static_cast(n_before), fill_char); if(prefix_space) res.append(1, prefix_space); if (size) res.append(beg, size); if(n_after) res.append(static_cast(n_after), fill_char); } } # 89 "/localhome/glisse2/include/boost/format/feed_args.hpp" template< class Ch, class Tr, class T> inline void put_head (::std:: basic_ostream &, const T& ) { } template< class Ch, class Tr, class T> inline void put_head( ::std:: basic_ostream & os, const group1& x ) { os << group_head(x.a1_); } template< class Ch, class Tr, class T> inline void put_last( ::std:: basic_ostream & os, const T& x ) { os << x ; } template< class Ch, class Tr, class T> inline void put_last( ::std:: basic_ostream & os, const group1& x ) { os << group_last(x.a1_); } template< class Ch, class Tr, class T> inline void put_head( ::std:: basic_ostream &, T& ) { } template< class Ch, class Tr, class T> inline void put_last( ::std:: basic_ostream & os, T& x) { os << x ; } template< class Ch, class Tr, class Alloc, class T> void put( T x, const format_item& specs, typename basic_format::string_type& res, typename basic_format::internal_streambuf_t & buf, io::detail::locale_t *loc_p = __null) { # 138 "/localhome/glisse2/include/boost/format/feed_args.hpp" typedef typename basic_format::string_type string_type; typedef typename basic_format::format_item_t format_item_t; typedef typename string_type::size_type size_type; basic_oaltstringstream oss( &buf); specs.fmtstate_.apply_on(oss, loc_p); put_head( oss, x ); const std::ios_base::fmtflags fl=oss.flags(); const bool internal = (fl & std::ios_base::internal) != 0; const std::streamsize w = oss.width(); const bool two_stepped_padding= internal && (w!=0); res.resize(0); if(! two_stepped_padding) { if(w>0) oss.width(0); put_last( oss, x); const Ch * res_beg = buf.pbase(); Ch prefix_space = 0; if(specs.pad_scheme_ & format_item_t::spacepad) if(buf.pcount()== 0 || (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) prefix_space = oss.widen(' '); size_type res_size = (std::min)( static_cast(specs.truncate_ - !!prefix_space), buf.pcount() ); mk_str(res, res_beg, res_size, w, oss.fill(), fl, prefix_space, (specs.pad_scheme_ & format_item_t::centered) !=0 ); } else { put_last( oss, x); const Ch * res_beg = buf.pbase(); size_type res_size = buf.pcount(); bool prefix_space=false; if(specs.pad_scheme_ & format_item_t::spacepad) if(buf.pcount()== 0 || (res_beg[0] !=oss.widen('+') && res_beg[0] !=oss.widen('-') )) prefix_space = true; if(res_size == static_cast(w) && w<=specs.truncate_ && !prefix_space) { res.assign(res_beg, res_size); } else { res.assign(res_beg, res_size); res_beg=__null; buf.clear_buffer(); basic_oaltstringstream oss2( &buf); specs.fmtstate_.apply_on(oss2, loc_p); put_head( oss2, x ); oss2.width(0); if(prefix_space) oss2 << ' '; put_last(oss2, x ); if(buf.pcount()==0 && specs.pad_scheme_ & format_item_t::spacepad) { prefix_space =true; oss2 << ' '; } const Ch * tmp_beg = buf.pbase(); size_type tmp_size = (std::min)(static_cast(specs.truncate_), buf.pcount() ); if(static_cast(w) <= tmp_size) { res.assign(tmp_beg, tmp_size); } else { size_type sz = (std::min)(res_size + (prefix_space ? 1 : 0), tmp_size); size_type i = prefix_space; for(; i=tmp_size) i=prefix_space; res.assign(tmp_beg, i); std::streamsize d = w - static_cast(tmp_size); ((d>0) ? static_cast (0) : __assert_fail ("d>0", "/localhome/glisse2/include/boost/format/feed_args.hpp", 227, __PRETTY_FUNCTION__)); res.append(static_cast( d ), oss2.fill()); res.append(tmp_beg+i, tmp_size-i); ((i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) == static_cast(w)) ? static_cast (0) : __assert_fail ("i+(tmp_size-i)+(std::max)(d,(std::streamsize)0) == static_cast(w)", "/localhome/glisse2/include/boost/format/feed_args.hpp" # 230 "/localhome/glisse2/include/boost/format/feed_args.hpp" , 231 # 230 "/localhome/glisse2/include/boost/format/feed_args.hpp" , __PRETTY_FUNCTION__)) ; ((res.size() == static_cast(w)) ? static_cast (0) : __assert_fail ("res.size() == static_cast(w)", "/localhome/glisse2/include/boost/format/feed_args.hpp", 232, __PRETTY_FUNCTION__)); } } } buf.clear_buffer(); } template< class Ch, class Tr, class Alloc, class T> void distribute (basic_format& self, T x) { if(self.cur_arg_ >= self.num_args_) { if( self.exceptions() & too_many_args_bit ) boost::throw_exception(too_many_args(self.cur_arg_, self.num_args_)); else return; } for(unsigned long i=0; i < self.items_.size(); ++i) { if(self.items_[i].argN_ == self.cur_arg_) { put (x, self.items_[i], self.items_[i].res_, self.buf_, boost::get_pointer(self.loc_) ); } } } template basic_format& feed (basic_format& self, T x) { if(self.dumped_) self.clear(); distribute (self, x); ++self.cur_arg_; if(self.bound_.size() != 0) { while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] ) ++self.cur_arg_; } return self; } } } } # 50 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/parsing.hpp" 1 # 21 "/localhome/glisse2/include/boost/format/parsing.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/format/parsing.hpp" 2 namespace boost { namespace io { namespace detail { # 35 "/localhome/glisse2/include/boost/format/parsing.hpp" template const T& const_or_not(const T& x) { return x; } template inline char wrap_narrow(const Facet& fac, Ch c, char deflt) { return const_or_not(fac).narrow(c, deflt); } template inline bool wrap_isdigit(const Facet& fac, Ch c) { return fac.is(std::ctype::digit, c); } template Iter wrap_scan_notdigit(const Facet & fac, Iter beg, Iter end) { using namespace std; for( ; beg!=end && wrap_isdigit(fac, *beg); ++beg) ; return beg; } template Iter str2int (const Iter & start, const Iter & last, Res & res, const Facet& fac) { using namespace std; Iter it; res=0; for(it=start; it != last && wrap_isdigit(fac, *it); ++it ) { char cur_ch = wrap_narrow(fac, *it, 0); res *= 10; res += cur_ch - '0'; } return it; } template Iter skip_asterisk(Iter start, Iter last, const Facet& fac) { using namespace std; ++ start; start = wrap_scan_notdigit(fac, start, last); if(start!=last && *start== const_or_not(fac).widen( '$') ) ++start; return start; } inline void maybe_throw_exception(unsigned char exceptions, std::size_t pos, std::size_t size) { if(exceptions & io::bad_format_string_bit) boost::throw_exception(io::bad_format_string(pos, size) ); } # 122 "/localhome/glisse2/include/boost/format/parsing.hpp" template bool parse_printf_directive(Iter & start, const Iter& last, detail::format_item * fpar, const Facet& fac, std::size_t offset, unsigned char exceptions) { typedef typename basic_format::format_item_t format_item_t; fpar->argN_ = format_item_t::argN_no_posit; bool precision_set = false; bool in_brackets=false; Iter start0 = start; std::size_t fstring_size = last-start0+offset; if(start>= last) { maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); return false; } if(*start== const_or_not(fac).widen( '|')) { in_brackets=true; if( ++start >= last ) { maybe_throw_exception(exceptions, start-start0 + offset, fstring_size); return false; } } if(*start== const_or_not(fac).widen( '0')) goto parse_flags; if(wrap_isdigit(fac, *start)) { int n; start = str2int(start, last, n, fac); if( start >= last ) { maybe_throw_exception(exceptions, start-start0+offset, fstring_size); return false; } if( *start == const_or_not(fac).widen( '%') ) { fpar->argN_ = n-1; ++start; if( in_brackets) maybe_throw_exception(exceptions, start-start0+offset, fstring_size); else return true; } if ( *start== const_or_not(fac).widen( '$') ) { fpar->argN_ = n-1; ++start; } else { fpar->fmtstate_.width_ = n; fpar->argN_ = format_item_t::argN_no_posit; goto parse_precision; } } parse_flags: while ( start != last) { switch ( wrap_narrow(fac, *start, 0)) { case '\'' : break; case 'l': case 'h': break; case '-': fpar->fmtstate_.flags_ |= std::ios_base::left; break; case '=': fpar->pad_scheme_ |= format_item_t::centered; break; case '_': fpar->fmtstate_.flags_ |= std::ios_base::internal; break; case ' ': fpar->pad_scheme_ |= format_item_t::spacepad; break; case '+': fpar->fmtstate_.flags_ |= std::ios_base::showpos; break; case '0': fpar->pad_scheme_ |= format_item_t::zeropad; break; case '#': fpar->fmtstate_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase; break; default: goto parse_width; } ++start; } if( start>=last) { maybe_throw_exception(exceptions, start-start0+offset, fstring_size); return true; } parse_width: if(*start == const_or_not(fac).widen( '*') ) start = skip_asterisk(start, last, fac); if(start!=last && wrap_isdigit(fac, *start)) start = str2int(start, last, fpar->fmtstate_.width_, fac); parse_precision: if( start>= last) { maybe_throw_exception(exceptions, start-start0+offset, fstring_size); return true; } if (*start== const_or_not(fac).widen( '.')) { ++start; if(start != last && *start == const_or_not(fac).widen( '*') ) start = skip_asterisk(start, last, fac); if(start != last && wrap_isdigit(fac, *start)) { start = str2int(start, last, fpar->fmtstate_.precision_, fac); precision_set = true; } else fpar->fmtstate_.precision_ =0; } while( start != last && ( *start== const_or_not(fac).widen( 'l') || *start== const_or_not(fac).widen( 'L') || *start== const_or_not(fac).widen( 'h')) ) ++start; if( start>=last) { maybe_throw_exception(exceptions, start-start0+offset, fstring_size); return true; } if( in_brackets && *start== const_or_not(fac).widen( '|') ) { ++start; return true; } switch ( wrap_narrow(fac, *start, 0) ) { case 'X': fpar->fmtstate_.flags_ |= std::ios_base::uppercase; case 'p': case 'x': fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; fpar->fmtstate_.flags_ |= std::ios_base::hex; break; case 'o': fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; fpar->fmtstate_.flags_ |= std::ios_base::oct; break; case 'E': fpar->fmtstate_.flags_ |= std::ios_base::uppercase; case 'e': fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; fpar->fmtstate_.flags_ |= std::ios_base::scientific; fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; fpar->fmtstate_.flags_ |= std::ios_base::dec; break; case 'f': fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; fpar->fmtstate_.flags_ |= std::ios_base::fixed; case 'u': case 'd': case 'i': fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; fpar->fmtstate_.flags_ |= std::ios_base::dec; break; case 'T': ++start; if( start >= last) maybe_throw_exception(exceptions, start-start0+offset, fstring_size); else fpar->fmtstate_.fill_ = *start; fpar->pad_scheme_ |= format_item_t::tabulation; fpar->argN_ = format_item_t::argN_tabulation; break; case 't': fpar->fmtstate_.fill_ = const_or_not(fac).widen( ' '); fpar->pad_scheme_ |= format_item_t::tabulation; fpar->argN_ = format_item_t::argN_tabulation; break; case 'G': fpar->fmtstate_.flags_ |= std::ios_base::uppercase; break; case 'g': fpar->fmtstate_.flags_ &= ~std::ios_base::basefield; fpar->fmtstate_.flags_ |= std::ios_base::dec; fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield; break; case 'C': case 'c': fpar->truncate_ = 1; break; case 'S': case 's': if(precision_set) fpar->truncate_ = fpar->fmtstate_.precision_; fpar->fmtstate_.precision_ = 6; break; case 'n' : fpar->argN_ = format_item_t::argN_ignored; break; default: maybe_throw_exception(exceptions, start-start0+offset, fstring_size); } ++start; if( in_brackets ) { if( start != last && *start== const_or_not(fac).widen( '|') ) { ++start; return true; } else maybe_throw_exception(exceptions, start-start0+offset, fstring_size); } return true; } template int upper_bound_from_fstring(const String& buf, const typename String::value_type arg_mark, const Facet& fac, unsigned char exceptions) { using namespace boost::io; typename String::size_type i1=0; int num_items=0; while( (i1=buf.find(arg_mark,i1)) != String::npos ) { if( i1+1 >= buf.size() ) { if(exceptions & bad_format_string_bit) boost::throw_exception(bad_format_string(i1, buf.size() )); else { ++num_items; break; } } if(buf[i1+1] == buf[i1] ) { i1+=2; continue; } ++i1; i1 = detail::wrap_scan_notdigit(fac, buf.begin()+i1, buf.end()) - buf.begin(); if( i1 < buf.size() && buf[i1] == arg_mark ) ++i1; ++num_items; } return num_items; } template inline void append_string(String& dst, const String& src, const typename String::size_type beg, const typename String::size_type end) { dst.append(src.begin()+beg, src.begin()+end); } } } template basic_format& basic_format:: parse (const string_type& buf) { using namespace std; const std::ctype & fac = std::use_facet< std::ctype >(getloc()); const Ch arg_mark = io::detail::const_or_not(fac).widen( '%'); bool ordered_args=true; int max_argN=-1; int num_items = io::detail::upper_bound_from_fstring(buf, arg_mark, fac, exceptions()); make_or_reuse_data(num_items); num_items=0; typename string_type::size_type i0=0, i1=0; typename string_type::const_iterator it; bool special_things=false; int cur_item=0; while( (i1=buf.find(arg_mark,i1)) != string_type::npos ) { string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; if( buf[i1+1] == buf[i1] ) { io::detail::append_string(piece, buf, i0, i1+1); i1+=2; i0=i1; continue; } ((static_cast(cur_item) < items_.size() || cur_item==0) ? static_cast (0) : __assert_fail ("static_cast(cur_item) < items_.size() || cur_item==0", "/localhome/glisse2/include/boost/format/parsing.hpp", 441, __PRETTY_FUNCTION__)); if(i1!=i0) { io::detail::append_string(piece, buf, i0, i1); i0=i1; } ++i1; it = buf.begin()+i1; bool parse_ok = io::detail::parse_printf_directive( it, buf.end(), &items_[cur_item], fac, i1, exceptions()); i1 = it - buf.begin(); if( ! parse_ok ) continue; i0=i1; items_[cur_item].compute_states(); int argN=items_[cur_item].argN_; if(argN == format_item_t::argN_ignored) continue; if(argN ==format_item_t::argN_no_posit) ordered_args=false; else if(argN == format_item_t::argN_tabulation) special_things=true; else if(argN > max_argN) max_argN = argN; ++num_items; ++cur_item; } ((cur_item == num_items) ? static_cast (0) : __assert_fail ("cur_item == num_items", "/localhome/glisse2/include/boost/format/parsing.hpp", 467, __PRETTY_FUNCTION__)); { string_type & piece = (cur_item==0) ? prefix_ : items_[cur_item-1].appendix_; io::detail::append_string(piece, buf, i0, buf.size()); } if( !ordered_args) { if(max_argN >= 0 ) { if(exceptions() & io::bad_format_string_bit) boost::throw_exception(io::bad_format_string(max_argN, 0)); } int non_ordered_items = 0; for(int i=0; i< num_items; ++i) if(items_[i].argN_ == format_item_t::argN_no_posit) { items_[i].argN_ = non_ordered_items; ++non_ordered_items; } max_argN = non_ordered_items-1; } items_.resize(num_items, format_item_t(io::detail::const_or_not(fac).widen( ' ')) ); if(special_things) style_ |= special_needs; num_args_ = max_argN + 1; if(ordered_args) style_ |= ordered; else style_ &= ~ordered; return *this; } } # 51 "/localhome/glisse2/include/boost/format.hpp" 2 # 1 "/localhome/glisse2/include/boost/format/free_funcs.hpp" 1 # 19 "/localhome/glisse2/include/boost/format/free_funcs.hpp" namespace boost { template inline std::basic_string str(const basic_format& f) { return f.str(); } namespace io { using ::boost::str; } template std::basic_ostream & operator<<( std::basic_ostream & os, const basic_format& f) { typedef boost::basic_format format_t; if(f.items_.size()==0) os << f.prefix_; else { if(f.cur_arg_ < f.num_args_) if( f.exceptions() & io::too_few_args_bit ) boost::throw_exception(io::too_few_args(f.cur_arg_, f.num_args_)); if(f.style_ & format_t::special_needs) os << f.str(); else { os << f.prefix_; for(unsigned long i=0; i T user_domain_error(const char* function, const char* message, const T& val); template T user_pole_error(const char* function, const char* message, const T& val); template T user_overflow_error(const char* function, const char* message, const T& val); template T user_underflow_error(const char* function, const char* message, const T& val); template T user_denorm_error(const char* function, const char* message, const T& val); template T user_evaluation_error(const char* function, const char* message, const T& val); template T user_rounding_error(const char* function, const char* message, const T& val, const TargetType& t); template T user_indeterminate_result_error(const char* function, const char* message, const T& val); namespace detail { template inline std::string do_format(Formatter f, const Group& g) { return (f % g).str(); } template void raise_error(const char* function, const char* message) { if(function == 0) function = "Unknown function operating on type %1%"; if(message == 0) message = "Cause unknown"; std::string msg("Error in function "); msg += (boost::format(function) % typeid(T).name()).str(); msg += ": "; msg += message; E e(msg); boost::throw_exception(e); } template void raise_error(const char* function, const char* message, const T& val) { if(function == 0) function = "Unknown function operating on type %1%"; if(message == 0) message = "Cause unknown: error caused by bad argument with value %1%"; std::string msg("Error in function "); msg += (boost::format(function) % typeid(T).name()).str(); msg += ": "; msg += message; int prec = 2 + (boost::math::policies::digits >() * 30103UL) / 100000UL; msg = do_format(boost::format(msg), boost::io::group(std::setprecision(prec), val)); E e(msg); boost::throw_exception(e); } template inline T raise_domain_error( const char* function, const char* message, const T& val, const ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message, val); return std::numeric_limits::quiet_NaN(); } template inline T raise_domain_error( const char* , const char* , const T& , const ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>&) { return std::numeric_limits::quiet_NaN(); } template inline T raise_domain_error( const char* , const char* , const T& , const ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>&) { (*__errno_location ()) = 33; return std::numeric_limits::quiet_NaN(); } template inline T raise_domain_error( const char* function, const char* message, const T& val, const ::boost::math::policies::domain_error< ::boost::math::policies::user_error>&) { return user_domain_error(function, message, val); } template inline T raise_pole_error( const char* function, const char* message, const T& val, const ::boost::math::policies::pole_error< ::boost::math::policies::throw_on_error>&) { return boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>()); } template inline T raise_pole_error( const char* function, const char* message, const T& val, const ::boost::math::policies::pole_error< ::boost::math::policies::ignore_error>&) { return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>()); } template inline T raise_pole_error( const char* function, const char* message, const T& val, const ::boost::math::policies::pole_error< ::boost::math::policies::errno_on_error>&) { return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>()); } template inline T raise_pole_error( const char* function, const char* message, const T& val, const ::boost::math::policies::pole_error< ::boost::math::policies::user_error>&) { return user_pole_error(function, message, val); } template inline T raise_overflow_error( const char* function, const char* message, const ::boost::math::policies::overflow_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message ? message : "numeric overflow"); return std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value(); } template inline T raise_overflow_error( const char* , const char* , const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) { return std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value(); } template inline T raise_overflow_error( const char* , const char* , const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&) { (*__errno_location ()) = 34; return std::numeric_limits::has_infinity ? std::numeric_limits::infinity() : boost::math::tools::max_value(); } template inline T raise_overflow_error( const char* function, const char* message, const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&) { return user_overflow_error(function, message, std::numeric_limits::infinity()); } template inline T raise_underflow_error( const char* function, const char* message, const ::boost::math::policies::underflow_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message ? message : "numeric underflow"); return 0; } template inline T raise_underflow_error( const char* , const char* , const ::boost::math::policies::underflow_error< ::boost::math::policies::ignore_error>&) { return T(0); } template inline T raise_underflow_error( const char* , const char* , const ::boost::math::policies::underflow_error< ::boost::math::policies::errno_on_error>&) { (*__errno_location ()) = 34; return T(0); } template inline T raise_underflow_error( const char* function, const char* message, const ::boost::math::policies::underflow_error< ::boost::math::policies::user_error>&) { return user_underflow_error(function, message, T(0)); } template inline T raise_denorm_error( const char* function, const char* message, const T& , const ::boost::math::policies::denorm_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message ? message : "denormalised result"); return T(0); } template inline T raise_denorm_error( const char* , const char* , const T& val, const ::boost::math::policies::denorm_error< ::boost::math::policies::ignore_error>&) { return val; } template inline T raise_denorm_error( const char* , const char* , const T& val, const ::boost::math::policies::denorm_error< ::boost::math::policies::errno_on_error>&) { (*__errno_location ()) = 34; return val; } template inline T raise_denorm_error( const char* function, const char* message, const T& val, const ::boost::math::policies::denorm_error< ::boost::math::policies::user_error>&) { return user_denorm_error(function, message, val); } template inline T raise_evaluation_error( const char* function, const char* message, const T& val, const ::boost::math::policies::evaluation_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message, val); return T(0); } template inline T raise_evaluation_error( const char* , const char* , const T& val, const ::boost::math::policies::evaluation_error< ::boost::math::policies::ignore_error>&) { return val; } template inline T raise_evaluation_error( const char* , const char* , const T& val, const ::boost::math::policies::evaluation_error< ::boost::math::policies::errno_on_error>&) { (*__errno_location ()) = 33; return val; } template inline T raise_evaluation_error( const char* function, const char* message, const T& val, const ::boost::math::policies::evaluation_error< ::boost::math::policies::user_error>&) { return user_evaluation_error(function, message, val); } template inline T raise_rounding_error( const char* function, const char* message, const T& val, const TargetType&, const ::boost::math::policies::rounding_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message, val); return T(0); } template inline T raise_rounding_error( const char* , const char* , const T& val, const TargetType&, const ::boost::math::policies::rounding_error< ::boost::math::policies::ignore_error>&) { return std::numeric_limits::is_specialized ? (val > 0 ? (std::numeric_limits::max)() : -(std::numeric_limits::max)()): val; } template inline T raise_rounding_error( const char* , const char* , const T& val, const TargetType&, const ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>&) { (*__errno_location ()) = 34; return std::numeric_limits::is_specialized ? (val > 0 ? (std::numeric_limits::max)() : -(std::numeric_limits::max)()): val; } template inline T raise_rounding_error( const char* function, const char* message, const T& val, const TargetType& t, const ::boost::math::policies::rounding_error< ::boost::math::policies::user_error>&) { return user_rounding_error(function, message, val, t); } template inline T raise_indeterminate_result_error( const char* function, const char* message, const T& val, const R& , const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message, val); return std::numeric_limits::quiet_NaN(); } template inline T raise_indeterminate_result_error( const char* , const char* , const T& , const R& result, const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::ignore_error>&) { return result; } template inline T raise_indeterminate_result_error( const char* , const char* , const T& , const R& result, const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::errno_on_error>&) { (*__errno_location ()) = 33; return result; } template inline T raise_indeterminate_result_error( const char* function, const char* message, const T& val, const R& , const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::user_error>&) { return user_indeterminate_result_error(function, message, val); } } template inline T raise_domain_error(const char* function, const char* message, const T& val, const Policy&) { typedef typename Policy::domain_error_type policy_type; return detail::raise_domain_error( function, message ? message : "Domain Error evaluating function at %1%", val, policy_type()); } template inline T raise_pole_error(const char* function, const char* message, const T& val, const Policy&) { typedef typename Policy::pole_error_type policy_type; return detail::raise_pole_error( function, message ? message : "Evaluation of function at pole %1%", val, policy_type()); } template inline T raise_overflow_error(const char* function, const char* message, const Policy&) { typedef typename Policy::overflow_error_type policy_type; return detail::raise_overflow_error( function, message ? message : "Overflow Error", policy_type()); } template inline T raise_underflow_error(const char* function, const char* message, const Policy&) { typedef typename Policy::underflow_error_type policy_type; return detail::raise_underflow_error( function, message ? message : "Underflow Error", policy_type()); } template inline T raise_denorm_error(const char* function, const char* message, const T& val, const Policy&) { typedef typename Policy::denorm_error_type policy_type; return detail::raise_denorm_error( function, message ? message : "Denorm Error", val, policy_type()); } template inline T raise_evaluation_error(const char* function, const char* message, const T& val, const Policy&) { typedef typename Policy::evaluation_error_type policy_type; return detail::raise_evaluation_error( function, message ? message : "Internal Evaluation Error, best value so far was %1%", val, policy_type()); } template inline T raise_rounding_error(const char* function, const char* message, const T& val, const TargetType& t, const Policy&) { typedef typename Policy::rounding_error_type policy_type; return detail::raise_rounding_error( function, message ? message : "Value %1% can not be represented in the target integer type.", val, t, policy_type()); } template inline T raise_indeterminate_result_error(const char* function, const char* message, const T& val, const R& result, const Policy&) { typedef typename Policy::indeterminate_result_error_type policy_type; return detail::raise_indeterminate_result_error( function, message ? message : "Indeterminate result with value %1%", val, result, policy_type()); } namespace detail { template inline bool check_overflow(T val, R* result, const char* function, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(fabs(val) > tools::max_value()) { *result = static_cast(boost::math::policies::detail::raise_overflow_error(function, 0, pol)); return true; } return false; } template inline bool check_underflow(T val, R* result, const char* function, const Policy& pol) { if((val != 0) && (static_cast(val) == 0)) { *result = static_cast(boost::math::policies::detail::raise_underflow_error(function, 0, pol)); return true; } return false; } template inline bool check_denorm(T val, R* result, const char* function, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if((fabs(val) < static_cast(tools::min_value())) && (static_cast(val) != 0)) { *result = static_cast(boost::math::policies::detail::raise_denorm_error(function, 0, static_cast(val), pol)); return true; } return false; } template inline bool check_overflow(T , R* , const char* , const overflow_error&){ return false; } template inline bool check_underflow(T , R* , const char* , const underflow_error&){ return false; } template inline bool check_denorm(T , R* , const char* , const denorm_error&){ return false; } } template inline R checked_narrowing_cast(T val, const char* function) { typedef typename Policy::overflow_error_type overflow_type; typedef typename Policy::underflow_error_type underflow_type; typedef typename Policy::denorm_error_type denorm_type; R result = 0; if(detail::check_overflow(val, &result, function, overflow_type())) return result; if(detail::check_underflow(val, &result, function, underflow_type())) return result; if(detail::check_denorm(val, &result, function, denorm_type())) return result; return static_cast(val); } template inline void check_series_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) { if(max_iter >= policies::get_max_series_iterations()) raise_evaluation_error( function, "Series evaluation exceeded %1% iterations, giving up now.", static_cast(static_cast(max_iter)), pol); } template inline void check_root_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) { if(max_iter >= policies::get_max_root_iterations()) raise_evaluation_error( function, "Root finding evaluation exceeded %1% iterations, giving up now.", static_cast(static_cast(max_iter)), pol); } } }} # 22 "/localhome/glisse2/include/boost/math/special_functions/acosh.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/math_fwd.hpp" 1 # 27 "/localhome/glisse2/include/boost/math/special_functions/math_fwd.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/promotion.hpp" 1 # 42 "/localhome/glisse2/include/boost/math/tools/promotion.hpp" namespace boost { namespace math { namespace tools { # 68 "/localhome/glisse2/include/boost/math/tools/promotion.hpp" template struct promote_arg { typedef typename mpl::if_, double, T>::type type; }; template <> struct promote_arg { typedef float type; }; template <> struct promote_arg{ typedef double type; }; template <> struct promote_arg { typedef long double type; }; template <> struct promote_arg { typedef double type; }; template struct promote_args_2 { typedef typename promote_arg::type T1P; typedef typename promote_arg::type T2P; typedef typename mpl::if_< typename mpl::and_, is_floating_point >::type, typename mpl::if_< typename mpl::or_, is_same >::type, long double, typename mpl::if_< typename mpl::or_, is_same >::type, double, float >::type >::type, typename mpl::if_< typename mpl::and_ >, ::boost::is_convertible >, T2P, T1P>::type>::type type; }; template <> struct promote_args_2 { typedef float type; }; template <> struct promote_args_2{ typedef double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template struct promote_args { typedef typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename remove_cv::type >::type >::type >::type >::type >::type type; }; } } } # 28 "/localhome/glisse2/include/boost/math/special_functions/math_fwd.hpp" 2 # 1 "/localhome/glisse2/include/boost/config/no_tr1/complex.hpp" 1 # 31 "/localhome/glisse2/include/boost/math/special_functions/math_fwd.hpp" 2 namespace boost { namespace math { template typename tools::promote_args::type beta(RT1 a, RT2 b); template typename tools::promote_args::type beta(RT1 a, RT2 b, A x); template typename tools::promote_args::type beta(RT1 a, RT2 b, RT3 x, const Policy& pol); template typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x); template typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x, const Policy& pol); template typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x); template typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); template typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x); template typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); template typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py); template typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol); template typename tools::promote_args::type ibeta_inv(RT1 a, RT2 b, RT3 p); template typename tools::promote_args::type ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); template typename tools::promote_args::type ibeta_inva(RT1 a, RT2 b, RT3 p); template typename tools::promote_args::type ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); template typename tools::promote_args::type ibeta_invb(RT1 a, RT2 b, RT3 p); template typename tools::promote_args::type ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); template typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py); template typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol); template typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q); template typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); template typename tools::promote_args::type ibetac_inva(RT1 a, RT2 b, RT3 q); template typename tools::promote_args::type ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); template typename tools::promote_args::type ibetac_invb(RT1 a, RT2 b, RT3 q); template typename tools::promote_args::type ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); template typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x); template typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); template typename tools::promote_args::type erf(RT z); template typename tools::promote_args::type erf(RT z, const Policy&); template typename tools::promote_args::type erfc(RT z); template typename tools::promote_args::type erfc(RT z, const Policy&); template typename tools::promote_args::type erf_inv(RT z); template typename tools::promote_args::type erf_inv(RT z, const Policy& pol); template typename tools::promote_args::type erfc_inv(RT z); template typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); template typename tools::promote_args::type legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1); template typename tools::promote_args::type legendre_p(int l, T x); template typename tools::promote_args::type legendre_p(int l, T x, const Policy& pol); template typename tools::promote_args::type legendre_q(unsigned l, T x); template typename tools::promote_args::type legendre_q(unsigned l, T x, const Policy& pol); template typename tools::promote_args::type legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1); template typename tools::promote_args::type legendre_p(int l, int m, T x); template typename tools::promote_args::type legendre_p(int l, int m, T x, const Policy& pol); template typename tools::promote_args::type laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1); template typename tools::promote_args::type laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1); template typename tools::promote_args::type laguerre(unsigned n, T x); template typename tools::promote_args::type laguerre(unsigned n, unsigned m, T x, const Policy& pol); template struct laguerre_result { typedef typename mpl::if_< policies::is_policy, typename tools::promote_args::type, typename tools::promote_args::type >::type type; }; template typename laguerre_result::type laguerre(unsigned n, T1 m, T2 x); template typename tools::promote_args::type hermite(unsigned n, T x); template typename tools::promote_args::type hermite(unsigned n, T x, const Policy& pol); template typename tools::promote_args::type hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1); template std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi); template std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); template typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi); template typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); template typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi); template typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); template typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z); template typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z, const Policy& pol); template typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z); template typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z, const Policy& pol); template typename tools::promote_args::type ellint_rc(T1 x, T2 y); template typename tools::promote_args::type ellint_rc(T1 x, T2 y, const Policy& pol); template typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p); template typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); template typename tools::promote_args::type ellint_2(T k); template typename tools::promote_args::type ellint_2(T1 k, T2 phi); template typename tools::promote_args::type ellint_2(T1 k, T2 phi, const Policy& pol); template typename tools::promote_args::type ellint_1(T k); template typename tools::promote_args::type ellint_1(T1 k, T2 phi); template typename tools::promote_args::type ellint_1(T1 k, T2 phi, const Policy& pol); namespace detail{ template struct ellint_3_result { typedef typename mpl::if_< policies::is_policy, typename tools::promote_args::type, typename tools::promote_args::type >::type type; }; } template typename detail::ellint_3_result::type ellint_3(T1 k, T2 v, T3 phi); template typename tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol); template typename tools::promote_args::type ellint_3(T1 k, T2 v); template struct max_factorial; template RT factorial(unsigned int); template RT factorial(unsigned int, const Policy& pol); template RT unchecked_factorial(unsigned int ); template RT double_factorial(unsigned i); template RT double_factorial(unsigned i, const Policy& pol); template typename tools::promote_args::type falling_factorial(RT x, unsigned n); template typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); template typename tools::promote_args::type rising_factorial(RT x, int n); template typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); template typename tools::promote_args::type tgamma(RT z); template typename tools::promote_args::type tgamma1pm1(RT z); template typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); template typename tools::promote_args::type tgamma(RT1 a, RT2 z); template typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); template typename tools::promote_args::type lgamma(RT z, int* sign); template typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); template typename tools::promote_args::type lgamma(RT x); template typename tools::promote_args::type lgamma(RT x, const Policy& pol); template typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); template typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type gamma_q(RT1 a, RT2 z); template typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type gamma_p(RT1 a, RT2 z); template typename tools::promote_args::type gamma_p(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); template typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); template typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); template typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); template typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); template typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); template typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); template typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); template typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); template typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); template typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); template typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); template typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); template typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); template typename tools::promote_args::type digamma(T x); template typename tools::promote_args::type digamma(T x, const Policy&); template typename tools::promote_args::type hypot(T1 x, T2 y); template typename tools::promote_args::type hypot(T1 x, T2 y, const Policy&); template typename tools::promote_args::type cbrt(RT z); template typename tools::promote_args::type cbrt(RT z, const Policy&); template typename tools::promote_args::type log1p(T); template typename tools::promote_args::type log1p(T, const Policy&); template typename tools::promote_args::type log1pmx(T); template typename tools::promote_args::type log1pmx(T, const Policy&); template typename tools::promote_args::type expm1(T); template typename tools::promote_args::type expm1(T, const Policy&); template typename tools::promote_args::type powm1(const T1 a, const T2 z); template typename tools::promote_args::type powm1(const T1 a, const T2 z, const Policy&); template typename tools::promote_args::type sqrt1pm1(const T& val); template typename tools::promote_args::type sqrt1pm1(const T& val, const Policy&); template typename tools::promote_args::type sinc_pi(T x); template typename tools::promote_args::type sinc_pi(T x, const Policy&); template typename tools::promote_args::type sinhc_pi(T x); template typename tools::promote_args::type sinhc_pi(T x, const Policy&); template typename tools::promote_args::type asinh(T x); template typename tools::promote_args::type asinh(T x, const Policy&); template typename tools::promote_args::type acosh(T x); template typename tools::promote_args::type acosh(T x, const Policy&); template typename tools::promote_args::type atanh(T x); template typename tools::promote_args::type atanh(T x, const Policy&); namespace detail{ typedef mpl::int_<0> bessel_no_int_tag; typedef mpl::int_<1> bessel_maybe_int_tag; typedef mpl::int_<2> bessel_int_tag; template struct bessel_traits { typedef typename tools::promote_args< T1, T2 >::type result_type; typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_< mpl::less_equal >, mpl::greater > >, bessel_no_int_tag, typename mpl::if_< is_integral, bessel_int_tag, bessel_maybe_int_tag >::type >::type optimisation_tag; }; } template typename detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_j(T1 v, T2 x); template typename detail::bessel_traits::result_type sph_bessel(unsigned v, T x, const Policy& pol); template typename detail::bessel_traits >::result_type sph_bessel(unsigned v, T x); template typename detail::bessel_traits::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_i(T1 v, T2 x); template typename detail::bessel_traits::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_k(T1 v, T2 x); template typename detail::bessel_traits::result_type cyl_neumann(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_neumann(T1 v, T2 x); template typename detail::bessel_traits::result_type sph_neumann(unsigned v, T x, const Policy& pol); template typename detail::bessel_traits >::result_type sph_neumann(unsigned v, T x); template typename tools::promote_args::type sin_pi(T x, const Policy&); template typename tools::promote_args::type sin_pi(T x); template typename tools::promote_args::type cos_pi(T x, const Policy&); template typename tools::promote_args::type cos_pi(T x); template int fpclassify (T t); template bool isfinite (T z); template bool isinf (T t); template bool isnan (T t); template bool isnormal (T t); template int signbit (T x); template int sign (const T& z); template T copysign (const T& x, const T& y); template T changesign (const T& z); namespace detail{ template struct expint_result { typedef typename mpl::if_< policies::is_policy, typename tools::promote_args::type, typename tools::promote_args::type >::type type; }; } template typename tools::promote_args::type expint(unsigned n, T z, const Policy&); template typename detail::expint_result::type expint(T const z, U const u); template typename tools::promote_args::type expint(T z); template typename tools::promote_args::type zeta(T s, const Policy&); template typename tools::promote_args::type zeta(T s); template typename tools::promote_args::type pow(T base, const Policy& policy); template typename tools::promote_args::type pow(T base); template T nextafter(const T&, const T&, const Policy&); template T nextafter(const T&, const T&); template T float_next(const T&, const Policy&); template T float_next(const T&); template T float_prior(const T&, const Policy&); template T float_prior(const T&); template T float_distance(const T&, const T&, const Policy&); template T float_distance(const T&, const T&); } } # 23 "/localhome/glisse2/include/boost/math/special_functions/acosh.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/series.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/tools/series.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/tools/series.hpp" 2 namespace boost{ namespace math{ namespace tools{ template inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms, const V& init_value) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename Functor::result_type result_type; boost::uintmax_t counter = max_terms; result_type result = init_value; result_type next_term; do{ next_term = func(); result += next_term; } while((fabs(factor * result) < fabs(next_term)) && --counter); max_terms = max_terms - counter; return result; } template inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms) { typename Functor::result_type init_value = 0; return sum_series(func, factor, max_terms, init_value); } template inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, const U& init_value) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename Functor::result_type result_type; result_type factor = ldexp(result_type(1), 1 - bits); return sum_series(func, factor, max_terms, init_value); } template inline typename Functor::result_type sum_series(Functor& func, int bits) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename Functor::result_type result_type; boost::uintmax_t iters = (std::numeric_limits::max)(); result_type init_val = 0; return sum_series(func, bits, iters, init_val); } template inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename Functor::result_type result_type; result_type init_val = 0; return sum_series(func, bits, max_terms, init_val); } template inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; boost::uintmax_t iters = (std::numeric_limits::max)(); return sum_series(func, bits, iters, init_value); } # 101 "/localhome/glisse2/include/boost/math/tools/series.hpp" template inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename Functor::result_type result_type; result_type factor = pow(result_type(2), bits); result_type result = func(); result_type next_term, y, t; result_type carry = 0; do{ next_term = func(); y = next_term - carry; t = result + y; carry = t - result; carry -= y; result = t; } while(fabs(result) < fabs(factor * next_term)); return result; } template inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename Functor::result_type result_type; boost::uintmax_t counter = max_terms; result_type factor = ldexp(result_type(1), bits); result_type result = func(); result_type next_term, y, t; result_type carry = 0; do{ next_term = func(); y = next_term - carry; t = result + y; carry = t - result; carry -= y; result = t; } while((fabs(result) < fabs(factor * next_term)) && --counter); max_terms = max_terms - counter; return result; } } } } # 18 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/tools/rational.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/tools/rational.hpp" # 1 "/localhome/glisse2/include/boost/array.hpp" 1 # 41 "/localhome/glisse2/include/boost/array.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 42 "/localhome/glisse2/include/boost/array.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 44 "/localhome/glisse2/include/boost/array.hpp" 2 # 1 "/localhome/glisse2/include/boost/swap.hpp" 1 # 45 "/localhome/glisse2/include/boost/array.hpp" 2 # 55 "/localhome/glisse2/include/boost/array.hpp" namespace boost { template class array { public: T elems[N]; public: typedef T value_type; typedef T* iterator; typedef const T* const_iterator; typedef T& reference; typedef const T& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; iterator begin() { return elems; } const_iterator begin() const { return elems; } const_iterator cbegin() const { return elems; } iterator end() { return elems+N; } const_iterator end() const { return elems+N; } const_iterator cend() const { return elems+N; } typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; # 102 "/localhome/glisse2/include/boost/array.hpp" reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } reference operator[](size_type i) { ((i < N && "out of range") ? static_cast (0) : __assert_fail ("i < N && \"out of range\"", "/localhome/glisse2/include/boost/array.hpp", 121, __PRETTY_FUNCTION__)); return elems[i]; } const_reference operator[](size_type i) const { ((i < N && "out of range") ? static_cast (0) : __assert_fail ("i < N && \"out of range\"", "/localhome/glisse2/include/boost/array.hpp", 127, __PRETTY_FUNCTION__)); return elems[i]; } reference at(size_type i) { rangecheck(i); return elems[i]; } const_reference at(size_type i) const { rangecheck(i); return elems[i]; } reference front() { return elems[0]; } const_reference front() const { return elems[0]; } reference back() { return elems[N-1]; } const_reference back() const { return elems[N-1]; } static size_type size() { return N; } static bool empty() { return false; } static size_type max_size() { return N; } enum { static_size = N }; void swap (array& y) { for (size_type i = 0; i < N; ++i) boost::swap(elems[i],y.elems[i]); } const T* data() const { return elems; } T* data() { return elems; } T* c_array() { return elems; } template array& operator= (const array& rhs) { std::copy(rhs.begin(),rhs.end(), begin()); return *this; } void assign (const T& value) { fill ( value ); } void fill (const T& value) { std::fill_n(begin(),size(),value); } static void rangecheck (size_type i) { if (i >= size()) { std::out_of_range e("array<>: index out of range"); boost::throw_exception(e); } } }; template< class T > class array< T, 0 > { public: typedef T value_type; typedef T* iterator; typedef const T* const_iterator; typedef T& reference; typedef const T& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } iterator end() { return begin(); } const_iterator end() const { return begin(); } const_iterator cend() const { return cbegin(); } typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; # 243 "/localhome/glisse2/include/boost/array.hpp" reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } reference operator[](size_type ) { return failed_rangecheck(); } const_reference operator[](size_type ) const { return failed_rangecheck(); } reference at(size_type ) { return failed_rangecheck(); } const_reference at(size_type ) const { return failed_rangecheck(); } reference front() { return failed_rangecheck(); } const_reference front() const { return failed_rangecheck(); } reference back() { return failed_rangecheck(); } const_reference back() const { return failed_rangecheck(); } static size_type size() { return 0; } static bool empty() { return true; } static size_type max_size() { return 0; } enum { static_size = 0 }; void swap (array& ) { } const T* data() const { return 0; } T* data() { return 0; } T* c_array() { return 0; } template array& operator= (const array& ) { return *this; } void assign (const T& value) { fill ( value ); } void fill (const T& ) {} static reference failed_rangecheck () { std::out_of_range e("attempt to access element of an empty array"); boost::throw_exception(e); static T placeholder; return placeholder; } }; template bool operator== (const array& x, const array& y) { return std::equal(x.begin(), x.end(), y.begin()); } template bool operator< (const array& x, const array& y) { return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); } template bool operator!= (const array& x, const array& y) { return !(x==y); } template bool operator> (const array& x, const array& y) { return y bool operator<= (const array& x, const array& y) { return !(y bool operator>= (const array& x, const array& y) { return !(x inline void swap (array& x, array& y) { x.swap(y); } # 398 "/localhome/glisse2/include/boost/array.hpp" template T(&get_c_array(boost::array& arg))[N] { return arg.elems; } template const T(&get_c_array(const boost::array& arg))[N] { return arg.elems; } # 430 "/localhome/glisse2/include/boost/array.hpp" } # 14 "/localhome/glisse2/include/boost/math/tools/rational.hpp" 2 # 27 "/localhome/glisse2/include/boost/math/tools/rational.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/detail/polynomial_horner3_17.hpp" 1 # 12 "/localhome/glisse2/include/boost/math/tools/detail/polynomial_horner3_17.hpp" namespace boost{ namespace math{ namespace tools{ namespace detail{ template inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<0>*) { return static_cast(0); } template inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*) { return static_cast(a[0]); } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*) { return static_cast(a[1] * x + a[0]); } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*) { V x2 = x * x; V t[2]; t[0] = static_cast(a[4] * x2 + a[2]); t[1] = static_cast(a[3] * x2 + a[1]); t[0] *= x2; t[0] += static_cast(a[0]); t[1] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*) { V x2 = x * x; V t[2]; t[0] = a[5] * x2 + a[3]; t[1] = a[4] * x2 + a[2]; t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[0] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*) { V x2 = x * x; V t[2]; t[0] = static_cast(a[6] * x2 + a[4]); t[1] = static_cast(a[5] * x2 + a[3]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[0] *= x2; t[0] += static_cast(a[0]); t[1] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*) { V x2 = x * x; V t[2]; t[0] = a[7] * x2 + a[5]; t[1] = a[6] * x2 + a[4]; t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[0] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*) { V x2 = x * x; V t[2]; t[0] = static_cast(a[8] * x2 + a[6]); t[1] = static_cast(a[7] * x2 + a[5]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[0] *= x2; t[0] += static_cast(a[0]); t[1] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*) { V x2 = x * x; V t[2]; t[0] = a[9] * x2 + a[7]; t[1] = a[8] * x2 + a[6]; t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[0] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*) { V x2 = x * x; V t[2]; t[0] = static_cast(a[10] * x2 + a[8]); t[1] = static_cast(a[9] * x2 + a[7]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[0] *= x2; t[0] += static_cast(a[0]); t[1] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*) { V x2 = x * x; V t[2]; t[0] = a[11] * x2 + a[9]; t[1] = a[10] * x2 + a[8]; t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[7]); t[1] += static_cast(a[6]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[0] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*) { V x2 = x * x; V t[2]; t[0] = static_cast(a[12] * x2 + a[10]); t[1] = static_cast(a[11] * x2 + a[9]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[8]); t[1] += static_cast(a[7]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[0] *= x2; t[0] += static_cast(a[0]); t[1] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*) { V x2 = x * x; V t[2]; t[0] = a[13] * x2 + a[11]; t[1] = a[12] * x2 + a[10]; t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[9]); t[1] += static_cast(a[8]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[7]); t[1] += static_cast(a[6]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[0] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<15>*) { V x2 = x * x; V t[2]; t[0] = static_cast(a[14] * x2 + a[12]); t[1] = static_cast(a[13] * x2 + a[11]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[10]); t[1] += static_cast(a[9]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[8]); t[1] += static_cast(a[7]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[0] *= x2; t[0] += static_cast(a[0]); t[1] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<16>*) { V x2 = x * x; V t[2]; t[0] = a[15] * x2 + a[13]; t[1] = a[14] * x2 + a[12]; t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[11]); t[1] += static_cast(a[10]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[9]); t[1] += static_cast(a[8]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[7]); t[1] += static_cast(a[6]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[0] *= x; return t[0] + t[1]; } template inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<17>*) { V x2 = x * x; V t[2]; t[0] = static_cast(a[16] * x2 + a[14]); t[1] = static_cast(a[15] * x2 + a[13]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[12]); t[1] += static_cast(a[11]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[10]); t[1] += static_cast(a[9]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[8]); t[1] += static_cast(a[7]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[0] *= x2; t[1] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[0] *= x2; t[0] += static_cast(a[0]); t[1] *= x; return t[0] + t[1]; } }}}} # 28 "/localhome/glisse2/include/boost/math/tools/rational.hpp" 2 # 40 "/localhome/glisse2/include/boost/math/tools/rational.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/detail/rational_horner3_17.hpp" 1 # 12 "/localhome/glisse2/include/boost/math/tools/detail/rational_horner3_17.hpp" namespace boost{ namespace math{ namespace tools{ namespace detail{ template inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<0>*) { return static_cast(0); } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*) { return static_cast(a[0]) / static_cast(b[0]); } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[4] * x2 + a[2]; t[1] = a[3] * x2 + a[1]; t[2] = b[4] * x2 + b[2]; t[3] = b[3] * x2 + b[1]; t[0] *= x2; t[2] *= x2; t[0] += static_cast(a[0]); t[2] += static_cast(b[0]); t[1] *= x; t[3] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[2] *= z2; t[0] += static_cast(a[4]); t[2] += static_cast(b[4]); t[1] *= z; t[3] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[5] * x2 + a[3]; t[1] = a[4] * x2 + a[2]; t[2] = b[5] * x2 + b[3]; t[3] = b[4] * x2 + b[2]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[2] += static_cast(b[1]); t[3] += static_cast(b[0]); t[0] *= x; t[2] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z; t[2] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[6] * x2 + a[4]; t[1] = a[5] * x2 + a[3]; t[2] = b[6] * x2 + b[4]; t[3] = b[5] * x2 + b[3]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[2] += static_cast(b[2]); t[3] += static_cast(b[1]); t[0] *= x2; t[2] *= x2; t[0] += static_cast(a[0]); t[2] += static_cast(b[0]); t[1] *= x; t[3] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[2] *= z2; t[0] += static_cast(a[6]); t[2] += static_cast(b[6]); t[1] *= z; t[3] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<8>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[7] * x2 + a[5]; t[1] = a[6] * x2 + a[4]; t[2] = b[7] * x2 + b[5]; t[3] = b[6] * x2 + b[4]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[2] += static_cast(b[3]); t[3] += static_cast(b[2]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[2] += static_cast(b[1]); t[3] += static_cast(b[0]); t[0] *= x; t[2] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z; t[2] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<9>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[8] * x2 + a[6]; t[1] = a[7] * x2 + a[5]; t[2] = b[8] * x2 + b[6]; t[3] = b[7] * x2 + b[5]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[2] += static_cast(b[4]); t[3] += static_cast(b[3]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[2] += static_cast(b[2]); t[3] += static_cast(b[1]); t[0] *= x2; t[2] *= x2; t[0] += static_cast(a[0]); t[2] += static_cast(b[0]); t[1] *= x; t[3] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[2] *= z2; t[0] += static_cast(a[8]); t[2] += static_cast(b[8]); t[1] *= z; t[3] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<10>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[9] * x2 + a[7]; t[1] = a[8] * x2 + a[6]; t[2] = b[9] * x2 + b[7]; t[3] = b[8] * x2 + b[6]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[2] += static_cast(b[5]); t[3] += static_cast(b[4]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[2] += static_cast(b[3]); t[3] += static_cast(b[2]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[2] += static_cast(b[1]); t[3] += static_cast(b[0]); t[0] *= x; t[2] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z; t[2] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<11>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[10] * x2 + a[8]; t[1] = a[9] * x2 + a[7]; t[2] = b[10] * x2 + b[8]; t[3] = b[9] * x2 + b[7]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[2] += static_cast(b[6]); t[3] += static_cast(b[5]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[2] += static_cast(b[4]); t[3] += static_cast(b[3]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[2] += static_cast(b[2]); t[3] += static_cast(b[1]); t[0] *= x2; t[2] *= x2; t[0] += static_cast(a[0]); t[2] += static_cast(b[0]); t[1] *= x; t[3] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z2; t[2] *= z2; t[0] += static_cast(a[10]); t[2] += static_cast(b[10]); t[1] *= z; t[3] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<12>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[11] * x2 + a[9]; t[1] = a[10] * x2 + a[8]; t[2] = b[11] * x2 + b[9]; t[3] = b[10] * x2 + b[8]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[7]); t[1] += static_cast(a[6]); t[2] += static_cast(b[7]); t[3] += static_cast(b[6]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[2] += static_cast(b[5]); t[3] += static_cast(b[4]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[2] += static_cast(b[3]); t[3] += static_cast(b[2]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[2] += static_cast(b[1]); t[3] += static_cast(b[0]); t[0] *= x; t[2] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[10]); t[1] += static_cast(a[11]); t[2] += static_cast(b[10]); t[3] += static_cast(b[11]); t[0] *= z; t[2] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<13>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[12] * x2 + a[10]; t[1] = a[11] * x2 + a[9]; t[2] = b[12] * x2 + b[10]; t[3] = b[11] * x2 + b[9]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[8]); t[1] += static_cast(a[7]); t[2] += static_cast(b[8]); t[3] += static_cast(b[7]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[2] += static_cast(b[6]); t[3] += static_cast(b[5]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[2] += static_cast(b[4]); t[3] += static_cast(b[3]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[2] += static_cast(b[2]); t[3] += static_cast(b[1]); t[0] *= x2; t[2] *= x2; t[0] += static_cast(a[0]); t[2] += static_cast(b[0]); t[1] *= x; t[3] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[10]); t[1] += static_cast(a[11]); t[2] += static_cast(b[10]); t[3] += static_cast(b[11]); t[0] *= z2; t[2] *= z2; t[0] += static_cast(a[12]); t[2] += static_cast(b[12]); t[1] *= z; t[3] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<14>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[13] * x2 + a[11]; t[1] = a[12] * x2 + a[10]; t[2] = b[13] * x2 + b[11]; t[3] = b[12] * x2 + b[10]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[9]); t[1] += static_cast(a[8]); t[2] += static_cast(b[9]); t[3] += static_cast(b[8]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[7]); t[1] += static_cast(a[6]); t[2] += static_cast(b[7]); t[3] += static_cast(b[6]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[2] += static_cast(b[5]); t[3] += static_cast(b[4]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[2] += static_cast(b[3]); t[3] += static_cast(b[2]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[2] += static_cast(b[1]); t[3] += static_cast(b[0]); t[0] *= x; t[2] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[10]); t[1] += static_cast(a[11]); t[2] += static_cast(b[10]); t[3] += static_cast(b[11]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[12]); t[1] += static_cast(a[13]); t[2] += static_cast(b[12]); t[3] += static_cast(b[13]); t[0] *= z; t[2] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<15>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[14] * x2 + a[12]; t[1] = a[13] * x2 + a[11]; t[2] = b[14] * x2 + b[12]; t[3] = b[13] * x2 + b[11]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[10]); t[1] += static_cast(a[9]); t[2] += static_cast(b[10]); t[3] += static_cast(b[9]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[8]); t[1] += static_cast(a[7]); t[2] += static_cast(b[8]); t[3] += static_cast(b[7]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[2] += static_cast(b[6]); t[3] += static_cast(b[5]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[2] += static_cast(b[4]); t[3] += static_cast(b[3]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[2] += static_cast(b[2]); t[3] += static_cast(b[1]); t[0] *= x2; t[2] *= x2; t[0] += static_cast(a[0]); t[2] += static_cast(b[0]); t[1] *= x; t[3] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[10]); t[1] += static_cast(a[11]); t[2] += static_cast(b[10]); t[3] += static_cast(b[11]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[12]); t[1] += static_cast(a[13]); t[2] += static_cast(b[12]); t[3] += static_cast(b[13]); t[0] *= z2; t[2] *= z2; t[0] += static_cast(a[14]); t[2] += static_cast(b[14]); t[1] *= z; t[3] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<16>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[15] * x2 + a[13]; t[1] = a[14] * x2 + a[12]; t[2] = b[15] * x2 + b[13]; t[3] = b[14] * x2 + b[12]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[11]); t[1] += static_cast(a[10]); t[2] += static_cast(b[11]); t[3] += static_cast(b[10]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[9]); t[1] += static_cast(a[8]); t[2] += static_cast(b[9]); t[3] += static_cast(b[8]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[7]); t[1] += static_cast(a[6]); t[2] += static_cast(b[7]); t[3] += static_cast(b[6]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[5]); t[1] += static_cast(a[4]); t[2] += static_cast(b[5]); t[3] += static_cast(b[4]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[3]); t[1] += static_cast(a[2]); t[2] += static_cast(b[3]); t[3] += static_cast(b[2]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[1]); t[1] += static_cast(a[0]); t[2] += static_cast(b[1]); t[3] += static_cast(b[0]); t[0] *= x; t[2] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[10]); t[1] += static_cast(a[11]); t[2] += static_cast(b[10]); t[3] += static_cast(b[11]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[12]); t[1] += static_cast(a[13]); t[2] += static_cast(b[12]); t[3] += static_cast(b[13]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[14]); t[1] += static_cast(a[15]); t[2] += static_cast(b[14]); t[3] += static_cast(b[15]); t[0] *= z; t[2] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } template inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<17>*) { if(x <= 1) { V x2 = x * x; V t[4]; t[0] = a[16] * x2 + a[14]; t[1] = a[15] * x2 + a[13]; t[2] = b[16] * x2 + b[14]; t[3] = b[15] * x2 + b[13]; t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[12]); t[1] += static_cast(a[11]); t[2] += static_cast(b[12]); t[3] += static_cast(b[11]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[10]); t[1] += static_cast(a[9]); t[2] += static_cast(b[10]); t[3] += static_cast(b[9]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[8]); t[1] += static_cast(a[7]); t[2] += static_cast(b[8]); t[3] += static_cast(b[7]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[6]); t[1] += static_cast(a[5]); t[2] += static_cast(b[6]); t[3] += static_cast(b[5]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[4]); t[1] += static_cast(a[3]); t[2] += static_cast(b[4]); t[3] += static_cast(b[3]); t[0] *= x2; t[1] *= x2; t[2] *= x2; t[3] *= x2; t[0] += static_cast(a[2]); t[1] += static_cast(a[1]); t[2] += static_cast(b[2]); t[3] += static_cast(b[1]); t[0] *= x2; t[2] *= x2; t[0] += static_cast(a[0]); t[2] += static_cast(b[0]); t[1] *= x; t[3] *= x; return (t[0] + t[1]) / (t[2] + t[3]); } else { V z = 1 / x; V z2 = 1 / (x * x); V t[4]; t[0] = a[0] * z2 + a[2]; t[1] = a[1] * z2 + a[3]; t[2] = b[0] * z2 + b[2]; t[3] = b[1] * z2 + b[3]; t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[4]); t[1] += static_cast(a[5]); t[2] += static_cast(b[4]); t[3] += static_cast(b[5]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[6]); t[1] += static_cast(a[7]); t[2] += static_cast(b[6]); t[3] += static_cast(b[7]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[8]); t[1] += static_cast(a[9]); t[2] += static_cast(b[8]); t[3] += static_cast(b[9]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[10]); t[1] += static_cast(a[11]); t[2] += static_cast(b[10]); t[3] += static_cast(b[11]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[12]); t[1] += static_cast(a[13]); t[2] += static_cast(b[12]); t[3] += static_cast(b[13]); t[0] *= z2; t[1] *= z2; t[2] *= z2; t[3] *= z2; t[0] += static_cast(a[14]); t[1] += static_cast(a[15]); t[2] += static_cast(b[14]); t[3] += static_cast(b[15]); t[0] *= z2; t[2] *= z2; t[0] += static_cast(a[16]); t[2] += static_cast(b[16]); t[1] *= z; t[3] *= z; return (t[0] + t[1]) / (t[2] + t[3]); } } }}}} # 41 "/localhome/glisse2/include/boost/math/tools/rational.hpp" 2 # 165 "/localhome/glisse2/include/boost/math/tools/rational.hpp" namespace boost{ namespace math{ namespace tools{ template U evaluate_polynomial(const T* poly, U const& z, std::size_t count); namespace detail{ template inline V evaluate_polynomial_c_imp(const T* a, const V& val, const Tag*) { return evaluate_polynomial(a, val, Tag::value); } } template inline U evaluate_polynomial(const T* poly, U const& z, std::size_t count) { ((count > 0) ? static_cast (0) : __assert_fail ("count > 0", "/localhome/glisse2/include/boost/math/tools/rational.hpp", 191, __PRETTY_FUNCTION__)); U sum = static_cast(poly[count - 1]); for(int i = static_cast(count) - 2; i >= 0; --i) { sum *= z; sum += static_cast(poly[i]); } return sum; } template inline V evaluate_polynomial(const T(&a)[N], const V& val) { typedef mpl::int_ tag_type; return detail::evaluate_polynomial_c_imp(static_cast(a), val, static_cast(0)); } template inline V evaluate_polynomial(const boost::array& a, const V& val) { typedef mpl::int_ tag_type; return detail::evaluate_polynomial_c_imp(static_cast(a.data()), val, static_cast(0)); } template inline U evaluate_even_polynomial(const T* poly, U z, std::size_t count) { return evaluate_polynomial(poly, U(z*z), count); } template inline V evaluate_even_polynomial(const T(&a)[N], const V& z) { return evaluate_polynomial(a, V(z*z)); } template inline V evaluate_even_polynomial(const boost::array& a, const V& z) { return evaluate_polynomial(a, V(z*z)); } template inline U evaluate_odd_polynomial(const T* poly, U z, std::size_t count) { return poly[0] + z * evaluate_polynomial(poly+1, U(z*z), count-1); } template inline V evaluate_odd_polynomial(const T(&a)[N], const V& z) { typedef mpl::int_ tag_type; return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a) + 1, V(z*z), static_cast(0)); } template inline V evaluate_odd_polynomial(const boost::array& a, const V& z) { typedef mpl::int_ tag_type; return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a.data()) + 1, V(z*z), static_cast(0)); } template V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count); namespace detail{ template inline V evaluate_rational_c_imp(const T* num, const U* denom, const V& z, const Tag*) { return boost::math::tools::evaluate_rational(num, denom, z, Tag::value); } } # 280 "/localhome/glisse2/include/boost/math/tools/rational.hpp" template V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count) { V z(z_); V s1, s2; if(z <= 1) { s1 = static_cast(num[count-1]); s2 = static_cast(denom[count-1]); for(int i = (int)count - 2; i >= 0; --i) { s1 *= z; s2 *= z; s1 += num[i]; s2 += denom[i]; } } else { z = 1 / z; s1 = static_cast(num[0]); s2 = static_cast(denom[0]); for(unsigned i = 1; i < count; ++i) { s1 *= z; s2 *= z; s1 += num[i]; s2 += denom[i]; } } return s1 / s2; } template inline V evaluate_rational(const T(&a)[N], const U(&b)[N], const V& z) { return detail::evaluate_rational_c_imp(a, b, z, static_cast*>(0)); } template inline V evaluate_rational(const boost::array& a, const boost::array& b, const V& z) { return detail::evaluate_rational_c_imp(a.data(), b.data(), z, static_cast*>(0)); } } } } # 19 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" 2 # 28 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" namespace boost{ namespace math{ namespace detail { template struct log1p_series { typedef T result_type; log1p_series(T x) : k(0), m_mult(-x), m_prod(-1){} T operator()() { m_prod *= m_mult; return m_prod / ++k; } int count()const { return k; } private: int k; const T m_mult; T m_prod; log1p_series(const log1p_series&); log1p_series& operator=(const log1p_series&); }; # 72 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" template T log1p_imp(T const & x, const Policy& pol, const mpl::int_<0>&) { typedef typename tools::promote_args::type result_type; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::log1p<%1%>(%1%)"; if(x < -1) return policies::raise_domain_error( function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( function, 0, pol); result_type a = abs(result_type(x)); if(a > result_type(0.5f)) return log(1 + result_type(x)); if(a < tools::epsilon()) return x; detail::log1p_series s(x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result_type result = tools::sum_series(s, policies::get_epsilon(), max_iter); policies::check_series_iterations(function, max_iter, pol); return result; } template T log1p_imp(T const& x, const Policy& pol, const mpl::int_<53>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::log1p<%1%>(%1%)"; if(x < -1) return policies::raise_domain_error( function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( function, 0, pol); T a = fabs(x); if(a > 0.5f) return log(1 + x); if(a < tools::epsilon()) return x; static const T P[] = { 0.15141069795941984e-16L, 0.35495104378055055e-15L, 0.33333333333332835L, 0.99249063543365859L, 1.1143969784156509L, 0.58052937949269651L, 0.13703234928513215L, 0.011294864812099712L }; static const T Q[] = { 1L, 3.7274719063011499L, 5.5387948649720334L, 4.159201143419005L, 1.6423855110312755L, 0.31706251443180914L, 0.022665554431410243L, -0.29252538135177773e-5L }; T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); result *= x; return result; } template T log1p_imp(T const& x, const Policy& pol, const mpl::int_<64>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::log1p<%1%>(%1%)"; if(x < -1) return policies::raise_domain_error( function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( function, 0, pol); T a = fabs(x); if(a > 0.5f) return log(1 + x); if(a < tools::epsilon()) return x; static const T P[] = { -0.807533446680736736712e-19L, -0.490881544804798926426e-18L, 0.333333333333333373941L, 1.17141290782087994162L, 1.62790522814926264694L, 1.13156411870766876113L, 0.408087379932853785336L, 0.0706537026422828914622L, 0.00441709903782239229447L }; static const T Q[] = { 1L, 4.26423872346263928361L, 7.48189472704477708962L, 6.94757016732904280913L, 3.6493508622280767304L, 1.06884863623790638317L, 0.158292216998514145947L, 0.00885295524069924328658L, -0.560026216133415663808e-6L }; T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); result *= x; return result; } template T log1p_imp(T const& x, const Policy& pol, const mpl::int_<24>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::log1p<%1%>(%1%)"; if(x < -1) return policies::raise_domain_error( function, "log1p(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( function, 0, pol); T a = fabs(x); if(a > 0.5f) return log(1 + x); if(a < tools::epsilon()) return x; static const T P[] = { -0.671192866803148236519e-7L, 0.119670999140731844725e-6L, 0.333339469182083148598L, 0.237827183019664122066L }; static const T Q[] = { 1L, 1.46348272586988539733L, 0.497859871350117338894L, -0.00471666268910169651936L }; T result = 1 - x / 2 + tools::evaluate_polynomial(P, x) / tools::evaluate_polynomial(Q, x); result *= x; return result; } } template inline typename tools::promote_args::type log1p(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; typedef typename mpl::if_< mpl::less_equal >, mpl::int_<0>, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, mpl::int_<0> >::type >::type >::type tag_type; return policies::checked_narrowing_cast( detail::log1p_imp(static_cast(x), forwarding_policy(), tag_type()), "boost::math::log1p<%1%>(%1%)"); } # 319 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" template inline float log1p(float x, const Policy& pol) { if(x < -1) return policies::raise_domain_error( "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( "log1p<%1%>(%1%)", 0, pol); return ::log1pf(x); } template inline long double log1p(long double x, const Policy& pol) { if(x < -1) return policies::raise_domain_error( "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( "log1p<%1%>(%1%)", 0, pol); return ::log1pl(x); } # 356 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" template inline double log1p(double x, const Policy& pol) { if(x < -1) return policies::raise_domain_error( "log1p<%1%>(%1%)", "log1p(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( "log1p<%1%>(%1%)", 0, pol); return ::log1p(x); } # 416 "/localhome/glisse2/include/boost/math/special_functions/log1p.hpp" template inline typename tools::promote_args::type log1p(T x) { return boost::math::log1p(x, policies::policy<>()); } template inline typename tools::promote_args::type log1pmx(T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::log1pmx<%1%>(%1%)"; if(x < -1) return policies::raise_domain_error( function, "log1pmx(x) requires x > -1, but got x = %1%.", x, pol); if(x == -1) return -policies::raise_overflow_error( function, 0, pol); result_type a = abs(result_type(x)); if(a > result_type(0.95f)) return log(1 + result_type(x)) - result_type(x); if(a < tools::epsilon()) return -x * x / 2; boost::math::detail::log1p_series s(x); s(); boost::uintmax_t max_iter = policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter); policies::check_series_iterations(function, max_iter, pol); return result; } template inline typename tools::promote_args::type log1pmx(T x) { return log1pmx(x, policies::policy<>()); } } } # 24 "/localhome/glisse2/include/boost/math/special_functions/acosh.hpp" 2 namespace boost { namespace math { namespace detail { # 44 "/localhome/glisse2/include/boost/math/special_functions/acosh.hpp" template inline T acosh_imp(const T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(x < 1) { return policies::raise_domain_error( "boost::math::acosh<%1%>(%1%)", "acosh requires x >= 1, but got x = %1%.", x, pol); } else if ((x - 1) >= tools::root_epsilon()) { if (x > 1 / tools::root_epsilon()) { return( log( x * 2) ); } else if(x < 1.5f) { T y = x - 1; return boost::math::log1p(y + sqrt(y * y + 2 * y), pol); } else { return( log( x + sqrt(x * x - 1) ) ); } } else { T y = x - 1; T result = sqrt(2 * y) * (1 - y /12 + 3 * y * y / 160); return result; } } } template inline typename tools::promote_args::type acosh(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast( detail::acosh_imp(static_cast(x), forwarding_policy()), "boost::math::acosh<%1%>(%1%)"); } template inline typename tools::promote_args::type acosh(T x) { return boost::math::acosh(x, policies::policy<>()); } } } # 16 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/asinh.hpp" 1 # 23 "/localhome/glisse2/include/boost/math/special_functions/asinh.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/sqrt1pm1.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/special_functions/sqrt1pm1.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/expm1.hpp" 1 # 30 "/localhome/glisse2/include/boost/math/special_functions/expm1.hpp" namespace boost{ namespace math{ namespace detail { template struct expm1_series { typedef T result_type; expm1_series(T x) : k(0), m_x(x), m_term(1) {} T operator()() { ++k; m_term *= m_x; m_term /= k; return m_term; } int count()const { return k; } private: int k; const T m_x; T m_term; expm1_series(const expm1_series&); expm1_series& operator=(const expm1_series&); }; template T expm1_imp(T x, const mpl::int_<0>&, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T a = fabs(x); if(a > T(0.5f)) { if(a >= tools::log_max_value()) { if(x > 0) return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); return -1; } return exp(x) - T(1); } if(a < tools::epsilon()) return x; detail::expm1_series s(x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); T result = tools::sum_series(s, policies::get_epsilon(), max_iter); policies::check_series_iterations("boost::math::expm1<%1%>(%1%)", max_iter, pol); return result; } template T expm1_imp(T x, const mpl::int_<53>&, const P& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T a = fabs(x); if(a > T(0.5L)) { if(a >= tools::log_max_value()) { if(x > 0) return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); return -1; } return exp(x) - T(1); } if(a < tools::epsilon()) return x; static const float Y = 0.10281276702880859e1f; static const T n[] = { -0.28127670288085937e-1, 0.51278186299064534e0, -0.6310029069350198e-1, 0.11638457975729296e-1, -0.52143390687521003e-3, 0.21491399776965688e-4 }; static const T d[] = { 1, -0.45442309511354755e0, 0.90850389570911714e-1, -0.10088963629815502e-1, 0.63003407478692265e-3, -0.17976570003654402e-4 }; T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); return result; } template T expm1_imp(T x, const mpl::int_<64>&, const P& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T a = fabs(x); if(a > T(0.5L)) { if(a >= tools::log_max_value()) { if(x > 0) return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); return -1; } return exp(x) - T(1); } if(a < tools::epsilon()) return x; static const float Y = 0.10281276702880859375e1f; static const T n[] = { -0.281276702880859375e-1L, 0.512980290285154286358e0L, -0.667758794592881019644e-1L, 0.131432469658444745835e-1L, -0.72303795326880286965e-3L, 0.447441185192951335042e-4L, -0.714539134024984593011e-6L }; static const T d[] = { 1, -0.461477618025562520389e0L, 0.961237488025708540713e-1L, -0.116483957658204450739e-1L, 0.873308008461557544458e-3L, -0.387922804997682392562e-4L, 0.807473180049193557294e-6L }; T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); return result; } template T expm1_imp(T x, const mpl::int_<113>&, const P& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T a = fabs(x); if(a > T(0.5L)) { if(a >= tools::log_max_value()) { if(x > 0) return policies::raise_overflow_error("boost::math::expm1<%1%>(%1%)", 0, pol); return -1; } return exp(x) - T(1); } if(a < tools::epsilon()) return x; static const float Y = 0.10281276702880859375e1f; static const T n[] = { -0.28127670288085937499999999999999999854e-1L, 0.51278156911210477556524452177540792214e0L, -0.63263178520747096729500254678819588223e-1L, 0.14703285606874250425508446801230572252e-1L, -0.8675686051689527802425310407898459386e-3L, 0.88126359618291165384647080266133492399e-4L, -0.25963087867706310844432390015463138953e-5L, 0.14226691087800461778631773363204081194e-6L, -0.15995603306536496772374181066765665596e-8L, 0.45261820069007790520447958280473183582e-10L }; static const T d[] = { 1, -0.45441264709074310514348137469214538853e0L, 0.96827131936192217313133611655555298106e-1L, -0.12745248725908178612540554584374876219e-1L, 0.11473613871583259821612766907781095472e-2L, -0.73704168477258911962046591907690764416e-4L, 0.34087499397791555759285503797256103259e-5L, -0.11114024704296196166272091230695179724e-6L, 0.23987051614110848595909588343223896577e-8L, -0.29477341859111589208776402638429026517e-10L, 0.13222065991022301420255904060628100924e-12L }; T result = x * Y + x * tools::evaluate_polynomial(n, x) / tools::evaluate_polynomial(d, x); return result; } } template inline typename tools::promote_args::type expm1(T x, const Policy& ) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; typedef typename mpl::if_c< ::std::numeric_limits::is_specialized == 0, mpl::int_<0>, typename mpl::if_< typename mpl::less_equal >::type, mpl::int_<53>, typename mpl::if_< typename mpl::less_equal >::type, mpl::int_<64>, typename mpl::if_< typename mpl::less_equal >::type, mpl::int_<113>, mpl::int_<0> >::type >::type >::type >::type tag_type; return policies::checked_narrowing_cast(detail::expm1_imp( static_cast(x), tag_type(), forwarding_policy()), "boost::math::expm1<%1%>(%1%)"); } # 269 "/localhome/glisse2/include/boost/math/special_functions/expm1.hpp" inline float expm1(float x, const policies::policy<>&){ return ::expm1f(x); } inline long double expm1(long double x, const policies::policy<>&){ return ::expm1l(x); } inline double expm1(double x, const policies::policy<>&){ return ::expm1(x); } template inline typename tools::promote_args::type expm1(T x) { return expm1(x, policies::policy<>()); } # 302 "/localhome/glisse2/include/boost/math/special_functions/expm1.hpp" } } # 15 "/localhome/glisse2/include/boost/math/special_functions/sqrt1pm1.hpp" 2 namespace boost{ namespace math{ template inline typename tools::promote_args::type sqrt1pm1(const T& val, const Policy& pol) { typedef typename tools::promote_args::type result_type; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(fabs(result_type(val)) > 0.75) return sqrt(1 + result_type(val)) - 1; return boost::math::expm1(boost::math::log1p(val, pol) / 2, pol); } template inline typename tools::promote_args::type sqrt1pm1(const T& val) { return sqrt1pm1(val, policies::policy<>()); } } } # 24 "/localhome/glisse2/include/boost/math/special_functions/asinh.hpp" 2 namespace boost { namespace math { namespace detail{ # 44 "/localhome/glisse2/include/boost/math/special_functions/asinh.hpp" template inline T asinh_imp(const T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if (x >= tools::forth_root_epsilon()) { if (x > 1 / tools::root_epsilon()) { return log(x * 2) + 1/ (4 * x * x); } else if(x < 0.5f) { return boost::math::log1p(x + boost::math::sqrt1pm1(x * x, pol), pol); } else { return( log( x + sqrt(x*x+1) ) ); } } else if (x <= -tools::forth_root_epsilon()) { return(-asinh(-x)); } else { T result = x; if (abs(x) >= tools::root_epsilon()) { T x3 = x*x*x; result -= x3/static_cast(6); } return(result); } } } template inline typename tools::promote_args::type asinh(T x) { return boost::math::asinh(x, policies::policy<>()); } template inline typename tools::promote_args::type asinh(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast( detail::asinh_imp(static_cast(x), forwarding_policy()), "boost::math::asinh<%1%>(%1%)"); } } } # 17 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/atanh.hpp" 1 # 28 "/localhome/glisse2/include/boost/math/special_functions/atanh.hpp" namespace boost { namespace math { namespace detail { # 47 "/localhome/glisse2/include/boost/math/special_functions/atanh.hpp" template inline T atanh_imp(const T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::atanh<%1%>(%1%)"; if(x < -1) { return policies::raise_domain_error( function, "atanh requires x >= -1, but got x = %1%.", x, pol); } else if(x < -1 + tools::epsilon()) { return -policies::raise_overflow_error(function, 0, pol); } else if(x > 1 - tools::epsilon()) { return policies::raise_overflow_error(function, 0, pol); } else if(x > 1) { return policies::raise_domain_error( function, "atanh requires x <= 1, but got x = %1%.", x, pol); } else if(abs(x) >= tools::forth_root_epsilon()) { if(abs(x) < 0.5f) return (boost::math::log1p(x, pol) - boost::math::log1p(-x, pol)) / 2; return(log( (1 + x) / (1 - x) ) / 2); } else { T result = x; if (abs(x) >= tools::root_epsilon()) { T x3 = x*x*x; result += x3/static_cast(3); } return(result); } } } template inline typename tools::promote_args::type atanh(T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast( detail::atanh_imp(static_cast(x), forwarding_policy()), "boost::math::atanh<%1%>(%1%)"); } template inline typename tools::promote_args::type atanh(T x) { return boost::math::atanh(x, policies::policy<>()); } } } # 18 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 1 # 24 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" # 1 "/localhome/glisse2/include/boost/lexical_cast.hpp" 1 # 23 "/localhome/glisse2/include/boost/lexical_cast.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 2 3 # 24 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 25 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 28 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdio" 3 # 29 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 32 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 40 "/localhome/glisse2/include/boost/lexical_cast.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/cast.hpp" 1 # 33 "/localhome/glisse2/include/boost/numeric/conversion/cast.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/converter.hpp" 1 # 13 "/localhome/glisse2/include/boost/numeric/conversion/converter.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/conversion_traits.hpp" 1 # 13 "/localhome/glisse2/include/boost/numeric/conversion/conversion_traits.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/conversion_traits.hpp" 1 # 17 "/localhome/glisse2/include/boost/numeric/conversion/detail/conversion_traits.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/meta.hpp" 1 # 23 "/localhome/glisse2/include/boost/numeric/conversion/detail/meta.hpp" namespace boost { namespace numeric { namespace convdetail { template< class T1, class T2> struct equal_to { enum { x = ( T1::value == T2::value ) }; static const bool value = x; typedef mpl::bool_ type; # 48 "/localhome/glisse2/include/boost/numeric/conversion/detail/meta.hpp" }; # 59 "/localhome/glisse2/include/boost/numeric/conversion/detail/meta.hpp" template struct ct_switch4 { typedef mpl::identity Case0TypeQ ; typedef mpl::identity Case1TypeQ ; typedef equal_to is_case0 ; typedef equal_to is_case1 ; typedef equal_to is_case2 ; typedef mpl::if_ choose_2_3Q ; typedef mpl::eval_if choose_1_2_3Q ; typedef typename mpl::eval_if::type type ; } ; # 97 "/localhome/glisse2/include/boost/numeric/conversion/detail/meta.hpp" template struct for_both { typedef mpl::identity TF_Q ; typedef mpl::identity TT_Q ; typedef typename mpl::not_::type not_expr0 ; typedef typename mpl::not_::type not_expr1 ; typedef typename mpl::and_::type caseTT ; typedef typename mpl::and_::type caseTF ; typedef typename mpl::and_::type caseFT ; typedef mpl::if_ choose_FT_FF_Q ; typedef mpl::eval_if choose_TF_FT_FF_Q ; typedef typename mpl::eval_if::type type ; } ; } } } # 18 "/localhome/glisse2/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/int_float_mixture.hpp" 1 # 16 "/localhome/glisse2/include/boost/numeric/conversion/detail/int_float_mixture.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/int_float_mixture_enum.hpp" 1 # 13 "/localhome/glisse2/include/boost/numeric/conversion/int_float_mixture_enum.hpp" namespace boost { namespace numeric { enum int_float_mixture_enum { integral_to_integral ,integral_to_float ,float_to_integral ,float_to_float } ; } } # 17 "/localhome/glisse2/include/boost/numeric/conversion/detail/int_float_mixture.hpp" 2 namespace boost { namespace numeric { namespace convdetail { typedef mpl::integral_c int2int_c ; typedef mpl::integral_c int2float_c ; typedef mpl::integral_c float2int_c ; typedef mpl::integral_c float2float_c ; template struct get_int_float_mixture { typedef mpl::bool_< ::std::numeric_limits::is_integer > S_int ; typedef mpl::bool_< ::std::numeric_limits::is_integer > T_int ; typedef typename for_both::type type ; } ; # 55 "/localhome/glisse2/include/boost/numeric/conversion/detail/int_float_mixture.hpp" template struct for_int_float_mixture { typedef typename ct_switch4::type type ; } ; } } } # 19 "/localhome/glisse2/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/sign_mixture.hpp" 1 # 16 "/localhome/glisse2/include/boost/numeric/conversion/detail/sign_mixture.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/sign_mixture_enum.hpp" 1 # 13 "/localhome/glisse2/include/boost/numeric/conversion/sign_mixture_enum.hpp" namespace boost { namespace numeric { enum sign_mixture_enum { unsigned_to_unsigned ,signed_to_signed ,signed_to_unsigned ,unsigned_to_signed } ; } } # 17 "/localhome/glisse2/include/boost/numeric/conversion/detail/sign_mixture.hpp" 2 namespace boost { namespace numeric { namespace convdetail { typedef mpl::integral_c unsig2unsig_c ; typedef mpl::integral_c sig2sig_c ; typedef mpl::integral_c sig2unsig_c ; typedef mpl::integral_c unsig2sig_c ; template struct get_sign_mixture { typedef mpl::bool_< ::std::numeric_limits::is_signed > S_signed ; typedef mpl::bool_< ::std::numeric_limits::is_signed > T_signed ; typedef typename for_both::type type ; } ; # 55 "/localhome/glisse2/include/boost/numeric/conversion/detail/sign_mixture.hpp" template struct for_sign_mixture { typedef typename ct_switch4::type type ; } ; } } } # 20 "/localhome/glisse2/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 1 # 15 "/localhome/glisse2/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp" 1 # 13 "/localhome/glisse2/include/boost/numeric/conversion/udt_builtin_mixture_enum.hpp" namespace boost { namespace numeric { enum udt_builtin_mixture_enum { builtin_to_builtin ,builtin_to_udt ,udt_to_builtin ,udt_to_udt } ; } } # 16 "/localhome/glisse2/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 2 namespace boost { namespace numeric { namespace convdetail { typedef mpl::integral_c builtin2builtin_c ; typedef mpl::integral_c builtin2udt_c ; typedef mpl::integral_c udt2builtin_c ; typedef mpl::integral_c udt2udt_c ; # 37 "/localhome/glisse2/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" template struct for_udt_builtin_mixture { typedef typename ct_switch4::type type ; } ; template struct get_udt_builtin_mixture { typedef is_arithmetic S_builtin ; typedef is_arithmetic T_builtin ; typedef typename for_both::type type ; } ; } } } # 21 "/localhome/glisse2/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/is_subranged.hpp" 1 # 17 "/localhome/glisse2/include/boost/numeric/conversion/detail/is_subranged.hpp" # 1 "/localhome/glisse2/include/boost/mpl/multiplies.hpp" 1 # 17 "/localhome/glisse2/include/boost/mpl/multiplies.hpp" # 1 "/localhome/glisse2/include/boost/mpl/times.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/times.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/times.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/times.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { }; template<> struct times< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : times< T1 , T2 > { }; }; template< typename Tag > struct lambda< times< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef times< na , na > result_; typedef times< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< times< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< times< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( N1::value * N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 35 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/times.hpp" 2 # 18 "/localhome/glisse2/include/boost/mpl/multiplies.hpp" 2 # 26 "/localhome/glisse2/include/boost/mpl/multiplies.hpp" namespace boost { namespace mpl { template< typename N1 = na , typename N2 = na , typename N3 = na , typename N4 = na , typename N5 = na > struct multiplies : times< N1 , N2 , N3 , N4 , N5 > { }; template<> struct multiplies< na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct apply : multiplies< T1 , T2 , T3 , T4 , T5 > { }; }; template< typename Tag > struct lambda< multiplies< na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef multiplies< na , na , na , na , na > result_; typedef multiplies< na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< multiplies< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< multiplies< na , na , na , na , na > > : int_<-1> { }; } }} # 18 "/localhome/glisse2/include/boost/numeric/conversion/detail/is_subranged.hpp" 2 # 28 "/localhome/glisse2/include/boost/numeric/conversion/detail/is_subranged.hpp" namespace boost { namespace numeric { namespace convdetail { template struct subranged_Sig2Unsig { typedef mpl::true_ type ; } ; template struct subranged_Unsig2Sig { # 62 "/localhome/glisse2/include/boost/numeric/conversion/detail/is_subranged.hpp" typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; typedef typename T_digits::next u_T_digits ; typedef mpl::int_<2> Two ; typedef typename mpl::multiplies::type S_digits_times_2 ; typedef typename mpl::less::type type ; } ; template struct subranged_SameSign { typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; typedef typename mpl::less::type type ; } ; template struct subranged_Int2Float { typedef mpl::false_ type ; } ; template struct subranged_Float2Int { typedef mpl::true_ type ; } ; template struct subranged_Float2Float { typedef mpl::int_< ::std::numeric_limits::digits > S_mantisa ; typedef mpl::int_< ::std::numeric_limits::digits > T_mantisa ; typedef mpl::int_< ::std::numeric_limits::max_exponent > S_exponent ; typedef mpl::int_< ::std::numeric_limits::max_exponent > T_exponent ; typedef typename mpl::less::type T_smaller_exponent ; typedef typename mpl::equal_to::type equal_exponents ; typedef mpl::less T_smaller_mantisa ; typedef mpl::eval_if not_bigger_exponent_case ; typedef typename mpl::eval_if::type type ; } ; template struct subranged_Udt2BuiltIn { typedef mpl::true_ type ; } ; template struct subranged_BuiltIn2Udt { typedef mpl::false_ type ; } ; template struct subranged_Udt2Udt { typedef mpl::false_ type ; } ; template struct get_subranged_Int2Int { typedef subranged_SameSign Sig2Sig ; typedef subranged_Sig2Unsig Sig2Unsig ; typedef subranged_Unsig2Sig Unsig2Sig ; typedef Sig2Sig Unsig2Unsig ; typedef typename get_sign_mixture::type sign_mixture ; typedef typename for_sign_mixture::type type ; } ; template struct get_subranged_BuiltIn2BuiltIn { typedef get_subranged_Int2Int Int2IntQ ; typedef subranged_Int2Float Int2Float ; typedef subranged_Float2Int Float2Int ; typedef subranged_Float2Float Float2Float ; typedef mpl::identity Int2FloatQ ; typedef mpl::identity Float2IntQ ; typedef mpl::identity Float2FloatQ ; typedef typename get_int_float_mixture::type int_float_mixture ; typedef for_int_float_mixture for_ ; typedef typename for_::type selected ; typedef typename selected::type type ; } ; template struct get_subranged { typedef get_subranged_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; typedef subranged_BuiltIn2Udt BuiltIn2Udt ; typedef subranged_Udt2BuiltIn Udt2BuiltIn ; typedef subranged_Udt2Udt Udt2Udt ; typedef mpl::identity BuiltIn2UdtQ ; typedef mpl::identity Udt2BuiltInQ ; typedef mpl::identity Udt2UdtQ ; typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; typedef typename for_udt_builtin_mixture::type selected ; typedef typename selected::type selected2 ; typedef typename selected2::type type ; } ; template struct get_is_subranged { typedef get_subranged non_trivial_case ; typedef mpl::identity trivial_case ; typedef is_same is_trivial ; typedef typename mpl::if_::type selected ; typedef typename selected::type type ; } ; } } } # 22 "/localhome/glisse2/include/boost/numeric/conversion/detail/conversion_traits.hpp" 2 namespace boost { namespace numeric { namespace convdetail { template struct non_trivial_traits_impl { typedef typename get_int_float_mixture ::type int_float_mixture ; typedef typename get_sign_mixture ::type sign_mixture ; typedef typename get_udt_builtin_mixture ::type udt_builtin_mixture ; typedef typename get_is_subranged::type subranged ; typedef mpl::false_ trivial ; typedef T target_type ; typedef S source_type ; typedef T result_type ; typedef typename mpl::if_< is_arithmetic, S, S const&>::type argument_type ; typedef typename mpl::if_::type supertype ; typedef typename mpl::if_::type subtype ; } ; template struct trivial_traits_impl { typedef typename get_int_float_mixture ::type int_float_mixture ; typedef typename get_sign_mixture ::type sign_mixture ; typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; typedef mpl::false_ subranged ; typedef mpl::true_ trivial ; typedef N target_type ; typedef N source_type ; typedef N const& result_type ; typedef N const& argument_type ; typedef N supertype ; typedef N subtype ; } ; template struct get_conversion_traits { typedef typename remove_cv::type target_type ; typedef typename remove_cv::type source_type ; typedef typename is_same::type is_trivial ; typedef trivial_traits_impl trivial_imp ; typedef non_trivial_traits_impl non_trivial_imp ; typedef typename mpl::if_::type type ; } ; } } } # 14 "/localhome/glisse2/include/boost/numeric/conversion/conversion_traits.hpp" 2 namespace boost { namespace numeric { template struct conversion_traits : convdetail::get_conversion_traits::type { } ; } } # 14 "/localhome/glisse2/include/boost/numeric/conversion/converter.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/converter_policies.hpp" 1 # 24 "/localhome/glisse2/include/boost/numeric/conversion/converter_policies.hpp" namespace boost { namespace numeric { template struct Trunc { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { using std::floor ; using std::ceil ; return s < static_cast(0) ? ceil(s) : floor(s) ; } typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ; } ; template struct Floor { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { using std::floor ; return floor(s) ; } typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ; } ; template struct Ceil { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { using std::ceil ; return ceil(s) ; } typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ; } ; template struct RoundEven { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { using std::floor ; using std::ceil ; S prev = floor(s); S next = ceil(s); S rt = (s - prev) - (next - s); S const zero(0.0); S const two(2.0); if ( rt < zero ) return prev; else if ( rt > zero ) return next; else { bool is_prev_even = two * floor(prev / two) == prev ; return ( is_prev_even ? prev : next ) ; } } typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ; } ; enum range_check_result { cInRange = 0 , cNegOverflow = 1 , cPosOverflow = 2 } ; class bad_numeric_cast : public std::bad_cast { public: virtual const char * what() const throw() { return "bad numeric conversion: overflow"; } }; class negative_overflow : public bad_numeric_cast { public: virtual const char * what() const throw() { return "bad numeric conversion: negative overflow"; } }; class positive_overflow : public bad_numeric_cast { public: virtual const char * what() const throw() { return "bad numeric conversion: positive overflow"; } }; struct def_overflow_handler { void operator() ( range_check_result r ) { if ( r == cNegOverflow ) throw negative_overflow() ; else if ( r == cPosOverflow ) throw positive_overflow() ; } } ; struct silent_overflow_handler { void operator() ( range_check_result ) {} } ; template struct raw_converter { typedef typename Traits::result_type result_type ; typedef typename Traits::argument_type argument_type ; static result_type low_level_convert ( argument_type s ) { return static_cast(s) ; } } ; struct UseInternalRangeChecker {} ; } } # 15 "/localhome/glisse2/include/boost/numeric/conversion/converter.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" 1 # 17 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/bounds.hpp" 1 # 13 "/localhome/glisse2/include/boost/numeric/conversion/bounds.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/bounds.hpp" 1 # 17 "/localhome/glisse2/include/boost/numeric/conversion/detail/bounds.hpp" namespace boost { namespace numeric { namespace boundsdetail { template class Integral { typedef std::numeric_limits limits ; public : static N lowest () { return limits::min (); } static N highest () { return limits::max (); } static N smallest() { return static_cast(1); } } ; template class Float { typedef std::numeric_limits limits ; public : static N lowest () { return static_cast(-limits::max ()) ; } static N highest () { return limits::max (); } static N smallest() { return limits::min (); } } ; template struct get_impl { typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; typedef Integral impl_int ; typedef Float impl_float ; typedef typename mpl::if_::type type ; } ; } } } # 14 "/localhome/glisse2/include/boost/numeric/conversion/bounds.hpp" 2 namespace boost { namespace numeric { template struct bounds : boundsdetail::get_impl::type {} ; } } # 18 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" 2 namespace boost { namespace numeric { namespace convdetail { typedef mpl::integral_c round2zero_c ; typedef mpl::integral_c round2nearest_c ; typedef mpl::integral_c round2inf_c ; typedef mpl::integral_c round2neg_inf_c ; # 40 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct for_round_style { typedef ct_switch4 selector ; typedef typename selector::type type ; } ; # 81 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" struct non_applicable { typedef mpl::false_ do_apply ; } ; struct applicable { typedef mpl::true_ do_apply ; } ; # 96 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct LT_LoT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; } } ; template struct LT_Zero : applicable { typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s < static_cast(0) ? cNegOverflow : cInRange ; } } ; template struct LE_PrevLoT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s <= static_cast(bounds::lowest()) - static_cast(1.0) ? cNegOverflow : cInRange ; } } ; template struct LT_HalfPrevLoT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s < static_cast(bounds::lowest()) - static_cast(0.5) ? cNegOverflow : cInRange ; } } ; template struct GT_HiT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s > static_cast(bounds::highest()) ? cPosOverflow : cInRange ; } } ; template struct GE_SuccHiT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s >= static_cast(bounds::highest()) + static_cast(1.0) ? cPosOverflow : cInRange ; } } ; template struct GT_HalfSuccHiT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s >= static_cast(bounds::highest()) + static_cast(0.5) ? cPosOverflow : cInRange ; } } ; # 215 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct applyBoth { typedef typename PredA::argument_type argument_type ; static range_check_result apply ( argument_type s ) { range_check_result r = PredA::apply(s) ; if ( r == cInRange ) r = PredB::apply(s); return r ; } } ; template struct combine { typedef applyBoth Both ; typedef void NNone ; typedef typename PredA::do_apply do_applyA ; typedef typename PredB::do_apply do_applyB ; typedef typename for_both::type type ; } ; # 262 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct dummy_range_checker { typedef typename Traits::argument_type argument_type ; static range_check_result out_of_range ( argument_type ) { return cInRange ; } static void validate_range ( argument_type ) {} } ; # 279 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct generic_range_checker { typedef OverflowHandler overflow_handler ; typedef typename Traits::argument_type argument_type ; static range_check_result out_of_range ( argument_type s ) { typedef typename combine::type Predicate ; return Predicate::apply(s); } static void validate_range ( argument_type s ) { OverflowHandler()( out_of_range(s) ) ; } } ; # 305 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct GetRC_Sig2Sig_or_Unsig2Unsig { typedef dummy_range_checker Dummy ; typedef LT_LoT Pred1 ; typedef GT_HiT Pred2 ; typedef generic_range_checker Normal ; typedef typename Traits::subranged subranged ; typedef typename mpl::if_::type type ; } ; template struct GetRC_Sig2Unsig { typedef LT_Zero Pred1 ; typedef GT_HiT Pred2 ; typedef generic_range_checker ChoiceA ; typedef generic_range_checker ChoiceB ; typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename subranged_Unsig2Sig::type oposite_subranged ; typedef typename mpl::not_::type positively_subranged ; typedef typename mpl::if_::type type ; } ; template struct GetRC_Unsig2Sig { typedef GT_HiT Pred1 ; typedef generic_range_checker type ; } ; template struct GetRC_Int2Int { typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; typedef GetRC_Sig2Unsig Sig2UnsigQ ; typedef GetRC_Unsig2Sig Unsig2SigQ ; typedef Sig2SigQ Unsig2UnsigQ ; typedef typename Traits::sign_mixture sign_mixture ; typedef typename for_sign_mixture::type selector ; typedef typename selector::type type ; } ; template struct GetRC_Int2Float { typedef dummy_range_checker type ; } ; template struct GetRC_Float2Int { typedef LE_PrevLoT Pred1 ; typedef GE_SuccHiT Pred2 ; typedef LT_HalfPrevLoT Pred3 ; typedef GT_HalfSuccHiT Pred4 ; typedef GT_HiT Pred5 ; typedef LT_LoT Pred6 ; typedef generic_range_checker ToZero ; typedef generic_range_checker ToNearest ; typedef generic_range_checker ToInf ; typedef generic_range_checker ToNegInf ; typedef typename Float2IntRounder::round_style round_style ; typedef typename for_round_style::type type ; } ; template struct GetRC_Float2Float { typedef dummy_range_checker Dummy ; typedef LT_LoT Pred1 ; typedef GT_HiT Pred2 ; typedef generic_range_checker Normal ; typedef typename Traits::subranged subranged ; typedef typename mpl::if_::type type ; } ; template struct GetRC_BuiltIn2BuiltIn { typedef GetRC_Int2Int Int2IntQ ; typedef GetRC_Int2Float Int2FloatQ ; typedef GetRC_Float2Int Float2IntQ ; typedef GetRC_Float2Float Float2FloatQ ; typedef typename Traits::int_float_mixture int_float_mixture ; typedef typename for_int_float_mixture::type selector ; typedef typename selector::type type ; } ; template struct GetRC { typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; typedef dummy_range_checker Dummy ; typedef mpl::identity DummyQ ; typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; typedef typename for_udt_builtin_mixture::type selector ; typedef typename selector::type type ; } ; # 452 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct trivial_converter_impl : public std::unary_function< typename Traits::argument_type ,typename Traits::result_type > ,public dummy_range_checker { typedef Traits traits ; typedef typename Traits::source_type source_type ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; static result_type low_level_convert ( argument_type s ) { return s ; } static source_type nearbyint ( argument_type s ) { return s ; } static result_type convert ( argument_type s ) { return s ; } } ; template struct rounding_converter : public std::unary_function< typename Traits::argument_type ,typename Traits::result_type > ,public RangeChecker ,public Float2IntRounder ,public RawConverter { typedef RangeChecker RangeCheckerBase ; typedef Float2IntRounder Float2IntRounderBase ; typedef RawConverter RawConverterBase ; typedef Traits traits ; typedef typename Traits::source_type source_type ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; static result_type convert ( argument_type s ) { RangeCheckerBase::validate_range(s); source_type s1 = Float2IntRounderBase::nearbyint(s); return RawConverterBase::low_level_convert(s1); } } ; template struct non_rounding_converter : public std::unary_function< typename Traits::argument_type ,typename Traits::result_type > ,public RangeChecker ,public RawConverter { typedef RangeChecker RangeCheckerBase ; typedef RawConverter RawConverterBase ; typedef Traits traits ; typedef typename Traits::source_type source_type ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; static source_type nearbyint ( argument_type s ) { return s ; } static result_type convert ( argument_type s ) { RangeCheckerBase::validate_range(s); return RawConverterBase::low_level_convert(s); } } ; # 537 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" template struct get_non_trivial_converter { typedef GetRC InternalRangeCheckerQ ; typedef is_same use_internal_RC ; typedef mpl::identity UserRangeCheckerQ ; typedef typename mpl::eval_if::type RangeChecker ; typedef non_rounding_converter NonRounding ; typedef rounding_converter Rounding ; typedef mpl::identity NonRoundingQ ; typedef mpl::identity RoundingQ ; typedef typename Traits::int_float_mixture int_float_mixture ; typedef typename for_int_float_mixture::type selector ; typedef typename selector::type type ; } ; template< class Traits ,class OverflowHandler ,class Float2IntRounder ,class RawConverter ,class UserRangeChecker > struct get_converter_impl { # 583 "/localhome/glisse2/include/boost/numeric/conversion/detail/converter.hpp" typedef trivial_converter_impl Trivial ; typedef mpl::identity TrivialQ ; typedef get_non_trivial_converter< Traits ,OverflowHandler ,Float2IntRounder ,RawConverter ,UserRangeChecker > NonTrivialQ ; typedef typename Traits::trivial trivial ; typedef typename mpl::eval_if::type type ; } ; } } } # 17 "/localhome/glisse2/include/boost/numeric/conversion/converter.hpp" 2 namespace boost { namespace numeric { template, class OverflowHandler = def_overflow_handler, class Float2IntRounder = Trunc< typename Traits::source_type> , class RawConverter = raw_converter, class UserRangeChecker = UseInternalRangeChecker > struct converter : convdetail::get_converter_impl::type { typedef Traits traits ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; result_type operator() ( argument_type s ) const { return this->convert(s) ; } } ; template , class UserRangeChecker = UseInternalRangeChecker > struct make_converter_from { template, class RawConverter = raw_converter > struct to { typedef converter type ; } ; } ; } } # 34 "/localhome/glisse2/include/boost/numeric/conversion/cast.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/numeric_cast_traits.hpp" 1 # 14 "/localhome/glisse2/include/boost/numeric/conversion/numeric_cast_traits.hpp" namespace boost { namespace numeric { template struct numeric_cast_traits { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; }} # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 28 "/localhome/glisse2/include/boost/numeric/conversion/numeric_cast_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp" 1 # 10 "/localhome/glisse2/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp" # 1 "/localhome/glisse2/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp" 1 # 10 "/localhome/glisse2/include/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp" namespace boost { namespace numeric { template <> struct numeric_cast_traits < char , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int8_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint8_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int16_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint16_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int32_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint32_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::int64_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::uint64_t , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::int8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::uint8_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::int16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::uint16_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::int32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::uint32_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::int64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::uint64_t > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; }} # 11 "/localhome/glisse2/include/boost/numeric/conversion/detail/numeric_cast_traits.hpp" 2 # 29 "/localhome/glisse2/include/boost/numeric/conversion/numeric_cast_traits.hpp" 2 # 35 "/localhome/glisse2/include/boost/numeric/conversion/cast.hpp" 2 namespace boost { template inline Target numeric_cast( Source arg ) { typedef numeric::conversion_traits conv_traits; typedef numeric::numeric_cast_traits cast_traits; typedef boost::numeric::converter < Target, Source, conv_traits, typename cast_traits::overflow_policy, typename cast_traits::rounding_policy, boost::numeric::raw_converter< conv_traits >, typename cast_traits::range_checking_policy > converter; return converter::convert(arg); } using numeric::bad_numeric_cast; } # 41 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/sign.hpp" 1 # 18 "/localhome/glisse2/include/boost/math/special_functions/sign.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" 1 # 23 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstring" 3 # 24 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 26 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 27 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" 2 # 1 "/localhome/glisse2/include/boost/detail/endian.hpp" 1 # 28 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" 2 # 81 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" namespace boost { namespace math { namespace detail { # 92 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" struct native_tag {}; template struct generic_tag {}; struct ieee_tag {}; struct ieee_copy_all_bits_tag : public ieee_tag {}; struct ieee_copy_leading_bits_tag : public ieee_tag {}; # 125 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" struct unknown_precision{}; struct single_precision {}; struct double_precision {}; struct extended_double_precision {}; template struct fp_traits_native { typedef native_tag method; }; template struct fp_traits_non_native { typedef generic_tag::is_specialized> method; }; # 177 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" template<> struct fp_traits_non_native { typedef ieee_copy_all_bits_tag method; static const uint32_t sign = 0x80000000u; static const uint32_t exponent = 0x7f800000; static const uint32_t flag = 0x00000000; static const uint32_t significand = 0x007fffff; typedef uint32_t bits; static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); } static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); } }; # 232 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" template<> struct fp_traits_non_native { typedef ieee_copy_all_bits_tag method; static const uint64_t sign = ((uint64_t)0x80000000u) << 32; static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32; static const uint64_t flag = 0; static const uint64_t significand = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu); typedef uint64_t bits; static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); } static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); } }; # 292 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" template<> struct fp_traits_non_native { typedef ieee_copy_all_bits_tag method; static const uint64_t sign = (uint64_t)0x80000000u << 32; static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; static const uint64_t flag = 0; static const uint64_t significand = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu; typedef uint64_t bits; static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); } static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); } }; # 318 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" template<> struct fp_traits_non_native { typedef ieee_copy_leading_bits_tag method; static const uint32_t sign = 0x80000000u; static const uint32_t exponent = 0x7fff0000; static const uint32_t flag = 0x00008000; static const uint32_t significand = 0x00007fff; typedef uint32_t bits; static void get_bits(long double x, uint32_t& a) { std::memcpy(&a, reinterpret_cast(&x) + 6, 4); } static void set_bits(long double& x, uint32_t a) { std::memcpy(reinterpret_cast(&x) + 6, &a, 4); } }; # 483 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" template struct size_to_precision { typedef unknown_precision type; }; template<> struct size_to_precision<4, true> { typedef single_precision type; }; template<> struct size_to_precision<8, true> { typedef double_precision type; }; template<> struct size_to_precision<10, true> { typedef extended_double_precision type; }; template<> struct size_to_precision<12, true> { typedef extended_double_precision type; }; template<> struct size_to_precision<16, true> { typedef extended_double_precision type; }; template struct select_native { typedef typename size_to_precision::value>::type precision; typedef fp_traits_non_native type; }; template<> struct select_native { typedef fp_traits_native type; }; template<> struct select_native { typedef fp_traits_native type; }; template<> struct select_native { typedef fp_traits_native type; }; # 553 "/localhome/glisse2/include/boost/math/special_functions/detail/fp_traits.hpp" template struct fp_traits { typedef typename size_to_precision::value>::type precision; typedef typename select_native::type type; typedef fp_traits_non_native sign_change_type; }; } } } # 19 "/localhome/glisse2/include/boost/math/special_functions/sign.hpp" 2 namespace boost{ namespace math{ namespace detail { template inline int signbit_impl(T x, native_tag const&) { return (std::signbit)(x); } template inline int signbit_impl(T x, generic_tag const&) { return x < 0; } template inline int signbit_impl(T x, generic_tag const&) { return x < 0; } template inline int signbit_impl(T x, ieee_copy_all_bits_tag const&) { typedef typename fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); return a & traits::sign ? 1 : 0; } template inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&) { typedef typename fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); return a & traits::sign ? 1 : 0; } template inline T (changesign_impl)(T x, generic_tag const&) { return -x; } template inline T (changesign_impl)(T x, generic_tag const&) { return -x; } template inline T changesign_impl(T x, ieee_copy_all_bits_tag const&) { typedef typename fp_traits::sign_change_type traits; typename traits::bits a; traits::get_bits(x,a); a ^= traits::sign; traits::set_bits(x,a); return x; } template inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&) { typedef typename fp_traits::sign_change_type traits; typename traits::bits a; traits::get_bits(x,a); a ^= traits::sign; traits::set_bits(x,a); return x; } } template int (signbit)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; typedef typename boost::is_floating_point::type fp_tag; return detail::signbit_impl(x, method()); } template inline int sign (const T& z) { return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1; } template T (changesign)(const T& x) { typedef typename detail::fp_traits::sign_change_type traits; typedef typename traits::method method; typedef typename boost::is_floating_point::type fp_tag; return detail::changesign_impl(x, method()); } template inline T copysign (const T& x, const T& y) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return (boost::math::signbit)(x) != (boost::math::signbit)(y) ? (boost::math::changesign)(x) : x; } } } # 45 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/real_cast.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/tools/real_cast.hpp" namespace boost{ namespace math { namespace tools { template inline To real_cast(T t) { return static_cast(t); } } } } # 18 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" 2 # 88 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" namespace boost{ namespace math_detail{ template inline bool is_nan_helper(T t, const boost::true_type&) { return (::std:: fpclassify(t) == (int)FP_NAN); } template inline bool is_nan_helper(T, const boost::false_type&) { return false; } } namespace math{ namespace detail{ template inline int fpclassify_imp (T t, const native_tag&) { return (std::fpclassify)(t); } template inline int fpclassify_imp (T t, const generic_tag&) { ; if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point())) return FP_NAN; # 146 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" T at = (t < T(0)) ? -t : t; if(at <= (std::numeric_limits::max)()) { if(at >= (std::numeric_limits::min)()) return FP_NORMAL; return (at != 0) ? FP_SUBNORMAL : FP_ZERO; } else if(at > (std::numeric_limits::max)()) return FP_INFINITE; return FP_NAN; } template inline int fpclassify_imp (T t, const generic_tag&) { # 176 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" ; return t == 0 ? FP_ZERO : FP_NORMAL; } template int fpclassify_imp (T x, ieee_copy_all_bits_tag) { typedef typename fp_traits::type traits; ; typename traits::bits a; traits::get_bits(x,a); ; a &= traits::exponent | traits::flag | traits::significand; ; ; if(a <= traits::significand) { if(a == 0) return FP_ZERO; else return FP_SUBNORMAL; } if(a < traits::exponent) return FP_NORMAL; a &= traits::significand; if(a == 0) return FP_INFINITE; return FP_NAN; } template int fpclassify_imp (T x, ieee_copy_leading_bits_tag) { typedef typename fp_traits::type traits; ; typename traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::flag | traits::significand; if(a <= traits::significand) { if(x == 0) return FP_ZERO; else return FP_SUBNORMAL; } if(a < traits::exponent) return FP_NORMAL; a &= traits::significand; traits::set_bits(x,a); if(x == 0) return FP_INFINITE; return FP_NAN; } # 245 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" } template inline int fpclassify (T t) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; return detail::fpclassify_imp(t, method()); } namespace detail { template inline bool isfinite_impl(T x, native_tag const&) { return (std::isfinite)(x); } template inline bool isfinite_impl(T x, generic_tag const&) { return x >= -(std::numeric_limits::max)() && x <= (std::numeric_limits::max)(); } template inline bool isfinite_impl(T x, generic_tag const&) { (void)x; return true; } template inline bool isfinite_impl(T x, ieee_tag const&) { typedef typename detail::fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); a &= traits::exponent; return a != traits::exponent; } # 307 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" } template inline bool (isfinite)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; typedef typename boost::is_floating_point::type fp_tag; return detail::isfinite_impl(x, method()); } namespace detail { template inline bool isnormal_impl(T x, native_tag const&) { return (std::isnormal)(x); } template inline bool isnormal_impl(T x, generic_tag const&) { if(x < 0) x = -x; return x >= (std::numeric_limits::min)() && x <= (std::numeric_limits::max)(); } template inline bool isnormal_impl(T x, generic_tag const&) { return !(x == 0); } template inline bool isnormal_impl(T x, ieee_tag const&) { typedef typename detail::fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::flag; return (a != 0) && (a < traits::exponent); } # 366 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" } template inline bool (isnormal)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; typedef typename boost::is_floating_point::type fp_tag; return detail::isnormal_impl(x, method()); } namespace detail { template inline bool isinf_impl(T x, native_tag const&) { return (std::isinf)(x); } template inline bool isinf_impl(T x, generic_tag const&) { (void)x; return std::numeric_limits::has_infinity && ( x == std::numeric_limits::infinity() || x == -std::numeric_limits::infinity()); } template inline bool isinf_impl(T x, generic_tag const&) { (void)x; return false; } template inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&) { typedef typename fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; return a == traits::exponent; } template inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&) { typedef typename fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; if(a != traits::exponent) return false; traits::set_bits(x,0); return x == 0; } # 443 "/localhome/glisse2/include/boost/math/special_functions/fpclassify.hpp" } template inline bool (isinf)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; typedef typename boost::is_floating_point::type fp_tag; return detail::isinf_impl(x, method()); } namespace detail { template inline bool isnan_impl(T x, native_tag const&) { return (std::isnan)(x); } template inline bool isnan_impl(T x, generic_tag const&) { return std::numeric_limits::has_infinity ? !(x <= std::numeric_limits::infinity()) : x != x; } template inline bool isnan_impl(T x, generic_tag const&) { (void)x; return false; } template inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&) { typedef typename fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; return a > traits::exponent; } template inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&) { typedef typename fp_traits::type traits; typename traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; if(a < traits::exponent) return false; a &= traits::significand; traits::set_bits(x,a); return x != 0; } } template bool (isnan)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; typedef typename boost::is_floating_point::type fp_tag; return detail::isnan_impl(x, method()); } } } # 46 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/localhome/glisse2/include/boost/detail/lcast_precision.hpp" 1 # 11 "/localhome/glisse2/include/boost/detail/lcast_precision.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/climits" 2 3 # 12 "/localhome/glisse2/include/boost/detail/lcast_precision.hpp" 2 # 36 "/localhome/glisse2/include/boost/detail/lcast_precision.hpp" namespace boost { namespace detail { class lcast_abstract_stub {}; template struct lcast_precision { typedef typename boost::mpl::if_< boost::is_abstract , std::numeric_limits , std::numeric_limits >::type limits; static const bool use_default_precision = !limits::is_specialized || limits::is_exact ; static const bool is_specialized_bin = !use_default_precision && limits::radix == 2 && limits::digits > 0 ; static const bool is_specialized_dec = !use_default_precision && limits::radix == 10 && limits::digits10 > 0 ; static const std::streamsize streamsize_max = boost::integer_traits::const_max ; static const unsigned int precision_dec = limits::digits10 + 1U; static_assert(!is_specialized_dec || precision_dec <= streamsize_max + 0UL, "!is_specialized_dec || precision_dec <= streamsize_max + 0UL") ; static const unsigned long precision_bin = 2UL + limits::digits * 30103UL / 100000UL ; static_assert(!is_specialized_bin || (limits::digits + 0UL < (9223372036854775807L * 2UL + 1UL) / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL), "!is_specialized_bin || (limits::digits + 0UL < ULONG_MAX / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL)") ; static const std::streamsize value = is_specialized_bin ? precision_bin : is_specialized_dec ? precision_dec : 6 ; }; template inline std::streamsize lcast_get_precision(T* = 0) { return lcast_precision::value; # 165 "/localhome/glisse2/include/boost/detail/lcast_precision.hpp" } template inline void lcast_set_precision(std::ios_base& stream, T*) { stream.precision(lcast_get_precision()); } template inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) { std::streamsize const s = lcast_get_precision(static_cast(0)); std::streamsize const t = lcast_get_precision(static_cast(0)); stream.precision(s > t ? s : t); } }} # 48 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 3 # 1 "/usr/include/wchar.h" 1 3 4 # 47 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cwchar" 2 3 # 50 "/localhome/glisse2/include/boost/lexical_cast.hpp" 2 # 78 "/localhome/glisse2/include/boost/lexical_cast.hpp" namespace boost { class bad_lexical_cast : public std::bad_cast { public: bad_lexical_cast() : source(&typeid(void)), target(&typeid(void)) { } bad_lexical_cast( const std::type_info &source_type_arg, const std::type_info &target_type_arg) : source(&source_type_arg), target(&target_type_arg) { } const std::type_info &source_type() const { return *source; } const std::type_info &target_type() const { return *target; } virtual const char *what() const throw() { return "bad lexical cast: " "source type value could not be interpreted as target"; } virtual ~bad_lexical_cast() throw() { } private: const std::type_info *source; const std::type_info *target; }; namespace detail { template struct stream_char { typedef char type; }; template struct stream_char< std::basic_string > { typedef CharT type; }; template<> struct stream_char { typedef wchar_t type; }; template<> struct stream_char { typedef wchar_t type; }; template<> struct stream_char { typedef wchar_t type; }; # 183 "/localhome/glisse2/include/boost/lexical_cast.hpp" template<> struct stream_char { typedef char16_t type; }; template<> struct stream_char { typedef char16_t type; }; template<> struct stream_char { typedef char16_t type; }; template<> struct stream_char { typedef char32_t type; }; template<> struct stream_char { typedef char32_t type; }; template<> struct stream_char { typedef char32_t type; }; template struct widest_char { typedef typename boost::mpl::if_c< (sizeof(TargetChar) > sizeof(SourceChar)) , TargetChar , SourceChar >::type type; }; } namespace detail { template struct deduce_char_traits { typedef std::char_traits type; }; template struct deduce_char_traits< CharT , std::basic_string , Source > { typedef Traits type; }; template struct deduce_char_traits< CharT , Target , std::basic_string > { typedef Traits type; }; template struct deduce_char_traits< CharT , std::basic_string , std::basic_string > { typedef Traits type; }; } namespace detail { template< class Source > struct lcast_src_length { static const std::size_t value = 1; static void check_coverage() {} }; # 299 "/localhome/glisse2/include/boost/lexical_cast.hpp" template struct lcast_src_length_integral { static const std::size_t value = std::numeric_limits::is_signed + std::numeric_limits::is_specialized + std::numeric_limits::digits10 * 2 ; }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; # 346 "/localhome/glisse2/include/boost/lexical_cast.hpp" template struct lcast_src_length_floating { static_assert(std::numeric_limits::max_exponent10 <= 999999L && std::numeric_limits::min_exponent10 >= -999999L, "std::numeric_limits::max_exponent10 <= 999999L && std::numeric_limits::min_exponent10 >= -999999L") ; static const std::size_t value = 5 + lcast_precision::value + 6 ; }; template<> struct lcast_src_length : lcast_src_length_floating { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_floating { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_floating { static void check_coverage() {} }; } namespace detail { template struct lcast_char_constants; template<> struct lcast_char_constants { static const char zero = '0'; static const char minus = '-'; static const char plus = '+'; static const char lowercase_e = 'e'; static const char capital_e = 'E'; static const char c_decimal_separator = '.'; }; template<> struct lcast_char_constants { static const wchar_t zero = L'0'; static const wchar_t minus = L'-'; static const wchar_t plus = L'+'; static const wchar_t lowercase_e = L'e'; static const wchar_t capital_e = L'E'; static const wchar_t c_decimal_separator = L'.'; }; template<> struct lcast_char_constants { static const char16_t zero = u'0'; static const char16_t minus = u'-'; static const char16_t plus = u'+'; static const char16_t lowercase_e = u'e'; static const char16_t capital_e = u'E'; static const char16_t c_decimal_separator = u'.'; }; template<> struct lcast_char_constants { static const char32_t zero = U'0'; static const char32_t minus = U'-'; static const char32_t plus = U'+'; static const char32_t lowercase_e = U'e'; static const char32_t capital_e = U'E'; static const char32_t c_decimal_separator = U'.'; }; } namespace detail { template inline typename make_unsigned::type lcast_to_unsigned(T value) { typedef typename make_unsigned::type result_type; result_type uvalue = static_cast(value); return value < 0 ? -uvalue : uvalue; } } namespace detail { template CharT* lcast_put_unsigned(const T n_param, CharT* finish) { static_assert(!std::numeric_limits::is_signed, "!std::numeric_limits::is_signed"); typedef typename Traits::int_type int_type; CharT const czero = lcast_char_constants::zero; int_type const zero = Traits::to_int_type(czero); typename boost::mpl::if_c< (sizeof(int_type) > sizeof(T)) , int_type , T >::type n = n_param; std::locale loc; if (loc != std::locale::classic()) { typedef std::numpunct numpunct; numpunct const& np = std::use_facet< numpunct >(loc); std::string const grouping = np.grouping(); std::string::size_type const grouping_size = grouping.size(); if ( grouping_size && grouping[0] > 0 ) { static_assert(std::numeric_limits::digits10 < 127, "std::numeric_limits::digits10 < CHAR_MAX"); CharT thousands_sep = np.thousands_sep(); std::string::size_type group = 0; char last_grp_size = grouping[0]; char left = last_grp_size; do { if(left == 0) { ++group; if(group < grouping_size) { char const grp_size = grouping[group]; last_grp_size = grp_size <= 0 ? 127 : grp_size; } left = last_grp_size; --finish; Traits::assign(*finish, thousands_sep); } --left; --finish; int_type const digit = static_cast(n % 10U); Traits::assign(*finish, Traits::to_char_type(zero + digit)); n /= 10; } while(n); return finish; } } { do { --finish; int_type const digit = static_cast(n % 10U); Traits::assign(*finish, Traits::to_char_type(zero + digit)); n /= 10; } while(n); } return finish; } } namespace detail { template inline bool lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) { static_assert(!std::numeric_limits::is_signed, "!std::numeric_limits::is_signed"); typedef typename Traits::int_type int_type; CharT const czero = lcast_char_constants::zero; --end; value = 0; if ( *end < czero || *end >= czero + 10 || begin > end) return false; value = *end - czero; --end; T multiplier = 1; std::locale loc; if (loc != std::locale::classic()) { typedef std::numpunct numpunct; numpunct const& np = std::use_facet< numpunct >(loc); std::string const& grouping = np.grouping(); std::string::size_type const grouping_size = grouping.size(); if (grouping_size && grouping[0] > 0) { unsigned char current_grouping = 0; CharT const thousands_sep = np.thousands_sep(); char remained = grouping[current_grouping] - 1; bool shall_we_return = true; for(;end>=begin; --end) { if (remained) { T const new_sub_value = multiplier * 10 * (*end - czero); if (*end < czero || *end >= czero + 10 || new_sub_value/10 != multiplier * (*end - czero) || static_cast((std::numeric_limits::max)()-new_sub_value) < value ) return false; value += new_sub_value; multiplier *= 10; --remained; } else { if ( !Traits::eq(*end, thousands_sep) ) { # 606 "/localhome/glisse2/include/boost/lexical_cast.hpp" shall_we_return = false; break; } else { if ( begin == end ) return false; if (current_grouping < grouping_size-1 ) ++current_grouping; remained = grouping[current_grouping]; } } } if (shall_we_return) return true; } } { while ( begin <= end ) { T const new_sub_value = multiplier * 10 * (*end - czero); if (*end < czero || *end >= czero + 10 || new_sub_value/10 != multiplier * (*end - czero) || static_cast((std::numeric_limits::max)()-new_sub_value) < value ) return false; value += new_sub_value; multiplier *= 10; --end; } } return true; } } namespace detail { template inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value , const CharT* lc_NAN, const CharT* lc_nan , const CharT* lc_INFINITY, const CharT* lc_infinity , const CharT opening_brace, const CharT closing_brace) { using namespace std; const wchar_t minus = lcast_char_constants::minus; const wchar_t plus = lcast_char_constants::plus; const int inifinity_size = 8; bool has_minus = false; if( *begin == minus) { ++ begin; has_minus = true; } else if( *begin == plus ) ++begin; if( end-begin < 3 ) return false; if( !memcmp(begin, lc_nan, 3*sizeof(CharT)) || !memcmp(begin, lc_NAN, 3*sizeof(CharT)) ) { begin += 3; if (end != begin) { if(end-begin<2) return false; -- end; if( *begin != opening_brace || *end != closing_brace) return false; } if( !has_minus ) value = std::numeric_limits::quiet_NaN(); else value = (boost::math::changesign) (std::numeric_limits::quiet_NaN()); return true; } else if (( end-begin==3 && (!memcmp(begin, lc_infinity, 3*sizeof(CharT)) || !memcmp(begin, lc_INFINITY, 3*sizeof(CharT))) ) || ( end-begin==inifinity_size && (!memcmp(begin, lc_infinity, inifinity_size)|| !memcmp(begin, lc_INFINITY, inifinity_size)) ) ) { if( !has_minus ) value = std::numeric_limits::infinity(); else value = (boost::math::changesign) (std::numeric_limits::infinity()); return true; } return false; } template bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) { return parse_inf_nan_impl(begin, end, value , L"NAN", L"nan" , L"INFINITY", L"infinity" , L'(', L')'); } template bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) { return parse_inf_nan_impl(begin, end, value , "NAN", "nan" , "INFINITY", "infinity" , '(', ')'); } template bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) { using namespace std; if ( (boost::math::isnan)(value) ) { if ( (boost::math::signbit)(value) ) { memcpy(begin,L"-nan", sizeof(L"-nan")); end = begin + 4; } else { memcpy(begin,L"nan", sizeof(L"nan")); end = begin + 3; } return true; } else if ( (boost::math::isinf)(value) ) { if ( (boost::math::signbit)(value) ) { memcpy(begin,L"-inf", sizeof(L"-inf")); end = begin + 4; } else { memcpy(begin,L"inf", sizeof(L"inf")); end = begin + 3; } return true; } return false; } template bool put_inf_nan(CharT* begin, CharT*& end, const T& value) { using namespace std; if ( (boost::math::isnan)(value) ) { if ( (boost::math::signbit)(value) ) { memcpy(begin,"-nan", sizeof("-nan")); end = begin + 4; } else { memcpy(begin,"nan", sizeof("nan")); end = begin + 3; } return true; } else if ( (boost::math::isinf)(value) ) { if ( (boost::math::signbit)(value) ) { memcpy(begin,"-inf", sizeof("-inf")); end = begin + 4; } else { memcpy(begin,"inf", sizeof("inf")); end = begin + 3; } return true; } return false; } } namespace detail { template struct mantissa_holder_type { }; template <> struct mantissa_holder_type { typedef unsigned int type; }; template <> struct mantissa_holder_type { typedef boost::ulong_long_type type; }; template inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end) { std::locale loc; typedef std::numpunct numpunct; numpunct const& np = std::use_facet< numpunct >(loc); std::string const grouping( (loc == std::locale::classic()) ? std::string() : np.grouping() ); std::string::size_type const grouping_size = grouping.size(); CharT const thousands_sep = grouping_size ? np.thousands_sep() : 0; CharT const decimal_point = np.decimal_point(); bool found_grouping = false; unsigned int last_grouping_pos = grouping_size - 1; CharT const czero = lcast_char_constants::zero; CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; CharT const capital_e = lcast_char_constants::capital_e; CharT const lowercase_e = lcast_char_constants::lowercase_e; value = 0.0; if (parse_inf_nan(begin, end, value)) return true; typedef typename Traits::int_type int_type; typedef typename mantissa_holder_type::type mantissa_type; int_type const zero = Traits::to_int_type(czero); if (begin == end) return false; bool has_minus = false; if ( *begin == minus ) { ++ begin; has_minus = true; if (begin == end) return false; } else if ( *begin == plus ) { ++begin; if (begin == end) return false; } bool found_decimal = false; bool found_number_before_exp = false; int pow_of_10 = 0; mantissa_type mantissa=0; bool is_mantissa_full = false; char length_since_last_delim = 0; while ( begin != end ) { if (found_decimal) { mantissa_type tmp_mantissa = mantissa * 10u; if ( *begin == lowercase_e || *begin == capital_e ) break; if ( *begin < czero || *begin >= czero + 10 ) return false; if ( is_mantissa_full || tmp_mantissa / 10u != mantissa || (std::numeric_limits::max)()-(*begin - zero) < tmp_mantissa ) { is_mantissa_full = true; ++ begin; continue; } -- pow_of_10; mantissa = tmp_mantissa; mantissa += *begin - zero; found_number_before_exp = true; } else { if (*begin >= czero && *begin < czero + 10) { mantissa_type tmp_mantissa = mantissa * 10u; if( !is_mantissa_full && tmp_mantissa / 10u == mantissa && (std::numeric_limits::max)()-(*begin - zero) >= tmp_mantissa ) { mantissa = tmp_mantissa; mantissa += *begin - zero; } else { is_mantissa_full = true; ++ pow_of_10; } found_number_before_exp = true; ++ length_since_last_delim; } else if ( *begin == decimal_point || *begin == lowercase_e || *begin == capital_e) { # 923 "/localhome/glisse2/include/boost/lexical_cast.hpp" if( grouping_size && found_grouping && ( length_since_last_delim != grouping[0] || last_grouping_pos>1 || (last_grouping_pos==0 && grouping_size>1) ) ) return false; if(*begin == decimal_point){ ++ begin; found_decimal = true; continue; }else { if (!found_number_before_exp) return false; break; } } else if (grouping_size && *begin == thousands_sep){ if(found_grouping) { if (length_since_last_delim != grouping[last_grouping_pos] ) { if (!last_grouping_pos) return false; else { -- last_grouping_pos; if (length_since_last_delim != grouping[last_grouping_pos]) return false; } } else if (grouping_size>1u && last_grouping_pos+1 grouping[last_grouping_pos] ) return false; } length_since_last_delim = 0; ++ begin; if (begin == end) return false; continue; } else return false; } ++begin; } if ( begin != end && ( *begin == lowercase_e || *begin == capital_e ) ) { ++ begin; if ( begin == end ) return false; bool exp_has_minus = false; if( *begin == minus ) { exp_has_minus = true; ++ begin; if ( begin == end ) return false; } else if (*begin == plus ) { ++ begin; if ( begin == end ) return false; } int exp_pow_of_10 = 0; while ( begin != end ) { if ( *begin < czero || *begin >= czero + 10 || exp_pow_of_10 * 10 < exp_pow_of_10) return false; exp_pow_of_10 *= 10; exp_pow_of_10 += *begin - zero; ++ begin; }; if ( exp_pow_of_10 ) { if ( exp_has_minus ) { pow_of_10 -= exp_pow_of_10; } else { pow_of_10 += exp_pow_of_10; } } } long double result = std::pow(10.0L, pow_of_10) * mantissa; value = static_cast( has_minus ? (boost::math::changesign)(result) : result); if ( (boost::math::isinf)(value) || (boost::math::isnan)(value) ) return false; return true; } } namespace detail { template< class BufferType, class CharT > class stl_buf_unlocker: public BufferType{ public: typedef BufferType base_class; using base_class::pptr; using base_class::pbase; using base_class::setg; using base_class::setp; }; } namespace detail { struct do_not_construct_stringbuffer_t{}; } namespace detail { template< class CharT , class Traits , bool RequiresStringbuffer > class lexical_stream_limited_src { typedef stl_buf_unlocker, CharT > local_streambuffer_t; typedef stl_buf_unlocker, CharT > local_stringbuffer_t; typedef typename ::boost::mpl::if_c< RequiresStringbuffer, local_stringbuffer_t, do_not_construct_stringbuffer_t >::type deduced_stringbuffer_t; CharT* start; CharT* finish; deduced_stringbuffer_t stringbuffer; public: lexical_stream_limited_src(CharT* sta, CharT* fin) : start(sta) , finish(fin) {} private: lexical_stream_limited_src(lexical_stream_limited_src const&); void operator=(lexical_stream_limited_src const&); bool shl_char(CharT ch) { Traits::assign(*start, ch); finish = start + 1; return true; } template bool shl_char(T ch) { static_assert(( sizeof(T) <= sizeof(CharT)), "boost::lexical_cast does not support conversions from whar_t to char types." "Use boost::locale instead") ; std::locale loc; wchar_t w = std::use_facet< std::ctype >(loc).widen(ch); Traits::assign(*start, w); finish = start + 1; return true; } bool shl_char_array(CharT const* str) { start = const_cast(str); finish = start + Traits::length(str); return true; } template bool shl_char_array(T const* str) { static_assert(( sizeof(T) <= sizeof(CharT)), "boost::lexical_cast does not support conversions from wchar_t to char types." "Use boost::locale instead") ; return shl_input_streamable(str); } template bool shl_input_streamable(InputStreamable& input) { std::basic_ostream stream(&stringbuffer); bool const result = !(stream << input).fail(); start = stringbuffer.pbase(); finish = stringbuffer.pptr(); return result && (start != finish); } template inline bool shl_signed(T n) { start = lcast_put_unsigned(lcast_to_unsigned(n), finish); if(n < 0) { --start; CharT const minus = lcast_char_constants::minus; Traits::assign(*start, minus); } return true; } template bool shl_float(float val,T* out) { using namespace std; if (put_inf_nan(start,finish,val)) return true; finish = start + sprintf(out,"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); return finish > start; } template bool shl_double(double val,T* out) { using namespace std; if (put_inf_nan(start,finish,val)) return true; finish = start + sprintf(out,"%.*lg", static_cast(boost::detail::lcast_get_precision()), val ); return finish > start; } template bool shl_long_double(long double val,T* out) { using namespace std; if (put_inf_nan(start,finish,val)) return true; finish = start + sprintf(out,"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); return finish > start; } # 1203 "/localhome/glisse2/include/boost/lexical_cast.hpp" bool shl_float(float val,wchar_t* out) { using namespace std; if (put_inf_nan(start,finish,val)) return true; finish = start + swprintf(out, finish-start, L"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); return finish > start; } bool shl_double(double val,wchar_t* out) { using namespace std; if (put_inf_nan(start,finish,val)) return true; # 1227 "/localhome/glisse2/include/boost/lexical_cast.hpp" finish = start + swprintf(out, finish-start, L"%.*lg", static_cast(boost::detail::lcast_get_precision()), val ); return finish > start; } bool shl_long_double(long double val,wchar_t* out) { using namespace std; if (put_inf_nan(start,finish,val)) return true; finish = start + swprintf(out, finish-start, L"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); return finish > start; } public: template bool operator<<(std::basic_string const& str) { start = const_cast(str.data()); finish = start + str.length(); return true; } bool operator<<(bool value) { CharT const czero = lcast_char_constants::zero; Traits::assign(*start, Traits::to_char_type(czero + value)); finish = start + 1; return true; } bool operator<<(char ch) { return shl_char(ch); } bool operator<<(unsigned char ch) { return ((*this) << static_cast(ch)); } bool operator<<(signed char ch) { return ((*this) << static_cast(ch)); } bool operator<<(wchar_t const* str) { return shl_char_array(str); } bool operator<<(wchar_t * str) { return shl_char_array(str); } bool operator<<(wchar_t ch) { return shl_char(ch); } bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(char const* str) { return shl_char_array(str); } bool operator<<(char* str) { return shl_char_array(str); } bool operator<<(short n) { return shl_signed(n); } bool operator<<(int n) { return shl_signed(n); } bool operator<<(long n) { return shl_signed(n); } bool operator<<(unsigned short n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(unsigned int n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(unsigned long n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(boost::ulong_long_type n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(boost::long_long_type n) { return shl_signed(n); } bool operator<<(float val) { return shl_float(val,start); } bool operator<<(double val) { return shl_double(val,start); } bool operator<<(long double val) { return shl_long_double(val,start); } template bool operator<<(const InStreamable& input) { return shl_input_streamable(input); } private: template bool shr_unsigned(Type& output) { CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; bool has_minus = false; if ( Traits::eq(minus,*start) ) { ++start; has_minus = true; } else if ( Traits::eq( plus, *start ) ) { ++start; } bool const succeed = lcast_ret_unsigned(output, start, finish); if (has_minus) output = static_cast(-output); return succeed; } template bool shr_signed(Type& output) { CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; typedef typename make_unsigned::type utype; utype out_tmp =0; bool has_minus = false; if ( Traits::eq(minus,*start) ) { ++start; has_minus = true; } else if ( Traits::eq(plus, *start) ) { ++start; } bool succeed = lcast_ret_unsigned(out_tmp, start, finish); if (has_minus) { utype const comp_val = static_cast(-(std::numeric_limits::min)()); succeed = succeed && out_tmp<=comp_val; output = -out_tmp; } else { utype const comp_val = static_cast((std::numeric_limits::max)()); succeed = succeed && out_tmp<=comp_val; output = out_tmp; } return succeed; } template bool shr_using_base_class(InputStreamable& output) { if(is_pointer::value) return false; local_streambuffer_t bb; bb.setg(start, start, finish); std::basic_istream stream(&bb); stream.unsetf(std::ios::skipws); lcast_set_precision(stream, static_cast(0)); return stream >> output && stream.get() == Traits::eof(); } template inline bool shr_xchar(T& output) { static_assert(( sizeof(CharT) == sizeof(T) ), "boost::lexical_cast does not support conversions from whar_t to char types." "Use boost::locale instead") ; bool const ok = (finish - start == 1); if(ok) { CharT out; Traits::assign(out, *start); output = static_cast(out); } return ok; } public: bool operator>>(unsigned short& output) { return shr_unsigned(output); } bool operator>>(unsigned int& output) { return shr_unsigned(output); } bool operator>>(unsigned long int& output) { return shr_unsigned(output); } bool operator>>(short& output) { return shr_signed(output); } bool operator>>(int& output) { return shr_signed(output); } bool operator>>(long int& output) { return shr_signed(output); } bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); } bool operator>>(boost::long_long_type& output) { return shr_signed(output); } bool operator>>(CharT& output) { return shr_xchar(output); } bool operator>>(unsigned char& output) { return shr_xchar(output); } bool operator>>(signed char& output) { return shr_xchar(output); } template bool operator>>(std::basic_string& str) { str.assign(start, finish); return true; } bool operator>>(bool& output) { CharT const zero = lcast_char_constants::zero; CharT const plus = lcast_char_constants::plus; CharT const minus = lcast_char_constants::minus; switch(finish-start) { case 1: output = Traits::eq(start[0], zero+1); return output || Traits::eq(start[0], zero ); case 2: if ( Traits::eq( plus, *start) ) { ++start; output = Traits::eq(start[0], zero +1); return output || Traits::eq(start[0], zero ); } else { output = false; return Traits::eq( minus, *start) && Traits::eq( zero, start[1]); } default: output = false; return false; } } bool operator>>(float& output) { return lcast_ret_float(output,start,finish); } private: template bool float_types_converter_internal(T& output, int ) { if (parse_inf_nan(start, finish, output)) return true; bool return_value = shr_using_base_class(output); CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; CharT const capital_e = lcast_char_constants::capital_e; CharT const lowercase_e = lcast_char_constants::lowercase_e; if ( return_value && ( *(finish-1) == lowercase_e || *(finish-1) == capital_e || *(finish-1) == minus || *(finish-1) == plus ) ) return false; return return_value; } bool float_types_converter_internal(double& output,char ) { return lcast_ret_float(output,start,finish); } public: bool operator>>(double& output) { boost::mpl::if_c< ::boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value, int, char >::type tag = 0; return float_types_converter_internal(output, tag); } bool operator>>(long double& output) { int tag = 0; return float_types_converter_internal(output, tag); } template bool operator>>(InputStreamable& output) { return shr_using_base_class(output); } }; } namespace detail { template struct array_to_pointer_decay { typedef T type; }; template struct array_to_pointer_decay { typedef const T * type; }; template struct is_stdstring { static const bool value = false; }; template struct is_stdstring< std::basic_string > { static const bool value = true; }; template struct is_char_or_wchar { private: typedef wchar_t wchar_t_if_supported; typedef char16_t char16_t_if_supported; typedef char32_t char32_t_if_supported; public: static const bool value = ( ::boost::type_traits::ice_or< is_same< T, char >::value, is_same< T, wchar_t_if_supported >::value, is_same< T, char16_t_if_supported >::value, is_same< T, char32_t_if_supported >::value, is_same< T, unsigned char >::value, is_same< T, signed char >::value >::value ) # 1635 "/localhome/glisse2/include/boost/lexical_cast.hpp" ; }; template struct is_arithmetic_and_not_xchars { static const bool value = ( ::boost::type_traits::ice_and< is_arithmetic::value, is_arithmetic::value, ::boost::type_traits::ice_not< detail::is_char_or_wchar::value >::value, ::boost::type_traits::ice_not< detail::is_char_or_wchar::value >::value >::value ) # 1654 "/localhome/glisse2/include/boost/lexical_cast.hpp" ; }; template struct is_xchar_to_xchar { static const bool value = ( ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< is_same::value, is_char_or_wchar::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value, ::boost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value, is_char_or_wchar::value, is_char_or_wchar::value >::value >::value ) # 1680 "/localhome/glisse2/include/boost/lexical_cast.hpp" ; }; template struct is_char_array_to_stdstring { static const bool value = false; }; template struct is_char_array_to_stdstring< std::basic_string, CharT* > { static const bool value = true; }; template struct is_char_array_to_stdstring< std::basic_string, const CharT* > { static const bool value = true; }; template struct lexical_cast_do_cast { static inline Target lexical_cast_impl(const Source& arg) { typedef typename detail::array_to_pointer_decay::type src; typedef typename detail::widest_char< typename detail::stream_char::type , typename detail::stream_char::type >::type char_type; typedef detail::lcast_src_length lcast_src_length; std::size_t const src_len = lcast_src_length::value; char_type buf[src_len + 1]; lcast_src_length::check_coverage(); typedef typename deduce_char_traits::type traits; typedef typename remove_pointer::type removed_ptr_t; const bool requires_stringbuf = !( ::boost::type_traits::ice_or< is_stdstring::value, is_arithmetic::value, ::boost::type_traits::ice_and< is_pointer::value, is_char_or_wchar::value, ::boost::type_traits::ice_eq< sizeof(char_type), sizeof(removed_ptr_t) >::value >::value >::value ); detail::lexical_stream_limited_src interpreter(buf, buf + src_len); Target result; if(!(interpreter.operator <<(arg) && interpreter.operator >>(result))) throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); return result; } }; template struct lexical_cast_copy { static inline Source lexical_cast_impl(const Source &arg) { return arg; } }; class precision_loss_error : public boost::numeric::bad_numeric_cast { public: virtual const char * what() const throw() { return "bad numeric conversion: precision loss error"; } }; template struct throw_on_precision_loss { typedef boost::numeric::Trunc Rounder; typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { source_type orig_div_round = s / Rounder::nearbyint(s); if ( (orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > std::numeric_limits::epsilon() ) ::boost::exception_detail::throw_exception_(precision_loss_error(),__PRETTY_FUNCTION__,"/localhome/glisse2/include/boost/lexical_cast.hpp",1787); return s ; } typedef typename Rounder::round_style round_style; } ; template struct lexical_cast_dynamic_num_not_ignoring_minus { static inline Target lexical_cast_impl(const Source &arg) { try{ typedef boost::numeric::converter< Target, Source, boost::numeric::conversion_traits, boost::numeric::def_overflow_handler, throw_on_precision_loss > Converter ; return Converter::convert(arg); } catch( ::boost::numeric::bad_numeric_cast const& ) { throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); } ; } }; template struct lexical_cast_dynamic_num_ignoring_minus { static inline Target lexical_cast_impl(const Source &arg) { try{ typedef boost::numeric::converter< Target, Source, boost::numeric::conversion_traits, boost::numeric::def_overflow_handler, throw_on_precision_loss > Converter ; bool has_minus = ( arg < 0); if ( has_minus ) { return static_cast(-Converter::convert(-arg)); } else { return Converter::convert(arg); } } catch( ::boost::numeric::bad_numeric_cast const& ) { throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); } ; } }; # 1861 "/localhome/glisse2/include/boost/lexical_cast.hpp" template struct lexical_cast_dynamic_num { static inline Target lexical_cast_impl(const Source &arg) { typedef typename ::boost::mpl::if_c< ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_signed::value, ::boost::is_float::value >::value, ::boost::type_traits::ice_not< is_same::value >::value, ::boost::type_traits::ice_not< is_same::value >::value, ::boost::is_unsigned::value >::value, lexical_cast_dynamic_num_ignoring_minus, lexical_cast_dynamic_num_not_ignoring_minus >::type caster_type; return caster_type::lexical_cast_impl(arg); } }; } template inline Target lexical_cast(const Source &arg) { typedef typename detail::array_to_pointer_decay::type src; typedef typename ::boost::type_traits::ice_or< detail::is_xchar_to_xchar::value, detail::is_char_array_to_stdstring::value, ::boost::type_traits::ice_and< is_same::value, detail::is_stdstring::value >::value > do_copy_type; typedef typename detail::is_arithmetic_and_not_xchars do_copy_with_dynamic_check_type; typedef typename ::boost::mpl::if_c< do_copy_type::value, detail::lexical_cast_copy, typename ::boost::mpl::if_c< do_copy_with_dynamic_check_type::value, detail::lexical_cast_dynamic_num, detail::lexical_cast_do_cast >::type >::type caster_type; return caster_type::lexical_cast_impl(arg); } # 2013 "/localhome/glisse2/include/boost/lexical_cast.hpp" } # 25 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/tools/fraction.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/tools/fraction.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/tools/fraction.hpp" 2 namespace boost{ namespace math{ namespace tools{ namespace detail { template struct is_pair : public boost::false_type{}; template struct is_pair > : public boost::true_type{}; template struct fraction_traits_simple { typedef typename Gen::result_type result_type; typedef typename Gen::result_type value_type; static result_type a(const value_type& v) { return 1; } static result_type b(const value_type& v) { return v; } }; template struct fraction_traits_pair { typedef typename Gen::result_type value_type; typedef typename value_type::first_type result_type; static result_type a(const value_type& v) { return v.first; } static result_type b(const value_type& v) { return v.second; } }; template struct fraction_traits : public boost::mpl::if_c< is_pair::value, fraction_traits_pair, fraction_traits_simple >::type { }; } # 87 "/localhome/glisse2/include/boost/math/tools/fraction.hpp" template inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor, boost::uintmax_t& max_terms) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef detail::fraction_traits traits; typedef typename traits::result_type result_type; typedef typename traits::value_type value_type; result_type tiny = tools::min_value(); value_type v = g(); result_type f, C, D, delta; f = traits::b(v); if(f == 0) f = tiny; C = f; D = 0; boost::uintmax_t counter(max_terms); do{ v = g(); D = traits::b(v) + traits::a(v) * D; if(D == 0) D = tiny; C = traits::b(v) + traits::a(v) / C; if(C == 0) C = tiny; D = 1/D; delta = C*D; f = f * delta; }while((fabs(delta - 1) > factor) && --counter); max_terms = max_terms - counter; return f; } template inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, const U& factor) { boost::uintmax_t max_terms = (std::numeric_limits::max)(); return continued_fraction_b(g, factor, max_terms); } template inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef detail::fraction_traits traits; typedef typename traits::result_type result_type; result_type factor = ldexp(1.0f, 1 - bits); boost::uintmax_t max_terms = (std::numeric_limits::max)(); return continued_fraction_b(g, factor, max_terms); } template inline typename detail::fraction_traits::result_type continued_fraction_b(Gen& g, int bits, boost::uintmax_t& max_terms) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef detail::fraction_traits traits; typedef typename traits::result_type result_type; result_type factor = ldexp(1.0f, 1 - bits); return continued_fraction_b(g, factor, max_terms); } # 173 "/localhome/glisse2/include/boost/math/tools/fraction.hpp" template inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor, boost::uintmax_t& max_terms) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef detail::fraction_traits traits; typedef typename traits::result_type result_type; typedef typename traits::value_type value_type; result_type tiny = tools::min_value(); value_type v = g(); result_type f, C, D, delta, a0; f = traits::b(v); a0 = traits::a(v); if(f == 0) f = tiny; C = f; D = 0; boost::uintmax_t counter(max_terms); do{ v = g(); D = traits::b(v) + traits::a(v) * D; if(D == 0) D = tiny; C = traits::b(v) + traits::a(v) / C; if(C == 0) C = tiny; D = 1/D; delta = C*D; f = f * delta; }while((fabs(delta - 1) > factor) && --counter); max_terms = max_terms - counter; return a0/f; } template inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, const U& factor) { boost::uintmax_t max_iter = (std::numeric_limits::max)(); return continued_fraction_a(g, factor, max_iter); } template inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef detail::fraction_traits traits; typedef typename traits::result_type result_type; result_type factor = ldexp(1.0f, 1-bits); boost::uintmax_t max_iter = (std::numeric_limits::max)(); return continued_fraction_a(g, factor, max_iter); } template inline typename detail::fraction_traits::result_type continued_fraction_a(Gen& g, int bits, boost::uintmax_t& max_terms) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef detail::fraction_traits traits; typedef typename traits::result_type result_type; result_type factor = ldexp(1.0f, 1-bits); return continued_fraction_a(g, factor, max_terms); } } } } # 30 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/constants/constants.hpp" 1 # 20 "/localhome/glisse2/include/boost/math/constants/constants.hpp" namespace boost{ namespace math { namespace constants { # 52 "/localhome/glisse2/include/boost/math/constants/constants.hpp" template inline T pi() { static const T result = ::boost::lexical_cast("3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196e0"); return result; } template <> inline float pi() { return 3.141592653589793238462643383279502884197169399375105820974944e0F; } template <> inline double pi() { return 3.141592653589793238462643383279502884197169399375105820974944e0; } template <> inline long double pi() { return 3.141592653589793238462643383279502884197169399375105820974944e0L; } template inline T two_pi() { static const T result = ::boost::lexical_cast("6.28318530717958647692528676655900576839433880150610e0"); return result; } template <> inline float two_pi() { return 6.2831853071795864769252867665590057683943388015061e0F; } template <> inline double two_pi() { return 6.2831853071795864769252867665590057683943388015061e0; } template <> inline long double two_pi() { return 6.2831853071795864769252867665590057683943388015061e0L; } template inline T one_div_two_pi() { static const T result = ::boost::lexical_cast("0.707106781186547524400844362104849039284835937560840e0"); return result; } template <> inline float one_div_two_pi() { return 0.70710678118654752440084436210484903928483593756084e0F; } template <> inline double one_div_two_pi() { return 0.70710678118654752440084436210484903928483593756084e0; } template <> inline long double one_div_two_pi() { return 0.70710678118654752440084436210484903928483593756084e0L; } template inline T root_pi() { static const T result = ::boost::lexical_cast("1.77245385090551602729816748334114518279750e0"); return result; } template <> inline float root_pi() { return 1.7724538509055160272981674833411451827975e0F; } template <> inline double root_pi() { return 1.7724538509055160272981674833411451827975e0; } template <> inline long double root_pi() { return 1.7724538509055160272981674833411451827975e0L; } template inline T root_half_pi() { static const T result = ::boost::lexical_cast("1.2533141373155002512078826424055226265030e0"); return result; } template <> inline float root_half_pi() { return 1.253314137315500251207882642405522626503e0F; } template <> inline double root_half_pi() { return 1.253314137315500251207882642405522626503e0; } template <> inline long double root_half_pi() { return 1.253314137315500251207882642405522626503e0L; } template inline T root_two_pi() { static const T result = ::boost::lexical_cast("2.5066282746310005024157652848110452530070e0"); return result; } template <> inline float root_two_pi() { return 2.506628274631000502415765284811045253007e0F; } template <> inline double root_two_pi() { return 2.506628274631000502415765284811045253007e0; } template <> inline long double root_two_pi() { return 2.506628274631000502415765284811045253007e0L; } template inline T root_ln_four() { static const T result = ::boost::lexical_cast("1.17741002251547469101156932645969963774738568938582053852252575650002658854698492680841813836877081e0"); return result; } template <> inline float root_ln_four() { return 1.1774100225154746910115693264596996377473856893858205385225257565000e0F; } template <> inline double root_ln_four() { return 1.1774100225154746910115693264596996377473856893858205385225257565000e0; } template <> inline long double root_ln_four() { return 1.1774100225154746910115693264596996377473856893858205385225257565000e0L; } template inline T e() { static const T result = ::boost::lexical_cast("2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003059921817413596629043572900334295260595630738132328627943490763233829880753195251019011e0"); return result; } template <> inline float e() { return 2.7182818284590452353602874713526624977572470936999595749669676e0F; } template <> inline double e() { return 2.7182818284590452353602874713526624977572470936999595749669676e0; } template <> inline long double e() { return 2.7182818284590452353602874713526624977572470936999595749669676e0L; } template inline T half() { static const T result = ::boost::lexical_cast("0.50e0"); return result; } template <> inline float half() { return 0.5e0F; } template <> inline double half() { return 0.5e0; } template <> inline long double half() { return 0.5e0L; } template inline T euler() { static const T result = ::boost::lexical_cast("0.57721566490153286060651209008240243104215933593992359880576723488486e0"); return result; } template <> inline float euler() { return 0.577215664901532860606512090082402431042159335939923598805e0F; } template <> inline double euler() { return 0.577215664901532860606512090082402431042159335939923598805e0; } template <> inline long double euler() { return 0.577215664901532860606512090082402431042159335939923598805e0L; } template inline T root_two() { static const T result = ::boost::lexical_cast("1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623091229702492483605585073721264412149709993583141322266592750559275579995050115278206e0"); return result; } template <> inline float root_two() { return 1.414213562373095048801688724209698078569671875376948073e0F; } template <> inline double root_two() { return 1.414213562373095048801688724209698078569671875376948073e0; } template <> inline long double root_two() { return 1.414213562373095048801688724209698078569671875376948073e0L; } template inline T half_root_two() { static const T result = ::boost::lexical_cast("0.707106781186547524400844362104849039284835937560840e0"); return result; } template <> inline float half_root_two() { return 0.70710678118654752440084436210484903928483593756084e0F; } template <> inline double half_root_two() { return 0.70710678118654752440084436210484903928483593756084e0; } template <> inline long double half_root_two() { return 0.70710678118654752440084436210484903928483593756084e0L; } template inline T ln_two() { static const T result = ::boost::lexical_cast("0.693147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687e0"); return result; } template <> inline float ln_two() { return 0.693147180559945309417232121458176568075500134360255254e0F; } template <> inline double ln_two() { return 0.693147180559945309417232121458176568075500134360255254e0; } template <> inline long double ln_two() { return 0.693147180559945309417232121458176568075500134360255254e0L; } template inline T ln_ln_two() { static const T result = ::boost::lexical_cast("-0.3665129205816643270124391582326694694542634478371052630536777136705616153193527385494558228566989083583025230453648347655663425171940646634e0"); return result; } template <> inline float ln_ln_two() { return -0.36651292058166432701243915823266946945426344783710526305367771367056e0F; } template <> inline double ln_ln_two() { return -0.36651292058166432701243915823266946945426344783710526305367771367056e0; } template <> inline long double ln_ln_two() { return -0.36651292058166432701243915823266946945426344783710526305367771367056e0L; } template inline T third() { static const T result = ::boost::lexical_cast("0.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e0"); return result; } template <> inline float third() { return 0.3333333333333333333333333333333333333333333333333333333333333333333333e0F; } template <> inline double third() { return 0.3333333333333333333333333333333333333333333333333333333333333333333333e0; } template <> inline long double third() { return 0.3333333333333333333333333333333333333333333333333333333333333333333333e0L; } template inline T twothirds() { static const T result = ::boost::lexical_cast("0.6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e0"); return result; } template <> inline float twothirds() { return 0.66666666666666666666666666666666666666666666666666666666666666666666e0F; } template <> inline double twothirds() { return 0.66666666666666666666666666666666666666666666666666666666666666666666e0; } template <> inline long double twothirds() { return 0.66666666666666666666666666666666666666666666666666666666666666666666e0L; } template inline T pi_minus_three() { static const T result = ::boost::lexical_cast("0.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196e0"); return result; } template <> inline float pi_minus_three() { return 0.141592653589793238462643383279502884197169399375105820974944e0F; } template <> inline double pi_minus_three() { return 0.141592653589793238462643383279502884197169399375105820974944e0; } template <> inline long double pi_minus_three() { return 0.141592653589793238462643383279502884197169399375105820974944e0L; } template inline T four_minus_pi() { static const T result = ::boost::lexical_cast("0.858407346410206761537356616720497115802830600624894179025055407692183590e0"); return result; } template <> inline float four_minus_pi() { return 0.85840734641020676153735661672049711580283060062489417902505540769218359e0F; } template <> inline double four_minus_pi() { return 0.85840734641020676153735661672049711580283060062489417902505540769218359e0; } template <> inline long double four_minus_pi() { return 0.85840734641020676153735661672049711580283060062489417902505540769218359e0L; } template inline T pow23_four_minus_pi() { static const T result = ::boost::lexical_cast("0.795316767371597544348395335056806580727639173327713205445302234385821610e0"); return result; } template <> inline float pow23_four_minus_pi() { return 0.79531676737159754434839533505680658072763917332771320544530223438582161e0F; } template <> inline double pow23_four_minus_pi() { return 0.79531676737159754434839533505680658072763917332771320544530223438582161e0; } template <> inline long double pow23_four_minus_pi() { return 0.79531676737159754434839533505680658072763917332771320544530223438582161e0L; } template inline T exp_minus_half() { static const T result = ::boost::lexical_cast("0.6065306597126334236037995349911804534419181354871869556828921587350565194137484239986476115079894560e0"); return result; } template <> inline float exp_minus_half() { return 0.6065306597126334236037995349911804534419181354871869556828921587350565194137e0F; } template <> inline double exp_minus_half() { return 0.6065306597126334236037995349911804534419181354871869556828921587350565194137e0; } template <> inline long double exp_minus_half() { return 0.6065306597126334236037995349911804534419181354871869556828921587350565194137e0L; } } } } # 34 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/trunc.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/trunc.hpp" namespace boost{ namespace math{ template inline T trunc(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(!(boost::math::isfinite)(v)) return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, v, v, pol); return (v >= 0) ? static_cast(floor(v)) : static_cast(ceil(v)); } template inline T trunc(const T& v) { return trunc(v, policies::policy<>()); } # 41 "/localhome/glisse2/include/boost/math/special_functions/trunc.hpp" template inline int itrunc(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = boost::math::trunc(v, pol); if((r > (std::numeric_limits::max)()) || (r < (std::numeric_limits::min)())) return static_cast(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, v, 0, pol)); return static_cast(r); } template inline int itrunc(const T& v) { return itrunc(v, policies::policy<>()); } template inline long ltrunc(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = boost::math::trunc(v, pol); if((r > (std::numeric_limits::max)()) || (r < (std::numeric_limits::min)())) return static_cast(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, v, 0L, pol)); return static_cast(r); } template inline long ltrunc(const T& v) { return ltrunc(v, policies::policy<>()); } template inline boost::long_long_type lltrunc(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = boost::math::trunc(v, pol); if((r > (std::numeric_limits::max)()) || (r < (std::numeric_limits::min)())) return static_cast(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, 0LL, pol)); return static_cast(r); } template inline boost::long_long_type lltrunc(const T& v) { return lltrunc(v, policies::policy<>()); } }} # 37 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/powm1.hpp" 1 # 16 "/localhome/glisse2/include/boost/math/special_functions/powm1.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 17 "/localhome/glisse2/include/boost/math/special_functions/powm1.hpp" 2 namespace boost{ namespace math{ namespace detail{ template inline T powm1_imp(const T a, const T z, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if((fabs(a) < 1) || (fabs(z) < 1)) { T p = log(a) * z; if(fabs(p) < 2) return boost::math::expm1(p, pol); } return pow(a, z) - 1; } } template inline typename tools::promote_args::type powm1(const T1 a, const T2 z) { typedef typename tools::promote_args::type result_type; return detail::powm1_imp(static_cast(a), static_cast(z), policies::policy<>()); } template inline typename tools::promote_args::type powm1(const T1 a, const T2 z, const Policy& pol) { typedef typename tools::promote_args::type result_type; return detail::powm1_imp(static_cast(a), static_cast(z), pol); } } } # 38 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/lanczos.hpp" 1 # 16 "/localhome/glisse2/include/boost/math/special_functions/lanczos.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/lanczos.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include-fixed/limits.h" 1 3 4 # 22 "/localhome/glisse2/include/boost/math/special_functions/lanczos.hpp" 2 namespace boost{ namespace math{ namespace lanczos{ # 40 "/localhome/glisse2/include/boost/math/special_functions/lanczos.hpp" struct lanczos6 : public mpl::int_<35> { template static T lanczos_sum(const T& z) { static const T num[6] = { static_cast(8706.349592549009182288174442774377925882L), static_cast(8523.650341121874633477483696775067709735L), static_cast(3338.029219476423550899999750161289306564L), static_cast(653.6424994294008795995653541449610986791L), static_cast(63.99951844938187085666201263218840287667L), static_cast(2.506628274631006311133031631822390264407L) }; static const T denom[6] = { static_cast(0u), static_cast(24u), static_cast(50u), static_cast(35u), static_cast(10u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[6] = { static_cast(32.81244541029783471623665933780748627823L), static_cast(32.12388941444332003446077108933558534361L), static_cast(12.58034729455216106950851080138931470954L), static_cast(2.463444478353241423633780693218408889251L), static_cast(0.2412010548258800231126240760264822486599L), static_cast(0.009446967704539249494420221613134244048319L) }; static const T denom[6] = { static_cast(0u), static_cast(24u), static_cast(50u), static_cast(35u), static_cast(10u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[5] = { static_cast(2.044879010930422922760429926121241330235L), static_cast(-2.751366405578505366591317846728753993668L), static_cast(1.02282965224225004296750609604264824677L), static_cast(-0.09786124911582813985028889636665335893627L), static_cast(0.0009829742267506615183144364420540766510112L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[5] = { static_cast(5.748142489536043490764289256167080091892L), static_cast(-7.734074268282457156081021756682138251825L), static_cast(2.875167944990511006997713242805893543947L), static_cast(-0.2750873773533504542306766137703788781776L), static_cast(0.002763134585812698552178368447708846850353L), }; T result = 0; T z = dz + 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 5.581000000000000405009359383257105946541; } }; struct lanczos11 : public mpl::int_<60> { template static T lanczos_sum(const T& z) { static const T num[11] = { static_cast(38474670393.31776828316099004518914832218L), static_cast(36857665043.51950660081971227404959150474L), static_cast(15889202453.72942008945006665994637853242L), static_cast(4059208354.298834770194507810788393801607L), static_cast(680547661.1834733286087695557084801366446L), static_cast(78239755.00312005289816041245285376206263L), static_cast(6246580.776401795264013335510453568106366L), static_cast(341986.3488721347032223777872763188768288L), static_cast(12287.19451182455120096222044424100527629L), static_cast(261.6140441641668190791708576058805625502L), static_cast(2.506628274631000502415573855452633787834L) }; static const T denom[11] = { static_cast(0u), static_cast(362880u), static_cast(1026576u), static_cast(1172700u), static_cast(723680u), static_cast(269325u), static_cast(63273u), static_cast(9450u), static_cast(870u), static_cast(45u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[11] = { static_cast(709811.662581657956893540610814842699825L), static_cast(679979.847415722640161734319823103390728L), static_cast(293136.785721159725251629480984140341656L), static_cast(74887.5403291467179935942448101441897121L), static_cast(12555.29058241386295096255111537516768137L), static_cast(1443.42992444170669746078056942194198252L), static_cast(115.2419459613734722083208906727972935065L), static_cast(6.30923920573262762719523981992008976989L), static_cast(0.2266840463022436475495508977579735223818L), static_cast(0.004826466289237661857584712046231435101741L), static_cast(0.4624429436045378766270459638520555557321e-4L) }; static const T denom[11] = { static_cast(0u), static_cast(362880u), static_cast(1026576u), static_cast(1172700u), static_cast(723680u), static_cast(269325u), static_cast(63273u), static_cast(9450u), static_cast(870u), static_cast(45u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[10] = { static_cast(4.005853070677940377969080796551266387954L), static_cast(-13.17044315127646469834125159673527183164L), static_cast(17.19146865350790353683895137079288129318L), static_cast(-11.36446409067666626185701599196274701126L), static_cast(4.024801119349323770107694133829772634737L), static_cast(-0.7445703262078094128346501724255463005006L), static_cast(0.06513861351917497265045550019547857713172L), static_cast(-0.00217899958561830354633560009312512312758L), static_cast(0.17655204574495137651670832229571934738e-4L), static_cast(-0.1036282091079938047775645941885460820853e-7L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[10] = { static_cast(19.05889633808148715159575716844556056056L), static_cast(-62.66183664701721716960978577959655644762L), static_cast(81.7929198065004751699057192860287512027L), static_cast(-54.06941772964234828416072865069196553015L), static_cast(19.14904664790693019642068229478769661515L), static_cast(-3.542488556926667589704590409095331790317L), static_cast(0.3099140334815639910894627700232804503017L), static_cast(-0.01036716187296241640634252431913030440825L), static_cast(0.8399926504443119927673843789048514017761e-4L), static_cast(-0.493038376656195010308610694048822561263e-7L), }; T result = 0; T z = dz + 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 10.90051099999999983936049829935654997826; } }; struct lanczos13 : public mpl::int_<72> { template static T lanczos_sum(const T& z) { static const T num[13] = { static_cast(44012138428004.60895436261759919070125699L), static_cast(41590453358593.20051581730723108131357995L), static_cast(18013842787117.99677796276038389462742949L), static_cast(4728736263475.388896889723995205703970787L), static_cast(837910083628.4046470415724300225777912264L), static_cast(105583707273.4299344907359855510105321192L), static_cast(9701363618.494999493386608345339104922694L), static_cast(654914397.5482052641016767125048538245644L), static_cast(32238322.94213356530668889463945849409184L), static_cast(1128514.219497091438040721811544858643121L), static_cast(26665.79378459858944762533958798805525125L), static_cast(381.8801248632926870394389468349331394196L), static_cast(2.506628274631000502415763426076722427007L) }; static const T denom[13] = { static_cast(0u), static_cast(39916800u), static_cast(120543840u), static_cast(150917976u), static_cast(105258076u), static_cast(45995730u), static_cast(13339535u), static_cast(2637558u), static_cast(357423u), static_cast(32670u), static_cast(1925u), static_cast(66u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[13] = { static_cast(86091529.53418537217994842267760536134841L), static_cast(81354505.17858011242874285785316135398567L), static_cast(35236626.38815461910817650960734605416521L), static_cast(9249814.988024471294683815872977672237195L), static_cast(1639024.216687146960253839656643518985826L), static_cast(206530.8157641225032631778026076868855623L), static_cast(18976.70193530288915698282139308582105936L), static_cast(1281.068909912559479885759622791374106059L), static_cast(63.06093343420234536146194868906771599354L), static_cast(2.207470909792527638222674678171050209691L), static_cast(0.05216058694613505427476207805814960742102L), static_cast(0.0007469903808915448316510079585999893674101L), static_cast(0.4903180573459871862552197089738373164184e-5L) }; static const T denom[13] = { static_cast(0u), static_cast(39916800u), static_cast(120543840u), static_cast(150917976u), static_cast(105258076u), static_cast(45995730u), static_cast(13339535u), static_cast(2637558u), static_cast(357423u), static_cast(32670u), static_cast(1925u), static_cast(66u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[12] = { static_cast(4.832115561461656947793029596285626840312L), static_cast(-19.86441536140337740383120735104359034688L), static_cast(33.9927422807443239927197864963170585331L), static_cast(-31.41520692249765980987427413991250886138L), static_cast(17.0270866009599345679868972409543597821L), static_cast(-5.5077216950865501362506920516723682167L), static_cast(1.037811741948214855286817963800439373362L), static_cast(-0.106640468537356182313660880481398642811L), static_cast(0.005276450526660653288757565778182586742831L), static_cast(-0.0001000935625597121545867453746252064770029L), static_cast(0.462590910138598083940803704521211569234e-6L), static_cast(-0.1735307814426389420248044907765671743012e-9L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[12] = { static_cast(26.96979819614830698367887026728396466395L), static_cast(-110.8705424709385114023884328797900204863L), static_cast(189.7258846119231466417015694690434770085L), static_cast(-175.3397202971107486383321670769397356553L), static_cast(95.03437648691551457087250340903980824948L), static_cast(-30.7406022781665264273675797983497141978L), static_cast(5.792405601630517993355102578874590410552L), static_cast(-0.5951993240669148697377539518639997795831L), static_cast(0.02944979359164017509944724739946255067671L), static_cast(-0.0005586586555377030921194246330399163602684L), static_cast(0.2581888478270733025288922038673392636029e-5L), static_cast(-0.9685385411006641478305219367315965391289e-9L), }; T result = 0; T z = z = 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 13.1445650000000000545696821063756942749; } }; struct lanczos22 : public mpl::int_<120> { template static T lanczos_sum(const T& z) { static const T num[22] = { static_cast(46198410803245094237463011094.12173081986L), static_cast(43735859291852324413622037436.321513777L), static_cast(19716607234435171720534556386.97481377748L), static_cast(5629401471315018442177955161.245623932129L), static_cast(1142024910634417138386281569.245580222392L), static_cast(175048529315951173131586747.695329230778L), static_cast(21044290245653709191654675.41581372963167L), static_cast(2033001410561031998451380.335553678782601L), static_cast(160394318862140953773928.8736211601848891L), static_cast(10444944438396359705707.48957290388740896L), static_cast(565075825801617290121.1466393747967538948L), static_cast(25475874292116227538.99448534450411942597L), static_cast(957135055846602154.6720835535232270205725L), static_cast(29874506304047462.23662392445173880821515L), static_cast(769651310384737.2749087590725764959689181L), static_cast(16193289100889.15989633624378404096011797L), static_cast(273781151680.6807433264462376754578933261L), static_cast(3630485900.32917021712188739762161583295L), static_cast(36374352.05577334277856865691538582936484L), static_cast(258945.7742115532455441786924971194951043L), static_cast(1167.501919472435718934219997431551246996L), static_cast(2.50662827463100050241576528481104525333L) }; static const T denom[22] = { 0.0L, 2432902008176640000.0L, 8752948036761600000.0L, 13803759753640704000.0L, 12870931245150988800.0L, 8037811822645051776.0L, 3599979517947607200.0L, 1206647803780373360.0L, 311333643161390640.0L, 63030812099294896.0L, 10142299865511450.0L, 1307535010540395.0L, 135585182899530.0L, 11310276995381.0L, 756111184500.0L, 40171771630.0L, 1672280820.0L, 53327946.0L, 1256850.0L, 20615.0L, 210.0L, 1.0L }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[22] = { static_cast(6939996264376682180.277485395074954356211L), static_cast(6570067992110214451.87201438870245659384L), static_cast(2961859037444440551.986724631496417064121L), static_cast(845657339772791245.3541226499766163431651L), static_cast(171556737035449095.2475716923888737881837L), static_cast(26296059072490867.7822441885603400926007L), static_cast(3161305619652108.433798300149816829198706L), static_cast(305400596026022.4774396904484542582526472L), static_cast(24094681058862.55120507202622377623528108L), static_cast(1569055604375.919477574824168939428328839L), static_cast(84886558909.02047889339710230696942513159L), static_cast(3827024985.166751989686050643579753162298L), static_cast(143782298.9273215199098728674282885500522L), static_cast(4487794.24541641841336786238909171265944L), static_cast(115618.2025760830513505888216285273541959L), static_cast(2432.580773108508276957461757328744780439L), static_cast(41.12782532742893597168530008461874360191L), static_cast(0.5453771709477689805460179187388702295792L), static_cast(0.005464211062612080347167337964166505282809L), static_cast(0.388992321263586767037090706042788910953e-4L), static_cast(0.1753839324538447655939518484052327068859e-6L), static_cast(0.3765495513732730583386223384116545391759e-9L) }; static const T denom[22] = { 0.0L, 2432902008176640000.0L, 8752948036761600000.0L, 13803759753640704000.0L, 12870931245150988800.0L, 8037811822645051776.0L, 3599979517947607200.0L, 1206647803780373360.0L, 311333643161390640.0L, 63030812099294896.0L, 10142299865511450.0L, 1307535010540395.0L, 135585182899530.0L, 11310276995381.0L, 756111184500.0L, 40171771630.0L, 1672280820.0L, 53327946.0L, 1256850.0L, 20615.0L, 210.0L, 1.0L }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[21] = { static_cast(8.318998691953337183034781139546384476554L), static_cast(-63.15415991415959158214140353299240638675L), static_cast(217.3108224383632868591462242669081540163L), static_cast(-448.5134281386108366899784093610397354889L), static_cast(619.2903759363285456927248474593012711346L), static_cast(-604.1630177420625418522025080080444177046L), static_cast(428.8166750424646119935047118287362193314L), static_cast(-224.6988753721310913866347429589434550302L), static_cast(87.32181627555510833499451817622786940961L), static_cast(-25.07866854821128965662498003029199058098L), static_cast(5.264398125689025351448861011657789005392L), static_cast(-0.792518936256495243383586076579921559914L), static_cast(0.08317448364744713773350272460937904691566L), static_cast(-0.005845345166274053157781068150827567998882L), static_cast(0.0002599412126352082483326238522490030412391L), static_cast(-0.6748102079670763884917431338234783496303e-5L), static_cast(0.908824383434109002762325095643458603605e-7L), static_cast(-0.5299325929309389890892469299969669579725e-9L), static_cast(0.994306085859549890267983602248532869362e-12L), static_cast(-0.3499893692975262747371544905820891835298e-15L), static_cast(0.7260746353663365145454867069182884694961e-20L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[21] = { static_cast(75.39272007105208086018421070699575462226L), static_cast(-572.3481967049935412452681346759966390319L), static_cast(1969.426202741555335078065370698955484358L), static_cast(-4064.74968778032030891520063865996757519L), static_cast(5612.452614138013929794736248384309574814L), static_cast(-5475.357667500026172903620177988213902339L), static_cast(3886.243614216111328329547926490398103492L), static_cast(-2036.382026072125407192448069428134470564L), static_cast(791.3727954936062108045551843636692287652L), static_cast(-227.2808432388436552794021219198885223122L), static_cast(47.70974355562144229897637024320739257284L), static_cast(-7.182373807798293545187073539819697141572L), static_cast(0.7537866989631514559601547530490976100468L), static_cast(-0.05297470142240154822658739758236594717787L), static_cast(0.00235577330936380542539812701472320434133L), static_cast(-0.6115613067659273118098229498679502138802e-4L), static_cast(0.8236417010170941915758315020695551724181e-6L), static_cast(-0.4802628430993048190311242611330072198089e-8L), static_cast(0.9011113376981524418952720279739624707342e-11L), static_cast(-0.3171854152689711198382455703658589996796e-14L), static_cast(0.6580207998808093935798753964580596673177e-19L), }; T result = 0; T z = dz + 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 22.61890999999999962710717227309942245483; } }; struct lanczos6m24 : public mpl::int_<24> { template static T lanczos_sum(const T& z) { static const T num[6] = { static_cast(58.52061591769095910314047740215847630266L), static_cast(182.5248962595894264831189414768236280862L), static_cast(211.0971093028510041839168287718170827259L), static_cast(112.2526547883668146736465390902227161763L), static_cast(27.5192015197455403062503721613097825345L), static_cast(2.50662858515256974113978724717473206342L) }; static const T denom[6] = { static_cast(0u), static_cast(24u), static_cast(50u), static_cast(35u), static_cast(10u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[6] = { static_cast(14.0261432874996476619570577285003839357L), static_cast(43.74732405540314316089531289293124360129L), static_cast(50.59547402616588964511581430025589038612L), static_cast(26.90456680562548195593733429204228910299L), static_cast(6.595765571169314946316366571954421695196L), static_cast(0.6007854010515290065101128585795542383721L) }; static const T denom[6] = { static_cast(0u), static_cast(24u), static_cast(50u), static_cast(35u), static_cast(10u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[5] = { static_cast(0.4922488055204602807654354732674868442106L), static_cast(0.004954497451132152436631238060933905650346L), static_cast(-0.003374784572167105840686977985330859371848L), static_cast(0.001924276018962061937026396537786414831385L), static_cast(-0.00056533046336427583708166383712907694434L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[5] = { static_cast(0.6534966888520080645505805298901130485464L), static_cast(0.006577461728560758362509168026049182707101L), static_cast(-0.004480276069269967207178373559014835978161L), static_cast(0.00255461870648818292376982818026706528842L), static_cast(-0.000750517993690428370380996157470900204524L), }; T result = 0; T z = dz + 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 1.428456135094165802001953125; } }; struct lanczos13m53 : public mpl::int_<53> { template static T lanczos_sum(const T& z) { static const T num[13] = { static_cast(23531376880.41075968857200767445163675473L), static_cast(42919803642.64909876895789904700198885093L), static_cast(35711959237.35566804944018545154716670596L), static_cast(17921034426.03720969991975575445893111267L), static_cast(6039542586.35202800506429164430729792107L), static_cast(1439720407.311721673663223072794912393972L), static_cast(248874557.8620541565114603864132294232163L), static_cast(31426415.58540019438061423162831820536287L), static_cast(2876370.628935372441225409051620849613599L), static_cast(186056.2653952234950402949897160456992822L), static_cast(8071.672002365816210638002902272250613822L), static_cast(210.8242777515793458725097339207133627117L), static_cast(2.506628274631000270164908177133837338626L) }; static const T denom[13] = { static_cast(0u), static_cast(39916800u), static_cast(120543840u), static_cast(150917976u), static_cast(105258076u), static_cast(45995730u), static_cast(13339535u), static_cast(2637558u), static_cast(357423u), static_cast(32670u), static_cast(1925u), static_cast(66u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[13] = { static_cast(56906521.91347156388090791033559122686859L), static_cast(103794043.1163445451906271053616070238554L), static_cast(86363131.28813859145546927288977868422342L), static_cast(43338889.32467613834773723740590533316085L), static_cast(14605578.08768506808414169982791359218571L), static_cast(3481712.15498064590882071018964774556468L), static_cast(601859.6171681098786670226533699352302507L), static_cast(75999.29304014542649875303443598909137092L), static_cast(6955.999602515376140356310115515198987526L), static_cast(449.9445569063168119446858607650988409623L), static_cast(19.51992788247617482847860966235652136208L), static_cast(0.5098416655656676188125178644804694509993L), static_cast(0.006061842346248906525783753964555936883222L) }; static const T denom[13] = { static_cast(0u), static_cast(39916800u), static_cast(120543840u), static_cast(150917976u), static_cast(105258076u), static_cast(45995730u), static_cast(13339535u), static_cast(2637558u), static_cast(357423u), static_cast(32670u), static_cast(1925u), static_cast(66u), static_cast(1u) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[12] = { static_cast(2.208709979316623790862569924861841433016L), static_cast(-3.327150580651624233553677113928873034916L), static_cast(1.483082862367253753040442933770164111678L), static_cast(-0.1993758927614728757314233026257810172008L), static_cast(0.004785200610085071473880915854204301886437L), static_cast(-0.1515973019871092388943437623825208095123e-5L), static_cast(-0.2752907702903126466004207345038327818713e-7L), static_cast(0.3075580174791348492737947340039992829546e-7L), static_cast(-0.1933117898880828348692541394841204288047e-7L), static_cast(0.8690926181038057039526127422002498960172e-8L), static_cast(-0.2499505151487868335680273909354071938387e-8L), static_cast(0.3394643171893132535170101292240837927725e-9L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[12] = { static_cast(6.565936202082889535528455955485877361223L), static_cast(-9.8907772644920670589288081640128194231L), static_cast(4.408830289125943377923077727900630927902L), static_cast(-0.5926941084905061794445733628891024027949L), static_cast(0.01422519127192419234315002746252160965831L), static_cast(-0.4506604409707170077136555010018549819192e-5L), static_cast(-0.8183698410724358930823737982119474130069e-7L), static_cast(0.9142922068165324132060550591210267992072e-7L), static_cast(-0.5746670642147041587497159649318454348117e-7L), static_cast(0.2583592566524439230844378948704262291927e-7L), static_cast(-0.7430396708998719707642735577238449585822e-8L), static_cast(0.1009141566987569892221439918230042368112e-8L), }; T result = 0; T z = dz + 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 6.024680040776729583740234375; } }; struct lanczos17m64 : public mpl::int_<64> { template static T lanczos_sum(const T& z) { static const T num[17] = { static_cast(553681095419291969.2230556393350368550504L), static_cast(731918863887667017.2511276782146694632234L), static_cast(453393234285807339.4627124634539085143364L), static_cast(174701893724452790.3546219631779712198035L), static_cast(46866125995234723.82897281620357050883077L), static_cast(9281280675933215.169109622777099699054272L), static_cast(1403600894156674.551057997617468721789536L), static_cast(165345984157572.7305349809894046783973837L), static_cast(15333629842677.31531822808737907246817024L), static_cast(1123152927963.956626161137169462874517318L), static_cast(64763127437.92329018717775593533620578237L), static_cast(2908830362.657527782848828237106640944457L), static_cast(99764700.56999856729959383751710026787811L), static_cast(2525791.604886139959837791244686290089331L), static_cast(44516.94034970167828580039370201346554872L), static_cast(488.0063567520005730476791712814838113252L), static_cast(2.50662827463100050241576877135758834683L) }; static const T denom[17] = { 0.0L, 1307674368000.0L, 4339163001600.0L, 6165817614720.0L, 5056995703824.0L, 2706813345600.0L, 1009672107080.0L, 272803210680.0L, 54631129553.0L, 8207628000.0L, 928095740.0L, 78558480.0L, 4899622.0L, 218400.0L, 6580.0L, 120.0L, 1.0L }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[17] = { static_cast(2715894658327.717377557655133124376674911L), static_cast(3590179526097.912105038525528721129550434L), static_cast(2223966599737.814969312127353235818710172L), static_cast(856940834518.9562481809925866825485883417L), static_cast(229885871668.749072933597446453399395469L), static_cast(45526171687.54610815813502794395753410032L), static_cast(6884887713.165178784550917647709216424823L), static_cast(811048596.1407531864760282453852372777439L), static_cast(75213915.96540822314499613623119501704812L), static_cast(5509245.417224265151697527957954952830126L), static_cast(317673.5368435419126714931842182369574221L), static_cast(14268.27989845035520147014373320337523596L), static_cast(489.3618720403263670213909083601787814792L), static_cast(12.38941330038454449295883217865458609584L), static_cast(0.2183627389504614963941574507281683147897L), static_cast(0.002393749522058449186690627996063983095463L), static_cast(0.1229541408909435212800785616808830746135e-4L) }; static const T denom[17] = { 0.0L, 1307674368000.0L, 4339163001600.0L, 6165817614720.0L, 5056995703824.0L, 2706813345600.0L, 1009672107080.0L, 272803210680.0L, 54631129553.0L, 8207628000.0L, 928095740.0L, 78558480.0L, 4899622.0L, 218400.0L, 6580.0L, 120.0L, 1.0L }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[16] = { static_cast(4.493645054286536365763334986866616581265L), static_cast(-16.95716370392468543800733966378143997694L), static_cast(26.19196892983737527836811770970479846644L), static_cast(-21.3659076437988814488356323758179283908L), static_cast(9.913992596774556590710751047594507535764L), static_cast(-2.62888300018780199210536267080940382158L), static_cast(0.3807056693542503606384861890663080735588L), static_cast(-0.02714647489697685807340312061034730486958L), static_cast(0.0007815484715461206757220527133967191796747L), static_cast(-0.6108630817371501052576880554048972272435e-5L), static_cast(0.5037380238864836824167713635482801545086e-8L), static_cast(-0.1483232144262638814568926925964858237006e-13L), static_cast(0.1346609158752142460943888149156716841693e-14L), static_cast(-0.660492688923978805315914918995410340796e-15L), static_cast(0.1472114697343266749193617793755763792681e-15L), static_cast(-0.1410901942033374651613542904678399264447e-16L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[16] = { static_cast(23.56409085052261327114594781581930373708L), static_cast(-88.92116338946308797946237246006238652361L), static_cast(137.3472822086847596961177383569603988797L), static_cast(-112.0400438263562152489272966461114852861L), static_cast(51.98768915202973863076166956576777843805L), static_cast(-13.78552090862799358221343319574970124948L), static_cast(1.996371068830872830250406773917646121742L), static_cast(-0.1423525874909934506274738563671862576161L), static_cast(0.004098338646046865122459664947239111298524L), static_cast(-0.3203286637326511000882086573060433529094e-4L), static_cast(0.2641536751640138646146395939004587594407e-7L), static_cast(-0.7777876663062235617693516558976641009819e-13L), static_cast(0.7061443477097101636871806229515157914789e-14L), static_cast(-0.3463537849537988455590834887691613484813e-14L), static_cast(0.7719578215795234036320348283011129450595e-15L), static_cast(-0.7398586479708476329563577384044188912075e-16L), }; T result = 0; T z = dz + 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 12.2252227365970611572265625; } }; struct lanczos24m113 : public mpl::int_<113> { template static T lanczos_sum(const T& z) { static const T num[24] = { static_cast(2029889364934367661624137213253.22102954656825019111612712252027267955023987678816620961507L), static_cast(2338599599286656537526273232565.2727349714338768161421882478417543004440597874814359063158L), static_cast(1288527989493833400335117708406.3953711906175960449186720680201425446299360322830739180195L), static_cast(451779745834728745064649902914.550539158066332484594436145043388809847364393288132164411521L), static_cast(113141284461097964029239556815.291212318665536114012605167994061291631013303788706545334708L), static_cast(21533689802794625866812941616.7509064680880468667055339259146063256555368135236149614592432L), static_cast(3235510315314840089932120340.71494940111731241353655381919722177496659303550321056514776757L), static_cast(393537392344185475704891959.081297108513472083749083165179784098220158201055270548272414314L), static_cast(39418265082950435024868801.5005452240816902251477336582325944930252142622315101857742955673L), static_cast(3290158764187118871697791.05850632319194734270969161036889516414516566453884272345518372696L), static_cast(230677110449632078321772.618245845856640677845629174549731890660612368500786684333975350954L), static_cast(13652233645509183190158.5916189185218250859402806777406323001463296297553612462737044693697L), static_cast(683661466754325350495.216655026531202476397782296585200982429378069417193575896602446904762L), static_cast(28967871782219334117.0122379171041074970463982134039409352925258212207710168851968215545064L), static_cast(1036104088560167006.2022834098572346459442601718514554488352117620272232373622553429728555L), static_cast(31128490785613152.8380102669349814751268126141105475287632676569913936040772990253369753962L), static_cast(779327504127342.536207878988196814811198475410572992436243686674896894543126229424358472541L), static_cast(16067543181294.643350688789124777020407337133926174150582333950666044399234540521336771876L), static_cast(268161795520.300916569439413185778557212729611517883948634711190170998896514639936969855484L), static_cast(3533216359.10528191668842486732408440112703691790824611391987708562111396961696753452085068L), static_cast(35378979.5479656110614685178752543826919239614088343789329169535932709470588426584501652577L), static_cast(253034.881362204346444503097491737872930637147096453940375713745904094735506180552724766444L), static_cast(1151.61895453463992438325318456328526085882924197763140514450975619271382783957699017875304L), static_cast(2.50662827463100050241576528481104515966515623051532908941425544355490413900497467936202516L) }; static const T denom[24] = { static_cast(0L), static_cast(0.112400072777760768e22L), static_cast(0.414847677933545472e22L), static_cast(6756146673770930688000.0L), static_cast(6548684852703068697600.0L), static_cast(4280722865357147142912.0L), static_cast(2021687376910682741568.0L), static_cast(720308216440924653696.0L), static_cast(199321978221066137360.0L), static_cast(43714229649594412832.0L), static_cast(7707401101297361068.0L), static_cast(1103230881185949736.0L), static_cast(129006659818331295.0L), static_cast(12363045847086207.0L), static_cast(971250460939913.0L), static_cast(62382416421941.0L), static_cast(3256091103430.0L), static_cast(136717357942.0L), static_cast(4546047198.0L), static_cast(116896626L), static_cast(2240315L), static_cast(30107L), static_cast(253L), static_cast(1L) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_expG_scaled(const T& z) { static const T num[24] = { static_cast(3035162425359883494754.02878223286972654682199012688209026810841953293372712802258398358538L), static_cast(3496756894406430103600.16057175075063458536101374170860226963245118484234495645518505519827L), static_cast(1926652656689320888654.01954015145958293168365236755537645929361841917596501251362171653478L), static_cast(675517066488272766316.083023742440619929434602223726894748181327187670231286180156444871912L), static_cast(169172853104918752780.086262749564831660238912144573032141700464995906149421555926000038492L), static_cast(32197935167225605785.6444116302160245528783954573163541751756353183343357329404208062043808L), static_cast(4837849542714083249.37587447454818124327561966323276633775195138872820542242539845253171632L), static_cast(588431038090493242.308438203986649553459461798968819276505178004064031201740043314534404158L), static_cast(58939585141634058.6206417889192563007809470547755357240808035714047014324843817783741669733L), static_cast(4919561837722192.82991866530802080996138070630296720420704876654726991998309206256077395868L), static_cast(344916580244240.407442753122831512004021081677987651622305356145640394384006997569631719101L), static_cast(20413302960687.8250598845969238472629322716685686993835561234733641729957841485003560103066L), static_cast(1022234822943.78400752460970689311934727763870970686747383486600540378889311406851534545789L), static_cast(43313787191.9821354846952908076307094286897439975815501673706144217246093900159173598852503L), static_cast(1549219505.59667418528481770869280437577581951167003505825834192510436144666564648361001914L), static_cast(46544421.1998761919380541579358096705925369145324466147390364674998568485110045455014967149L), static_cast(1165278.06807504975090675074910052763026564833951579556132777702952882101173607903881127542L), static_cast(24024.759267256769471083727721827405338569868270177779485912486668586611981795179894572115L), static_cast(400.965008113421955824358063769761286758463521789765880962939528760888853281920872064838918L), static_cast(5.28299015654478269617039029170846385138134929147421558771949982217659507918482272439717603L), static_cast(0.0528999024412510102409256676599360516359062802002483877724963720047531347449011629466149805L), static_cast(0.000378346710654740685454266569593414561162134092347356968516522170279688139165340746957511115L), static_cast(0.172194142179211139195966608011235161516824700287310869949928393345257114743230967204370963e-5L), static_cast(0.374799931707148855771381263542708435935402853962736029347951399323367765509988401336565436e-8L) }; static const T denom[24] = { static_cast(0L), static_cast(0.112400072777760768e22L), static_cast(0.414847677933545472e22L), static_cast(6756146673770930688000.0L), static_cast(6548684852703068697600.0L), static_cast(4280722865357147142912.0L), static_cast(2021687376910682741568.0L), static_cast(720308216440924653696.0L), static_cast(199321978221066137360.0L), static_cast(43714229649594412832.0L), static_cast(7707401101297361068.0L), static_cast(1103230881185949736.0L), static_cast(129006659818331295.0L), static_cast(12363045847086207.0L), static_cast(971250460939913.0L), static_cast(62382416421941.0L), static_cast(3256091103430.0L), static_cast(136717357942.0L), static_cast(4546047198.0L), static_cast(116896626L), static_cast(2240315L), static_cast(30107L), static_cast(253L), static_cast(1L) }; return boost::math::tools::evaluate_rational(num, denom, z); } template static T lanczos_sum_near_1(const T& dz) { static const T d[23] = { static_cast(7.4734083002469026177867421609938203388868806387315406134072298925733950040583068760685908L), static_cast(-50.4225805042247530267317342133388132970816607563062253708655085754357843064134941138154171L), static_cast(152.288200621747008570784082624444625293884063492396162110698238568311211546361189979357019L), static_cast(-271.894959539150384169327513139846971255640842175739337449692360299099322742181325023644769L), static_cast(319.240102980202312307047586791116902719088581839891008532114107693294261542869734803906793L), static_cast(-259.493144143048088289689500935518073716201741349569864988870534417890269467336454358361499L), static_cast(149.747518319689708813209645403067832020714660918583227716408482877303972685262557460145835L), static_cast(-61.9261301009341333289187201425188698128684426428003249782448828881580630606817104372760037L), static_cast(18.3077524177286961563937379403377462608113523887554047531153187277072451294845795496072365L), static_cast(-3.82011322251948043097070160584761236869363471824695092089556195047949392738162970152230254L), static_cast(0.549382685505691522516705902336780999493262538301283190963770663549981309645795228539620711L), static_cast(-0.0524814679715180697633723771076668718265358076235229045603747927518423453658004287459638024L), static_cast(0.00315392664003333528534120626687784812050217700942910879712808180705014754163256855643360698L), static_cast(-0.000110098373127648510519799564665442121339511198561008748083409549601095293123407080388658329L), static_cast(0.19809382866681658224945717689377373458866950897791116315219376038432014207446832310901893e-5L), static_cast(-0.152278977408600291408265615203504153130482270424202400677280558181047344681214058227949755e-7L), static_cast(0.364344768076106268872239259083188037615571711218395765792787047015406264051536972018235217e-10L), static_cast(-0.148897510480440424971521542520683536298361220674662555578951242811522959610991621951203526e-13L), static_cast(0.261199241161582662426512749820666625442516059622425213340053324061794752786482115387573582e-18L), static_cast(-0.780072664167099103420998436901014795601783313858454665485256897090476089641613851903791529e-24L), static_cast(0.303465867587106629530056603454807425512962762653755513440561256044986695349304176849392735e-24L), static_cast(-0.615420597971283870342083342286977366161772327800327789325710571275345878439656918541092056e-25L), static_cast(0.499641233843540749369110053005439398774706583601830828776209650445427083113181961630763702e-26L), }; T result = 0; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(k*dz + k*k); } return result; } template static T lanczos_sum_near_2(const T& dz) { static const T d[23] = { static_cast(61.4165001061101455341808888883960361969557848005400286332291451422461117307237198559485365L), static_cast(-414.372973678657049667308134761613915623353625332248315105320470271523320700386200587519147L), static_cast(1251.50505818554680171298972755376376836161706773644771875668053742215217922228357204561873L), static_cast(-2234.43389421602399514176336175766511311493214354568097811220122848998413358085613880612158L), static_cast(2623.51647746991904821899989145639147785427273427135380151752779100215839537090464785708684L), static_cast(-2132.51572435428751962745870184529534443305617818870214348386131243463614597272260797772423L), static_cast(1230.62572059218405766499842067263311220019173335523810725664442147670956427061920234820189L), static_cast(-508.90919151163744999377586956023909888833335885805154492270846381061182696305011395981929L), static_cast(150.453184562246579758706538566480316921938628645961177699894388251635886834047343195475395L), static_cast(-31.3937061525822497422230490071156186113405446381476081565548185848237169870395131828731397L), static_cast(4.51482916590287954234936829724231512565732528859217337795452389161322923867318809206313688L), static_cast(-0.431292919341108177524462194102701868233551186625103849565527515201492276412231365776131952L), static_cast(0.0259189820815586225636729971503340447445001375909094681698918294680345547092233915092128323L), static_cast(-0.000904788882557558697594884691337532557729219389814315972435534723829065673966567231504429712L), static_cast(0.162793589759218213439218473348810982422449144393340433592232065020562974405674317564164312e-4L), static_cast(-0.125142926178202562426432039899709511761368233479483128438847484617555752948755923647214487e-6L), static_cast(0.299418680048132583204152682950097239197934281178261879500770485862852229898797687301941982e-9L), static_cast(-0.122364035267809278675627784883078206654408225276233049012165202996967011873995261617995421e-12L), static_cast(0.21465364366598631597052073538883430194257709353929022544344097235100199405814005393447785e-17L), static_cast(-0.641064035802907518396608051803921688237330857546406669209280666066685733941549058513986818e-23L), static_cast(0.249388374622173329690271566855185869111237201309011956145463506483151054813346819490278951e-23L), static_cast(-0.505752900177513489906064295001851463338022055787536494321532352380960774349054239257683149e-24L), static_cast(0.410605371184590959139968810080063542546949719163227555918846829816144878123034347778284006e-25L), }; T result = 0; T z = dz + 2; for(unsigned k = 1; k <= sizeof(d)/sizeof(d[0]); ++k) { result += (-d[k-1]*dz)/(z + k*z + k*k - 1); } return result; } static double g(){ return 20.3209821879863739013671875; } }; struct undefined_lanczos : public mpl::int_<2147483647 - 1> { }; # 1201 "/localhome/glisse2/include/boost/math/special_functions/lanczos.hpp" typedef mpl::list< lanczos6m24, lanczos13m53, lanczos17m64, lanczos24m113, lanczos22, undefined_lanczos> lanczos_list; template struct lanczos { typedef typename mpl::if_< typename mpl::less_equal< typename policies::precision::type, mpl::int_<0> >::type, mpl::int_<2147483647 - 2>, typename policies::precision::type >::type target_precision; typedef typename mpl::deref >::type>::type type; }; } } } # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/lanczos_sse2.hpp" 1 # 21 "/localhome/glisse2/include/boost/math/special_functions/detail/lanczos_sse2.hpp" namespace boost{ namespace math{ namespace lanczos{ template <> inline double lanczos13m53::lanczos_sum(const double& x) { static const __attribute__((aligned(16))) double coeff[26] = { static_cast(2.506628274631000270164908177133837338626L), static_cast(1u), static_cast(210.8242777515793458725097339207133627117L), static_cast(66u), static_cast(8071.672002365816210638002902272250613822L), static_cast(1925u), static_cast(186056.2653952234950402949897160456992822L), static_cast(32670u), static_cast(2876370.628935372441225409051620849613599L), static_cast(357423u), static_cast(31426415.58540019438061423162831820536287L), static_cast(2637558u), static_cast(248874557.8620541565114603864132294232163L), static_cast(13339535u), static_cast(1439720407.311721673663223072794912393972L), static_cast(45995730u), static_cast(6039542586.35202800506429164430729792107L), static_cast(105258076u), static_cast(17921034426.03720969991975575445893111267L), static_cast(150917976u), static_cast(35711959237.35566804944018545154716670596L), static_cast(120543840u), static_cast(42919803642.64909876895789904700198885093L), static_cast(39916800u), static_cast(23531376880.41075968857200767445163675473L), static_cast(0u) }; register __m128d vx = _mm_load1_pd(&x); register __m128d sum_even = _mm_load_pd(coeff); register __m128d sum_odd = _mm_load_pd(coeff+2); register __m128d nc_odd, nc_even; register __m128d vx2 = _mm_mul_pd(vx, vx); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 4); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 6); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 8); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 10); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 12); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 14); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 16); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 18); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 20); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 22); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 24); sum_odd = _mm_mul_pd(sum_odd, vx); sum_even = _mm_add_pd(sum_even, nc_even); sum_even = _mm_add_pd(sum_even, sum_odd); double __attribute__((aligned(16))) t[2]; _mm_store_pd(t, sum_even); return t[0] / t[1]; } template <> inline double lanczos13m53::lanczos_sum_expG_scaled(const double& x) { static const __attribute__((aligned(16))) double coeff[26] = { static_cast(0.006061842346248906525783753964555936883222L), static_cast(1u), static_cast(0.5098416655656676188125178644804694509993L), static_cast(66u), static_cast(19.51992788247617482847860966235652136208L), static_cast(1925u), static_cast(449.9445569063168119446858607650988409623L), static_cast(32670u), static_cast(6955.999602515376140356310115515198987526L), static_cast(357423u), static_cast(75999.29304014542649875303443598909137092L), static_cast(2637558u), static_cast(601859.6171681098786670226533699352302507L), static_cast(13339535u), static_cast(3481712.15498064590882071018964774556468L), static_cast(45995730u), static_cast(14605578.08768506808414169982791359218571L), static_cast(105258076u), static_cast(43338889.32467613834773723740590533316085L), static_cast(150917976u), static_cast(86363131.28813859145546927288977868422342L), static_cast(120543840u), static_cast(103794043.1163445451906271053616070238554L), static_cast(39916800u), static_cast(56906521.91347156388090791033559122686859L), static_cast(0u) }; register __m128d vx = _mm_load1_pd(&x); register __m128d sum_even = _mm_load_pd(coeff); register __m128d sum_odd = _mm_load_pd(coeff+2); register __m128d nc_odd, nc_even; register __m128d vx2 = _mm_mul_pd(vx, vx); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 4); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 6); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 8); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 10); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 12); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 14); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 16); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 18); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 20); sum_odd = _mm_mul_pd(sum_odd, vx2); nc_odd = _mm_load_pd(coeff + 22); sum_even = _mm_add_pd(sum_even, nc_even); sum_odd = _mm_add_pd(sum_odd, nc_odd); sum_even = _mm_mul_pd(sum_even, vx2); nc_even = _mm_load_pd(coeff + 24); sum_odd = _mm_mul_pd(sum_odd, vx); sum_even = _mm_add_pd(sum_even, nc_even); sum_even = _mm_add_pd(sum_even, sum_odd); double __attribute__((aligned(16))) t[2]; _mm_store_pd(t, sum_even); return t[0] / t[1]; } } } } # 1235 "/localhome/glisse2/include/boost/math/special_functions/lanczos.hpp" 2 # 40 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_large.hpp" 1 # 52 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_large.hpp" namespace boost{ namespace math{ namespace detail{ template inline T igamma_temme_large(T, T, const Policy& , mpl::int_<0> const *) { ((0) ? static_cast (0) : __assert_fail ("0", "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_large.hpp", 61, __PRETTY_FUNCTION__)); return 0; } template T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<64> const *) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T sigma = (x - a) / a; T phi = -boost::math::log1pmx(sigma, pol); T y = a * phi; T z = sqrt(2 * phi); if(x < a) z = -z; T workspace[13]; static const T C0[] = { -0.333333333333333333333L, 0.0833333333333333333333L, -0.0148148148148148148148L, 0.00115740740740740740741L, 0.000352733686067019400353L, -0.0001787551440329218107L, 0.39192631785224377817e-4L, -0.218544851067999216147e-5L, -0.18540622107151599607e-5L, 0.829671134095308600502e-6L, -0.176659527368260793044e-6L, 0.670785354340149858037e-8L, 0.102618097842403080426e-7L, -0.438203601845335318655e-8L, 0.914769958223679023418e-9L, -0.255141939949462497669e-10L, -0.583077213255042506746e-10L, 0.243619480206674162437e-10L, -0.502766928011417558909e-11L, }; workspace[0] = tools::evaluate_polynomial(C0, z); static const T C1[] = { -0.00185185185185185185185L, -0.00347222222222222222222L, 0.00264550264550264550265L, -0.000990226337448559670782L, 0.000205761316872427983539L, -0.40187757201646090535e-6L, -0.18098550334489977837e-4L, 0.764916091608111008464e-5L, -0.161209008945634460038e-5L, 0.464712780280743434226e-8L, 0.137863344691572095931e-6L, -0.575254560351770496402e-7L, 0.119516285997781473243e-7L, -0.175432417197476476238e-10L, -0.100915437106004126275e-8L, 0.416279299184258263623e-9L, -0.856390702649298063807e-10L, }; workspace[1] = tools::evaluate_polynomial(C1, z); static const T C2[] = { 0.00413359788359788359788L, -0.00268132716049382716049L, 0.000771604938271604938272L, 0.200938786008230452675e-5L, -0.000107366532263651605215L, 0.529234488291201254164e-4L, -0.127606351886187277134e-4L, 0.342357873409613807419e-7L, 0.137219573090629332056e-5L, -0.629899213838005502291e-6L, 0.142806142060642417916e-6L, -0.204770984219908660149e-9L, -0.140925299108675210533e-7L, 0.622897408492202203356e-8L, -0.136704883966171134993e-8L, }; workspace[2] = tools::evaluate_polynomial(C2, z); static const T C3[] = { 0.000649434156378600823045L, 0.000229472093621399176955L, -0.000469189494395255712128L, 0.000267720632062838852962L, -0.756180167188397641073e-4L, -0.239650511386729665193e-6L, 0.110826541153473023615e-4L, -0.56749528269915965675e-5L, 0.142309007324358839146e-5L, -0.278610802915281422406e-10L, -0.169584040919302772899e-6L, 0.809946490538808236335e-7L, -0.191111684859736540607e-7L, }; workspace[3] = tools::evaluate_polynomial(C3, z); static const T C4[] = { -0.000861888290916711698605L, 0.000784039221720066627474L, -0.000299072480303190179733L, -0.146384525788434181781e-5L, 0.664149821546512218666e-4L, -0.396836504717943466443e-4L, 0.113757269706784190981e-4L, 0.250749722623753280165e-9L, -0.169541495365583060147e-5L, 0.890750753220530968883e-6L, -0.229293483400080487057e-6L, }; workspace[4] = tools::evaluate_polynomial(C4, z); static const T C5[] = { -0.000336798553366358150309L, -0.697281375836585777429e-4L, 0.000277275324495939207873L, -0.000199325705161888477003L, 0.679778047793720783882e-4L, 0.141906292064396701483e-6L, -0.135940481897686932785e-4L, 0.801847025633420153972e-5L, -0.229148117650809517038e-5L, }; workspace[5] = tools::evaluate_polynomial(C5, z); static const T C6[] = { 0.000531307936463992223166L, -0.000592166437353693882865L, 0.000270878209671804482771L, 0.790235323266032787212e-6L, -0.815396936756196875093e-4L, 0.561168275310624965004e-4L, -0.183291165828433755673e-4L, -0.307961345060330478256e-8L, 0.346515536880360908674e-5L, -0.20291327396058603727e-5L, 0.57887928631490037089e-6L, }; workspace[6] = tools::evaluate_polynomial(C6, z); static const T C7[] = { 0.000344367606892377671254L, 0.517179090826059219337e-4L, -0.000334931610811422363117L, 0.000281269515476323702274L, -0.000109765822446847310235L, -0.127410090954844853795e-6L, 0.277444515115636441571e-4L, -0.182634888057113326614e-4L, 0.578769494973505239894e-5L, }; workspace[7] = tools::evaluate_polynomial(C7, z); static const T C8[] = { -0.000652623918595309418922L, 0.000839498720672087279993L, -0.000438297098541721005061L, -0.696909145842055197137e-6L, 0.000166448466420675478374L, -0.000127835176797692185853L, 0.462995326369130429061e-4L, }; workspace[8] = tools::evaluate_polynomial(C8, z); static const T C9[] = { -0.000596761290192746250124L, -0.720489541602001055909e-4L, 0.000678230883766732836162L, -0.0006401475260262758451L, 0.000277501076343287044992L, }; workspace[9] = tools::evaluate_polynomial(C9, z); static const T C10[] = { 0.00133244544948006563713L, -0.0019144384985654775265L, 0.00110893691345966373396L, }; workspace[10] = tools::evaluate_polynomial(C10, z); static const T C11[] = { 0.00157972766073083495909L, 0.000162516262783915816899L, -0.00206334210355432762645L, 0.00213896861856890981541L, -0.00101085593912630031708L, }; workspace[11] = tools::evaluate_polynomial(C11, z); static const T C12[] = { -0.00407251211951401664727L, 0.00640336283380806979482L, -0.00404101610816766177474L, }; workspace[12] = tools::evaluate_polynomial(C12, z); T result = tools::evaluate_polynomial<13, T, T>(workspace, 1/a); result *= exp(-y) / sqrt(2 * constants::pi() * a); if(x < a) result = -result; result += boost::math::erfc(sqrt(y), pol) / 2; return result; } template T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<53> const *) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T sigma = (x - a) / a; T phi = -boost::math::log1pmx(sigma, pol); T y = a * phi; T z = sqrt(2 * phi); if(x < a) z = -z; T workspace[10]; static const T C0[] = { static_cast(-0.33333333333333333L), static_cast(0.083333333333333333L), static_cast(-0.014814814814814815L), static_cast(0.0011574074074074074L), static_cast(0.0003527336860670194L), static_cast(-0.00017875514403292181L), static_cast(0.39192631785224378e-4L), static_cast(-0.21854485106799922e-5L), static_cast(-0.185406221071516e-5L), static_cast(0.8296711340953086e-6L), static_cast(-0.17665952736826079e-6L), static_cast(0.67078535434014986e-8L), static_cast(0.10261809784240308e-7L), static_cast(-0.43820360184533532e-8L), static_cast(0.91476995822367902e-9L), }; workspace[0] = tools::evaluate_polynomial(C0, z); static const T C1[] = { static_cast(-0.0018518518518518519L), static_cast(-0.0034722222222222222L), static_cast(0.0026455026455026455L), static_cast(-0.00099022633744855967L), static_cast(0.00020576131687242798L), static_cast(-0.40187757201646091e-6L), static_cast(-0.18098550334489978e-4L), static_cast(0.76491609160811101e-5L), static_cast(-0.16120900894563446e-5L), static_cast(0.46471278028074343e-8L), static_cast(0.1378633446915721e-6L), static_cast(-0.5752545603517705e-7L), static_cast(0.11951628599778147e-7L), }; workspace[1] = tools::evaluate_polynomial(C1, z); static const T C2[] = { static_cast(0.0041335978835978836L), static_cast(-0.0026813271604938272L), static_cast(0.00077160493827160494L), static_cast(0.20093878600823045e-5L), static_cast(-0.00010736653226365161L), static_cast(0.52923448829120125e-4L), static_cast(-0.12760635188618728e-4L), static_cast(0.34235787340961381e-7L), static_cast(0.13721957309062933e-5L), static_cast(-0.6298992138380055e-6L), static_cast(0.14280614206064242e-6L), }; workspace[2] = tools::evaluate_polynomial(C2, z); static const T C3[] = { static_cast(0.00064943415637860082L), static_cast(0.00022947209362139918L), static_cast(-0.00046918949439525571L), static_cast(0.00026772063206283885L), static_cast(-0.75618016718839764e-4L), static_cast(-0.23965051138672967e-6L), static_cast(0.11082654115347302e-4L), static_cast(-0.56749528269915966e-5L), static_cast(0.14230900732435884e-5L), }; workspace[3] = tools::evaluate_polynomial(C3, z); static const T C4[] = { static_cast(-0.0008618882909167117L), static_cast(0.00078403922172006663L), static_cast(-0.00029907248030319018L), static_cast(-0.14638452578843418e-5L), static_cast(0.66414982154651222e-4L), static_cast(-0.39683650471794347e-4L), static_cast(0.11375726970678419e-4L), }; workspace[4] = tools::evaluate_polynomial(C4, z); static const T C5[] = { static_cast(-0.00033679855336635815L), static_cast(-0.69728137583658578e-4L), static_cast(0.00027727532449593921L), static_cast(-0.00019932570516188848L), static_cast(0.67977804779372078e-4L), static_cast(0.1419062920643967e-6L), static_cast(-0.13594048189768693e-4L), static_cast(0.80184702563342015e-5L), static_cast(-0.22914811765080952e-5L), }; workspace[5] = tools::evaluate_polynomial(C5, z); static const T C6[] = { static_cast(0.00053130793646399222L), static_cast(-0.00059216643735369388L), static_cast(0.00027087820967180448L), static_cast(0.79023532326603279e-6L), static_cast(-0.81539693675619688e-4L), static_cast(0.56116827531062497e-4L), static_cast(-0.18329116582843376e-4L), }; workspace[6] = tools::evaluate_polynomial(C6, z); static const T C7[] = { static_cast(0.00034436760689237767L), static_cast(0.51717909082605922e-4L), static_cast(-0.00033493161081142236L), static_cast(0.0002812695154763237L), static_cast(-0.00010976582244684731L), }; workspace[7] = tools::evaluate_polynomial(C7, z); static const T C8[] = { static_cast(-0.00065262391859530942L), static_cast(0.00083949872067208728L), static_cast(-0.00043829709854172101L), }; workspace[8] = tools::evaluate_polynomial(C8, z); workspace[9] = static_cast(-0.00059676129019274625L); T result = tools::evaluate_polynomial<10, T, T>(workspace, 1/a); result *= exp(-y) / sqrt(2 * constants::pi() * a); if(x < a) result = -result; result += boost::math::erfc(sqrt(y), pol) / 2; return result; } template T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<24> const *) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T sigma = (x - a) / a; T phi = -boost::math::log1pmx(sigma, pol); T y = a * phi; T z = sqrt(2 * phi); if(x < a) z = -z; T workspace[3]; static const T C0[] = { static_cast(-0.333333333L), static_cast(0.0833333333L), static_cast(-0.0148148148L), static_cast(0.00115740741L), static_cast(0.000352733686L), static_cast(-0.000178755144L), static_cast(0.391926318e-4L), }; workspace[0] = tools::evaluate_polynomial(C0, z); static const T C1[] = { static_cast(-0.00185185185L), static_cast(-0.00347222222L), static_cast(0.00264550265L), static_cast(-0.000990226337L), static_cast(0.000205761317L), }; workspace[1] = tools::evaluate_polynomial(C1, z); static const T C2[] = { static_cast(0.00413359788L), static_cast(-0.00268132716L), static_cast(0.000771604938L), }; workspace[2] = tools::evaluate_polynomial(C2, z); T result = tools::evaluate_polynomial(workspace, 1/a); result *= exp(-y) / sqrt(2 * constants::pi() * a); if(x < a) result = -result; result += boost::math::erfc(sqrt(y), pol) / 2; return result; } template T igamma_temme_large(T a, T x, const Policy& pol, mpl::int_<113> const *) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T sigma = (x - a) / a; T phi = -boost::math::log1pmx(sigma, pol); T y = a * phi; T z = sqrt(2 * phi); if(x < a) z = -z; T workspace[14]; static const T C0[] = { -0.333333333333333333333333333333333333L, 0.0833333333333333333333333333333333333L, -0.0148148148148148148148148148148148148L, 0.00115740740740740740740740740740740741L, 0.0003527336860670194003527336860670194L, -0.000178755144032921810699588477366255144L, 0.391926317852243778169704095630021556e-4L, -0.218544851067999216147364295512443661e-5L, -0.185406221071515996070179883622956325e-5L, 0.829671134095308600501624213166443227e-6L, -0.17665952736826079304360054245742403e-6L, 0.670785354340149858036939710029613572e-8L, 0.102618097842403080425739573227252951e-7L, -0.438203601845335318655297462244719123e-8L, 0.914769958223679023418248817633113681e-9L, -0.255141939949462497668779537993887013e-10L, -0.583077213255042506746408945040035798e-10L, 0.243619480206674162436940696707789943e-10L, -0.502766928011417558909054985925744366e-11L, 0.110043920319561347708374174497293411e-12L, 0.337176326240098537882769884169200185e-12L, -0.13923887224181620659193661848957998e-12L, 0.285348938070474432039669099052828299e-13L, -0.513911183424257261899064580300494205e-15L, -0.197522882943494428353962401580710912e-14L, 0.809952115670456133407115668702575255e-15L, -0.165225312163981618191514820265351162e-15L, 0.253054300974788842327061090060267385e-17L, 0.116869397385595765888230876507793475e-16L, -0.477003704982048475822167804084816597e-17L, 0.969912605905623712420709685898585354e-18L, }; workspace[0] = tools::evaluate_polynomial(C0, z); static const T C1[] = { -0.00185185185185185185185185185185185185L, -0.00347222222222222222222222222222222222L, 0.0026455026455026455026455026455026455L, -0.000990226337448559670781893004115226337L, 0.000205761316872427983539094650205761317L, -0.401877572016460905349794238683127572e-6L, -0.180985503344899778370285914867533523e-4L, 0.76491609160811100846374214980916921e-5L, -0.16120900894563446003775221882217767e-5L, 0.464712780280743434226135033938722401e-8L, 0.137863344691572095931187533077488877e-6L, -0.575254560351770496402194531835048307e-7L, 0.119516285997781473243076536699698169e-7L, -0.175432417197476476237547551202312502e-10L, -0.100915437106004126274577504686681675e-8L, 0.416279299184258263623372347219858628e-9L, -0.856390702649298063807431562579670208e-10L, 0.606721510160475861512701762169919581e-13L, 0.716249896481148539007961017165545733e-11L, -0.293318664377143711740636683615595403e-11L, 0.599669636568368872330374527568788909e-12L, -0.216717865273233141017100472779701734e-15L, -0.497833997236926164052815522048108548e-13L, 0.202916288237134247736694804325894226e-13L, -0.413125571381061004935108332558187111e-14L, 0.828651623988309644380188591057589316e-18L, 0.341003088693333279336339355910600992e-15L, -0.138541953028939715357034547426313703e-15L, 0.281234665322887466568860332727259483e-16L, }; workspace[1] = tools::evaluate_polynomial(C1, z); static const T C2[] = { 0.0041335978835978835978835978835978836L, -0.00268132716049382716049382716049382716L, 0.000771604938271604938271604938271604938L, 0.200938786008230452674897119341563786e-5L, -0.000107366532263651605215391223621676297L, 0.529234488291201254164217127180090143e-4L, -0.127606351886187277133779191392360117e-4L, 0.34235787340961380741902003904747389e-7L, 0.137219573090629332055943852926020279e-5L, -0.629899213838005502290672234278391876e-6L, 0.142806142060642417915846008822771748e-6L, -0.204770984219908660149195854409200226e-9L, -0.140925299108675210532930244154315272e-7L, 0.622897408492202203356394293530327112e-8L, -0.136704883966171134992724380284402402e-8L, 0.942835615901467819547711211663208075e-12L, 0.128722524000893180595479368872770442e-9L, -0.556459561343633211465414765894951439e-10L, 0.119759355463669810035898150310311343e-10L, -0.416897822518386350403836626692480096e-14L, -0.109406404278845944099299008640802908e-11L, 0.4662239946390135746326204922464679e-12L, -0.990510576390690597844122258212382301e-13L, 0.189318767683735145056885183170630169e-16L, 0.885922187259112726176031067028740667e-14L, -0.373782039804640545306560251777191937e-14L, 0.786883363903515525774088394065960751e-15L, }; workspace[2] = tools::evaluate_polynomial(C2, z); static const T C3[] = { 0.000649434156378600823045267489711934156L, 0.000229472093621399176954732510288065844L, -0.000469189494395255712128140111679206329L, 0.000267720632062838852962309752433209223L, -0.756180167188397641072538191879755666e-4L, -0.239650511386729665193314027333231723e-6L, 0.110826541153473023614770299726861227e-4L, -0.567495282699159656749963105701560205e-5L, 0.14230900732435883914551894470580433e-5L, -0.278610802915281422405802158211174452e-10L, -0.16958404091930277289864168795820267e-6L, 0.809946490538808236335278504852724081e-7L, -0.191111684859736540606728140872727635e-7L, 0.239286204398081179686413514022282056e-11L, 0.206201318154887984369925818486654549e-8L, -0.946049666185513217375417988510192814e-9L, 0.215410497757749078380130268468744512e-9L, -0.138882333681390304603424682490735291e-13L, -0.218947616819639394064123400466489455e-10L, 0.979099895117168512568262802255883368e-11L, -0.217821918801809621153859472011393244e-11L, 0.62088195734079014258166361684972205e-16L, 0.212697836327973697696702537114614471e-12L, -0.934468879151743333127396765626749473e-13L, 0.204536712267828493249215913063207436e-13L, }; workspace[3] = tools::evaluate_polynomial(C3, z); static const T C4[] = { -0.000861888290916711698604702719929057378L, 0.00078403922172006662747403488144228885L, -0.000299072480303190179733389609932819809L, -0.146384525788434181781232535690697556e-5L, 0.664149821546512218665853782451862013e-4L, -0.396836504717943466443123507595386882e-4L, 0.113757269706784190980552042885831759e-4L, 0.250749722623753280165221942390057007e-9L, -0.169541495365583060147164356781525752e-5L, 0.890750753220530968882898422505515924e-6L, -0.229293483400080487057216364891158518e-6L, 0.295679413754404904696572852500004588e-10L, 0.288658297427087836297341274604184504e-7L, -0.141897394378032193894774303903982717e-7L, 0.344635804994648970659527720474194356e-8L, -0.230245171745280671320192735850147087e-12L, -0.394092330280464052750697640085291799e-9L, 0.186023389685045019134258533045185639e-9L, -0.435632300505661804380678327446262424e-10L, 0.127860010162962312660550463349930726e-14L, 0.467927502665791946200382739991760062e-11L, -0.214924647061348285410535341910721086e-11L, 0.490881561480965216323649688463984082e-12L, }; workspace[4] = tools::evaluate_polynomial(C4, z); static const T C5[] = { -0.000336798553366358150308767592718210002L, -0.697281375836585777429398828575783308e-4L, 0.00027727532449593920787336425196507501L, -0.000199325705161888477003360405280844238L, 0.679778047793720783881640176604435742e-4L, 0.141906292064396701483392727105575757e-6L, -0.135940481897686932784583938837504469e-4L, 0.80184702563342015397192571980419684e-5L, -0.229148117650809517038048790128781806e-5L, -0.325247355129845395166230137750005047e-9L, 0.346528464910852649559195496827579815e-6L, -0.184471871911713432765322367374920978e-6L, 0.482409670378941807563762631738989002e-7L, -0.179894667217435153025754291716644314e-13L, -0.630619450001352343517516981425944698e-8L, 0.316241762877456793773762181540969623e-8L, -0.784092425369742929000839303523267545e-9L, }; workspace[5] = tools::evaluate_polynomial(C5, z); static const T C6[] = { 0.00053130793646399222316574854297762391L, -0.000592166437353693882864836225604401187L, 0.000270878209671804482771279183488328692L, 0.790235323266032787212032944390816666e-6L, -0.815396936756196875092890088464682624e-4L, 0.561168275310624965003775619041471695e-4L, -0.183291165828433755673259749374098313e-4L, -0.307961345060330478256414192546677006e-8L, 0.346515536880360908673728529745376913e-5L, -0.202913273960586037269527254582695285e-5L, 0.578879286314900370889997586203187687e-6L, 0.233863067382665698933480579231637609e-12L, -0.88286007463304835250508524317926246e-7L, 0.474359588804081278032150770595852426e-7L, -0.125454150207103824457130611214783073e-7L, }; workspace[6] = tools::evaluate_polynomial(C6, z); static const T C7[] = { 0.000344367606892377671254279625108523655L, 0.517179090826059219337057843002058823e-4L, -0.000334931610811422363116635090580012327L, 0.000281269515476323702273722110707777978L, -0.000109765822446847310235396824500789005L, -0.127410090954844853794579954588107623e-6L, 0.277444515115636441570715073933712622e-4L, -0.182634888057113326614324442681892723e-4L, 0.578769494973505239894178121070843383e-5L, 0.493875893393627039981813418398565502e-9L, -0.105953670140260427338098566209633945e-5L, 0.616671437611040747858836254004890765e-6L, -0.175629733590604619378669693914265388e-6L, }; workspace[7] = tools::evaluate_polynomial(C7, z); static const T C8[] = { -0.000652623918595309418922034919726622692L, 0.000839498720672087279993357516764983445L, -0.000438297098541721005061087953050560377L, -0.696909145842055197136911097362072702e-6L, 0.00016644846642067547837384572662326101L, -0.000127835176797692185853344001461664247L, 0.462995326369130429061361032704489636e-4L, 0.455790986792270771162749294232219616e-8L, -0.105952711258051954718238500312872328e-4L, 0.678334290486516662273073740749269432e-5L, -0.210754766662588042469972680229376445e-5L, }; workspace[8] = tools::evaluate_polynomial(C8, z); static const T C9[] = { -0.000596761290192746250124390067179459605L, -0.720489541602001055908571930225015052e-4L, 0.000678230883766732836161951166000673426L, -0.000640147526026275845100045652582354779L, 0.000277501076343287044992374518205845463L, 0.181970083804651510461686554030325202e-6L, -0.847950711706850318239732559632810086e-4L, 0.610519208250153101764709122740859458e-4L, -0.210739201834048624082975255893773306e-4L, }; workspace[9] = tools::evaluate_polynomial(C9, z); static const T C10[] = { 0.00133244544948006563712694993432717968L, -0.00191443849856547752650089885832852254L, 0.0011089369134596637339607446329267522L, 0.993240412264229896742295262075817566e-6L, -0.000508745012930931989848393025305956774L, 0.00042735056665392884328432271160040444L, -0.000168588537679107988033552814662382059L, }; workspace[10] = tools::evaluate_polynomial(C10, z); static const T C11[] = { 0.00157972766073083495908785631307733022L, 0.000162516262783915816898635123980270998L, -0.00206334210355432762645284467690276817L, 0.00213896861856890981541061922797693947L, -0.00101085593912630031708085801712479376L, }; workspace[11] = tools::evaluate_polynomial(C11, z); static const T C12[] = { -0.00407251211951401664727281097914544601L, 0.00640336283380806979482363809026579583L, -0.00404101610816766177473974858518094879L, }; workspace[12] = tools::evaluate_polynomial(C12, z); workspace[13] = -0.0059475779383993002845382844736066323L; T result = tools::evaluate_polynomial(workspace, 1/a); result *= exp(-y) / sqrt(2 * constants::pi() * a); if(x < a) result = -result; result += boost::math::erfc(sqrt(y), pol) / 2; return result; } } } } # 42 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/unchecked_factorial.hpp" 1 # 25 "/localhome/glisse2/include/boost/math/special_functions/detail/unchecked_factorial.hpp" namespace boost { namespace math { template struct max_factorial; template <> inline float unchecked_factorial(unsigned i ) { static const boost::array factorials = {{ 1.0F, 1.0F, 2.0F, 6.0F, 24.0F, 120.0F, 720.0F, 5040.0F, 40320.0F, 362880.0F, 3628800.0F, 39916800.0F, 479001600.0F, 6227020800.0F, 87178291200.0F, 1307674368000.0F, 20922789888000.0F, 355687428096000.0F, 6402373705728000.0F, 121645100408832000.0F, 0.243290200817664e19F, 0.5109094217170944e20F, 0.112400072777760768e22F, 0.2585201673888497664e23F, 0.62044840173323943936e24F, 0.15511210043330985984e26F, 0.403291461126605635584e27F, 0.10888869450418352160768e29F, 0.304888344611713860501504e30F, 0.8841761993739701954543616e31F, 0.26525285981219105863630848e33F, 0.822283865417792281772556288e34F, 0.26313083693369353016721801216e36F, 0.868331761881188649551819440128e37F, 0.29523279903960414084761860964352e39F, }}; return factorials[i]; } template <> struct max_factorial { static const unsigned value = 34; }; template <> inline long double unchecked_factorial(unsigned i ) { static const boost::array factorials = {{ 1L, 1L, 2L, 6L, 24L, 120L, 720L, 5040L, 40320L, 362880.0L, 3628800.0L, 39916800.0L, 479001600.0L, 6227020800.0L, 87178291200.0L, 1307674368000.0L, 20922789888000.0L, 355687428096000.0L, 6402373705728000.0L, 121645100408832000.0L, 0.243290200817664e19L, 0.5109094217170944e20L, 0.112400072777760768e22L, 0.2585201673888497664e23L, 0.62044840173323943936e24L, 0.15511210043330985984e26L, 0.403291461126605635584e27L, 0.10888869450418352160768e29L, 0.304888344611713860501504e30L, 0.8841761993739701954543616e31L, 0.26525285981219105863630848e33L, 0.822283865417792281772556288e34L, 0.26313083693369353016721801216e36L, 0.868331761881188649551819440128e37L, 0.29523279903960414084761860964352e39L, 0.103331479663861449296666513375232e41L, 0.3719933267899012174679994481508352e42L, 0.137637530912263450463159795815809024e44L, 0.5230226174666011117600072241000742912e45L, 0.203978820811974433586402817399028973568e47L, 0.815915283247897734345611269596115894272e48L, 0.3345252661316380710817006205344075166515e50L, 0.1405006117752879898543142606244511569936e52L, 0.6041526306337383563735513206851399750726e53L, 0.265827157478844876804362581101461589032e55L, 0.1196222208654801945619631614956577150644e57L, 0.5502622159812088949850305428800254892962e58L, 0.2586232415111681806429643551536119799692e60L, 0.1241391559253607267086228904737337503852e62L, 0.6082818640342675608722521633212953768876e63L, 0.3041409320171337804361260816606476884438e65L, 0.1551118753287382280224243016469303211063e67L, 0.8065817517094387857166063685640376697529e68L, 0.427488328406002556429801375338939964969e70L, 0.2308436973392413804720927426830275810833e72L, 0.1269640335365827592596510084756651695958e74L, 0.7109985878048634518540456474637249497365e75L, 0.4052691950487721675568060190543232213498e77L, 0.2350561331282878571829474910515074683829e79L, 0.1386831185456898357379390197203894063459e81L, 0.8320987112741390144276341183223364380754e82L, 0.507580213877224798800856812176625227226e84L, 0.3146997326038793752565312235495076408801e86L, 0.1982608315404440064116146708361898137545e88L, 0.1268869321858841641034333893351614808029e90L, 0.8247650592082470666723170306785496252186e91L, 0.5443449390774430640037292402478427526443e93L, 0.3647111091818868528824985909660546442717e95L, 0.2480035542436830599600990418569171581047e97L, 0.1711224524281413113724683388812728390923e99L, 0.1197857166996989179607278372168909873646e101L, 0.8504785885678623175211676442399260102886e102L, 0.6123445837688608686152407038527467274078e104L, 0.4470115461512684340891257138125051110077e106L, 0.3307885441519386412259530282212537821457e108L, 0.2480914081139539809194647711659403366093e110L, 0.188549470166605025498793226086114655823e112L, 0.1451830920282858696340707840863082849837e114L, 0.1132428117820629783145752115873204622873e116L, 0.8946182130782975286851441715398316520698e117L, 0.7156945704626380229481153372318653216558e119L, 0.5797126020747367985879734231578109105412e121L, 0.4753643337012841748421382069894049466438e123L, 0.3945523969720658651189747118012061057144e125L, 0.3314240134565353266999387579130131288001e127L, 0.2817104114380550276949479442260611594801e129L, 0.2422709538367273238176552320344125971528e131L, 0.210775729837952771721360051869938959523e133L, 0.1854826422573984391147968456455462843802e135L, 0.1650795516090846108121691926245361930984e137L, 0.1485715964481761497309522733620825737886e139L, 0.1352001527678402962551665687594951421476e141L, 0.1243841405464130725547532432587355307758e143L, 0.1156772507081641574759205162306240436215e145L, 0.1087366156656743080273652852567866010042e147L, 0.103299784882390592625997020993947270954e149L, 0.9916779348709496892095714015418938011582e150L, 0.9619275968248211985332842594956369871234e152L, 0.942689044888324774562618574305724247381e154L, 0.9332621544394415268169923885626670049072e156L, 0.9332621544394415268169923885626670049072e158L, 0.9425947759838359420851623124482936749562e160L, 0.9614466715035126609268655586972595484554e162L, 0.990290071648618040754671525458177334909e164L, 0.1029901674514562762384858386476504428305e167L, 0.1081396758240290900504101305800329649721e169L, 0.1146280563734708354534347384148349428704e171L, 0.1226520203196137939351751701038733888713e173L, 0.132464181945182897449989183712183259981e175L, 0.1443859583202493582204882102462797533793e177L, 0.1588245541522742940425370312709077287172e179L, 0.1762952551090244663872161047107075788761e181L, 0.1974506857221074023536820372759924883413e183L, 0.2231192748659813646596607021218715118256e185L, 0.2543559733472187557120132004189335234812e187L, 0.2925093693493015690688151804817735520034e189L, 0.339310868445189820119825609358857320324e191L, 0.396993716080872089540195962949863064779e193L, 0.4684525849754290656574312362808384164393e195L, 0.5574585761207605881323431711741977155627e197L, 0.6689502913449127057588118054090372586753e199L, 0.8094298525273443739681622845449350829971e201L, 0.9875044200833601362411579871448208012564e203L, 0.1214630436702532967576624324188129585545e206L, 0.1506141741511140879795014161993280686076e208L, 0.1882677176888926099743767702491600857595e210L, 0.237217324288004688567714730513941708057e212L, 0.3012660018457659544809977077527059692324e214L, 0.3856204823625804217356770659234636406175e216L, 0.4974504222477287440390234150412680963966e218L, 0.6466855489220473672507304395536485253155e220L, 0.8471580690878820510984568758152795681634e222L, 0.1118248651196004307449963076076169029976e225L, 0.1487270706090685728908450891181304809868e227L, 0.1992942746161518876737324194182948445223e229L, 0.269047270731805048359538766214698040105e231L, 0.3659042881952548657689727220519893345429e233L, 0.5012888748274991661034926292112253883237e235L, 0.6917786472619488492228198283114910358867e237L, 0.9615723196941089004197195613529725398826e239L, 0.1346201247571752460587607385894161555836e242L, 0.1898143759076170969428526414110767793728e244L, 0.2695364137888162776588507508037290267094e246L, 0.3854370717180072770521565736493325081944e248L, 0.5550293832739304789551054660550388118e250L, 0.80479260574719919448490292577980627711e252L, 0.1174997204390910823947958271638517164581e255L, 0.1727245890454638911203498659308620231933e257L, 0.2556323917872865588581178015776757943262e259L, 0.380892263763056972698595524350736933546e261L, 0.571338395644585459047893286526105400319e263L, 0.8627209774233240431623188626544191544816e265L, 0.1311335885683452545606724671234717114812e268L, 0.2006343905095682394778288746989117185662e270L, 0.308976961384735088795856467036324046592e272L, 0.4789142901463393876335775239063022722176e274L, 0.7471062926282894447083809372938315446595e276L, 0.1172956879426414428192158071551315525115e279L, 0.1853271869493734796543609753051078529682e281L, 0.2946702272495038326504339507351214862195e283L, 0.4714723635992061322406943211761943779512e285L, 0.7590705053947218729075178570936729485014e287L, 0.1229694218739449434110178928491750176572e290L, 0.2004401576545302577599591653441552787813e292L, 0.3287218585534296227263330311644146572013e294L, 0.5423910666131588774984495014212841843822e296L, 0.9003691705778437366474261723593317460744e298L, 0.1503616514864999040201201707840084015944e301L, 0.2526075744973198387538018869171341146786e303L, 0.4269068009004705274939251888899566538069e305L, 0.7257415615307998967396728211129263114717e307L, }}; return factorials[i]; } template <> struct max_factorial { static const unsigned value = 170; }; template <> inline double unchecked_factorial(unsigned i ) { return static_cast(boost::math::unchecked_factorial(i)); } template <> struct max_factorial { static const unsigned value = ::boost::math::max_factorial::value ; }; template inline T unchecked_factorial(unsigned i ) { static_assert(!boost::is_integral::value, "!boost::is_integral::value"); static const boost::array factorials = {{ boost::lexical_cast("1"), boost::lexical_cast("1"), boost::lexical_cast("2"), boost::lexical_cast("6"), boost::lexical_cast("24"), boost::lexical_cast("120"), boost::lexical_cast("720"), boost::lexical_cast("5040"), boost::lexical_cast("40320"), boost::lexical_cast("362880"), boost::lexical_cast("3628800"), boost::lexical_cast("39916800"), boost::lexical_cast("479001600"), boost::lexical_cast("6227020800"), boost::lexical_cast("87178291200"), boost::lexical_cast("1307674368000"), boost::lexical_cast("20922789888000"), boost::lexical_cast("355687428096000"), boost::lexical_cast("6402373705728000"), boost::lexical_cast("121645100408832000"), boost::lexical_cast("2432902008176640000"), boost::lexical_cast("51090942171709440000"), boost::lexical_cast("1124000727777607680000"), boost::lexical_cast("25852016738884976640000"), boost::lexical_cast("620448401733239439360000"), boost::lexical_cast("15511210043330985984000000"), boost::lexical_cast("403291461126605635584000000"), boost::lexical_cast("10888869450418352160768000000"), boost::lexical_cast("304888344611713860501504000000"), boost::lexical_cast("8841761993739701954543616000000"), boost::lexical_cast("265252859812191058636308480000000"), boost::lexical_cast("8222838654177922817725562880000000"), boost::lexical_cast("263130836933693530167218012160000000"), boost::lexical_cast("8683317618811886495518194401280000000"), boost::lexical_cast("295232799039604140847618609643520000000"), boost::lexical_cast("10333147966386144929666651337523200000000"), boost::lexical_cast("371993326789901217467999448150835200000000"), boost::lexical_cast("13763753091226345046315979581580902400000000"), boost::lexical_cast("523022617466601111760007224100074291200000000"), boost::lexical_cast("20397882081197443358640281739902897356800000000"), boost::lexical_cast("815915283247897734345611269596115894272000000000"), boost::lexical_cast("33452526613163807108170062053440751665152000000000"), boost::lexical_cast("1405006117752879898543142606244511569936384000000000"), boost::lexical_cast("60415263063373835637355132068513997507264512000000000"), boost::lexical_cast("2658271574788448768043625811014615890319638528000000000"), boost::lexical_cast("119622220865480194561963161495657715064383733760000000000"), boost::lexical_cast("5502622159812088949850305428800254892961651752960000000000"), boost::lexical_cast("258623241511168180642964355153611979969197632389120000000000"), boost::lexical_cast("12413915592536072670862289047373375038521486354677760000000000"), boost::lexical_cast("608281864034267560872252163321295376887552831379210240000000000"), boost::lexical_cast("30414093201713378043612608166064768844377641568960512000000000000"), boost::lexical_cast("1551118753287382280224243016469303211063259720016986112000000000000"), boost::lexical_cast("80658175170943878571660636856403766975289505440883277824000000000000"), boost::lexical_cast("4274883284060025564298013753389399649690343788366813724672000000000000"), boost::lexical_cast("230843697339241380472092742683027581083278564571807941132288000000000000"), boost::lexical_cast("12696403353658275925965100847566516959580321051449436762275840000000000000"), boost::lexical_cast("710998587804863451854045647463724949736497978881168458687447040000000000000"), boost::lexical_cast("40526919504877216755680601905432322134980384796226602145184481280000000000000"), boost::lexical_cast("2350561331282878571829474910515074683828862318181142924420699914240000000000000"), boost::lexical_cast("138683118545689835737939019720389406345902876772687432540821294940160000000000000"), boost::lexical_cast("8320987112741390144276341183223364380754172606361245952449277696409600000000000000"), boost::lexical_cast("507580213877224798800856812176625227226004528988036003099405939480985600000000000000"), boost::lexical_cast("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000"), boost::lexical_cast("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000"), boost::lexical_cast("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000"), boost::lexical_cast("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000"), boost::lexical_cast("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000"), boost::lexical_cast("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000"), boost::lexical_cast("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000"), boost::lexical_cast("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000"), boost::lexical_cast("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000"), boost::lexical_cast("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000"), boost::lexical_cast("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000"), boost::lexical_cast("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000"), boost::lexical_cast("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000"), boost::lexical_cast("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000"), boost::lexical_cast("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000"), boost::lexical_cast("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000"), boost::lexical_cast("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000"), boost::lexical_cast("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000"), boost::lexical_cast("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000"), boost::lexical_cast("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000"), boost::lexical_cast("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000"), boost::lexical_cast("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000"), boost::lexical_cast("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000"), boost::lexical_cast("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000"), boost::lexical_cast("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000"), boost::lexical_cast("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000"), boost::lexical_cast("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000"), boost::lexical_cast("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000"), boost::lexical_cast("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000"), boost::lexical_cast("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000"), boost::lexical_cast("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000"), boost::lexical_cast("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000"), boost::lexical_cast("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000"), boost::lexical_cast("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000"), boost::lexical_cast("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000"), boost::lexical_cast("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000"), boost::lexical_cast("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000"), boost::lexical_cast("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000"), boost::lexical_cast("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000"), }}; return factorials[i]; } template struct max_factorial { static const unsigned value = 100; }; template const unsigned max_factorial::value; } } # 43 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" namespace boost{ namespace math{ namespace detail{ template T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<64>&, const Policy& , const L&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = 0; if(z < tools::epsilon()) { result = -log(z); } else if((zm1 == 0) || (zm2 == 0)) { } else if(z > 2) { if(z >= 3) { do { z -= 1; zm2 -= 1; result += log(z); }while(z >= 3); zm2 = z - 2; } # 70 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" static const T P[] = { static_cast(-0.180355685678449379109e-1L), static_cast(0.25126649619989678683e-1L), static_cast(0.494103151567532234274e-1L), static_cast(0.172491608709613993966e-1L), static_cast(-0.259453563205438108893e-3L), static_cast(-0.541009869215204396339e-3L), static_cast(-0.324588649825948492091e-4L) }; static const T Q[] = { static_cast(0.1e1), static_cast(0.196202987197795200688e1L), static_cast(0.148019669424231326694e1L), static_cast(0.541391432071720958364e0L), static_cast(0.988504251128010129477e-1L), static_cast(0.82130967464889339326e-2L), static_cast(0.224936291922115757597e-3L), static_cast(-0.223352763208617092964e-6L) }; static const float Y = 0.158963680267333984375e0f; T r = zm2 * (z + 1); T R = tools::evaluate_polynomial(P, zm2); R /= tools::evaluate_polynomial(Q, zm2); result += r * Y + r * R; } else { if(z < 1) { result += -log(z); zm2 = zm1; zm1 = z; z += 1; } if(z <= 1.5) { # 135 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" static const float Y = 0.52815341949462890625f; static const T P[] = { static_cast(0.490622454069039543534e-1L), static_cast(-0.969117530159521214579e-1L), static_cast(-0.414983358359495381969e0L), static_cast(-0.406567124211938417342e0L), static_cast(-0.158413586390692192217e0L), static_cast(-0.240149820648571559892e-1L), static_cast(-0.100346687696279557415e-2L) }; static const T Q[] = { static_cast(0.1e1L), static_cast(0.302349829846463038743e1L), static_cast(0.348739585360723852576e1L), static_cast(0.191415588274426679201e1L), static_cast(0.507137738614363510846e0L), static_cast(0.577039722690451849648e-1L), static_cast(0.195768102601107189171e-2L) }; T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1); T prefix = zm1 * zm2; result += prefix * Y + prefix * r; } else { # 180 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" static const float Y = 0.452017307281494140625f; static const T P[] = { static_cast(-0.292329721830270012337e-1L), static_cast(0.144216267757192309184e0L), static_cast(-0.142440390738631274135e0L), static_cast(0.542809694055053558157e-1L), static_cast(-0.850535976868336437746e-2L), static_cast(0.431171342679297331241e-3L) }; static const T Q[] = { static_cast(0.1e1), static_cast(-0.150169356054485044494e1L), static_cast(0.846973248876495016101e0L), static_cast(-0.220095151814995745555e0L), static_cast(0.25582797155975869989e-1L), static_cast(-0.100666795539143372762e-2L), static_cast(-0.827193521891290553639e-6L) }; T r = zm2 * zm1; T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2)); result += r * Y + r * R; } } return result; } template T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<113>&, const Policy& , const L&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = 0; if(z < tools::epsilon()) { result = -log(z); ; } else if((zm1 == 0) || (zm2 == 0)) { } else if(z > 2) { if(z >= 3) { do { z -= 1; result += log(z); }while(z >= 3); zm2 = z - 2; } ; ; ; # 257 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" static const T P[] = { -0.018035568567844937910504030027467476655L, 0.013841458273109517271750705401202404195L, 0.062031842739486600078866923383017722399L, 0.052518418329052161202007865149435256093L, 0.01881718142472784129191838493267755758L, 0.0025104830367021839316463675028524702846L, -0.00021043176101831873281848891452678568311L, -0.00010249622350908722793327719494037981166L, -0.11381479670982006841716879074288176994e-4L, -0.49999811718089980992888533630523892389e-6L, -0.70529798686542184668416911331718963364e-8L }; static const T Q[] = { 1L, 2.5877485070422317542808137697939233685L, 2.8797959228352591788629602533153837126L, 1.8030885955284082026405495275461180977L, 0.69774331297747390169238306148355428436L, 0.17261566063277623942044077039756583802L, 0.02729301254544230229429621192443000121L, 0.0026776425891195270663133581960016620433L, 0.00015244249160486584591370355730402168106L, 0.43997034032479866020546814475414346627e-5L, 0.46295080708455613044541885534408170934e-7L, -0.93326638207459533682980757982834180952e-11L, 0.42316456553164995177177407325292867513e-13L }; T R = tools::evaluate_polynomial(P, zm2); R /= tools::evaluate_polynomial(Q, zm2); static const float Y = 0.158963680267333984375F; T r = zm2 * (z + 1); result += r * Y + r * R; ; } else { if(z < 1) { result += -log(z); zm2 = zm1; zm1 = z; z += 1; } ; ; ; if(z <= 1.35) { # 333 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" static const float Y = 0.54076099395751953125f; static const T P[] = { 0.036454670944013329356512090082402429697L, -0.066235835556476033710068679907798799959L, -0.67492399795577182387312206593595565371L, -1.4345555263962411429855341651960000166L, -1.4894319559821365820516771951249649563L, -0.87210277668067964629483299712322411566L, -0.29602090537771744401524080430529369136L, -0.0561832587517836908929331992218879676L, -0.0053236785487328044334381502530383140443L, -0.00018629360291358130461736386077971890789L, -0.10164985672213178500790406939467614498e-6L, 0.13680157145361387405588201461036338274e-8L }; static const T Q[] = { 1, 4.9106336261005990534095838574132225599L, 10.258804800866438510889341082793078432L, 11.88588976846826108836629960537466889L, 8.3455000546999704314454891036700998428L, 3.6428823682421746343233362007194282703L, 0.97465989807254572142266753052776132252L, 0.15121052897097822172763084966793352524L, 0.012017363555383555123769849654484594893L, 0.0003583032812720649835431669893011257277L }; T r = tools::evaluate_polynomial(P, zm1) / tools::evaluate_polynomial(Q, zm1); T prefix = zm1 * zm2; result += prefix * Y + prefix * r; ; } else if(z <= 1.625) { # 386 "/localhome/glisse2/include/boost/math/special_functions/detail/lgamma_small.hpp" static const float Y = 0.483787059783935546875f; static const T P[] = { -0.017977422421608624353488126610933005432L, 0.18484528905298309555089509029244135703L, -0.40401251514859546989565001431430884082L, 0.40277179799147356461954182877921388182L, -0.21993421441282936476709677700477598816L, 0.069595742223850248095697771331107571011L, -0.012681481427699686635516772923547347328L, 0.0012489322866834830413292771335113136034L, -0.57058739515423112045108068834668269608e-4L, 0.8207548771933585614380644961342925976e-6L }; static const T Q[] = { 1, -2.9629552288944259229543137757200262073L, 3.7118380799042118987185957298964772755L, -2.5569815272165399297600586376727357187L, 1.0546764918220835097855665680632153367L, -0.26574021300894401276478730940980810831L, 0.03996289731752081380552901986471233462L, -0.0033398680924544836817826046380586480873L, 0.00013288854760548251757651556792598235735L, -0.17194794958274081373243161848194745111e-5L }; T r = zm2 * zm1; T R = tools::evaluate_polynomial(P, T(0.625 - zm1)) / tools::evaluate_polynomial(Q, T(0.625 - zm1)); result += r * Y + r * R; ; } else { static const float Y = 0.443811893463134765625f; static const T P[] = { -0.021027558364667626231512090082402429494L, 0.15128811104498736604523586803722368377L, -0.26249631480066246699388544451126410278L, 0.21148748610533489823742352180628489742L, -0.093964130697489071999873506148104370633L, 0.024292059227009051652542804957550866827L, -0.0036284453226534839926304745756906117066L, 0.0002939230129315195346843036254392485984L, -0.11088589183158123733132268042570710338e-4L, 0.13240510580220763969511741896361984162e-6L }; static const T Q[] = { 1, -2.4240003754444040525462170802796471996L, 2.4868383476933178722203278602342786002L, -1.4047068395206343375520721509193698547L, 0.47583809087867443858344765659065773369L, -0.09865724264554556400463655444270700132L, 0.012238223514176587501074150988445109735L, -0.00084625068418239194670614419707491797097L, 0.2796574430456237061420839429225710602e-4L, -0.30202973883316730694433702165188835331e-6L }; T r = zm2 * zm1; T R = tools::evaluate_polynomial(P, T(-zm2)) / tools::evaluate_polynomial(Q, T(-zm2)); result += r * Y + r * R; ; } } ; return result; } template T lgamma_small_imp(T z, T zm1, T zm2, const mpl::int_<0>&, const Policy& pol, const L&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = 0; if(z < tools::epsilon()) { result = -log(z); } else if(z < 0.5) { result = log(gamma_imp(z, pol, L())); } else if(z >= 3) { result = log(gamma_imp(z, pol, L())); } else if(z >= 1.5) { T dz = zm2; result = dz * log((z + L::g() - T(0.5)) / boost::math::constants::e()); result += boost::math::log1p(dz / (L::g() + T(1.5)), pol) * T(1.5); result += boost::math::log1p(L::lanczos_sum_near_2(dz), pol); } else { T dz = zm1; result = dz * log((z + L::g() - T(0.5)) / boost::math::constants::e()); result += boost::math::log1p(dz / (L::g() + T(0.5)), pol) / 2; result += boost::math::log1p(L::lanczos_sum_near_1(dz), pol); } return result; } }}} # 44 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 46 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 70 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" namespace boost{ namespace math{ namespace detail{ template inline bool is_odd(T v, const boost::true_type&) { int i = static_cast(v); return i&1; } template inline bool is_odd(T v, const boost::false_type&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T modulus = v - 2 * floor(v/2); return static_cast(modulus != 0); } template inline bool is_odd(T v) { return is_odd(v, ::boost::is_convertible()); } template T sinpx(T z) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; int sign = 1; if(z < 0) { z = -z; } else { sign = -sign; } T fl = floor(z); T dist; if(is_odd(fl)) { fl += 1; dist = fl - z; sign = -sign; } else { dist = z - fl; } ((fl >= 0) ? static_cast (0) : __assert_fail ("fl >= 0", "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp", 121, __PRETTY_FUNCTION__)); if(dist > 0.5) dist = 1 - dist; T result = sin(dist*boost::math::constants::pi()); return sign*z*result; } template T gamma_imp(T z, const Policy& pol, const L& l) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = 1; # 145 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" static const char* function = "boost::math::tgamma<%1%>(%1%)"; if(z <= 0) { if(floor(z) == z) return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); if(z <= -20) { result = gamma_imp(T(-z), pol, l) * sinpx(z); ; if((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); result = -boost::math::constants::pi() / result; if(result == 0) return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL) return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); ; return result; } while(z < 0) { result /= z; z += 1; } } ; if((floor(z) == z) && (z < max_factorial::value)) { result *= unchecked_factorial(itrunc(z, pol) - 1); ; } else { result *= L::lanczos_sum(z); ; ; if(z * log(z) > tools::log_max_value()) { T zgh = (z + static_cast(L::g()) - boost::math::constants::half()); ; if(log(zgh) * z / 2 > tools::log_max_value()) return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); T hp = pow(zgh, (z / 2) - T(0.25)); ; result *= hp / exp(zgh); ; if(tools::max_value() / hp < result) return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); result *= hp; ; } else { T zgh = (z + static_cast(L::g()) - boost::math::constants::half()); ; ; ; result *= pow(zgh, z - boost::math::constants::half()) / exp(zgh); ; } } return result; } template T lgamma_imp(T z, const Policy& pol, const L& l, int* sign = 0) { # 227 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::lgamma<%1%>(%1%)"; T result = 0; int sresult = 1; if(z <= 0) { if(floor(z) == z) return policies::raise_pole_error(function, "Evaluation of lgamma at a negative integer %1%.", z, pol); T t = sinpx(z); z = -z; if(t < 0) { t = -t; } else { sresult = -sresult; } result = log(boost::math::constants::pi()) - lgamma_imp(z, pol, l) - log(t); } else if(z < 15) { typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::and_< mpl::less_equal >, mpl::greater > >, mpl::int_<64>, typename mpl::if_< mpl::and_< mpl::less_equal >, mpl::greater > >, mpl::int_<113>, mpl::int_<0> >::type >::type tag_type; result = lgamma_small_imp(z, T(z - 1), T(z - 2), tag_type(), pol, l); } else if((z >= 3) && (z < 100)) { result = log(gamma_imp(z, pol, l)); } else { T zgh = static_cast(z + L::g() - boost::math::constants::half()); result = log(zgh) - 1; result *= z - 0.5f; result += log(L::lanczos_sum_expG_scaled(z)); } if(sign) *sign = sresult; return result; } template struct upper_incomplete_gamma_fract { private: T z, a; int k; public: typedef std::pair result_type; upper_incomplete_gamma_fract(T a1, T z1) : z(z1-a1+1), a(a1), k(0) { } result_type operator()() { ++k; z += 2; return result_type(k * (a - k), z); } }; template inline T upper_gamma_fraction(T a, T z, T eps) { upper_incomplete_gamma_fract f(a, z); return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, eps)); } template struct lower_incomplete_gamma_series { private: T a, z, result; public: typedef T result_type; lower_incomplete_gamma_series(T a1, T z1) : a(a1), z(z1), result(1){} T operator()() { T r = result; a += 1; result *= z/a; return r; } }; template inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0) { lower_incomplete_gamma_series s(a, z); boost::uintmax_t max_iter = policies::get_max_series_iterations(); T factor = policies::get_epsilon(); T result = boost::math::tools::sum_series(s, factor, max_iter, init_value); policies::check_series_iterations("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol); return result; } template T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l) { static const char* function = "boost::math::tgamma<%1%>(%1%)"; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if((z <= 0) && (floor(z) == z)) return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); if(z <= -20) { T result = gamma_imp(T(-z), pol, l) * sinpx(z); if((fabs(result) < 1) && (tools::max_value() * fabs(result) < boost::math::constants::pi())) return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); result = -boost::math::constants::pi() / result; if(result == 0) return policies::raise_underflow_error(function, "Result of tgamma is too small to represent.", pol); if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL) return policies::raise_denorm_error(function, "Result of tgamma is denormalized.", result, pol); return result; } T prefix = 1; while(z < 6) { prefix /= z; z += 1; } ; if((floor(z) == z) && (z < max_factorial::value)) { prefix *= unchecked_factorial(itrunc(z, pol) - 1); } else { prefix = prefix * pow(z / boost::math::constants::e(), z); ; T sum = detail::lower_gamma_series(z, z, pol) / z; ; sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::get_epsilon()); ; if(fabs(tools::max_value() / prefix) < fabs(sum)) return policies::raise_overflow_error(function, "Result of tgamma is too large to represent.", pol); ; return sum * prefix; } return prefix; } template T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos& l, int*sign) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::lgamma<%1%>(%1%)"; T result = 0; int sresult = 1; if(z <= 0) { if(floor(z) == z) return policies::raise_pole_error(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); T t = detail::sinpx(z); z = -z; if(t < 0) { t = -t; } else { sresult = -sresult; } result = log(boost::math::constants::pi()) - lgamma_imp(z, pol, l, 0) - log(t); } else if((z != 1) && (z != 2)) { T limit = (std::max)(T(z+1), T(10)); T prefix = z * log(limit) - limit; T sum = detail::lower_gamma_series(z, limit, pol) / z; sum += detail::upper_gamma_fraction(z, limit, ::boost::math::policies::get_epsilon()); result = log(sum) + prefix; } if(sign) *sign = sresult; return result; } template T tgammap1m1_imp(T dz, Policy const& pol, const L& l) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_< mpl::less_equal >, mpl::greater > >, typename mpl::if_< is_same, mpl::int_<113>, mpl::int_<0> >::type, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, mpl::int_<113> >::type >::type tag_type; T result; if(dz < 0) { if(dz < -0.5) { result = boost::math::tgamma(1+dz, pol) - 1; ; } else { result = boost::math::expm1(-boost::math::log1p(dz, pol) + lgamma_small_imp(dz+2, dz + 1, dz, tag_type(), pol, l)); ; } } else { if(dz < 2) { result = boost::math::expm1(lgamma_small_imp(dz+1, dz, dz-1, tag_type(), pol, l), pol); ; } else { result = boost::math::tgamma(1+dz, pol) - 1; ; } } return result; } template inline T tgammap1m1_imp(T dz, Policy const& pol, const ::boost::math::lanczos::undefined_lanczos& l) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = gamma_imp(T(1 + dz), pol, l) - 1; ; ; ; ; if((dz > -0.5) && (dz < 2) && (ldexp(1.0, boost::math::policies::digits()) * fabs(result) < 1e34)) { result = tgammap1m1_imp(dz, pol, boost::math::lanczos::lanczos24m113()); ; } return result; } template struct small_gamma2_series { typedef T result_type; small_gamma2_series(T a_, T x_) : result(-x_), x(-x_), apn(a_+1), n(1){} T operator()() { T r = result / (apn); result *= x; result /= ++n; apn += 1; return r; } private: T result, x, apn; int n; }; template T full_igamma_prefix(T a, T z, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T prefix; T alz = a * log(z); if(z >= 1) { if((alz < tools::log_max_value()) && (-z > tools::log_min_value())) { prefix = pow(z, a) * exp(-z); } else if(a >= 1) { prefix = pow(z / exp(z/a), a); } else { prefix = exp(alz - z); } } else { if(alz > tools::log_min_value()) { prefix = pow(z, a) * exp(-z); } else if(z/a < tools::log_max_value()) { prefix = pow(z / exp(z/a), a); } else { prefix = exp(alz - z); } } if((boost::math::fpclassify)(prefix) == (int)FP_INFINITE) policies::raise_overflow_error("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol); return prefix; } template T regularised_gamma_prefix(T a, T z, const Policy& pol, const L& l) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T agh = a + static_cast(L::g()) - T(0.5); T prefix; T d = ((z - a) - static_cast(L::g()) + T(0.5)) / agh; if(a < 1) { # 634 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" if(z <= tools::log_min_value()) { return exp(a * log(z) - z - lgamma_imp(a, pol, l)); } else { return pow(z, a) * exp(-z) / gamma_imp(a, pol, l); } } else if((fabs(d*d*a) <= 100) && (a > 150)) { prefix = a * boost::math::log1pmx(d, pol) + z * static_cast(0.5 - L::g()) / agh; prefix = exp(prefix); } else { T alz = a * log(z / agh); T amz = a - z; if(((std::min)(alz, amz) <= tools::log_min_value()) || ((std::max)(alz, amz) >= tools::log_max_value())) { T amza = amz / a; if(((std::min)(alz, amz)/2 > tools::log_min_value()) && ((std::max)(alz, amz)/2 < tools::log_max_value())) { T sq = pow(z / agh, a / 2) * exp(amz / 2); prefix = sq * sq; } else if(((std::min)(alz, amz)/4 > tools::log_min_value()) && ((std::max)(alz, amz)/4 < tools::log_max_value()) && (z > a)) { T sq = pow(z / agh, a / 4) * exp(amz / 4); prefix = sq * sq; prefix *= prefix; } else if((amza > tools::log_min_value()) && (amza < tools::log_max_value())) { prefix = pow((z * exp(amza)) / agh, a); } else { prefix = exp(alz + amz); } } else { prefix = pow(z / agh, a) * exp(amz); } } prefix *= sqrt(agh / boost::math::constants::e()) / L::lanczos_sum_expG_scaled(a); return prefix; } template T regularised_gamma_prefix(T a, T z, const Policy& pol, const lanczos::undefined_lanczos&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T limit = (std::max)(T(10), a); T sum = detail::lower_gamma_series(a, limit, pol) / a; sum += detail::upper_gamma_fraction(a, limit, ::boost::math::policies::get_epsilon()); if(a < 10) { T prefix = pow(z / 10, a); prefix *= exp(10-z); if(0 == prefix) { prefix = pow((z * exp((10-z)/a)) / 10, a); } prefix /= sum; return prefix; } T zoa = z / a; T amz = a - z; T alzoa = a * log(zoa); T prefix; if(((std::min)(alzoa, amz) <= tools::log_min_value()) || ((std::max)(alzoa, amz) >= tools::log_max_value())) { T amza = amz / a; if((amza <= tools::log_min_value()) || (amza >= tools::log_max_value())) { prefix = exp(alzoa + amz); } else { prefix = pow(zoa * exp(amza), a); } } else { prefix = pow(zoa, a) * exp(amz); } prefix /= sum; return prefix; } template inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool invert = false, T* pderivative = 0) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; result = boost::math::tgamma1pm1(a, pol); if(pgam) *pgam = (result + 1) / a; T p = boost::math::powm1(x, a, pol); result -= p; result /= a; detail::small_gamma2_series s(a, x); boost::uintmax_t max_iter = policies::get_max_series_iterations() - 10; p += 1; if(pderivative) *pderivative = p / (*pgam * exp(x)); T init_value = invert ? *pgam : 0; result = -p * tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, (init_value - result) / p); policies::check_series_iterations("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol); if(invert) result = -result; return result; } template inline T finite_gamma_q(T a, T x, Policy const& pol, T* pderivative = 0) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T e = exp(-x); T sum = e; if(sum != 0) { T term = sum; for(unsigned n = 1; n < a; ++n) { term /= n; term *= x; sum += term; } } if(pderivative) { *pderivative = e * pow(x, a) / boost::math::unchecked_factorial(itrunc(T(a - 1), pol)); } return sum; } template T finite_half_gamma_q(T a, T x, T* p_derivative, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T e = boost::math::erfc(sqrt(x), pol); if((e != 0) && (a > 1)) { T term = exp(-x) / sqrt(constants::pi() * x); term *= x; static const T half = T(1) / 2; term /= half; T sum = term; for(unsigned n = 2; n < a; ++n) { term /= n - half; term *= x; sum += term; } e += sum; if(p_derivative) { *p_derivative = 0; } } else if(p_derivative) { *p_derivative = sqrt(x) * exp(-x) / constants::root_pi(); } return e; } template T gamma_incomplete_imp(T a, T x, bool normalised, bool invert, const Policy& pol, T* p_derivative) { static const char* function = "boost::math::gamma_p<%1%>(%1%, %1%)"; if(a <= 0) policies::raise_domain_error(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); if(x < 0) policies::raise_domain_error(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename lanczos::lanczos::type lanczos_type; T result = 0; (((p_derivative == 0) || (normalised == true)) ? static_cast (0) : __assert_fail ("(p_derivative == 0) || (normalised == true)", "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp", 855, __PRETTY_FUNCTION__)); bool is_int, is_half_int; bool is_small_a = (a < 30) && (a <= x + 1); if(is_small_a) { T fa = floor(a); is_int = (fa == a); is_half_int = is_int ? false : (fabs(fa - a) == 0.5f); } else { is_int = is_half_int = false; } int eval_method; if(is_int && (x > 0.6)) { invert = !invert; eval_method = 0; } else if(is_half_int && (x > 0.2)) { invert = !invert; eval_method = 1; } else if(x < 0.5) { if(-0.4 / log(x) < a) { eval_method = 2; } else { eval_method = 3; } } else if(x < 1.1) { if(x * 0.75f < a) { eval_method = 2; } else { eval_method = 3; } } else { bool use_temme = false; if(normalised && std::numeric_limits::is_specialized && (a > 20)) { T sigma = fabs((x-a)/a); if((a > 200) && (policies::digits() <= 113)) { # 933 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" if(20 / a > sigma * sigma) use_temme = true; } else if(policies::digits() <= 64) { if(sigma < 0.4) use_temme = true; } } if(use_temme) { eval_method = 5; } else { # 959 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" if(x - (1 / (3 * x)) < a) { eval_method = 2; } else { eval_method = 4; invert = !invert; } } } switch(eval_method) { case 0: { result = finite_gamma_q(a, x, pol, p_derivative); if(normalised == false) result *= boost::math::tgamma(a, pol); break; } case 1: { result = finite_half_gamma_q(a, x, p_derivative, pol); if(normalised == false) result *= boost::math::tgamma(a, pol); if(p_derivative && (*p_derivative == 0)) *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); break; } case 2: { result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); if(p_derivative) *p_derivative = result; if(result != 0) { T init_value = 0; if(invert) { init_value = -a * (normalised ? 1 : boost::math::tgamma(a, pol)) / result; } result *= detail::lower_gamma_series(a, x, pol, init_value) / a; if(invert) { invert = false; result = -result; } } break; } case 3: { invert = !invert; T g; result = tgamma_small_upper_part(a, x, pol, &g, invert, p_derivative); invert = false; if(normalised) result /= g; break; } case 4: { result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol); if(p_derivative) *p_derivative = result; if(result != 0) result *= upper_gamma_fraction(a, x, policies::get_epsilon()); break; } case 5: { # 1042 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_ >, mpl::greater > >, mpl::int_<0>, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, mpl::int_<113> >::type >::type >::type tag_type; result = igamma_temme_large(a, x, pol, static_cast(0)); if(x >= a) invert = !invert; if(p_derivative) *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type()); break; } } if(normalised && (result > 1)) result = 1; if(invert) { T gam = normalised ? 1 : boost::math::tgamma(a, pol); result = gam - result; } if(p_derivative) { if((x < 1) && (tools::max_value() * x < *p_derivative)) { *p_derivative = tools::max_value() / 2; } *p_derivative /= x; } return result; } template T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const L&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T zgh = z + L::g() - constants::half(); T result; if(fabs(delta) < 10) { result = exp((constants::half() - z) * boost::math::log1p(delta / zgh, pol)); } else { result = pow(zgh / (zgh + delta), z - constants::half()); } result *= pow(constants::e() / (zgh + delta), delta); result *= L::lanczos_sum(z) / L::lanczos_sum(T(z + delta)); return result; } template T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos::undefined_lanczos&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T prefix = 1; T zd = z + delta; while((zd < 6) && (z < 6)) { prefix /= z; prefix *= zd; z += 1; zd += 1; } if(delta < 10) { prefix *= exp(-z * boost::math::log1p(delta / z, pol)); } else { prefix *= pow(z / zd, z); } prefix *= pow(constants::e() / zd, delta); T sum = detail::lower_gamma_series(z, z, pol) / z; sum += detail::upper_gamma_fraction(z, z, ::boost::math::policies::get_epsilon()); T sumd = detail::lower_gamma_series(zd, zd, pol) / zd; sumd += detail::upper_gamma_fraction(zd, zd, ::boost::math::policies::get_epsilon()); sum /= sumd; if(fabs(tools::max_value() / prefix) < fabs(sum)) return policies::raise_overflow_error("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Result of tgamma is too large to represent.", pol); return sum * prefix; } template T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(z <= 0) policies::raise_domain_error("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", z, pol); if(z+delta <= 0) policies::raise_domain_error("boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", z+delta, pol); if(floor(delta) == delta) { if(floor(z) == z) { if((z <= max_factorial::value) && (z + delta <= max_factorial::value)) { return unchecked_factorial((unsigned)itrunc(z, pol) - 1) / unchecked_factorial((unsigned)itrunc(T(z + delta), pol) - 1); } } if(fabs(delta) < 20) { if(delta == 0) return 1; if(delta < 0) { z -= 1; T result = z; while(0 != (delta += 1)) { z -= 1; result *= z; } return result; } else { T result = 1 / z; while(0 != (delta -= 1)) { z += 1; result /= z; } return result; } } } typedef typename lanczos::lanczos::type lanczos_type; return tgamma_delta_ratio_imp_lanczos(z, delta, pol, lanczos_type()); } template T gamma_p_derivative_imp(T a, T x, const Policy& pol) { if(a <= 0) policies::raise_domain_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol); if(x < 0) policies::raise_domain_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol); if(x == 0) { return (a > 1) ? 0 : (a == 1) ? 1 : policies::raise_overflow_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol); } typedef typename lanczos::lanczos::type lanczos_type; T f1 = detail::regularised_gamma_prefix(a, x, pol, lanczos_type()); if((x < 1) && (tools::max_value() * x < f1)) { return policies::raise_overflow_error("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", 0, pol); } f1 /= x; return f1; } template inline typename tools::promote_args::type tgamma(T z, const Policy& , const mpl::true_) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::gamma_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)"); } template inline typename tools::promote_args::type tgamma(T1 a, T2 z, const Policy&, const mpl::false_) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), false, true, forwarding_policy(), static_cast(0)), "boost::math::tgamma<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type tgamma(T1 a, T2 z, const mpl::false_ tag) { return tgamma(a, z, policies::policy<>(), tag); } } template inline typename tools::promote_args::type tgamma(T z) { return tgamma(z, policies::policy<>()); } template inline typename tools::promote_args::type lgamma(T z, int* sign, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::lgamma_imp(static_cast(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)"); } template inline typename tools::promote_args::type lgamma(T z, int* sign) { return lgamma(z, sign, policies::policy<>()); } template inline typename tools::promote_args::type lgamma(T x, const Policy& pol) { return ::boost::math::lgamma(x, 0, pol); } template inline typename tools::promote_args::type lgamma(T x) { return ::boost::math::lgamma(x, 0, policies::policy<>()); } template inline typename tools::promote_args::type tgamma1pm1(T z, const Policy& ) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)"); } template inline typename tools::promote_args::type tgamma1pm1(T z) { return tgamma1pm1(z, policies::policy<>()); } template inline typename tools::promote_args::type tgamma(T1 a, T2 z) { typedef typename policies::is_policy::type maybe_policy; return detail::tgamma(a, z, maybe_policy()); } template inline typename tools::promote_args::type tgamma(T1 a, T2 z, const Policy& pol) { return detail::tgamma(a, z, pol, mpl::false_()); } template inline typename tools::promote_args::type tgamma_lower(T1 a, T2 z, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), false, false, forwarding_policy(), static_cast(0)), "tgamma_lower<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type tgamma_lower(T1 a, T2 z) { return tgamma_lower(a, z, policies::policy<>()); } template inline typename tools::promote_args::type gamma_q(T1 a, T2 z, const Policy& ) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), true, true, forwarding_policy(), static_cast(0)), "gamma_q<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type gamma_q(T1 a, T2 z) { return gamma_q(a, z, policies::policy<>()); } template inline typename tools::promote_args::type gamma_p(T1 a, T2 z, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast( detail::gamma_incomplete_imp(static_cast(a), static_cast(z), true, false, forwarding_policy(), static_cast(0)), "gamma_p<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type gamma_p(T1 a, T2 z) { return gamma_p(a, z, policies::policy<>()); } template inline typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy& ) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::tgamma_delta_ratio_imp(static_cast(z), static_cast(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta) { return tgamma_delta_ratio(z, delta, policies::policy<>()); } template inline typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::tgamma_delta_ratio_imp(static_cast(a), static_cast(static_cast(b) - static_cast(a)), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type tgamma_ratio(T1 a, T2 b) { return tgamma_ratio(a, b, policies::policy<>()); } template inline typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::gamma_p_derivative_imp(static_cast(a), static_cast(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x) { return gamma_p_derivative(a, x, policies::policy<>()); } } } # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/tuple.hpp" 1 # 10 "/localhome/glisse2/include/boost/math/tools/tuple.hpp" # 1 "/localhome/glisse2/include/boost/tr1/detail/config.hpp" 1 # 9 "/localhome/glisse2/include/boost/tr1/detail/config.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 10 "/localhome/glisse2/include/boost/tr1/detail/config.hpp" 2 # 11 "/localhome/glisse2/include/boost/math/tools/tuple.hpp" 2 namespace boost{ namespace math{ using ::std::tuple; using ::std::ignore; using ::std::make_tuple; using ::std::tie; using ::std::get; using ::std::tuple_size; using ::std::tuple_element; }} # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/tools/roots.hpp" 1 # 18 "/localhome/glisse2/include/boost/math/tools/roots.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 19 "/localhome/glisse2/include/boost/math/tools/roots.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 20 "/localhome/glisse2/include/boost/math/tools/roots.hpp" 2 # 32 "/localhome/glisse2/include/boost/math/tools/roots.hpp" # 1 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 18 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" 2 namespace boost{ namespace math{ namespace tools{ template class eps_tolerance { public: eps_tolerance(unsigned bits) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(2 * tools::epsilon())); } bool operator()(const T& a, const T& b) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return fabs(a - b) <= (eps * (std::min)(fabs(a), fabs(b))); } private: T eps; }; struct equal_floor { equal_floor(){} template bool operator()(const T& a, const T& b) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return floor(a) == floor(b); } }; struct equal_ceil { equal_ceil(){} template bool operator()(const T& a, const T& b) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return ceil(a) == ceil(b); } }; struct equal_nearest_integer { equal_nearest_integer(){} template bool operator()(const T& a, const T& b) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return floor(a + 0.5f) == floor(b + 0.5f); } }; namespace detail{ template void bracket(F f, T& a, T& b, T c, T& fa, T& fb, T& d, T& fd) { # 86 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T tol = tools::epsilon() * 2; if((b - a) < 2 * tol * a) { c = a + (b - a) / 2; } else if(c <= a + fabs(a) * tol) { c = a + fabs(a) * tol; } else if(c >= b - fabs(b) * tol) { c = b - fabs(a) * tol; } T fc = f(c); if(fc == 0) { a = c; fa = 0; d = 0; fd = 0; return; } if(boost::math::sign(fa) * boost::math::sign(fc) < 0) { d = b; fd = fb; b = c; fb = fc; } else { d = a; fd = fa; a = c; fa= fc; } } template inline T safe_div(T num, T denom, T r) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(fabs(denom) < 1) { if(fabs(denom * tools::max_value()) <= fabs(num)) return r; } return num / denom; } template inline T secant_interpolate(const T& a, const T& b, const T& fa, const T& fb) { # 168 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T tol = tools::epsilon() * 5; T c = a - (fa / (fb - fa)) * (b - a); if((c <= a + fabs(a) * tol) || (c >= b - fabs(b) * tol)) return (a + b) / 2; return c; } template T quadratic_interpolate(const T& a, const T& b, T const& d, const T& fa, const T& fb, T const& fd, unsigned count) { # 196 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" T B = safe_div(T(fb - fa), T(b - a), tools::max_value()); T A = safe_div(T(fd - fb), T(d - b), tools::max_value()); A = safe_div(T(A - B), T(d - a), T(0)); if(a == 0) { return secant_interpolate(a, b, fa, fb); } T c; if(boost::math::sign(A) * boost::math::sign(fa) > 0) { c = a; } else { c = b; } for(unsigned i = 1; i <= count; ++i) { c -= safe_div(T(fa+(B+A*(c-b))*(c-a)), T(B + A * (2 * c - a - b)), T(1 + c - a)); } if((c <= a) || (c >= b)) { c = secant_interpolate(a, b, fa, fb); } return c; } template T cubic_interpolate(const T& a, const T& b, const T& d, const T& e, const T& fa, const T& fb, const T& fd, const T& fe) { # 249 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" ; T q11 = (d - e) * fd / (fe - fd); T q21 = (b - d) * fb / (fd - fb); T q31 = (a - b) * fa / (fb - fa); T d21 = (b - d) * fd / (fd - fb); T d31 = (a - b) * fb / (fb - fa); ; T q22 = (d21 - q11) * fb / (fe - fb); T q32 = (d31 - q21) * fa / (fd - fa); T d32 = (d31 - q21) * fd / (fd - fa); T q33 = (d32 - q22) * fa / (fe - fa); T c = q31 + q32 + q33 + a; ; if((c <= a) || (c >= b)) { c = quadratic_interpolate(a, b, d, fa, fb, fd, 3); ; } return c; } } template std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::tools::toms748_solve<%1%>"; boost::uintmax_t count = max_iter; T a, b, fa, fb, c, u, fu, a0, b0, d, fd, e, fe; static const T mu = 0.5f; a = ax; b = bx; if(a >= b) policies::raise_domain_error( function, "Parameters a and b out of order: a=%1%", a, pol); fa = fax; fb = fbx; if(tol(a, b) || (fa == 0) || (fb == 0)) { max_iter = 0; if(fa == 0) b = a; else if(fb == 0) a = b; return std::make_pair(a, b); } if(boost::math::sign(fa) * boost::math::sign(fb) > 0) policies::raise_domain_error( function, "Parameters a and b do not bracket the root: a=%1%", a, pol); fe = e = fd = 1e5F; if(fa != 0) { c = detail::secant_interpolate(a, b, fa, fb); detail::bracket(f, a, b, c, fa, fb, d, fd); --count; ; if(count && (fa != 0) && !tol(a, b)) { c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2); e = d; fe = fd; detail::bracket(f, a, b, c, fa, fb, d, fd); --count; ; } } while(count && (fa != 0) && !tol(a, b)) { a0 = a; b0 = b; # 361 "/localhome/glisse2/include/boost/math/tools/toms748_solve.hpp" T min_diff = tools::min_value() * 32; bool prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff); if(prof) { c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2); ; } else { c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe); } e = d; fe = fd; detail::bracket(f, a, b, c, fa, fb, d, fd); if((0 == --count) || (fa == 0) || tol(a, b)) break; ; prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff); if(prof) { c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 3); ; } else { c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe); } detail::bracket(f, a, b, c, fa, fb, d, fd); if((0 == --count) || (fa == 0) || tol(a, b)) break; ; if(fabs(fa) < fabs(fb)) { u = a; fu = fa; } else { u = b; fu = fb; } c = u - 2 * (fu / (fb - fa)) * (b - a); if(fabs(c - u) > (b - a) / 2) { c = a + (b - a) / 2; } e = d; fe = fd; detail::bracket(f, a, b, c, fa, fb, d, fd); if((0 == --count) || (fa == 0) || tol(a, b)) break; ; if((b - a) < mu * (b0 - a0)) continue; e = d; fe = fd; detail::bracket(f, a, b, T(a + (b - a) / 2), fa, fb, d, fd); --count; ; ; } max_iter -= count; if(fa == 0) { b = a; } else if(fb == 0) { a = b; } return std::make_pair(a, b); } template inline std::pair toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter) { return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policies::policy<>()); } template inline std::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) { max_iter -= 2; std::pair r = toms748_solve(f, ax, bx, f(ax), f(bx), tol, max_iter, pol); max_iter += 2; return r; } template inline std::pair toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter) { return toms748_solve(f, ax, bx, tol, max_iter, policies::policy<>()); } template std::pair bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::tools::bracket_and_solve_root<%1%>"; T a = guess; T b = a; T fa = f(a); T fb = fa; boost::uintmax_t count = max_iter - 1; if((fa < 0) == (guess < 0 ? !rising : rising)) { while((boost::math::sign)(fb) == (boost::math::sign)(fa)) { if(count == 0) policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, pol); if((max_iter - count) % 20 == 0) factor *= 2; a = b; fa = fb; b *= factor; fb = f(b); --count; ; } } else { while((boost::math::sign)(fb) == (boost::math::sign)(fa)) { if(fabs(a) < tools::min_value()) { max_iter -= count; max_iter += 1; return a > 0 ? std::make_pair(T(0), T(a)) : std::make_pair(T(a), T(0)); } if(count == 0) policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, pol); if((max_iter - count) % 20 == 0) factor *= 2; b = a; fb = fa; a /= factor; fa = f(a); --count; ; } } max_iter -= count; max_iter += 1; std::pair r = toms748_solve( f, (a < 0 ? b : a), (a < 0 ? a : b), (a < 0 ? fb : fa), (a < 0 ? fa : fb), tol, count, pol); max_iter += count; ; return r; } template inline std::pair bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::uintmax_t& max_iter) { return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policies::policy<>()); } } } } # 33 "/localhome/glisse2/include/boost/math/tools/roots.hpp" 2 namespace boost{ namespace math{ namespace tools{ namespace detail{ template inline void unpack_0(const Tuple& t, T& val) { val = boost::math::get<0>(t); } template void handle_zero_derivative(F f, T& last_f0, const T& f0, T& delta, T& result, T& guess, const T& min, const T& max) { if(last_f0 == 0) { if(result == min) { guess = max; } else { guess = min; } unpack_0(f(guess), last_f0); delta = guess - result; } if(sign(last_f0) * sign(f0) < 0) { if(delta < 0) { delta = (result - min) / 2; } else { delta = (result - max) / 2; } } else { if(delta < 0) { delta = (result - max) / 2; } else { delta = (result - min) / 2; } } } } template std::pair bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) { T fmin = f(min); T fmax = f(max); if(fmin == 0) return std::make_pair(min, min); if(fmax == 0) return std::make_pair(max, max); static const char* function = "boost::math::tools::bisect<%1%>"; if(min >= max) { policies::raise_evaluation_error(function, "Arguments in wrong order in boost::math::tools::bisect (first arg=%1%)", min, pol); } if(fmin * fmax >= 0) { policies::raise_evaluation_error(function, "No change of sign in boost::math::tools::bisect, either there is no root to find, or there are multiple roots in the interval (f(min) = %1%).", fmin, pol); } boost::uintmax_t count = max_iter; if(count < 3) count = 0; else count -= 3; while(count && (0 == tol(min, max))) { T mid = (min + max) / 2; T fmid = f(mid); if((mid == max) || (mid == min)) break; if(fmid == 0) { min = max = mid; break; } else if(sign(fmid) * sign(fmin) < 0) { max = mid; fmax = fmid; } else { min = mid; fmin = fmid; } --count; } max_iter -= count; # 167 "/localhome/glisse2/include/boost/math/tools/roots.hpp" return std::make_pair(min, max); } template inline std::pair bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter) { return bisect(f, min, max, tol, max_iter, policies::policy<>()); } template inline std::pair bisect(F f, T min, T max, Tol tol) { boost::uintmax_t m = (std::numeric_limits::max)(); return bisect(f, min, max, tol, m, policies::policy<>()); } template T newton_raphson_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T f0(0), f1, last_f0(0); T result = guess; T factor = static_cast(ldexp(1.0, 1 - digits)); T delta = 1; T delta1 = tools::max_value(); T delta2 = tools::max_value(); boost::uintmax_t count(max_iter); do{ last_f0 = f0; delta2 = delta1; delta1 = delta; boost::math::tie(f0, f1) = f(result); if(0 == f0) break; if(f1 == 0) { detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max); } else { delta = f0 / f1; } if(fabs(delta * 2) > fabs(delta2)) { delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2; } guess = result; result -= delta; if(result <= min) { delta = 0.5F * (guess - min); result = guess - delta; if((result == min) || (result == max)) break; } else if(result >= max) { delta = 0.5F * (guess - max); result = guess - delta; if((result == min) || (result == max)) break; } if(delta > 0) max = guess; else min = guess; }while(--count && (fabs(result * factor) < fabs(delta))); max_iter -= count; # 261 "/localhome/glisse2/include/boost/math/tools/roots.hpp" return result; } template inline T newton_raphson_iterate(F f, T guess, T min, T max, int digits) { boost::uintmax_t m = (std::numeric_limits::max)(); return newton_raphson_iterate(f, guess, min, max, digits, m); } template T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T f0(0), f1, f2; T result = guess; T factor = static_cast(ldexp(1.0, 1 - digits)); T delta = (std::max)(T(10000000 * guess), T(10000000)); T last_f0 = 0; T delta1 = delta; T delta2 = delta; bool out_of_bounds_sentry = false; boost::uintmax_t count(max_iter); do{ last_f0 = f0; delta2 = delta1; delta1 = delta; boost::math::tie(f0, f1, f2) = f(result); ; ; ; if(0 == f0) break; if((f1 == 0) && (f2 == 0)) { detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max); } else { if(f2 != 0) { T denom = 2 * f0; T num = 2 * f1 - f0 * (f2 / f1); ; ; if((fabs(num) < 1) && (fabs(denom) >= fabs(num) * tools::max_value())) { delta = f0 / f1; } else delta = denom / num; if(delta * f1 / f0 < 0) { delta = f0 / f1; } } else delta = f0 / f1; } T convergence = fabs(delta / delta2); if((convergence > 0.8) && (convergence < 2)) { delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2; if(fabs(delta) > result) delta = sign(delta) * result; delta2 = delta * 3; ; } guess = result; result -= delta; ; if(result < min) { T diff = ((fabs(min) < 1) && (fabs(result) > 1) && (tools::max_value() / fabs(result) < fabs(min))) ? T(1000) : T(result / min); if(fabs(diff) < 1) diff = 1 / diff; if(!out_of_bounds_sentry && (diff > 0) && (diff < 3)) { delta = 0.99f * (guess - min); result = guess - delta; out_of_bounds_sentry = true; } else { delta = (guess - min) / 2; result = guess - delta; if((result == min) || (result == max)) break; } } else if(result > max) { T diff = ((fabs(max) < 1) && (fabs(result) > 1) && (tools::max_value() / fabs(result) < fabs(max))) ? T(1000) : T(result / max); if(fabs(diff) < 1) diff = 1 / diff; if(!out_of_bounds_sentry && (diff > 0) && (diff < 3)) { delta = 0.99f * (guess - max); result = guess - delta; out_of_bounds_sentry = true; } else { delta = (guess - max) / 2; result = guess - delta; if((result == min) || (result == max)) break; } } if(delta > 0) max = guess; else min = guess; }while(--count && (fabs(result * factor) < fabs(delta))); max_iter -= count; return result; } template inline T halley_iterate(F f, T guess, T min, T max, int digits) { boost::uintmax_t m = (std::numeric_limits::max)(); return halley_iterate(f, guess, min, max, digits, m); } template T schroeder_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T f0(0), f1, f2, last_f0(0); T result = guess; T factor = static_cast(ldexp(1.0, 1 - digits)); T delta = 0; T delta1 = tools::max_value(); T delta2 = tools::max_value(); boost::uintmax_t count(max_iter); do{ last_f0 = f0; delta2 = delta1; delta1 = delta; boost::math::tie(f0, f1, f2) = f(result); if(0 == f0) break; if((f1 == 0) && (f2 == 0)) { detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max); } else { T ratio = f0 / f1; if(ratio / result < 0.1) { delta = ratio + (f2 / (2 * f1)) * ratio * ratio; if(delta * ratio < 0) delta = ratio; } else delta = ratio; } if(fabs(delta * 2) > fabs(delta2)) { delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2; } guess = result; result -= delta; if(result <= min) { delta = 0.5F * (guess - min); result = guess - delta; if((result == min) || (result == max)) break; } else if(result >= max) { delta = 0.5F * (guess - max); result = guess - delta; if((result == min) || (result == max)) break; } if(delta > 0) max = guess; else min = guess; }while(--count && (fabs(result * factor) < fabs(delta))); max_iter -= count; # 515 "/localhome/glisse2/include/boost/math/tools/roots.hpp" return result; } template inline T schroeder_iterate(F f, T guess, T min, T max, int digits) { boost::uintmax_t m = (std::numeric_limits::max)(); return schroeder_iterate(f, guess, min, max, digits, m); } } } } # 17 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" 2 namespace boost{ namespace math{ namespace detail{ template T find_inverse_s(T p, T q) { # 34 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T t; if(p < 0.5) { t = sqrt(-2 * log(p)); } else { t = sqrt(-2 * log(q)); } static const double a[4] = { 3.31125922108741, 11.6616720288968, 4.28342155967104, 0.213623493715853 }; static const double b[5] = { 1, 6.61053765625462, 6.40691597760039, 1.27364489782223, 0.3611708101884203e-1 }; T s = t - tools::evaluate_polynomial(a, t) / tools::evaluate_polynomial(b, t); if(p < 0.5) s = -s; return s; } template T didonato_SN(T a, T x, unsigned N, T tolerance = 0) { # 63 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" T sum = 1; if(N >= 1) { T partial = x / (a + 1); sum += partial; for(unsigned i = 2; i <= N; ++i) { partial *= x / (a + i); sum += partial; if(partial < tolerance) break; } } return sum; } template inline T didonato_FN(T p, T a, T x, unsigned N, T tolerance, const Policy& pol) { # 90 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T u = log(p) + boost::math::lgamma(a + 1, pol); return exp((u + x - log(didonato_SN(a, x, N, tolerance))) / a); } template T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits) { # 107 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; *p_has_10_digits = false; if(a == 1) { result = -log(q); ; } else if(a < 1) { T g = boost::math::tgamma(a, pol); T b = q * g; ; ; if((b > 0.6) || ((b >= 0.45) && (a >= 0.3))) { T u; if((b * q > 1e-8) && (q > 1e-5)) { u = pow(p * g * a, 1 / a); ; } else { u = exp((-q / a) - constants::euler()); ; } result = u / (1 - (u / (a + 1))); ; } else if((a < 0.3) && (b >= 0.35)) { T t = exp(-constants::euler() - b); T u = t * exp(t); result = t * exp(u); ; } else if((b > 0.15) || (a >= 0.3)) { T y = -log(b); T u = y - (1 - a) * log(y); result = y - (1 - a) * log(u) - log(1 + (1 - a) / (1 + u)); ; } else if (b > 0.1) { T y = -log(b); T u = y - (1 - a) * log(y); result = y - (1 - a) * log(u) - log((u * u + 2 * (3 - a) * u + (2 - a) * (3 - a)) / (u * u + (5 - a) * u + 2)); ; } else { T y = -log(b); T c1 = (a - 1) * log(y); T c1_2 = c1 * c1; T c1_3 = c1_2 * c1; T c1_4 = c1_2 * c1_2; T a_2 = a * a; T a_3 = a_2 * a; T c2 = (a - 1) * (1 + c1); T c3 = (a - 1) * (-(c1_2 / 2) + (a - 2) * c1 + (3 * a - 5) / 2); T c4 = (a - 1) * ((c1_3 / 3) - (3 * a - 5) * c1_2 / 2 + (a_2 - 6 * a + 7) * c1 + (11 * a_2 - 46 * a + 47) / 6); T c5 = (a - 1) * (-(c1_4 / 4) + (11 * a - 17) * c1_3 / 6 + (-3 * a_2 + 13 * a -13) * c1_2 + (2 * a_3 - 25 * a_2 + 72 * a - 61) * c1 / 2 + (25 * a_3 - 195 * a_2 + 477 * a - 379) / 12); T y_2 = y * y; T y_3 = y_2 * y; T y_4 = y_2 * y_2; result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); ; if(b < 1e-28f) *p_has_10_digits = true; } } else { T s = find_inverse_s(p, q); ; T s_2 = s * s; T s_3 = s_2 * s; T s_4 = s_2 * s_2; T s_5 = s_4 * s; T ra = sqrt(a); ; T w = a + s * ra + (s * s -1) / 3; w += (s_3 - 7 * s) / (36 * ra); w -= (3 * s_4 + 7 * s_2 - 16) / (810 * a); w += (9 * s_5 + 256 * s_3 - 433 * s) / (38880 * a * ra); ; if((a >= 500) && (fabs(1 - w / a) < 1e-6)) { result = w; *p_has_10_digits = true; ; } else if (p > 0.5) { if(w < 3 * a) { result = w; ; } else { T D = (std::max)(T(2), T(a * (a - 1))); T lg = boost::math::lgamma(a, pol); T lb = log(q) + lg; if(lb < -D * 2.3) { T y = -lb; T c1 = (a - 1) * log(y); T c1_2 = c1 * c1; T c1_3 = c1_2 * c1; T c1_4 = c1_2 * c1_2; T a_2 = a * a; T a_3 = a_2 * a; T c2 = (a - 1) * (1 + c1); T c3 = (a - 1) * (-(c1_2 / 2) + (a - 2) * c1 + (3 * a - 5) / 2); T c4 = (a - 1) * ((c1_3 / 3) - (3 * a - 5) * c1_2 / 2 + (a_2 - 6 * a + 7) * c1 + (11 * a_2 - 46 * a + 47) / 6); T c5 = (a - 1) * (-(c1_4 / 4) + (11 * a - 17) * c1_3 / 6 + (-3 * a_2 + 13 * a -13) * c1_2 + (2 * a_3 - 25 * a_2 + 72 * a - 61) * c1 / 2 + (25 * a_3 - 195 * a_2 + 477 * a - 379) / 12); T y_2 = y * y; T y_3 = y_2 * y; T y_4 = y_2 * y_2; result = y + c1 + (c2 / y) + (c3 / y_2) + (c4 / y_3) + (c5 / y_4); ; } else { T u = -lb + (a - 1) * log(w) - log(1 + (1 - a) / (1 + w)); result = -lb + (a - 1) * log(u) - log(1 + (1 - a) / (1 + u)); ; } } } else { T z = w; T ap1 = a + 1; T ap2 = a + 2; if(w < 0.15f * ap1) { T v = log(p) + boost::math::lgamma(ap1, pol); T s = 1; z = exp((v + w) / a); s = boost::math::log1p(z / ap1 * (1 + z / ap2)); z = exp((v + z - s) / a); s = boost::math::log1p(z / ap1 * (1 + z / ap2)); z = exp((v + z - s) / a); s = boost::math::log1p(z / ap1 * (1 + z / ap2 * (1 + z / (a + 3)))); z = exp((v + z - s) / a); ; } if((z <= 0.01 * ap1) || (z > 0.7 * ap1)) { result = z; if(z <= 0.002 * ap1) *p_has_10_digits = true; ; } else { T ls = log(didonato_SN(a, z, 100, T(1e-4))); T v = log(p) + boost::math::lgamma(ap1, pol); z = exp((v + z - ls) / a); result = z * (1 - (a * log(z) - z - v + ls) / (a - z)); ; } } } return result; } template struct gamma_p_inverse_func { gamma_p_inverse_func(T a_, T p_, bool inv) : a(a_), p(p_), invert(inv) { # 330 "/localhome/glisse2/include/boost/math/special_functions/detail/igamma_inverse.hpp" if(p > 0.9) { p = 1 - p; invert = !invert; } } boost::math::tuple operator()(const T& x)const { boost::math::detail::fpu_guard local_guard_object; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T f, f1; value_type ft; f = static_cast(boost::math::detail::gamma_incomplete_imp( static_cast(a), static_cast(x), true, invert, forwarding_policy(), &ft)); f1 = static_cast(ft); T f2; T div = (a - x - 1) / x; f2 = f1; if((fabs(div) > 1) && (tools::max_value() / fabs(div) < f2)) { f2 = -tools::max_value() / 2; } else { f2 *= div; } if(invert) { f1 = -f1; f2 = -f2; } return boost::math::make_tuple(f - p, f1, f2); } private: T a, p; bool invert; }; template T gamma_p_inv_imp(T a, T p, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::gamma_p_inv<%1%>(%1%, %1%)"; ; ; if(a <= 0) policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); if((p < 0) || (p > 1)) policies::raise_domain_error(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got p=%1%).", p, pol); if(p == 1) return tools::max_value(); if(p == 0) return 0; bool has_10_digits; T guess = detail::find_inverse_gamma(a, p, 1 - p, pol, &has_10_digits); if((policies::digits() <= 36) && has_10_digits) return guess; T lower = tools::min_value(); if(guess <= lower) guess = tools::min_value(); ; unsigned digits = policies::digits(); if(digits < 30) { digits *= 2; digits /= 3; } else { digits /= 2; digits -= 1; } if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon()))) digits = policies::digits() - 2; boost::uintmax_t max_iter = policies::get_max_root_iterations(); guess = tools::halley_iterate( detail::gamma_p_inverse_func(a, p, false), guess, lower, tools::max_value(), digits, max_iter); policies::check_root_iterations(function, max_iter, pol); ; if(guess == lower) guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); return guess; } template T gamma_q_inv_imp(T a, T q, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::gamma_q_inv<%1%>(%1%, %1%)"; if(a <= 0) policies::raise_domain_error(function, "Argument a in the incomplete gamma function inverse must be >= 0 (got a=%1%).", a, pol); if((q < 0) || (q > 1)) policies::raise_domain_error(function, "Probabilty must be in the range [0,1] in the incomplete gamma function inverse (got q=%1%).", q, pol); if(q == 0) return tools::max_value(); if(q == 1) return 0; bool has_10_digits; T guess = detail::find_inverse_gamma(a, 1 - q, q, pol, &has_10_digits); if((policies::digits() <= 36) && has_10_digits) return guess; T lower = tools::min_value(); if(guess <= lower) guess = tools::min_value(); unsigned digits = policies::digits(); if(digits < 30) { digits *= 2; digits /= 3; } else { digits /= 2; digits -= 1; } if((a < 0.125) && (fabs(gamma_p_derivative(a, guess, pol)) > 1 / sqrt(tools::epsilon()))) digits = policies::digits(); boost::uintmax_t max_iter = policies::get_max_root_iterations(); guess = tools::halley_iterate( detail::gamma_p_inverse_func(a, q, true), guess, lower, tools::max_value(), digits, max_iter); policies::check_root_iterations(function, max_iter, pol); if(guess == lower) guess = policies::raise_underflow_error(function, "Expected result known to be non-zero, but is smaller than the smallest available number.", pol); return guess; } } template inline typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; return detail::gamma_p_inv_imp( static_cast(a), static_cast(p), pol); } template inline typename tools::promote_args::type gamma_q_inv(T1 a, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; return detail::gamma_q_inv_imp( static_cast(a), static_cast(p), pol); } template inline typename tools::promote_args::type gamma_p_inv(T1 a, T2 p) { return gamma_p_inv(a, p, policies::policy<>()); } template inline typename tools::promote_args::type gamma_q_inv(T1 a, T2 p) { return gamma_q_inv(a, p, policies::policy<>()); } } } # 1544 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/gamma_inva.hpp" 1 # 21 "/localhome/glisse2/include/boost/math/special_functions/detail/gamma_inva.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 22 "/localhome/glisse2/include/boost/math/special_functions/detail/gamma_inva.hpp" 2 namespace boost{ namespace math{ namespace detail{ template struct gamma_inva_t { gamma_inva_t(T z_, T p_, bool invert_) : z(z_), p(p_), invert(invert_) {} T operator()(T a) { return invert ? p - boost::math::gamma_q(a, z, Policy()) : boost::math::gamma_p(a, z, Policy()) - p; } private: T z, p; bool invert; }; template T inverse_poisson_cornish_fisher(T lambda, T p, T q, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T m = lambda; T sigma = sqrt(lambda); T sk = 1 / sigma; T x = boost::math::erfc_inv(p > q ? 2 * q : 2 * p, pol) * constants::root_two(); if(p < 0.5) x = -x; T x2 = x * x; T w = x + sk * (x2 - 1) / 6; w = m + sigma * w; return w > tools::min_value() ? w : tools::min_value(); } template T gamma_inva_imp(const T& z, const T& p, const T& q, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(p == 0) { return tools::max_value(); } if(q == 0) { return tools::min_value(); } gamma_inva_t f(z, (p < q) ? p : q, (p < q) ? false : true); tools::eps_tolerance tol(policies::digits()); T guess; T factor = 8; if(z >= 1) { # 112 "/localhome/glisse2/include/boost/math/special_functions/detail/gamma_inva.hpp" guess = 1 + inverse_poisson_cornish_fisher(z, q, p, pol); if(z > 5) { if(z > 1000) factor = 1.01f; else if(z > 50) factor = 1.1f; else if(guess > 10) factor = 1.25f; else factor = 2; if(guess < 1.1) factor = 8; } } else if(z > 0.5) { guess = z * 1.2f; } else { guess = -0.4f / log(z); } boost::uintmax_t max_iter = policies::get_max_root_iterations(); std::pair r = bracket_and_solve_root(f, guess, factor, false, tol, max_iter, pol); if(max_iter >= policies::get_max_root_iterations()) policies::raise_evaluation_error("boost::math::gamma_p_inva<%1%>(%1%, %1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol); return (r.first + r.second) / 2; } } template inline typename tools::promote_args::type gamma_p_inva(T1 x, T2 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(p == 0) { return tools::max_value(); } if(p == 1) { return tools::min_value(); } return policies::checked_narrowing_cast( detail::gamma_inva_imp( static_cast(x), static_cast(p), static_cast(1 - static_cast(p)), pol), "boost::math::gamma_p_inva<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type gamma_q_inva(T1 x, T2 q, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(q == 1) { return tools::max_value(); } if(q == 0) { return tools::min_value(); } return policies::checked_narrowing_cast( detail::gamma_inva_imp( static_cast(x), static_cast(1 - static_cast(q)), static_cast(q), pol), "boost::math::gamma_q_inva<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type gamma_p_inva(T1 x, T2 p) { return boost::math::gamma_p_inva(x, p, policies::policy<>()); } template inline typename tools::promote_args::type gamma_q_inva(T1 x, T2 q) { return boost::math::gamma_q_inva(x, q, policies::policy<>()); } } } # 1545 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/erf.hpp" 1 # 19 "/localhome/glisse2/include/boost/math/special_functions/erf.hpp" namespace boost{ namespace math{ namespace detail { template struct erf_asympt_series_t { erf_asympt_series_t(T z) : xx(2 * -z * z), tk(1) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; result = -exp(-z * z) / sqrt(boost::math::constants::pi()); result /= z; } typedef T result_type; T operator()() { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = result; result *= tk / xx; tk += 2; if( fabs(r) < fabs(result)) result = 0; return r; } private: T result; T xx; int tk; }; template inline float erf_asymptotic_limit_N(const T&) { return (std::numeric_limits::max)(); } inline float erf_asymptotic_limit_N(const mpl::int_<24>&) { return 2.8F; } inline float erf_asymptotic_limit_N(const mpl::int_<53>&) { return 4.3F; } inline float erf_asymptotic_limit_N(const mpl::int_<64>&) { return 4.8F; } inline float erf_asymptotic_limit_N(const mpl::int_<106>&) { return 6.5F; } inline float erf_asymptotic_limit_N(const mpl::int_<113>&) { return 6.8F; } template inline T erf_asymptotic_limit() { typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::less_equal >, typename mpl::if_< mpl::less_equal >, mpl::int_<0>, mpl::int_<24> >::type, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, typename mpl::if_< mpl::less_equal >, mpl::int_<106>, typename mpl::if_< mpl::less_equal >, mpl::int_<113>, mpl::int_<0> >::type >::type >::type >::type >::type tag_type; return erf_asymptotic_limit_N(tag_type()); } template T erf_imp(T z, bool invert, const Policy& pol, const Tag& t) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ; if(z < 0) { if(!invert) return -erf_imp(T(-z), invert, pol, t); else return 1 + erf_imp(T(-z), false, pol, t); } T result; if(!invert && (z > detail::erf_asymptotic_limit())) { detail::erf_asympt_series_t s(z); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, policies::get_epsilon(), max_iter, 1); policies::check_series_iterations("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol); } else { T x = z * z; if(x < 0.6) { result = z * exp(-x); result /= sqrt(boost::math::constants::pi()); if(result != 0) result *= 2 * detail::lower_gamma_series(T(0.5f), x, pol); } else if(x < 1.1f) { invert = !invert; result = tgamma_small_upper_part(T(0.5f), x, pol); result /= sqrt(boost::math::constants::pi()); } else { invert = !invert; result = z * exp(-x); result /= sqrt(boost::math::constants::pi()); result *= upper_gamma_fraction(T(0.5f), x, policies::get_epsilon()); } } if(invert) result = 1 - result; return result; } template T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<53>& t) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ; if(z < 0) { if(!invert) return -erf_imp(-z, invert, pol, t); else if(z < -0.5) return 2 - erf_imp(-z, invert, pol, t); else return 1 + erf_imp(-z, false, pol, t); } T result; if(z < 0.5) { if(z < 1e-10) { if(z == 0) { result = T(0); } else { result = static_cast(z * 1.125f + z * 0.003379167095512573896158903121545171688L); } } else { static const T Y = 1.044948577880859375f; static const T P[] = { 0.0834305892146531832907L, -0.338165134459360935041L, -0.0509990735146777432841L, -0.00772758345802133288487L, -0.000322780120964605683831L, }; static const T Q[] = { 1L, 0.455004033050794024546L, 0.0875222600142252549554L, 0.00858571925074406212772L, 0.000370900071787748000569L, }; T zz = z * z; result = z * (Y + tools::evaluate_polynomial(P, zz) / tools::evaluate_polynomial(Q, zz)); } } else if(invert ? (z < 28) : (z < 5.8f)) { invert = !invert; if(z < 1.5f) { static const T Y = 0.405935764312744140625f; static const T P[] = { -0.098090592216281240205L, 0.178114665841120341155L, 0.191003695796775433986L, 0.0888900368967884466578L, 0.0195049001251218801359L, 0.00180424538297014223957L, }; static const T Q[] = { 1L, 1.84759070983002217845L, 1.42628004845511324508L, 0.578052804889902404909L, 0.12385097467900864233L, 0.0113385233577001411017L, 0.337511472483094676155e-5L, }; result = Y + tools::evaluate_polynomial(P, z - 0.5) / tools::evaluate_polynomial(Q, z - 0.5); result *= exp(-z * z) / z; } else if(z < 2.5f) { static const T Y = 0.50672817230224609375f; static const T P[] = { -0.0243500476207698441272L, 0.0386540375035707201728L, 0.04394818964209516296L, 0.0175679436311802092299L, 0.00323962406290842133584L, 0.000235839115596880717416L, }; static const T Q[] = { 1L, 1.53991494948552447182L, 0.982403709157920235114L, 0.325732924782444448493L, 0.0563921837420478160373L, 0.00410369723978904575884L, }; result = Y + tools::evaluate_polynomial(P, z - 1.5) / tools::evaluate_polynomial(Q, z - 1.5); result *= exp(-z * z) / z; } else if(z < 4.5f) { static const T Y = 0.5405750274658203125f; static const T P[] = { 0.00295276716530971662634L, 0.0137384425896355332126L, 0.00840807615555585383007L, 0.00212825620914618649141L, 0.000250269961544794627958L, 0.113212406648847561139e-4L, }; static const T Q[] = { 1L, 1.04217814166938418171L, 0.442597659481563127003L, 0.0958492726301061423444L, 0.0105982906484876531489L, 0.000479411269521714493907L, }; result = Y + tools::evaluate_polynomial(P, z - 3.5) / tools::evaluate_polynomial(Q, z - 3.5); result *= exp(-z * z) / z; } else { static const T Y = 0.5579090118408203125f; static const T P[] = { 0.00628057170626964891937L, 0.0175389834052493308818L, -0.212652252872804219852L, -0.687717681153649930619L, -2.5518551727311523996L, -3.22729451764143718517L, -2.8175401114513378771L, }; static const T Q[] = { 1L, 2.79257750980575282228L, 11.0567237927800161565L, 15.930646027911794143L, 22.9367376522880577224L, 13.5064170191802889145L, 5.48409182238641741584L, }; result = Y + tools::evaluate_polynomial(P, 1 / z) / tools::evaluate_polynomial(Q, 1 / z); result *= exp(-z * z) / z; } } else { result = 0; invert = !invert; } if(invert) { result = 1 - result; } return result; } template T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<64>& t) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ; if(z < 0) { if(!invert) return -erf_imp(-z, invert, pol, t); else if(z < -0.5) return 2 - erf_imp(-z, invert, pol, t); else return 1 + erf_imp(-z, false, pol, t); } T result; if(z < 0.5) { if(z == 0) { result = 0; } else if(z < 1e-10) { result = z * 1.125 + z * 0.003379167095512573896158903121545171688L; } else { static const T Y = 1.044948577880859375f; static const T P[] = { 0.0834305892146531988966L, -0.338097283075565413695L, -0.0509602734406067204596L, -0.00904906346158537794396L, -0.000489468651464798669181L, -0.200305626366151877759e-4L, }; static const T Q[] = { 1L, 0.455817300515875172439L, 0.0916537354356241792007L, 0.0102722652675910031202L, 0.000650511752687851548735L, 0.189532519105655496778e-4L, }; result = z * (Y + tools::evaluate_polynomial(P, z * z) / tools::evaluate_polynomial(Q, z * z)); } } else if(invert ? (z < 110) : (z < 6.4f)) { invert = !invert; if(z < 1.5) { static const T Y = 0.405935764312744140625f; static const T P[] = { -0.0980905922162812031672L, 0.159989089922969141329L, 0.222359821619935712378L, 0.127303921703577362312L, 0.0384057530342762400273L, 0.00628431160851156719325L, 0.000441266654514391746428L, 0.266689068336295642561e-7L, }; static const T Q[] = { 1L, 2.03237474985469469291L, 1.78355454954969405222L, 0.867940326293760578231L, 0.248025606990021698392L, 0.0396649631833002269861L, 0.00279220237309449026796L, }; result = Y + tools::evaluate_polynomial(P, z - 0.5f) / tools::evaluate_polynomial(Q, z - 0.5f); result *= exp(-z * z) / z; } else if(z < 2.5) { static const T Y = 0.50672817230224609375f; static const T P[] = { -0.024350047620769840217L, 0.0343522687935671451309L, 0.0505420824305544949541L, 0.0257479325917757388209L, 0.00669349844190354356118L, 0.00090807914416099524444L, 0.515917266698050027934e-4L, }; static const T Q[] = { 1L, 1.71657861671930336344L, 1.26409634824280366218L, 0.512371437838969015941L, 0.120902623051120950935L, 0.0158027197831887485261L, 0.000897871370778031611439L, }; result = Y + tools::evaluate_polynomial(P, z - 1.5f) / tools::evaluate_polynomial(Q, z - 1.5f); result *= exp(-z * z) / z; } else if(z < 4.5) { static const T Y = 0.5405750274658203125f; static const T P[] = { 0.0029527671653097284033L, 0.0141853245895495604051L, 0.0104959584626432293901L, 0.00343963795976100077626L, 0.00059065441194877637899L, 0.523435380636174008685e-4L, 0.189896043050331257262e-5L, }; static const T Q[] = { 1L, 1.19352160185285642574L, 0.603256964363454392857L, 0.165411142458540585835L, 0.0259729870946203166468L, 0.00221657568292893699158L, 0.804149464190309799804e-4L, }; result = Y + tools::evaluate_polynomial(P, z - 3.5f) / tools::evaluate_polynomial(Q, z - 3.5f); result *= exp(-z * z) / z; } else { static const T Y = 0.55825519561767578125f; static const T P[] = { 0.00593438793008050214106L, 0.0280666231009089713937L, -0.141597835204583050043L, -0.978088201154300548842L, -5.47351527796012049443L, -13.8677304660245326627L, -27.1274948720539821722L, -29.2545152747009461519L, -16.8865774499799676937L, }; static const T Q[] = { 1L, 4.72948911186645394541L, 23.6750543147695749212L, 60.0021517335693186785L, 131.766251645149522868L, 178.167924971283482513L, 182.499390505915222699L, 104.365251479578577989L, 30.8365511891224291717L, }; result = Y + tools::evaluate_polynomial(P, 1 / z) / tools::evaluate_polynomial(Q, 1 / z); result *= exp(-z * z) / z; } } else { result = 0; invert = !invert; } if(invert) { result = 1 - result; } return result; } template T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<113>& t) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ; if(z < 0) { if(!invert) return -erf_imp(-z, invert, pol, t); else if(z < -0.5) return 2 - erf_imp(-z, invert, pol, t); else return 1 + erf_imp(-z, false, pol, t); } T result; if(z < 0.5) { if(z == 0) { result = 0; } else if(z < 1e-20) { result = z * 1.125 + z * 0.003379167095512573896158903121545171688L; } else { static const T Y = 1.0841522216796875f; static const T P[] = { 0.0442269454158250738961589031215451778L, -0.35549265736002144875335323556961233L, -0.0582179564566667896225454670863270393L, -0.0112694696904802304229950538453123925L, -0.000805730648981801146251825329609079099L, -0.566304966591936566229702842075966273e-4L, -0.169655010425186987820201021510002265e-5L, -0.344448249920445916714548295433198544e-7L, }; static const T Q[] = { 1L, 0.466542092785657604666906909196052522L, 0.100005087012526447295176964142107611L, 0.0128341535890117646540050072234142603L, 0.00107150448466867929159660677016658186L, 0.586168368028999183607733369248338474e-4L, 0.196230608502104324965623171516808796e-5L, 0.313388521582925207734229967907890146e-7L, }; result = z * (Y + tools::evaluate_polynomial(P, z * z) / tools::evaluate_polynomial(Q, z * z)); } } else if(invert ? (z < 110) : (z < 8.65f)) { invert = !invert; if(z < 1) { static const T Y = 0.371877193450927734375f; static const T P[] = { -0.0640320213544647969396032886581290455L, 0.200769874440155895637857443946706731L, 0.378447199873537170666487408805779826L, 0.30521399466465939450398642044975127L, 0.146890026406815277906781824723458196L, 0.0464837937749539978247589252732769567L, 0.00987895759019540115099100165904822903L, 0.00137507575429025512038051025154301132L, 0.0001144764551085935580772512359680516L, 0.436544865032836914773944382339900079e-5L, }; static const T Q[] = { 1L, 2.47651182872457465043733800302427977L, 2.78706486002517996428836400245547955L, 1.87295924621659627926365005293130693L, 0.829375825174365625428280908787261065L, 0.251334771307848291593780143950311514L, 0.0522110268876176186719436765734722473L, 0.00718332151250963182233267040106902368L, 0.000595279058621482041084986219276392459L, 0.226988669466501655990637599399326874e-4L, 0.270666232259029102353426738909226413e-10L, }; result = Y + tools::evaluate_polynomial(P, z - 0.5f) / tools::evaluate_polynomial(Q, z - 0.5f); result *= exp(-z * z) / z; } else if(z < 1.5) { static const T Y = 0.45658016204833984375f; static const T P[] = { -0.0289965858925328393392496555094848345L, 0.0868181194868601184627743162571779226L, 0.169373435121178901746317404936356745L, 0.13350446515949251201104889028133486L, 0.0617447837290183627136837688446313313L, 0.0185618495228251406703152962489700468L, 0.00371949406491883508764162050169531013L, 0.000485121708792921297742105775823900772L, 0.376494706741453489892108068231400061e-4L, 0.133166058052466262415271732172490045e-5L, }; static const T Q[] = { 1L, 2.32970330146503867261275580968135126L, 2.46325715420422771961250513514928746L, 1.55307882560757679068505047390857842L, 0.644274289865972449441174485441409076L, 0.182609091063258208068606847453955649L, 0.0354171651271241474946129665801606795L, 0.00454060370165285246451879969534083997L, 0.000349871943711566546821198612518656486L, 0.123749319840299552925421880481085392e-4L, }; result = Y + tools::evaluate_polynomial(P, z - 1.0f) / tools::evaluate_polynomial(Q, z - 1.0f); result *= exp(-z * z) / z; } else if(z < 2.25) { static const T Y = 0.50250148773193359375f; static const T P[] = { -0.0201233630504573402185161184151016606L, 0.0331864357574860196516686996302305002L, 0.0716562720864787193337475444413405461L, 0.0545835322082103985114927569724880658L, 0.0236692635189696678976549720784989593L, 0.00656970902163248872837262539337601845L, 0.00120282643299089441390490459256235021L, 0.000142123229065182650020762792081622986L, 0.991531438367015135346716277792989347e-5L, 0.312857043762117596999398067153076051e-6L, }; static const T Q[] = { 1L, 2.13506082409097783827103424943508554L, 2.06399257267556230937723190496806215L, 1.18678481279932541314830499880691109L, 0.447733186643051752513538142316799562L, 0.11505680005657879437196953047542148L, 0.020163993632192726170219663831914034L, 0.00232708971840141388847728782209730585L, 0.000160733201627963528519726484608224112L, 0.507158721790721802724402992033269266e-5L, 0.18647774409821470950544212696270639e-12L, }; result = Y + tools::evaluate_polynomial(P, z - 1.5f) / tools::evaluate_polynomial(Q, z - 1.5f); result *= exp(-z * z) / z; } else if (z < 3) { static const T Y = 0.52896785736083984375f; static const T P[] = { -0.00902152521745813634562524098263360074L, 0.0145207142776691539346923710537580927L, 0.0301681239582193983824211995978678571L, 0.0215548540823305814379020678660434461L, 0.00864683476267958365678294164340749949L, 0.00219693096885585491739823283511049902L, 0.000364961639163319762492184502159894371L, 0.388174251026723752769264051548703059e-4L, 0.241918026931789436000532513553594321e-5L, 0.676586625472423508158937481943649258e-7L, }; static const T Q[] = { 1L, 1.93669171363907292305550231764920001L, 1.69468476144051356810672506101377494L, 0.880023580986436640372794392579985511L, 0.299099106711315090710836273697708402L, 0.0690593962363545715997445583603382337L, 0.0108427016361318921960863149875360222L, 0.00111747247208044534520499324234317695L, 0.686843205749767250666787987163701209e-4L, 0.192093541425429248675532015101904262e-5L, }; result = Y + tools::evaluate_polynomial(P, z - 2.25f) / tools::evaluate_polynomial(Q, z - 2.25f); result *= exp(-z * z) / z; } else if(z < 3.5) { static const T Y = 0.54037380218505859375f; static const T P[] = { -0.0033703486408887424921155540591370375L, 0.0104948043110005245215286678898115811L, 0.0148530118504000311502310457390417795L, 0.00816693029245443090102738825536188916L, 0.00249716579989140882491939681805594585L, 0.0004655591010047353023978045800916647L, 0.531129557920045295895085236636025323e-4L, 0.343526765122727069515775194111741049e-5L, 0.971120407556888763695313774578711839e-7L, }; static const T Q[] = { 1L, 1.59911256167540354915906501335919317L, 1.136006830764025173864831382946934L, 0.468565867990030871678574840738423023L, 0.122821824954470343413956476900662236L, 0.0209670914950115943338996513330141633L, 0.00227845718243186165620199012883547257L, 0.000144243326443913171313947613547085553L, 0.407763415954267700941230249989140046e-5L, }; result = Y + tools::evaluate_polynomial(P, z - 3.0f) / tools::evaluate_polynomial(Q, z - 3.0f); result *= exp(-z * z) / z; } else if(z < 5.5) { static const T Y = 0.55000019073486328125f; static const T P[] = { 0.00118142849742309772151454518093813615L, 0.0072201822885703318172366893469382745L, 0.0078782276276860110721875733778481505L, 0.00418229166204362376187593976656261146L, 0.00134198400587769200074194304298642705L, 0.000283210387078004063264777611497435572L, 0.405687064094911866569295610914844928e-4L, 0.39348283801568113807887364414008292e-5L, 0.248798540917787001526976889284624449e-6L, 0.929502490223452372919607105387474751e-8L, 0.156161469668275442569286723236274457e-9L, }; static const T Q[] = { 1L, 1.52955245103668419479878456656709381L, 1.06263944820093830054635017117417064L, 0.441684612681607364321013134378316463L, 0.121665258426166960049773715928906382L, 0.0232134512374747691424978642874321434L, 0.00310778180686296328582860464875562636L, 0.000288361770756174705123674838640161693L, 0.177529187194133944622193191942300132e-4L, 0.655068544833064069223029299070876623e-6L, 0.11005507545746069573608988651927452e-7L, }; result = Y + tools::evaluate_polynomial(P, z - 4.5f) / tools::evaluate_polynomial(Q, z - 4.5f); result *= exp(-z * z) / z; } else if(z < 7.5) { static const T Y = 0.5574436187744140625f; static const T P[] = { 0.000293236907400849056269309713064107674L, 0.00225110719535060642692275221961480162L, 0.00190984458121502831421717207849429799L, 0.000747757733460111743833929141001680706L, 0.000170663175280949889583158597373928096L, 0.246441188958013822253071608197514058e-4L, 0.229818000860544644974205957895688106e-5L, 0.134886977703388748488480980637704864e-6L, 0.454764611880548962757125070106650958e-8L, 0.673002744115866600294723141176820155e-10L, }; static const T Q[] = { 1L, 1.12843690320861239631195353379313367L, 0.569900657061622955362493442186537259L, 0.169094404206844928112348730277514273L, 0.0324887449084220415058158657252147063L, 0.00419252877436825753042680842608219552L, 0.00036344133176118603523976748563178578L, 0.204123895931375107397698245752850347e-4L, 0.674128352521481412232785122943508729e-6L, 0.997637501418963696542159244436245077e-8L, }; result = Y + tools::evaluate_polynomial(P, z - 6.5f) / tools::evaluate_polynomial(Q, z - 6.5f); result *= exp(-z * z) / z; } else if(z < 11.5) { static const T Y = 0.56083202362060546875f; static const T P[] = { 0.000282420728751494363613829834891390121L, 0.00175387065018002823433704079355125161L, 0.0021344978564889819420775336322920375L, 0.00124151356560137532655039683963075661L, 0.000423600733566948018555157026862139644L, 0.914030340865175237133613697319509698e-4L, 0.126999927156823363353809747017945494e-4L, 0.110610959842869849776179749369376402e-5L, 0.55075079477173482096725348704634529e-7L, 0.119735694018906705225870691331543806e-8L, }; static const T Q[] = { 1L, 1.69889613396167354566098060039549882L, 1.28824647372749624464956031163282674L, 0.572297795434934493541628008224078717L, 0.164157697425571712377043857240773164L, 0.0315311145224594430281219516531649562L, 0.00405588922155632380812945849777127458L, 0.000336929033691445666232029762868642417L, 0.164033049810404773469413526427932109e-4L, 0.356615210500531410114914617294694857e-6L, }; result = Y + tools::evaluate_polynomial(P, z / 2 - 4.75f) / tools::evaluate_polynomial(Q, z / 2 - 4.75f); result *= exp(-z * z) / z; } else { static const T Y = 0.5632686614990234375f; static const T P[] = { 0.000920922048732849448079451574171836943L, 0.00321439044532288750501700028748922439L, -0.250455263029390118657884864261823431L, -0.906807635364090342031792404764598142L, -8.92233572835991735876688745989985565L, -21.7797433494422564811782116907878495L, -91.1451915251976354349734589601171659L, -144.1279109655993927069052125017673L, -313.845076581796338665519022313775589L, -273.11378811923343424081101235736475L, -271.651566205951067025696102600443452L, -60.0530577077238079968843307523245547L, }; static const T Q[] = { 1L, 3.49040448075464744191022350947892036L, 34.3563592467165971295915749548313227L, 84.4993232033879023178285731843850461L, 376.005865281206894120659401340373818L, 629.95369438888946233003926191755125L, 1568.35771983533158591604513304269098L, 1646.02452040831961063640827116581021L, 2299.96860633240298708910425594484895L, 1222.73204392037452750381340219906374L, 799.359797306084372350264298361110448L, 72.7415265778588087243442792401576737L, }; result = Y + tools::evaluate_polynomial(P, 1 / z) / tools::evaluate_polynomial(Q, 1 / z); result *= exp(-z * z) / z; } } else { result = 0; invert = !invert; } if(invert) { result = 1 - result; } return result; } } template inline typename tools::promote_args::type erf(T z, const Policy& ) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; ; ; ; typedef typename mpl::if_< mpl::less_equal >, mpl::int_<0>, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, typename mpl::if_< mpl::less_equal >, mpl::int_<113>, mpl::int_<0> >::type >::type >::type >::type tag_type; ; return policies::checked_narrowing_cast(detail::erf_imp( static_cast(z), false, forwarding_policy(), tag_type()), "boost::math::erf<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type erfc(T z, const Policy& ) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; ; ; ; typedef typename mpl::if_< mpl::less_equal >, mpl::int_<0>, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, typename mpl::if_< mpl::less_equal >, mpl::int_<113>, mpl::int_<0> >::type >::type >::type >::type tag_type; ; return policies::checked_narrowing_cast(detail::erf_imp( static_cast(z), true, forwarding_policy(), tag_type()), "boost::math::erfc<%1%>(%1%, %1%)"); } template inline typename tools::promote_args::type erf(T z) { return boost::math::erf(z, policies::policy<>()); } template inline typename tools::promote_args::type erfc(T z) { return boost::math::erfc(z, policies::policy<>()); } } } # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/erf_inv.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/erf_inv.hpp" namespace boost{ namespace math{ namespace detail{ template T erf_inv_imp(const T& p, const T& q, const Policy&, const boost::mpl::int_<64>*) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = 0; if(p <= 0.5) { # 41 "/localhome/glisse2/include/boost/math/special_functions/detail/erf_inv.hpp" static const float Y = 0.0891314744949340820313f; static const T P[] = { -0.000508781949658280665617L, -0.00836874819741736770379L, 0.0334806625409744615033L, -0.0126926147662974029034L, -0.0365637971411762664006L, 0.0219878681111168899165L, 0.00822687874676915743155L, -0.00538772965071242932965L }; static const T Q[] = { 1, -0.970005043303290640362L, -1.56574558234175846809L, 1.56221558398423026363L, 0.662328840472002992063L, -0.71228902341542847553L, -0.0527396382340099713954L, 0.0795283687341571680018L, -0.00233393759374190016776L, 0.000886216390456424707504L }; T g = p * (p + 10); T r = tools::evaluate_polynomial(P, p) / tools::evaluate_polynomial(Q, p); result = g * Y + g * r; } else if(q >= 0.25) { # 82 "/localhome/glisse2/include/boost/math/special_functions/detail/erf_inv.hpp" static const float Y = 2.249481201171875f; static const T P[] = { -0.202433508355938759655L, 0.105264680699391713268L, 8.37050328343119927838L, 17.6447298408374015486L, -18.8510648058714251895L, -44.6382324441786960818L, 17.445385985570866523L, 21.1294655448340526258L, -3.67192254707729348546L }; static const T Q[] = { 1L, 6.24264124854247537712L, 3.9713437953343869095L, -28.6608180499800029974L, -20.1432634680485188801L, 48.5609213108739935468L, 10.8268667355460159008L, -22.6436933413139721736L, 1.72114765761200282724L }; T g = sqrt(-2 * log(q)); T xs = q - 0.25; T r = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); result = g / (Y + r); } else { # 131 "/localhome/glisse2/include/boost/math/special_functions/detail/erf_inv.hpp" T x = sqrt(-log(q)); if(x < 3) { static const float Y = 0.807220458984375f; static const T P[] = { -0.131102781679951906451L, -0.163794047193317060787L, 0.117030156341995252019L, 0.387079738972604337464L, 0.337785538912035898924L, 0.142869534408157156766L, 0.0290157910005329060432L, 0.00214558995388805277169L, -0.679465575181126350155e-6L, 0.285225331782217055858e-7L, -0.681149956853776992068e-9L }; static const T Q[] = { 1, 3.46625407242567245975L, 5.38168345707006855425L, 4.77846592945843778382L, 2.59301921623620271374L, 0.848854343457902036425L, 0.152264338295331783612L, 0.01105924229346489121L }; T xs = x - 1.125; T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); result = Y * x + R * x; } else if(x < 6) { static const float Y = 0.93995571136474609375f; static const T P[] = { -0.0350353787183177984712L, -0.00222426529213447927281L, 0.0185573306514231072324L, 0.00950804701325919603619L, 0.00187123492819559223345L, 0.000157544617424960554631L, 0.460469890584317994083e-5L, -0.230404776911882601748e-9L, 0.266339227425782031962e-11L }; static const T Q[] = { 1L, 1.3653349817554063097L, 0.762059164553623404043L, 0.220091105764131249824L, 0.0341589143670947727934L, 0.00263861676657015992959L, 0.764675292302794483503e-4L }; T xs = x - 3; T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); result = Y * x + R * x; } else if(x < 18) { static const float Y = 0.98362827301025390625f; static const T P[] = { -0.0167431005076633737133L, -0.00112951438745580278863L, 0.00105628862152492910091L, 0.000209386317487588078668L, 0.149624783758342370182e-4L, 0.449696789927706453732e-6L, 0.462596163522878599135e-8L, -0.281128735628831791805e-13L, 0.99055709973310326855e-16L }; static const T Q[] = { 1L, 0.591429344886417493481L, 0.138151865749083321638L, 0.0160746087093676504695L, 0.000964011807005165528527L, 0.275335474764726041141e-4L, 0.282243172016108031869e-6L }; T xs = x - 6; T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); result = Y * x + R * x; } else if(x < 44) { static const float Y = 0.99714565277099609375f; static const T P[] = { -0.0024978212791898131227L, -0.779190719229053954292e-5L, 0.254723037413027451751e-4L, 0.162397777342510920873e-5L, 0.396341011304801168516e-7L, 0.411632831190944208473e-9L, 0.145596286718675035587e-11L, -0.116765012397184275695e-17L }; static const T Q[] = { 1L, 0.207123112214422517181L, 0.0169410838120975906478L, 0.000690538265622684595676L, 0.145007359818232637924e-4L, 0.144437756628144157666e-6L, 0.509761276599778486139e-9L }; T xs = x - 18; T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); result = Y * x + R * x; } else { static const float Y = 0.99941349029541015625f; static const T P[] = { -0.000539042911019078575891L, -0.28398759004727721098e-6L, 0.899465114892291446442e-6L, 0.229345859265920864296e-7L, 0.225561444863500149219e-9L, 0.947846627503022684216e-12L, 0.135880130108924861008e-14L, -0.348890393399948882918e-21L }; static const T Q[] = { 1L, 0.0845746234001899436914L, 0.00282092984726264681981L, 0.468292921940894236786e-4L, 0.399968812193862100054e-6L, 0.161809290887904476097e-8L, 0.231558608310259605225e-11L }; T xs = x - 44; T R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); result = Y * x + R * x; } } return result; } template struct erf_roots { boost::math::tuple operator()(const T& guess) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T derivative = sign * (2 / sqrt(constants::pi())) * exp(-(guess * guess)); T derivative2 = -2 * guess * derivative; return boost::math::make_tuple(((sign > 0) ? boost::math::erf(guess, Policy()) : boost::math::erfc(guess, Policy())) - target, derivative, derivative2); } erf_roots(T z, int s) : target(z), sign(s) {} private: T target; int sign; }; template T erf_inv_imp(const T& p, const T& q, const Policy& pol, const boost::mpl::int_<0>*) { T guess = erf_inv_imp(p, q, pol, static_cast const*>(0)); T result; if(policies::digits() > 64) { boost::uintmax_t max_iter = policies::get_max_root_iterations(); if(p <= 0.5) { result = tools::halley_iterate(detail::erf_roots::type, Policy>(p, 1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); } else { result = tools::halley_iterate(detail::erf_roots::type, Policy>(q, -1), guess, static_cast(0), tools::max_value(), (policies::digits() * 2) / 3, max_iter); } policies::check_root_iterations("boost::math::erf_inv<%1%>", max_iter, pol); } else { result = guess; } return result; } } template typename tools::promote_args::type erfc_inv(T z, const Policy& pol) { typedef typename tools::promote_args::type result_type; static const char* function = "boost::math::erfc_inv<%1%>(%1%, %1%)"; if((z < 0) || (z > 2)) policies::raise_domain_error(function, "Argument outside range [0,2] in inverse erfc function (got p=%1%).", z, pol); if(z == 0) return policies::raise_overflow_error(function, 0, pol); if(z == 2) return -policies::raise_overflow_error(function, 0, pol); result_type p, q, s; if(z > 1) { q = 2 - z; p = 1 - q; s = -1; } else { p = 1 - z; q = z; s = 1; } typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_ >, mpl::greater > >, mpl::int_<0>, mpl::int_<64> >::type tag_type; typedef typename policies::evaluation::type eval_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return s * policies::checked_narrowing_cast( detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(0)), function); } template typename tools::promote_args::type erf_inv(T z, const Policy& pol) { typedef typename tools::promote_args::type result_type; static const char* function = "boost::math::erf_inv<%1%>(%1%, %1%)"; if((z < -1) || (z > 1)) policies::raise_domain_error(function, "Argument outside range [-1, 1] in inverse erf function (got p=%1%).", z, pol); if(z == 1) return policies::raise_overflow_error(function, 0, pol); if(z == -1) return -policies::raise_overflow_error(function, 0, pol); if(z == 0) return 0; result_type p, q, s; if(z < 0) { p = -z; q = 1 - p; s = -1; } else { p = z; q = 1 - z; s = 1; } typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_ >, mpl::greater > >, mpl::int_<0>, mpl::int_<64> >::type tag_type; typedef typename policies::evaluation::type eval_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; typedef typename policies::evaluation::type eval_type; return s * policies::checked_narrowing_cast( detail::erf_inv_imp(static_cast(p), static_cast(q), forwarding_policy(), static_cast(0)), function); } template inline typename tools::promote_args::type erfc_inv(T z) { return erfc_inv(z, policies::policy<>()); } template inline typename tools::promote_args::type erf_inv(T z) { return erf_inv(z, policies::policy<>()); } } } # 1083 "/localhome/glisse2/include/boost/math/special_functions/erf.hpp" 2 # 1546 "/localhome/glisse2/include/boost/math/special_functions/gamma.hpp" 2 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/hypot.hpp" 1 # 24 "/localhome/glisse2/include/boost/math/special_functions/hypot.hpp" namespace boost{ namespace math{ namespace detail{ template T hypot_imp(T x, T y, const Policy& pol) { using std::fabs; using std::sqrt; x = fabs(x); y = fabs(y); if(std::numeric_limits::has_infinity && ((x == std::numeric_limits::infinity()) || (y == std::numeric_limits::infinity()))) return policies::raise_overflow_error("boost::math::hypot<%1%>(%1%,%1%)", 0, pol); if(y > x) (std::swap)(x, y); if(x * tools::epsilon() >= y) return x; T rat = y / x; return x * sqrt(1 + rat*rat); } } template inline typename tools::promote_args::type hypot(T1 x, T2 y) { typedef typename tools::promote_args::type result_type; return detail::hypot_imp( static_cast(x), static_cast(y), policies::policy<>()); } template inline typename tools::promote_args::type hypot(T1 x, T2 y, const Policy& pol) { typedef typename tools::promote_args::type result_type; return detail::hypot_imp( static_cast(x), static_cast(y), pol); } } } # 17 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/sin_pi.hpp" 1 # 19 "/localhome/glisse2/include/boost/math/special_functions/sin_pi.hpp" namespace boost{ namespace math{ namespace detail{ template T sin_pi_imp(T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(x < 0) return -sin_pi(-x); bool invert; if(x < 0.5) return sin(constants::pi() * x); if(x < 1) { invert = true; x = -x; } else invert = false; T rem = floor(x); if(itrunc(rem, pol) & 1) invert = !invert; rem = x - rem; if(rem > 0.5f) rem = 1 - rem; if(rem == 0.5f) return static_cast(invert ? -1 : 1); rem = sin(constants::pi() * rem); return invert ? T(-rem) : rem; } } template inline typename tools::promote_args::type sin_pi(T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; return boost::math::detail::sin_pi_imp(x, pol); } template inline typename tools::promote_args::type sin_pi(T x) { return boost::math::sin_pi(x, policies::policy<>()); } } } # 18 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/cos_pi.hpp" 1 # 19 "/localhome/glisse2/include/boost/math/special_functions/cos_pi.hpp" namespace boost{ namespace math{ namespace detail{ template T cos_pi_imp(T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; bool invert = false; if(fabs(x) < 0.5) return cos(constants::pi() * x); if(x < 1) { x = -x; } T rem = floor(x); if(itrunc(rem, pol) & 1) invert = !invert; rem = x - rem; if(rem > 0.5f) { rem = 1 - rem; invert = !invert; } if(rem == 0.5f) return 0; rem = cos(constants::pi() * rem); return invert ? T(-rem) : rem; } } template inline typename tools::promote_args::type cos_pi(T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; return boost::math::detail::cos_pi_imp(x, pol); } template inline typename tools::promote_args::type cos_pi(T x) { return boost::math::cos_pi(x, policies::policy<>()); } } } # 19 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_asym.hpp" 1 # 19 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_asym.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/factorials.hpp" 1 # 27 "/localhome/glisse2/include/boost/math/special_functions/factorials.hpp" namespace boost { namespace math { template inline T factorial(unsigned i, const Policy& pol) { static_assert(!boost::is_integral::value, "!boost::is_integral::value"); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(i <= max_factorial::value) return unchecked_factorial(i); T result = boost::math::tgamma(static_cast(i+1), pol); if(result > tools::max_value()) return result; return floor(result + 0.5f); } template inline T factorial(unsigned i) { return factorial(i, policies::policy<>()); } # 74 "/localhome/glisse2/include/boost/math/special_functions/factorials.hpp" template T double_factorial(unsigned i, const Policy& pol) { static_assert(!boost::is_integral::value, "!boost::is_integral::value"); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(i & 1) { if(i < max_factorial::value) { unsigned n = (i - 1) / 2; return ceil(unchecked_factorial(i) / (ldexp(T(1), (int)n) * unchecked_factorial(n)) - 0.5f); } T result = boost::math::tgamma(static_cast(i) / 2 + 1, pol) / sqrt(constants::pi()); if(ldexp(tools::max_value(), -static_cast(i+1) / 2) > result) return ceil(result * ldexp(T(1), static_cast(i+1) / 2) - 0.5f); } else { unsigned n = i / 2; T result = factorial(n, pol); if(ldexp(tools::max_value(), -(int)n) > result) return result * ldexp(T(1), (int)n); } return policies::raise_overflow_error("boost::math::double_factorial<%1%>(unsigned)", 0, pol); } template inline T double_factorial(unsigned i) { return double_factorial(i, policies::policy<>()); } namespace detail{ template T rising_factorial_imp(T x, int n, const Policy& pol) { static_assert(!boost::is_integral::value, "!boost::is_integral::value"); if(x < 0) { # 131 "/localhome/glisse2/include/boost/math/special_functions/factorials.hpp" bool inv = false; if(n < 0) { x += n; n = -n; inv = true; } T result = ((n&1) ? -1 : 1) * falling_factorial(-x, n, pol); if(inv) result = 1 / result; return result; } if(n == 0) return 1; return 1 / boost::math::tgamma_delta_ratio(x, static_cast(n), pol); } template inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) { static_assert(!boost::is_integral::value, "!boost::is_integral::value"); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(x == 0) return 0; if(x < 0) { return (n&1 ? -1 : 1) * rising_factorial(-x, n, pol); } if(n == 0) return 1; if(x < n-1) { T xp1 = x + 1; unsigned n2 = itrunc((T)floor(xp1), pol); if(n2 == xp1) return 0; T result = boost::math::tgamma_delta_ratio(xp1, -static_cast(n2), pol); x -= n2; result *= x; ++n2; if(n2 < n) result *= falling_factorial(x - 1, n - n2, pol); return result; } return boost::math::tgamma_delta_ratio(x + 1, -static_cast(n), pol); } } template inline typename tools::promote_args::type falling_factorial(RT x, unsigned n) { typedef typename tools::promote_args::type result_type; return detail::falling_factorial_imp( static_cast(x), n, policies::policy<>()); } template inline typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol) { typedef typename tools::promote_args::type result_type; return detail::falling_factorial_imp( static_cast(x), n, pol); } template inline typename tools::promote_args::type rising_factorial(RT x, int n) { typedef typename tools::promote_args::type result_type; return detail::rising_factorial_imp( static_cast(x), n, policies::policy<>()); } template inline typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol) { typedef typename tools::promote_args::type result_type; return detail::rising_factorial_imp( static_cast(x), n, pol); } } } # 20 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_asym.hpp" 2 namespace boost{ namespace math{ namespace detail{ template inline T asymptotic_bessel_j_large_x_P(T v, T x) { T s = 1; T mu = 4 * v * v; T ez2 = 8 * x; ez2 *= ez2; s -= (mu-1) * (mu-9) / (2 * ez2); s += (mu-1) * (mu-9) * (mu-25) * (mu - 49) / (24 * ez2 * ez2); return s; } template inline T asymptotic_bessel_j_large_x_Q(T v, T x) { T s = 0; T mu = 4 * v * v; T ez = 8*x; s += (mu-1) / ez; s -= (mu-1) * (mu-9) * (mu-25) / (6 * ez*ez*ez); return s; } template inline T asymptotic_bessel_j_large_x(T v, T x) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T chi = fabs(x) - constants::pi() * (2 * v + 1) / 4; return sqrt(2 / (constants::pi() * x)) * (asymptotic_bessel_j_large_x_P(v, x) * cos(chi) - asymptotic_bessel_j_large_x_Q(v, x) * sin(chi)); } template inline T asymptotic_bessel_y_large_x(T v, T x) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T chi = fabs(x) - constants::pi() * (2 * v + 1) / 4; return sqrt(2 / (constants::pi() * x)) * (asymptotic_bessel_j_large_x_P(v, x) * sin(chi) - asymptotic_bessel_j_large_x_Q(v, x) * cos(chi)); } template inline T asymptotic_bessel_amplitude(T v, T x) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T s = 1; T mu = 4 * v * v; T txq = 2 * x; txq *= txq; s += (mu - 1) / (2 * txq); s += 3 * (mu - 1) * (mu - 9) / (txq * txq * 8); s += 15 * (mu - 1) * (mu - 9) * (mu - 25) / (txq * txq * txq * 8 * 6); return sqrt(s * 2 / (constants::pi() * x)); } template T asymptotic_bessel_phase_mx(T v, T x) { T mu = 4 * v * v; T denom = 4 * x; T denom_mult = denom * denom; T s = -constants::pi() * (v / 2 + 0.25f); s += (mu - 1) / (2 * denom); denom *= denom_mult; s += (mu - 1) * (mu - 25) / (6 * denom); denom *= denom_mult; s += (mu - 1) * (mu * mu - 114 * mu + 1073) / (5 * denom); denom *= denom_mult; s += (mu - 1) * (5 * mu * mu * mu - 1535 * mu * mu + 54703 * mu - 375733) / (14 * denom); return s; } template inline T asymptotic_bessel_y_large_x_2(T v, T x) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T ampl = asymptotic_bessel_amplitude(v, x); T phase = asymptotic_bessel_phase_mx(v, x); T sin_phase = sin(phase) * cos(x) + cos(phase) * sin(x); return sin_phase * ampl; } template inline T asymptotic_bessel_j_large_x_2(T v, T x) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T ampl = asymptotic_bessel_amplitude(v, x); T phase = asymptotic_bessel_phase_mx(v, x); T sin_phase = cos(phase) * cos(x) - sin(phase) * sin(x); return sin_phase * ampl; } # 159 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_asym.hpp" template inline T asymptotic_bessel_y_limit(const mpl::int_<0>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return 2.25 / pow(100 * tools::epsilon() / T(0.001f), T(0.2f)); } template inline T asymptotic_bessel_y_limit(const mpl::int_<53>&) { return 304 ; } template inline T asymptotic_bessel_y_limit(const mpl::int_<64>&) { return 1552 ; } template inline T asymptotic_bessel_y_limit(const mpl::int_<113>&) { return 1245243 ; } template struct bessel_asymptotic_tag { typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_< mpl::equal_to >, mpl::greater > >, mpl::int_<0>, typename mpl::if_< mpl::greater >, mpl::int_<113>, typename mpl::if_< mpl::greater >, mpl::int_<64>, mpl::int_<53> >::type >::type >::type type; }; template inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<0>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T v2 = (std::max)(T(3), T(v * v)); return v2 / pow(100 * tools::epsilon() / T(2e-5f), T(0.17f)); } template inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<53>&) { T v2 = (std::max)(T(3), v * v); return v2 * 33 ; } template inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<64>&) { T v2 = (std::max)(T(3), v * v); return v2 * 121 ; } template inline T asymptotic_bessel_j_limit(const T& v, const mpl::int_<113>&) { T v2 = (std::max)(T(3), v * v); return v2 * 39154 ; } template void temme_asyptotic_y_small_x(T v, T x, T* Y, T* Y1, const Policy& pol) { T c = 1; T p = (v / boost::math::sin_pi(v, pol)) * pow(x / 2, -v) / boost::math::tgamma(1 - v, pol); T q = (v / boost::math::sin_pi(v, pol)) * pow(x / 2, v) / boost::math::tgamma(1 + v, pol); T f = (p - q) / v; T g_prefix = boost::math::sin_pi(v / 2, pol); g_prefix *= g_prefix * 2 / v; T g = f + g_prefix * q; T h = p; T c_mult = -x * x / 4; T y(c * g), y1(c * h); for(int k = 1; k < policies::get_max_series_iterations(); ++k) { f = (k * f + p + q) / (k*k - v*v); p /= k - v; q /= k + v; c *= c_mult / k; T c1 = pow(-x * x / 4, k) / factorial(k, pol); g = f + g_prefix * q; h = -k * g + p; y += c * g; y1 += c * h; if(c * g / tools::epsilon() < y) break; } *Y = -y; *Y1 = (-2 / x) * y1; } template T asymptotic_bessel_i_large_x(T v, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T s = 1; T mu = 4 * v * v; T ex = 8 * x; T num = mu - 1; T denom = ex; s -= num / denom; num *= mu - 9; denom *= ex * 2; s += num / denom; num *= mu - 25; denom *= ex * 3; s -= num / denom; T e = exp(x/2); s = e * (e * s / sqrt(2 * x * constants::pi())); return (boost::math::isfinite)(s) ? s : policies::raise_overflow_error("boost::math::asymptotic_bessel_i_large_x<%1%>(%1%,%1%)", 0, pol); } }}} # 20 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_series.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_series.hpp" namespace boost { namespace math { namespace detail{ template struct bessel_j_small_z_series_term { typedef T result_type; bessel_j_small_z_series_term(T v_, T x) : N(0), v(v_) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; mult = x / 2; mult *= -mult; term = 1; } T operator()() { T r = term; ++N; term *= mult / (N * (N + v)); return r; } private: unsigned N; T v; T mult; T term; }; template inline T bessel_j_small_z_series(T v, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T prefix; if(v < max_factorial::value) { prefix = pow(x / 2, v) / boost::math::tgamma(v+1, pol); } else { prefix = v * log(x / 2) - boost::math::lgamma(v+1, pol); prefix = exp(prefix); } if(0 == prefix) return prefix; bessel_j_small_z_series_term s(v, x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); policies::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); return prefix * result; } template struct bessel_y_small_z_series_term_a { typedef T result_type; bessel_y_small_z_series_term_a(T v_, T x) : N(0), v(v_) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; mult = x / 2; mult *= -mult; term = 1; } T operator()() { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = term; ++N; term *= mult / (N * (N - v)); return r; } private: unsigned N; T v; T mult; T term; }; template struct bessel_y_small_z_series_term_b { typedef T result_type; bessel_y_small_z_series_term_b(T v_, T x) : N(0), v(v_) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; mult = x / 2; mult *= -mult; term = 1; } T operator()() { T r = term; ++N; term *= mult / (N * (N + v)); return r; } private: unsigned N; T v; T mult; T term; }; # 138 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_series.hpp" template inline T bessel_y_small_z_series(T v, T x, T* pscale, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "bessel_y_small_z_series<%1%>(%1%,%1%)"; T prefix; T gam; T p = log(x / 2); T scale = 1; bool need_logs = (v >= max_factorial::value) || (tools::log_max_value() / v < fabs(p)); if(!need_logs) { gam = boost::math::tgamma(v, pol); p = pow(x / 2, v); if(tools::max_value() * p < gam) { scale /= gam; gam = 1; if(tools::max_value() * p < gam) { return -policies::raise_overflow_error(function, 0, pol); } } prefix = -gam / (constants::pi() * p); } else { gam = boost::math::lgamma(v, pol); p = v * p; prefix = gam - log(constants::pi()) - p; if(tools::log_max_value() < prefix) { prefix -= log(tools::max_value() / 4); scale /= (tools::max_value() / 4); if(tools::log_max_value() < prefix) { return -policies::raise_overflow_error(function, 0, pol); } } prefix = -exp(prefix); } bessel_y_small_z_series_term_a s(v, x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); *pscale = scale; T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); policies::check_series_iterations("boost::math::bessel_y_small_z_series<%1%>(%1%,%1%)", max_iter, pol); result *= prefix; if(!need_logs) { prefix = boost::math::tgamma(-v, pol) * boost::math::cos_pi(v) * p / constants::pi(); } else { int s; prefix = boost::math::lgamma(-v, &s, pol) + p; prefix = exp(prefix) * s / constants::pi(); } bessel_y_small_z_series_term_b s2(v, x); max_iter = policies::get_max_series_iterations(); T b = boost::math::tools::sum_series(s2, boost::math::policies::get_epsilon(), max_iter); result -= scale * prefix * b; return result; } template T bessel_yn_small_z(int n, T z, T* scale, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ((n >= 0) ? static_cast (0) : __assert_fail ("n >= 0", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_series.hpp", 221, __PRETTY_FUNCTION__)); (((z < policies::get_epsilon())) ? static_cast (0) : __assert_fail ("(z < policies::get_epsilon())", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy_series.hpp", 222, __PRETTY_FUNCTION__)); if(n == 0) { return (2 / constants::pi()) * (log(z / 2) + constants::euler()); } else if(n == 1) { return (z / constants::pi()) * log(z / 2) - 2 / (constants::pi() * z) - (z / (2 * constants::pi())) * (1 - 2 * constants::euler()); } else if(n == 2) { return (z * z) / (4 * constants::pi()) * log(z / 2) - (4 / (constants::pi() * z * z)) - ((z * z) / (8 * constants::pi())) * (3/2 - 2 * constants::euler()); } else { T p = pow(z / 2, n); T result = -((boost::math::factorial(n - 1) / constants::pi())); if(p * tools::max_value() < result) { T div = tools::max_value() / 8; result /= div; *scale /= div; if(p * tools::max_value() < result) { return -policies::raise_overflow_error("bessel_yn_small_z<%1%>(%1%,%1%)", 0, pol); } } return result / p; } } }}} # 21 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" 2 # 29 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" namespace boost { namespace math { namespace detail { # 42 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp" template bool hankel_PQ(T v, T x, T* p, T* q, const Policy& ) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T tolerance = 2 * policies::get_epsilon(); *p = 1; *q = 0; T k = 1; T z8 = 8 * x; T sq = 1; T mu = 4 * v * v; T term = 1; bool ok = true; do { term *= (mu - sq * sq) / (k * z8); *q += term; k += 1; sq += 2; T mult = (sq * sq - mu) / (k * z8); ok = fabs(mult) < 0.5f; term *= mult; *p += term; k += 1; sq += 2; } while((fabs(term) > tolerance * *p) && ok); return ok; } template int temme_jy(T v, T x, T* Y, T* Y1, const Policy& pol) { T g, h, p, q, f, coef, sum, sum1, tolerance; T a, d, e, sigma; unsigned long k; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; ((fabs(v) <= 0.5f) ? static_cast (0) : __assert_fail ("fabs(v) <= 0.5f", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp", 85, __PRETTY_FUNCTION__)); T gp = boost::math::tgamma1pm1(v, pol); T gm = boost::math::tgamma1pm1(-v, pol); T spv = boost::math::sin_pi(v, pol); T spv2 = boost::math::sin_pi(v/2, pol); T xp = pow(x/2, v); a = log(x / 2); sigma = -a * v; d = abs(sigma) < tools::epsilon() ? T(1) : sinh(sigma) / sigma; e = abs(v) < tools::epsilon() ? T(v*pi()*pi() / 2) : T(2 * spv2 * spv2 / v); T g1 = (v == 0) ? T(-euler()) : T((gp - gm) / ((1 + gp) * (1 + gm) * 2 * v)); T g2 = (2 + gp + gm) / ((1 + gp) * (1 + gm) * 2); T vspv = (fabs(v) < tools::epsilon()) ? T(1/constants::pi()) : T(v / spv); f = (g1 * cosh(sigma) - g2 * a * d) * 2 * vspv; p = vspv / (xp * (1 + gm)); q = vspv * xp / (1 + gp); g = f + e * q; h = p; coef = 1; sum = coef * g; sum1 = coef * h; T v2 = v * v; T coef_mult = -x * x / 4; tolerance = policies::get_epsilon(); for (k = 1; k < policies::get_max_series_iterations(); k++) { f = (k * f + p + q) / (k*k - v2); p /= k - v; q /= k + v; g = f + e * q; h = p - k * g; coef *= coef_mult / k; sum += coef * g; sum1 += coef * h; if (abs(coef * g) < abs(sum) * tolerance) { break; } } policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in temme_jy", k, pol); *Y = -sum; *Y1 = -2 * sum1 / x; return 0; } template int CF1_jy(T v, T x, T* fv, int* sign, const Policy& pol) { T C, D, f, a, b, delta, tiny, tolerance; unsigned long k; int s = 1; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; tolerance = 2 * policies::get_epsilon();; tiny = sqrt(tools::min_value()); C = f = tiny; D = 0; for (k = 1; k < policies::get_max_series_iterations() * 100; k++) { a = -1; b = 2 * (v + k) / x; C = b + a / C; D = b + a * D; if (C == 0) { C = tiny; } if (D == 0) { D = tiny; } D = 1 / D; delta = C * D; f *= delta; if (D < 0) { s = -s; } if (abs(delta - 1) < tolerance) { break; } } policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF1_jy", k / 100, pol); *fv = -f; *sign = s; return 0; } template int CF2_jy(T v, T x, T* p, T* q, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T Cr, Ci, Dr, Di, fr, fi, a, br, bi, delta_r, delta_i, temp; T tiny; unsigned long k; ((fabs(x) > 1) ? static_cast (0) : __assert_fail ("fabs(x) > 1", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp", 200, __PRETTY_FUNCTION__)); T tolerance = 2 * policies::get_epsilon(); tiny = sqrt(tools::min_value()); Cr = fr = -0.5f / x; Ci = fi = 1; T v2 = v * v; a = (0.25f - v2) / x; br = 2 * x; bi = 2; temp = Cr * Cr + 1; Ci = bi + a * Cr / temp; Cr = br + a / temp; Dr = br; Di = bi; if (fabs(Cr) + fabs(Ci) < tiny) { Cr = tiny; } if (fabs(Dr) + fabs(Di) < tiny) { Dr = tiny; } temp = Dr * Dr + Di * Di; Dr = Dr / temp; Di = -Di / temp; delta_r = Cr * Dr - Ci * Di; delta_i = Ci * Dr + Cr * Di; temp = fr; fr = temp * delta_r - fi * delta_i; fi = temp * delta_i + fi * delta_r; for (k = 2; k < policies::get_max_series_iterations(); k++) { a = k - 0.5f; a *= a; a -= v2; bi += 2; temp = Cr * Cr + Ci * Ci; Cr = br + a * Cr / temp; Ci = bi - a * Ci / temp; Dr = br + a * Dr; Di = bi + a * Di; if (fabs(Cr) + fabs(Ci) < tiny) { Cr = tiny; } if (fabs(Dr) + fabs(Di) < tiny) { Dr = tiny; } temp = Dr * Dr + Di * Di; Dr = Dr / temp; Di = -Di / temp; delta_r = Cr * Dr - Ci * Di; delta_i = Ci * Dr + Cr * Di; temp = fr; fr = temp * delta_r - fi * delta_i; fi = temp * delta_i + fi * delta_r; if (fabs(delta_r - 1) + fabs(delta_i) < tolerance) break; } policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF2_jy", k, pol); *p = fr; *q = fi; return 0; } enum { need_j = 1, need_y = 2 }; template int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol) { ((x >= 0) ? static_cast (0) : __assert_fail ("x >= 0", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jy.hpp", 275, __PRETTY_FUNCTION__)); T u, Jv, Ju, Yv, Yv1, Yu, Yu1(0), fv, fu; T W, p, q, gamma, current, prev, next; bool reflect = false; unsigned n, k; int s; int org_kind = kind; T cp = 0; T sp = 0; static const char* function = "boost::math::bessel_jy<%1%>(%1%,%1%)"; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; if (v < 0) { reflect = true; v = -v; kind = need_j|need_y; } n = iround(v, pol); u = v - n; if(reflect) { T z = (u + n % 2); cp = boost::math::cos_pi(z, pol); sp = boost::math::sin_pi(z, pol); } if (x == 0) { *J = *Y = policies::raise_overflow_error( function, 0, pol); return 1; } W = T(2) / (x * pi()); T Yv_scale = 1; if((x > 8) && (x < 1000) && hankel_PQ(v, x, &p, &q, pol)) { T chi = x - fmod(T(v / 2 + 0.25f), T(2)) * boost::math::constants::pi(); T sc = sin(chi); T cc = cos(chi); chi = sqrt(2 / (boost::math::constants::pi() * x)); Yv = chi * (p * sc + q * cc); Jv = chi * (p * cc - q * sc); } else if((x < 1) && (u != 0) && (log(policies::get_epsilon() / 2) > v * log((x/2) * (x/2) / v))) { if(kind&need_j) Jv = bessel_j_small_z_series(v, x, pol); else Jv = std::numeric_limits::quiet_NaN(); if((org_kind&need_y && (!reflect || (cp != 0))) || (org_kind & need_j && (reflect && (sp != 0)))) { Yv = bessel_y_small_z_series(v, x, &Yv_scale, pol); } else Yv = std::numeric_limits::quiet_NaN(); } else if((u == 0) && (x < policies::get_epsilon())) { if(kind&need_j) Jv = bessel_j_small_z_series(v, x, pol); else Jv = std::numeric_limits::quiet_NaN(); if((org_kind&need_y && (!reflect || (cp != 0))) || (org_kind & need_j && (reflect && (sp != 0)))) { Yv = bessel_yn_small_z(n, x, &Yv_scale, pol); } else Yv = std::numeric_limits::quiet_NaN(); } else if (x <= 2) { if(temme_jy(u, x, &Yu, &Yu1, pol)) { *J = *Y = Yu; return 1; } prev = Yu; current = Yu1; T scale = 1; for (k = 1; k <= n; k++) { T fact = 2 * (u + k) / x; if((tools::max_value() - fabs(prev)) / fact < fabs(current)) { scale /= current; prev /= current; current = 1; } next = fact * current - prev; prev = current; current = next; } Yv = prev; Yv1 = current; if(kind&need_j) { CF1_jy(v, x, &fv, &s, pol); Jv = scale * W / (Yv * fv - Yv1); } else Jv = std::numeric_limits::quiet_NaN(); Yv_scale = scale; } else { typedef typename bessel_asymptotic_tag::type tag_type; T lim, ratio; switch(kind) { case need_j: lim = asymptotic_bessel_j_limit(v, tag_type()); break; case need_y: lim = asymptotic_bessel_y_limit(tag_type()); break; default: lim = (std::max)( asymptotic_bessel_j_limit(v, tag_type()), asymptotic_bessel_y_limit(tag_type())); break; } if(x > lim) { if(kind&need_y) { Yu = asymptotic_bessel_y_large_x_2(u, x); Yu1 = asymptotic_bessel_y_large_x_2(T(u + 1), x); } else Yu = std::numeric_limits::quiet_NaN(); if(kind&need_j) { Jv = asymptotic_bessel_j_large_x_2(v, x); } else Jv = std::numeric_limits::quiet_NaN(); } else { CF1_jy(v, x, &fv, &s, pol); T init = sqrt(tools::min_value()); prev = fv * s * init; current = s * init; if(v < max_factorial::value) { for (k = n; k > 0; k--) { next = 2 * (u + k) * current / x - prev; prev = current; current = next; } ratio = (s * init) / current; fu = prev / current; } else { bool over = false; for (k = n; k > 0; k--) { T t = 2 * (u + k) / x; if(tools::max_value() / t < current) { over = true; break; } next = t * current - prev; prev = current; current = next; } if(!over) { ratio = (s * init) / current; fu = prev / current; } else { ratio = 0; fu = 1; } } CF2_jy(u, x, &p, &q, pol); T t = u / x - fu; gamma = (p - t) / q; Ju = sign(current) * sqrt(W / (q + gamma * (p - t))); Jv = Ju * ratio; Yu = gamma * Ju; Yu1 = Yu * (u/x - p - q/gamma); } if(kind&need_y) { prev = Yu; current = Yu1; for (k = 1; k <= n; k++) { T fact = 2 * (u + k) / x; if((tools::max_value() - fabs(prev)) / fact < fabs(current)) { prev /= current; Yv_scale /= current; current = 1; } next = fact * current - prev; prev = current; current = next; } Yv = prev; } else Yv = std::numeric_limits::quiet_NaN(); } if (reflect) { if(tools::max_value() * fabs(Yv_scale) < fabs(sp * Yv)) *J = org_kind & need_j ? T(-sign(sp) * sign(Yv) * sign(Yv_scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); else *J = cp * Jv - (sp == 0 ? T(0) : T((sp * Yv) / Yv_scale)); if(tools::max_value() * fabs(Yv_scale) < fabs(cp * Yv)) *Y = org_kind & need_y ? T(-sign(cp) * sign(Yv) * sign(Yv_scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); else *Y = sp * Jv + (cp == 0 ? T(0) : T((cp * Yv) / Yv_scale)); } else { *J = Jv; if(tools::max_value() * fabs(Yv_scale) < fabs(Yv)) *Y = org_kind & need_y ? T(sign(Yv) * sign(Yv_scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); else *Y = Yv / Yv_scale; } return 0; } } }} # 18 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jn.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jn.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j0.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j0.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 16 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j0.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_j0(T x) { static const T P1[] = { static_cast(-4.1298668500990866786e+11L), static_cast(2.7282507878605942706e+10L), static_cast(-6.2140700423540120665e+08L), static_cast(6.6302997904833794242e+06L), static_cast(-3.6629814655107086448e+04L), static_cast(1.0344222815443188943e+02L), static_cast(-1.2117036164593528341e-01L) }; static const T Q1[] = { static_cast(2.3883787996332290397e+12L), static_cast(2.6328198300859648632e+10L), static_cast(1.3985097372263433271e+08L), static_cast(4.5612696224219938200e+05L), static_cast(9.3614022392337710626e+02L), static_cast(1.0L), static_cast(0.0L) }; static const T P2[] = { static_cast(-1.8319397969392084011e+03L), static_cast(-1.2254078161378989535e+04L), static_cast(-7.2879702464464618998e+03L), static_cast(1.0341910641583726701e+04L), static_cast(1.1725046279757103576e+04L), static_cast(4.4176707025325087628e+03L), static_cast(7.4321196680624245801e+02L), static_cast(4.8591703355916499363e+01L) }; static const T Q2[] = { static_cast(-3.5783478026152301072e+05L), static_cast(2.4599102262586308984e+05L), static_cast(-8.4055062591169562211e+04L), static_cast(1.8680990008359188352e+04L), static_cast(-2.9458766545509337327e+03L), static_cast(3.3307310774649071172e+02L), static_cast(-2.5258076240801555057e+01L), static_cast(1.0L) }; static const T PC[] = { static_cast(2.2779090197304684302e+04L), static_cast(4.1345386639580765797e+04L), static_cast(2.1170523380864944322e+04L), static_cast(3.4806486443249270347e+03L), static_cast(1.5376201909008354296e+02L), static_cast(8.8961548424210455236e-01L) }; static const T QC[] = { static_cast(2.2779090197304684318e+04L), static_cast(4.1370412495510416640e+04L), static_cast(2.1215350561880115730e+04L), static_cast(3.5028735138235608207e+03L), static_cast(1.5711159858080893649e+02L), static_cast(1.0L) }; static const T PS[] = { static_cast(-8.9226600200800094098e+01L), static_cast(-1.8591953644342993800e+02L), static_cast(-1.1183429920482737611e+02L), static_cast(-2.2300261666214198472e+01L), static_cast(-1.2441026745835638459e+00L), static_cast(-8.8033303048680751817e-03L) }; static const T QS[] = { static_cast(5.7105024128512061905e+03L), static_cast(1.1951131543434613647e+04L), static_cast(7.2642780169211018836e+03L), static_cast(1.4887231232283756582e+03L), static_cast(9.0593769594993125859e+01L), static_cast(1.0L) }; static const T x1 = static_cast(2.4048255576957727686e+00L), x2 = static_cast(5.5200781102863106496e+00L), x11 = static_cast(6.160e+02L), x12 = static_cast(-1.42444230422723137837e-03L), x21 = static_cast(1.4130e+03L), x22 = static_cast(5.46860286310649596604e-04L); T value, factor, r, rc, rs; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; if (x < 0) { x = -x; } if (x == 0) { return static_cast(1); } if (x <= 4) { T y = x * x; ((sizeof(P1) == sizeof(Q1)) ? static_cast (0) : __assert_fail ("sizeof(P1) == sizeof(Q1)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j0.hpp", 120, __PRETTY_FUNCTION__)); r = evaluate_rational(P1, Q1, y); factor = (x + x1) * ((x - x11/256) - x12); value = factor * r; } else if (x <= 8.0) { T y = 1 - (x * x)/64; ((sizeof(P2) == sizeof(Q2)) ? static_cast (0) : __assert_fail ("sizeof(P2) == sizeof(Q2)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j0.hpp", 128, __PRETTY_FUNCTION__)); r = evaluate_rational(P2, Q2, y); factor = (x + x2) * ((x - x21/256) - x22); value = factor * r; } else { T y = 8 / x; T y2 = y * y; T z = x - 0.25f * pi(); ((sizeof(PC) == sizeof(QC)) ? static_cast (0) : __assert_fail ("sizeof(PC) == sizeof(QC)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j0.hpp", 138, __PRETTY_FUNCTION__)); ((sizeof(PS) == sizeof(QS)) ? static_cast (0) : __assert_fail ("sizeof(PS) == sizeof(QS)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j0.hpp", 139, __PRETTY_FUNCTION__)); rc = evaluate_rational(PC, QC, y2); rs = evaluate_rational(PS, QS, y2); factor = sqrt(2 / (x * pi())); value = factor * (rc * cos(z) - y * rs * sin(z)); } return value; } }}} # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jn.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j1.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j1.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 16 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j1.hpp" 2 namespace boost { namespace math{ namespace detail{ template T bessel_j1(T x) { static const T P1[] = { static_cast(-1.4258509801366645672e+11L), static_cast(6.6781041261492395835e+09L), static_cast(-1.1548696764841276794e+08L), static_cast(9.8062904098958257677e+05L), static_cast(-4.4615792982775076130e+03L), static_cast(1.0650724020080236441e+01L), static_cast(-1.0767857011487300348e-02L) }; static const T Q1[] = { static_cast(4.1868604460820175290e+12L), static_cast(4.2091902282580133541e+10L), static_cast(2.0228375140097033958e+08L), static_cast(5.9117614494174794095e+05L), static_cast(1.0742272239517380498e+03L), static_cast(1.0L), static_cast(0.0L) }; static const T P2[] = { static_cast(-1.7527881995806511112e+16L), static_cast(1.6608531731299018674e+15L), static_cast(-3.6658018905416665164e+13L), static_cast(3.5580665670910619166e+11L), static_cast(-1.8113931269860667829e+09L), static_cast(5.0793266148011179143e+06L), static_cast(-7.5023342220781607561e+03L), static_cast(4.6179191852758252278e+00L) }; static const T Q2[] = { static_cast(1.7253905888447681194e+18L), static_cast(1.7128800897135812012e+16L), static_cast(8.4899346165481429307e+13L), static_cast(2.7622777286244082666e+11L), static_cast(6.4872502899596389593e+08L), static_cast(1.1267125065029138050e+06L), static_cast(1.3886978985861357615e+03L), static_cast(1.0L) }; static const T PC[] = { static_cast(-4.4357578167941278571e+06L), static_cast(-9.9422465050776411957e+06L), static_cast(-6.6033732483649391093e+06L), static_cast(-1.5235293511811373833e+06L), static_cast(-1.0982405543459346727e+05L), static_cast(-1.6116166443246101165e+03L), static_cast(0.0L) }; static const T QC[] = { static_cast(-4.4357578167941278568e+06L), static_cast(-9.9341243899345856590e+06L), static_cast(-6.5853394797230870728e+06L), static_cast(-1.5118095066341608816e+06L), static_cast(-1.0726385991103820119e+05L), static_cast(-1.4550094401904961825e+03L), static_cast(1.0L) }; static const T PS[] = { static_cast(3.3220913409857223519e+04L), static_cast(8.5145160675335701966e+04L), static_cast(6.6178836581270835179e+04L), static_cast(1.8494262873223866797e+04L), static_cast(1.7063754290207680021e+03L), static_cast(3.5265133846636032186e+01L), static_cast(0.0L) }; static const T QS[] = { static_cast(7.0871281941028743574e+05L), static_cast(1.8194580422439972989e+06L), static_cast(1.4194606696037208929e+06L), static_cast(4.0029443582266975117e+05L), static_cast(3.7890229745772202641e+04L), static_cast(8.6383677696049909675e+02L), static_cast(1.0L) }; static const T x1 = static_cast(3.8317059702075123156e+00L), x2 = static_cast(7.0155866698156187535e+00L), x11 = static_cast(9.810e+02L), x12 = static_cast(-3.2527979248768438556e-04L), x21 = static_cast(1.7960e+03L), x22 = static_cast(-3.8330184381246462950e-05L); T value, factor, r, rc, rs, w; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; w = abs(x); if (x == 0) { return static_cast(0); } if (w <= 4) { T y = x * x; ((sizeof(P1) == sizeof(Q1)) ? static_cast (0) : __assert_fail ("sizeof(P1) == sizeof(Q1)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j1.hpp", 121, __PRETTY_FUNCTION__)); r = evaluate_rational(P1, Q1, y); factor = w * (w + x1) * ((w - x11/256) - x12); value = factor * r; } else if (w <= 8) { T y = x * x; ((sizeof(P2) == sizeof(Q2)) ? static_cast (0) : __assert_fail ("sizeof(P2) == sizeof(Q2)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j1.hpp", 129, __PRETTY_FUNCTION__)); r = evaluate_rational(P2, Q2, y); factor = w * (w + x2) * ((w - x21/256) - x22); value = factor * r; } else { T y = 8 / w; T y2 = y * y; T z = w - 0.75f * pi(); ((sizeof(PC) == sizeof(QC)) ? static_cast (0) : __assert_fail ("sizeof(PC) == sizeof(QC)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j1.hpp", 139, __PRETTY_FUNCTION__)); ((sizeof(PS) == sizeof(QS)) ? static_cast (0) : __assert_fail ("sizeof(PS) == sizeof(QS)", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_j1.hpp", 140, __PRETTY_FUNCTION__)); rc = evaluate_rational(PC, QC, y2); rs = evaluate_rational(PS, QS, y2); factor = sqrt(2 / (w * pi())); value = factor * (rc * cos(z) - y * rs * sin(z)); } if (x < 0) { value *= -1; } return value; } }}} # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jn.hpp" 2 # 24 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jn.hpp" namespace boost { namespace math { namespace detail{ template T bessel_jn(int n, T x, const Policy& pol) { T value(0), factor, current, prev, next; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if (n < 0) { factor = (n & 0x1) ? -1 : 1; n = -n; } else { factor = 1; } if (n == 0) { return factor * bessel_j0(x); } if (n == 1) { return factor * bessel_j1(x); } if (x == 0) { return static_cast(0); } typedef typename bessel_asymptotic_tag::type tag_type; if(fabs(x) > asymptotic_bessel_j_limit(n, tag_type())) return factor * asymptotic_bessel_j_large_x_2(n, x); ((n > 1) ? static_cast (0) : __assert_fail ("n > 1", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_jn.hpp", 66, __PRETTY_FUNCTION__)); T scale = 1; if (n < abs(x)) { prev = bessel_j0(x); current = bessel_j1(x); for (int k = 1; k < n; k++) { T fact = 2 * k / x; if((tools::max_value() - fabs(prev)) / fabs(fact) < fabs(current)) { scale /= current; prev /= current; current = 1; } value = fact * current - prev; prev = current; current = value; } } else if(x < 1) { return factor * bessel_j_small_z_series(T(n), x, pol); } else { T fn; int s; boost::math::detail::CF1_jy(static_cast(n), x, &fn, &s, pol); prev = fn; current = 1; for (int k = n; k > 0; k--) { T fact = 2 * k / x; if((tools::max_value() - fabs(prev)) / fact < fabs(current)) { prev /= current; scale /= current; current = 1; } next = fact * current - prev; prev = current; current = next; } value = bessel_j0(x) / current; scale = 1 / scale; } value *= factor; if(tools::max_value() * scale < fabs(value)) return policies::raise_overflow_error("boost::math::bessel_jn<%1%>(%1%,%1%)", 0, pol); return value / scale; } }}} # 19 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_yn.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_yn.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_y0.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_y0.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 18 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_y0.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_y0(T x, const Policy& pol) { static const T P1[] = { static_cast(1.0723538782003176831e+11L), static_cast(-8.3716255451260504098e+09L), static_cast(2.0422274357376619816e+08L), static_cast(-2.1287548474401797963e+06L), static_cast(1.0102532948020907590e+04L), static_cast(-1.8402381979244993524e+01L), }; static const T Q1[] = { static_cast(5.8873865738997033405e+11L), static_cast(8.1617187777290363573e+09L), static_cast(5.5662956624278251596e+07L), static_cast(2.3889393209447253406e+05L), static_cast(6.6475986689240190091e+02L), static_cast(1.0L), }; static const T P2[] = { static_cast(-2.2213976967566192242e+13L), static_cast(-5.5107435206722644429e+11L), static_cast(4.3600098638603061642e+10L), static_cast(-6.9590439394619619534e+08L), static_cast(4.6905288611678631510e+06L), static_cast(-1.4566865832663635920e+04L), static_cast(1.7427031242901594547e+01L), }; static const T Q2[] = { static_cast(4.3386146580707264428e+14L), static_cast(5.4266824419412347550e+12L), static_cast(3.4015103849971240096e+10L), static_cast(1.3960202770986831075e+08L), static_cast(4.0669982352539552018e+05L), static_cast(8.3030857612070288823e+02L), static_cast(1.0L), }; static const T P3[] = { static_cast(-8.0728726905150210443e+15L), static_cast(6.7016641869173237784e+14L), static_cast(-1.2829912364088687306e+11L), static_cast(-1.9363051266772083678e+11L), static_cast(2.1958827170518100757e+09L), static_cast(-1.0085539923498211426e+07L), static_cast(2.1363534169313901632e+04L), static_cast(-1.7439661319197499338e+01L), }; static const T Q3[] = { static_cast(3.4563724628846457519e+17L), static_cast(3.9272425569640309819e+15L), static_cast(2.2598377924042897629e+13L), static_cast(8.6926121104209825246e+10L), static_cast(2.4727219475672302327e+08L), static_cast(5.3924739209768057030e+05L), static_cast(8.7903362168128450017e+02L), static_cast(1.0L), }; static const T PC[] = { static_cast(2.2779090197304684302e+04L), static_cast(4.1345386639580765797e+04L), static_cast(2.1170523380864944322e+04L), static_cast(3.4806486443249270347e+03L), static_cast(1.5376201909008354296e+02L), static_cast(8.8961548424210455236e-01L), }; static const T QC[] = { static_cast(2.2779090197304684318e+04L), static_cast(4.1370412495510416640e+04L), static_cast(2.1215350561880115730e+04L), static_cast(3.5028735138235608207e+03L), static_cast(1.5711159858080893649e+02L), static_cast(1.0L), }; static const T PS[] = { static_cast(-8.9226600200800094098e+01L), static_cast(-1.8591953644342993800e+02L), static_cast(-1.1183429920482737611e+02L), static_cast(-2.2300261666214198472e+01L), static_cast(-1.2441026745835638459e+00L), static_cast(-8.8033303048680751817e-03L), }; static const T QS[] = { static_cast(5.7105024128512061905e+03L), static_cast(1.1951131543434613647e+04L), static_cast(7.2642780169211018836e+03L), static_cast(1.4887231232283756582e+03L), static_cast(9.0593769594993125859e+01L), static_cast(1.0L), }; static const T x1 = static_cast(8.9357696627916752158e-01L), x2 = static_cast(3.9576784193148578684e+00L), x3 = static_cast(7.0860510603017726976e+00L), x11 = static_cast(2.280e+02L), x12 = static_cast(2.9519662791675215849e-03L), x21 = static_cast(1.0130e+03L), x22 = static_cast(6.4716931485786837568e-04L), x31 = static_cast(1.8140e+03L), x32 = static_cast(1.1356030177269762362e-04L) ; T value, factor, r, rc, rs; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; static const char* function = "boost::math::bessel_y0<%1%>(%1%,%1%)"; if (x < 0) { return policies::raise_domain_error(function, "Got x = %1% but x must be non-negative, complex result not supported.", x, pol); } if (x == 0) { return -policies::raise_overflow_error(function, 0, pol); } if (x <= 3) { T y = x * x; T z = 2 * log(x/x1) * bessel_j0(x) / pi(); r = evaluate_rational(P1, Q1, y); factor = (x + x1) * ((x - x11/256) - x12); value = z + factor * r; } else if (x <= 5.5f) { T y = x * x; T z = 2 * log(x/x2) * bessel_j0(x) / pi(); r = evaluate_rational(P2, Q2, y); factor = (x + x2) * ((x - x21/256) - x22); value = z + factor * r; } else if (x <= 8) { T y = x * x; T z = 2 * log(x/x3) * bessel_j0(x) / pi(); r = evaluate_rational(P3, Q3, y); factor = (x + x3) * ((x - x31/256) - x32); value = z + factor * r; } else { T y = 8 / x; T y2 = y * y; T z = x - 0.25f * pi(); rc = evaluate_rational(PC, QC, y2); rs = evaluate_rational(PS, QS, y2); factor = sqrt(2 / (x * pi())); value = factor * (rc * sin(z) + y * rs * cos(z)); } return value; } }}} # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_yn.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_y1.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_y1.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 18 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_y1.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_y1(T x, const Policy& pol) { static const T P1[] = { static_cast(4.0535726612579544093e+13L), static_cast(5.4708611716525426053e+12L), static_cast(-3.7595974497819597599e+11L), static_cast(7.2144548214502560419e+09L), static_cast(-5.9157479997408395984e+07L), static_cast(2.2157953222280260820e+05L), static_cast(-3.1714424660046133456e+02L), }; static const T Q1[] = { static_cast(3.0737873921079286084e+14L), static_cast(4.1272286200406461981e+12L), static_cast(2.7800352738690585613e+10L), static_cast(1.2250435122182963220e+08L), static_cast(3.8136470753052572164e+05L), static_cast(8.2079908168393867438e+02L), static_cast(1.0L), }; static const T P2[] = { static_cast(1.1514276357909013326e+19L), static_cast(-5.6808094574724204577e+18L), static_cast(-2.3638408497043134724e+16L), static_cast(4.0686275289804744814e+15L), static_cast(-5.9530713129741981618e+13L), static_cast(3.7453673962438488783e+11L), static_cast(-1.1957961912070617006e+09L), static_cast(1.9153806858264202986e+06L), static_cast(-1.2337180442012953128e+03L), }; static const T Q2[] = { static_cast(5.3321844313316185697e+20L), static_cast(5.6968198822857178911e+18L), static_cast(3.0837179548112881950e+16L), static_cast(1.1187010065856971027e+14L), static_cast(3.0221766852960403645e+11L), static_cast(6.3550318087088919566e+08L), static_cast(1.0453748201934079734e+06L), static_cast(1.2855164849321609336e+03L), static_cast(1.0L), }; static const T PC[] = { static_cast(-4.4357578167941278571e+06L), static_cast(-9.9422465050776411957e+06L), static_cast(-6.6033732483649391093e+06L), static_cast(-1.5235293511811373833e+06L), static_cast(-1.0982405543459346727e+05L), static_cast(-1.6116166443246101165e+03L), static_cast(0.0L), }; static const T QC[] = { static_cast(-4.4357578167941278568e+06L), static_cast(-9.9341243899345856590e+06L), static_cast(-6.5853394797230870728e+06L), static_cast(-1.5118095066341608816e+06L), static_cast(-1.0726385991103820119e+05L), static_cast(-1.4550094401904961825e+03L), static_cast(1.0L), }; static const T PS[] = { static_cast(3.3220913409857223519e+04L), static_cast(8.5145160675335701966e+04L), static_cast(6.6178836581270835179e+04L), static_cast(1.8494262873223866797e+04L), static_cast(1.7063754290207680021e+03L), static_cast(3.5265133846636032186e+01L), static_cast(0.0L), }; static const T QS[] = { static_cast(7.0871281941028743574e+05L), static_cast(1.8194580422439972989e+06L), static_cast(1.4194606696037208929e+06L), static_cast(4.0029443582266975117e+05L), static_cast(3.7890229745772202641e+04L), static_cast(8.6383677696049909675e+02L), static_cast(1.0L), }; static const T x1 = static_cast(2.1971413260310170351e+00L), x2 = static_cast(5.4296810407941351328e+00L), x11 = static_cast(5.620e+02L), x12 = static_cast(1.8288260310170351490e-03L), x21 = static_cast(1.3900e+03L), x22 = static_cast(-6.4592058648672279948e-06L) ; T value, factor, r, rc, rs; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; if (x <= 0) { return policies::raise_domain_error("bost::math::bessel_y1<%1%>(%1%,%1%)", "Got x == %1%, but x must be > 0, complex result not supported.", x, pol); } if (x <= 4) { T y = x * x; T z = 2 * log(x/x1) * bessel_j1(x) / pi(); r = evaluate_rational(P1, Q1, y); factor = (x + x1) * ((x - x11/256) - x12) / x; value = z + factor * r; } else if (x <= 8) { T y = x * x; T z = 2 * log(x/x2) * bessel_j1(x) / pi(); r = evaluate_rational(P2, Q2, y); factor = (x + x2) * ((x - x21/256) - x22) / x; value = z + factor * r; } else { T y = 8 / x; T y2 = y * y; T z = x - 0.75f * pi(); rc = evaluate_rational(PC, QC, y2); rs = evaluate_rational(PS, QS, y2); factor = sqrt(2 / (x * pi())); value = factor * (rc * sin(z) + y * rs * cos(z)); } return value; } }}} # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_yn.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_yn(int n, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T value, factor, current, prev; using namespace boost::math::tools; static const char* function = "boost::math::bessel_yn<%1%>(%1%,%1%)"; if ((x == 0) && (n == 0)) { return -policies::raise_overflow_error(function, 0, pol); } if (x <= 0) { return policies::raise_domain_error(function, "Got x = %1%, but x must be > 0, complex result not supported.", x, pol); } if (n < 0) { factor = (n & 0x1) ? -1 : 1; n = -n; } else { factor = 1; } if(x < policies::get_epsilon()) { T scale = 1; value = bessel_yn_small_z(n, x, &scale, pol); if(tools::max_value() * fabs(scale) < fabs(value)) return boost::math::sign(scale) * boost::math::sign(value) * policies::raise_overflow_error(function, 0, pol); value /= scale; } else if (n == 0) { value = bessel_y0(x, pol); } else if (n == 1) { value = factor * bessel_y1(x, pol); } else { prev = bessel_y0(x, pol); current = bessel_y1(x, pol); int k = 1; ((k < n) ? static_cast (0) : __assert_fail ("k < n", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_yn.hpp", 77, __PRETTY_FUNCTION__)); do { T fact = 2 * k / x; if((tools::max_value() - fabs(prev)) / fact < fabs(current)) { prev /= current; factor /= current; current = 1; } value = fact * current - prev; prev = current; current = value; ++k; } while(k < n); if(tools::max_value() * factor < value) return sign(value) * sign(value) * policies::raise_overflow_error(function, 0, pol); value /= factor; } return value; } }}} # 20 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_ik.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_ik.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/round.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/round.hpp" namespace boost{ namespace math{ template inline T round(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(!(boost::math::isfinite)(v)) return policies::raise_rounding_error("boost::math::round<%1%>(%1%)", 0, v, v, pol); return v < 0 ? static_cast(ceil(v - 0.5f)) : static_cast(floor(v + 0.5f)); } template inline T round(const T& v) { return round(v, policies::policy<>()); } # 41 "/localhome/glisse2/include/boost/math/special_functions/round.hpp" template inline int iround(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = boost::math::round(v, pol); if((r > (std::numeric_limits::max)()) || (r < (std::numeric_limits::min)())) return static_cast(policies::raise_rounding_error("boost::math::iround<%1%>(%1%)", 0, v, 0, pol)); return static_cast(r); } template inline int iround(const T& v) { return iround(v, policies::policy<>()); } template inline long lround(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = boost::math::round(v, pol); if((r > (std::numeric_limits::max)()) || (r < (std::numeric_limits::min)())) return static_cast(policies::raise_rounding_error("boost::math::lround<%1%>(%1%)", 0, v, 0L, pol)); return static_cast(r); } template inline long lround(const T& v) { return lround(v, policies::policy<>()); } template inline boost::long_long_type llround(const T& v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T r = boost::math::round(v, pol); if((r > (std::numeric_limits::max)()) || (r < (std::numeric_limits::min)())) return static_cast(policies::raise_rounding_error("boost::math::llround<%1%>(%1%)", 0, v, 0LL, pol)); return static_cast(r); } template inline boost::long_long_type llround(const T& v) { return llround(v, policies::policy<>()); } }} # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_ik.hpp" 2 # 22 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_ik.hpp" namespace boost { namespace math { namespace detail { template struct cyl_bessel_i_small_z { typedef T result_type; cyl_bessel_i_small_z(T v_, T z_) : k(0), v(v_), mult(z_*z_/4) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; term = 1; } T operator()() { T result = term; ++k; term *= mult / k; term /= k + v; return result; } private: unsigned k; T v; T term; T mult; }; template inline T bessel_i_small_z_series(T v, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T prefix; if(v < max_factorial::value) { prefix = pow(x / 2, v) / boost::math::tgamma(v + 1, pol); } else { prefix = v * log(x / 2) - boost::math::lgamma(v + 1, pol); prefix = exp(prefix); } if(prefix == 0) return prefix; cyl_bessel_i_small_z s(v, x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); policies::check_series_iterations("boost::math::bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); return prefix * result; } template int temme_ik(T v, T x, T* K, T* K1, const Policy& pol) { T f, h, p, q, coef, sum, sum1, tolerance; T a, b, c, d, sigma, gamma1, gamma2; unsigned long k; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; ((abs(x) <= 2) ? static_cast (0) : __assert_fail ("abs(x) <= 2", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_ik.hpp", 97, __PRETTY_FUNCTION__)); ((abs(v) <= 0.5f) ? static_cast (0) : __assert_fail ("abs(v) <= 0.5f", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_ik.hpp", 98, __PRETTY_FUNCTION__)); T gp = boost::math::tgamma1pm1(v, pol); T gm = boost::math::tgamma1pm1(-v, pol); a = log(x / 2); b = exp(v * a); sigma = -a * v; c = abs(v) < tools::epsilon() ? T(1) : T(boost::math::sin_pi(v) / (v * pi())); d = abs(sigma) < tools::epsilon() ? T(1) : T(sinh(sigma) / sigma); gamma1 = abs(v) < tools::epsilon() ? T(-euler()) : T((0.5f / v) * (gp - gm) * c); gamma2 = (2 + gp + gm) * c / 2; p = (gp + 1) / (2 * b); q = (1 + gm) * b / 2; f = (cosh(sigma) * gamma1 + d * (-a) * gamma2) / c; h = p; coef = 1; sum = coef * f; sum1 = coef * h; tolerance = tools::epsilon(); for (k = 1; k < policies::get_max_series_iterations(); k++) { f = (k * f + p + q) / (k*k - v*v); p /= k - v; q /= k + v; h = p - k * f; coef *= x * x / (4 * k); sum += coef * f; sum1 += coef * h; if (abs(coef * f) < abs(sum) * tolerance) { break; } } policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in temme_ik", k, pol); *K = sum; *K1 = 2 * sum1 / x; return 0; } template int CF1_ik(T v, T x, T* fv, const Policy& pol) { T C, D, f, a, b, delta, tiny, tolerance; unsigned long k; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; tolerance = 2 * tools::epsilon(); ; tiny = sqrt(tools::min_value()); ; C = f = tiny; D = 0; for (k = 1; k < policies::get_max_series_iterations(); k++) { a = 1; b = 2 * (v + k) / x; C = b + a / C; D = b + a * D; if (C == 0) { C = tiny; } if (D == 0) { D = tiny; } D = 1 / D; delta = C * D; f *= delta; ; if (abs(delta - 1) <= tolerance) { break; } } ; policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in CF1_ik", k, pol); *fv = f; return 0; } template int CF2_ik(T v, T x, T* Kv, T* Kv1, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::constants; T S, C, Q, D, f, a, b, q, delta, tolerance, current, prev; unsigned long k; ((abs(x) > 1) ? static_cast (0) : __assert_fail ("abs(x) > 1", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_ik.hpp", 208, __PRETTY_FUNCTION__)); tolerance = tools::epsilon(); a = v * v - 0.25f; b = 2 * (x + 1); D = 1 / b; f = delta = D; prev = 0; current = 1; Q = C = -a; S = 1 + Q * delta; ; ; ; ; ; for (k = 2; k < policies::get_max_series_iterations(); k++) { a -= 2 * (k - 1); b += 2; D = 1 / (b + a * D); delta *= b * D - 1; f += delta; q = (prev - (b - 2) * current) / a; prev = current; current = q; C *= -a / k; Q += C * q; S += Q * delta; ; ; if (abs(Q * delta) < abs(S) * tolerance) { break; } } policies::check_series_iterations("boost::math::bessel_ik<%1%>(%1%,%1%) in CF2_ik", k, pol); *Kv = sqrt(pi() / (2 * x)) * exp(-x) / S; *Kv1 = *Kv * (0.5f + v + x + (v * v - 0.25f) * f) / x; ; ; return 0; } enum{ need_i = 1, need_k = 2 }; template int bessel_ik(T v, T x, T* I, T* K, int kind, const Policy& pol) { T u, Iv, Kv, Kv1, Ku, Ku1, fv; T W, current, prev, next; bool reflect = false; unsigned n, k; int org_kind = kind; ; ; ; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; static const char* function = "boost::math::bessel_ik<%1%>(%1%,%1%)"; if (v < 0) { reflect = true; v = -v; kind |= need_k; } n = iround(v, pol); u = v - n; ; ; if (x < 0) { *I = *K = policies::raise_domain_error(function, "Got x = %1% but real argument x must be non-negative, complex number result not supported.", x, pol); return 1; } if (x == 0) { Iv = (v == 0) ? static_cast(1) : static_cast(0); if(kind & need_k) { Kv = policies::raise_overflow_error(function, 0, pol); } else { Kv = std::numeric_limits::quiet_NaN(); } if(reflect && (kind & need_i)) { T z = (u + n % 2); Iv = boost::math::sin_pi(z, pol) == 0 ? Iv : policies::raise_overflow_error(function, 0, pol); } *I = Iv; *K = Kv; return 0; } W = 1 / x; if (x <= 2) { temme_ik(u, x, &Ku, &Ku1, pol); } else { CF2_ik(u, x, &Ku, &Ku1, pol); } prev = Ku; current = Ku1; T scale = 1; for (k = 1; k <= n; k++) { T fact = 2 * (u + k) / x; if((tools::max_value() - fabs(prev)) / fact < fabs(current)) { prev /= current; scale /= current; current = 1; } next = fact * current + prev; prev = current; current = next; } Kv = prev; Kv1 = current; if(kind & need_i) { T lim = (4 * v * v + 10) / (8 * x); lim *= lim; lim *= lim; lim /= 24; if((lim < tools::epsilon() * 10) && (x > 100)) { Iv = asymptotic_bessel_i_large_x(v, x, pol); } else if((x / v < 0.25) && (v > 0)) { Iv = bessel_i_small_z_series(v, x, pol); } else { CF1_ik(v, x, &fv, pol); Iv = scale * W / (Kv * fv + Kv1); } } else Iv = std::numeric_limits::quiet_NaN(); if (reflect) { T z = (u + n % 2); T fact = (2 / pi()) * (boost::math::sin_pi(z) * Kv); if(fact == 0) *I = Iv; else if(tools::max_value() * scale < fact) *I = (org_kind & need_i) ? T(sign(fact) * sign(scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); else *I = Iv + fact / scale; } else { *I = Iv; } if(tools::max_value() * scale < Kv) *K = (org_kind & need_k) ? T(sign(Kv) * sign(scale) * policies::raise_overflow_error(function, 0, pol)) : T(0); else *K = Kv / scale; ; ; return 0; } }}} # 21 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_i0.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_i0.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_i0.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_i0(T x) { static const T P1[] = { static_cast(-2.2335582639474375249e+15L), static_cast(-5.5050369673018427753e+14L), static_cast(-3.2940087627407749166e+13L), static_cast(-8.4925101247114157499e+11L), static_cast(-1.1912746104985237192e+10L), static_cast(-1.0313066708737980747e+08L), static_cast(-5.9545626019847898221e+05L), static_cast(-2.4125195876041896775e+03L), static_cast(-7.0935347449210549190e+00L), static_cast(-1.5453977791786851041e-02L), static_cast(-2.5172644670688975051e-05L), static_cast(-3.0517226450451067446e-08L), static_cast(-2.6843448573468483278e-11L), static_cast(-1.5982226675653184646e-14L), static_cast(-5.2487866627945699800e-18L), }; static const T Q1[] = { static_cast(-2.2335582639474375245e+15L), static_cast(7.8858692566751002988e+12L), static_cast(-1.2207067397808979846e+10L), static_cast(1.0377081058062166144e+07L), static_cast(-4.8527560179962773045e+03L), static_cast(1.0L), }; static const T P2[] = { static_cast(-2.2210262233306573296e-04L), static_cast(1.3067392038106924055e-02L), static_cast(-4.4700805721174453923e-01L), static_cast(5.5674518371240761397e+00L), static_cast(-2.3517945679239481621e+01L), static_cast(3.1611322818701131207e+01L), static_cast(-9.6090021968656180000e+00L), }; static const T Q2[] = { static_cast(-5.5194330231005480228e-04L), static_cast(3.2547697594819615062e-02L), static_cast(-1.1151759188741312645e+00L), static_cast(1.3982595353892851542e+01L), static_cast(-6.0228002066743340583e+01L), static_cast(8.5539563258012929600e+01L), static_cast(-3.1446690275135491500e+01L), static_cast(1.0L), }; T value, factor, r; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; if (x < 0) { x = -x; } if (x == 0) { return static_cast(1); } if (x <= 15) { T y = x * x; value = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); } else { T y = 1 / x - T(1) / 15; r = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); factor = exp(x) / sqrt(x); value = factor * r; } return value; } }}} # 22 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_i1.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_i1.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_i1.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_i1(T x) { static const T P1[] = { static_cast(-1.4577180278143463643e+15L), static_cast(-1.7732037840791591320e+14L), static_cast(-6.9876779648010090070e+12L), static_cast(-1.3357437682275493024e+11L), static_cast(-1.4828267606612366099e+09L), static_cast(-1.0588550724769347106e+07L), static_cast(-5.1894091982308017540e+04L), static_cast(-1.8225946631657315931e+02L), static_cast(-4.7207090827310162436e-01L), static_cast(-9.1746443287817501309e-04L), static_cast(-1.3466829827635152875e-06L), static_cast(-1.4831904935994647675e-09L), static_cast(-1.1928788903603238754e-12L), static_cast(-6.5245515583151902910e-16L), static_cast(-1.9705291802535139930e-19L), }; static const T Q1[] = { static_cast(-2.9154360556286927285e+15L), static_cast(9.7887501377547640438e+12L), static_cast(-1.4386907088588283434e+10L), static_cast(1.1594225856856884006e+07L), static_cast(-5.1326864679904189920e+03L), static_cast(1.0L), }; static const T P2[] = { static_cast(1.4582087408985668208e-05L), static_cast(-8.9359825138577646443e-04L), static_cast(2.9204895411257790122e-02L), static_cast(-3.4198728018058047439e-01L), static_cast(1.3960118277609544334e+00L), static_cast(-1.9746376087200685843e+00L), static_cast(8.5591872901933459000e-01L), static_cast(-6.0437159056137599999e-02L), }; static const T Q2[] = { static_cast(3.7510433111922824643e-05L), static_cast(-2.2835624489492512649e-03L), static_cast(7.4212010813186530069e-02L), static_cast(-8.5017476463217924408e-01L), static_cast(3.2593714889036996297e+00L), static_cast(-3.8806586721556593450e+00L), static_cast(1.0L), }; T value, factor, r, w; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; w = abs(x); if (x == 0) { return static_cast(0); } if (w <= 15) { T y = x * x; r = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); factor = w; value = factor * r; } else { T y = 1 / w - T(1) / 15; r = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); factor = exp(w) / sqrt(w); value = factor * r; } if (x < 0) { value *= -value; } return value; } }}} # 23 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_kn.hpp" 1 # 13 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_kn.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_k0.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_k0.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 16 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_k0.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_k0(T x, const Policy& pol) { ; static const T P1[] = { static_cast(2.4708152720399552679e+03L), static_cast(5.9169059852270512312e+03L), static_cast(4.6850901201934832188e+02L), static_cast(1.1999463724910714109e+01L), static_cast(1.3166052564989571850e-01L), static_cast(5.8599221412826100000e-04L) }; static const T Q1[] = { static_cast(2.1312714303849120380e+04L), static_cast(-2.4994418972832303646e+02L), static_cast(1.0L) }; static const T P2[] = { static_cast(-1.6128136304458193998e+06L), static_cast(-3.7333769444840079748e+05L), static_cast(-1.7984434409411765813e+04L), static_cast(-2.9501657892958843865e+02L), static_cast(-1.6414452837299064100e+00L) }; static const T Q2[] = { static_cast(-1.6128136304458193998e+06L), static_cast(2.9865713163054025489e+04L), static_cast(-2.5064972445877992730e+02L), static_cast(1.0L) }; static const T P3[] = { static_cast(1.1600249425076035558e+02L), static_cast(2.3444738764199315021e+03L), static_cast(1.8321525870183537725e+04L), static_cast(7.1557062783764037541e+04L), static_cast(1.5097646353289914539e+05L), static_cast(1.7398867902565686251e+05L), static_cast(1.0577068948034021957e+05L), static_cast(3.1075408980684392399e+04L), static_cast(3.6832589957340267940e+03L), static_cast(1.1394980557384778174e+02L) }; static const T Q3[] = { static_cast(9.2556599177304839811e+01L), static_cast(1.8821890840982713696e+03L), static_cast(1.4847228371802360957e+04L), static_cast(5.8824616785857027752e+04L), static_cast(1.2689839587977598727e+05L), static_cast(1.5144644673520157801e+05L), static_cast(9.7418829762268075784e+04L), static_cast(3.1474655750295278825e+04L), static_cast(4.4329628889746408858e+03L), static_cast(2.0013443064949242491e+02L), static_cast(1.0L) }; T value, factor, r, r1, r2; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::bessel_k0<%1%>(%1%,%1%)"; if (x < 0) { return policies::raise_domain_error(function, "Got x = %1%, but argument x must be non-negative, complex number result not supported", x, pol); } if (x == 0) { return policies::raise_overflow_error(function, 0, pol); } if (x <= 1) { T y = x * x; r1 = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); r2 = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); factor = log(x); value = r1 - factor * r2; } else { T y = 1 / x; r = evaluate_polynomial(P3, y) / evaluate_polynomial(Q3, y); factor = exp(-x) / sqrt(x); value = factor * r; ; ; ; ; } return value; } }}} # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_kn.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_k1.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_k1.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 16 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_k1.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_k1(T x, const Policy& pol) { static const T P1[] = { static_cast(-2.2149374878243304548e+06L), static_cast(7.1938920065420586101e+05L), static_cast(1.7733324035147015630e+05L), static_cast(7.1885382604084798576e+03L), static_cast(9.9991373567429309922e+01L), static_cast(4.8127070456878442310e-01L) }; static const T Q1[] = { static_cast(-2.2149374878243304548e+06L), static_cast(3.7264298672067697862e+04L), static_cast(-2.8143915754538725829e+02L), static_cast(1.0L) }; static const T P2[] = { static_cast(0.0L), static_cast(-1.3531161492785421328e+06L), static_cast(-1.4758069205414222471e+05L), static_cast(-4.5051623763436087023e+03L), static_cast(-5.3103913335180275253e+01L), static_cast(-2.2795590826955002390e-01L) }; static const T Q2[] = { static_cast(-2.7062322985570842656e+06L), static_cast(4.3117653211351080007e+04L), static_cast(-3.0507151578787595807e+02L), static_cast(1.0L) }; static const T P3[] = { static_cast(2.2196792496874548962e+00L), static_cast(4.4137176114230414036e+01L), static_cast(3.4122953486801312910e+02L), static_cast(1.3319486433183221990e+03L), static_cast(2.8590657697910288226e+03L), static_cast(3.4540675585544584407e+03L), static_cast(2.3123742209168871550e+03L), static_cast(8.1094256146537402173e+02L), static_cast(1.3182609918569941308e+02L), static_cast(7.5584584631176030810e+00L), static_cast(6.4257745859173138767e-02L) }; static const T Q3[] = { static_cast(1.7710478032601086579e+00L), static_cast(3.4552228452758912848e+01L), static_cast(2.5951223655579051357e+02L), static_cast(9.6929165726802648634e+02L), static_cast(1.9448440788918006154e+03L), static_cast(2.1181000487171943810e+03L), static_cast(1.2082692316002348638e+03L), static_cast(3.3031020088765390854e+02L), static_cast(3.6001069306861518855e+01L), static_cast(1.0L) }; T value, factor, r, r1, r2; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::bessel_k1<%1%>(%1%,%1%)"; if (x < 0) { return policies::raise_domain_error(function, "Got x = %1%, but argument x must be non-negative, complex number result not supported.", x, pol); } if (x == 0) { return policies::raise_overflow_error(function, 0, pol); } if (x <= 1) { T y = x * x; r1 = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); r2 = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); factor = log(x); value = (r1 + factor * r2) / x; } else { T y = 1 / x; r = evaluate_polynomial(P3, y) / evaluate_polynomial(Q3, y); factor = exp(-x) / sqrt(x); value = factor * r; } return value; } }}} # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_kn.hpp" 2 namespace boost { namespace math { namespace detail{ template T bessel_kn(int n, T x, const Policy& pol) { T value, current, prev; using namespace boost::math::tools; static const char* function = "boost::math::bessel_kn<%1%>(%1%,%1%)"; if (x < 0) { return policies::raise_domain_error(function, "Got x = %1%, but argument x must be non-negative, complex number result not supported.", x, pol); } if (x == 0) { return policies::raise_overflow_error(function, 0, pol); } if (n < 0) { n = -n; } if (n == 0) { value = bessel_k0(x, pol); } else if (n == 1) { value = bessel_k1(x, pol); } else { prev = bessel_k0(x, pol); current = bessel_k1(x, pol); int k = 1; ((k < n) ? static_cast (0) : __assert_fail ("k < n", "/localhome/glisse2/include/boost/math/special_functions/detail/bessel_kn.hpp", 58, __PRETTY_FUNCTION__)); T scale = 1; do { T fact = 2 * k / x; if((tools::max_value() - fabs(prev)) / fact < fabs(current)) { scale /= current; prev /= current; current = 1; } value = fact * current + prev; prev = current; current = value; ++k; } while(k < n); if(tools::max_value() * scale < fabs(value)) return sign(scale) * sign(value) * policies::raise_overflow_error(function, 0, pol); value /= scale; } return value; } }}} # 24 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/iconv.hpp" 1 # 16 "/localhome/glisse2/include/boost/math/special_functions/detail/iconv.hpp" namespace boost { namespace math { namespace detail{ template inline int iconv_imp(T v, Policy const&, mpl::true_ const&) { return static_cast(v); } template inline int iconv_imp(T v, Policy const& pol, mpl::false_ const&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return iround(v); } template inline int iconv(T v, Policy const& pol) { typedef typename boost::is_convertible::type tag_type; return iconv_imp(v, pol, tag_type()); } }}} # 25 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/sinc.hpp" 1 # 33 "/localhome/glisse2/include/boost/math/special_functions/sinc.hpp" namespace boost { namespace math { namespace detail { # 52 "/localhome/glisse2/include/boost/math/special_functions/sinc.hpp" template inline T sinc_pi_imp(const T x) { using ::std::abs; using ::std::sin; using ::std::sqrt; static T const taylor_0_bound = tools::epsilon(); static T const taylor_2_bound = sqrt(taylor_0_bound); static T const taylor_n_bound = sqrt(taylor_2_bound); if (abs(x) >= taylor_n_bound) { return(sin(x)/x); } else { T result = static_cast(1); if (abs(x) >= taylor_0_bound) { T x2 = x*x; result -= x2/static_cast(6); if (abs(x) >= taylor_2_bound) { result += (x2*x2)/static_cast(120); } } return(result); } } } template inline typename tools::promote_args::type sinc_pi(T x) { typedef typename tools::promote_args::type result_type; return detail::sinc_pi_imp(static_cast(x)); } template inline typename tools::promote_args::type sinc_pi(T x, const Policy&) { typedef typename tools::promote_args::type result_type; return detail::sinc_pi_imp(static_cast(x)); } template class U> inline U sinc_pi(const U x) { using namespace std; # 130 "/localhome/glisse2/include/boost/math/special_functions/sinc.hpp" using ::std::numeric_limits; static T const taylor_0_bound = tools::epsilon(); static T const taylor_2_bound = sqrt(taylor_0_bound); static T const taylor_n_bound = sqrt(taylor_2_bound); if (abs(x) >= taylor_n_bound) { return(sin(x)/x); } else { U result = U(1); if (abs(x) >= taylor_0_bound) { U x2 = x*x; result -= x2/static_cast(6); if (abs(x) >= taylor_2_bound) { result += (x2*x2)/static_cast(120); } } return(result); } } template class U, class Policy> inline U sinc_pi(const U x, const Policy&) { return sinc_pi(x); } } } # 28 "/localhome/glisse2/include/boost/math/special_functions/bessel.hpp" 2 namespace boost{ namespace math{ namespace detail{ template struct sph_bessel_j_small_z_series_term { typedef T result_type; sph_bessel_j_small_z_series_term(unsigned v_, T x) : N(0), v(v_) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; mult = x / 2; term = pow(mult, T(v)) / boost::math::tgamma(v+1+T(0.5f), Policy()); mult *= -mult; } T operator()() { T r = term; ++N; term *= mult / (N * T(N + v + 0.5f)); return r; } private: unsigned N; unsigned v; T mult; T term; }; template inline T sph_bessel_j_small_z_series(unsigned v, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; sph_bessel_j_small_z_series_term s(v, x); boost::uintmax_t max_iter = policies::get_max_series_iterations(); T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); policies::check_series_iterations("boost::math::sph_bessel_j_small_z_series<%1%>(%1%,%1%)", max_iter, pol); return result * sqrt(constants::pi() / 4); } template T cyl_bessel_j_imp(T v, T x, const bessel_no_int_tag& t, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::bessel_j<%1%>(%1%,%1%)"; if(x < 0) { if(floor(v) == v) { T r = cyl_bessel_j_imp(v, T(-x), t, pol); if(iround(v, pol) & 1) r = -r; return r; } else return policies::raise_domain_error( function, "Got x = %1%, but we need x >= 0", x, pol); } if(x == 0) return (v == 0) ? 1 : (v > 0) ? 0 : policies::raise_domain_error( function, "Got v = %1%, but require v >= 0 or a negative integer: the result would be complex.", v, pol); if((v >= 0) && ((x < 1) || (v > x * x / 4) || (x < 5))) { return bessel_j_small_z_series(v, x, pol); } T j, y; bessel_jy(v, x, &j, &y, need_j, pol); return j; } template inline T cyl_bessel_j_imp(T v, T x, const bessel_maybe_int_tag&, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; int ival = detail::iconv(v, pol); if((abs(ival) < 200) && (0 == v - ival)) { return bessel_jn(ival , x, pol); } return cyl_bessel_j_imp(v, x, bessel_no_int_tag(), pol); } template inline T cyl_bessel_j_imp(int v, T x, const bessel_int_tag&, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return bessel_jn(v, x, pol); } template inline T sph_bessel_j_imp(unsigned n, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(x < 0) return policies::raise_domain_error( "boost::math::sph_bessel_j<%1%>(%1%,%1%)", "Got x = %1%, but function requires x > 0.", x, pol); if(n == 0) return boost::math::sinc_pi(x, pol); if(x < 1) return sph_bessel_j_small_z_series(n, x, pol); return sqrt(constants::pi() / (2 * x)) * cyl_bessel_j_imp(T(T(n)+T(0.5f)), x, bessel_no_int_tag(), pol); } template T cyl_bessel_i_imp(T v, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(x < 0) { if(floor(v) == v) { T r = cyl_bessel_i_imp(v, T(-x), pol); if(iround(v, pol) & 1) r = -r; return r; } else return policies::raise_domain_error( "boost::math::cyl_bessel_i<%1%>(%1%,%1%)", "Got x = %1%, but we need x >= 0", x, pol); } if(x == 0) { return (v == 0) ? 1 : 0; } if(v == 0.5f) { if(x >= tools::log_max_value()) { T e = exp(x / 2); return e * (e / sqrt(2 * x * constants::pi())); } return sqrt(2 / (x * constants::pi())) * sinh(x); } if(policies::digits() <= 64) { if(v == 0) { return bessel_i0(x); } if(v == 1) { return bessel_i1(x); } } if((x / v < 0.25) && (v > 0)) return bessel_i_small_z_series(v, x, pol); T I, K; bessel_ik(v, x, &I, &K, need_i, pol); return I; } template inline T cyl_bessel_k_imp(T v, T x, const bessel_no_int_tag& , const Policy& pol) { static const char* function = "boost::math::cyl_bessel_k<%1%>(%1%,%1%)"; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(x < 0) { return policies::raise_domain_error( function, "Got x = %1%, but we need x > 0", x, pol); } if(x == 0) { return (v == 0) ? policies::raise_overflow_error(function, 0, pol) : policies::raise_domain_error( function, "Got x = %1%, but we need x > 0", x, pol); } T I, K; bessel_ik(v, x, &I, &K, need_k, pol); return K; } template inline T cyl_bessel_k_imp(T v, T x, const bessel_maybe_int_tag&, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if((floor(v) == v)) { return bessel_kn(itrunc(v), x, pol); } return cyl_bessel_k_imp(v, x, bessel_no_int_tag(), pol); } template inline T cyl_bessel_k_imp(int v, T x, const bessel_int_tag&, const Policy& pol) { return bessel_kn(v, x, pol); } template inline T cyl_neumann_imp(T v, T x, const bessel_no_int_tag&, const Policy& pol) { static const char* function = "boost::math::cyl_neumann<%1%>(%1%,%1%)"; ; ; if(x <= 0) { return (v == 0) && (x == 0) ? policies::raise_overflow_error(function, 0, pol) : policies::raise_domain_error( function, "Got x = %1%, but result is complex for x <= 0", x, pol); } T j, y; bessel_jy(v, x, &j, &y, need_y, pol); if(!(boost::math::isfinite)(y)) return -policies::raise_overflow_error(function, 0, pol); return y; } template inline T cyl_neumann_imp(T v, T x, const bessel_maybe_int_tag&, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename bessel_asymptotic_tag::type tag_type; ; ; if(floor(v) == v) { if((fabs(x) > asymptotic_bessel_y_limit(tag_type())) && (fabs(x) > 5 * abs(v))) { T r = asymptotic_bessel_y_large_x_2(static_cast(abs(v)), x); if((v < 0) && (itrunc(v, pol) & 1)) r = -r; ; return r; } else { T r = bessel_yn(itrunc(v, pol), x, pol); ; return r; } } T r = cyl_neumann_imp(v, x, bessel_no_int_tag(), pol); ; return r; } template inline T cyl_neumann_imp(int v, T x, const bessel_int_tag&, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; typedef typename bessel_asymptotic_tag::type tag_type; ; ; if((fabs(x) > asymptotic_bessel_y_limit(tag_type())) && (fabs(x) > 5 * abs(v))) { T r = asymptotic_bessel_y_large_x_2(static_cast(abs(v)), x); if((v < 0) && (v & 1)) r = -r; return r; } else return bessel_yn(v, x, pol); } template inline T sph_neumann_imp(unsigned v, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::sph_neumann<%1%>(%1%,%1%)"; if(x < 0) return policies::raise_domain_error( function, "Got x = %1%, but function requires x > 0.", x, pol); if(x < 2 * tools::min_value()) return -policies::raise_overflow_error(function, 0, pol); T result = cyl_neumann_imp(T(T(v)+0.5f), x, bessel_no_int_tag(), pol); T tx = sqrt(constants::pi() / (2 * x)); if((tx > 1) && (tools::max_value() / tx < result)) return -policies::raise_overflow_error(function, 0, pol); return result * tx; } } template inline typename detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol) { boost::math::detail::fpu_guard local_guard_object; typedef typename detail::bessel_traits::result_type result_type; typedef typename detail::bessel_traits::optimisation_tag tag_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::cyl_bessel_j_imp(v, static_cast(x), tag_type(), pol), "boost::math::cyl_bessel_j<%1%>(%1%,%1%)"); } template inline typename detail::bessel_traits >::result_type cyl_bessel_j(T1 v, T2 x) { return cyl_bessel_j(v, x, policies::policy<>()); } template inline typename detail::bessel_traits::result_type sph_bessel(unsigned v, T x, const Policy& pol) { boost::math::detail::fpu_guard local_guard_object; typedef typename detail::bessel_traits::result_type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::sph_bessel_j_imp(v, static_cast(x), pol), "boost::math::sph_bessel<%1%>(%1%,%1%)"); } template inline typename detail::bessel_traits >::result_type sph_bessel(unsigned v, T x) { return sph_bessel(v, x, policies::policy<>()); } template inline typename detail::bessel_traits::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol) { boost::math::detail::fpu_guard local_guard_object; typedef typename detail::bessel_traits::result_type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::cyl_bessel_i_imp(v, static_cast(x), pol), "boost::math::cyl_bessel_i<%1%>(%1%,%1%)"); } template inline typename detail::bessel_traits >::result_type cyl_bessel_i(T1 v, T2 x) { return cyl_bessel_i(v, x, policies::policy<>()); } template inline typename detail::bessel_traits::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol) { boost::math::detail::fpu_guard local_guard_object; typedef typename detail::bessel_traits::result_type result_type; typedef typename detail::bessel_traits::optimisation_tag tag_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::cyl_bessel_k_imp(v, static_cast(x), tag_type(), pol), "boost::math::cyl_bessel_k<%1%>(%1%,%1%)"); } template inline typename detail::bessel_traits >::result_type cyl_bessel_k(T1 v, T2 x) { return cyl_bessel_k(v, x, policies::policy<>()); } template inline typename detail::bessel_traits::result_type cyl_neumann(T1 v, T2 x, const Policy& pol) { boost::math::detail::fpu_guard local_guard_object; typedef typename detail::bessel_traits::result_type result_type; typedef typename detail::bessel_traits::optimisation_tag tag_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::cyl_neumann_imp(v, static_cast(x), tag_type(), pol), "boost::math::cyl_neumann<%1%>(%1%,%1%)"); } template inline typename detail::bessel_traits >::result_type cyl_neumann(T1 v, T2 x) { return cyl_neumann(v, x, policies::policy<>()); } template inline typename detail::bessel_traits::result_type sph_neumann(unsigned v, T x, const Policy& pol) { boost::math::detail::fpu_guard local_guard_object; typedef typename detail::bessel_traits::result_type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::sph_neumann_imp(v, static_cast(x), pol), "boost::math::sph_neumann<%1%>(%1%,%1%)"); } template inline typename detail::bessel_traits >::result_type sph_neumann(unsigned v, T x) { return sph_neumann(v, x, policies::policy<>()); } } } # 19 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" 1 # 25 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" namespace boost{ namespace math{ namespace detail{ template T beta_imp(T a, T b, const L&, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(a <= 0) policies::raise_domain_error("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got a=%1%).", a, pol); if(b <= 0) policies::raise_domain_error("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got b=%1%).", b, pol); T result; T prefix = 1; T c = a + b; if((c == a) && (b < tools::epsilon())) return boost::math::tgamma(b, pol); else if((c == b) && (a < tools::epsilon())) return boost::math::tgamma(a, pol); if(b == 1) return 1/a; else if(a == 1) return 1/b; # 80 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" if(a < b) std::swap(a, b); T agh = a + L::g() - T(0.5); T bgh = b + L::g() - T(0.5); T cgh = c + L::g() - T(0.5); result = L::lanczos_sum_expG_scaled(a) * L::lanczos_sum_expG_scaled(b) / L::lanczos_sum_expG_scaled(c); T ambh = a - T(0.5) - b; if((fabs(b * ambh) < (cgh * 100)) && (a > 100)) { result *= exp(ambh * boost::math::log1p(-b / cgh, pol)); } else { result *= pow(agh / cgh, a - T(0.5) - b); } if(cgh > 1e10f) result *= pow((agh / cgh) * (bgh / cgh), b); else result *= pow((agh * bgh) / (cgh * cgh), b); result *= sqrt(boost::math::constants::e() / bgh); result *= prefix; return result; } template T beta_imp(T a, T b, const lanczos::undefined_lanczos& , const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(a <= 0) policies::raise_domain_error("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got a=%1%).", a, pol); if(b <= 0) policies::raise_domain_error("boost::math::beta<%1%>(%1%,%1%)", "The arguments to the beta function must be greater than zero (got b=%1%).", b, pol); T result; T prefix = 1; T c = a + b; if((c == a) && (b < tools::epsilon())) return boost::math::tgamma(b, pol); else if((c == b) && (a < tools::epsilon())) return boost::math::tgamma(a, pol); if(b == 1) return 1/a; else if(a == 1) return 1/b; if(a < 1) { prefix *= c / a; c += 1; a += 1; } if(b < 1) { prefix *= c / b; c += 1; b += 1; } if(a < b) std::swap(a, b); T la = (std::max)(T(10), a); T lb = (std::max)(T(10), b); T lc = (std::max)(T(10), T(a+b)); T sa = detail::lower_gamma_series(a, la, pol) / a; sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::get_epsilon()); T sb = detail::lower_gamma_series(b, lb, pol) / b; sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::get_epsilon()); T sc = detail::lower_gamma_series(c, lc, pol) / c; sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::get_epsilon()); result = exp(lc - la - lb) * pow(la/lc, a) * pow(lb/lc, b); result *= sa * sb / sc; result *= prefix; return result; } # 194 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" template T ibeta_power_terms(T a, T b, T x, T y, const L&, bool normalised, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(!normalised) { return pow(x, a) * pow(y, b); } T result; T prefix = 1; T c = a + b; T agh = a + L::g() - T(0.5); T bgh = b + L::g() - T(0.5); T cgh = c + L::g() - T(0.5); result = L::lanczos_sum_expG_scaled(c) / (L::lanczos_sum_expG_scaled(a) * L::lanczos_sum_expG_scaled(b)); T l1 = (x * b - y * agh) / agh; T l2 = (y * a - x * bgh) / bgh; if(((std::min)(fabs(l1), fabs(l2)) < 0.2)) { if((l1 * l2 > 0) || ((std::min)(a, b) < 1)) { # 244 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" if(fabs(l1) < 0.1) { result *= exp(a * boost::math::log1p(l1, pol)); ; } else { result *= pow((x * cgh) / agh, a); ; } if(fabs(l2) < 0.1) { result *= exp(b * boost::math::log1p(l2, pol)); ; } else { result *= pow((y * cgh) / bgh, b); ; } } else if((std::max)(fabs(l1), fabs(l2)) < 0.5) { # 286 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" bool small_a = a < b; T ratio = b / a; if((small_a && (ratio * l2 < 0.1)) || (!small_a && (l1 / ratio > 0.1))) { T l3 = boost::math::expm1(ratio * boost::math::log1p(l2, pol), pol); l3 = l1 + l3 + l3 * l1; l3 = a * boost::math::log1p(l3, pol); result *= exp(l3); ; } else { T l3 = boost::math::expm1(boost::math::log1p(l1, pol) / ratio, pol); l3 = l2 + l3 + l3 * l2; l3 = b * boost::math::log1p(l3, pol); result *= exp(l3); ; } } else if(fabs(l1) < fabs(l2)) { T l = a * boost::math::log1p(l1, pol) + b * log((y * cgh) / bgh); result *= exp(l); ; } else { T l = b * boost::math::log1p(l2, pol) + a * log((x * cgh) / agh); result *= exp(l); ; } } else { T b1 = (x * cgh) / agh; T b2 = (y * cgh) / bgh; l1 = a * log(b1); l2 = b * log(b2); ; ; ; ; if((l1 >= tools::log_max_value()) || (l1 <= tools::log_min_value()) || (l2 >= tools::log_max_value()) || (l2 <= tools::log_min_value()) ) { if(a < b) result *= pow(pow(b2, b/a) * b1, a); else result *= pow(pow(b1, a/b) * b2, b); ; } else { result *= pow(b1, a) * pow(b2, b); ; } } result *= sqrt(bgh / boost::math::constants::e()); result *= sqrt(agh / cgh); result *= prefix; ; return result; } # 375 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" template T ibeta_power_terms(T a, T b, T x, T y, const boost::math::lanczos::undefined_lanczos&, bool normalised, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(!normalised) { return pow(x, a) * pow(y, b); } T result= 0; T c = a + b; T la = a + 5; T lb = b + 5; T lc = a + b + 5; T sa = detail::lower_gamma_series(a, la, pol) / a; sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::get_epsilon()); T sb = detail::lower_gamma_series(b, lb, pol) / b; sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::get_epsilon()); T sc = detail::lower_gamma_series(c, lc, pol) / c; sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::get_epsilon()); T b1 = (x * lc) / la; T b2 = (y * lc) / lb; T e1 = lc - la - lb; T lb1 = a * log(b1); T lb2 = b * log(b2); if((lb1 >= tools::log_max_value()) || (lb1 <= tools::log_min_value()) || (lb2 >= tools::log_max_value()) || (lb2 <= tools::log_min_value()) || (e1 >= tools::log_max_value()) || (e1 <= tools::log_min_value()) ) { result = exp(lb1 + lb2 - e1); } else { T p1, p2; if((fabs(b1 - 1) * a < 10) && (a > 1)) p1 = exp(a * boost::math::log1p((x * b - y * la) / la, pol)); else p1 = pow(b1, a); if((fabs(b2 - 1) * b < 10) && (b > 1)) p2 = exp(b * boost::math::log1p((y * a - x * lb) / lb, pol)); else p2 = pow(b2, b); T p3 = exp(e1); result = p1 * p2 / p3; } result /= sa * sb / sc; return result; } template struct ibeta_series_t { typedef T result_type; ibeta_series_t(T a_, T b_, T x_, T mult) : result(mult), x(x_), apn(a_), poch(1-b_), n(1) {} T operator()() { T r = result / apn; apn += 1; result *= poch * x / n; ++n; poch += 1; return r; } private: T result, x, apn, poch; int n; }; template T ibeta_series(T a, T b, T x, T s0, const L&, bool normalised, T* p_derivative, T y, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; (((p_derivative == 0) || normalised) ? static_cast (0) : __assert_fail ("(p_derivative == 0) || normalised", "/localhome/glisse2/include/boost/math/special_functions/beta.hpp", 475, __PRETTY_FUNCTION__)); if(normalised) { T c = a + b; T agh = a + L::g() - T(0.5); T bgh = b + L::g() - T(0.5); T cgh = c + L::g() - T(0.5); result = L::lanczos_sum_expG_scaled(c) / (L::lanczos_sum_expG_scaled(a) * L::lanczos_sum_expG_scaled(b)); if(a * b < bgh * 10) result *= exp((b - 0.5f) * boost::math::log1p(a / bgh, pol)); else result *= pow(cgh / bgh, b - 0.5f); result *= pow(x * cgh / agh, a); result *= sqrt(agh / boost::math::constants::e()); if(p_derivative) { *p_derivative = result * pow(y, b); ((*p_derivative >= 0) ? static_cast (0) : __assert_fail ("*p_derivative >= 0", "/localhome/glisse2/include/boost/math/special_functions/beta.hpp", 496, __PRETTY_FUNCTION__)); } } else { result = pow(x, a); } if(result < tools::min_value()) return s0; ibeta_series_t s(a, b, x, result); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, s0); policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (with lanczos)", max_iter, pol); return result; } template T ibeta_series(T a, T b, T x, T s0, const boost::math::lanczos::undefined_lanczos&, bool normalised, T* p_derivative, T y, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; (((p_derivative == 0) || normalised) ? static_cast (0) : __assert_fail ("(p_derivative == 0) || normalised", "/localhome/glisse2/include/boost/math/special_functions/beta.hpp", 521, __PRETTY_FUNCTION__)); if(normalised) { T c = a + b; T la = a + 5; T lb = b + 5; T lc = a + b + 5; T sa = detail::lower_gamma_series(a, la, pol) / a; sa += detail::upper_gamma_fraction(a, la, ::boost::math::policies::get_epsilon()); T sb = detail::lower_gamma_series(b, lb, pol) / b; sb += detail::upper_gamma_fraction(b, lb, ::boost::math::policies::get_epsilon()); T sc = detail::lower_gamma_series(c, lc, pol) / c; sc += detail::upper_gamma_fraction(c, lc, ::boost::math::policies::get_epsilon()); T b1 = (x * lc) / la; T b2 = lc/lb; T e1 = lc - la - lb; T lb1 = a * log(b1); T lb2 = b * log(b2); if((lb1 >= tools::log_max_value()) || (lb1 <= tools::log_min_value()) || (lb2 >= tools::log_max_value()) || (lb2 <= tools::log_min_value()) || (e1 >= tools::log_max_value()) || (e1 <= tools::log_min_value()) ) { T p = lb1 + lb2 - e1; result = exp(p); } else { result = pow(b1, a); if(a * b < lb * 10) result *= exp(b * boost::math::log1p(a / lb, pol)); else result *= pow(b2, b); result /= exp(e1); } result /= sa * sb / sc; if(p_derivative) { *p_derivative = result * pow(y, b); ((*p_derivative >= 0) ? static_cast (0) : __assert_fail ("*p_derivative >= 0", "/localhome/glisse2/include/boost/math/special_functions/beta.hpp", 575, __PRETTY_FUNCTION__)); } } else { result = pow(x, a); } if(result < tools::min_value()) return s0; ibeta_series_t s(a, b, x, result); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, s0); policies::check_series_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%) in ibeta_series (without lanczos)", max_iter, pol); return result; } template struct ibeta_fraction2_t { typedef std::pair result_type; ibeta_fraction2_t(T a_, T b_, T x_) : a(a_), b(b_), x(x_), m(0) {} result_type operator()() { T aN = (a + m - 1) * (a + b + m - 1) * m * (b - m) * x * x; T denom = (a + 2 * m - 1); aN /= denom * denom; T bN = m; bN += (m * (b - m) * x) / (a + 2*m - 1); bN += ((a + m) * (a - (a + b) * x + 1 + m *(2 - x))) / (a + 2*m + 1); ++m; return std::make_pair(aN, bN); } private: T a, b, x; int m; }; template inline T ibeta_fraction2(T a, T b, T x, T y, const Policy& pol, bool normalised, T* p_derivative) { typedef typename lanczos::lanczos::type lanczos_type; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = ibeta_power_terms(a, b, x, y, lanczos_type(), normalised, pol); if(p_derivative) { *p_derivative = result; ((*p_derivative >= 0) ? static_cast (0) : __assert_fail ("*p_derivative >= 0", "/localhome/glisse2/include/boost/math/special_functions/beta.hpp", 633, __PRETTY_FUNCTION__)); } if(result == 0) return result; ibeta_fraction2_t f(a, b, x); T fract = boost::math::tools::continued_fraction_b(f, boost::math::policies::get_epsilon()); return result / fract; } template T ibeta_a_step(T a, T b, T x, T y, int k, const Policy& pol, bool normalised, T* p_derivative) { typedef typename lanczos::lanczos::type lanczos_type; ; T prefix = ibeta_power_terms(a, b, x, y, lanczos_type(), normalised, pol); if(p_derivative) { *p_derivative = prefix; ((*p_derivative >= 0) ? static_cast (0) : __assert_fail ("*p_derivative >= 0", "/localhome/glisse2/include/boost/math/special_functions/beta.hpp", 656, __PRETTY_FUNCTION__)); } prefix /= a; if(prefix == 0) return prefix; T sum = 1; T term = 1; for(int i = 0; i < k-1; ++i) { term *= (a+b+i) * x / (a+i+1); sum += term; } prefix *= sum; return prefix; } template inline T rising_factorial_ratio(T a, T b, int k) { # 690 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" ; if(k == 0) return 1; T result = 1; for(int i = 0; i < k; ++i) result *= (a+i) / (b+i); return result; } # 706 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" template struct Pn_size { static const unsigned value = 50; static_assert(::boost::math::max_factorial::value >= 100, "::boost::math::max_factorial::value >= 100"); }; template <> struct Pn_size { static const unsigned value = 15; static_assert(::boost::math::max_factorial::value >= 30, "::boost::math::max_factorial::value >= 30"); }; template <> struct Pn_size { static const unsigned value = 30; static_assert(::boost::math::max_factorial::value >= 60, "::boost::math::max_factorial::value >= 60"); }; template <> struct Pn_size { static const unsigned value = 50; static_assert(::boost::math::max_factorial::value >= 100, "::boost::math::max_factorial::value >= 100"); }; template T beta_small_b_large_a_series(T a, T b, T x, T y, T s0, T mult, const Policy& pol, bool normalised) { typedef typename lanczos::lanczos::type lanczos_type; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T bm1 = b - 1; T t = a + bm1 / 2; T lx, u; if(y < 0.35) lx = boost::math::log1p(-y, pol); else lx = log(x); u = -t * lx; T prefix; T h = regularised_gamma_prefix(b, u, pol, lanczos_type()); if(h <= tools::min_value()) return s0; if(normalised) { prefix = h / boost::math::tgamma_delta_ratio(a, b, pol); prefix /= pow(t, b); } else { prefix = full_igamma_prefix(b, u, pol) / pow(t, b); } prefix *= mult; T p[ ::boost::math::detail::Pn_size::value ] = { 1 }; T j = boost::math::gamma_q(b, u, pol) / h; T sum = s0 + prefix * j; unsigned tnp1 = 1; T lx2 = lx / 2; lx2 *= lx2; T lxp = 1; T t4 = 4 * t * t; T b2n = b; for(unsigned n = 1; n < sizeof(p)/sizeof(p[0]); ++n) { # 804 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" tnp1 += 2; p[n] = 0; T mbn = b - n; unsigned tmp1 = 3; for(unsigned m = 1; m < n; ++m) { mbn = m * b - n; p[n] += mbn * p[n-m] / boost::math::unchecked_factorial(tmp1); tmp1 += 2; } p[n] /= n; p[n] += bm1 / boost::math::unchecked_factorial(tnp1); j = (b2n * (b2n + 1) * j + (u + b2n + 1) * lxp) / t4; lxp *= lx2; b2n += 2; T r = prefix * p[n] * j; sum += r; if(r > 1) { if(fabs(r) < fabs(tools::epsilon() * sum)) break; } else { if(fabs(r / tools::epsilon()) < fabs(sum)) break; } } return sum; } template inline T binomial_ccdf(T n, T k, T x, T y) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = pow(x, n); T term = result; for(unsigned i = itrunc(T(n - 1)); i > k; --i) { term *= ((i + 1) * y) / ((n - i) * x) ; result += term; } return result; } # 867 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" template T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_derivative) { static const char* function = "boost::math::ibeta<%1%>(%1%, %1%, %1%)"; typedef typename lanczos::lanczos::type lanczos_type; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ; ; ; ; ; bool invert = inv; T fract; T y = 1 - x; (((p_derivative == 0) || normalised) ? static_cast (0) : __assert_fail ("(p_derivative == 0) || normalised", "/localhome/glisse2/include/boost/math/special_functions/beta.hpp", 884, __PRETTY_FUNCTION__)); if(p_derivative) *p_derivative = -1; if((x < 0) || (x > 1)) policies::raise_domain_error(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol); if(normalised) { if(a < 0) policies::raise_domain_error(function, "The argument a to the incomplete beta function must be >= zero (got a=%1%).", a, pol); if(b < 0) policies::raise_domain_error(function, "The argument b to the incomplete beta function must be >= zero (got b=%1%).", b, pol); if(a == 0) { if(b == 0) policies::raise_domain_error(function, "The arguments a and b to the incomplete beta function cannot both be zero, with x=%1%.", x, pol); if(b > 0) return inv ? 0 : 1; } else if(b == 0) { if(a > 0) return inv ? 1 : 0; } } else { if(a <= 0) policies::raise_domain_error(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol); if(b <= 0) policies::raise_domain_error(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol); } if(x == 0) { if(p_derivative) { *p_derivative = (a == 1) ? (T)1 : (a < 1) ? T(tools::max_value() / 2) : T(tools::min_value() * 2); } return (invert ? (normalised ? T(1) : boost::math::beta(a, b, pol)) : T(0)); } if(x == 1) { if(p_derivative) { *p_derivative = (b == 1) ? T(1) : (b < 1) ? T(tools::max_value() / 2) : T(tools::min_value() * 2); } return (invert == 0 ? (normalised ? 1 : boost::math::beta(a, b, pol)) : 0); } if((std::min)(a, b) <= 1) { if(x > 0.5) { std::swap(a, b); std::swap(x, y); invert = !invert; ; } if((std::max)(a, b) <= 1) { if((a >= (std::min)(T(0.2), b)) || (pow(x, a) <= 0.9)) { if(!invert) { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); ; } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); ; } } else { std::swap(a, b); std::swap(x, y); invert = !invert; if(y >= 0.3) { if(!invert) { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); ; } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); ; } } else { T prefix; if(!normalised) { prefix = rising_factorial_ratio(T(a+b), a, 20); } else { prefix = 1; } fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative); if(!invert) { fract = beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); ; } else { fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); ; } } } } else { if((b <= 1) || ((x < 0.1) && (pow(b * x, a) <= 0.7))) { if(!invert) { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); ; } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); ; } } else { std::swap(a, b); std::swap(x, y); invert = !invert; if(y >= 0.3) { if(!invert) { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); ; } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); ; } } else if(a >= 15) { if(!invert) { fract = beta_small_b_large_a_series(a, b, x, y, T(0), T(1), pol, normalised); ; } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -beta_small_b_large_a_series(a, b, x, y, fract, T(1), pol, normalised); ; } } else { T prefix; if(!normalised) { prefix = rising_factorial_ratio(T(a+b), a, 20); } else { prefix = 1; } fract = ibeta_a_step(a, b, x, y, 20, pol, normalised, p_derivative); ; if(!invert) { fract = beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); ; } else { fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -beta_small_b_large_a_series(T(a + 20), b, x, y, fract, prefix, pol, normalised); ; } } } } } else { T lambda; if(a < b) { lambda = a - (a + b) * x; } else { lambda = (a + b) * y - b; } if(lambda < 0) { std::swap(a, b); std::swap(x, y); invert = !invert; ; } if(b < 40) { if((floor(a) == a) && (floor(b) == b)) { T k = a - 1; T n = b + k; fract = binomial_ccdf(n, k, x, y); if(!normalised) fract *= boost::math::beta(a, b, pol); ; } else if(b * x <= 0.7) { if(!invert) { fract = ibeta_series(a, b, x, T(0), lanczos_type(), normalised, p_derivative, y, pol); ; } else { fract = -(normalised ? 1 : boost::math::beta(a, b, pol)); invert = false; fract = -ibeta_series(a, b, x, fract, lanczos_type(), normalised, p_derivative, y, pol); ; } } else if(a > 15) { int n = itrunc(T(floor(b)), pol); if(n == b) --n; T bbar = b - n; T prefix; if(!normalised) { prefix = rising_factorial_ratio(T(a+bbar), bbar, n); } else { prefix = 1; } fract = ibeta_a_step(bbar, a, y, x, n, pol, normalised, static_cast(0)); fract = beta_small_b_large_a_series(a, bbar, x, y, fract, T(1), pol, normalised); fract /= prefix; ; } else if(normalised) { int n = itrunc(T(floor(b)), pol); T bbar = b - n; if(bbar <= 0) { --n; bbar += 1; } fract = ibeta_a_step(bbar, a, y, x, n, pol, normalised, static_cast(0)); fract += ibeta_a_step(a, bbar, x, y, 20, pol, normalised, static_cast(0)); if(invert) fract -= (normalised ? 1 : boost::math::beta(a, b, pol)); fract = beta_small_b_large_a_series(T(a+20), bbar, x, y, fract, T(1), pol, normalised); if(invert) { fract = -fract; invert = false; } ; } else { fract = ibeta_fraction2(a, b, x, y, pol, normalised, p_derivative); ; } } else { fract = ibeta_fraction2(a, b, x, y, pol, normalised, p_derivative); ; } } if(p_derivative) { if(*p_derivative < 0) { *p_derivative = ibeta_power_terms(a, b, x, y, lanczos_type(), true, pol); } T div = y * x; if(*p_derivative != 0) { if((tools::max_value() * div < *p_derivative)) { *p_derivative = tools::max_value() / 2; } else { *p_derivative /= div; } } } return invert ? (normalised ? 1 : boost::math::beta(a, b, pol)) - fract : fract; } template inline T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised) { return ibeta_imp(a, b, x, pol, inv, normalised, static_cast(0)); } template T ibeta_derivative_imp(T a, T b, T x, const Policy& pol) { static const char* function = "ibeta_derivative<%1%>(%1%,%1%,%1%)"; if(a <= 0) policies::raise_domain_error(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol); if(b <= 0) policies::raise_domain_error(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol); if((x < 0) || (x > 1)) policies::raise_domain_error(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol); if(x == 0) { return (a > 1) ? 0 : (a == 1) ? 1 / boost::math::beta(a, b, pol) : policies::raise_overflow_error(function, 0, pol); } else if(x == 1) { return (b > 1) ? 0 : (b == 1) ? 1 / boost::math::beta(a, b, pol) : policies::raise_overflow_error(function, 0, pol); } typedef typename lanczos::lanczos::type lanczos_type; T f1 = ibeta_power_terms(a, b, x, 1 - x, lanczos_type(), true, pol); T y = (1 - x) * x; if(f1 == 0) return 0; if((tools::max_value() * y < f1)) { return policies::raise_overflow_error(function, 0, pol); } f1 /= y; return f1; } template inline typename tools::promote_args::type beta(RT1 a, RT2 b, const Policy&, const mpl::true_*) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::beta_imp(static_cast(a), static_cast(b), evaluation_type(), forwarding_policy()), "boost::math::beta<%1%>(%1%,%1%)"); } template inline typename tools::promote_args::type beta(RT1 a, RT2 b, RT3 x, const mpl::false_*) { return boost::math::beta(a, b, x, policies::policy<>()); } } template inline typename tools::promote_args::type beta(RT1 a, RT2 b, A arg) { typedef typename policies::is_policy::type tag; return boost::math::detail::beta(a, b, arg, static_cast(0)); } template inline typename tools::promote_args::type beta(RT1 a, RT2 b) { return boost::math::beta(a, b, policies::policy<>()); } template inline typename tools::promote_args::type beta(RT1 a, RT2 b, RT3 x, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::ibeta_imp(static_cast(a), static_cast(b), static_cast(x), forwarding_policy(), false, false), "boost::math::beta<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename lanczos::lanczos::type evaluation_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::ibeta_imp(static_cast(a), static_cast(b), static_cast(x), forwarding_policy(), true, false), "boost::math::betac<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x) { return boost::math::betac(a, b, x, policies::policy<>()); } template inline typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::ibeta_imp(static_cast(a), static_cast(b), static_cast(x), forwarding_policy(), false, true), "boost::math::ibeta<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x) { return boost::math::ibeta(a, b, x, policies::policy<>()); } template inline typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::ibeta_imp(static_cast(a), static_cast(b), static_cast(x), forwarding_policy(), true, true), "boost::math::ibetac<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x) { return boost::math::ibetac(a, b, x, policies::policy<>()); } template inline typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy&) { boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; return policies::checked_narrowing_cast(detail::ibeta_derivative_imp(static_cast(a), static_cast(b), static_cast(x), forwarding_policy()), "boost::math::ibeta_derivative<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x) { return boost::math::ibeta_derivative(a, b, x, policies::policy<>()); } } } # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/t_distribution_inv.hpp" 1 # 14 "/localhome/glisse2/include/boost/math/special_functions/detail/t_distribution_inv.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/cbrt.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/cbrt.hpp" # 1 "/localhome/glisse2/include/boost/mpl/divides.hpp" 1 # 19 "/localhome/glisse2/include/boost/mpl/divides.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 1 # 26 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 1 # 22 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" # 1 "/localhome/glisse2/include/boost/mpl/apply_wrap.hpp" 1 # 23 "/localhome/glisse2/include/boost/mpl/aux_/numeric_op.hpp" 2 # 27 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 1 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 1 # 37 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" # 1 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/divides.hpp" 1 # 12 "/localhome/glisse2/include/boost/mpl/aux_/preprocessed/gcc/divides.hpp" namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( Tag1::value > Tag2::value ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; static const int value = 0; }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename N1 = na , typename N2 = na , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { }; template<> struct divides< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : divides< T1 , T2 > { }; }; template< typename Tag > struct lambda< divides< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef divides< na , na > result_; typedef divides< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< divides< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< divides< na , na > > : int_<-1> { }; } }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( N1::value / N2::value ) > { }; }; }} # 38 "/localhome/glisse2/include/boost/mpl/aux_/include_preprocessed.hpp" 2 # 35 "/localhome/glisse2/include/boost/mpl/aux_/arithmetic_op.hpp" 2 # 20 "/localhome/glisse2/include/boost/mpl/divides.hpp" 2 # 18 "/localhome/glisse2/include/boost/math/special_functions/cbrt.hpp" 2 namespace boost{ namespace math{ namespace detail { struct big_int_type { operator boost::uintmax_t()const; }; template struct largest_cbrt_int_type { typedef typename mpl::if_< boost::is_convertible, boost::uintmax_t, unsigned int >::type type; }; template T cbrt_imp(T z, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; # 56 "/localhome/glisse2/include/boost/math/special_functions/cbrt.hpp" static const T P[] = { static_cast(0.37568269008611818), static_cast(1.3304968705558024), static_cast(-1.4897101632445036), static_cast(1.2875573098219835), static_cast(-0.6398703759826468), static_cast(0.13584489959258635), }; static const T correction[] = { static_cast(0.62996052494743658238360530363911), static_cast(0.79370052598409973737585281963615), static_cast(1), static_cast(1.2599210498948731647672106072782), static_cast(1.5874010519681994747517056392723), }; if(!(boost::math::isfinite)(z)) { return policies::raise_domain_error("boost::math::cbrt<%1%>(%1%)", "Argument to function must be finite but got %1%.", z, pol); } int i_exp, sign(1); if(z < 0) { z = -z; sign = -sign; } if(z == 0) return 0; T guess = frexp(z, &i_exp); int original_i_exp = i_exp; guess = tools::evaluate_polynomial(P, guess); int i_exp3 = i_exp / 3; typedef typename largest_cbrt_int_type::type shift_type; static_assert(::std::numeric_limits::radix == 2, "::std::numeric_limits::radix == 2"); if(abs(i_exp3) < std::numeric_limits::digits) { if(i_exp3 > 0) guess *= shift_type(1u) << i_exp3; else guess /= shift_type(1u) << -i_exp3; } else { guess = ldexp(guess, i_exp3); } i_exp %= 3; guess *= correction[i_exp + 2]; typedef typename policies::precision::type prec; typedef typename mpl::divides >::type prec3; typedef typename mpl::plus >::type new_prec; typedef typename policies::normalise >::type new_policy; T eps = (new_prec::value > 3) ? policies::get_epsilon() : ldexp(T(1), -2 - tools::digits() / 3); T diff; if(original_i_exp < std::numeric_limits::max_exponent - 3) { do { T g3 = guess * guess * guess; diff = (g3 + z + z) / (g3 + g3 + z); guess *= diff; } while(fabs(1 - diff) > eps); } else { do { T g2 = guess * guess; diff = (g2 - z / guess) / (2 * guess + z / g2); guess -= diff; } while((guess * eps) < fabs(diff)); } return sign * guess; } } template inline typename tools::promote_args::type cbrt(T z, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return static_cast(detail::cbrt_imp(value_type(z), pol)); } template inline typename tools::promote_args::type cbrt(T z) { return cbrt(z, policies::policy<>()); } } } # 15 "/localhome/glisse2/include/boost/math/special_functions/detail/t_distribution_inv.hpp" 2 namespace boost{ namespace math{ namespace detail{ template T inverse_students_t_hill(T ndf, T u, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ((u <= 0.5) ? static_cast (0) : __assert_fail ("u <= 0.5", "/localhome/glisse2/include/boost/math/special_functions/detail/t_distribution_inv.hpp", 30, __PRETTY_FUNCTION__)); T a, b, c, d, q, x, y; if (ndf > 1e20f) return -boost::math::erfc_inv(2 * u, pol) * constants::root_two(); a = 1 / (ndf - 0.5f); b = 48 / (a * a); c = ((20700 * a / b - 98) * a - 16) * a + 96.36f; d = ((94.5f / (b + c) - 3) / b + 1) * sqrt(a * constants::pi() / 2) * ndf; y = pow(d * 2 * u, 2 / ndf); if (y > (0.05f + a)) { x = -boost::math::erfc_inv(2 * u, pol) * constants::root_two(); y = x * x; if (ndf < 5) c += 0.3f * (ndf - 4.5f) * (x + 0.6f); c += (((0.05f * d * x - 5) * x - 7) * x - 2) * x + b; y = (((((0.4f * y + 6.3f) * y + 36) * y + 94.5f) / c - y - 3) / b + 1) * x; y = boost::math::expm1(a * y * y, pol); } else { y = ((1 / (((ndf + 6) / (ndf * y) - 0.089f * d - 0.822f) * (ndf + 2) * 3) + 0.5 / (ndf + 4)) * y - 1) * (ndf + 1) / (ndf + 2) + 1 / y; } q = sqrt(ndf * y); return -q; } # 76 "/localhome/glisse2/include/boost/math/special_functions/detail/t_distribution_inv.hpp" template T inverse_students_t_tail_series(T df, T v, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T w = boost::math::tgamma_delta_ratio(df / 2, constants::half(), pol) * sqrt(df * constants::pi()) * v; T np2 = df + 2; T np4 = df + 4; T np6 = df + 6; T d[7] = { 1, }; d[1] = -(df + 1) / (2 * np2); np2 *= (df + 2); d[2] = -df * (df + 1) * (df + 3) / (8 * np2 * np4); np2 *= df + 2; d[3] = -df * (df + 1) * (df + 5) * (((3 * df) + 7) * df -2) / (48 * np2 * np4 * np6); np2 *= (df + 2); np4 *= (df + 4); d[4] = -df * (df + 1) * (df + 7) * ( (((((15 * df) + 154) * df + 465) * df + 286) * df - 336) * df + 64 ) / (384 * np2 * np4 * np6 * (df + 8)); np2 *= (df + 2); d[5] = -df * (df + 1) * (df + 3) * (df + 9) * (((((((35 * df + 452) * df + 1573) * df + 600) * df - 2020) * df) + 928) * df -128) / (1280 * np2 * np4 * np6 * (df + 8) * (df + 10)); np2 *= (df + 2); np4 *= (df + 4); np6 *= (df + 6); d[6] = -df * (df + 1) * (df + 11) * ((((((((((((945 * df) + 31506) * df + 425858) * df + 2980236) * df + 11266745) * df + 20675018) * df + 7747124) * df - 22574632) * df - 8565600) * df + 18108416) * df - 7099392) * df + 884736) / (46080 * np2 * np4 * np6 * (df + 8) * (df + 10) * (df +12)); T rn = sqrt(df); T div = pow(rn * w, 1 / df); T power = div * div; T result = tools::evaluate_polynomial<7, T, T>(d, power); result *= rn; result /= div; return -result; } template T inverse_students_t_body_series(T df, T u, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T v = boost::math::tgamma_delta_ratio(df / 2, constants::half(), pol) * sqrt(df * constants::pi()) * (u - constants::half()); T c[11] = { 0, 1, }; T in = 1 / df; c[2] = 0.16666666666666666667 + 0.16666666666666666667 * in; c[3] = (0.0083333333333333333333 * in + 0.066666666666666666667) * in + 0.058333333333333333333; c[4] = ((0.00019841269841269841270 * in + 0.0017857142857142857143) * in + 0.026785714285714285714) * in + 0.025198412698412698413; c[5] = (((2.7557319223985890653e-6 * in + 0.00037477954144620811287) * in - 0.0011078042328042328042) * in + 0.010559964726631393298) * in + 0.012039792768959435626; c[6] = ((((2.5052108385441718775e-8 * in - 0.000062705427288760622094) * in + 0.00059458674042007375341) * in - 0.0016095979637646304313) * in + 0.0061039211560044893378) * in + 0.0038370059724226390893; c[7] = (((((1.6059043836821614599e-10 * in + 0.000015401265401265401265) * in - 0.00016376804137220803887) * in + 0.00069084207973096861986) * in - 0.0012579159844784844785) * in + 0.0010898206731540064873) * in + 0.0032177478835464946576; c[8] = ((((((7.6471637318198164759e-13 * in - 3.9851014346715404916e-6) * in + 0.000049255746366361445727) * in - 0.00024947258047043099953) * in + 0.00064513046951456342991) * in - 0.00076245135440323932387) * in + 0.000033530976880017885309) * in + 0.0017438262298340009980; c[9] = (((((((2.8114572543455207632e-15 * in + 1.0914179173496789432e-6) * in - 0.000015303004486655377567) * in + 0.000090867107935219902229) * in - 0.00029133414466938067350) * in + 0.00051406605788341121363) * in - 0.00036307660358786885787) * in - 0.00031101086326318780412) * in + 0.00096472747321388644237; c[10] = ((((((((8.2206352466243297170e-18 * in - 3.1239569599829868045e-7) * in + 4.8903045291975346210e-6) * in - 0.000033202652391372058698) * in + 0.00012645437628698076975) * in - 0.00028690924218514613987) * in + 0.00035764655430568632777) * in - 0.00010230378073700412687) * in - 0.00036942667800009661203) * in + 0.00054229262813129686486; return tools::evaluate_odd_polynomial<11, T, T>(c, v); } template T inverse_students_t(T df, T u, T v, const Policy& pol, bool* pexact = 0) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; bool invert = false; T result = 0; if(pexact) *pexact = false; if(u > v) { std::swap(u, v); invert = true; } if((floor(df) == df) && (df < 20)) { T tolerance = ldexp(1.0f, (2 * policies::digits()) / 3); switch(itrunc(df, Policy())) { case 1: { if(u == 0.5) result = 0; else result = -cos(constants::pi() * u) / sin(constants::pi() * u); if(pexact) *pexact = true; break; } case 2: { result =(2 * u - 1) / sqrt(2 * u * v); if(pexact) *pexact = true; break; } case 4: { T alpha = 4 * u * v; T root_alpha = sqrt(alpha); T r = 4 * cos(acos(root_alpha) / 3) / root_alpha; T x = sqrt(r - 4); result = u - 0.5f < 0 ? (T)-x : x; if(pexact) *pexact = true; break; } case 6: { if(u < 1e-150) return (invert ? -1 : 1) * inverse_students_t_hill(df, u, pol); T a = 4 * (u - u * u); T b = boost::math::cbrt(a); static const T c = 0.85498797333834849467655443627193; T p = 6 * (1 + c * (1 / b - 1)); T p0; do{ T p2 = p * p; T p4 = p2 * p2; T p5 = p * p4; p0 = p; p = 2 * (8 * a * p5 - 270 * p2 + 2187) / (5 * (4 * a * p4 - 216 * p - 243)); }while(fabs((p - p0) / p) > tolerance); p = sqrt(p - df); result = (u - 0.5f) < 0 ? (T)-p : p; break; } # 368 "/localhome/glisse2/include/boost/math/special_functions/detail/t_distribution_inv.hpp" default: goto calculate_real; } } else { calculate_real: if(df < 3) { T crossover = 0.2742f - df * 0.0242143f; if(u > crossover) { result = boost::math::detail::inverse_students_t_body_series(df, u, pol); } else { result = boost::math::detail::inverse_students_t_tail_series(df, u, pol); } } else { T crossover = ldexp(1.0f, iround(T(df / -0.654f), pol)); if(u > crossover) { result = boost::math::detail::inverse_students_t_hill(df, u, pol); } else { result = boost::math::detail::inverse_students_t_tail_series(df, u, pol); } } } return invert ? (T)-result : result; } template inline T find_ibeta_inv_from_t_dist(T a, T p, T q, T* py, const Policy& pol) { T u = (p > q) ? T(0.5f - q) / T(2) : T(p / 2); T v = 1 - u; T df = a * 2; T t = boost::math::detail::inverse_students_t(df, u, v, pol); T x = df / (df + t * t); *py = t * t / (df + t * t); return x; } template inline T fast_students_t_quantile_imp(T df, T p, const Policy& pol, const mpl::false_*) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T probability = (p > 0.5) ? 1 - p : p; T t, x, y(0); x = ibeta_inv(df / 2, T(0.5), 2 * probability, &y, pol); if(df * y > tools::max_value() * x) t = policies::raise_overflow_error("boost::math::students_t_quantile<%1%>(%1%,%1%)", 0, pol); else t = sqrt(df * y / x); if(p < 0.5) t = -t; return t; } template T fast_students_t_quantile_imp(T df, T p, const Policy& pol, const mpl::true_*) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; bool invert = false; if((df < 2) && (floor(df) != df)) return boost::math::detail::fast_students_t_quantile_imp(df, p, pol, static_cast(0)); if(p > 0.5) { p = 1 - p; invert = true; } bool exact; T t = inverse_students_t(df, p, T(1-p), pol, &exact); if((t == 0) || exact) return invert ? -t : t; T t2 = t * t; T xb = df / (df + t2); T y = t2 / (df + t2); T a = df / 2; if(xb == 0) return t; T f1; T f0 = xb < y ? ibeta_imp(a, constants::half(), xb, pol, false, true, &f1) : ibeta_imp(constants::half(), a, y, pol, true, true, &f1); T p0 = f0 / 2 - p; T p1 = f1 * sqrt(y * xb * xb * xb / df); # 511 "/localhome/glisse2/include/boost/math/special_functions/detail/t_distribution_inv.hpp" T p2 = t * (df + 1) / (t * t + df); t = fabs(t); t += p0 / (p1 + p0 * p2 / 2); return !invert ? -t : t; } template inline T fast_students_t_quantile(T df, T p, const Policy& pol) { typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; typedef mpl::bool_< (std::numeric_limits::digits <= 53) && (std::numeric_limits::is_specialized) && (std::numeric_limits::radix == 2) > tag_type; return policies::checked_narrowing_cast(fast_students_t_quantile_imp(static_cast(df), static_cast(p), pol, static_cast(0)), "boost::math::students_t_quantile<%1%>(%1%,%1%,%1%)"); } }}} # 18 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" 2 namespace boost{ namespace math{ namespace detail{ template struct temme_root_finder { temme_root_finder(const T t_, const T a_) : t(t_), a(a_) {} boost::math::tuple operator()(T x) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T y = 1 - x; if(y == 0) { T big = tools::max_value() / 4; return boost::math::make_tuple(-big, -big); } if(x == 0) { T big = tools::max_value() / 4; return boost::math::make_tuple(-big, big); } T f = log(x) + a * log(y) + t; T f1 = (1 / x) - (a / (y)); return boost::math::make_tuple(f, f1); } private: T t, a; }; template T temme_method_1_ibeta_inverse(T a, T b, T z, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; const T r2 = sqrt(T(2)); T eta0 = boost::math::erfc_inv(2 * z, pol); eta0 /= -sqrt(a / 2); T terms[4] = { eta0 }; T workspace[7]; T B = b - a; T B_2 = B * B; T B_3 = B_2 * B; workspace[0] = -B * r2 / 2; workspace[1] = (1 - 2 * B) / 8; workspace[2] = -(B * r2 / 48); workspace[3] = T(-1) / 192; workspace[4] = -B * r2 / 3840; terms[1] = tools::evaluate_polynomial(workspace, eta0, 5); workspace[0] = B * r2 * (3 * B - 2) / 12; workspace[1] = (20 * B_2 - 12 * B + 1) / 128; workspace[2] = B * r2 * (20 * B - 1) / 960; workspace[3] = (16 * B_2 + 30 * B - 15) / 4608; workspace[4] = B * r2 * (21 * B + 32) / 53760; workspace[5] = (-32 * B_2 + 63) / 368640; workspace[6] = -B * r2 * (120 * B + 17) / 25804480; terms[2] = tools::evaluate_polynomial(workspace, eta0, 7); workspace[0] = B * r2 * (-75 * B_2 + 80 * B - 16) / 480; workspace[1] = (-1080 * B_3 + 868 * B_2 - 90 * B - 45) / 9216; workspace[2] = B * r2 * (-1190 * B_2 + 84 * B + 373) / 53760; workspace[3] = (-2240 * B_3 - 2508 * B_2 + 2100 * B - 165) / 368640; terms[3] = tools::evaluate_polynomial(workspace, eta0, 4); T eta = tools::evaluate_polynomial(terms, T(1/a), 4); T eta_2 = eta * eta; T c = -exp(-eta_2 / 2); T x; if(eta_2 == 0) x = 0.5; else x = (1 + eta * sqrt((1 + c) / eta_2)) / 2; ((x >= 0) ? static_cast (0) : __assert_fail ("x >= 0", "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp", 122, __PRETTY_FUNCTION__)); ((x <= 1) ? static_cast (0) : __assert_fail ("x <= 1", "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp", 123, __PRETTY_FUNCTION__)); ((eta * (x - 0.5) >= 0) ? static_cast (0) : __assert_fail ("eta * (x - 0.5) >= 0", "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp", 124, __PRETTY_FUNCTION__)); return x; } template T temme_method_2_ibeta_inverse(T , T , T z, T r, T theta, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T eta0 = boost::math::erfc_inv(2 * z, pol); eta0 /= -sqrt(r / 2); T s = sin(theta); T c = cos(theta); # 159 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" T terms[4] = { eta0 }; T workspace[6]; T sc = s * c; T sc_2 = sc * sc; T sc_3 = sc_2 * sc; T sc_4 = sc_2 * sc_2; T sc_5 = sc_2 * sc_3; T sc_6 = sc_3 * sc_3; T sc_7 = sc_4 * sc_3; workspace[0] = (2 * s * s - 1) / (3 * s * c); static const T co1[] = { -1, -5, 5 }; workspace[1] = -tools::evaluate_even_polynomial(co1, s, 3) / (36 * sc_2); static const T co2[] = { 1, 21, -69, 46 }; workspace[2] = tools::evaluate_even_polynomial(co2, s, 4) / (1620 * sc_3); static const T co3[] = { 7, -2, 33, -62, 31 }; workspace[3] = -tools::evaluate_even_polynomial(co3, s, 5) / (6480 * sc_4); static const T co4[] = { 25, -52, -17, 88, -115, 46 }; workspace[4] = tools::evaluate_even_polynomial(co4, s, 6) / (90720 * sc_5); terms[1] = tools::evaluate_polynomial(workspace, eta0, 5); static const T co5[] = { 7, 12, -78, 52 }; workspace[0] = -tools::evaluate_even_polynomial(co5, s, 4) / (405 * sc_3); static const T co6[] = { -7, 2, 183, -370, 185 }; workspace[1] = tools::evaluate_even_polynomial(co6, s, 5) / (2592 * sc_4); static const T co7[] = { -533, 776, -1835, 10240, -13525, 5410 }; workspace[2] = -tools::evaluate_even_polynomial(co7, s, 6) / (204120 * sc_5); static const T co8[] = { -1579, 3747, -3372, -15821, 45588, -45213, 15071 }; workspace[3] = -tools::evaluate_even_polynomial(co8, s, 7) / (2099520 * sc_6); terms[2] = tools::evaluate_polynomial(workspace, eta0, 4); static const T co9[] = {449, -1259, -769, 6686, -9260, 3704 }; workspace[0] = tools::evaluate_even_polynomial(co9, s, 6) / (102060 * sc_5); static const T co10[] = { 63149, -151557, 140052, -727469, 2239932, -2251437, 750479 }; workspace[1] = -tools::evaluate_even_polynomial(co10, s, 7) / (20995200 * sc_6); static const T co11[] = { 29233, -78755, 105222, 146879, -1602610, 3195183, -2554139, 729754 }; workspace[2] = tools::evaluate_even_polynomial(co11, s, 8) / (36741600 * sc_7); terms[3] = tools::evaluate_polynomial(workspace, eta0, 3); T eta = tools::evaluate_polynomial(terms, T(1/r), 4); T x; T s_2 = s * s; T c_2 = c * c; T alpha = c / s; alpha *= alpha; T lu = (-(eta * eta) / (2 * s_2) + log(s_2) + c_2 * log(c_2) / s_2); if(fabs(eta) < 0.7) { workspace[0] = s * s; workspace[1] = s * c; workspace[2] = (1 - 2 * workspace[0]) / 3; static const T co12[] = { 1, -13, 13 }; workspace[3] = tools::evaluate_polynomial(co12, workspace[0], 3) / (36 * s * c); static const T co13[] = { 1, 21, -69, 46 }; workspace[4] = tools::evaluate_polynomial(co13, workspace[0], 4) / (270 * workspace[0] * c * c); x = tools::evaluate_polynomial(workspace, eta, 5); } else { T u = exp(lu); workspace[0] = u; workspace[1] = alpha; workspace[2] = 0; workspace[3] = 3 * alpha * (3 * alpha + 1) / 6; workspace[4] = 4 * alpha * (4 * alpha + 1) * (4 * alpha + 2) / 24; workspace[5] = 5 * alpha * (5 * alpha + 1) * (5 * alpha + 2) * (5 * alpha + 3) / 120; x = tools::evaluate_polynomial(workspace, u, 6); # 270 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" if((x - s_2) * eta < 0) x = 1 - x; } T lower, upper; if(eta < 0) { lower = 0; upper = s_2; } else { lower = s_2; upper = 1; } if((x < lower) || (x > upper)) x = (lower+upper) / 2; x = tools::newton_raphson_iterate( temme_root_finder(-lu, alpha), x, lower, upper, policies::digits() / 2); return x; } template T temme_method_3_ibeta_inverse(T a, T b, T p, T q, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T eta0; if(p < q) eta0 = boost::math::gamma_q_inv(b, p, pol); else eta0 = boost::math::gamma_p_inv(b, q, pol); eta0 /= a; T mu = b / a; T w = sqrt(1 + mu); T w_2 = w * w; T w_3 = w_2 * w; T w_4 = w_2 * w_2; T w_5 = w_3 * w_2; T w_6 = w_3 * w_3; T w_7 = w_4 * w_3; T w_8 = w_4 * w_4; T w_9 = w_5 * w_4; T w_10 = w_5 * w_5; T d = eta0 - mu; T d_2 = d * d; T d_3 = d_2 * d; T d_4 = d_2 * d_2; T w1 = w + 1; T w1_2 = w1 * w1; T w1_3 = w1 * w1_2; T w1_4 = w1_2 * w1_2; # 362 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" T e1 = (w + 2) * (w - 1) / (3 * w); e1 += (w_3 + 9 * w_2 + 21 * w + 5) * d / (36 * w_2 * w1); e1 -= (w_4 - 13 * w_3 + 69 * w_2 + 167 * w + 46) * d_2 / (1620 * w1_2 * w_3); e1 -= (7 * w_5 + 21 * w_4 + 70 * w_3 + 26 * w_2 - 93 * w - 31) * d_3 / (6480 * w1_3 * w_4); e1 -= (75 * w_6 + 202 * w_5 + 188 * w_4 - 888 * w_3 - 1345 * w_2 + 118 * w + 138) * d_4 / (272160 * w1_4 * w_5); T e2 = (28 * w_4 + 131 * w_3 + 402 * w_2 + 581 * w + 208) * (w - 1) / (1620 * w1 * w_3); e2 -= (35 * w_6 - 154 * w_5 - 623 * w_4 - 1636 * w_3 - 3983 * w_2 - 3514 * w - 925) * d / (12960 * w1_2 * w_4); e2 -= (2132 * w_7 + 7915 * w_6 + 16821 * w_5 + 35066 * w_4 + 87490 * w_3 + 141183 * w_2 + 95993 * w + 21640) * d_2 / (816480 * w_5 * w1_3); e2 -= (11053 * w_8 + 53308 * w_7 + 117010 * w_6 + 163924 * w_5 + 116188 * w_4 - 258428 * w_3 - 677042 * w_2 - 481940 * w - 105497) * d_3 / (14696640 * w1_4 * w_6); T e3 = -((3592 * w_7 + 8375 * w_6 - 1323 * w_5 - 29198 * w_4 - 89578 * w_3 - 154413 * w_2 - 116063 * w - 29632) * (w - 1)) / (816480 * w_5 * w1_2); e3 -= (442043 * w_9 + 2054169 * w_8 + 3803094 * w_7 + 3470754 * w_6 + 2141568 * w_5 - 2393568 * w_4 - 19904934 * w_3 - 34714674 * w_2 - 23128299 * w - 5253353) * d / (146966400 * w_6 * w1_3); e3 -= (116932 * w_10 + 819281 * w_9 + 2378172 * w_8 + 4341330 * w_7 + 6806004 * w_6 + 10622748 * w_5 + 18739500 * w_4 + 30651894 * w_3 + 30869976 * w_2 + 15431867 * w + 2919016) * d_2 / (146966400 * w1_4 * w_7); T eta = eta0 + e1 / a + e2 / (a * a) + e3 / (a * a * a); # 398 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" if(eta <= 0) eta = tools::min_value(); T u = eta - mu * log(eta) + (1 + mu) * log(1 + mu) - mu; T cross = 1 / (1 + mu); T lower = eta < mu ? cross : 0; T upper = eta < mu ? 1 : cross; T x = (lower + upper) / 2; x = tools::newton_raphson_iterate( temme_root_finder(u, mu), x, lower, upper, policies::digits() / 2); return x; } template struct ibeta_roots { ibeta_roots(T _a, T _b, T t, bool inv = false) : a(_a), b(_b), target(t), invert(inv) {} boost::math::tuple operator()(T x) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; boost::math::detail::fpu_guard local_guard_object; T f1; T y = 1 - x; T f = ibeta_imp(a, b, x, Policy(), invert, true, &f1) - target; if(invert) f1 = -f1; if(y == 0) y = tools::min_value() * 64; if(x == 0) x = tools::min_value() * 64; T f2 = f1 * (-y * a + (b - 2) * x + 1); if(fabs(f2) < y * x * tools::max_value()) f2 /= (y * x); if(invert) f2 = -f2; if(f1 == 0) f1 = (invert ? -1 : 1) * tools::min_value() * 64; return boost::math::make_tuple(f, f1, f2); } private: T a, b, target; bool invert; }; template T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(q == 0) { if(py) *py = 0; return 1; } else if(p == 0) { if(py) *py = 1; return 0; } else if((a == 1) && (b == 1)) { if(py) *py = 1 - p; return p; } bool invert = false; T x = 0; T y; T lower = 0; T upper = 1; if((a == 0.5f) && (b >= 0.5f)) { std::swap(a, b); std::swap(p, q); invert = !invert; } if((b == 0.5f) && (a >= 0.5f)) { x = find_ibeta_inv_from_t_dist(a, p, q, &y, pol); } else if(a + b > 5) { if(p > 0.5) { std::swap(a, b); std::swap(p, q); invert = !invert; } T minv = (std::min)(a, b); T maxv = (std::max)(a, b); if((sqrt(minv) > (maxv - minv)) && (minv > 5)) { # 539 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" x = temme_method_1_ibeta_inverse(a, b, p, pol); y = 1 - x; } else { T r = a + b; T theta = asin(sqrt(a / r)); T lambda = minv / r; if((lambda >= 0.2) && (lambda <= 0.8) && (r >= 10)) { # 557 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" T ppa = pow(p, 1/a); if((ppa < 0.0025) && (a + b < 200)) { x = ppa * pow(a * boost::math::beta(a, b, pol), 1/a); } else x = temme_method_2_ibeta_inverse(a, b, p, r, theta, pol); y = 1 - x; } else { # 577 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" if(a < b) { std::swap(a, b); std::swap(p, q); invert = !invert; } T bet = 0; if(b < 2) bet = boost::math::beta(a, b, pol); if(bet != 0) { y = pow(b * q * bet, 1/b); x = 1 - y; } else y = 1; if(y > 1e-5) { x = temme_method_3_ibeta_inverse(a, b, p, q, pol); y = 1 - x; } } } } else if((a < 1) && (b < 1)) { T xs = (1 - a) / (2 - a - b); T fs = boost::math::ibeta(a, b, xs, pol) - p; if(fabs(fs) / p < tools::epsilon() * 3) { *py = invert ? xs : 1 - xs; return invert ? 1-xs : xs; } if(fs < 0) { std::swap(a, b); std::swap(p, q); invert = !invert; xs = 1 - xs; } T xg = pow(a * p * boost::math::beta(a, b, pol), 1/a); x = xg / (1 + xg); y = 1 / (1 + xg); if(x > xs) x = xs; upper = xs; } else if((a > 1) && (b > 1)) { T xs = (a - 1) / (a + b - 2); T xs2 = (b - 1) / (a + b - 2); T ps = boost::math::ibeta(a, b, xs, pol) - p; if(ps < 0) { std::swap(a, b); std::swap(p, q); std::swap(xs, xs2); invert = !invert; } T lx = log(p * a * boost::math::beta(a, b, pol)) / a; x = exp(lx); y = x < 0.9 ? T(1 - x) : (T)(-boost::math::expm1(lx, pol)); if((b < a) && (x < 0.2)) { T ap1 = a - 1; T bm1 = b - 1; T a_2 = a * a; T a_3 = a * a_2; T b_2 = b * b; T terms[5] = { 0, 1 }; terms[2] = bm1 / ap1; ap1 *= ap1; terms[3] = bm1 * (3 * a * b + 5 * b + a_2 - a - 4) / (2 * (a + 2) * ap1); ap1 *= (a + 1); terms[4] = bm1 * (33 * a * b_2 + 31 * b_2 + 8 * a_2 * b_2 - 30 * a * b - 47 * b + 11 * a_2 * b + 6 * a_3 * b + 18 + 4 * a - a_3 + a_2 * a_2 - 10 * a_2) / (3 * (a + 3) * (a + 2) * ap1); x = tools::evaluate_polynomial(terms, x, 5); } if(x > xs) x = xs; upper = xs; } else { # 718 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" if(b < a) { std::swap(a, b); std::swap(p, q); invert = !invert; } if(pow(p, 1/a) < 0.5) { x = pow(p * a * boost::math::beta(a, b, pol), 1 / a); if(x == 0) x = boost::math::tools::min_value(); y = 1 - x; } else { y = pow(1 - pow(p, b * boost::math::beta(a, b, pol)), 1/b); if(y == 0) y = boost::math::tools::min_value(); x = 1 - y; } } if(x > 0.5) { std::swap(a, b); std::swap(p, q); std::swap(x, y); invert = !invert; T l = 1 - upper; T u = 1 - lower; lower = l; upper = u; } if(lower == 0) { if(invert && (py == 0)) { lower = boost::math::tools::epsilon(); if(x < lower) x = lower; } else lower = boost::math::tools::min_value(); if(x < lower) x = lower; } int digits = boost::math::policies::digits() / 2; if((x < 1e-50) && ((a < 1) || (b < 1))) { # 794 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" digits *= 3; digits /= 2; } boost::uintmax_t max_iter = policies::get_max_root_iterations(); x = boost::math::tools::halley_iterate( boost::math::detail::ibeta_roots(a, b, (p < q ? p : q), (p < q ? false : true)), x, lower, upper, digits, max_iter); policies::check_root_iterations("boost::math::ibeta<%1%>(%1%, %1%, %1%)", max_iter, pol); # 814 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inverse.hpp" if(x == lower) x = 0; if(py) *py = invert ? x : 1 - x; return invert ? 1-x : x; } } template inline typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol) { static const char* function = "boost::math::ibeta_inv<%1%>(%1%,%1%,%1%)"; boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(a <= 0) return policies::raise_domain_error(function, "The argument a to the incomplete beta function inverse must be greater than zero (got a=%1%).", a, pol); if(b <= 0) return policies::raise_domain_error(function, "The argument b to the incomplete beta function inverse must be greater than zero (got b=%1%).", b, pol); if((p < 0) || (p > 1)) return policies::raise_domain_error(function, "Argument p outside the range [0,1] in the incomplete beta function inverse (got p=%1%).", p, pol); value_type rx, ry; rx = detail::ibeta_inv_imp( static_cast(a), static_cast(b), static_cast(p), static_cast(1 - p), forwarding_policy(), &ry); if(py) *py = policies::checked_narrowing_cast(ry, function); return policies::checked_narrowing_cast(rx, function); } template inline typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py) { return ibeta_inv(a, b, p, py, policies::policy<>()); } template inline typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p) { return ibeta_inv(a, b, p, static_cast(0), policies::policy<>()); } template inline typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, const Policy& pol) { return ibeta_inv(a, b, p, static_cast(0), pol); } template inline typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol) { static const char* function = "boost::math::ibetac_inv<%1%>(%1%,%1%,%1%)"; boost::math::detail::fpu_guard local_guard_object; typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(a <= 0) policies::raise_domain_error(function, "The argument a to the incomplete beta function inverse must be greater than zero (got a=%1%).", a, pol); if(b <= 0) policies::raise_domain_error(function, "The argument b to the incomplete beta function inverse must be greater than zero (got b=%1%).", b, pol); if((q < 0) || (q > 1)) policies::raise_domain_error(function, "Argument q outside the range [0,1] in the incomplete beta function inverse (got q=%1%).", q, pol); value_type rx, ry; rx = detail::ibeta_inv_imp( static_cast(a), static_cast(b), static_cast(1 - q), static_cast(q), forwarding_policy(), &ry); if(py) *py = policies::checked_narrowing_cast(ry, function); return policies::checked_narrowing_cast(rx, function); } template inline typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py) { return ibetac_inv(a, b, q, py, policies::policy<>()); } template inline typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q) { typedef typename remove_cv::type dummy; return ibetac_inv(a, b, q, static_cast(0), policies::policy<>()); } template inline typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy& pol) { typedef typename remove_cv::type dummy; return ibetac_inv(a, b, q, static_cast(0), pol); } } } # 1440 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp" 1 # 21 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 22 "/localhome/glisse2/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp" 2 namespace boost{ namespace math{ namespace detail{ template struct beta_inv_ab_t { beta_inv_ab_t(T b_, T z_, T p_, bool invert_, bool swap_ab_) : b(b_), z(z_), p(p_), invert(invert_), swap_ab(swap_ab_) {} T operator()(T a) { return invert ? p - boost::math::ibetac(swap_ab ? b : a, swap_ab ? a : b, z, Policy()) : boost::math::ibeta(swap_ab ? b : a, swap_ab ? a : b, z, Policy()) - p; } private: T b, z, p; bool invert, swap_ab; }; template T inverse_negative_binomial_cornish_fisher(T n, T sf, T sfc, T p, T q, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T m = n * (sfc) / sf; T t = sqrt(n * (sfc)); T sigma = t / sf; T sk = (1 + sfc) / t; T k = (6 - sf * (5+sfc)) / (n * (sfc)); T x = boost::math::erfc_inv(p > q ? 2 * q : 2 * p, pol) * constants::root_two(); if(p < 0.5) x = -x; T x2 = x * x; T w = x + sk * (x2 - 1) / 6; if(n >= 10) w += k * x * (x2 - 3) / 24 + sk * sk * x * (2 * x2 - 5) / -36; w = m + sigma * w; if(w < tools::min_value()) return tools::min_value(); return w; } template T ibeta_inv_ab_imp(const T& b, const T& z, const T& p, const T& q, bool swap_ab, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; ; if(p == 0) { return swap_ab ? tools::min_value() : tools::max_value(); } if(q == 0) { return swap_ab ? tools::max_value() : tools::min_value(); } beta_inv_ab_t f(b, z, (p < q) ? p : q, (p < q) ? false : true, swap_ab); tools::eps_tolerance tol(policies::digits()); T guess = 0; T factor = 5; T n = b; T sf = swap_ab ? z : 1-z; T sfc = swap_ab ? 1-z : z; T u = swap_ab ? p : q; T v = swap_ab ? q : p; if(u <= pow(sf, n)) { if((p < q) != swap_ab) { guess = (std::min)(T(b * 2), T(1)); } else { guess = (std::min)(T(b / 2), T(1)); } } if(n * n * n * u * sf > 0.005) guess = 1 + inverse_negative_binomial_cornish_fisher(n, sf, sfc, u, v, pol); if(guess < 10) { if((p < q) != swap_ab) { guess = (std::min)(T(b * 2), T(10)); } else { guess = (std::min)(T(b / 2), T(10)); } } else factor = (v < sqrt(tools::epsilon())) ? 2 : (guess < 20 ? 1.2f : 1.1f); ; boost::uintmax_t max_iter = policies::get_max_root_iterations(); std::pair r = bracket_and_solve_root(f, guess, factor, swap_ab ? true : false, tol, max_iter, pol); if(max_iter >= policies::get_max_root_iterations()) policies::raise_evaluation_error("boost::math::ibeta_invab_imp<%1%>(%1%,%1%,%1%)", "Unable to locate the root within a reasonable number of iterations, closest approximation so far was %1%", r.first, pol); return (r.first + r.second) / 2; } } template typename tools::promote_args::type ibeta_inva(RT1 b, RT2 x, RT3 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(p == 0) { return tools::max_value(); } if(p == 1) { return tools::min_value(); } return policies::checked_narrowing_cast( detail::ibeta_inv_ab_imp( static_cast(b), static_cast(x), static_cast(p), static_cast(1 - static_cast(p)), false, pol), "boost::math::ibeta_inva<%1%>(%1%,%1%,%1%)"); } template typename tools::promote_args::type ibetac_inva(RT1 b, RT2 x, RT3 q, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(q == 1) { return tools::max_value(); } if(q == 0) { return tools::min_value(); } return policies::checked_narrowing_cast( detail::ibeta_inv_ab_imp( static_cast(b), static_cast(x), static_cast(1 - static_cast(q)), static_cast(q), false, pol), "boost::math::ibetac_inva<%1%>(%1%,%1%,%1%)"); } template typename tools::promote_args::type ibeta_invb(RT1 a, RT2 x, RT3 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(p == 0) { return tools::min_value(); } if(p == 1) { return tools::max_value(); } return policies::checked_narrowing_cast( detail::ibeta_inv_ab_imp( static_cast(a), static_cast(x), static_cast(p), static_cast(1 - static_cast(p)), true, pol), "boost::math::ibeta_invb<%1%>(%1%,%1%,%1%)"); } template typename tools::promote_args::type ibetac_invb(RT1 a, RT2 x, RT3 q, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; if(q == 1) { return tools::min_value(); } if(q == 0) { return tools::max_value(); } return policies::checked_narrowing_cast( detail::ibeta_inv_ab_imp( static_cast(a), static_cast(x), static_cast(1 - static_cast(q)), static_cast(q), true, pol), "boost::math::ibetac_invb<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type ibeta_inva(RT1 b, RT2 x, RT3 p) { return boost::math::ibeta_inva(b, x, p, policies::policy<>()); } template inline typename tools::promote_args::type ibetac_inva(RT1 b, RT2 x, RT3 q) { return boost::math::ibetac_inva(b, x, q, policies::policy<>()); } template inline typename tools::promote_args::type ibeta_invb(RT1 a, RT2 x, RT3 p) { return boost::math::ibeta_invb(a, x, p, policies::policy<>()); } template inline typename tools::promote_args::type ibetac_invb(RT1 a, RT2 x, RT3 q) { return boost::math::ibetac_invb(a, x, q, policies::policy<>()); } } } # 1441 "/localhome/glisse2/include/boost/math/special_functions/beta.hpp" 2 # 20 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/binomial.hpp" 1 # 17 "/localhome/glisse2/include/boost/math/special_functions/binomial.hpp" namespace boost{ namespace math{ template T binomial_coefficient(unsigned n, unsigned k, const Policy& pol) { static_assert(!boost::is_integral::value, "!boost::is_integral::value"); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::binomial_coefficient<%1%>(unsigned, unsigned)"; if(k > n) return policies::raise_domain_error( function, "The binomial coefficient is undefined for k > n, but got k = %1%.", k, pol); T result; if((k == 0) || (k == n)) return 1; if((k == 1) || (k == n-1)) return n; if(n <= max_factorial::value) { result = unchecked_factorial(n); result /= unchecked_factorial(n-k); result /= unchecked_factorial(k); } else { if(k < n - k) result = k * beta(static_cast(k), static_cast(n-k+1), pol); else result = (n - k) * beta(static_cast(k+1), static_cast(n-k), pol); if(result == 0) return policies::raise_overflow_error(function, 0, pol); result = 1 / result; } return ceil(result - 0.5f); } template <> inline float binomial_coefficient >(unsigned n, unsigned k, const policies::policy<>& pol) { return policies::checked_narrowing_cast >(binomial_coefficient(n, k, pol), "boost::math::binomial_coefficient<%1%>(unsigned,unsigned)"); } template inline T binomial_coefficient(unsigned n, unsigned k) { return binomial_coefficient(n, k, policies::policy<>()); } } } # 21 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/digamma.hpp" 1 # 19 "/localhome/glisse2/include/boost/math/special_functions/digamma.hpp" namespace boost{ namespace math{ namespace detail{ inline unsigned digamma_large_lim(const mpl::int_<0>*) { return 20; } inline unsigned digamma_large_lim(const void*) { return 10; } # 41 "/localhome/glisse2/include/boost/math/special_functions/digamma.hpp" template inline T digamma_imp_large(T x, const mpl::int_<0>*) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T P[] = { 0.083333333333333333333333333333333333333333333333333L, -0.0083333333333333333333333333333333333333333333333333L, 0.003968253968253968253968253968253968253968253968254L, -0.0041666666666666666666666666666666666666666666666667L, 0.0075757575757575757575757575757575757575757575757576L, -0.021092796092796092796092796092796092796092796092796L, 0.083333333333333333333333333333333333333333333333333L, -0.44325980392156862745098039215686274509803921568627L, 3.0539543302701197438039543302701197438039543302701L, -26.456212121212121212121212121212121212121212121212L, 281.4601449275362318840579710144927536231884057971L, -3607.510546398046398046398046398046398046398046398L, 54827.583333333333333333333333333333333333333333333L, -974936.82385057471264367816091954022988505747126437L, 20052695.796688078946143462272494530559046688078946L, -472384867.72162990196078431372549019607843137254902L, 12635724795.916666666666666666666666666666666666667L }; x -= 1; T result = log(x); result += 1 / (2 * x); T z = 1 / (x*x); result -= z * tools::evaluate_polynomial(P, z); return result; } template inline T digamma_imp_large(T x, const mpl::int_<64>*) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T P[] = { 0.083333333333333333333333333333333333333333333333333L, -0.0083333333333333333333333333333333333333333333333333L, 0.003968253968253968253968253968253968253968253968254L, -0.0041666666666666666666666666666666666666666666666667L, 0.0075757575757575757575757575757575757575757575757576L, -0.021092796092796092796092796092796092796092796092796L, 0.083333333333333333333333333333333333333333333333333L, -0.44325980392156862745098039215686274509803921568627L, 3.0539543302701197438039543302701197438039543302701L, -26.456212121212121212121212121212121212121212121212L, 281.4601449275362318840579710144927536231884057971L, }; x -= 1; T result = log(x); result += 1 / (2 * x); T z = 1 / (x*x); result -= z * tools::evaluate_polynomial(P, z); return result; } template inline T digamma_imp_large(T x, const mpl::int_<53>*) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T P[] = { 0.083333333333333333333333333333333333333333333333333L, -0.0083333333333333333333333333333333333333333333333333L, 0.003968253968253968253968253968253968253968253968254L, -0.0041666666666666666666666666666666666666666666666667L, 0.0075757575757575757575757575757575757575757575757576L, -0.021092796092796092796092796092796092796092796092796L, 0.083333333333333333333333333333333333333333333333333L, -0.44325980392156862745098039215686274509803921568627L }; x -= 1; T result = log(x); result += 1 / (2 * x); T z = 1 / (x*x); result -= z * tools::evaluate_polynomial(P, z); return result; } template inline T digamma_imp_large(T x, const mpl::int_<24>*) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const T P[] = { 0.083333333333333333333333333333333333333333333333333L, -0.0083333333333333333333333333333333333333333333333333L, 0.003968253968253968253968253968253968253968253968254L }; x -= 1; T result = log(x); result += 1 / (2 * x); T z = 1 / (x*x); result -= z * tools::evaluate_polynomial(P, z); return result; } template T digamma_imp_1_2(T x, const mpl::int_<0>*) { # 161 "/localhome/glisse2/include/boost/math/special_functions/digamma.hpp" static const float Y = 0.99558162689208984375F; static const T root1 = 1569415565.0 / 1073741824uL; static const T root2 = (381566830.0 / 1073741824uL) / 1073741824uL; static const T root3 = ((111616537.0 / 1073741824uL) / 1073741824uL) / 1073741824uL; static const T root4 = (((503992070.0 / 1073741824uL) / 1073741824uL) / 1073741824uL) / 1073741824uL; static const T root5 = 0.52112228569249997894452490385577338504019838794544e-36L; static const T P[] = { 0.25479851061131551526977464225335883769L, -0.18684290534374944114622235683619897417L, -0.80360876047931768958995775910991929922L, -0.67227342794829064330498117008564270136L, -0.26569010991230617151285010695543858005L, -0.05775672694575986971640757748003553385L, -0.0071432147823164975485922555833274240665L, -0.00048740753910766168912364555706064993274L, -0.16454996865214115723416538844975174761e-4L, -0.20327832297631728077731148515093164955e-6L }; static const T Q[] = { 1, 2.6210924610812025425088411043163287646L, 2.6850757078559596612621337395886392594L, 1.4320913706209965531250495490639289418L, 0.4410872083455009362557012239501953402L, 0.081385727399251729505165509278152487225L, 0.0089478633066857163432104815183858149496L, 0.00055861622855066424871506755481997374154L, 0.1760168552357342401304462967950178554e-4L, 0.20585454493572473724556649516040874384e-6L, -0.90745971844439990284514121823069162795e-11L, 0.48857673606545846774761343500033283272e-13L, }; T g = x - root1; g -= root2; g -= root3; g -= root4; g -= root5; T r = tools::evaluate_polynomial(P, T(x-1)) / tools::evaluate_polynomial(Q, T(x-1)); T result = g * Y + g * r; return result; } template T digamma_imp_1_2(T x, const mpl::int_<64>*) { # 223 "/localhome/glisse2/include/boost/math/special_functions/digamma.hpp" static const float Y = 0.99558162689208984375F; static const T root1 = 1569415565.0 / 1073741824uL; static const T root2 = (381566830.0 / 1073741824uL) / 1073741824uL; static const T root3 = 0.9016312093258695918615325266959189453125e-19L; static const T P[] = { 0.254798510611315515235L, -0.314628554532916496608L, -0.665836341559876230295L, -0.314767657147375752913L, -0.0541156266153505273939L, -0.00289268368333918761452L }; static const T Q[] = { 1, 2.1195759927055347547L, 1.54350554664961128724L, 0.486986018231042975162L, 0.0660481487173569812846L, 0.00298999662592323990972L, -0.165079794012604905639e-5L, 0.317940243105952177571e-7L }; T g = x - root1; g -= root2; g -= root3; T r = tools::evaluate_polynomial(P, x-1) / tools::evaluate_polynomial(Q, x-1); T result = g * Y + g * r; return result; } template T digamma_imp_1_2(T x, const mpl::int_<53>*) { # 273 "/localhome/glisse2/include/boost/math/special_functions/digamma.hpp" static const float Y = 0.99558162689208984F; static const T root1 = 1569415565.0 / 1073741824uL; static const T root2 = (381566830.0 / 1073741824uL) / 1073741824uL; static const T root3 = 0.9016312093258695918615325266959189453125e-19L; static const T P[] = { 0.25479851061131551L, -0.32555031186804491L, -0.65031853770896507L, -0.28919126444774784L, -0.045251321448739056L, -0.0020713321167745952L }; static const T Q[] = { 1L, 2.0767117023730469L, 1.4606242909763515L, 0.43593529692665969L, 0.054151797245674225L, 0.0021284987017821144L, -0.55789841321675513e-6L }; T g = x - root1; g -= root2; g -= root3; T r = tools::evaluate_polynomial(P, x-1) / tools::evaluate_polynomial(Q, x-1); T result = g * Y + g * r; return result; } template inline T digamma_imp_1_2(T x, const mpl::int_<24>*) { # 322 "/localhome/glisse2/include/boost/math/special_functions/digamma.hpp" static const float Y = 0.99558162689208984f; static const T root = 1532632.0f / 1048576; static const T root_minor = static_cast(0.3700660185912626595423257213284682051735604e-6L); static const T P[] = { 0.25479851023250261e0, -0.44981331915268368e0, -0.43916936919946835e0, -0.61041765350579073e-1 }; static const T Q[] = { 0.1e1, 0.15890202430554952e1, 0.65341249856146947e0, 0.63851690523355715e-1 }; T g = x - root; g -= root_minor; T r = tools::evaluate_polynomial(P, x-1) / tools::evaluate_polynomial(Q, x-1); T result = g * Y + g * r; return result; } template T digamma_imp(T x, const Tag* t, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = 0; if(x < 0) { x = 1 - x; T remainder = x - floor(x); if(remainder > 0.5) { remainder -= 1; } if(remainder == 0) { return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol); } result = constants::pi() / tan(constants::pi() * remainder); } if(x >= digamma_large_lim(t)) { result += digamma_imp_large(x, t); } else { while(x > 2) { x -= 1; result += 1/x; } if(x < 1) { result = -1/x; x += 1; } result += digamma_imp_1_2(x, t); } return result; } } template inline typename tools::promote_args::type digamma(T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_< mpl::less_equal >, mpl::greater > >, mpl::int_<0>, typename mpl::if_< mpl::less >, mpl::int_<24>, typename mpl::if_< mpl::less >, mpl::int_<53>, mpl::int_<64> >::type >::type >::type tag_type; return policies::checked_narrowing_cast(detail::digamma_imp( static_cast(x), static_cast(0), pol), "boost::math::digamma<%1%>(%1%)"); } template inline typename tools::promote_args::type digamma(T x) { return digamma(x, policies::policy<>()); } } } # 24 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/ellint_1.hpp" 1 # 21 "/localhome/glisse2/include/boost/math/special_functions/ellint_1.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/ellint_rf.hpp" 1 # 28 "/localhome/glisse2/include/boost/math/special_functions/ellint_rf.hpp" namespace boost { namespace math { namespace detail{ template T ellint_rf_imp(T x, T y, T z, const Policy& pol) { T value, X, Y, Z, E2, E3, u, lambda, tolerance; unsigned long k; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::ellint_rf<%1%>(%1%,%1%,%1%)"; if (x < 0 || y < 0 || z < 0) { return policies::raise_domain_error(function, "domain error, all arguments must be non-negative, " "only sensible result is %1%.", std::numeric_limits::quiet_NaN(), pol); } if (x + y == 0 || y + z == 0 || z + x == 0) { return policies::raise_domain_error(function, "domain error, at most one argument can be zero, " "only sensible result is %1%.", std::numeric_limits::quiet_NaN(), pol); } if(policies::digits() > 64) { tolerance = pow(tools::epsilon(), T(1)/4.25f); ; } else { tolerance = pow(4*tools::epsilon(), T(1)/6); ; } k = 1; do { u = (x + y + z) / 3; X = (u - x) / u; Y = (u - y) / u; Z = (u - z) / u; if ((tools::max)(abs(X), abs(Y), abs(Z)) < tolerance) break; T sx = sqrt(x); T sy = sqrt(y); T sz = sqrt(z); lambda = sy * (sx + sz) + sz * sx; x = (x + lambda) / 4; y = (y + lambda) / 4; z = (z + lambda) / 4; ++k; } while(k < policies::get_max_series_iterations()); policies::check_series_iterations(function, k, pol); ; E2 = X * Y - Z * Z; E3 = X * Y * Z; value = (1 + E2*(E2/24 - E3*T(3)/44 - T(0.1)) + E3/14) / sqrt(u); ; return value; } } template inline typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast( detail::ellint_rf_imp( static_cast(x), static_cast(y), static_cast(z), pol), "boost::math::ellint_rf<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z) { return ellint_rf(x, y, z, policies::policy<>()); } }} # 22 "/localhome/glisse2/include/boost/math/special_functions/ellint_1.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/tools/workaround.hpp" 1 # 15 "/localhome/glisse2/include/boost/math/tools/workaround.hpp" namespace boost{ namespace math{ namespace tools{ template inline T fmod_workaround(T a, T b) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return fmod(a, b); } # 35 "/localhome/glisse2/include/boost/math/tools/workaround.hpp" }}} # 25 "/localhome/glisse2/include/boost/math/special_functions/ellint_1.hpp" 2 namespace boost { namespace math { template typename tools::promote_args::type ellint_1(T1 k, T2 phi, const Policy& pol); namespace detail{ template T ellint_k_imp(T k, const Policy& pol); template T ellint_f_imp(T phi, T k, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; static const char* function = "boost::math::ellint_f<%1%>(%1%,%1%)"; ; ; ; if (abs(k) > 1) { return policies::raise_domain_error(function, "Got k = %1%, function requires |k| <= 1", k, pol); } bool invert = false; if(phi < 0) { ; phi = fabs(phi); invert = true; } T result; if(phi >= tools::max_value()) { result = policies::raise_overflow_error(function, 0, pol); ; } else if(phi > 1 / tools::epsilon()) { result = 2 * phi * ellint_k_imp(k, pol) / constants::pi(); ; } else { ; T rphi = boost::math::tools::fmod_workaround(phi, T(constants::pi() / 2)); ; T m = floor((2 * phi) / constants::pi()); ; int s = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) { m += 1; s = -1; rphi = constants::pi() / 2 - rphi; ; } T sinp = sin(rphi); T cosp = cos(rphi); ; ; result = s * sinp * ellint_rf_imp(T(cosp * cosp), T(1 - k * k * sinp * sinp), T(1), pol); ; if(m != 0) { result += m * ellint_k_imp(k, pol); ; } } return invert ? T(-result) : result; } template T ellint_k_imp(T k, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::ellint_k<%1%>(%1%)"; if (abs(k) > 1) { return policies::raise_domain_error(function, "Got k = %1%, function requires |k| <= 1", k, pol); } if (abs(k) == 1) { return policies::raise_overflow_error(function, 0, pol); } T x = 0; T y = 1 - k * k; T z = 1; T value = ellint_rf_imp(x, y, z, pol); return value; } template inline typename tools::promote_args::type ellint_1(T k, const Policy& pol, const mpl::true_&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::ellint_k_imp(static_cast(k), pol), "boost::math::ellint_1<%1%>(%1%)"); } template inline typename tools::promote_args::type ellint_1(T1 k, T2 phi, const mpl::false_&) { return boost::math::ellint_1(k, phi, policies::policy<>()); } } template inline typename tools::promote_args::type ellint_1(T k) { return ellint_1(k, policies::policy<>()); } template inline typename tools::promote_args::type ellint_1(T1 k, T2 phi, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::ellint_f_imp(static_cast(phi), static_cast(k), pol), "boost::math::ellint_1<%1%>(%1%,%1%)"); } template inline typename tools::promote_args::type ellint_1(T1 k, T2 phi) { typedef typename policies::is_policy::type tag_type; return detail::ellint_1(k, phi, tag_type()); } }} # 25 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/ellint_2.hpp" 1 # 22 "/localhome/glisse2/include/boost/math/special_functions/ellint_2.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/ellint_rd.hpp" 1 # 26 "/localhome/glisse2/include/boost/math/special_functions/ellint_rd.hpp" namespace boost { namespace math { namespace detail{ template T ellint_rd_imp(T x, T y, T z, const Policy& pol) { T value, u, lambda, sigma, factor, tolerance; T X, Y, Z, EA, EB, EC, ED, EE, S1, S2; unsigned long k; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::ellint_rd<%1%>(%1%,%1%,%1%)"; if (x < 0) { return policies::raise_domain_error(function, "Argument x must be >= 0, but got %1%", x, pol); } if (y < 0) { return policies::raise_domain_error(function, "Argument y must be >= 0, but got %1%", y, pol); } if (z <= 0) { return policies::raise_domain_error(function, "Argument z must be > 0, but got %1%", z, pol); } if (x + y == 0) { return policies::raise_domain_error(function, "At most one argument can be zero, but got, x + y = %1%", x+y, pol); } tolerance = pow(tools::epsilon() / 3, T(1)/6); sigma = 0; factor = 1; k = 1; do { u = (x + y + z + z + z) / 5; X = (u - x) / u; Y = (u - y) / u; Z = (u - z) / u; if ((tools::max)(abs(X), abs(Y), abs(Z)) < tolerance) break; T sx = sqrt(x); T sy = sqrt(y); T sz = sqrt(z); lambda = sy * (sx + sz) + sz * sx; sigma += factor / (sz * (z + lambda)); factor /= 4; x = (x + lambda) / 4; y = (y + lambda) / 4; z = (z + lambda) / 4; ++k; } while(k < policies::get_max_series_iterations()); policies::check_series_iterations(function, k, pol); EA = X * Y; EB = Z * Z; EC = EA - EB; ED = EA - 6 * EB; EE = ED + EC + EC; S1 = ED * (ED * T(9) / 88 - Z * EE * T(9) / 52 - T(3) / 14); S2 = Z * (EE / 6 + Z * (-EC * T(9) / 22 + Z * EA * T(3) / 26)); value = 3 * sigma + factor * (1 + S1 + S2) / (u * sqrt(u)); return value; } } template inline typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast( detail::ellint_rd_imp( static_cast(x), static_cast(y), static_cast(z), pol), "boost::math::ellint_rd<%1%>(%1%,%1%,%1%)"); } template inline typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z) { return ellint_rd(x, y, z, policies::policy<>()); } }} # 23 "/localhome/glisse2/include/boost/math/special_functions/ellint_2.hpp" 2 namespace boost { namespace math { template typename tools::promote_args::type ellint_2(T1 k, T2 phi, const Policy& pol); namespace detail{ template T ellint_e_imp(T k, const Policy& pol); template T ellint_e_imp(T phi, T k, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; bool invert = false; if(phi < 0) { phi = fabs(phi); invert = true; } T result; if(phi >= tools::max_value()) { result = policies::raise_overflow_error("boost::math::ellint_e<%1%>(%1%,%1%)", 0, pol); } else if(phi > 1 / tools::epsilon()) { result = 2 * phi * ellint_e_imp(k, pol) / constants::pi(); } else { T rphi = boost::math::tools::fmod_workaround(phi, T(constants::pi() / 2)); T m = floor((2 * phi) / constants::pi()); int s = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) { m += 1; s = -1; rphi = constants::pi() / 2 - rphi; } T sinp = sin(rphi); T cosp = cos(rphi); T x = cosp * cosp; T t = k * k * sinp * sinp; T y = 1 - t; T z = 1; result = s * sinp * (ellint_rf_imp(x, y, z, pol) - t * ellint_rd_imp(x, y, z, pol) / 3); if(m != 0) result += m * ellint_e_imp(k, pol); } return invert ? T(-result) : result; } template T ellint_e_imp(T k, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; if (abs(k) > 1) { return policies::raise_domain_error("boost::math::ellint_e<%1%>(%1%)", "Got k = %1%, function requires |k| <= 1", k, pol); } if (abs(k) == 1) { return static_cast(1); } T x = 0; T t = k * k; T y = 1 - t; T z = 1; T value = ellint_rf_imp(x, y, z, pol) - t * ellint_rd_imp(x, y, z, pol) / 3; return value; } template inline typename tools::promote_args::type ellint_2(T k, const Policy& pol, const mpl::true_&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::ellint_e_imp(static_cast(k), pol), "boost::math::ellint_2<%1%>(%1%)"); } template inline typename tools::promote_args::type ellint_2(T1 k, T2 phi, const mpl::false_&) { return boost::math::ellint_2(k, phi, policies::policy<>()); } } template inline typename tools::promote_args::type ellint_2(T k) { return ellint_2(k, policies::policy<>()); } template inline typename tools::promote_args::type ellint_2(T1 k, T2 phi) { typedef typename policies::is_policy::type tag_type; return detail::ellint_2(k, phi, tag_type()); } template inline typename tools::promote_args::type ellint_2(T1 k, T2 phi, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::ellint_e_imp(static_cast(phi), static_cast(k), pol), "boost::math::ellint_2<%1%>(%1%,%1%)"); } }} # 26 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/ellint_3.hpp" 1 # 22 "/localhome/glisse2/include/boost/math/special_functions/ellint_3.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/ellint_rj.hpp" 1 # 23 "/localhome/glisse2/include/boost/math/special_functions/ellint_rj.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/ellint_rc.hpp" 1 # 28 "/localhome/glisse2/include/boost/math/special_functions/ellint_rc.hpp" namespace boost { namespace math { namespace detail{ template T ellint_rc_imp(T x, T y, const Policy& pol) { T value, S, u, lambda, tolerance, prefix; unsigned long k; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::ellint_rc<%1%>(%1%,%1%)"; if(x < 0) { return policies::raise_domain_error(function, "Argument x must be non-negative but got %1%", x, pol); } if(y == 0) { return policies::raise_domain_error(function, "Argument y must not be zero but got %1%", y, pol); } tolerance = pow(4 * tools::epsilon(), T(1) / 6); if (y < 0) { prefix = sqrt(x / (x - y)); x = x - y; y = -y; } else prefix = 1; k = 1; do { u = (x + y + y) / 3; S = y / u - 1; if (2 * abs(S) < tolerance) break; T sx = sqrt(x); T sy = sqrt(y); lambda = 2 * sx * sy + y; x = (x + lambda) / 4; y = (y + lambda) / 4; ++k; }while(k < policies::get_max_series_iterations()); policies::check_series_iterations(function, k, pol); value = (1 + S * S * (T(3) / 10 + S * (T(1) / 7 + S * (T(3) / 8 + S * T(9) / 22)))) / sqrt(u); return value * prefix; } } template inline typename tools::promote_args::type ellint_rc(T1 x, T2 y, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast( detail::ellint_rc_imp( static_cast(x), static_cast(y), pol), "boost::math::ellint_rc<%1%>(%1%,%1%)"); } template inline typename tools::promote_args::type ellint_rc(T1 x, T2 y) { return ellint_rc(x, y, policies::policy<>()); } }} # 24 "/localhome/glisse2/include/boost/math/special_functions/ellint_rj.hpp" 2 namespace boost { namespace math { namespace detail{ template T ellint_rj_imp(T x, T y, T z, T p, const Policy& pol) { T value, u, lambda, alpha, beta, sigma, factor, tolerance; T X, Y, Z, P, EA, EB, EC, E2, E3, S1, S2, S3; unsigned long k; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::ellint_rj<%1%>(%1%,%1%,%1%)"; if (x < 0) { return policies::raise_domain_error(function, "Argument x must be non-negative, but got x = %1%", x, pol); } if(y < 0) { return policies::raise_domain_error(function, "Argument y must be non-negative, but got y = %1%", y, pol); } if(z < 0) { return policies::raise_domain_error(function, "Argument z must be non-negative, but got z = %1%", z, pol); } if(p == 0) { return policies::raise_domain_error(function, "Argument p must not be zero, but got p = %1%", p, pol); } if (x + y == 0 || y + z == 0 || z + x == 0) { return policies::raise_domain_error(function, "At most one argument can be zero, " "only possible result is %1%.", std::numeric_limits::quiet_NaN(), pol); } tolerance = pow(T(1) * tools::epsilon() / 3, T(1) / 6); if (p < 0) { if(x > y) std::swap(x, y); if(y > z) std::swap(y, z); if(x > y) std::swap(x, y); T q = -p; T pmy = (z - y) * (y - x) / (y + q); ((pmy >= 0) ? static_cast (0) : __assert_fail ("pmy >= 0", "/localhome/glisse2/include/boost/math/special_functions/ellint_rj.hpp", 92, __PRETTY_FUNCTION__)); T p = pmy + y; value = boost::math::ellint_rj(x, y, z, p, pol); value *= pmy; value -= 3 * boost::math::ellint_rf(x, y, z, pol); value += 3 * sqrt((x * y * z) / (x * z + p * q)) * boost::math::ellint_rc(x * z + p * q, p * q, pol); value /= (y + q); return value; } sigma = 0; factor = 1; k = 1; do { u = (x + y + z + p + p) / 5; X = (u - x) / u; Y = (u - y) / u; Z = (u - z) / u; P = (u - p) / u; if ((tools::max)(abs(X), abs(Y), abs(Z), abs(P)) < tolerance) break; T sx = sqrt(x); T sy = sqrt(y); T sz = sqrt(z); lambda = sy * (sx + sz) + sz * sx; alpha = p * (sx + sy + sz) + sx * sy * sz; alpha *= alpha; beta = p * (p + lambda) * (p + lambda); sigma += factor * boost::math::ellint_rc(alpha, beta, pol); factor /= 4; x = (x + lambda) / 4; y = (y + lambda) / 4; z = (z + lambda) / 4; p = (p + lambda) / 4; ++k; } while(k < policies::get_max_series_iterations()); policies::check_series_iterations(function, k, pol); EA = X * Y + Y * Z + Z * X; EB = X * Y * Z; EC = P * P; E2 = EA - 3 * EC; E3 = EB + 2 * P * (EA - EC); S1 = 1 + E2 * (E2 * T(9) / 88 - E3 * T(9) / 52 - T(3) / 14); S2 = EB * (T(1) / 6 + P * (T(-6) / 22 + P * T(3) / 26)); S3 = P * ((EA - EC) / 3 - P * EA * T(3) / 22); value = 3 * sigma + factor * (S1 + S2 + S3) / (u * sqrt(u)); return value; } } template inline typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast( detail::ellint_rj_imp( static_cast(x), static_cast(y), static_cast(z), static_cast(p), pol), "boost::math::ellint_rj<%1%>(%1%,%1%,%1%,%1%)"); } template inline typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p) { return ellint_rj(x, y, z, p, policies::policy<>()); } }} # 23 "/localhome/glisse2/include/boost/math/special_functions/ellint_3.hpp" 2 # 33 "/localhome/glisse2/include/boost/math/special_functions/ellint_3.hpp" namespace boost { namespace math { namespace detail{ template T ellint_pi_imp(T v, T k, T vc, const Policy& pol); template T ellint_pi_imp(T v, T phi, T k, T vc, const Policy& pol) { T value, x, y, z, p, t; using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; using namespace boost::math::constants; static const char* function = "boost::math::ellint_3<%1%>(%1%,%1%,%1%)"; if (abs(k) > 1) { return policies::raise_domain_error(function, "Got k = %1%, function requires |k| <= 1", k, pol); } T sphi = sin(fabs(phi)); if(v > 1 / (sphi * sphi)) { return policies::raise_domain_error(function, "Got v = %1%, but result is complex for v > 1 / sin^2(phi)", v, pol); } if(v == 0) { return (k == 0) ? phi : ellint_f_imp(phi, k, pol); } if(phi == constants::pi() / 2) { return ellint_pi_imp(v, k, vc, pol); } if(k == 0) { if(v < 1) { T vcr = sqrt(vc); return atan(vcr * tan(phi)) / vcr; } else if(v == 1) { return tan(phi); } else { T vcr = sqrt(-vc); T arg = vcr * tan(phi); return (boost::math::log1p(arg, pol) - boost::math::log1p(-arg, pol)) / (2 * vcr); } } if(v < 0) { T k2 = k * k; T N = (k2 - v) / (1 - v); T Nm1 = (1 - k2) / (1 - v); T p2 = sqrt(-v * (k2 - v) / (1 - v)); T delta = sqrt(1 - k2 * sphi * sphi); T result = ellint_pi_imp(N, phi, k, Nm1, pol); result *= sqrt(Nm1 * (1 - k2 / N)); result += ellint_f_imp(phi, k, pol) * k2 / p2; result += atan((p2/2) * sin(2 * phi) / delta); result /= sqrt((1 - v) * (1 - k2 / v)); return result; } # 171 "/localhome/glisse2/include/boost/math/special_functions/ellint_3.hpp" if(fabs(phi) > 1 / tools::epsilon()) { if(v > 1) return policies::raise_domain_error( function, "Got v = %1%, but this is only supported for 0 <= phi <= pi/2", v, pol); value = 2 * fabs(phi) * ellint_pi_imp(v, k, vc, pol) / constants::pi(); } else { T rphi = boost::math::tools::fmod_workaround(T(fabs(phi)), T(constants::pi() / 2)); T m = floor((2 * fabs(phi)) / constants::pi()); int sign = 1; if(boost::math::tools::fmod_workaround(m, T(2)) > 0.5) { m += 1; sign = -1; rphi = constants::pi() / 2 - rphi; } T sinp = sin(rphi); T cosp = cos(rphi); x = cosp * cosp; t = sinp * sinp; y = 1 - k * k * t; z = 1; if(v * t < 0.5) p = 1 - v * t; else p = x + vc * t; value = sign * sinp * (ellint_rf_imp(x, y, z, pol) + v * t * ellint_rj_imp(x, y, z, p, pol) / 3); if((m > 0) && (vc > 0)) value += m * ellint_pi_imp(v, k, vc, pol); } if (phi < 0) { value = -value; } return value; } template T ellint_pi_imp(T v, T k, T vc, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; using namespace boost::math::tools; static const char* function = "boost::math::ellint_pi<%1%>(%1%,%1%)"; if (abs(k) >= 1) { return policies::raise_domain_error(function, "Got k = %1%, function requires |k| <= 1", k, pol); } if(vc <= 0) { return policies::raise_domain_error(function, "Got v = %1%, function requires v < 1", v, pol); } if(v == 0) { return (k == 0) ? boost::math::constants::pi() / 2 : ellint_k_imp(k, pol); } if(v < 0) { T k2 = k * k; T N = (k2 - v) / (1 - v); T Nm1 = (1 - k2) / (1 - v); T p2 = sqrt(-v * (k2 - v) / (1 - v)); T result = boost::math::detail::ellint_pi_imp(N, k, Nm1, pol); result *= sqrt(Nm1 * (1 - k2 / N)); result += ellint_k_imp(k, pol) * k2 / p2; result /= sqrt((1 - v) * (1 - k2 / v)); return result; } T x = 0; T y = 1 - k * k; T z = 1; T p = vc; T value = ellint_rf_imp(x, y, z, pol) + v * ellint_rj_imp(x, y, z, p, pol) / 3; return value; } template inline typename tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi, const mpl::false_&) { return boost::math::ellint_3(k, v, phi, policies::policy<>()); } template inline typename tools::promote_args::type ellint_3(T1 k, T2 v, const Policy& pol, const mpl::true_&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast( detail::ellint_pi_imp( static_cast(v), static_cast(k), static_cast(1-v), pol), "boost::math::ellint_3<%1%>(%1%,%1%)"); } } template inline typename tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast( detail::ellint_pi_imp( static_cast(v), static_cast(phi), static_cast(k), static_cast(1-v), pol), "boost::math::ellint_3<%1%>(%1%,%1%,%1%)"); } template typename detail::ellint_3_result::type ellint_3(T1 k, T2 v, T3 phi) { typedef typename policies::is_policy::type tag_type; return detail::ellint_3(k, v, phi, tag_type()); } template inline typename tools::promote_args::type ellint_3(T1 k, T2 v) { return ellint_3(k, v, policies::policy<>()); } }} # 27 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/expint.hpp" 1 # 20 "/localhome/glisse2/include/boost/math/special_functions/expint.hpp" # 1 "/localhome/glisse2/include/boost/math/special_functions/pow.hpp" 1 # 22 "/localhome/glisse2/include/boost/math/special_functions/pow.hpp" namespace boost { namespace math { namespace detail { template struct positive_power { template static T result(T base) { T power = positive_power::result(base); return power * power; } }; template struct positive_power { template static T result(T base) { T power = positive_power::result(base); return base * power * power; } }; template <> struct positive_power<1, 1> { template static T result(T base){ return base; } }; template struct power_if_positive { template static T result(T base, const Policy&) { return positive_power::result(base); } }; template struct power_if_positive { template static T result(T base, const Policy& policy) { if (base == 0) { return policies::raise_overflow_error( "boost::math::pow(%1%)", "Attempted to compute a negative power of 0", policy ); } return T(1) / positive_power<-N>::result(base); } }; template <> struct power_if_positive<0, true> { template static T result(T base, const Policy& policy) { if (base == 0) { return policies::raise_indeterminate_result_error( "boost::math::pow(%1%)", "The result of pow<0>(%1%) is undetermined", base, T(1), policy ); } return T(1); } }; template struct select_power_if_positive { typedef typename mpl::greater_equal< mpl::int_, mpl::int_<0> >::type is_positive; typedef power_if_positive type; }; } template inline typename tools::promote_args::type pow(T base, const Policy& policy) { typedef typename tools::promote_args::type result_type; return detail::select_power_if_positive::type::result(static_cast(base), policy); } template inline typename tools::promote_args::type pow(T base) { return pow(base, policies::policy<>()); } } } # 21 "/localhome/glisse2/include/boost/math/special_functions/expint.hpp" 2 namespace boost{ namespace math{ template inline typename tools::promote_args::type expint(unsigned n, T z, const Policy& ); namespace detail{ template inline T expint_1_rational(const T& z, const mpl::int_<0>&) { ((0) ? static_cast (0) : __assert_fail ("0", "/localhome/glisse2/include/boost/math/special_functions/expint.hpp", 34, __PRETTY_FUNCTION__)); return z; } template T expint_1_rational(const T& z, const mpl::int_<53>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; if(z <= 1) { static const T Y = 0.66373538970947265625F; static const T P[6] = { 0.0865197248079397976498L, 0.0320913665303559189999L, -0.245088216639761496153L, -0.0368031736257943745142L, -0.00399167106081113256961L, -0.000111507792921197858394L }; static const T Q[6] = { 1L, 0.37091387659397013215L, 0.056770677104207528384L, 0.00427347600017103698101L, 0.000131049900798434683324L, -0.528611029520217142048e-6L }; result = tools::evaluate_polynomial(P, z) / tools::evaluate_polynomial(Q, z); result += z - log(z) - Y; } else if(z < -boost::math::tools::log_min_value()) { static const T P[11] = { -0.121013190657725568138e-18L, -0.999999999999998811143L, -43.3058660811817946037L, -724.581482791462469795L, -6046.8250112711035463L, -27182.6254466733970467L, -66598.2652345418633509L, -86273.1567711649528784L, -54844.4587226402067411L, -14751.4895786128450662L, -1185.45720315201027667L }; static const T Q[12] = { 1L, 45.3058660811801465927L, 809.193214954550328455L, 7417.37624454689546708L, 38129.5594484818471461L, 113057.05869159631492L, 192104.047790227984431L, 180329.498380501819718L, 86722.3403467334749201L, 18455.4124737722049515L, 1229.20784182403048905L, -0.776491285282330997549L }; T recip = 1 / z; result = 1 + tools::evaluate_polynomial(P, recip) / tools::evaluate_polynomial(Q, recip); result *= exp(-z) * recip; } else { result = 0; } return result; } template T expint_1_rational(const T& z, const mpl::int_<64>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; if(z <= 1) { static const T Y = 0.66373538970947265625F; static const T P[6] = { 0.0865197248079397956816L, 0.0275114007037026844633L, -0.246594388074877139824L, -0.0237624819878732642231L, -0.00259113319641673986276L, 0.30853660894346057053e-4L }; static const T Q[7] = { 1L, 0.317978365797784100273L, 0.0393622602554758722511L, 0.00204062029115966323229L, 0.732512107100088047854e-5L, -0.202872781770207871975e-5L, 0.52779248094603709945e-7L }; result = tools::evaluate_polynomial(P, z) / tools::evaluate_polynomial(Q, z); result += z - log(z) - Y; } else if(z < -boost::math::tools::log_min_value()) { static const T P[14] = { -0.534401189080684443046e-23L, -0.999999999999999999905L, -62.1517806091379402505L, -1568.45688271895145277L, -21015.3431990874009619L, -164333.011755931661949L, -777917.270775426696103L, -2244188.56195255112937L, -3888702.98145335643429L, -3909822.65621952648353L, -2149033.9538897398457L, -584705.537139793925189L, -65815.2605361889477244L, -2038.82870680427258038L }; static const T Q[14] = { 1L, 64.1517806091379399478L, 1690.76044393722763785L, 24035.9534033068949426L, 203679.998633572361706L, 1074661.58459976978285L, 3586552.65020899358773L, 7552186.84989547621411L, 9853333.79353054111434L, 7689642.74550683631258L, 3385553.35146759180739L, 763218.072732396428725L, 73930.2995984054930821L, 2063.86994219629165937L }; T recip = 1 / z; result = 1 + tools::evaluate_polynomial(P, recip) / tools::evaluate_polynomial(Q, recip); result *= exp(-z) * recip; } else { result = 0; } return result; } template T expint_1_rational(const T& z, const mpl::int_<113>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; if(z <= 1) { static const T Y = 0.66373538970947265625F; static const T P[10] = { 0.0865197248079397956434879099175975937L, 0.0369066175910795772830865304506087759L, -0.24272036838415474665971599314725545L, -0.0502166331248948515282379137550178307L, -0.00768384138547489410285101483730424919L, -0.000612574337702109683505224915484717162L, -0.380207107950635046971492617061708534e-4L, -0.136528159460768830763009294683628406e-5L, -0.346839106212658259681029388908658618e-7L, -0.340500302777838063940402160594523429e-9L }; static const T Q[10] = { 1L, 0.426568827778942588160423015589537302L, 0.0841384046470893490592450881447510148L, 0.0100557215850668029618957359471132995L, 0.000799334870474627021737357294799839363L, 0.434452090903862735242423068552687688e-4L, 0.15829674748799079874182885081231252e-5L, 0.354406206738023762100882270033082198e-7L, 0.369373328141051577845488477377890236e-9L, -0.274149801370933606409282434677600112e-12L }; result = tools::evaluate_polynomial(P, z) / tools::evaluate_polynomial(Q, z); result += z - log(z) - Y; } else if(z <= 4) { static const T Y = 0.70190334320068359375F; static const T P[17] = { 0.298096656795020369955077350585959794L, 12.9314045995266142913135497455971247L, 226.144334921582637462526628217345501L, 2070.83670924261732722117682067381405L, 10715.1115684330959908244769731347186L, 30728.7876355542048019664777316053311L, 38520.6078609349855436936232610875297L, -27606.0780981527583168728339620565165L, -169026.485055785605958655247592604835L, -254361.919204983608659069868035092282L, -195765.706874132267953259272028679935L, -83352.6826013533205474990119962408675L, -19251.6828496869586415162597993050194L, -2226.64251774578542836725386936102339L, -109.009437301400845902228611986479816L, -1.51492042209561411434644938098833499L }; static const T Q[16] = { 1L, 46.734521442032505570517810766704587L, 908.694714348462269000247450058595655L, 9701.76053033673927362784882748513195L, 63254.2815292641314236625196594947774L, 265115.641285880437335106541757711092L, 732707.841188071900498536533086567735L, 1348514.02492635723327306628712057794L, 1649986.81455283047769673308781585991L, 1326000.828522976970116271208812099L, 683643.09490612171772350481773951341L, 217640.505137263607952365685653352229L, 40288.3467237411710881822569476155485L, 3932.89353979531632559232883283175754L, 169.845369689596739824177412096477219L, 2.17607292280092201170768401876895354L }; T recip = 1 / z; result = Y + tools::evaluate_polynomial(P, recip) / tools::evaluate_polynomial(Q, recip); result *= exp(-z) * recip; } else if(z < -boost::math::tools::log_min_value()) { static const T P[19] = { -0.559148411832951463689610809550083986e-40L, -0.999999999999999999999999999999999997L, -166.542326331163836642960118190147367L, -12204.639128796330005065904675153652L, -520807.069767086071806275022036146855L, -14435981.5242137970691490903863125326L, -274574945.737064301247496460758654196L, -3691611582.99810039356254671781473079L, -35622515944.8255047299363690814678763L, -248040014774.502043161750715548451142L, -1243190389769.53458416330946622607913L, -4441730126135.54739052731990368425339L, -11117043181899.7388524310281751971366L, -18976497615396.9717776601813519498961L, -21237496819711.1011661104761906067131L, -14695899122092.5161620333466757812848L, -5737221535080.30569711574295785864903L, -1077042281708.42654526404581272546244L, -68028222642.1941480871395695677675137L }; static const T Q[20] = { 1L, 168.542326331163836642960118190147311L, 12535.7237814586576783518249115343619L, 544891.263372016404143120911148640627L, 15454474.7241010258634446523045237762L, 302495899.896629522673410325891717381L, 4215565948.38886507646911672693270307L, 42552409471.7951815668506556705733344L, 313592377066.753173979584098301610186L, 1688763640223.4541980740597514904542L, 6610992294901.59589748057620192145704L, 18601637235659.6059890851321772682606L, 36944278231087.2571020964163402941583L, 50425858518481.7497071917028793820058L, 45508060902865.0899967797848815980644L, 25649955002765.3817331501988304758142L, 8259575619094.6518520988612711292331L, 1299981487496.12607474362723586264515L, 70242279152.8241187845178443118302693L, -37633302.9409263839042721539363416685L }; T recip = 1 / z; result = 1 + tools::evaluate_polynomial(P, recip) / tools::evaluate_polynomial(Q, recip); result *= exp(-z) * recip; } else { result = 0; } return result; } template struct expint_fraction { typedef std::pair result_type; expint_fraction(unsigned n_, T z_) : b(n_ + z_), i(-1), n(n_){} std::pair operator()() { std::pair result = std::make_pair(-static_cast((i+1) * (n+i)), b); b += 2; ++i; return result; } private: T b; int i; unsigned n; }; template inline T expint_as_fraction(unsigned n, T z, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; boost::uintmax_t max_iter = policies::get_max_series_iterations(); expint_fraction f(n, z); T result = tools::continued_fraction_b( f, boost::math::policies::get_epsilon(), max_iter); policies::check_series_iterations("boost::math::expint_continued_fraction<%1%>(unsigned,%1%)", max_iter, pol); result = exp(-z) / result; return result; } template struct expint_series { typedef T result_type; expint_series(unsigned k_, T z_, T x_k_, T denom_, T fact_) : k(k_), z(z_), x_k(x_k_), denom(denom_), fact(fact_){} T operator()() { x_k *= -z; denom += 1; fact *= ++k; return x_k / (denom * fact); } private: unsigned k; T z; T x_k; T denom; T fact; }; template inline T expint_as_series(unsigned n, T z, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; boost::uintmax_t max_iter = policies::get_max_series_iterations(); T result = 0; T x_k = -1; T denom = T(1) - n; T fact = 1; unsigned k = 0; for(; k < n - 1;) { result += x_k / (denom * fact); denom += 1; x_k *= -z; fact *= ++k; } result += pow(-z, static_cast(n - 1)) * (boost::math::digamma(static_cast(n)) - log(z)) / fact; expint_series s(k, z, x_k, denom, fact); result = tools::sum_series(s, policies::get_epsilon(), max_iter, result); policies::check_series_iterations("boost::math::expint_series<%1%>(unsigned,%1%)", max_iter, pol); return result; } template T expint_imp(unsigned n, T z, const Policy& pol, const Tag& tag) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::expint<%1%>(unsigned, %1%)"; if(z < 0) return policies::raise_domain_error(function, "Function requires z >= 0 but got %1%.", z, pol); if(z == 0) return n == 1 ? policies::raise_overflow_error(function, 0, pol) : T(1 / (static_cast(n - 1))); T result; bool f; if(n < 3) { f = z < 0.5; } else { f = z < (static_cast(n - 2) / static_cast(n - 1)); } if(n == 0) result = exp(-z) / z; else if((n == 1) && (Tag::value)) { result = expint_1_rational(z, tag); } else if(f) result = expint_as_series(n, z, pol); else result = expint_as_fraction(n, z, pol); return result; } template struct expint_i_series { typedef T result_type; expint_i_series(T z_) : k(0), z_k(1), z(z_){} T operator()() { z_k *= z / ++k; return z_k / k; } private: unsigned k; T z_k; T z; }; template T expint_i_as_series(T z, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result = log(z); result += constants::euler(); expint_i_series s(z); boost::uintmax_t max_iter = policies::get_max_series_iterations(); result = tools::sum_series(s, policies::get_epsilon(), max_iter, result); policies::check_series_iterations("boost::math::expint_i_series<%1%>(%1%)", max_iter, pol); return result; } template T expint_i_imp(T z, const Policy& pol, const Tag& tag) { static const char* function = "boost::math::expint<%1%>(%1%)"; if(z < 0) return -expint_imp(1, T(-z), pol, tag); if(z == 0) return -policies::raise_overflow_error(function, 0, pol); return expint_i_as_series(z, pol); } template T expint_i_imp(T z, const Policy& pol, const mpl::int_<53>& tag) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::expint<%1%>(%1%)"; if(z < 0) return -expint_imp(1, -z, pol, tag); if(z == 0) return -policies::raise_overflow_error(function, 0, pol); T result; if(z <= 6) { static const T P[10] = { 2.98677224343598593013L, 0.356343618769377415068L, 0.780836076283730801839L, 0.114670926327032002811L, 0.0499434773576515260534L, 0.00726224593341228159561L, 0.00115478237227804306827L, 0.000116419523609765200999L, 0.798296365679269702435e-5L, 0.2777056254402008721e-6L }; static const T Q[8] = { 1L, -1.17090412365413911947L, 0.62215109846016746276L, -0.195114782069495403315L, 0.0391523431392967238166L, -0.00504800158663705747345L, 0.000389034007436065401822L, -0.138972589601781706598e-4L }; static const T r1 = static_cast(1677624236387711.0L / 4503599627370496.0L); static const T r2 = 0.131401834143860282009280387409357165515556574352422001206362e-16L; static const T r = static_cast(0.372507410781366634461991866580119133535689497771654051555657435242200120636201854384926049951548942392L); T t = (z / 3) - 1; result = tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); t = (z - r1) - r2; result *= t; if(fabs(t) < 0.1) { result += boost::math::log1p(t / r); } else { result += log(z / r); } } else if (z <= 10) { static const T Y = 1.158985137939453125F; static const T P[8] = { 0.00139324086199402804173L, -0.0349921221823888744966L, -0.0264095520754134848538L, -0.00761224003005476438412L, -0.00247496209592143627977L, -0.000374885917942100256775L, -0.554086272024881826253e-4L, -0.396487648924804510056e-5L }; static const T Q[8] = { 1L, 0.744625566823272107711L, 0.329061095011767059236L, 0.100128624977313872323L, 0.0223851099128506347278L, 0.00365334190742316650106L, 0.000402453408512476836472L, 0.263649630720255691787e-4L }; T t = z / 2 - 4; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 20) { static const T Y = 1.0869731903076171875F; static const T P[9] = { -0.00893891094356945667451L, -0.0484607730127134045806L, -0.0652810444222236895772L, -0.0478447572647309671455L, -0.0226059218923777094596L, -0.00720603636917482065907L, -0.00155941947035972031334L, -0.000209750022660200888349L, -0.138652200349182596186e-4L }; static const T Q[9] = { 1L, 1.97017214039061194971L, 1.86232465043073157508L, 1.09601437090337519977L, 0.438873285773088870812L, 0.122537731979686102756L, 0.0233458478275769288159L, 0.00278170769163303669021L, 0.000159150281166108755531L }; T t = z / 5 - 3; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 40) { static const T Y = 1.03937530517578125F; static const T P[9] = { -0.00356165148914447597995L, -0.0229930320357982333406L, -0.0449814350482277917716L, -0.0453759383048193402336L, -0.0272050837209380717069L, -0.00994403059883350813295L, -0.00207592267812291726961L, -0.000192178045857733706044L, -0.113161784705911400295e-9L }; static const T Q[9] = { 1L, 2.84354408840148561131L, 3.6599610090072393012L, 2.75088464344293083595L, 1.2985244073998398643L, 0.383213198510794507409L, 0.0651165455496281337831L, 0.00488071077519227853585L }; T t = z / 10 - 3; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else { static const T exp40 = static_cast(2.35385266837019985407899910749034804508871617254555467236651e17L); static const T Y= 1.013065338134765625F; static const T P[6] = { -0.0130653381347656243849L, 0.19029710559486576682L, 94.7365094537197236011L, -2516.35323679844256203L, 18932.0850014925993025L, -38703.1431362056714134L }; static const T Q[7] = { 1L, 61.9733592849439884145L, -2354.56211323420194283L, 22329.1459489893079041L, -70126.245140396567133L, 54738.2833147775537106L, 8297.16296356518409347L }; T t = 1 / z; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); if(z < 41) result *= exp(z) / z; else { t = z - 40; if(t > tools::log_max_value()) { result = policies::raise_overflow_error(function, 0, pol); } else { result *= exp(z - 40) / z; if(result > tools::max_value() / exp40) { result = policies::raise_overflow_error(function, 0, pol); } else { result *= exp40; } } } result += z; } return result; } template T expint_i_imp(T z, const Policy& pol, const mpl::int_<64>& tag) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::expint<%1%>(%1%)"; if(z < 0) return -expint_imp(1, -z, pol, tag); if(z == 0) return -policies::raise_overflow_error(function, 0, pol); T result; if(z <= 6) { static const T P[11] = { 2.98677224343598593764L, 0.25891613550886736592L, 0.789323584998672832285L, 0.092432587824602399339L, 0.0514236978728625906656L, 0.00658477469745132977921L, 0.00124914538197086254233L, 0.000131429679565472408551L, 0.11293331317982763165e-4L, 0.629499283139417444244e-6L, 0.177833045143692498221e-7L }; static const T Q[9] = { 1L, -1.20352377969742325748L, 0.66707904942606479811L, -0.223014531629140771914L, 0.0493340022262908008636L, -0.00741934273050807310677L, 0.00074353567782087939294L, -0.455861727069603367656e-4L, 0.131515429329812837701e-5L }; static const T r1 = static_cast(1677624236387711.0L / 4503599627370496.0L); static const T r2 = 0.131401834143860282009280387409357165515556574352422001206362e-16L; static const T r = static_cast(0.372507410781366634461991866580119133535689497771654051555657435242200120636201854384926049951548942392L); T t = (z / 3) - 1; result = tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); t = (z - r1) - r2; result *= t; if(fabs(t) < 0.1) { result += boost::math::log1p(t / r); } else { result += log(z / r); } } else if (z <= 10) { static const T Y = 1.158985137939453125F; static const T P[9] = { 0.00139324086199409049399L, -0.0345238388952337563247L, -0.0382065278072592940767L, -0.0156117003070560727392L, -0.00383276012430495387102L, -0.000697070540945496497992L, -0.877310384591205930343e-4L, -0.623067256376494930067e-5L, -0.377246883283337141444e-6L }; static const T Q[10] = { 1L, 1.08073635708902053767L, 0.553681133533942532909L, 0.176763647137553797451L, 0.0387891748253869928121L, 0.0060603004848394727017L, 0.000670519492939992806051L, 0.4947357050100855646e-4L, 0.204339282037446434827e-5L, 0.146951181174930425744e-7L }; T t = z / 2 - 4; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 20) { static const T Y = 1.0869731903076171875F; static const T P[10] = { -0.00893891094356946995368L, -0.0487562980088748775943L, -0.0670568657950041926085L, -0.0509577352851442932713L, -0.02551800927409034206L, -0.00892913759760086687083L, -0.00224469630207344379888L, -0.000392477245911296982776L, -0.44424044184395578775e-4L, -0.252788029251437017959e-5L }; static const T Q[10] = { 1L, 2.00323265503572414261L, 1.94688958187256383178L, 1.19733638134417472296L, 0.513137726038353385661L, 0.159135395578007264547L, 0.0358233587351620919881L, 0.0056716655597009417875L, 0.000577048986213535829925L, 0.290976943033493216793e-4L }; T t = z / 5 - 3; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 40) { static const T Y = 1.03937530517578125F; static const T P[12] = { -0.00356165148914447278177L, -0.0240235006148610849678L, -0.0516699967278057976119L, -0.0586603078706856245674L, -0.0409960120868776180825L, -0.0185485073689590665153L, -0.00537842101034123222417L, -0.000920988084778273760609L, -0.716742618812210980263e-4L, -0.504623302166487346677e-9L, 0.712662196671896837736e-10L, -0.533769629702262072175e-11L }; static const T Q[9] = { 1L, 3.13286733695729715455L, 4.49281223045653491929L, 3.84900294427622911374L, 2.15205199043580378211L, 0.802912186540269232424L, 0.194793170017818925388L, 0.0280128013584653182994L, 0.00182034930799902922549L }; T t = z / 10 - 3; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else { static const T exp40 = static_cast(2.35385266837019985407899910749034804508871617254555467236651e17L); static const T Y= 1.013065338134765625F; static const T P[9] = { -0.0130653381347656250004L, 0.644487780349757303739L, 143.995670348227433964L, -13918.9322758014173709L, 476260.975133624194484L, -7437102.15135982802122L, 53732298.8764767916542L, -160695051.957997452509L, 137839271.592778020028L }; static const T Q[9] = { 1L, 27.2103343964943718802L, -8785.48528692879413676L, 397530.290000322626766L, -7356441.34957799368252L, 63050914.5343400957524L, -246143779.638307701369L, 384647824.678554961174L, -166288297.874583961493L }; T t = 1 / z; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); if(z < 41) result *= exp(z) / z; else { t = z - 40; if(t > tools::log_max_value()) { result = policies::raise_overflow_error(function, 0, pol); } else { result *= exp(z - 40) / z; if(result > tools::max_value() / exp40) { result = policies::raise_overflow_error(function, 0, pol); } else { result *= exp40; } } } result += z; } return result; } template T expint_i_imp(T z, const Policy& pol, const mpl::int_<113>& tag) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "boost::math::expint<%1%>(%1%)"; if(z < 0) return -expint_imp(1, -z, pol, tag); if(z == 0) return -policies::raise_overflow_error(function, 0, pol); T result; if(z <= 6) { static const T P[15] = { 2.98677224343598593765287235997328555L, -0.333256034674702967028780537349334037L, 0.851831522798101228384971644036708463L, -0.0657854833494646206186773614110374948L, 0.0630065662557284456000060708977935073L, -0.00311759191425309373327784154659649232L, 0.00176213568201493949664478471656026771L, -0.491548660404172089488535218163952295e-4L, 0.207764227621061706075562107748176592e-4L, -0.225445398156913584846374273379402765e-6L, 0.996939977231410319761273881672601592e-7L, 0.212546902052178643330520878928100847e-9L, 0.154646053060262871360159325115980023e-9L, 0.143971277122049197323415503594302307e-11L, 0.306243138978114692252817805327426657e-13L }; static const T Q[15] = { 1L, -1.40178870313943798705491944989231793L, 0.943810968269701047641218856758605284L, -0.405026631534345064600850391026113165L, 0.123924153524614086482627660399122762L, -0.0286364505373369439591132549624317707L, 0.00516148845910606985396596845494015963L, -0.000738330799456364820380739850924783649L, 0.843737760991856114061953265870882637e-4L, -0.767957673431982543213661388914587589e-5L, 0.549136847313854595809952100614840031e-6L, -0.299801381513743676764008325949325404e-7L, 0.118419479055346106118129130945423483e-8L, -0.30372295663095470359211949045344607e-10L, 0.382742953753485333207877784720070523e-12L }; static const T r1 = static_cast(1677624236387711.0L / 4503599627370496.0L); static const T r2 = static_cast(266514582277687.0L / 4503599627370496.0L / 4503599627370496.0L); static const T r3 = static_cast(0.283806480836357377069325311780969887585024578164571984232357e-31L); static const T r = static_cast(0.372507410781366634461991866580119133535689497771654051555657435242200120636201854384926049951548942392L); T t = (z / 3) - 1; result = tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); t = ((z - r1) - r2) - r3; result *= t; if(fabs(t) < 0.1) { result += boost::math::log1p(t / r); } else { result += log(z / r); } } else if (z <= 10) { static const T Y = 1.158985137939453125F; static const T P[15] = { 0.00139324086199409049282472239613554817L, -0.0338173111691991289178779840307998955L, -0.0555972290794371306259684845277620556L, -0.0378677976003456171563136909186202177L, -0.0152221583517528358782902783914356667L, -0.00428283334203873035104248217403126905L, -0.000922782631491644846511553601323435286L, -0.000155513428088853161562660696055496696L, -0.205756580255359882813545261519317096e-4L, -0.220327406578552089820753181821115181e-5L, -0.189483157545587592043421445645377439e-6L, -0.122426571518570587750898968123803867e-7L, -0.635187358949437991465353268374523944e-9L, -0.203015132965870311935118337194860863e-10L, -0.384276705503357655108096065452950822e-12L }; static const T Q[15] = { 1L, 1.58784732785354597996617046880946257L, 1.18550755302279446339364262338114098L, 0.55598993549661368604527040349702836L, 0.184290888380564236919107835030984453L, 0.0459658051803613282360464632326866113L, 0.0089505064268613225167835599456014705L, 0.00139042673882987693424772855926289077L, 0.000174210708041584097450805790176479012L, 0.176324034009707558089086875136647376e-4L, 0.142935845999505649273084545313710581e-5L, 0.907502324487057260675816233312747784e-7L, 0.431044337808893270797934621235918418e-8L, 0.139007266881450521776529705677086902e-9L, 0.234715286125516430792452741830364672e-11L }; T t = z / 2 - 4; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 18) { static const T Y = 1.091579437255859375F; static const T P[17] = { -0.00685089599550151282724924894258520532L, -0.0443313550253580053324487059748497467L, -0.071538561252424027443296958795814874L, -0.0622923153354102682285444067843300583L, -0.0361631270264607478205393775461208794L, -0.0153192826839624850298106509601033261L, -0.00496967904961260031539602977748408242L, -0.00126989079663425780800919171538920589L, -0.000258933143097125199914724875206326698L, -0.422110326689204794443002330541441956e-4L, -0.546004547590412661451073996127115221e-5L, -0.546775260262202177131068692199272241e-6L, -0.404157632825805803833379568956559215e-7L, -0.200612596196561323832327013027419284e-8L, -0.502538501472133913417609379765434153e-10L, -0.326283053716799774936661568391296584e-13L, 0.869226483473172853557775877908693647e-15L }; static const T Q[15] = { 1L, 2.23227220874479061894038229141871087L, 2.40221000361027971895657505660959863L, 1.65476320985936174728238416007084214L, 0.816828602963895720369875535001248227L, 0.306337922909446903672123418670921066L, 0.0902400121654409267774593230720600752L, 0.0212708882169429206498765100993228086L, 0.00404442626252467471957713495828165491L, 0.0006195601618842253612635241404054589L, 0.755930932686543009521454653994321843e-4L, 0.716004532773778954193609582677482803e-5L, 0.500881663076471627699290821742924233e-6L, 0.233593219218823384508105943657387644e-7L, 0.554900353169148897444104962034267682e-9L }; T t = z / 4 - 3.5; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 26) { static const T Y = 1.051731109619140625F; static const T P[14] = { -0.00144552494420652573815404828020593565L, -0.0126747451594545338365684731262912741L, -0.01757394877502366717526779263438073L, -0.0126838952395506921945756139424722588L, -0.0060045057928894974954756789352443522L, -0.00205349237147226126653803455793107903L, -0.000532606040579654887676082220195624207L, -0.000107344687098019891474772069139014662L, -0.169536802705805811859089949943435152e-4L, -0.20863311729206543881826553010120078e-5L, -0.195670358542116256713560296776654385e-6L, -0.133291168587253145439184028259772437e-7L, -0.595500337089495614285777067722823397e-9L, -0.133141358866324100955927979606981328e-10L }; static const T Q[14] = { 1L, 1.72490783907582654629537013560044682L, 1.44524329516800613088375685659759765L, 0.778241785539308257585068744978050181L, 0.300520486589206605184097270225725584L, 0.0879346899691339661394537806057953957L, 0.0200802415843802892793583043470125006L, 0.00362842049172586254520256100538273214L, 0.000519731362862955132062751246769469957L, 0.584092147914050999895178697392282665e-4L, 0.501851497707855358002773398333542337e-5L, 0.313085677467921096644895738538865537e-6L, 0.127552010539733113371132321521204458e-7L, 0.25737310826983451144405899970774587e-9L }; T t = z / 4 - 5.5; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 42) { static const T Y = 1.032726287841796875F; static const T P[15] = { -0.00141056919297307534690895009969373233L, -0.0123384175302540291339020257071411437L, -0.0298127270706864057791526083667396115L, -0.0390686759471630584626293670260768098L, -0.0338226792912607409822059922949035589L, -0.0211659736179834946452561197559654582L, -0.0100428887460879377373158821400070313L, -0.00370717396015165148484022792801682932L, -0.0010768667551001624764329000496561659L, -0.000246127328761027039347584096573123531L, -0.437318110527818613580613051861991198e-4L, -0.587532682329299591501065482317771497e-5L, -0.565697065670893984610852937110819467e-6L, -0.350233957364028523971768887437839573e-7L, -0.105428907085424234504608142258423505e-8L }; static const T Q[16] = { 1L, 3.17261315255467581204685605414005525L, 4.85267952971640525245338392887217426L, 4.74341914912439861451492872946725151L, 3.31108463283559911602405970817931801L, 1.74657006336994649386607925179848899L, 0.718255607416072737965933040353653244L, 0.234037553177354542791975767960643864L, 0.0607470145906491602476833515412605389L, 0.0125048143774226921434854172947548724L, 0.00201034366420433762935768458656609163L, 0.000244823338417452367656368849303165721L, 0.213511655166983177960471085462540807e-4L, 0.119323998465870686327170541547982932e-5L, 0.322153582559488797803027773591727565e-7L, -0.161635525318683508633792845159942312e-16L }; T t = z / 8 - 4.25; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 56) { static const T Y = 1.0216197967529296875F; static const T P[12] = { -0.000322999116096627043476023926572650045L, -0.00385606067447365187909164609294113346L, -0.00686514524727568176735949971985244415L, -0.00606260649593050194602676772589601799L, -0.00334382362017147544335054575436194357L, -0.00126108534260253075708625583630318043L, -0.000337881489347846058951220431209276776L, -0.648480902304640018785370650254018022e-4L, -0.87652644082970492211455290209092766e-5L, -0.794712243338068631557849449519994144e-6L, -0.434084023639508143975983454830954835e-7L, -0.107839681938752337160494412638656696e-8L }; static const T Q[12] = { 1L, 2.09913805456661084097134805151524958L, 2.07041755535439919593503171320431849L, 1.26406517226052371320416108604874734L, 0.529689923703770353961553223973435569L, 0.159578150879536711042269658656115746L, 0.0351720877642000691155202082629857131L, 0.00565313621289648752407123620997063122L, 0.000646920278540515480093843570291218295L, 0.499904084850091676776993523323213591e-4L, 0.233740058688179614344680531486267142e-5L, 0.498800627828842754845418576305379469e-7L }; T t = z / 7 - 7; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 84) { static const T Y = 1.015148162841796875F; static const T P[11] = { -0.000435714784725086961464589957142615216L, -0.00432114324353830636009453048419094314L, -0.0100740363285526177522819204820582424L, -0.0116744115827059174392383504427640362L, -0.00816145387784261141360062395898644652L, -0.00371380272673500791322744465394211508L, -0.00112958263488611536502153195005736563L, -0.000228316462389404645183269923754256664L, -0.29462181955852860250359064291292577e-4L, -0.21972450610957417963227028788460299e-5L, -0.720558173805289167524715527536874694e-7L }; static const T Q[11] = { 1L, 2.95918362458402597039366979529287095L, 3.96472247520659077944638411856748924L, 3.15563251550528513747923714884142131L, 1.64674612007093983894215359287448334L, 0.58695020129846594405856226787156424L, 0.144358385319329396231755457772362793L, 0.024146911506411684815134916238348063L, 0.0026257132337460784266874572001650153L, 0.000167479843750859222348869769094711093L, 0.475673638665358075556452220192497036e-5L }; T t = z / 14 - 5; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else if(z <= 210) { static const T Y= 1.00849151611328125F; static const T P[9] = { -0.0084915161132812500000001440233607358L, 1.84479378737716028341394223076147872L, -130.431146923726715674081563022115568L, 4336.26945491571504885214176203512015L, -76279.0031974974730095170437591004177L, 729577.956271997673695191455111727774L, -3661928.69330208734947103004900349266L, 8570600.041606912735872059184527855L, -6758379.93672362080947905580906028645L }; static const T Q[10] = { 1L, -99.4868026047611434569541483506091713L, 3879.67753690517114249705089803055473L, -76495.82413252517165830203774900806L, 820773.726408311894342553758526282667L, -4803087.64956923577571031564909646579L, 14521246.227703545012713173740895477L, -19762752.0196769712258527849159393044L, 8354144.67882768405803322344185185517L, 355076.853106511136734454134915432571L }; T t = 1 / z; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); result *= exp(z) / z; result += z; } else { static const T exp40 = static_cast(2.35385266837019985407899910749034804508871617254555467236651e17L); static const T Y= 1.00252532958984375F; static const T P[8] = { -0.00252532958984375000000000000000000085L, 1.16591386866059087390621952073890359L, -67.8483431314018462417456828499277579L, 1567.68688154683822956359536287575892L, -17335.4683325819116482498725687644986L, 93632.6567462673524739954389166550069L, -225025.189335919133214440347510936787L, 175864.614717440010942804684741336853L }; static const T Q[9] = { 1L, -65.6998869881600212224652719706425129L, 1642.73850032324014781607859416890077L, -19937.2610222467322481947237312818575L, 124136.267326632742667972126625064538L, -384614.251466704550678760562965502293L, 523355.035910385688578278384032026998L, -217809.552260834025885677791936351294L, -8555.81719551123640677261226549550872L }; T t = 1 / z; result = Y + tools::evaluate_polynomial(P, t) / tools::evaluate_polynomial(Q, t); if(z < 41) result *= exp(z) / z; else { t = z - 40; if(t > tools::log_max_value()) { result = policies::raise_overflow_error(function, 0, pol); } else { result *= exp(z - 40) / z; if(result > tools::max_value() / exp40) { result = policies::raise_overflow_error(function, 0, pol); } else { result *= exp40; } } } result += z; } return result; } template inline typename tools::promote_args::type expint_forwarder(T z, const Policy& , mpl::true_ const&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; typedef typename mpl::if_< mpl::less_equal >, mpl::int_<0>, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, typename mpl::if_< mpl::less_equal >, mpl::int_<113>, mpl::int_<0> >::type >::type >::type >::type tag_type; return policies::checked_narrowing_cast(detail::expint_i_imp( static_cast(z), forwarding_policy(), tag_type()), "boost::math::expint<%1%>(%1%)"); } template inline typename tools::promote_args::type expint_forwarder(unsigned n, T z, const mpl::false_&) { return boost::math::expint(n, z, policies::policy<>()); } } template inline typename tools::promote_args::type expint(unsigned n, T z, const Policy& ) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; typedef typename mpl::if_< mpl::less_equal >, mpl::int_<0>, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, typename mpl::if_< mpl::less_equal >, mpl::int_<113>, mpl::int_<0> >::type >::type >::type >::type tag_type; return policies::checked_narrowing_cast(detail::expint_imp( n, static_cast(z), forwarding_policy(), tag_type()), "boost::math::expint<%1%>(unsigned, %1%)"); } template inline typename detail::expint_result::type expint(T const z, U const u) { typedef typename policies::is_policy::type tag_type; return detail::expint_forwarder(z, u, tag_type()); } template inline typename tools::promote_args::type expint(T z) { return expint(z, policies::policy<>()); } }} # 33 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/hermite.hpp" 1 # 18 "/localhome/glisse2/include/boost/math/special_functions/hermite.hpp" namespace boost{ namespace math{ template inline typename tools::promote_args::type hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1) { return (2 * x * Hn - 2 * n * Hnm1); } namespace detail{ template T hermite_imp(unsigned n, T x) { T p0 = 1; T p1 = 2 * x; if(n == 0) return p0; unsigned c = 1; while(c < n) { std::swap(p0, p1); p1 = hermite_next(c, x, p0, p1); ++c; } return p1; } } template inline typename tools::promote_args::type hermite(unsigned n, T x, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::hermite_imp(n, static_cast(x)), "boost::math::hermite<%1%>(unsigned, %1%)"); } template inline typename tools::promote_args::type hermite(unsigned n, T x) { return boost::math::hermite(n, x, policies::policy<>()); } } } # 38 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/laguerre.hpp" 1 # 18 "/localhome/glisse2/include/boost/math/special_functions/laguerre.hpp" namespace boost{ namespace math{ template inline typename tools::promote_args::type laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1) { typedef typename tools::promote_args::type result_type; return ((2 * n + 1 - result_type(x)) * result_type(Ln) - n * result_type(Lnm1)) / (n + 1); } namespace detail{ template T laguerre_imp(unsigned n, T x) { T p0 = 1; T p1 = 1 - x; if(n == 0) return p0; unsigned c = 1; while(c < n) { std::swap(p0, p1); p1 = laguerre_next(c, x, p0, p1); ++c; } return p1; } template inline typename tools::promote_args::type laguerre(unsigned n, T x, const Policy&, const mpl::true_&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::laguerre_imp(n, static_cast(x)), "boost::math::laguerre<%1%>(unsigned, %1%)"); } template inline typename tools::promote_args::type laguerre(unsigned n, unsigned m, T x, const mpl::false_&) { return boost::math::laguerre(n, m, x, policies::policy<>()); } } template inline typename tools::promote_args::type laguerre(unsigned n, T x) { return laguerre(n, x, policies::policy<>()); } template inline typename tools::promote_args::type laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1) { typedef typename tools::promote_args::type result_type; return ((2 * n + l + 1 - result_type(x)) * result_type(Pl) - (n + l) * result_type(Plm1)) / (n+1); } namespace detail{ template T laguerre_imp(unsigned n, unsigned m, T x, const Policy& pol) { if(m == 0) return boost::math::laguerre(n, x, pol); T p0 = 1; if(n == 0) return p0; T p1 = m + 1 - x; unsigned c = 1; while(c < n) { std::swap(p0, p1); p1 = laguerre_next(c, m, x, p0, p1); ++c; } return p1; } } template inline typename tools::promote_args::type laguerre(unsigned n, unsigned m, T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::laguerre_imp(n, m, static_cast(x), pol), "boost::math::laguerre<%1%>(unsigned, unsigned, %1%)"); } template inline typename laguerre_result::type laguerre(unsigned n, T1 m, T2 x) { typedef typename policies::is_policy::type tag_type; return detail::laguerre(n, m, x, tag_type()); } } } # 40 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/legendre.hpp" 1 # 18 "/localhome/glisse2/include/boost/math/special_functions/legendre.hpp" namespace boost{ namespace math{ template inline typename tools::promote_args::type legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1) { typedef typename tools::promote_args::type result_type; return ((2 * l + 1) * result_type(x) * result_type(Pl) - l * result_type(Plm1)) / (l + 1); } namespace detail{ template T legendre_imp(unsigned l, T x, const Policy& pol, bool second = false) { static const char* function = "boost::math::legrendre_p<%1%>(unsigned, %1%)"; if((x < -1) || (x > 1)) return policies::raise_domain_error( function, "The Legendre Polynomial is defined for" " -1 <= x <= 1, but got x = %1%.", x, pol); T p0, p1; if(second) { p0 = (boost::math::log1p(x, pol) - boost::math::log1p(-x, pol)) / 2; p1 = x * p0 - 1; } else { p0 = 1; p1 = x; } if(l == 0) return p0; unsigned n = 1; while(n < l) { std::swap(p0, p1); p1 = boost::math::legendre_next(n, x, p0, p1); ++n; } return p1; } } template inline typename tools::promote_args::type legendre_p(int l, T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; static const char* function = "boost::math::legendre_p<%1%>(unsigned, %1%)"; if(l < 0) return policies::checked_narrowing_cast(detail::legendre_imp(-l-1, static_cast(x), pol, false), function); return policies::checked_narrowing_cast(detail::legendre_imp(l, static_cast(x), pol, false), function); } template inline typename tools::promote_args::type legendre_p(int l, T x) { return boost::math::legendre_p(l, x, policies::policy<>()); } template inline typename tools::promote_args::type legendre_q(unsigned l, T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::legendre_imp(l, static_cast(x), pol, true), "boost::math::legendre_q<%1%>(unsigned, %1%)"); } template inline typename tools::promote_args::type legendre_q(unsigned l, T x) { return boost::math::legendre_q(l, x, policies::policy<>()); } template inline typename tools::promote_args::type legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1) { typedef typename tools::promote_args::type result_type; return ((2 * l + 1) * result_type(x) * result_type(Pl) - (l + m) * result_type(Plm1)) / (l + 1 - m); } namespace detail{ template T legendre_p_imp(int l, int m, T x, T sin_theta_power, const Policy& pol) { if((x < -1) || (x > 1)) return policies::raise_domain_error( "boost::math::legendre_p<%1%>(int, int, %1%)", "The associated Legendre Polynomial is defined for" " -1 <= x <= 1, but got x = %1%.", x, pol); if(l < 0) return legendre_p_imp(-l-1, m, x, sin_theta_power, pol); if(m < 0) { int sign = (m&1) ? -1 : 1; return sign * boost::math::tgamma_ratio(static_cast(l+m+1), static_cast(l+1-m), pol) * legendre_p_imp(l, -m, x, sin_theta_power, pol); } if(m > l) return 0; if(m == 0) return boost::math::legendre_p(l, x, pol); T p0 = boost::math::double_factorial(2 * m - 1, pol) * sin_theta_power; if(m&1) p0 *= -1; if(m == l) return p0; T p1 = x * (2 * m + 1) * p0; int n = m + 1; while(n < l) { std::swap(p0, p1); p1 = boost::math::legendre_next(n, m, x, p0, p1); ++n; } return p1; } template inline T legendre_p_imp(int l, int m, T x, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return legendre_p_imp(l, m, x, static_cast(pow(1 - x*x, T(abs(m))/2)), pol); } } template inline typename tools::promote_args::type legendre_p(int l, int m, T x, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::legendre_p_imp(l, m, static_cast(x), pol), "bost::math::legendre_p<%1%>(int, int, %1%)"); } template inline typename tools::promote_args::type legendre_p(int l, int m, T x) { return boost::math::legendre_p(l, m, x, policies::policy<>()); } } } # 42 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/next.hpp" 1 # 22 "/localhome/glisse2/include/boost/math/special_functions/next.hpp" namespace boost{ namespace math{ namespace detail{ template inline T get_smallest_value(mpl::true_ const&) { return std::numeric_limits::denorm_min(); } template inline T get_smallest_value(mpl::false_ const&) { return tools::min_value(); } template inline T get_smallest_value() { return get_smallest_value(mpl::bool_::is_specialized && (std::numeric_limits::has_denorm == std::denorm_present)>()); } } template T float_next(const T& val, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; int expon; static const char* function = "float_next<%1%>(%1%)"; if(!(boost::math::isfinite)(val)) { if(val < 0) return -tools::max_value(); return policies::raise_domain_error( function, "Argument must be finite, but got %1%", val, pol); } if(val >= tools::max_value()) return policies::raise_overflow_error(function, 0, pol); if(val == 0) return detail::get_smallest_value(); if(-0.5f == frexp(val, &expon)) --expon; T diff = ldexp(T(1), expon - tools::digits()); if(diff == 0) diff = detail::get_smallest_value(); return val + diff; } # 98 "/localhome/glisse2/include/boost/math/special_functions/next.hpp" template inline T float_next(const T& val) { return float_next(val, policies::policy<>()); } template T float_prior(const T& val, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; int expon; static const char* function = "float_prior<%1%>(%1%)"; if(!(boost::math::isfinite)(val)) { if(val > 0) return tools::max_value(); return policies::raise_domain_error( function, "Argument must be finite, but got %1%", val, pol); } if(val <= -tools::max_value()) return -policies::raise_overflow_error(function, 0, pol); if(val == 0) return -detail::get_smallest_value(); T remain = frexp(val, &expon); if(remain == 0.5) --expon; T diff = ldexp(T(1), expon - tools::digits()); if(diff == 0) diff = detail::get_smallest_value(); return val - diff; } # 153 "/localhome/glisse2/include/boost/math/special_functions/next.hpp" template inline T float_prior(const T& val) { return float_prior(val, policies::policy<>()); } template inline T nextafter(const T& val, const T& direction, const Policy& pol) { return val < direction ? boost::math::float_next(val, pol) : val == direction ? val : boost::math::float_prior(val, pol); } template inline T nextafter(const T& val, const T& direction) { return nextafter(val, direction, policies::policy<>()); } template T float_distance(const T& a, const T& b, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; static const char* function = "float_distance<%1%>(%1%, %1%)"; if(!(boost::math::isfinite)(a)) return policies::raise_domain_error( function, "Argument a must be finite, but got %1%", a, pol); if(!(boost::math::isfinite)(b)) return policies::raise_domain_error( function, "Argument b must be finite, but got %1%", b, pol); if(a > b) return -float_distance(b, a); if(a == b) return 0; if(a == 0) return 1 + fabs(float_distance(static_cast(boost::math::sign(b) * detail::get_smallest_value()), b, pol)); if(b == 0) return 1 + fabs(float_distance(static_cast(boost::math::sign(a) * detail::get_smallest_value()), a, pol)); if(boost::math::sign(a) != boost::math::sign(b)) return 2 + fabs(float_distance(static_cast(boost::math::sign(b) * detail::get_smallest_value()), b, pol)) + fabs(float_distance(static_cast(boost::math::sign(a) * detail::get_smallest_value()), a, pol)); if(a < 0) return float_distance(static_cast(-b), static_cast(-a)); ((a >= 0) ? static_cast (0) : __assert_fail ("a >= 0", "/localhome/glisse2/include/boost/math/special_functions/next.hpp", 208, __PRETTY_FUNCTION__)); ((b >= a) ? static_cast (0) : __assert_fail ("b >= a", "/localhome/glisse2/include/boost/math/special_functions/next.hpp", 209, __PRETTY_FUNCTION__)); int expon; frexp(((boost::math::fpclassify)(a) == FP_SUBNORMAL) ? tools::min_value() : a, &expon); T upper = ldexp(T(1), expon); T result = 0; expon = tools::digits() - expon; if(b > upper) { result = float_distance(upper, b); } T mb = -(std::min)(upper, b); T x = a + mb; T z = x - a; T y = (a - (x - z)) + (mb - z); if(x < 0) { x = -x; y = -y; } result += ldexp(x, expon) + ldexp(y, expon); ((result == floor(result)) ? static_cast (0) : __assert_fail ("result == floor(result)", "/localhome/glisse2/include/boost/math/special_functions/next.hpp", 246, __PRETTY_FUNCTION__)); return result; } template T float_distance(const T& a, const T& b) { return boost::math::float_distance(a, b, policies::policy<>()); } template T float_advance(T val, int distance, const Policy& pol) { static const char* function = "float_advance<%1%>(%1%, int)"; if(!(boost::math::isfinite)(val)) return policies::raise_domain_error( function, "Argument val must be finite, but got %1%", val, pol); if(val < 0) return -float_advance(-val, -distance, pol); if(distance == 0) return val; if(distance == 1) return float_next(val, pol); if(distance == -1) return float_prior(val, pol); using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; int expon; frexp(val, &expon); T limit = ldexp((distance < 0 ? T(0.5f) : T(1)), expon); if(val <= tools::min_value()) { limit = sign(T(distance)) * tools::min_value(); } T limit_distance = float_distance(val, limit); while(fabs(limit_distance) < abs(distance)) { distance -= itrunc(limit_distance); val = limit; if(distance < 0) { limit /= 2; expon--; } else { limit *= 2; expon++; } limit_distance = float_distance(val, limit); } if((0.5f == frexp(val, &expon)) && (distance < 0)) --expon; T diff = 0; if(val != 0) diff = distance * ldexp(T(1), expon - tools::digits()); if(diff == 0) diff = distance * detail::get_smallest_value(); return val += diff; } template inline T float_advance(const T& val, int distance) { return boost::math::float_advance(val, distance, policies::policy<>()); } }} # 45 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/sinhc.hpp" 1 # 31 "/localhome/glisse2/include/boost/math/special_functions/sinhc.hpp" namespace boost { namespace math { namespace detail { # 50 "/localhome/glisse2/include/boost/math/special_functions/sinhc.hpp" template inline T sinhc_pi_imp(const T x) { using ::std::abs; using ::std::sinh; using ::std::sqrt; static T const taylor_0_bound = tools::epsilon(); static T const taylor_2_bound = sqrt(taylor_0_bound); static T const taylor_n_bound = sqrt(taylor_2_bound); if (abs(x) >= taylor_n_bound) { return(sinh(x)/x); } else { T result = static_cast(1); if (abs(x) >= taylor_0_bound) { T x2 = x*x; result += x2/static_cast(6); if (abs(x) >= taylor_2_bound) { result += (x2*x2)/static_cast(120); } } return(result); } } } template inline typename tools::promote_args::type sinhc_pi(T x) { typedef typename tools::promote_args::type result_type; return detail::sinhc_pi_imp(static_cast(x)); } template inline typename tools::promote_args::type sinhc_pi(T x, const Policy&) { return boost::math::sinhc_pi(x); } template class U> inline U sinhc_pi(const U x) { using namespace std; # 126 "/localhome/glisse2/include/boost/math/special_functions/sinhc.hpp" using ::std::numeric_limits; static T const taylor_0_bound = tools::epsilon(); static T const taylor_2_bound = sqrt(taylor_0_bound); static T const taylor_n_bound = sqrt(taylor_2_bound); if (abs(x) >= taylor_n_bound) { return(sinh(x)/x); } else { U result = U(1); if (abs(x) >= taylor_0_bound) { U x2 = x*x; result += x2/static_cast(6); if (abs(x) >= taylor_2_bound) { result += (x2*x2)/static_cast(120); } } return(result); } } } } # 50 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/spherical_harmonic.hpp" 1 # 18 "/localhome/glisse2/include/boost/math/special_functions/spherical_harmonic.hpp" namespace boost{ namespace math{ namespace detail{ template inline T spherical_harmonic_prefix(unsigned n, unsigned m, T theta, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(m > n) return 0; T sin_theta = sin(theta); T x = cos(theta); T leg = detail::legendre_p_imp(n, m, x, static_cast(pow(fabs(sin_theta), T(m))), pol); T prefix = boost::math::tgamma_delta_ratio(static_cast(n - m + 1), static_cast(2 * m), pol); prefix *= (2 * n + 1) / (4 * constants::pi()); prefix = sqrt(prefix); return prefix * leg; } template T spherical_harmonic_r(unsigned n, int m, T theta, T phi, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; bool sign = false; if(m < 0) { sign = m&1; m = abs(m); } if(m&1) { T mod = boost::math::tools::fmod_workaround(theta, T(2 * constants::pi())); if(mod < 0) mod += 2 * constants::pi(); if(mod > constants::pi()) sign = !sign; } T prefix = spherical_harmonic_prefix(n, m, theta, pol); prefix *= cos(m * phi); return sign ? T(-prefix) : prefix; } template T spherical_harmonic_i(unsigned n, int m, T theta, T phi, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; bool sign = false; if(m < 0) { sign = !(m&1); m = abs(m); } if(m&1) { T mod = boost::math::tools::fmod_workaround(theta, T(2 * constants::pi())); if(mod < 0) mod += 2 * constants::pi(); if(mod > constants::pi()) sign = !sign; } T prefix = spherical_harmonic_prefix(n, m, theta, pol); prefix *= sin(m * phi); return sign ? T(-prefix) : prefix; } template std::complex spherical_harmonic(unsigned n, int m, U theta, U phi, const Policy& pol) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; bool r_sign = false; bool i_sign = false; if(m < 0) { r_sign = m&1; i_sign = !(m&1); m = abs(m); } if(m&1) { U mod = boost::math::tools::fmod_workaround(theta, 2 * constants::pi()); if(mod < 0) mod += 2 * constants::pi(); if(mod > constants::pi()) { r_sign = !r_sign; i_sign = !i_sign; } } U prefix = spherical_harmonic_prefix(n, m, theta, pol); U r = prefix * cos(m * phi); U i = prefix * sin(m * phi); if(r_sign) r = -r; if(i_sign) i = -i; static const char* function = "boost::math::spherical_harmonic<%1%>(int, int, %1%, %1%)"; return std::complex(policies::checked_narrowing_cast(r, function), policies::checked_narrowing_cast(i, function)); } } template inline std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return detail::spherical_harmonic(n, m, static_cast(theta), static_cast(phi), pol); } template inline std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi) { return boost::math::spherical_harmonic(n, m, theta, phi, policies::policy<>()); } template inline typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::spherical_harmonic_r(n, m, static_cast(theta), static_cast(phi), pol), "bost::math::spherical_harmonic_r<%1%>(unsigned, int, %1%, %1%)"); } template inline typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi) { return boost::math::spherical_harmonic_r(n, m, theta, phi, policies::policy<>()); } template inline typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; return policies::checked_narrowing_cast(detail::spherical_harmonic_i(n, m, static_cast(theta), static_cast(phi), pol), "boost::math::spherical_harmonic_i<%1%>(unsigned, int, %1%, %1%)"); } template inline typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi) { return boost::math::spherical_harmonic_i(n, m, theta, phi, policies::policy<>()); } } } # 51 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/zeta.hpp" 1 # 19 "/localhome/glisse2/include/boost/math/special_functions/zeta.hpp" namespace boost{ namespace math{ namespace detail{ template struct zeta_series_cache_size { # 32 "/localhome/glisse2/include/boost/math/special_functions/zeta.hpp" typedef typename boost::math::policies::precision::type precision_type; typedef typename mpl::if_< mpl::less_equal >, mpl::int_<5000>, typename mpl::if_< mpl::less_equal >, mpl::int_<70>, typename mpl::if_< mpl::less_equal >, mpl::int_<100>, mpl::int_<5000> >::type >::type >::type type; }; template T zeta_series_imp(T s, T sc, const Policy&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T sum = 0; T mult = 0.5; T change; typedef typename zeta_series_cache_size::type cache_size; T powers[cache_size::value] = { 0, }; unsigned n = 0; do{ T binom = -static_cast(n); T nested_sum = 1; if(n < sizeof(powers) / sizeof(powers[0])) powers[n] = pow(static_cast(n + 1), -s); for(unsigned k = 1; k <= n; ++k) { T p; if(k < sizeof(powers) / sizeof(powers[0])) { p = powers[k]; } else p = pow(static_cast(k + 1), -s); nested_sum += binom * p; binom *= (k - static_cast(n)) / (k + 1); } change = mult * nested_sum; sum += change; mult /= 2; ++n; }while(fabs(change / sum) > tools::epsilon()); return sum * 1 / -boost::math::powm1(T(2), sc); } template struct zeta_series2 { typedef T result_type; zeta_series2(T _s) : s(-_s), k(1){} T operator()() { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; return pow(static_cast(k++), s); } private: T s; unsigned k; }; template inline T zeta_series2_imp(T s, const Policy& pol) { boost::uintmax_t max_iter = policies::get_max_series_iterations();; zeta_series2 f(s); T result = tools::sum_series( f, policies::get_epsilon(), max_iter); policies::check_series_iterations("boost::math::zeta_series2<%1%>(%1%)", max_iter, pol); return result; } template T zeta_imp_prec(T s, T sc, const Policy& pol, const mpl::int_<0>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; if (s > -log(tools::epsilon()) / 4.5) result = detail::zeta_series2_imp(s, pol); else result = detail::zeta_series_imp(s, sc, pol); return result; } template inline T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<53>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; if(s < 1) { static const T P[6] = { 0.24339294433593750202L, -0.49092470516353571651L, 0.0557616214776046784287L, -0.00320912498879085894856L, 0.000451534528645796438704L, -0.933241270357061460782e-5L, }; static const T Q[6] = { 1L, -0.279960334310344432495L, 0.0419676223309986037706L, -0.00413421406552171059003L, 0.00024978985622317935355L, -0.101855788418564031874e-4L, }; result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); result -= 1.2433929443359375F; result += (sc); result /= (sc); } else if(s <= 2) { static const T P[6] = { 0.577215664901532860516, 0.243210646940107164097, 0.0417364673988216497593, 0.00390252087072843288378, 0.000249606367151877175456, 0.110108440976732897969e-4, }; static const T Q[6] = { 1, 0.295201277126631761737, 0.043460910607305495864, 0.00434930582085826330659, 0.000255784226140488490982, 0.10991819782396112081e-4, }; result = tools::evaluate_polynomial(P, -sc) / tools::evaluate_polynomial(Q, -sc); result += 1 / (-sc); } else if(s <= 4) { static const float Y = 0.6986598968505859375; static const T P[6] = { -0.0537258300023595030676, 0.0445163473292365591906, 0.0128677673534519952905, 0.00097541770457391752726, 0.769875101573654070925e-4, 0.328032510000383084155e-5, }; static const T Q[7] = { 1, 0.33383194553034051422, 0.0487798431291407621462, 0.00479039708573558490716, 0.000270776703956336357707, 0.106951867532057341359e-4, 0.236276623974978646399e-7, }; result = tools::evaluate_polynomial(P, s - 2) / tools::evaluate_polynomial(Q, s - 2); result += Y + 1 / (-sc); } else if(s <= 7) { static const T P[6] = { -2.49710190602259410021, -2.60013301809475665334, -0.939260435377109939261, -0.138448617995741530935, -0.00701721240549802377623, -0.229257310594893932383e-4, }; static const T Q[9] = { 1, 0.706039025937745133628, 0.15739599649558626358, 0.0106117950976845084417, -0.36910273311764618902e-4, 0.493409563927590008943e-5, -0.234055487025287216506e-6, 0.718833729365459760664e-8, -0.1129200113474947419e-9, }; result = tools::evaluate_polynomial(P, s - 4) / tools::evaluate_polynomial(Q, s - 4); result = 1 + exp(result); } else if(s < 15) { static const T P[7] = { -4.78558028495135619286, -1.89197364881972536382, -0.211407134874412820099, -0.000189204758260076688518, 0.00115140923889178742086, 0.639949204213164496988e-4, 0.139348932445324888343e-5, }; static const T Q[9] = { 1, 0.244345337378188557777, 0.00873370754492288653669, -0.00117592765334434471562, -0.743743682899933180415e-4, -0.21750464515767984778e-5, 0.471001264003076486547e-8, -0.833378440625385520576e-10, 0.699841545204845636531e-12, }; result = tools::evaluate_polynomial(P, s - 7) / tools::evaluate_polynomial(Q, s - 7); result = 1 + exp(result); } else if(s < 36) { static const T P[8] = { -10.3948950573308896825, -2.85827219671106697179, -0.347728266539245787271, -0.0251156064655346341766, -0.00119459173416968685689, -0.382529323507967522614e-4, -0.785523633796723466968e-6, -0.821465709095465524192e-8, }; static const T Q[10] = { 1, 0.208196333572671890965, 0.0195687657317205033485, 0.00111079638102485921877, 0.408507746266039256231e-4, 0.955561123065693483991e-6, 0.118507153474022900583e-7, 0.222609483627352615142e-14, }; result = tools::evaluate_polynomial(P, s - 15) / tools::evaluate_polynomial(Q, s - 15); result = 1 + exp(result); } else if(s < 56) { result = 1 + pow(T(2), -s); } else { result = 1; } return result; } template T zeta_imp_prec(T s, T sc, const Policy&, const mpl::int_<64>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; if(s < 1) { static const T P[6] = { 0.243392944335937499969L, -0.496837806864865688082L, 0.0680008039723709987107L, -0.00511620413006619942112L, 0.000455369899250053003335L, -0.279496685273033761927e-4L, }; static const T Q[7] = { 1L, -0.30425480068225790522L, 0.050052748580371598736L, -0.00519355671064700627862L, 0.000360623385771198350257L, -0.159600883054550987633e-4L, 0.339770279812410586032e-6L, }; result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); result -= 1.2433929443359375F; result += (sc); result /= (sc); } else if(s <= 2) { static const T P[6] = { 0.577215664901532860605L, 0.222537368917162139445L, 0.0356286324033215682729L, 0.00304465292366350081446L, 0.000178102511649069421904L, 0.700867470265983665042e-5L, }; static const T Q[7] = { 1L, 0.259385759149531030085L, 0.0373974962106091316854L, 0.00332735159183332820617L, 0.000188690420706998606469L, 0.635994377921861930071e-5L, 0.226583954978371199405e-7L, }; result = tools::evaluate_polynomial(P, -sc) / tools::evaluate_polynomial(Q, -sc); result += 1 / (-sc); } else if(s <= 4) { static const float Y = 0.6986598968505859375; static const T P[7] = { -0.053725830002359501027L, 0.0470551187571475844778L, 0.0101339410415759517471L, 0.00100240326666092854528L, 0.685027119098122814867e-4L, 0.390972820219765942117e-5L, 0.540319769113543934483e-7L, }; static const T Q[8] = { 1, 0.286577739726542730421L, 0.0447355811517733225843L, 0.00430125107610252363302L, 0.000284956969089786662045L, 0.116188101609848411329e-4L, 0.278090318191657278204e-6L, -0.19683620233222028478e-8L, }; result = tools::evaluate_polynomial(P, s - 2) / tools::evaluate_polynomial(Q, s - 2); result += Y + 1 / (-sc); } else if(s <= 7) { static const T P[8] = { -2.49710190602259407065L, -3.36664913245960625334L, -1.77180020623777595452L, -0.464717885249654313933L, -0.0643694921293579472583L, -0.00464265386202805715487L, -0.000165556579779704340166L, -0.252884970740994069582e-5L, }; static const T Q[9] = { 1, 1.01300131390690459085L, 0.387898115758643503827L, 0.0695071490045701135188L, 0.00586908595251442839291L, 0.000217752974064612188616L, 0.397626583349419011731e-5L, -0.927884739284359700764e-8L, 0.119810501805618894381e-9L, }; result = tools::evaluate_polynomial(P, s - 4) / tools::evaluate_polynomial(Q, s - 4); result = 1 + exp(result); } else if(s < 15) { static const T P[9] = { -4.78558028495135548083L, -3.23873322238609358947L, -0.892338582881021799922L, -0.131326296217965913809L, -0.0115651591773783712996L, -0.000657728968362695775205L, -0.252051328129449973047e-4L, -0.626503445372641798925e-6L, -0.815696314790853893484e-8L, }; static const T Q[9] = { 1, 0.525765665400123515036L, 0.10852641753657122787L, 0.0115669945375362045249L, 0.000732896513858274091966L, 0.30683952282420248448e-4L, 0.819649214609633126119e-6L, 0.117957556472335968146e-7L, -0.193432300973017671137e-12L, }; result = tools::evaluate_polynomial(P, s - 7) / tools::evaluate_polynomial(Q, s - 7); result = 1 + exp(result); } else if(s < 42) { static const T P[9] = { -10.3948950573308861781L, -2.82646012777913950108L, -0.342144362739570333665L, -0.0249285145498722647472L, -0.00122493108848097114118L, -0.423055371192592850196e-4L, -0.1025215577185967488e-5L, -0.165096762663509467061e-7L, -0.145392555873022044329e-9L, }; static const T Q[10] = { 1, 0.205135978585281988052L, 0.0192359357875879453602L, 0.00111496452029715514119L, 0.434928449016693986857e-4L, 0.116911068726610725891e-5L, 0.206704342290235237475e-7L, 0.209772836100827647474e-9L, -0.939798249922234703384e-16L, 0.264584017421245080294e-18L, }; result = tools::evaluate_polynomial(P, s - 15) / tools::evaluate_polynomial(Q, s - 15); result = 1 + exp(result); } else if(s < 63) { result = 1 + pow(T(2), -s); } else { result = 1; } return result; } template T zeta_imp_prec(T s, T sc, const Policy& pol, const mpl::int_<113>&) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; T result; if(s < 1) { static const T P[10] = { -1L, -0.0353008629988648122808504280990313668L, 0.0107795651204927743049369868548706909L, 0.000523961870530500751114866884685172975L, -0.661805838304910731947595897966487515e-4L, -0.658932670403818558510656304189164638e-5L, -0.103437265642266106533814021041010453e-6L, 0.116818787212666457105375746642927737e-7L, 0.660690993901506912123512551294239036e-9L, 0.113103113698388531428914333768142527e-10L, }; static const T Q[11] = { 1L, -0.387483472099602327112637481818565459L, 0.0802265315091063135271497708694776875L, -0.0110727276164171919280036408995078164L, 0.00112552716946286252000434849173787243L, -0.874554160748626916455655180296834352e-4L, 0.530097847491828379568636739662278322e-5L, -0.248461553590496154705565904497247452e-6L, 0.881834921354014787309644951507523899e-8L, -0.217062446168217797598596496310953025e-9L, 0.315823200002384492377987848307151168e-11L, }; result = tools::evaluate_polynomial(P, sc) / tools::evaluate_polynomial(Q, sc); result += (sc); result /= (sc); } else if(s <= 2) { static const T P[10] = { 0.577215664901532860606512090082402431L, 0.255597968739771510415479842335906308L, 0.0494056503552807274142218876983542205L, 0.00551372778611700965268920983472292325L, 0.00043667616723970574871427830895192731L, 0.268562259154821957743669387915239528e-4L, 0.109249633923016310141743084480436612e-5L, 0.273895554345300227466534378753023924e-7L, 0.583103205551702720149237384027795038e-9L, -0.835774625259919268768735944711219256e-11L, }; static const T Q[11] = { 1L, 0.316661751179735502065583176348292881L, 0.0540401806533507064453851182728635272L, 0.00598621274107420237785899476374043797L, 0.000474907812321704156213038740142079615L, 0.272125421722314389581695715835862418e-4L, 0.112649552156479800925522445229212933e-5L, 0.301838975502992622733000078063330461e-7L, 0.422960728687211282539769943184270106e-9L, -0.377105263588822468076813329270698909e-11L, -0.581926559304525152432462127383600681e-13L, }; result = tools::evaluate_polynomial(P, -sc) / tools::evaluate_polynomial(Q, -sc); result += 1 / (-sc); } else if(s <= 4) { static const float Y = 0.6986598968505859375; static const T P[11] = { -0.0537258300023595010275848333539748089L, 0.0429086930802630159457448174466342553L, 0.0136148228754303412510213395034056857L, 0.00190231601036042925183751238033763915L, 0.000186880390916311438818302549192456581L, 0.145347370745893262394287982691323657e-4L, 0.805843276446813106414036600485884885e-6L, 0.340818159286739137503297172091882574e-7L, 0.115762357488748996526167305116837246e-8L, 0.231904754577648077579913403645767214e-10L, 0.340169592866058506675897646629036044e-12L, }; static const T Q[12] = { 1L, 0.363755247765087100018556983050520554L, 0.0696581979014242539385695131258321598L, 0.00882208914484611029571547753782014817L, 0.000815405623261946661762236085660996718L, 0.571366167062457197282642344940445452e-4L, 0.309278269271853502353954062051797838e-5L, 0.12822982083479010834070516053794262e-6L, 0.397876357325018976733953479182110033e-8L, 0.8484432107648683277598472295289279e-10L, 0.105677416606909614301995218444080615e-11L, 0.547223964564003701979951154093005354e-15L, }; result = tools::evaluate_polynomial(P, s - 2) / tools::evaluate_polynomial(Q, s - 2); result += Y + 1 / (-sc); } else if(s <= 6) { static const T Y = 3.28348541259765625F; static const T P[13] = { 0.786383506575062179339611614117697622L, 0.495766593395271370974685959652073976L, -0.409116737851754766422360889037532228L, -0.57340744006238263817895456842655987L, -0.280479899797421910694892949057963111L, -0.0753148409447590257157585696212649869L, -0.0122934003684672788499099362823748632L, -0.00126148398446193639247961370266962927L, -0.828465038179772939844657040917364896e-4L, -0.361008916706050977143208468690645684e-5L, -0.109879825497910544424797771195928112e-6L, -0.214539416789686920918063075528797059e-8L, -0.15090220092460596872172844424267351e-10L, }; static const T Q[14] = { 1L, 1.69490865837142338462982225731926485L, 1.22697696630994080733321401255942464L, 0.495409420862526540074366618006341533L, 0.122368084916843823462872905024259633L, 0.0191412993625268971656513890888208623L, 0.00191401538628980617753082598351559642L, 0.000123318142456272424148930280876444459L, 0.531945488232526067889835342277595709e-5L, 0.161843184071894368337068779669116236e-6L, 0.305796079600152506743828859577462778e-8L, 0.233582592298450202680170811044408894e-10L, -0.275363878344548055574209713637734269e-13L, 0.221564186807357535475441900517843892e-15L, }; result = tools::evaluate_polynomial(P, s - 4) / tools::evaluate_polynomial(Q, s - 4); result -= Y; result = 1 + exp(result); } else if(s < 10) { static const T P[13] = { -4.0545627381873738086704293881227365L, -4.70088348734699134347906176097717782L, -2.36921550900925512951976617607678789L, -0.684322583796369508367726293719322866L, -0.126026534540165129870721937592996324L, -0.015636903921778316147260572008619549L, -0.00135442294754728549644376325814460807L, -0.842793965853572134365031384646117061e-4L, -0.385602133791111663372015460784978351e-5L, -0.130458500394692067189883214401478539e-6L, -0.315861074947230418778143153383660035e-8L, -0.500334720512030826996373077844707164e-10L, -0.420204769185233365849253969097184005e-12L, }; static const T Q[14] = { 1L, 0.97663511666410096104783358493318814L, 0.40878780231201806504987368939673249L, 0.0963890666609396058945084107597727252L, 0.0142207619090854604824116070866614505L, 0.00139010220902667918476773423995750877L, 0.940669540194694997889636696089994734e-4L, 0.458220848507517004399292480807026602e-5L, 0.16345521617741789012782420625435495e-6L, 0.414007452533083304371566316901024114e-8L, 0.68701473543366328016953742622661377e-10L, 0.603461891080716585087883971886075863e-12L, 0.294670713571839023181857795866134957e-16L, -0.147003914536437243143096875069813451e-18L, }; result = tools::evaluate_polynomial(P, s - 6) / tools::evaluate_polynomial(Q, s - 6); result = 1 + exp(result); } else if(s < 17) { static const T P[13] = { -6.91319491921722925920883787894829678L, -3.65491257639481960248690596951049048L, -0.813557553449954526442644544105257881L, -0.0994317301685870959473658713841138083L, -0.00726896610245676520248617014211734906L, -0.000317253318715075854811266230916762929L, -0.66851422826636750855184211580127133e-5L, 0.879464154730985406003332577806849971e-7L, 0.113838903158254250631678791998294628e-7L, 0.379184410304927316385211327537817583e-9L, 0.612992858643904887150527613446403867e-11L, 0.347873737198164757035457841688594788e-13L, -0.289187187441625868404494665572279364e-15L, }; static const T Q[14] = { 1L, 0.427310044448071818775721584949868806L, 0.074602514873055756201435421385243062L, 0.00688651562174480772901425121653945942L, 0.000360174847635115036351323894321880445L, 0.973556847713307543918865405758248777e-5L, -0.853455848314516117964634714780874197e-8L, -0.118203513654855112421673192194622826e-7L, -0.462521662511754117095006543363328159e-9L, -0.834212591919475633107355719369463143e-11L, -0.5354594751002702935740220218582929e-13L, 0.406451690742991192964889603000756203e-15L, 0.887948682401000153828241615760146728e-19L, -0.34980761098820347103967203948619072e-21L, }; result = tools::evaluate_polynomial(P, s - 10) / tools::evaluate_polynomial(Q, s - 10); result = 1 + exp(result); } else if(s < 30) { static const T P[13] = { -11.7824798233959252791987402769438322L, -4.36131215284987731928174218354118102L, -0.732260980060982349410898496846972204L, -0.0744985185694913074484248803015717388L, -0.00517228281320594683022294996292250527L, -0.000260897206152101522569969046299309939L, -0.989553462123121764865178453128769948e-5L, -0.286916799741891410827712096608826167e-6L, -0.637262477796046963617949532211619729e-8L, -0.106796831465628373325491288787760494e-9L, -0.129343095511091870860498356205376823e-11L, -0.102397936697965977221267881716672084e-13L, -0.402663128248642002351627980255756363e-16L, }; static const T Q[14] = { 1L, 0.311288325355705609096155335186466508L, 0.0438318468940415543546769437752132748L, 0.00374396349183199548610264222242269536L, 0.000218707451200585197339671707189281302L, 0.927578767487930747532953583797351219e-5L, 0.294145760625753561951137473484889639e-6L, 0.704618586690874460082739479535985395e-8L, 0.126333332872897336219649130062221257e-9L, 0.16317315713773503718315435769352765e-11L, 0.137846712823719515148344938160275695e-13L, 0.580975420554224366450994232723910583e-16L, -0.291354445847552426900293580511392459e-22L, 0.73614324724785855925025452085443636e-25L, }; result = tools::evaluate_polynomial(P, s - 17) / tools::evaluate_polynomial(Q, s - 17); result = 1 + exp(result); } else if(s < 74) { static const T P[14] = { -20.7944102007844314586649688802236072L, -4.95759941987499442499908748130192187L, -0.563290752832461751889194629200298688L, -0.0406197001137935911912457120706122877L, -0.0020846534789473022216888863613422293L, -0.808095978462109173749395599401375667e-4L, -0.244706022206249301640890603610060959e-5L, -0.589477682919645930544382616501666572e-7L, -0.113699573675553496343617442433027672e-8L, -0.174767860183598149649901223128011828e-10L, -0.210051620306761367764549971980026474e-12L, -0.189187969537370950337212675466400599e-14L, -0.116313253429564048145641663778121898e-16L, -0.376708747782400769427057630528578187e-19L, }; static const T Q[16] = { 1L, 0.205076752981410805177554569784219717L, 0.0202526722696670378999575738524540269L, 0.001278305290005994980069466658219057L, 0.576404779858501791742255670403304787e-4L, 0.196477049872253010859712483984252067e-5L, 0.521863830500876189501054079974475762e-7L, 0.109524209196868135198775445228552059e-8L, 0.181698713448644481083966260949267825e-10L, 0.234793316975091282090312036524695562e-12L, 0.227490441461460571047545264251399048e-14L, 0.151500292036937400913870642638520668e-16L, 0.543475775154780935815530649335936121e-19L, 0.241647013434111434636554455083309352e-28L, -0.557103423021951053707162364713587374e-31L, 0.618708773442584843384712258199645166e-34L, }; result = tools::evaluate_polynomial(P, s - 30) / tools::evaluate_polynomial(Q, s - 30); result = 1 + exp(result); } else if(s < 117) { result = 1 + pow(T(2), -s); } else { result = 1; } return result; } template T zeta_imp(T s, T sc, const Policy& pol, const Tag& tag) { using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; if(s == 1) return policies::raise_pole_error( "boost::math::zeta<%1%>", "Evaluation of zeta function at pole %1%", s, pol); T result; if(s == 0) { result = -0.5; } else if(s < 0) { std::swap(s, sc); if(floor(sc/2) == sc/2) result = 0; else { result = boost::math::sin_pi(0.5f * sc, pol) * 2 * pow(2 * constants::pi(), -s) * boost::math::tgamma(s, pol) * zeta_imp(s, sc, pol, tag); } } else { result = zeta_imp_prec(s, sc, pol, tag); } return result; } } template inline typename tools::promote_args::type zeta(T s, const Policy&) { typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; typedef typename policies::normalise< Policy, policies::promote_float, policies::promote_double, policies::discrete_quantile<>, policies::assert_undefined<> >::type forwarding_policy; typedef typename mpl::if_< mpl::less_equal >, mpl::int_<0>, typename mpl::if_< mpl::less_equal >, mpl::int_<53>, typename mpl::if_< mpl::less_equal >, mpl::int_<64>, typename mpl::if_< mpl::less_equal >, mpl::int_<113>, mpl::int_<0> >::type >::type >::type >::type tag_type; return policies::checked_narrowing_cast(detail::zeta_imp( static_cast(s), static_cast(1 - static_cast(s)), forwarding_policy(), tag_type()), "boost::math::zeta<%1%>(%1%)"); } template inline typename tools::promote_args::type zeta(T s) { return zeta(s, policies::policy<>()); } }} # 53 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 1 "/localhome/glisse2/include/boost/math/special_functions/modf.hpp" 1 # 16 "/localhome/glisse2/include/boost/math/special_functions/modf.hpp" namespace boost{ namespace math{ template inline T modf(const T& v, T* ipart, const Policy& pol) { *ipart = trunc(v, pol); return v - *ipart; } template inline T modf(const T& v, T* ipart) { return modf(v, ipart, policies::policy<>()); } template inline T modf(const T& v, int* ipart, const Policy& pol) { *ipart = itrunc(v, pol); return v - *ipart; } template inline T modf(const T& v, int* ipart) { return modf(v, ipart, policies::policy<>()); } template inline T modf(const T& v, long* ipart, const Policy& pol) { *ipart = ltrunc(v, pol); return v - *ipart; } template inline T modf(const T& v, long* ipart) { return modf(v, ipart, policies::policy<>()); } template inline T modf(const T& v, boost::long_long_type* ipart, const Policy& pol) { *ipart = lltrunc(v, pol); return v - *ipart; } template inline T modf(const T& v, boost::long_long_type* ipart) { return modf(v, ipart, policies::policy<>()); } }} # 54 "/localhome/glisse2/include/boost/math/special_functions.hpp" 2 # 23 "/localhome/glisse2/include/boost/random/generate_canonical.hpp" 2 namespace boost { namespace random { namespace detail { template RealType generate_canonical_impl(URNG& g, boost::mpl::true_ ) { using std::pow; typedef typename URNG::result_type base_result; std::size_t digits = std::numeric_limits::digits; RealType R = RealType((g.max)()) - RealType((g.min)()) + 1; RealType mult = R; RealType limit = pow(RealType(2), RealType((std::min)(static_cast(bits), digits))); RealType S = RealType(detail::subtract()(g(), (g.min)())); while(mult < limit) { RealType inc = RealType(detail::subtract()(g(), (g.min)())); S += inc * mult; mult *= R; } return S / mult; } template RealType generate_canonical_impl(URNG& g, boost::mpl::false_ ) { using std::pow; using std::floor; (((g.min)() == 0) ? static_cast (0) : __assert_fail ("(g.min)() == 0", "/localhome/glisse2/include/boost/random/generate_canonical.hpp", 56, __PRETTY_FUNCTION__)); (((g.max)() == 1) ? static_cast (0) : __assert_fail ("(g.max)() == 1", "/localhome/glisse2/include/boost/random/generate_canonical.hpp", 57, __PRETTY_FUNCTION__)); typedef typename URNG::result_type base_result; std::size_t digits = std::numeric_limits::digits; std::size_t engine_bits = detail::generator_bits::value(); std::size_t b = (std::min)(bits, digits); RealType R = pow(RealType(2), RealType(engine_bits)); RealType mult = R; RealType limit = pow(RealType(2), RealType(b)); RealType S = RealType(g() - (g.min)()); while(mult < limit) { RealType inc(floor((RealType(g()) - RealType((g.min)())) * R)); S += inc * mult; mult *= R; } return S / mult; } } template RealType generate_canonical(URNG& g) { RealType result = detail::generate_canonical_impl( g, boost::is_integral()); ((result >= 0) ? static_cast (0) : __assert_fail ("result >= 0", "/localhome/glisse2/include/boost/random/generate_canonical.hpp", 85, __PRETTY_FUNCTION__)); ((result <= 1) ? static_cast (0) : __assert_fail ("result <= 1", "/localhome/glisse2/include/boost/random/generate_canonical.hpp", 86, __PRETTY_FUNCTION__)); if(result == 1) { result -= std::numeric_limits::epsilon() / 2; ((result != 1) ? static_cast (0) : __assert_fail ("result != 1", "/localhome/glisse2/include/boost/random/generate_canonical.hpp", 89, __PRETTY_FUNCTION__)); } return result; } } } # 53 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/seed_seq.hpp" 1 # 18 "/localhome/glisse2/include/boost/random/seed_seq.hpp" # 1 "/localhome/glisse2/include/boost/cstdint.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/seed_seq.hpp" 2 # 1 "/localhome/glisse2/include/boost/range/begin.hpp" 1 # 18 "/localhome/glisse2/include/boost/range/begin.hpp" # 1 "/localhome/glisse2/include/boost/range/config.hpp" 1 # 19 "/localhome/glisse2/include/boost/range/begin.hpp" 2 # 1 "/localhome/glisse2/include/boost/range/iterator.hpp" 1 # 19 "/localhome/glisse2/include/boost/range/iterator.hpp" # 1 "/localhome/glisse2/include/boost/range/mutable_iterator.hpp" 1 # 24 "/localhome/glisse2/include/boost/range/mutable_iterator.hpp" # 1 "/localhome/glisse2/include/boost/range/detail/extract_optional_type.hpp" 1 # 30 "/localhome/glisse2/include/boost/range/detail/extract_optional_type.hpp" namespace boost { namespace range_detail { template< typename T > struct exists { typedef void type; }; } } # 25 "/localhome/glisse2/include/boost/range/mutable_iterator.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 27 "/localhome/glisse2/include/boost/range/mutable_iterator.hpp" 2 namespace boost { namespace range_detail { template< typename C, typename Enable=void > struct extract_iterator {}; template< typename C > struct extract_iterator< C , typename boost::range_detail::exists< typename C::iterator >::type > { typedef typename C::iterator type; }; } template< typename C > struct range_mutable_iterator : range_detail::extract_iterator {}; template< typename Iterator > struct range_mutable_iterator< std::pair > { typedef Iterator type; }; template< typename T, std::size_t sz > struct range_mutable_iterator< T[sz] > { typedef T* type; }; } # 20 "/localhome/glisse2/include/boost/range/iterator.hpp" 2 # 1 "/localhome/glisse2/include/boost/range/const_iterator.hpp" 1 # 26 "/localhome/glisse2/include/boost/range/const_iterator.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 27 "/localhome/glisse2/include/boost/range/const_iterator.hpp" 2 namespace boost { namespace range_detail { template< typename C, typename Enable=void > struct extract_const_iterator {}; template< typename C > struct extract_const_iterator< C , typename boost::range_detail::exists< typename C::const_iterator >::type > { typedef typename C::const_iterator type; }; } template< typename C > struct range_const_iterator : range_detail::extract_const_iterator {}; template< typename Iterator > struct range_const_iterator< std::pair > { typedef Iterator type; }; template< typename T, std::size_t sz > struct range_const_iterator< T[sz] > { typedef const T* type; }; } # 21 "/localhome/glisse2/include/boost/range/iterator.hpp" 2 namespace boost { # 50 "/localhome/glisse2/include/boost/range/iterator.hpp" template< typename C > struct range_iterator { typedef typename mpl::eval_if_c< is_const::value, range_const_iterator< typename remove_const::type >, range_mutable_iterator >::type type; }; } # 25 "/localhome/glisse2/include/boost/range/begin.hpp" 2 namespace boost { namespace range_detail { template< typename C > inline typename range_iterator::type range_begin( C& c ) { return c.begin(); } template< typename Iterator > inline Iterator range_begin( const std::pair& p ) { return p.first; } template< typename Iterator > inline Iterator range_begin( std::pair& p ) { return p.first; } # 75 "/localhome/glisse2/include/boost/range/begin.hpp" template< typename T, std::size_t sz > inline const T* range_begin( const T (&a)[sz] ) { return a; } template< typename T, std::size_t sz > inline T* range_begin( T (&a)[sz] ) { return a; } } namespace range_adl_barrier { template< class T > inline typename range_iterator::type begin( T& r ) { using namespace range_detail; return range_begin( r ); } template< class T > inline typename range_iterator::type begin( const T& r ) { using namespace range_detail; return range_begin( r ); } } } namespace boost { namespace range_adl_barrier { template< class T > inline typename range_iterator::type const_begin( const T& r ) { return boost::range_adl_barrier::begin( r ); } } using namespace range_adl_barrier; } # 20 "/localhome/glisse2/include/boost/random/seed_seq.hpp" 2 # 1 "/localhome/glisse2/include/boost/range/end.hpp" 1 # 24 "/localhome/glisse2/include/boost/range/end.hpp" # 1 "/localhome/glisse2/include/boost/range/detail/implementation_help.hpp" 1 # 15 "/localhome/glisse2/include/boost/range/detail/implementation_help.hpp" # 1 "/localhome/glisse2/include/boost/range/detail/common.hpp" 1 # 19 "/localhome/glisse2/include/boost/range/detail/common.hpp" # 1 "/localhome/glisse2/include/boost/range/detail/sfinae.hpp" 1 # 20 "/localhome/glisse2/include/boost/range/detail/sfinae.hpp" namespace boost { namespace range_detail { using type_traits::yes_type; using type_traits::no_type; yes_type is_string_impl( const char* const ); yes_type is_string_impl( const wchar_t* const ); no_type is_string_impl( ... ); template< std::size_t sz > yes_type is_char_array_impl( char (&boost_range_array)[sz] ); template< std::size_t sz > yes_type is_char_array_impl( const char (&boost_range_array)[sz] ); no_type is_char_array_impl( ... ); template< std::size_t sz > yes_type is_wchar_t_array_impl( wchar_t (&boost_range_array)[sz] ); template< std::size_t sz > yes_type is_wchar_t_array_impl( const wchar_t (&boost_range_array)[sz] ); no_type is_wchar_t_array_impl( ... ); yes_type is_char_ptr_impl( char* const ); no_type is_char_ptr_impl( ... ); yes_type is_const_char_ptr_impl( const char* const ); no_type is_const_char_ptr_impl( ... ); yes_type is_wchar_t_ptr_impl( wchar_t* const ); no_type is_wchar_t_ptr_impl( ... ); yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); no_type is_const_wchar_t_ptr_impl( ... ); template< typename Iterator > yes_type is_pair_impl( const std::pair* ); no_type is_pair_impl( ... ); struct char_or_wchar_t_array_tag {}; } } # 20 "/localhome/glisse2/include/boost/range/detail/common.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 25 "/localhome/glisse2/include/boost/range/detail/common.hpp" 2 namespace boost { namespace range_detail { # 47 "/localhome/glisse2/include/boost/range/detail/common.hpp" typedef mpl::int_<1>::type std_container_; typedef mpl::int_<2>::type std_pair_; typedef mpl::int_<3>::type const_std_pair_; typedef mpl::int_<4>::type array_; typedef mpl::int_<5>::type const_array_; typedef mpl::int_<6>::type char_array_; typedef mpl::int_<7>::type wchar_t_array_; typedef mpl::int_<8>::type char_ptr_; typedef mpl::int_<9>::type const_char_ptr_; typedef mpl::int_<10>::type wchar_t_ptr_; typedef mpl::int_<11>::type const_wchar_t_ptr_; typedef mpl::int_<12>::type string_; template< typename C > struct range_helper { static C* c; static C ptr; static const bool is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ); static const bool is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); static const bool is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ); static const bool is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ); static const bool is_string_ = (boost::type_traits::ice_or::value ); static const bool is_array_ = boost::is_array::value; }; template< typename C > class range { typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_pair_, boost::range_detail::std_pair_, void >::type pair_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_array_, boost::range_detail::array_, pair_t >::type array_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_string_, boost::range_detail::string_, array_t >::type string_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_char_ptr_, boost::range_detail::const_char_ptr_, string_t >::type const_char_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_ptr_, boost::range_detail::char_ptr_, const_char_ptr_t >::type char_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_wchar_t_ptr_, boost::range_detail::const_wchar_t_ptr_, char_ptr_t >::type const_wchar_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_ptr_, boost::range_detail::wchar_t_ptr_, const_wchar_ptr_t >::type wchar_ptr_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_array_, boost::range_detail::wchar_t_array_, wchar_ptr_t >::type wchar_array_t; typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_array_, boost::range_detail::char_array_, wchar_array_t >::type char_array_t; public: typedef typename boost::mpl::if_c< ::boost::is_void::value, boost::range_detail::std_container_, char_array_t >::type type; }; } } # 16 "/localhome/glisse2/include/boost/range/detail/implementation_help.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 18 "/localhome/glisse2/include/boost/range/detail/implementation_help.hpp" 2 # 1 "/usr/include/wchar.h" 1 3 4 # 22 "/localhome/glisse2/include/boost/range/detail/implementation_help.hpp" 2 namespace boost { namespace range_detail { template inline void boost_range_silence_warning( const T& ) { } inline const char* str_end( const char* s, const char* ) { return s + strlen( s ); } inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) { return s + wcslen( s ); } # 56 "/localhome/glisse2/include/boost/range/detail/implementation_help.hpp" template< class Char > inline Char* str_end( Char* s ) { return const_cast( str_end( s, s ) ); } template< class T, std::size_t sz > inline T* array_end( T (&boost_range_array)[sz] ) { return boost_range_array + sz; } template< class T, std::size_t sz > inline const T* array_end( const T (&boost_range_array)[sz] ) { return boost_range_array + sz; } template< class Char > inline std::size_t str_size( const Char* const& s ) { return str_end( s ) - s; } template< class T, std::size_t sz > inline std::size_t array_size( T (&boost_range_array)[sz] ) { boost_range_silence_warning( boost_range_array ); return sz; } template< class T, std::size_t sz > inline std::size_t array_size( const T (&boost_range_array)[sz] ) { boost_range_silence_warning( boost_range_array ); return sz; } } } # 25 "/localhome/glisse2/include/boost/range/end.hpp" 2 namespace boost { namespace range_detail { template< typename C > inline typename range_iterator::type range_end( C& c ) { return c.end(); } template< typename Iterator > inline Iterator range_end( const std::pair& p ) { return p.second; } template< typename Iterator > inline Iterator range_end( std::pair& p ) { return p.second; } template< typename T, std::size_t sz > inline const T* range_end( const T (&a)[sz] ) { return range_detail::array_end( a ); } template< typename T, std::size_t sz > inline T* range_end( T (&a)[sz] ) { return range_detail::array_end( a ); } } namespace range_adl_barrier { template< class T > inline typename range_iterator::type end( T& r ) { using namespace range_detail; return range_end( r ); } template< class T > inline typename range_iterator::type end( const T& r ) { using namespace range_detail; return range_end( r ); } } } namespace boost { namespace range_adl_barrier { template< class T > inline typename range_iterator::type const_end( const T& r ) { return boost::range_adl_barrier::end( r ); } } using namespace range_adl_barrier; } # 21 "/localhome/glisse2/include/boost/random/seed_seq.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 22 "/localhome/glisse2/include/boost/random/seed_seq.hpp" 2 # 30 "/localhome/glisse2/include/boost/random/seed_seq.hpp" namespace boost { namespace random { class seed_seq { public: typedef boost::uint_least32_t result_type; seed_seq() {} template seed_seq(const std::initializer_list& il) : v(il.begin(), il.end()) {} template seed_seq(Iter first, Iter last) : v(first, last) {} template explicit seed_seq(const Range& range) : v(boost::begin(range), boost::end(range)) {} template void generate(Iter first, Iter last) const { typedef typename std::iterator_traits::value_type value_type; std::fill(first, last, static_cast(0x8b8b8b8bu)); std::size_t s = v.size(); std::size_t n = last - first; std::size_t t = (n >= 623) ? 11 : (n >= 68) ? 7 : (n >= 39) ? 5 : (n >= 7) ? 3 : (n - 1)/2; std::size_t p = (n - t) / 2; std::size_t q = p + t; std::size_t m = (std::max)(s+1, n); value_type mask = 0xffffffffu; for(std::size_t k = 0; k < m; ++k) { value_type r1 = *(first + k%n) ^ *(first + (k+p)%n) ^ *(first + (k+n-1)%n); r1 = r1 ^ (r1 >> 27); r1 = (r1 * 1664525u) & mask; value_type r2 = r1 + ((k == 0) ? s : (k <= s) ? k % n + v[k - 1] : (k % n)); *(first + (k+p)%n) = (*(first + (k+p)%n) + r1) & mask; *(first + (k+q)%n) = (*(first + (k+q)%n) + r2) & mask; *(first + k%n) = r2; } for(std::size_t k = m; k < m + n; ++k) { value_type r3 = (*(first + k%n) + *(first + (k+p)%n) + *(first + (k+n-1)%n)) & mask; r3 = r3 ^ (r3 >> 27); r3 = (r3 * 1566083941u) & mask; value_type r4 = r3 - k%m; *(first + (k+p)%n) ^= r3; *(first + (k+q)%n) ^= r4; *(first + k%n) = r4; } } std::size_t size() const { return v.size(); } template void param(Iter out) { std::copy(v.begin(), v.end(), out); } private: std::vector v; }; } } # 54 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/random_number_generator.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/random_number_generator.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 20 "/localhome/glisse2/include/boost/random/random_number_generator.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 27 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 28 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/uniform_int_float.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/detail/uniform_int_float.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 22 "/localhome/glisse2/include/boost/random/detail/uniform_int_float.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/detail/uniform_int_float.hpp" 2 namespace boost { namespace random { namespace detail { template class uniform_int_float { public: typedef URNG base_type; typedef typename base_type::result_type base_result; typedef typename boost::uint_t< (std::numeric_limits::digits < std::numeric_limits::digits)? std::numeric_limits::digits : std::numeric_limits::digits >::fast result_type; uniform_int_float(base_type& rng) : _rng(rng) {} static result_type min () { return 0; } static result_type max () { std::size_t digits = std::numeric_limits::digits; if(detail::generator_bits::value() < digits) { digits = detail::generator_bits::value(); } return (result_type(2) << (digits - 1)) - 1; } base_type& base() { return _rng; } const base_type& base() const { return _rng; } result_type operator()() { base_result range = static_cast((max)())+1; return static_cast(_rng() * range); } private: base_type& _rng; }; } } } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 75 "/localhome/glisse2/include/boost/random/detail/uniform_int_float.hpp" 2 # 30 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" 2 namespace boost { namespace random { namespace detail { # 46 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" template T generate_uniform_int( Engine& eng, T min_value, T max_value, boost::mpl::true_ ) { typedef T result_type; typedef typename make_unsigned::type range_type; typedef typename Engine::result_type base_result; typedef typename make_unsigned::type base_unsigned; const range_type range = random::detail::subtract()(max_value, min_value); const base_result bmin = (eng.min)(); const base_unsigned brange = random::detail::subtract()((eng.max)(), (eng.min)()); if(range == 0) { return min_value; } else if(brange == range) { base_unsigned v = random::detail::subtract()(eng(), bmin); return random::detail::add()(v, min_value); } else if(brange < range) { for(;;) { range_type limit; if(range == (std::numeric_limits::max)()) { limit = range/(range_type(brange)+1); if(range % (range_type(brange)+1) == range_type(brange)) ++limit; } else { limit = (range+1)/(range_type(brange)+1); } range_type result = range_type(0); range_type mult = range_type(1); while(mult <= limit) { # 114 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" result += static_cast(random::detail::subtract()(eng(), bmin) * mult); if(mult * range_type(brange) == range - mult + 1) { return(result); } # 134 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" mult *= range_type(brange)+range_type(1); } # 162 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" range_type result_increment = generate_uniform_int( eng, static_cast(0), static_cast(range/mult), boost::mpl::true_()); if((std::numeric_limits::max)() / mult < result_increment) { continue; } result_increment *= mult; result += result_increment; if(result < result_increment) { continue; } if(result > range) { continue; } return random::detail::add()(result, min_value); } } else { base_unsigned bucket_size; if(brange == (std::numeric_limits::max)()) { bucket_size = brange / (static_cast(range)+1); if(brange % (static_cast(range)+1) == static_cast(range)) { ++bucket_size; } } else { bucket_size = (brange+1) / (static_cast(range)+1); } for(;;) { base_unsigned result = random::detail::subtract()(eng(), bmin); result /= bucket_size; if(result <= static_cast(range)) return random::detail::add()(result, min_value); } } } template inline T generate_uniform_int( Engine& eng, T min_value, T max_value, boost::mpl::false_ ) { uniform_int_float wrapper(eng); return generate_uniform_int(wrapper, min_value, max_value, boost::mpl::true_()); } template inline T generate_uniform_int(Engine& eng, T min_value, T max_value) { typedef typename Engine::result_type base_result; return generate_uniform_int(eng, min_value, max_value, boost::is_integral()); } } # 241 "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp" template class uniform_int_distribution { public: typedef IntType input_type; typedef IntType result_type; class param_type { public: typedef uniform_int_distribution distribution_type; explicit param_type( IntType min_arg = 0, IntType max_arg = (std::numeric_limits::max)()) : _min(min_arg), _max(max_arg) { ((_min <= _max) ? static_cast (0) : __assert_fail ("_min <= _max", "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp", 264, __PRETTY_FUNCTION__)); } IntType a() const { return _min; } IntType b() const { return _max; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._min << " " << parm._max; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { IntType min_in, max_in; if(is >> min_in >> std::ws >> max_in) { if(min_in <= max_in) { parm._min = min_in; parm._max = max_in; } else { is.setstate(std::ios_base::failbit); } } return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._min == rhs._min && lhs._max == rhs._max; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: IntType _min; IntType _max; }; explicit uniform_int_distribution( IntType min_arg = 0, IntType max_arg = (std::numeric_limits::max)()) : _min(min_arg), _max(max_arg) { ((min_arg <= max_arg) ? static_cast (0) : __assert_fail ("min_arg <= max_arg", "/localhome/glisse2/include/boost/random/uniform_int_distribution.hpp", 318, __PRETTY_FUNCTION__)); } explicit uniform_int_distribution(const param_type& parm) : _min(parm.a()), _max(parm.b()) {} IntType min () const { return _min; } IntType max () const { return _max; } IntType a() const { return _min; } IntType b() const { return _max; } param_type param() const { return param_type(_min, _max); } void param(const param_type& parm) { _min = parm.a(); _max = parm.b(); } void reset() { } template result_type operator()(Engine& eng) const { return detail::generate_uniform_int(eng, _min, _max); } template result_type operator()(Engine& eng, const param_type& parm) const { return detail::generate_uniform_int(eng, parm.a(), parm.b()); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const uniform_int_distribution& ud) { os << ud.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, uniform_int_distribution& ud) { param_type parm; if(is >> parm) { ud.param(parm); } return is; } friend bool operator==(const uniform_int_distribution& lhs, const uniform_int_distribution& rhs) { return lhs._min == rhs._min && lhs._max == rhs._max; } friend bool operator!=(const uniform_int_distribution& lhs, const uniform_int_distribution& rhs) { return !(lhs == rhs); } private: IntType _min; IntType _max; }; } } # 21 "/localhome/glisse2/include/boost/random/random_number_generator.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/random_number_generator.hpp" 2 namespace boost { namespace random { # 35 "/localhome/glisse2/include/boost/random/random_number_generator.hpp" template class random_number_generator { public: typedef URNG base_type; typedef IntType argument_type; typedef IntType result_type; random_number_generator(base_type& rng) : _rng(rng) {} result_type operator()(argument_type n) { ((n > 0) ? static_cast (0) : __assert_fail ("n > 0", "/localhome/glisse2/include/boost/random/random_number_generator.hpp", 57, __PRETTY_FUNCTION__)); return uniform_int_distribution(0, n-1)(_rng); } private: base_type& _rng; }; } using random::random_number_generator; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 72 "/localhome/glisse2/include/boost/random/random_number_generator.hpp" 2 # 55 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/variate_generator.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/variate_generator.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/variate_generator.hpp" 2 namespace boost { namespace random { # 50 "/localhome/glisse2/include/boost/random/variate_generator.hpp" template class variate_generator { private: typedef boost::random::detail::ptr_helper helper_type; public: typedef typename helper_type::value_type engine_value_type; typedef Engine engine_type; typedef Distribution distribution_type; typedef typename Distribution::result_type result_type; # 69 "/localhome/glisse2/include/boost/random/variate_generator.hpp" variate_generator(Engine e, Distribution d) : _eng(e), _dist(d) { } result_type operator()() { return _dist(engine()); } template result_type operator()(const T& value) { return _dist(engine(), value); } engine_value_type& engine() { return helper_type::ref(_eng); } const engine_value_type& engine() const { return helper_type::ref(_eng); } distribution_type& distribution() { return _dist; } const distribution_type& distribution() const { return _dist; } result_type min () const { return (distribution().min)(); } result_type max () const { return (distribution().max)(); } private: Engine _eng; distribution_type _dist; }; } using random::variate_generator; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 121 "/localhome/glisse2/include/boost/random/variate_generator.hpp" 2 # 56 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp" 2 namespace boost { namespace random { template class bernoulli_distribution { public: typedef int input_type; typedef bool result_type; class param_type { public: typedef bernoulli_distribution distribution_type; explicit param_type(RealType p_arg = RealType(0.5)) : _p(p_arg) { ((_p >= 0) ? static_cast (0) : __assert_fail ("_p >= 0", "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp", 58, __PRETTY_FUNCTION__)); ((_p <= 1) ? static_cast (0) : __assert_fail ("_p <= 1", "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp", 59, __PRETTY_FUNCTION__)); } RealType p() const { return _p; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._p; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._p; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._p == rhs._p; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _p; }; explicit bernoulli_distribution(const RealType& p_arg = RealType(0.5)) : _p(p_arg) { ((_p >= 0) ? static_cast (0) : __assert_fail ("_p >= 0", "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp", 99, __PRETTY_FUNCTION__)); ((_p <= 1) ? static_cast (0) : __assert_fail ("_p <= 1", "/localhome/glisse2/include/boost/random/bernoulli_distribution.hpp", 100, __PRETTY_FUNCTION__)); } explicit bernoulli_distribution(const param_type& parm) : _p(parm.p()) {} RealType p() const { return _p; } bool min () const { return false; } bool max () const { return true; } param_type param() const { return param_type(_p); } void param(const param_type& parm) { _p = parm.p(); } void reset() { } template bool operator()(Engine& eng) const { if(_p == RealType(0)) return false; else return RealType(eng() - (eng.min)()) <= _p * RealType((eng.max)()-(eng.min)()); } template bool operator()(Engine& eng, const param_type& parm) const { return bernoulli_distribution(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const bernoulli_distribution& bd) { os << bd._p; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, bernoulli_distribution& bd) { is >> bd._p; return is; } friend bool operator==(const bernoulli_distribution& lhs, const bernoulli_distribution& rhs) { return lhs._p == rhs._p; } friend bool operator!=(const bernoulli_distribution& lhs, const bernoulli_distribution& rhs) { return !(lhs == rhs); } private: RealType _p; }; } using random::bernoulli_distribution; } # 59 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/binomial_distribution.hpp" 1 # 17 "/localhome/glisse2/include/boost/random/binomial_distribution.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 18 "/localhome/glisse2/include/boost/random/binomial_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/binomial_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/binomial_distribution.hpp" 2 namespace boost { namespace random { namespace detail { template struct binomial_table { static const RealType table[10]; }; template const RealType binomial_table::table[10] = { 0.08106146679532726, 0.04134069595540929, 0.02767792568499834, 0.02079067210376509, 0.01664469118982119, 0.01387612882307075, 0.01189670994589177, 0.01041126526197209, 0.009255462182712733, 0.008330563433362871 }; } # 67 "/localhome/glisse2/include/boost/random/binomial_distribution.hpp" template class binomial_distribution { public: typedef IntType result_type; typedef RealType input_type; class param_type { public: typedef binomial_distribution distribution_type; explicit param_type(IntType t_arg = 1, RealType p_arg = RealType (0.5)) : _t(t_arg), _p(p_arg) {} IntType t() const { return _t; } RealType p() const { return _p; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._p << " " << parm._t; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._p >> std::ws >> parm._t; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._t == rhs._t && lhs._p == rhs._p; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: IntType _t; RealType _p; }; explicit binomial_distribution(IntType t_arg = 1, RealType p_arg = RealType(0.5)) : _t(t_arg), _p(p_arg) { init(); } explicit binomial_distribution(const param_type& parm) : _t(parm.t()), _p(parm.p()) { init(); } template IntType operator()(URNG& urng) const { if(use_inversion()) { if(0.5 < _p) { return _t - invert(_t, 1-_p, urng); } else { return invert(_t, _p, urng); } } else if(0.5 < _p) { return _t - generate(urng); } else { return generate(urng); } } template IntType operator()(URNG& urng, const param_type& parm) const { return binomial_distribution(parm)(urng); } IntType t() const { return _t; } RealType p() const { return _p; } IntType min () const { return 0; } IntType max () const { return _t; } param_type param() const { return param_type(_t, _p); } void param(const param_type& parm) { _t = parm.t(); _p = parm.p(); init(); } void reset() { } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const binomial_distribution& bd) { os << bd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, binomial_distribution& bd) { bd.read(is); return is; } friend bool operator==(const binomial_distribution& lhs, const binomial_distribution& rhs) { return lhs._t == rhs._t && lhs._p == rhs._p; } friend bool operator!=(const binomial_distribution& lhs, const binomial_distribution& rhs) { return !(lhs == rhs); } private: template void read(std::basic_istream& is) { param_type parm; if(is >> parm) { param(parm); } } bool use_inversion() const { return m < 11; } static RealType fc(IntType k) { if(k < 10) return detail::binomial_table::table[k]; else { RealType ikp1 = RealType(1) / (k + 1); return (RealType(1)/12 - (RealType(1)/360 - (RealType(1)/1260)*(ikp1*ikp1))*(ikp1*ikp1))*ikp1; } } void init() { using std::sqrt; using std::pow; RealType p = (0.5 < _p)? (1 - _p) : _p; IntType t = _t; m = static_cast((t+1)*p); if(use_inversion()) { q_n = pow((1 - p), static_cast(t)); } else { btrd.r = p/(1-p); btrd.nr = (t+1)*btrd.r; btrd.npq = t*p*(1-p); RealType sqrt_npq = sqrt(btrd.npq); btrd.b = 1.15 + 2.53 * sqrt_npq; btrd.a = -0.0873 + 0.0248*btrd.b + 0.01*p; btrd.c = t*p + 0.5; btrd.alpha = (2.83 + 5.1/btrd.b) * sqrt_npq; btrd.v_r = 0.92 - 4.2/btrd.b; btrd.u_rv_r = 0.86*btrd.v_r; } } template result_type generate(URNG& urng) const { using std::floor; using std::abs; using std::log; while(true) { RealType u; RealType v = uniform_01()(urng); if(v <= btrd.u_rv_r) { RealType u = v/btrd.v_r - 0.43; return static_cast(floor( (2*btrd.a/(0.5 - abs(u)) + btrd.b)*u + btrd.c)); } if(v >= btrd.v_r) { u = uniform_01()(urng) - 0.5; } else { u = v/btrd.v_r - 0.93; u = ((u < 0)? -0.5 : 0.5) - u; v = uniform_01()(urng) * btrd.v_r; } RealType us = 0.5 - abs(u); IntType k = static_cast(floor((2*btrd.a/us + btrd.b)*u + btrd.c)); if(k < 0 || k > _t) continue; v = v*btrd.alpha/(btrd.a/(us*us) + btrd.b); RealType km = abs(k - m); if(km <= 15) { RealType f = 1; if(m < k) { IntType i = m; do { ++i; f = f*(btrd.nr/i - btrd.r); } while(i != k); } else if(m > k) { IntType i = k; do { ++i; v = v*(btrd.nr/i - btrd.r); } while(i != m); } if(v <= f) return k; else continue; } else { v = log(v); RealType rho = (km/btrd.npq)*(((km/3. + 0.625)*km + 1./6)/btrd.npq + 0.5); RealType t = -km*km/(2*btrd.npq); if(v < t - rho) return k; if(v > t + rho) continue; IntType nm = _t - m + 1; RealType h = (m + 0.5)*log((m + 1)/(btrd.r*nm)) + fc(m) + fc(_t - m); IntType nk = _t - k + 1; if(v <= h + (_t+1)*log(static_cast(nm)/nk) + (k + 0.5)*log(nk*btrd.r/(k+1)) - fc(k) - fc(_t - k)) { return k; } else { continue; } } } } template IntType invert(IntType t, RealType p, URNG& urng) const { RealType q = 1 - p; RealType s = p / q; RealType a = (t + 1) * s; RealType r = q_n; RealType u = uniform_01()(urng); IntType x = 0; while(u > r) { u = u - r; ++x; r = ((a/x) - s) * r; } return x; } IntType _t; RealType _p; IntType m; union { struct { RealType r; RealType nr; RealType npq; RealType b; RealType a; RealType c; RealType alpha; RealType v_r; RealType u_rv_r; } btrd; RealType q_n; }; }; } using random::binomial_distribution; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 421 "/localhome/glisse2/include/boost/random/binomial_distribution.hpp" 2 # 60 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/cauchy_distribution.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/cauchy_distribution.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/cauchy_distribution.hpp" 2 namespace boost { namespace random { # 38 "/localhome/glisse2/include/boost/random/cauchy_distribution.hpp" template class cauchy_distribution { public: typedef RealType input_type; typedef RealType result_type; class param_type { public: typedef cauchy_distribution distribution_type; explicit param_type(RealType median_arg = RealType(0.0), RealType sigma_arg = RealType(1.0)) : _median(median_arg), _sigma(sigma_arg) {} RealType median() const { return _median; } RealType sigma() const { return _sigma; } RealType a() const { return _median; } RealType b() const { return _sigma; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._median << " " << parm._sigma; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._median >> std::ws >> parm._sigma; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._median == rhs._median && lhs._sigma == rhs._sigma; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _median; RealType _sigma; }; explicit cauchy_distribution(RealType median_arg = RealType(0.0), RealType sigma_arg = RealType(1.0)) : _median(median_arg), _sigma(sigma_arg) { } explicit cauchy_distribution(const param_type& parm) : _median(parm.median()), _sigma(parm.sigma()) { } RealType median() const { return _median; } RealType sigma() const { return _sigma; } RealType a() const { return _median; } RealType b() const { return _sigma; } RealType min () const { return -(std::numeric_limits::infinity)(); } RealType max () const { return (std::numeric_limits::infinity)(); } param_type param() const { return param_type(_median, _sigma); } void param(const param_type& parm) { _median = parm.median(); _sigma = parm.sigma(); } void reset() { } template result_type operator()(Engine& eng) { const result_type pi = result_type(3.14159265358979323846); using std::tan; RealType val = uniform_01()(eng)-result_type(0.5); return _median + _sigma * tan(pi*val); } template result_type operator()(Engine& eng, const param_type& parm) { return cauchy_distribution(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const cauchy_distribution& cd) { os << cd._median << " " << cd._sigma; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, cauchy_distribution& cd) { is >> cd._median >> std::ws >> cd._sigma; return is; } friend bool operator==(const cauchy_distribution& lhs, const cauchy_distribution& rhs) { return lhs._median == rhs._median && lhs._sigma == rhs._sigma; } friend bool operator!=(const cauchy_distribution& lhs, const cauchy_distribution& rhs) { return !(lhs == rhs); } private: RealType _median; RealType _sigma; }; } using random::cauchy_distribution; } # 61 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/chi_squared_distribution.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/chi_squared_distribution.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/chi_squared_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/gamma_distribution.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/gamma_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/gamma_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/gamma_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/exponential_distribution.hpp" 1 # 22 "/localhome/glisse2/include/boost/random/exponential_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 23 "/localhome/glisse2/include/boost/random/exponential_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/exponential_distribution.hpp" 2 namespace boost { namespace random { template class exponential_distribution { public: typedef RealType input_type; typedef RealType result_type; class param_type { public: typedef exponential_distribution distribution_type; param_type(RealType lambda_arg = RealType(1.0)) : _lambda(lambda_arg) { ((_lambda > RealType(0)) ? static_cast (0) : __assert_fail ("_lambda > RealType(0)", "/localhome/glisse2/include/boost/random/exponential_distribution.hpp", 56, __PRETTY_FUNCTION__)); } RealType lambda() const { return _lambda; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._lambda; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._lambda; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._lambda == rhs._lambda; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _lambda; }; explicit exponential_distribution(RealType lambda_arg = RealType(1.0)) : _lambda(lambda_arg) { ((_lambda > RealType(0)) ? static_cast (0) : __assert_fail ("_lambda > RealType(0)", "/localhome/glisse2/include/boost/random/exponential_distribution.hpp", 92, __PRETTY_FUNCTION__)); } explicit exponential_distribution(const param_type& parm) : _lambda(parm.lambda()) {} RealType lambda() const { return _lambda; } RealType min () const { return RealType(0); } RealType max () const { return (std::numeric_limits::infinity)(); } param_type param() const { return param_type(_lambda); } void param(const param_type& parm) { _lambda = parm.lambda(); } void reset() { } template result_type operator()(Engine& eng) const { using std::log; return -result_type(1) / _lambda * log(result_type(1)-uniform_01()(eng)); } template result_type operator()(Engine& eng, const param_type& parm) const { return exponential_distribution(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const exponential_distribution& ed) { os << ed._lambda; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, exponential_distribution& ed) { is >> ed._lambda; return is; } friend bool operator==(const exponential_distribution& lhs, const exponential_distribution& rhs) { return lhs._lambda == rhs._lambda; } friend bool operator!=(const exponential_distribution& lhs, const exponential_distribution& rhs) { return !(lhs == rhs); } private: result_type _lambda; }; } using random::exponential_distribution; } # 26 "/localhome/glisse2/include/boost/random/gamma_distribution.hpp" 2 namespace boost { namespace random { # 39 "/localhome/glisse2/include/boost/random/gamma_distribution.hpp" template class gamma_distribution { public: typedef RealType input_type; typedef RealType result_type; class param_type { public: typedef gamma_distribution distribution_type; param_type(const RealType& alpha_arg = RealType(1.0), const RealType& beta_arg = RealType(1.0)) : _alpha(alpha_arg), _beta(beta_arg) { } RealType alpha() const { return _alpha; } RealType beta() const { return _beta; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._alpha << ' ' << parm._beta; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._alpha >> std::ws >> parm._beta; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._alpha == rhs._alpha && lhs._beta == rhs._beta; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _alpha; RealType _beta; }; static_assert(!std::numeric_limits::is_integer, "!std::numeric_limits::is_integer"); explicit gamma_distribution(const result_type& alpha_arg = result_type(1.0), const result_type& beta_arg = result_type(1.0)) : _exp(result_type(1)), _alpha(alpha_arg), _beta(beta_arg) { ((_alpha > result_type(0)) ? static_cast (0) : __assert_fail ("_alpha > result_type(0)", "/localhome/glisse2/include/boost/random/gamma_distribution.hpp", 117, __PRETTY_FUNCTION__)); ((_beta > result_type(0)) ? static_cast (0) : __assert_fail ("_beta > result_type(0)", "/localhome/glisse2/include/boost/random/gamma_distribution.hpp", 118, __PRETTY_FUNCTION__)); init(); } explicit gamma_distribution(const param_type& parm) : _exp(result_type(1)), _alpha(parm.alpha()), _beta(parm.beta()) { init(); } RealType alpha() const { return _alpha; } RealType beta() const { return _beta; } RealType min () const { return 0; } RealType max () const { return (std::numeric_limits::infinity)(); } param_type param() const { return param_type(_alpha, _beta); } void param(const param_type& parm) { _alpha = parm.alpha(); _beta = parm.beta(); init(); } void reset() { _exp.reset(); } template result_type operator()(Engine& eng) { using std::tan; using std::sqrt; using std::exp; using std::log; using std::pow; if(_alpha == result_type(1)) { return _exp(eng) * _beta; } else if(_alpha > result_type(1)) { const result_type pi = result_type(3.14159265358979323846); for(;;) { result_type y = tan(pi * uniform_01()(eng)); result_type x = sqrt(result_type(2)*_alpha-result_type(1))*y + _alpha-result_type(1); if(x <= result_type(0)) continue; if(uniform_01()(eng) > (result_type(1)+y*y) * exp((_alpha-result_type(1)) *log(x/(_alpha-result_type(1))) - sqrt(result_type(2)*_alpha -result_type(1))*y)) continue; return x * _beta; } } else { for(;;) { result_type u = uniform_01()(eng); result_type y = _exp(eng); result_type x, q; if(u < _p) { x = exp(-y/_alpha); q = _p*exp(-x); } else { x = result_type(1)+y; q = _p + (result_type(1)-_p) * pow(x,_alpha-result_type(1)); } if(u >= q) continue; return x * _beta; } } } template RealType operator()(URNG& urng, const param_type& parm) const { return gamma_distribution(parm)(urng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const gamma_distribution& gd) { os << gd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, gamma_distribution& gd) { gd.read(is); return is; } friend bool operator==(const gamma_distribution& lhs, const gamma_distribution& rhs) { return lhs._alpha == rhs._alpha && lhs._beta == rhs._beta && lhs._exp == rhs._exp; } friend bool operator!=(const gamma_distribution& lhs, const gamma_distribution& rhs) { return !(lhs == rhs); } private: template void read(std::basic_istream& is) { param_type parm; if(is >> parm) { param(parm); } } void init() { using std::exp; _p = exp(result_type(1)) / (_alpha + exp(result_type(1))); } exponential_distribution _exp; result_type _alpha; result_type _beta; result_type _p; }; } using random::gamma_distribution; } # 21 "/localhome/glisse2/include/boost/random/chi_squared_distribution.hpp" 2 namespace boost { namespace random { # 32 "/localhome/glisse2/include/boost/random/chi_squared_distribution.hpp" template class chi_squared_distribution { public: typedef RealType result_type; typedef RealType input_type; class param_type { public: typedef chi_squared_distribution distribution_type; explicit param_type(RealType n_arg = RealType(1)) : _n(n_arg) {} RealType n() const { return _n; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._n; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._n; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._n == rhs._n; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _n; }; explicit chi_squared_distribution(RealType n_arg = RealType(1)) : _impl(n_arg / 2) { } explicit chi_squared_distribution(const param_type& parm) : _impl(parm.n() / 2) { } template RealType operator()(URNG& urng) { return 2 * _impl(urng); } template RealType operator()(URNG& urng, const param_type& parm) const { return chi_squared_distribution(parm)(urng); } RealType n() const { return 2 * _impl.alpha(); } RealType min () const { return 0; } RealType max () const { return (std::numeric_limits::infinity)(); } param_type param() const { return param_type(n()); } void param(const param_type& parm) { typedef gamma_distribution impl_type; typename impl_type::param_type impl_parm(parm.n() / 2); _impl.param(impl_parm); } void reset() { _impl.reset(); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const chi_squared_distribution& c2d) { os << c2d.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, chi_squared_distribution& c2d) { c2d.read(is); return is; } friend bool operator==(const chi_squared_distribution& lhs, const chi_squared_distribution& rhs) { return lhs._impl == rhs._impl; } friend bool operator!=(const chi_squared_distribution& lhs, const chi_squared_distribution& rhs) { return !(lhs == rhs); } private: template void read(std::basic_istream& is) { param_type parm; if(is >> parm) { param(parm); } } gamma_distribution _impl; }; } } # 62 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/uniform_int.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/uniform_int.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 21 "/localhome/glisse2/include/boost/random/uniform_int.hpp" 2 namespace boost { # 35 "/localhome/glisse2/include/boost/random/uniform_int.hpp" template class uniform_int : public random::uniform_int_distribution { typedef random::uniform_int_distribution base_type; public: class param_type : public base_type::param_type { public: typedef uniform_int distribution_type; explicit param_type(IntType min_arg = 0, IntType max_arg = 9) : base_type::param_type(min_arg, max_arg) {} }; explicit uniform_int(IntType min_arg = 0, IntType max_arg = 9) : base_type(min_arg, max_arg) {} explicit uniform_int(const param_type& parm) : base_type(parm) {} param_type param() const { return param_type(this->a(), this->b()); } void param(const param_type& parm) { this->base_type::param(parm); } template IntType operator()(Engine& eng) const { return static_cast(*this)(eng); } template IntType operator()(Engine& eng, const param_type& parm) const { return static_cast(*this)(eng, parm); } template IntType operator()(Engine& eng, IntType n) const { ((n > 0) ? static_cast (0) : __assert_fail ("n > 0", "/localhome/glisse2/include/boost/random/uniform_int.hpp", 92, __PRETTY_FUNCTION__)); return static_cast(*this)(eng, param_type(0, n - 1)); } }; } # 24 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/vector_io.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/detail/vector_io.hpp" namespace boost { namespace random { namespace detail { template void print_vector(std::basic_ostream& os, const std::vector& vec) { typename std::vector::const_iterator iter = vec.begin(), end = vec.end(); os << os.widen('['); if(iter != end) { os << *iter; ++iter; for(; iter != end; ++iter) { os << os.widen(' ') << *iter; } } os << os.widen(']'); } template void read_vector(std::basic_istream& is, std::vector& vec) { CharT ch; if(!(is >> ch)) { return; } if(ch != is.widen('[')) { is.putback(ch); is.setstate(std::ios_base::failbit); return; } T val; while(is >> std::ws >> val) { vec.push_back(val); } if(is.fail()) { is.clear(); if(!(is >> ch)) { return; } if(ch != is.widen(']')) { is.putback(ch); is.setstate(std::ios_base::failbit); } } } } } } # 27 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" 2 # 35 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 36 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" 2 namespace boost { namespace random { template class discrete_distribution { public: typedef WeightType input_type; typedef IntType result_type; class param_type { public: typedef discrete_distribution distribution_type; param_type() : _probabilities(1, static_cast(1)) {} template param_type(Iter first, Iter last) : _probabilities(first, last) { normalize(); } param_type(const std::initializer_list& wl) : _probabilities(wl) { normalize(); } template explicit param_type(const Range& range) : _probabilities(boost::begin(range), boost::end(range)) { normalize(); } # 104 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" template param_type(std::size_t nw, double xmin, double xmax, Func fw) { std::size_t n = (nw == 0) ? 1 : nw; double delta = (xmax - xmin) / n; ((delta > 0) ? static_cast (0) : __assert_fail ("delta > 0", "/localhome/glisse2/include/boost/random/discrete_distribution.hpp", 109, __PRETTY_FUNCTION__)); for(std::size_t k = 0; k < n; ++k) { _probabilities.push_back(fw(xmin + k*delta + delta/2)); } normalize(); } std::vector probabilities() const { return _probabilities; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { detail::print_vector(os, parm._probabilities); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { std::vector temp; detail::read_vector(is, temp); if(is) { parm._probabilities.swap(temp); } return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._probabilities == rhs._probabilities; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: friend class discrete_distribution; explicit param_type(const discrete_distribution& dist) : _probabilities(dist.probabilities()) {} void normalize() { WeightType sum = std::accumulate(_probabilities.begin(), _probabilities.end(), static_cast(0)); for(typename std::vector::iterator iter = _probabilities.begin(), end = _probabilities.end(); iter != end; ++iter) { *iter /= sum; } } std::vector _probabilities; }; discrete_distribution() { _alias_table.push_back(std::make_pair(static_cast(1), static_cast(0))); } template discrete_distribution(Iter first, Iter last) { init(first, last); } # 208 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" discrete_distribution(std::initializer_list wl) { init(wl.begin(), wl.end()); } template explicit discrete_distribution(const Range& range) { init(boost::begin(range), boost::end(range)); } # 233 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" template discrete_distribution(std::size_t nw, double xmin, double xmax, Func fw) { std::size_t n = (nw == 0) ? 1 : nw; double delta = (xmax - xmin) / n; ((delta > 0) ? static_cast (0) : __assert_fail ("delta > 0", "/localhome/glisse2/include/boost/random/discrete_distribution.hpp", 238, __PRETTY_FUNCTION__)); std::vector weights; for(std::size_t k = 0; k < n; ++k) { weights.push_back(fw(xmin + k*delta + delta/2)); } init(weights.begin(), weights.end()); } explicit discrete_distribution(const param_type& parm) { param(parm); } template IntType operator()(URNG& urng) const { ((!_alias_table.empty()) ? static_cast (0) : __assert_fail ("!_alias_table.empty()", "/localhome/glisse2/include/boost/random/discrete_distribution.hpp", 260, __PRETTY_FUNCTION__)); WeightType test = uniform_01()(urng); IntType result = uniform_int((min)(), (max)())(urng); if(test < _alias_table[result].first) { return result; } else { return(_alias_table[result].second); } } template IntType operator()(URNG& urng, const param_type& parm) const { while(true) { WeightType val = uniform_01()(urng); WeightType sum = 0; std::size_t result = 0; for(typename std::vector::const_iterator iter = parm._probabilities.begin(), end = parm._probabilities.end(); iter != end; ++iter, ++result) { sum += *iter; if(sum > val) { return result; } } } } result_type min () const { return 0; } result_type max () const { return static_cast(_alias_table.size() - 1); } # 311 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" std::vector probabilities() const { std::vector result(_alias_table.size()); const WeightType mean = static_cast(1) / _alias_table.size(); std::size_t i = 0; for(typename alias_table_t::const_iterator iter = _alias_table.begin(), end = _alias_table.end(); iter != end; ++iter, ++i) { WeightType val = iter->first * mean; result[i] += val; result[iter->second] += mean - val; } return(result); } param_type param() const { return param_type(*this); } void param(const param_type& parm) { init(parm._probabilities.begin(), parm._probabilities.end()); } void reset() {} template friend std::basic_ostream& operator<<(std::basic_ostream& os, const discrete_distribution& dd) { os << dd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, discrete_distribution& dd) { param_type parm; if(is >> parm) { dd.param(parm); } return is; } friend bool operator==(const discrete_distribution& lhs, const discrete_distribution& rhs) { return lhs._alias_table == rhs._alias_table; } friend bool operator!=(const discrete_distribution& lhs, const discrete_distribution& rhs) { return !(lhs == rhs); } private: template void init(Iter first, Iter last, std::input_iterator_tag) { std::vector temp(first, last); init(temp.begin(), temp.end()); } template void init(Iter first, Iter last, std::forward_iterator_tag) { std::vector > below_average; std::vector > above_average; std::size_t size = std::distance(first, last); WeightType weight_sum = std::accumulate(first, last, static_cast(0)); WeightType weight_average = weight_sum / size; std::size_t i = 0; for(; first != last; ++first, ++i) { WeightType val = *first / weight_average; std::pair elem(val, static_cast(i)); if(val < static_cast(1)) { below_average.push_back(elem); } else { above_average.push_back(elem); } } _alias_table.resize(size); typename alias_table_t::iterator b_iter = below_average.begin(), b_end = below_average.end(), a_iter = above_average.begin(), a_end = above_average.end() ; while(b_iter != b_end && a_iter != a_end) { _alias_table[b_iter->second] = std::make_pair(b_iter->first, a_iter->second); a_iter->first -= (static_cast(1) - b_iter->first); if(a_iter->first < static_cast(1)) { *b_iter = *a_iter++; } else { ++b_iter; } } for(; b_iter != b_end; ++b_iter) { _alias_table[b_iter->second].first = static_cast(1); } for(; a_iter != a_end; ++a_iter) { _alias_table[a_iter->second].first = static_cast(1); } } template void init(Iter first, Iter last) { if(first == last) { _alias_table.clear(); _alias_table.push_back(std::make_pair(static_cast(1), static_cast(0))); } else { typename std::iterator_traits::iterator_category category; init(first, last, category); } } typedef std::vector > alias_table_t; alias_table_t _alias_table; }; } } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 452 "/localhome/glisse2/include/boost/random/discrete_distribution.hpp" 2 # 63 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/extreme_value_distribution.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/extreme_value_distribution.hpp" namespace boost { namespace random { template class extreme_value_distribution { public: typedef RealType result_type; typedef RealType input_type; class param_type { public: typedef extreme_value_distribution distribution_type; explicit param_type(RealType a_arg = 1.0, RealType b_arg = 1.0) : _a(a_arg), _b(b_arg) {} RealType a() const { return _a; } RealType b() const { return _b; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._a << ' ' << parm._b; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._a >> std::ws >> parm._b; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._a == rhs._a && lhs._b == rhs._b; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _a; RealType _b; }; explicit extreme_value_distribution(RealType a_arg = 1.0, RealType b_arg = 1.0) : _a(a_arg), _b(b_arg) {} explicit extreme_value_distribution(const param_type& parm) : _a(parm.a()), _b(parm.b()) {} template RealType operator()(URNG& urng) const { using std::log; return _a - log(-log(uniform_01()(urng))) * _b; } template RealType operator()(URNG& urng, const param_type& parm) const { return extreme_value_distribution(parm)(urng); } RealType a() const { return _a; } RealType b() const { return _b; } RealType min () const { return -std::numeric_limits::infinity(); } RealType max () const { return std::numeric_limits::infinity(); } param_type param() const { return param_type(_a, _b); } void param(const param_type& parm) { _a = parm.a(); _b = parm.b(); } void reset() { } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const extreme_value_distribution& wd) { os << wd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, extreme_value_distribution& wd) { param_type parm; if(is >> parm) { wd.param(parm); } return is; } friend bool operator==(const extreme_value_distribution& lhs, const extreme_value_distribution& rhs) { return lhs._a == rhs._a && lhs._b == rhs._b; } friend bool operator!=(const extreme_value_distribution& lhs, const extreme_value_distribution& rhs) { return !(lhs == rhs); } private: RealType _a; RealType _b; }; } } # 65 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/fisher_f_distribution.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/fisher_f_distribution.hpp" namespace boost { namespace random { # 36 "/localhome/glisse2/include/boost/random/fisher_f_distribution.hpp" template class fisher_f_distribution { public: typedef RealType result_type; typedef RealType input_type; class param_type { public: typedef fisher_f_distribution distribution_type; explicit param_type(RealType m_arg = RealType(1.0), RealType n_arg = RealType(1.0)) : _m(m_arg), _n(n_arg) {} RealType m() const { return _m; } RealType n() const { return _n; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._m << ' ' << parm._n; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._m >> std::ws >> parm._n; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._m == rhs._m && lhs._n == rhs._n; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _m; RealType _n; }; explicit fisher_f_distribution(RealType m_arg = RealType(1.0), RealType n_arg = RealType(1.0)) : _impl_m(m_arg), _impl_n(n_arg) {} explicit fisher_f_distribution(const param_type& parm) : _impl_m(parm.m()), _impl_n(parm.n()) {} template RealType operator()(URNG& urng) { return (_impl_m(urng) * n()) / (_impl_n(urng) * m()); } template RealType operator()(URNG& urng, const param_type& parm) const { return fisher_f_distribution(parm)(urng); } RealType m() const { return _impl_m.n(); } RealType n() const { return _impl_n.n(); } RealType min () const { return 0; } RealType max () const { return std::numeric_limits::infinity(); } param_type param() const { return param_type(m(), n()); } void param(const param_type& parm) { typedef chi_squared_distribution impl_type; typename impl_type::param_type m_param(parm.m()); _impl_m.param(m_param); typename impl_type::param_type n_param(parm.n()); _impl_n.param(n_param); } void reset() { } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const fisher_f_distribution& fd) { os << fd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, fisher_f_distribution& fd) { param_type parm; if(is >> parm) { fd.param(parm); } return is; } friend bool operator==(const fisher_f_distribution& lhs, const fisher_f_distribution& rhs) { return lhs._impl_m == rhs._impl_m && lhs._impl_n == rhs._impl_n; } friend bool operator!=(const fisher_f_distribution& lhs, const fisher_f_distribution& rhs) { return !(lhs == rhs); } private: chi_squared_distribution _impl_m; chi_squared_distribution _impl_n; }; } } # 66 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/geometric_distribution.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/geometric_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 24 "/localhome/glisse2/include/boost/random/geometric_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/geometric_distribution.hpp" 2 namespace boost { namespace random { # 46 "/localhome/glisse2/include/boost/random/geometric_distribution.hpp" template class geometric_distribution { public: typedef RealType input_type; typedef IntType result_type; class param_type { public: typedef geometric_distribution distribution_type; explicit param_type(RealType p_arg = RealType(0.5)) : _p(p_arg) { ((RealType(0) < _p && _p < RealType(1)) ? static_cast (0) : __assert_fail ("RealType(0) < _p && _p < RealType(1)", "/localhome/glisse2/include/boost/random/geometric_distribution.hpp", 63, __PRETTY_FUNCTION__)); } RealType p() const { return _p; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._p; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { double p_in; if(is >> p_in) { if(p_in > RealType(0) && p_in < RealType(1)) { parm._p = p_in; } else { is.setstate(std::ios_base::failbit); } } return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._p == rhs._p; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _p; }; explicit geometric_distribution(const RealType& p = RealType(0.5)) : _p(p) { ((RealType(0) < _p && _p < RealType(1)) ? static_cast (0) : __assert_fail ("RealType(0) < _p && _p < RealType(1)", "/localhome/glisse2/include/boost/random/geometric_distribution.hpp", 110, __PRETTY_FUNCTION__)); init(); } explicit geometric_distribution(const param_type& parm) : _p(parm.p()) { init(); } RealType p() const { return _p; } IntType min () const { return IntType(0); } IntType max () const { return (std::numeric_limits::max)(); } param_type param() const { return param_type(_p); } void param(const param_type& parm) { _p = parm.p(); init(); } void reset() { } template result_type operator()(Engine& eng) const { using std::log; using std::floor; RealType x = RealType(1) - boost::uniform_01()(eng); return IntType(floor(log(x) / _log_1mp)); } template result_type operator()(Engine& eng, const param_type& parm) const { return geometric_distribution(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const geometric_distribution& gd) { os << gd._p; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, geometric_distribution& gd) { param_type parm; if(is >> parm) { gd.param(parm); } return is; } friend bool operator==(const geometric_distribution& lhs, const geometric_distribution& rhs) { return lhs._p == rhs._p; } friend bool operator!=(const geometric_distribution& lhs, const geometric_distribution& rhs) { return !(lhs == rhs); } private: void init() { using std::log; _log_1mp = log(1 - _p); } RealType _p; RealType _log_1mp; }; } # 225 "/localhome/glisse2/include/boost/random/geometric_distribution.hpp" template class geometric_distribution { public: typedef RealType input_type; typedef IntType result_type; explicit geometric_distribution(RealType p_arg = RealType(0.5)) : _impl(1 - p_arg) {} RealType p() const { return 1 - _impl.p(); } void reset() {} template IntType operator()(Engine& eng) const { return _impl(eng) + IntType(1); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const geometric_distribution& gd) { os << gd.p(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, geometric_distribution& gd) { RealType val; if(is >> val) { typename impl_type::param_type impl_param(1 - val); gd._impl.param(impl_param); } return is; } private: typedef random::geometric_distribution impl_type; impl_type _impl; }; } # 68 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/lognormal_distribution.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/lognormal_distribution.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 1 3 # 43 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 3 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 3 # 1 "/usr/include/assert.h" 1 3 4 # 45 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cassert" 2 3 # 22 "/localhome/glisse2/include/boost/random/lognormal_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/lognormal_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/normal_distribution.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/normal_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 24 "/localhome/glisse2/include/boost/random/normal_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 27 "/localhome/glisse2/include/boost/random/normal_distribution.hpp" 2 namespace boost { namespace random { # 44 "/localhome/glisse2/include/boost/random/normal_distribution.hpp" template class normal_distribution { public: typedef RealType input_type; typedef RealType result_type; class param_type { public: typedef normal_distribution distribution_type; explicit param_type(RealType mean_arg = RealType(0.0), RealType sigma_arg = RealType(1.0)) : _mean(mean_arg), _sigma(sigma_arg) {} RealType mean() const { return _mean; } RealType sigma() const { return _sigma; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._mean << " " << parm._sigma ; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._mean >> std::ws >> parm._sigma; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._mean == rhs._mean && lhs._sigma == rhs._sigma; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _mean; RealType _sigma; }; explicit normal_distribution(const RealType& mean_arg = RealType(0.0), const RealType& sigma_arg = RealType(1.0)) : _mean(mean_arg), _sigma(sigma_arg), _r1(0), _r2(0), _cached_rho(0), _valid(false) { ((_sigma >= RealType(0)) ? static_cast (0) : __assert_fail ("_sigma >= RealType(0)", "/localhome/glisse2/include/boost/random/normal_distribution.hpp", 104, __PRETTY_FUNCTION__)); } explicit normal_distribution(const param_type& parm) : _mean(parm.mean()), _sigma(parm.sigma()), _r1(0), _r2(0), _cached_rho(0), _valid(false) {} RealType mean() const { return _mean; } RealType sigma() const { return _sigma; } RealType min () const { return -std::numeric_limits::infinity(); } RealType max () const { return std::numeric_limits::infinity(); } param_type param() const { return param_type(_mean, _sigma); } void param(const param_type& parm) { _mean = parm.mean(); _sigma = parm.sigma(); _valid = false; } void reset() { _valid = false; } template result_type operator()(Engine& eng) { using std::sqrt; using std::log; using std::sin; using std::cos; if(!_valid) { _r1 = boost::uniform_01()(eng); _r2 = boost::uniform_01()(eng); _cached_rho = sqrt(-result_type(2) * log(result_type(1)-_r2)); _valid = true; } else { _valid = false; } const result_type pi = result_type(3.14159265358979323846); return _cached_rho * (_valid ? cos(result_type(2)*pi*_r1) : sin(result_type(2)*pi*_r1)) * _sigma + _mean; } template result_type operator()(URNG& urng, const param_type& parm) { return normal_distribution(parm)(urng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const normal_distribution& nd) { os << nd._mean << " " << nd._sigma << " " << nd._valid << " " << nd._cached_rho << " " << nd._r1; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, normal_distribution& nd) { is >> std::ws >> nd._mean >> std::ws >> nd._sigma >> std::ws >> nd._valid >> std::ws >> nd._cached_rho >> std::ws >> nd._r1; return is; } friend bool operator==(const normal_distribution& lhs, const normal_distribution& rhs) { return lhs._mean == rhs._mean && lhs._sigma == rhs._sigma && lhs._valid == rhs._valid && (!lhs._valid || (lhs._r1 == rhs._r1 && lhs._r2 == rhs._r2)); } friend bool operator!=(const normal_distribution& lhs, const normal_distribution& rhs) { return !(lhs == rhs); } private: RealType _mean, _sigma; RealType _r1, _r2, _cached_rho; bool _valid; }; } using random::normal_distribution; } # 28 "/localhome/glisse2/include/boost/random/lognormal_distribution.hpp" 2 namespace boost { namespace random { # 45 "/localhome/glisse2/include/boost/random/lognormal_distribution.hpp" template class lognormal_distribution { public: typedef typename normal_distribution::input_type input_type; typedef RealType result_type; class param_type { public: typedef lognormal_distribution distribution_type; explicit param_type(RealType m_arg = RealType(0.0), RealType s_arg = RealType(1.0)) : _m(m_arg), _s(s_arg) {} RealType m() const { return _m; } RealType s() const { return _s; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._m << " " << parm._s; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._m >> std::ws >> parm._s; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._m == rhs._m && lhs._s == rhs._s; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _m; RealType _s; }; explicit lognormal_distribution(RealType m_arg = RealType(0.0), RealType s_arg = RealType(1.0)) : _normal(m_arg, s_arg) {} explicit lognormal_distribution(const param_type& parm) : _normal(parm.m(), parm.s()) {} RealType m() const { return _normal.mean(); } RealType s() const { return _normal.sigma(); } RealType min () const { return RealType(0); } RealType max () const { return (std::numeric_limits::infinity)(); } param_type param() const { return param_type(m(), s()); } void param(const param_type& parm) { typedef normal_distribution normal_type; typename normal_type::param_type normal_param(parm.m(), parm.s()); _normal.param(normal_param); } void reset() { _normal.reset(); } template result_type operator()(Engine& eng) { using std::exp; return exp(_normal(eng)); } template result_type operator()(Engine& eng, const param_type& parm) { return lognormal_distribution(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const lognormal_distribution& ld) { os << ld._normal; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, lognormal_distribution& ld) { is >> ld._normal; return is; } friend bool operator==(const lognormal_distribution& lhs, const lognormal_distribution& rhs) { return lhs._normal == rhs._normal; } friend bool operator!=(const lognormal_distribution& lhs, const lognormal_distribution& rhs) { return !(lhs == rhs); } private: normal_distribution _normal; }; } # 200 "/localhome/glisse2/include/boost/random/lognormal_distribution.hpp" template class lognormal_distribution { public: typedef typename normal_distribution::input_type input_type; typedef RealType result_type; lognormal_distribution(RealType mean_arg = RealType(1.0), RealType sigma_arg = RealType(1.0)) : _mean(mean_arg), _sigma(sigma_arg) { init(); } RealType mean() const { return _mean; } RealType sigma() const { return _sigma; } void reset() { _normal.reset(); } template RealType operator()(Engine& eng) { using std::exp; return exp(_normal(eng) * _nsigma + _nmean); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const lognormal_distribution& ld) { os << ld._normal << " " << ld._mean << " " << ld._sigma; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, lognormal_distribution& ld) { is >> ld._normal >> std::ws >> ld._mean >> std::ws >> ld._sigma; ld.init(); return is; } private: void init() { using std::log; using std::sqrt; _nmean = log(_mean*_mean/sqrt(_sigma*_sigma + _mean*_mean)); _nsigma = sqrt(log(_sigma*_sigma/_mean/_mean+result_type(1))); } RealType _mean; RealType _sigma; RealType _nmean; RealType _nsigma; normal_distribution _normal; }; } # 69 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/negative_binomial_distribution.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/negative_binomial_distribution.hpp" # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/negative_binomial_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" 1 # 19 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 20 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/disable_warnings.hpp" 1 # 27 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" 2 namespace boost { namespace random { namespace detail { template struct poisson_table { static RealType value[10]; }; template RealType poisson_table::value[10] = { 0.0, 0.0, 0.69314718055994529, 1.7917594692280550, 3.1780538303479458, 4.7874917427820458, 6.5792512120101012, 8.5251613610654147, 10.604602902745251, 12.801827480081469 }; } # 67 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" template class poisson_distribution { public: typedef IntType result_type; typedef RealType input_type; class param_type { public: typedef poisson_distribution distribution_type; explicit param_type(RealType mean_arg = RealType(1)) : _mean(mean_arg) { ((_mean > 0) ? static_cast (0) : __assert_fail ("_mean > 0", "/localhome/glisse2/include/boost/random/poisson_distribution.hpp", 84, __PRETTY_FUNCTION__)); } RealType mean() const { return _mean; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._mean; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._mean; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._mean == rhs._mean; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _mean; }; explicit poisson_distribution(RealType mean_arg = RealType(1)) : _mean(mean_arg) { ((_mean > 0) ? static_cast (0) : __assert_fail ("_mean > 0", "/localhome/glisse2/include/boost/random/poisson_distribution.hpp", 130, __PRETTY_FUNCTION__)); init(); } explicit poisson_distribution(const param_type& parm) : _mean(parm.mean()) { init(); } template IntType operator()(URNG& urng) const { if(use_inversion()) { return invert(urng); } else { return generate(urng); } } template IntType operator()(URNG& urng, const param_type& parm) const { return poisson_distribution(parm)(urng); } RealType mean() const { return _mean; } IntType min () const { return 0; } IntType max () const { return (std::numeric_limits::max)(); } param_type param() const { return param_type(_mean); } void param(const param_type& parm) { _mean = parm.mean(); init(); } void reset() { } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const poisson_distribution& pd) { os << pd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, poisson_distribution& pd) { pd.read(is); return is; } friend bool operator==(const poisson_distribution& lhs, const poisson_distribution& rhs) { return lhs._mean == rhs._mean; } friend bool operator!=(const poisson_distribution& lhs, const poisson_distribution& rhs) { return !(lhs == rhs); } private: template void read(std::basic_istream& is) { param_type parm; if(is >> parm) { param(parm); } } bool use_inversion() const { return _mean < 10; } static RealType log_factorial(IntType k) { ((k >= 0) ? static_cast (0) : __assert_fail ("k >= 0", "/localhome/glisse2/include/boost/random/poisson_distribution.hpp", 247, __PRETTY_FUNCTION__)); ((k < 10) ? static_cast (0) : __assert_fail ("k < 10", "/localhome/glisse2/include/boost/random/poisson_distribution.hpp", 248, __PRETTY_FUNCTION__)); return detail::poisson_table::value[k]; } void init() { using std::sqrt; using std::exp; if(use_inversion()) { _exp_mean = exp(-_mean); } else { _ptrd.smu = sqrt(_mean); _ptrd.b = 0.931 + 2.53 * _ptrd.smu; _ptrd.a = -0.059 + 0.02483 * _ptrd.b; _ptrd.inv_alpha = 1.1239 + 1.1328 / (_ptrd.b - 3.4); _ptrd.v_r = 0.9277 - 3.6224 / (_ptrd.b - 2); } } template IntType generate(URNG& urng) const { using std::floor; using std::abs; using std::log; while(true) { RealType u; RealType v = uniform_01()(urng); if(v <= 0.86 * _ptrd.v_r) { u = v / _ptrd.v_r - 0.43; return static_cast(floor( (2*_ptrd.a/(0.5-abs(u)) + _ptrd.b)*u + _mean + 0.445)); } if(v >= _ptrd.v_r) { u = uniform_01()(urng) - 0.5; } else { u = v/_ptrd.v_r - 0.93; u = ((u < 0)? -0.5 : 0.5) - u; v = uniform_01()(urng) * _ptrd.v_r; } RealType us = 0.5 - abs(u); if(us < 0.013 && v > us) { continue; } RealType k = floor((2*_ptrd.a/us + _ptrd.b)*u+_mean+0.445); v = v*_ptrd.inv_alpha/(_ptrd.a/(us*us) + _ptrd.b); RealType log_sqrt_2pi = 0.91893853320467267; if(k >= 10) { if(log(v*_ptrd.smu) <= (k + 0.5)*log(_mean/k) - _mean - log_sqrt_2pi + k - (1/12. - (1/360. - 1/(1260.*k*k))/(k*k))/k) { return static_cast(k); } } else if(k >= 0) { if(log(v) <= k*log(_mean) - _mean - log_factorial(static_cast(k))) { return static_cast(k); } } } } template IntType invert(URNG& urng) const { RealType p = _exp_mean; IntType x = 0; RealType u = uniform_01()(urng); while(u > p) { u = u - p; ++x; p = _mean * p / x; } return x; } RealType _mean; union { struct { RealType v_r; RealType a; RealType b; RealType smu; RealType inv_alpha; } _ptrd; RealType _exp_mean; }; }; } using random::poisson_distribution; } # 1 "/localhome/glisse2/include/boost/random/detail/enable_warnings.hpp" 1 # 359 "/localhome/glisse2/include/boost/random/poisson_distribution.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/negative_binomial_distribution.hpp" 2 namespace boost { namespace random { # 36 "/localhome/glisse2/include/boost/random/negative_binomial_distribution.hpp" template class negative_binomial_distribution { public: typedef IntType result_type; typedef RealType input_type; class param_type { public: typedef negative_binomial_distribution distribution_type; explicit param_type(IntType k_arg = 1, RealType p_arg = RealType (0.5)) : _k(k_arg), _p(p_arg) {} IntType k() const { return _k; } RealType p() const { return _p; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._p << " " << parm._k; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._p >> std::ws >> parm._k; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._k == rhs._k && lhs._p == rhs._p; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: IntType _k; RealType _p; }; explicit negative_binomial_distribution(IntType k_arg = 1, RealType p_arg = RealType(0.5)) : _k(k_arg), _p(p_arg) {} explicit negative_binomial_distribution(const param_type& parm) : _k(parm.k()), _p(parm.p()) {} template IntType operator()(URNG& urng) const { gamma_distribution gamma(_k, (1-_p)/_p); poisson_distribution poisson(gamma(urng)); return poisson(urng); } template IntType operator()(URNG& urng, const param_type& parm) const { return negative_binomial_distribution(parm)(urng); } IntType k() const { return _k; } RealType p() const { return _p; } IntType min () const { return 0; } IntType max () const { return (std::numeric_limits::max)(); } param_type param() const { return param_type(_k, _p); } void param(const param_type& parm) { _k = parm.k(); _p = parm.p(); } void reset() { } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const negative_binomial_distribution& bd) { os << bd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, negative_binomial_distribution& bd) { bd.read(is); return is; } friend bool operator==(const negative_binomial_distribution& lhs, const negative_binomial_distribution& rhs) { return lhs._k == rhs._k && lhs._p == rhs._p; } friend bool operator!=(const negative_binomial_distribution& lhs, const negative_binomial_distribution& rhs) { return !(lhs == rhs); } private: template void read(std::basic_istream& is) { param_type parm; if(is >> parm) { param(parm); } } IntType _k; RealType _p; }; } } # 70 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" 1 # 18 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 19 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/uniform_real.hpp" 1 # 20 "/localhome/glisse2/include/boost/random/uniform_real.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 21 "/localhome/glisse2/include/boost/random/uniform_real.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp" 1 # 21 "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 22 "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp" 2 namespace boost { namespace random { namespace detail { template T generate_uniform_real( Engine& eng, T min_value, T max_value, boost::mpl::false_ ) { for(;;) { typedef T result_type; typedef typename Engine::result_type base_result; result_type numerator = static_cast(eng() - (eng.min)()); result_type divisor = static_cast((eng.max)() - (eng.min)()); ((divisor > 0) ? static_cast (0) : __assert_fail ("divisor > 0", "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp", 42, __PRETTY_FUNCTION__)); ((numerator >= 0 && numerator <= divisor) ? static_cast (0) : __assert_fail ("numerator >= 0 && numerator <= divisor", "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp", 43, __PRETTY_FUNCTION__)); T result = numerator / divisor * (max_value - min_value) + min_value; if(result < max_value) return result; } } template T generate_uniform_real( Engine& eng, T min_value, T max_value, boost::mpl::true_ ) { for(;;) { typedef T result_type; typedef typename Engine::result_type base_result; result_type numerator = static_cast(subtract()(eng(), (eng.min)())); result_type divisor = static_cast(subtract()((eng.max)(), (eng.min)())) + 1; ((divisor > 0) ? static_cast (0) : __assert_fail ("divisor > 0", "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp", 59, __PRETTY_FUNCTION__)); ((numerator >= 0 && numerator <= divisor) ? static_cast (0) : __assert_fail ("numerator >= 0 && numerator <= divisor", "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp", 60, __PRETTY_FUNCTION__)); T result = numerator / divisor * (max_value - min_value) + min_value; if(result < max_value) return result; } } template inline T generate_uniform_real(Engine& eng, T min_value, T max_value) { typedef typename Engine::result_type base_result; return generate_uniform_real(eng, min_value, max_value, boost::is_integral()); } } template class uniform_real_distribution { public: typedef RealType input_type; typedef RealType result_type; class param_type { public: typedef uniform_real_distribution distribution_type; explicit param_type(RealType min_arg = RealType(0.0), RealType max_arg = RealType(1.0)) : _min(min_arg), _max(max_arg) { ((_min <= _max) ? static_cast (0) : __assert_fail ("_min <= _max", "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp", 103, __PRETTY_FUNCTION__)); } RealType a() const { return _min; } RealType b() const { return _max; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._min << " " << parm._max; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { RealType min_in, max_in; if(is >> min_in >> std::ws >> max_in) { if(min_in <= max_in) { parm._min = min_in; parm._max = max_in; } else { is.setstate(std::ios_base::failbit); } } return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._min == rhs._min && lhs._max == rhs._max; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _min; RealType _max; }; explicit uniform_real_distribution( RealType min_arg = RealType(0.0), RealType max_arg = RealType(1.0)) : _min(min_arg), _max(max_arg) { ((min_arg <= max_arg) ? static_cast (0) : __assert_fail ("min_arg <= max_arg", "/localhome/glisse2/include/boost/random/uniform_real_distribution.hpp", 157, __PRETTY_FUNCTION__)); } explicit uniform_real_distribution(const param_type& parm) : _min(parm.a()), _max(parm.b()) {} RealType min () const { return _min; } RealType max () const { return _max; } RealType a() const { return _min; } RealType b() const { return _max; } param_type param() const { return param_type(_min, _max); } void param(const param_type& parm) { _min = parm.a(); _max = parm.b(); } void reset() { } template result_type operator()(Engine& eng) const { return detail::generate_uniform_real(eng, _min, _max); } template result_type operator()(Engine& eng, const param_type& parm) const { return detail::generate_uniform_real(eng, parm.a(), parm.b()); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const uniform_real_distribution& ud) { os << ud.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, uniform_real_distribution& ud) { param_type parm; if(is >> parm) { ud.param(parm); } return is; } friend bool operator==(const uniform_real_distribution& lhs, const uniform_real_distribution& rhs) { return lhs._min == rhs._min && lhs._max == rhs._max; } friend bool operator!=(const uniform_real_distribution& lhs, const uniform_real_distribution& rhs) { return !(lhs == rhs); } private: RealType _min; RealType _max; }; } } # 24 "/localhome/glisse2/include/boost/random/uniform_real.hpp" 2 namespace boost { # 35 "/localhome/glisse2/include/boost/random/uniform_real.hpp" template class uniform_real : public random::uniform_real_distribution { typedef random::uniform_real_distribution base_type; public: class param_type : public base_type::param_type { public: typedef uniform_real distribution_type; explicit param_type(RealType min_arg = RealType(0.0), RealType max_arg = RealType(1.0)) : base_type::param_type(min_arg, max_arg) {} }; explicit uniform_real(RealType min_arg = RealType(0.0), RealType max_arg = RealType(1.0)) : base_type(min_arg, max_arg) { ((min_arg <= max_arg) ? static_cast (0) : __assert_fail ("min_arg <= max_arg", "/localhome/glisse2/include/boost/random/uniform_real.hpp", 66, __PRETTY_FUNCTION__)); } explicit uniform_real(const param_type& parm) : base_type(parm) {} param_type param() const { return param_type(this->a(), this->b()); } void param(const param_type& parm) { this->base_type::param(parm); } }; } # 20 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 22 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" 2 # 32 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" namespace boost { namespace random { template class piecewise_constant_distribution { public: typedef std::size_t input_type; typedef RealType result_type; class param_type { public: typedef piecewise_constant_distribution distribution_type; param_type() { _weights.push_back(WeightType(1)); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } # 70 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" template param_type(IntervalIter intervals_first, IntervalIter intervals_last, WeightIter weight_first) : _intervals(intervals_first, intervals_last) { if(_intervals.size() < 2) { _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); _weights.push_back(WeightType(1)); } else { _weights.reserve(_intervals.size() - 1); for(std::size_t i = 0; i < _intervals.size() - 1; ++i) { _weights.push_back(*weight_first++); } } } # 100 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" template param_type(const std::initializer_list& il, F f) : _intervals(il.begin(), il.end()) { if(_intervals.size() < 2) { _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); _weights.push_back(WeightType(1)); } else { _weights.reserve(_intervals.size() - 1); for(std::size_t i = 0; i < _intervals.size() - 1; ++i) { RealType midpoint = (_intervals[i] + _intervals[i + 1]) / 2; _weights.push_back(f(midpoint)); } } } # 127 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" template param_type(const IntervalRange& intervals_arg, const WeightRange& weights_arg) : _intervals(boost::begin(intervals_arg), boost::end(intervals_arg)), _weights(boost::begin(weights_arg), boost::end(weights_arg)) { if(_intervals.size() < 2) { _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); _weights.push_back(WeightType(1)); } } # 148 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" template param_type(std::size_t nw, RealType xmin, RealType xmax, F f) { std::size_t n = (nw == 0) ? 1 : nw; double delta = (xmax - xmin) / n; ((delta > 0) ? static_cast (0) : __assert_fail ("delta > 0", "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp", 153, __PRETTY_FUNCTION__)); for(std::size_t k = 0; k < n; ++k) { _weights.push_back(f(xmin + k*delta + delta/2)); _intervals.push_back(xmin + k*delta); } _intervals.push_back(xmax); } std::vector intervals() const { return _intervals; } std::vector densities() const { RealType sum = std::accumulate(_weights.begin(), _weights.end(), static_cast(0)); std::vector result; result.reserve(_weights.size()); for(std::size_t i = 0; i < _weights.size(); ++i) { RealType width = _intervals[i + 1] - _intervals[i]; result.push_back(_weights[i] / (sum * width)); } return result; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { detail::print_vector(os, parm._intervals); detail::print_vector(os, parm._weights); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { std::vector new_intervals; std::vector new_weights; detail::read_vector(is, new_intervals); detail::read_vector(is, new_weights); if(is) { parm._intervals.swap(new_intervals); parm._weights.swap(new_weights); } return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._intervals == rhs._intervals && lhs._weights == rhs._weights; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: friend class piecewise_constant_distribution; std::vector _intervals; std::vector _weights; }; piecewise_constant_distribution() { _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } # 253 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" template piecewise_constant_distribution(IntervalIter first_interval, IntervalIter last_interval, WeightIter first_weight) : _intervals(first_interval, last_interval) { if(_intervals.size() < 2) { _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } else { std::vector actual_weights; actual_weights.reserve(_intervals.size() - 1); for(std::size_t i = 0; i < _intervals.size() - 1; ++i) { actual_weights.push_back(*first_weight++); } typedef discrete_distribution bins_type; typename bins_type::param_type bins_param(actual_weights); _bins.param(bins_param); } } # 287 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" template piecewise_constant_distribution(std::initializer_list il, F f) : _intervals(il.begin(), il.end()) { if(_intervals.size() < 2) { _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } else { std::vector actual_weights; actual_weights.reserve(_intervals.size() - 1); for(std::size_t i = 0; i < _intervals.size() - 1; ++i) { RealType midpoint = (_intervals[i] + _intervals[i + 1]) / 2; actual_weights.push_back(f(midpoint)); } typedef discrete_distribution bins_type; typename bins_type::param_type bins_param(actual_weights); _bins.param(bins_param); } } # 317 "/localhome/glisse2/include/boost/random/piecewise_constant_distribution.hpp" template piecewise_constant_distribution(const IntervalsRange& intervals_arg, const WeightsRange& weights_arg) : _bins(weights_arg), _intervals(boost::begin(intervals_arg), boost::end(intervals_arg)) { if(_intervals.size() < 2) { _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } } template piecewise_constant_distribution(std::size_t nw, RealType xmin, RealType xmax, F f) : _bins(nw, xmin, xmax, f) { if(nw == 0) { nw = 1; } RealType delta = (xmax - xmin) / nw; _intervals.reserve(nw + 1); for(std::size_t i = 0; i < nw; ++i) { _intervals.push_back(xmin + i * delta); } _intervals.push_back(xmax); } explicit piecewise_constant_distribution(const param_type& parm) : _bins(parm._weights), _intervals(parm._intervals) { } template RealType operator()(URNG& urng) const { std::size_t i = _bins(urng); return uniform_real(_intervals[i], _intervals[i+1])(urng); } template RealType operator()(URNG& urng, const param_type& parm) const { return piecewise_constant_distribution(parm)(urng); } result_type min () const { return _intervals.front(); } result_type max () const { return _intervals.back(); } std::vector densities() const { std::vector result(_bins.probabilities()); for(std::size_t i = 0; i < result.size(); ++i) { result[i] /= (_intervals[i+1] - _intervals[i]); } return(result); } std::vector intervals() const { return _intervals; } param_type param() const { return param_type(_intervals, _bins.probabilities()); } void param(const param_type& parm) { std::vector new_intervals(parm._intervals); typedef discrete_distribution bins_type; typename bins_type::param_type bins_param(parm._weights); _bins.param(bins_param); _intervals.swap(new_intervals); } void reset() { _bins.reset(); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const piecewise_constant_distribution& pcd) { os << pcd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, piecewise_constant_distribution& pcd) { param_type parm; if(is >> parm) { pcd.param(parm); } return is; } friend bool operator==(const piecewise_constant_distribution& lhs, const piecewise_constant_distribution& rhs) { return lhs._bins == rhs._bins && lhs._intervals == rhs._intervals; } friend bool operator!=(const piecewise_constant_distribution& lhs, const piecewise_constant_distribution& rhs) { return !(lhs == rhs); } private: discrete_distribution _bins; std::vector _intervals; }; } } # 72 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" 1 # 18 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cmath" 3 # 19 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" 2 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstdlib" 3 # 20 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 21 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" 2 # 34 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" namespace boost { namespace random { template class piecewise_linear_distribution { public: typedef std::size_t input_type; typedef RealType result_type; class param_type { public: typedef piecewise_linear_distribution distribution_type; param_type() { _weights.push_back(RealType(1)); _weights.push_back(RealType(1)); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } # 74 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" template param_type(IntervalIter intervals_first, IntervalIter intervals_last, WeightIter weight_first) : _intervals(intervals_first, intervals_last) { if(_intervals.size() < 2) { _intervals.clear(); _weights.push_back(RealType(1)); _weights.push_back(RealType(1)); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } else { _weights.reserve(_intervals.size()); for(std::size_t i = 0; i < _intervals.size(); ++i) { _weights.push_back(*weight_first++); } } } # 104 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" template param_type(const std::initializer_list& il, F f) : _intervals(il.begin(), il.end()) { if(_intervals.size() < 2) { _intervals.clear(); _weights.push_back(RealType(1)); _weights.push_back(RealType(1)); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } else { _weights.reserve(_intervals.size()); for(typename std::vector::const_iterator iter = _intervals.begin(), end = _intervals.end(); iter != end; ++iter) { _weights.push_back(f(*iter)); } } } # 134 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" template param_type(const IntervalRange& intervals_arg, const WeightRange& weights_arg) : _intervals(boost::begin(intervals_arg), boost::end(intervals_arg)), _weights(boost::begin(weights_arg), boost::end(weights_arg)) { if(_intervals.size() < 2) { _weights.clear(); _weights.push_back(RealType(1)); _weights.push_back(RealType(1)); _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); } } # 157 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" template param_type(std::size_t nw, RealType xmin, RealType xmax, F f) { std::size_t n = (nw == 0) ? 1 : nw; double delta = (xmax - xmin) / n; ((delta > 0) ? static_cast (0) : __assert_fail ("delta > 0", "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp", 162, __PRETTY_FUNCTION__)); for(std::size_t k = 0; k < n; ++k) { _weights.push_back(f(xmin + k*delta)); _intervals.push_back(xmin + k*delta); } _weights.push_back(f(xmax)); _intervals.push_back(xmax); } std::vector intervals() const { return _intervals; } std::vector densities() const { RealType sum = static_cast(0); for(std::size_t i = 0; i < _intervals.size() - 1; ++i) { RealType width = _intervals[i + 1] - _intervals[i]; sum += (_weights[i] + _weights[i + 1]) * width / 2; } std::vector result; result.reserve(_weights.size()); for(typename std::vector::const_iterator iter = _weights.begin(), end = _weights.end(); iter != end; ++iter) { result.push_back(*iter / sum); } return result; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { detail::print_vector(os, parm._intervals); detail::print_vector(os, parm._weights); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { std::vector new_intervals; std::vector new_weights; detail::read_vector(is, new_intervals); detail::read_vector(is, new_weights); if(is) { parm._intervals.swap(new_intervals); parm._weights.swap(new_weights); } return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._intervals == rhs._intervals && lhs._weights == rhs._weights; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: friend class piecewise_linear_distribution; std::vector _intervals; std::vector _weights; }; piecewise_linear_distribution() { default_init(); } # 265 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" template piecewise_linear_distribution(IntervalIter first_interval, IntervalIter last_interval, WeightIter first_weight) : _intervals(first_interval, last_interval) { if(_intervals.size() < 2) { default_init(); } else { _weights.reserve(_intervals.size()); for(std::size_t i = 0; i < _intervals.size(); ++i) { _weights.push_back(*first_weight++); } init(); } } # 294 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" template piecewise_linear_distribution(std::initializer_list il, F f) : _intervals(il.begin(), il.end()) { if(_intervals.size() < 2) { default_init(); } else { _weights.reserve(_intervals.size()); for(typename std::vector::const_iterator iter = _intervals.begin(), end = _intervals.end(); iter != end; ++iter) { _weights.push_back(f(*iter)); } init(); } } # 321 "/localhome/glisse2/include/boost/random/piecewise_linear_distribution.hpp" template piecewise_linear_distribution(const IntervalsRange& intervals_arg, const WeightsRange& weights_arg) : _intervals(boost::begin(intervals_arg), boost::end(intervals_arg)), _weights(boost::begin(weights_arg), boost::end(weights_arg)) { if(_intervals.size() < 2) { default_init(); } else { init(); } } template piecewise_linear_distribution(std::size_t nw, RealType xmin, RealType xmax, F f) { if(nw == 0) { nw = 1; } RealType delta = (xmax - xmin) / nw; _intervals.reserve(nw + 1); for(std::size_t i = 0; i < nw; ++i) { RealType x = xmin + i * delta; _intervals.push_back(x); _weights.push_back(f(x)); } _intervals.push_back(xmax); _weights.push_back(f(xmax)); init(); } explicit piecewise_linear_distribution(const param_type& parm) : _intervals(parm._intervals), _weights(parm._weights) { init(); } template RealType operator()(URNG& urng) const { std::size_t i = _bins(urng); bool is_in_rectangle = (i % 2 == 0); i = i / 2; uniform_real dist(_intervals[i], _intervals[i+1]); if(is_in_rectangle) { return dist(urng); } else if(_weights[i] < _weights[i+1]) { return (std::max)(dist(urng), dist(urng)); } else { return (std::min)(dist(urng), dist(urng)); } } template RealType operator()(URNG& urng, const param_type& parm) const { return piecewise_linear_distribution(parm)(urng); } result_type min () const { return _intervals.front(); } result_type max () const { return _intervals.back(); } std::vector densities() const { RealType sum = static_cast(0); for(std::size_t i = 0; i < _intervals.size() - 1; ++i) { RealType width = _intervals[i + 1] - _intervals[i]; sum += (_weights[i] + _weights[i + 1]) * width / 2; } std::vector result; result.reserve(_weights.size()); for(typename std::vector::const_iterator iter = _weights.begin(), end = _weights.end(); iter != end; ++iter) { result.push_back(*iter / sum); } return result; } std::vector intervals() const { return _intervals; } param_type param() const { return param_type(_intervals, _weights); } void param(const param_type& parm) { std::vector new_intervals(parm._intervals); std::vector new_weights(parm._weights); init(new_intervals, new_weights); _intervals.swap(new_intervals); _weights.swap(new_weights); } void reset() { _bins.reset(); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const piecewise_linear_distribution& pld) { os << pld.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, piecewise_linear_distribution& pld) { param_type parm; if(is >> parm) { pld.param(parm); } return is; } friend bool operator==(const piecewise_linear_distribution& lhs, const piecewise_linear_distribution& rhs) { return lhs._intervals == rhs._intervals && lhs._weights == rhs._weights; } friend bool operator!=(const piecewise_linear_distribution& lhs, const piecewise_linear_distribution& rhs) { return !(lhs == rhs); } private: void init(const std::vector& intervals_arg, const std::vector& weights_arg) { std::vector bin_weights; bin_weights.reserve((intervals_arg.size() - 1) * 2); for(std::size_t i = 0; i < intervals_arg.size() - 1; ++i) { RealType width = intervals_arg[i + 1] - intervals_arg[i]; RealType w1 = weights_arg[i]; RealType w2 = weights_arg[i + 1]; bin_weights.push_back((std::min)(w1, w2) * width); bin_weights.push_back(std::abs(w1 - w2) * width / 2); } typedef discrete_distribution bins_type; typename bins_type::param_type bins_param(bin_weights); _bins.param(bins_param); } void init() { init(_intervals, _weights); } void default_init() { _intervals.clear(); _intervals.push_back(RealType(0)); _intervals.push_back(RealType(1)); _weights.clear(); _weights.push_back(RealType(1)); _weights.push_back(RealType(1)); init(); } discrete_distribution _bins; std::vector _intervals; std::vector _weights; }; } } # 73 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/student_t_distribution.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/student_t_distribution.hpp" namespace boost { namespace random { # 37 "/localhome/glisse2/include/boost/random/student_t_distribution.hpp" template class student_t_distribution { public: typedef RealType result_type; typedef RealType input_type; class param_type { public: typedef student_t_distribution distribution_type; explicit param_type(RealType n_arg = RealType(1.0)) : _n(n_arg) {} RealType n() const { return _n; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._n; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._n; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._n == rhs._n; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _n; }; explicit student_t_distribution(RealType n_arg = RealType(1.0)) : _normal(), _chi_squared(n_arg) {} explicit student_t_distribution(const param_type& parm) : _normal(), _chi_squared(parm.n()) {} template RealType operator()(URNG& urng) { using std::sqrt; return _normal(urng) / sqrt(_chi_squared(urng) / n()); } template RealType operator()(URNG& urng, const param_type& parm) const { return student_t_distribution(parm)(urng); } RealType n() const { return _chi_squared.n(); } RealType min () const { return -std::numeric_limits::infinity(); } RealType max () const { return std::numeric_limits::infinity(); } param_type param() const { return param_type(n()); } void param(const param_type& parm) { typedef chi_squared_distribution chi_squared_type; typename chi_squared_type::param_type chi_squared_param(parm.n()); _chi_squared.param(chi_squared_param); } void reset() { _normal.reset(); _chi_squared.reset(); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const student_t_distribution& td) { os << td.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, student_t_distribution& td) { param_type parm; if(is >> parm) { td.param(parm); } return is; } friend bool operator==(const student_t_distribution& lhs, const student_t_distribution& rhs) { return lhs._normal == rhs._normal && lhs._chi_squared == rhs._chi_squared; } friend bool operator!=(const student_t_distribution& lhs, const student_t_distribution& rhs) { return !(lhs == rhs); } private: normal_distribution _normal; chi_squared_distribution _chi_squared; }; } } # 75 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/triangle_distribution.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/triangle_distribution.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 25 "/localhome/glisse2/include/boost/random/triangle_distribution.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 26 "/localhome/glisse2/include/boost/random/triangle_distribution.hpp" 2 namespace boost { namespace random { template class triangle_distribution { public: typedef RealType input_type; typedef RealType result_type; class param_type { public: typedef triangle_distribution distribution_type; explicit param_type(RealType a_arg = RealType(0.0), RealType b_arg = RealType(0.5), RealType c_arg = RealType(1.0)) : _a(a_arg), _b(b_arg), _c(c_arg) { ((_a <= _b && _b <= _c) ? static_cast (0) : __assert_fail ("_a <= _b && _b <= _c", "/localhome/glisse2/include/boost/random/triangle_distribution.hpp", 57, __PRETTY_FUNCTION__)); } RealType a() const { return _a; } RealType b() const { return _b; } RealType c() const { return _c; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._a << " " << parm._b << " " << parm._c; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { double a_in, b_in, c_in; if(is >> a_in >> std::ws >> b_in >> std::ws >> c_in) { if(a_in <= b_in && b_in <= c_in) { parm._a = a_in; parm._b = b_in; parm._c = c_in; } else { is.setstate(std::ios_base::failbit); } } return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._a == rhs._a && lhs._b == rhs._b && lhs._c == rhs._c; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _a; RealType _b; RealType _c; }; explicit triangle_distribution(RealType a_arg = RealType(0.0), RealType b_arg = RealType(0.5), RealType c_arg = RealType(1.0)) : _a(a_arg), _b(b_arg), _c(c_arg) { ((_a <= _b && _b <= _c) ? static_cast (0) : __assert_fail ("_a <= _b && _b <= _c", "/localhome/glisse2/include/boost/random/triangle_distribution.hpp", 114, __PRETTY_FUNCTION__)); init(); } explicit triangle_distribution(const param_type& parm) : _a(parm.a()), _b(parm.b()), _c(parm.c()) { init(); } result_type a() const { return _a; } result_type b() const { return _b; } result_type c() const { return _c; } RealType min () const { return _a; } RealType max () const { return _c; } param_type param() const { return param_type(_a, _b, _c); } void param(const param_type& parm) { _a = parm.a(); _b = parm.b(); _c = parm.c(); init(); } void reset() { } template result_type operator()(Engine& eng) { using std::sqrt; result_type u = uniform_01<>()(eng); if( u <= q1 ) return _a + p1*sqrt(u); else return _c - d3*sqrt(d2*u-d1); } template result_type operator()(Engine& eng, const param_type& parm) { return triangle_distribution(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const triangle_distribution& td) { os << td.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, triangle_distribution& td) { param_type parm; if(is >> parm) { td.param(parm); } return is; } friend bool operator==(const triangle_distribution& lhs, const triangle_distribution& rhs) { return lhs._a == rhs._a && lhs._b == rhs._b && lhs._c == rhs._c; } friend bool operator!=(const triangle_distribution& lhs, const triangle_distribution& rhs) { return !(lhs == rhs); } private: void init() { using std::sqrt; d1 = _b - _a; d2 = _c - _a; d3 = sqrt(_c - _b); q1 = d1 / d2; p1 = sqrt(d1 * d2); } RealType _a, _b, _c; RealType d1, d2, d3, q1, p1; }; } using random::triangle_distribution; } # 76 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp" 1 # 23 "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 24 "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 25 "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp" 2 namespace boost { namespace random { # 39 "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp" template > class uniform_on_sphere { public: typedef RealType input_type; typedef Cont result_type; class param_type { public: typedef uniform_on_sphere distribution_type; explicit param_type(int dim_arg = 2) : _dim(dim_arg) { ((_dim >= 0) ? static_cast (0) : __assert_fail ("_dim >= 0", "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp", 58, __PRETTY_FUNCTION__)); } int dim() const { return _dim; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._dim; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._dim; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._dim == rhs._dim; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: int _dim; }; explicit uniform_on_sphere(int dim_arg = 2) : _container(dim_arg), _dim(dim_arg) { } explicit uniform_on_sphere(const param_type& parm) : _container(parm.dim()), _dim(parm.dim()) { } int dim() const { return _dim; } param_type param() const { return param_type(_dim); } void param(const param_type& parm) { _dim = parm.dim(); _container.resize(_dim); } # 126 "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp" result_type min () const { result_type result(_dim); if(_dim != 0) { result.front() = RealType(-1.0); } return result; } # 142 "/localhome/glisse2/include/boost/random/uniform_on_sphere.hpp" result_type max () const { result_type result(_dim); if(_dim != 0) { result.front() = RealType(1.0); } return result; } void reset() { _normal.reset(); } template const result_type & operator()(Engine& eng) { RealType sqsum = 0; for(typename Cont::iterator it = _container.begin(); it != _container.end(); ++it) { RealType val = _normal(eng); *it = val; sqsum += val * val; } using std::sqrt; std::transform(_container.begin(), _container.end(), _container.begin(), std::bind2nd(std::divides(), sqrt(sqsum))); return _container; } template result_type operator()(Engine& eng, const param_type& parm) const { return uniform_on_sphere(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const uniform_on_sphere& sd) { os << sd._dim; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, uniform_on_sphere& sd) { is >> sd._dim; sd._container.resize(sd._dim); return is; } friend bool operator==(const uniform_on_sphere& lhs, const uniform_on_sphere& rhs) { return lhs._dim == rhs._dim && lhs._normal == rhs._normal; } friend bool operator!=(const uniform_on_sphere& lhs, const uniform_on_sphere& rhs) { return !(lhs == rhs); } private: normal_distribution _normal; result_type _container; int _dim; }; } using random::uniform_on_sphere; } # 80 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/uniform_smallint.hpp" 1 # 22 "/localhome/glisse2/include/boost/random/uniform_smallint.hpp" # 1 "/localhome/glisse2/include/boost/assert.hpp" 1 # 50 "/localhome/glisse2/include/boost/assert.hpp" # 1 "/usr/include/assert.h" 1 3 4 # 51 "/localhome/glisse2/include/boost/assert.hpp" 2 # 23 "/localhome/glisse2/include/boost/random/uniform_smallint.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/detail/config.hpp" 1 # 27 "/localhome/glisse2/include/boost/random/uniform_smallint.hpp" 2 namespace boost { namespace random { # 102 "/localhome/glisse2/include/boost/random/uniform_smallint.hpp" template class uniform_smallint { public: typedef IntType input_type; typedef IntType result_type; class param_type { public: typedef uniform_smallint distribution_type; param_type(IntType min_arg = 0, IntType max_arg = 9) : _min(min_arg), _max(max_arg) { ((_min <= _max) ? static_cast (0) : __assert_fail ("_min <= _max", "/localhome/glisse2/include/boost/random/uniform_smallint.hpp", 119, __PRETTY_FUNCTION__)); } IntType a() const { return _min; } IntType b() const { return _max; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._min << " " << parm._max; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._min >> std::ws >> parm._max; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._min == rhs._min && lhs._max == rhs._max; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: IntType _min; IntType _max; }; explicit uniform_smallint(IntType min_arg = 0, IntType max_arg = 9) : _min(min_arg), _max(max_arg) {} explicit uniform_smallint(const param_type& parm) : _min(parm.a()), _max(parm.b()) {} result_type a() const { return _min; } result_type b() const { return _max; } result_type min () const { return _min; } result_type max () const { return _max; } param_type param() const { return param_type(_min, _max); } void param(const param_type& parm) { _min = parm.a(); _max = parm.b(); } void reset() { } template result_type operator()(Engine& eng) const { typedef typename Engine::result_type base_result; return generate(eng, boost::is_integral()); } template result_type operator()(Engine& eng, const param_type& parm) const { return uniform_smallint(parm)(eng); } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const uniform_smallint& ud) { os << ud._min << " " << ud._max; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, uniform_smallint& ud) { is >> ud._min >> std::ws >> ud._max; return is; } friend bool operator==(const uniform_smallint& lhs, const uniform_smallint& rhs) { return lhs._min == rhs._min && lhs._max == rhs._max; } friend bool operator!=(const uniform_smallint& lhs, const uniform_smallint& rhs) { return !(lhs == rhs); } private: template result_type generate(Engine& eng, boost::mpl::true_) const { typedef typename Engine::result_type base_result; typedef typename boost::make_unsigned::type base_unsigned; typedef typename boost::make_unsigned::type range_type; range_type range = random::detail::subtract()(_max, _min); base_unsigned base_range = random::detail::subtract()((eng.max)(), (eng.min)()); base_unsigned val = random::detail::subtract()(eng(), (eng.min)()); if(range >= base_range) { return boost::random::detail::add()( static_cast(val), _min); } else { base_unsigned modulus = static_cast(range) + 1; return boost::random::detail::add()( static_cast(val % modulus), _min); } } template result_type generate(Engine& eng, boost::mpl::false_) const { typedef typename Engine::result_type base_result; typedef typename boost::make_unsigned::type range_type; range_type range = random::detail::subtract()(_max, _min); base_result val = boost::uniform_01()(eng); # 272 "/localhome/glisse2/include/boost/random/uniform_smallint.hpp" range_type offset = static_cast(val * (static_cast(range) + 1)); if(offset > range) return _max; return boost::random::detail::add()(offset , _min); } result_type _min; result_type _max; }; } using random::uniform_smallint; } # 83 "/localhome/glisse2/include/boost/random.hpp" 2 # 1 "/localhome/glisse2/include/boost/random/weibull_distribution.hpp" 1 # 24 "/localhome/glisse2/include/boost/random/weibull_distribution.hpp" namespace boost { namespace random { template class weibull_distribution { public: typedef RealType result_type; typedef RealType input_type; class param_type { public: typedef weibull_distribution distribution_type; explicit param_type(RealType a_arg = 1.0, RealType b_arg = 1.0) : _a(a_arg), _b(b_arg) {} RealType a() const { return _a; } RealType b() const { return _b; } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const param_type& parm) { os << parm._a << ' ' << parm._b; return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, param_type& parm) { is >> parm._a >> std::ws >> parm._b; return is; } friend bool operator==(const param_type& lhs, const param_type& rhs) { return lhs._a == rhs._a && lhs._b == rhs._b; } friend bool operator!=(const param_type& lhs, const param_type& rhs) { return !(lhs == rhs); } private: RealType _a; RealType _b; }; explicit weibull_distribution(RealType a_arg = 1.0, RealType b_arg = 1.0) : _a(a_arg), _b(b_arg) {} explicit weibull_distribution(const param_type& parm) : _a(parm.a()), _b(parm.b()) {} template RealType operator()(URNG& urng) const { using std::pow; using std::log; return _b*pow(-log(1 - uniform_01()(urng)), 1/_a); } template RealType operator()(URNG& urng, const param_type& parm) const { return weibull_distribution(parm)(urng); } RealType a() const { return _a; } RealType b() const { return _b; } RealType min () const { return 0; } RealType max () const { return std::numeric_limits::infinity(); } param_type param() const { return param_type(_a, _b); } void param(const param_type& parm) { _a = parm.a(); _b = parm.b(); } void reset() { } template friend std::basic_ostream& operator<<(std::basic_ostream& os, const weibull_distribution& wd) { os << wd.param(); return os; } template friend std::basic_istream& operator>>(std::basic_istream& is, weibull_distribution& wd) { param_type parm; if(is >> parm) { wd.param(parm); } return is; } friend bool operator==(const weibull_distribution& lhs, const weibull_distribution& rhs) { return lhs._a == rhs._a && lhs._b == rhs._b; } friend bool operator!=(const weibull_distribution& lhs, const weibull_distribution& rhs) { return !(lhs == rhs); } private: RealType _a; RealType _b; }; } } # 84 "/localhome/glisse2/include/boost/random.hpp" 2 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/hilbert_sort.h" 2 namespace CGAL { namespace internal { template void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end, Policy , const Kernel &k, typename Kernel::Point_2 *) { boost::rand48 random; boost::random_number_generator rng(random); std::random_shuffle(begin,end, rng); (Hilbert_sort_2 (k))(begin, end); } template void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end, Policy , const Kernel &k, typename Kernel::Point_3 *) { boost::rand48 random; boost::random_number_generator rng(random); std::random_shuffle(begin,end, rng); (Hilbert_sort_3 (k))(begin, end); } template void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end, Policy , const Kernel &k, typename Kernel::Point_d *) { boost::rand48 random; boost::random_number_generator rng(random); std::random_shuffle(begin,end, rng); (Hilbert_sort_d (k))(begin, end); } } template void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end) { hilbert_sort (begin, end, Hilbert_sort_median_policy()); } template void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end, Policy policy) { typedef std::iterator_traits ITraits; typedef typename ITraits::value_type value_type; typedef CGAL::Kernel_traits KTraits; typedef typename KTraits::Kernel Kernel; internal::hilbert_sort(begin, end, policy, Kernel(), static_cast (0)); } template void hilbert_sort (RandomAccessIterator begin, RandomAccessIterator end, Policy policy, const Kernel &k ) { typedef std::iterator_traits ITraits; typedef typename ITraits::value_type value_type; internal::hilbert_sort(begin, end, policy, k, static_cast (0)); } } # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/spatial_sort.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Multiscale_sort.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Multiscale_sort.h" # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 1 3 # 41 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 42 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 3 # 1 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/include/stddef.h" 1 3 4 # 44 "/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.7.0/../../../../include/c++/4.7.0/cstddef" 2 3 # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Multiscale_sort.h" 2 namespace CGAL { template class Multiscale_sort { Sort _sort; std::ptrdiff_t _threshold; double _ratio; public: Multiscale_sort (const Sort &sort = Sort(), std::ptrdiff_t threshold = 1, double ratio = 0.5) : _sort (sort), _threshold (threshold), _ratio (ratio) { (CGAL::possibly(0. <= ratio && ratio <= 1.)?(static_cast(0)): ::CGAL::precondition_fail( "0. <= ratio && ratio <= 1." , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Multiscale_sort.h", 40)); } template void operator() (RandomAccessIterator begin, RandomAccessIterator end) const { typedef typename std::iterator_traits::difference_type difference_type; RandomAccessIterator middle = begin; if (end - begin >= _threshold) { middle = begin + difference_type ((end - begin) * _ratio); this->operator() (begin, middle); } _sort (middle, end); } }; } # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/spatial_sort.h" 2 namespace CGAL { namespace internal { template void spatial_sort ( RandomAccessIterator begin, RandomAccessIterator end, const Kernel &k, Policy , typename Kernel::Point_2 *, std::ptrdiff_t threshold_hilbert, std::ptrdiff_t threshold_multiscale, double ratio) { typedef Hilbert_sort_2 Sort; boost::rand48 random; boost::random_number_generator rng(random); std::random_shuffle(begin,end,rng); if (threshold_hilbert==0) threshold_hilbert=4; if (threshold_multiscale==0) threshold_multiscale=16; if (ratio==0.0) ratio=0.25; (Multiscale_sort (Sort (k, threshold_hilbert), threshold_multiscale, ratio)) (begin, end); } template void spatial_sort ( RandomAccessIterator begin, RandomAccessIterator end, const Kernel &k, Policy , typename Kernel::Point_3 *, std::ptrdiff_t threshold_hilbert, std::ptrdiff_t threshold_multiscale, double ratio) { typedef Hilbert_sort_3 Sort; boost::rand48 random; boost::random_number_generator rng(random); std::random_shuffle(begin,end, rng); if (threshold_hilbert==0) threshold_hilbert=8; if (threshold_multiscale==0) threshold_multiscale=64; if (ratio==0.0) ratio=0.125; (Multiscale_sort (Sort (k, threshold_hilbert), threshold_multiscale, ratio)) (begin, end); } template void spatial_sort ( RandomAccessIterator begin, RandomAccessIterator end, const Kernel &k, Policy , typename Kernel::Point_d *, std::ptrdiff_t threshold_hilbert, std::ptrdiff_t threshold_multiscale, double ratio) { typedef Hilbert_sort_d Sort; boost::rand48 random; boost::random_number_generator rng(random); std::random_shuffle(begin,end, rng); if (threshold_hilbert==0) threshold_hilbert=10; if (threshold_multiscale==0) threshold_multiscale=500; if (ratio==0.0) ratio=0.05; (Multiscale_sort (Sort (k, threshold_hilbert), threshold_multiscale, ratio)) (begin, end); } } template void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end, const Kernel &k, Policy policy, std::ptrdiff_t threshold_hilbert=0, std::ptrdiff_t threshold_multiscale=0, double ratio=0.0) { typedef std::iterator_traits ITraits; typedef typename ITraits::value_type value_type; internal::spatial_sort(begin, end, k, policy, static_cast (0), threshold_hilbert,threshold_multiscale,ratio); } template void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end, Hilbert_sort_median_policy policy, std::ptrdiff_t threshold_hilbert=0, std::ptrdiff_t threshold_multiscale=0, double ratio=0.0) { typedef std::iterator_traits ITraits; typedef typename ITraits::value_type value_type; typedef CGAL::Kernel_traits KTraits; typedef typename KTraits::Kernel Kernel; spatial_sort (begin, end, Kernel(), policy, threshold_hilbert,threshold_multiscale,ratio); } template void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end, Hilbert_sort_middle_policy policy, std::ptrdiff_t threshold_hilbert=0, std::ptrdiff_t threshold_multiscale=0, double ratio=0.0) { typedef std::iterator_traits ITraits; typedef typename ITraits::value_type value_type; typedef CGAL::Kernel_traits KTraits; typedef typename KTraits::Kernel Kernel; spatial_sort (begin, end, Kernel(), policy, threshold_hilbert,threshold_multiscale,ratio); } template void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end, const Kernel &k, std::ptrdiff_t threshold_hilbert=0, std::ptrdiff_t threshold_multiscale=0, double ratio=0.0) { spatial_sort (begin, end, k, Hilbert_sort_median_policy(), threshold_hilbert,threshold_multiscale,ratio); } template void spatial_sort (RandomAccessIterator begin, RandomAccessIterator end, std::ptrdiff_t threshold_hilbert=0, std::ptrdiff_t threshold_multiscale=0, double ratio=0.0) { spatial_sort (begin, end, Hilbert_sort_median_policy(), threshold_hilbert,threshold_multiscale,ratio); } } # 42 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_structural_filtering_traits.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_structural_filtering_traits.h" namespace CGAL { template struct Triangulation_structural_filtering_traits { typedef Tag_false Use_structural_filtering_tag; }; # 40 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_structural_filtering_traits.h" template <> struct Triangulation_structural_filtering_traits { typedef Tag_true Use_structural_filtering_tag; }; } # 49 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" 2 namespace CGAL { template < class Gt, class Tds > class Triangulation_2; template < class Gt, class Tds > std::istream& operator>> (std::istream& is, Triangulation_2 &tr); template < class Gt, class Tds > std::ostream& operator<< (std::ostream& os, const Triangulation_2 &tr); namespace internal { struct Structural_filtering_2_tag {}; struct No_structural_filtering_2_tag {}; template struct Structural_filtering_selector_2 { typedef No_structural_filtering_2_tag Tag; }; template <> struct Structural_filtering_selector_2 { typedef Structural_filtering_2_tag Tag; }; } template < class Gt, class Tds = Triangulation_data_structure_2 < Triangulation_vertex_base_2, Triangulation_face_base_2 > > class Triangulation_2 : public Triangulation_cw_ccw_2 { friend std::istream& operator>> <> (std::istream& is, Triangulation_2 &tr); typedef Triangulation_2 Self; public: typedef Tds Triangulation_data_structure; typedef Gt Geom_traits; typedef typename Geom_traits::Point_2 Point; typedef typename Geom_traits::Segment_2 Segment; typedef typename Geom_traits::Triangle_2 Triangle; typedef typename Geom_traits::Orientation_2 Orientation_2; typedef typename Geom_traits::Compare_x_2 Compare_x; typedef typename Geom_traits::Compare_y_2 Compare_y; typedef typename Tds::size_type size_type; typedef typename Tds::difference_type difference_type; typedef typename Tds::Vertex Vertex; typedef typename Tds::Face Face; typedef typename Tds::Edge Edge; typedef typename Tds::Vertex_handle Vertex_handle; typedef typename Tds::Face_handle Face_handle; typedef typename Tds::Face_circulator Face_circulator; typedef typename Tds::Vertex_circulator Vertex_circulator; typedef typename Tds::Edge_circulator Edge_circulator; typedef typename Tds::Face_iterator All_faces_iterator; typedef typename Tds::Edge_iterator All_edges_iterator; typedef typename Tds::Vertex_iterator All_vertices_iterator; class Perturbation_order { const Self *t; public: Perturbation_order(const Self *tr) : t(tr) {} bool operator()(const Point *p, const Point *q) const { return t->compare_xy(*p, *q) == SMALLER; } }; friend class Perturbation_order; class Infinite_tester { const Triangulation_2 *t; public: Infinite_tester() {} Infinite_tester(const Triangulation_2 *tr) : t(tr) {} bool operator()(const All_vertices_iterator & vit) const { return t->is_infinite(vit); } bool operator()(const All_faces_iterator & fit ) const { return t->is_infinite(fit); } bool operator()(const All_edges_iterator & eit) const { return t->is_infinite(eit); } }; class Finite_vertices_iterator : public Filter_iterator { typedef Filter_iterator Base; typedef Finite_vertices_iterator Self; public: Finite_vertices_iterator() : Base() {} Finite_vertices_iterator(const Base &b) : Base(b) {} Self & operator++() { Base::operator++(); return *this; } Self & operator--() { Base::operator--(); return *this; } Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } Self operator--(int) { Self tmp(*this); --(*this); return tmp; } operator const Vertex_handle() const { return Base::base(); } }; class Finite_faces_iterator : public Filter_iterator { typedef Filter_iterator Base; typedef Finite_faces_iterator Self; public: Finite_faces_iterator() : Base() {} Finite_faces_iterator(const Base &b) : Base(b) {} Self & operator++() { Base::operator++(); return *this; } Self & operator--() { Base::operator--(); return *this; } Self operator++(int) { Self tmp(*this); ++(*this); return tmp; } Self operator--(int) { Self tmp(*this); --(*this); return tmp; } operator const Face_handle() const { return Base::base(); } }; typedef Filter_iterator Finite_edges_iterator; typedef Finite_faces_iterator Face_iterator; typedef Finite_edges_iterator Edge_iterator; typedef Finite_vertices_iterator Vertex_iterator; typedef Triangulation_line_face_circulator_2 Line_face_circulator; typedef Project_point Proj_point; typedef Iterator_project Point_iterator; typedef Point value_type; typedef const value_type& const_reference; typedef value_type& reference; enum Locate_type {VERTEX=0, EDGE, FACE, OUTSIDE_CONVEX_HULL, OUTSIDE_AFFINE_HULL}; typedef Tag_false Weighted_tag; protected: Gt _gt; Tds _tds; Vertex_handle _infinite_vertex; public: Triangulation_2(const Geom_traits& geom_traits=Geom_traits()); Triangulation_2(const Triangulation_2 &tr); Triangulation_2 &operator=(const Triangulation_2 &tr); void copy_triangulation(const Triangulation_2 &tr); void swap(Triangulation_2 &tr); void clear(); const Geom_traits& geom_traits() const { return _gt;} const Tds & tds() const { return _tds;} Tds & tds() { return _tds;} int dimension() const { return _tds.dimension();} size_type number_of_vertices() const {return _tds.number_of_vertices() - 1;} size_type number_of_faces() const; Vertex_handle infinite_vertex() const; Vertex_handle finite_vertex() const; Face_handle infinite_face() const; Infinite_tester infinite_tester() const; void set_infinite_vertex(const Vertex_handle& v) {_infinite_vertex=v;} bool is_valid(bool verbose = false, int level = 0) const; bool is_infinite(Face_handle f) const; bool is_infinite(Vertex_handle v) const; bool is_infinite(Face_handle f, int i) const; bool is_infinite(const Edge& e) const; bool is_infinite(const Edge_circulator& ec) const; bool is_infinite(const All_edges_iterator& ei) const; bool is_edge(Vertex_handle va, Vertex_handle vb) const; bool is_edge(Vertex_handle va, Vertex_handle vb, Face_handle& fr, int & i) const; bool includes_edge(Vertex_handle va, Vertex_handle vb, Vertex_handle& vbb, Face_handle& fr, int & i) const; bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const; bool is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Face_handle &fr) const; Triangle triangle(Face_handle f) const; Segment segment(Face_handle f, int i) const; Segment segment(const Edge& e) const; Segment segment(const Edge_circulator& ec) const; Segment segment(const All_edges_iterator& ei) const; Segment segment(const Finite_edges_iterator& ei) const; Point circumcenter(Face_handle f) const; Point circumcenter(const Point& p0, const Point& p1, const Point& p2) const; public: void flip(Face_handle f, int i); Vertex_handle insert_first(const Point& p); Vertex_handle insert_second(const Point& p); Vertex_handle insert_in_edge(const Point& p, Face_handle f,int i); Vertex_handle insert_in_face(const Point& p, Face_handle f); Vertex_handle insert_outside_convex_hull(const Point& p, Face_handle f); Vertex_handle insert_outside_affine_hull(const Point& p); Vertex_handle insert(const Point &p, Face_handle start = Face_handle() ); Vertex_handle insert(const Point& p, Locate_type lt, Face_handle loc, int li ); Vertex_handle push_back(const Point& a); void remove_degree_3(Vertex_handle v, Face_handle f = Face_handle()); void remove_first(Vertex_handle v); void remove_second(Vertex_handle v); void remove(Vertex_handle v); Vertex_handle move_if_no_collision(Vertex_handle v, const Point &p); Vertex_handle move(Vertex_handle v, const Point &p); protected: template Vertex_handle insert_and_give_new_faces(const Point &p, OutputItFaces fit, Face_handle start = Face_handle() ); template Vertex_handle insert_and_give_new_faces(const Point& p, Locate_type lt, Face_handle loc, int li, OutputItFaces fit); template void remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit); template Vertex_handle move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p, OutputItFaces fit); public: Face_handle march_locate_1D(const Point& t, Locate_type& lt, int& li) const ; Face_handle march_locate_2D(Face_handle start, const Point& t, Locate_type& lt, int& li) const; Face_handle march_locate_2D_LFC(Face_handle start, const Point& t, Locate_type& lt, int& li) const; void compare_walks(const Point& p, Face_handle c1, Face_handle c2, Locate_type& lt1, Locate_type& lt2, int li1, int li2) const; # 371 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" protected: Face_handle inexact_locate(const Point& p, Face_handle start, int max_num_cells = 2500) const; Face_handle exact_locate(const Point& p, Locate_type& lt, int& li, Face_handle start) const; Face_handle generic_locate(const Point& p, Locate_type& lt, int& li, Face_handle start, internal::Structural_filtering_2_tag) const { return exact_locate(p, lt, li, inexact_locate(p, start)); } Face_handle generic_locate(const Point& p, Locate_type& lt, int& li, Face_handle start, internal::No_structural_filtering_2_tag) const { return exact_locate(p, lt, li, start); } Orientation inexact_orientation(const Point &p, const Point &q, const Point &r) const; public: Face_handle locate(const Point & p, Locate_type & lt, int & li, Face_handle start = Face_handle()) const { typedef Triangulation_structural_filtering_traits TSFT; typedef typename internal::Structural_filtering_selector_2< TSFT::Use_structural_filtering_tag::value >::Tag Should_filter_tag; return generic_locate(p, lt, li, start, Should_filter_tag()); } Face_handle locate(const Point & p, Face_handle start = Face_handle()) const { Locate_type lt; int li; return locate(p, lt, li, start); } Finite_faces_iterator finite_faces_begin() const; Finite_faces_iterator finite_faces_end() const; Finite_vertices_iterator finite_vertices_begin() const; Finite_vertices_iterator finite_vertices_end() const; Finite_edges_iterator finite_edges_begin() const; Finite_edges_iterator finite_edges_end() const; Point_iterator points_begin() const; Point_iterator points_end() const; All_faces_iterator all_faces_begin() const; All_faces_iterator all_faces_end() const; All_vertices_iterator all_vertices_begin() const; All_vertices_iterator all_vertices_end() const; All_edges_iterator all_edges_begin() const; All_edges_iterator all_edges_end() const; Face_iterator faces_begin() const {return finite_faces_begin();} Face_iterator faces_end() const {return finite_faces_end();} Edge_iterator edges_begin() const {return finite_edges_begin();} Edge_iterator edges_end() const {return finite_edges_end();} Vertex_iterator vertices_begin() const {return finite_vertices_begin();} Vertex_iterator vertices_end() const {return finite_vertices_end();} Face_circulator incident_faces( Vertex_handle v, Face_handle f = Face_handle()) const; Vertex_circulator incident_vertices(Vertex_handle v, Face_handle f = Face_handle()) const; Edge_circulator incident_edges(Vertex_handle v, Face_handle f = Face_handle()) const; size_type degree(Vertex_handle v) const; Vertex_handle mirror_vertex(Face_handle f, int i) const; int mirror_index(Face_handle v, int i) const; Edge mirror_edge(Edge e) const; Line_face_circulator line_walk(const Point& p, const Point& q, Face_handle f = Face_handle()) const; void show_all() const; void show_vertex(Vertex_handle vh) const; void show_face( Face_handle fh) const; Oriented_side oriented_side(const Point &p0, const Point &p1, const Point &p2, const Point &p) const; Bounded_side bounded_side(const Point &p0, const Point &p1, const Point &p2, const Point &p) const; Oriented_side oriented_side(Face_handle f, const Point &p) const; Oriented_side side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, const Point &p, bool perturb) const; Oriented_side side_of_oriented_circle(Face_handle f, const Point & p, bool perturb = false) const; bool collinear_between(const Point& p, const Point& q, const Point& r) const; Comparison_result compare_x(const Point& p, const Point& q) const; Comparison_result compare_xy(const Point& p, const Point& q) const; Comparison_result compare_y(const Point& p, const Point& q) const; bool xy_equal(const Point& p, const Point& q) const; Orientation orientation(const Point& p, const Point& q, const Point& r) const; protected: void remove_1D(Vertex_handle v); void remove_2D(Vertex_handle v); bool test_dim_down(Vertex_handle v) const; void fill_hole(Vertex_handle v, std::list & hole); void fill_hole_delaunay(std::list & hole); template void fill_hole(Vertex_handle v, std::list & hole, OutputItFaces fit); template void fill_hole_delaunay(std::list & hole, OutputItFaces fit); void make_hole(Vertex_handle v, std::list & hole, std::set &faces_set); public: void make_hole(Vertex_handle v, std::list & hole); # 545 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" Face_handle create_face(Face_handle f1, int i1, Face_handle f2, int i2, Face_handle f3, int i3); Face_handle create_face(Face_handle f1, int i1, Face_handle f2, int i2); Face_handle create_face(Face_handle f, int i, Vertex_handle v); Face_handle create_face(Vertex_handle v1, Vertex_handle v2,Vertex_handle v3); Face_handle create_face(Vertex_handle v1, Vertex_handle v2,Vertex_handle v3, Face_handle f1, Face_handle f2, Face_handle f3); Face_handle create_face(); Face_handle create_face(Face_handle); void delete_face(Face_handle f); void delete_vertex(Vertex_handle v); Vertex_handle file_input(std::istream& is); void file_output(std::ostream& os) const; private: Vertex_handle insert_outside_convex_hull_1(const Point& p, Face_handle f); Vertex_handle insert_outside_convex_hull_2(const Point& p, Face_handle f); public: template < class Stream > Stream& draw_triangulation(Stream& os) const { Finite_edges_iterator it = finite_edges_begin(); for( ;it != finite_edges_end() ; ++it) { os << segment(it); } return os; } template < class InputIterator > std::ptrdiff_t insert(InputIterator first, InputIterator last) { size_type n = number_of_vertices(); std::vector points (first, last); spatial_sort (points.begin(), points.end(), geom_traits()); Face_handle f; for (typename std::vector::const_iterator p = points.begin(), end = points.end(); p != end; ++p) f = insert (*p, f)->face(); return number_of_vertices() - n; } bool well_oriented(Vertex_handle v) const { typedef typename Geom_traits::Orientation_2 Orientation_2; Face_circulator fc = incident_faces(v), done(fc); do { if(!is_infinite(fc)) { Vertex_handle v0 = fc->vertex(0); Vertex_handle v1 = fc->vertex(1); Vertex_handle v2 = fc->vertex(2); if(orientation(v0->point(),v1->point(),v2->point()) != COUNTERCLOCKWISE) return false; } } while(++fc != done); return true; } bool from_convex_hull(Vertex_handle v) { (CGAL::possibly(!is_infinite(v))?(static_cast(0)): ::CGAL::precondition_fail( "!is_infinite(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 610)); Vertex_circulator vc = incident_vertices(v), done(vc); do { if(is_infinite(vc)) return true; } while(++vc != done); return false; } public: template Vertex_handle star_hole( const Point& p, EdgeIt edge_begin, EdgeIt edge_end) { std::list empty_list; return star_hole(p, edge_begin, edge_end, empty_list.begin(), empty_list.end()); } template Vertex_handle star_hole( const Point& p, EdgeIt edge_begin, EdgeIt edge_end, FaceIt face_begin, FaceIt face_end) { typedef typename Triangulation_data_structure::Edge Tds_Edge; typedef typename Triangulation_data_structure::Face Tds_Face; Vertex_handle v = _tds.star_hole( edge_begin, edge_end, face_begin, face_end); v->set_point(p); return v; } }; template Triangulation_2:: Triangulation_2(const Geom_traits& geom_traits) : _gt(geom_traits), _tds() { _infinite_vertex = _tds.insert_first(); } template Triangulation_2:: Triangulation_2(const Triangulation_2 &tr) : _gt(tr._gt) { _infinite_vertex = _tds.copy_tds(tr._tds, tr.infinite_vertex()); } template Triangulation_2 & Triangulation_2:: operator=(const Triangulation_2 &tr) { copy_triangulation(tr); return *this; } template void Triangulation_2:: copy_triangulation(const Triangulation_2 &tr) { _tds.clear(); _gt = tr._gt; _infinite_vertex = _tds.copy_tds(tr._tds, tr._infinite_vertex); } template void Triangulation_2:: swap(Triangulation_2 &tr) { Vertex_handle v= _infinite_vertex; _infinite_vertex = tr._infinite_vertex; tr._infinite_vertex = v; _tds.swap(tr._tds); Geom_traits t = geom_traits(); _gt = tr.geom_traits(); tr._gt = t; } template void Triangulation_2:: clear() { _tds.clear(); _infinite_vertex = _tds.insert_first(); } template typename Triangulation_2::size_type Triangulation_2:: number_of_faces() const { size_type count = _tds.number_of_faces(); Face_circulator fc = incident_faces(infinite_vertex()), done(fc); if ( ! fc.is_empty() ) { do { --count; ++fc; } while (fc != done); } return count; } template inline typename Triangulation_2::Vertex_handle Triangulation_2:: infinite_vertex() const { return _infinite_vertex; } template inline typename Triangulation_2::Vertex_handle Triangulation_2:: finite_vertex() const { (CGAL::possibly(number_of_vertices() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 742)); return (finite_vertices_begin()); } template inline typename Triangulation_2::Face_handle Triangulation_2:: infinite_face() const { return infinite_vertex()->face(); } template inline typename Triangulation_2::Infinite_tester Triangulation_2:: infinite_tester() const { return Infinite_tester(this); } template bool Triangulation_2:: is_valid(bool verbose, int level) const { bool result = _tds.is_valid(verbose, level); if (dimension() <= 0 || (dimension()==1 && number_of_vertices() == 2 ) ) return result; if (dimension() == 1) { Finite_vertices_iterator it1 = finite_vertices_begin(), it2(it1), it3(it1); ++it2; ++it3; ++it3; while( it3 != finite_vertices_end()) { Orientation s = orientation(it1->point(), it2->point(), it3->point()); result = result && s == COLLINEAR ; (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 784)); ++it1 ; ++it2; ++it3; } } else { for(Finite_faces_iterator it=finite_faces_begin(); it!=finite_faces_end(); it++) { (CGAL::possibly(! is_infinite(it))?(static_cast(0)): ::CGAL::assertion_fail( "! is_infinite(it)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 792)); Orientation s = orientation(it->vertex(0)->point(), it->vertex(1)->point(), it->vertex(2)->point()); (CGAL::possibly(s == LEFT_TURN)?(static_cast(0)): ::CGAL::assertion_fail( "s == LEFT_TURN" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 796)); result = result && ( s == LEFT_TURN ); } Vertex_circulator start = incident_vertices(infinite_vertex()); Vertex_circulator pc(start); Vertex_circulator qc(start); ++qc; Vertex_circulator rc(start); ++rc; ++rc; do{ Orientation s = orientation(pc->point(), qc->point(), rc->point()); (CGAL::possibly(s != LEFT_TURN)?(static_cast(0)): ::CGAL::assertion_fail( "s != LEFT_TURN" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 808)); result = result && ( s != LEFT_TURN ); ++pc ; ++qc ; ++rc; }while(pc != start); result = result && (number_of_faces() == 2*(number_of_vertices()+1) - 4 - degree(infinite_vertex())); (CGAL::possibly(result)?(static_cast(0)): ::CGAL::assertion_fail( "result" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 818)); } return result; } template inline bool Triangulation_2:: is_infinite(Face_handle f) const { return f->has_vertex(infinite_vertex()); } template inline bool Triangulation_2:: is_infinite(Vertex_handle v) const { return v == infinite_vertex(); } template inline bool Triangulation_2:: is_infinite(Face_handle f, int i) const { return is_infinite(f->vertex(ccw(i))) || is_infinite(f->vertex(cw(i))); } template inline bool Triangulation_2:: is_infinite(const Edge& e) const { return is_infinite(e.first,e.second); } template inline bool Triangulation_2:: is_infinite(const Edge_circulator& ec) const { return is_infinite(*ec); } template inline bool Triangulation_2:: is_infinite(const All_edges_iterator& ei) const { return is_infinite(*ei); } template inline bool Triangulation_2:: is_edge(Vertex_handle va, Vertex_handle vb) const { return _tds.is_edge( va, vb); } template inline bool Triangulation_2:: is_edge(Vertex_handle va, Vertex_handle vb, Face_handle& fr, int & i) const { return _tds.is_edge(va, vb, fr, i); } template bool Triangulation_2:: includes_edge(Vertex_handle va, Vertex_handle vb, Vertex_handle & vbb, Face_handle& fr, int & i) const { Vertex_handle v; Orientation orient; int indv; Edge_circulator ec = incident_edges(va), done(ec); if (ec != 0) { do { indv = 3 - ((*ec).first)->index(va) - (*ec).second ; v = ((*ec).first)->vertex(indv); if (!is_infinite(v)) { if (v==vb) { vbb = vb; fr=(*ec).first; i= (*ec).second; return true; } else { orient = orientation(va->point(), vb->point(), v->point()); if((orient==COLLINEAR) && (collinear_between (va->point(), v->point(), vb->point()))) { vbb = v; fr=(*ec).first; i= (*ec).second; return true; } } } } while (++ec != done); } return false; } template inline bool Triangulation_2:: is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) const { return _tds.is_face(v1, v2, v3); } template inline bool Triangulation_2:: is_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Face_handle &fr) const { return _tds.is_face(v1, v2, v3, fr); } template typename Triangulation_2::Triangle Triangulation_2:: triangle(Face_handle f) const { (CGAL::possibly(! is_infinite(f))?(static_cast(0)): ::CGAL::precondition_fail( "! is_infinite(f)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 963)); typename Gt::Construct_triangle_2 construct_triangle = geom_traits().construct_triangle_2_object(); return construct_triangle(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point()); } template typename Triangulation_2::Segment Triangulation_2:: segment(Face_handle f, int i) const { (CGAL::possibly(! is_infinite(f,i))?(static_cast(0)): ::CGAL::precondition_fail( "! is_infinite(f,i)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 976)); typename Gt::Construct_segment_2 construct_segment = geom_traits().construct_segment_2_object(); return construct_segment(f->vertex(ccw(i))->point(), f->vertex(cw(i))->point()); } template typename Triangulation_2::Segment Triangulation_2:: segment(const Edge& e) const { (CGAL::possibly(! is_infinite(e))?(static_cast(0)): ::CGAL::precondition_fail( "! is_infinite(e)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 988)); typename Gt::Construct_segment_2 construct_segment = geom_traits().construct_segment_2_object(); return construct_segment(e.first->vertex(ccw(e.second))->point(), e.first->vertex( cw(e.second))->point()); } template typename Triangulation_2::Segment Triangulation_2:: segment(const Edge_circulator& ec) const { return segment(*ec); } template typename Triangulation_2::Segment Triangulation_2:: segment(const Finite_edges_iterator& ei) const { return segment(*ei); } template typename Triangulation_2::Segment Triangulation_2:: segment(const All_edges_iterator& ei) const { return segment(*ei); } template void Triangulation_2:: flip(Face_handle f, int i) { (CGAL::possibly(f != Face_handle())?(static_cast(0)): ::CGAL::precondition_fail( "f != Face_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1024)); (CGAL::possibly(i == 0 || i == 1 || i == 2)?(static_cast(0)): ::CGAL::precondition_fail( "i == 0 || i == 1 || i == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1025)); (CGAL::possibly(dimension()==2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension()==2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1026)); (CGAL::possibly(!is_infinite(f) && !is_infinite(f->neighbor(i)))?(static_cast(0)): ::CGAL::precondition_fail( "!is_infinite(f) && !is_infinite(f->neighbor(i))" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" # 1028 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" , 1029 # 1028 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" )) ; (CGAL::possibly(orientation(f->vertex(i)->point(), f->vertex(cw(i))->point(), mirror_vertex(f,i)->point()) == RIGHT_TURN && orientation(f->vertex(i)->point(), f->vertex(ccw(i))->point(), mirror_vertex(f,i)->point()) == LEFT_TURN)?(static_cast(0)): ::CGAL::precondition_fail( "orientation(f->vertex(i)->point(), f->vertex(cw(i))->point(), mirror_vertex(f,i)->point()) == RIGHT_TURN && orientation(f->vertex(i)->point(), f->vertex(ccw(i))->point(), mirror_vertex(f,i)->point()) == LEFT_TURN" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" # 1030 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" , 1036 # 1030 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" )) ; _tds.flip(f, i); return; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_first(const Point& p) { (CGAL::possibly(number_of_vertices() == 0)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices() == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1046)); Vertex_handle v = _tds.insert_second(); v->set_point(p); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_second(const Point& p) { (CGAL::possibly(number_of_vertices() == 1)?(static_cast(0)): ::CGAL::precondition_fail( "number_of_vertices() == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1057)); Vertex_handle v = _tds.insert_dim_up(infinite_vertex(), true); v->set_point(p); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_in_edge(const Point& p, Face_handle f,int i) { (static_cast(0)) ; Vertex_handle v = _tds.insert_in_edge(f,i); v->set_point(p); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_in_face(const Point& p, Face_handle f) { (CGAL::possibly(oriented_side(f,p) == ON_POSITIVE_SIDE)?(static_cast(0)): ::CGAL::precondition_fail( "oriented_side(f,p) == ON_POSITIVE_SIDE" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1083)); Vertex_handle v= _tds.insert_in_face(f); v->set_point(p); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_convex_hull(const Point& p, Face_handle f) { (CGAL::possibly(is_infinite(f) && dimension() >= 1)?(static_cast(0)): ::CGAL::precondition_fail( "is_infinite(f) && dimension() >= 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1094)); Vertex_handle v; if (dimension() == 1) v=insert_outside_convex_hull_1(p, f); else v=insert_outside_convex_hull_2(p, f); v->set_point(p); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_convex_hull_1(const Point& p, Face_handle f) { (CGAL::possibly(is_infinite(f) && dimension()==1)?(static_cast(0)): ::CGAL::precondition_fail( "is_infinite(f) && dimension()==1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1107)); (CGAL::possibly(orientation( mirror_vertex(f,f->index(infinite_vertex()))->point(), f->vertex(1- f->index(infinite_vertex()))->point(), p) == COLLINEAR && collinear_between( mirror_vertex(f,f->index(infinite_vertex()))->point(), f->vertex(1- f->index(infinite_vertex()))->point(), p))?(static_cast(0)): ::CGAL::precondition_fail( "orientation( mirror_vertex(f,f->index(infinite_vertex()))->point(), f->vertex(1- f->index(infinite_vertex()))->point(), p) == COLLINEAR && collinear_between( mirror_vertex(f,f->index(infinite_vertex()))->point(), f->vertex(1- f->index(infinite_vertex()))->point(), p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" # 1108 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" , 1116 # 1108 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" )) ; Vertex_handle v=_tds.insert_in_edge(f, 2); v->set_point(p); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_convex_hull_2(const Point& p, Face_handle f) { (CGAL::possibly(is_infinite(f))?(static_cast(0)): ::CGAL::precondition_fail( "is_infinite(f)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1127)); int li = f->index(infinite_vertex()); (CGAL::possibly(orientation(p, f->vertex(ccw(li))->point(), f->vertex(cw(li))->point()) == LEFT_TURN)?(static_cast(0)): ::CGAL::precondition_fail( "orientation(p, f->vertex(ccw(li))->point(), f->vertex(cw(li))->point()) == LEFT_TURN" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" # 1131 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" , 1134 # 1131 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" )) ; std::list ccwlist; std::list cwlist; Face_circulator fc = incident_faces(infinite_vertex(), f); bool done = false; while(! done) { fc--; li = fc->index(infinite_vertex()); const Point& q = fc->vertex(ccw(li))->point(); const Point& r = fc->vertex(cw(li))->point(); if(orientation(p,q,r) == LEFT_TURN ) { ccwlist.push_back(fc); } else {done=true;} } fc = incident_faces(infinite_vertex(), f); done = false; while(! done){ fc++; li = fc->index(infinite_vertex()); const Point& q = fc->vertex(ccw(li))->point(); const Point& r = fc->vertex(cw(li))->point(); if(orientation(p,q,r) == LEFT_TURN ) { cwlist.push_back(fc);} else {done=true;} } Vertex_handle v = _tds.insert_in_face(f); v->set_point(p); Face_handle fh; while ( ! ccwlist.empty()) { fh = ccwlist.front(); li = ccw(fh->index(infinite_vertex())); _tds.flip( fh, li); ccwlist.pop_front(); } while ( ! cwlist.empty()) { fh = cwlist.front(); li = cw(fh->index(infinite_vertex())); _tds.flip( fh, li); cwlist.pop_front(); } fc = incident_faces(v); while( ! is_infinite(fc)) { fc++;} infinite_vertex()->set_face(fc); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert_outside_affine_hull(const Point& p) { (CGAL::possibly(dimension() < 2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension() < 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1192)); bool conform = false; if (dimension() == 1) { Face_handle f = (*finite_edges_begin()).first; Orientation orient = orientation( f->vertex(0)->point(), f->vertex(1)->point(), p); (CGAL::possibly(orient != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "orient != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1199)); conform = ( orient == COUNTERCLOCKWISE); } Vertex_handle v = _tds.insert_dim_up( infinite_vertex(), conform); v->set_point(p); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert(const Point &p, Face_handle start) { Locate_type lt; int li; Face_handle loc = locate (p, lt, li, start); return insert(p, lt, loc, li); } template typename Triangulation_2::Vertex_handle Triangulation_2:: insert(const Point& p, Locate_type lt, Face_handle loc, int li) { if(number_of_vertices() == 0) { return(insert_first(p)); } if(number_of_vertices() == 1) { if (lt == VERTEX) return finite_vertex(); else return(insert_second(p)); } switch(lt) { case FACE: return insert_in_face(p,loc); case EDGE: return insert_in_edge(p,loc,li); case OUTSIDE_CONVEX_HULL: return insert_outside_convex_hull(p,loc); case OUTSIDE_AFFINE_HULL: return insert_outside_affine_hull(p); case VERTEX: return loc->vertex(li); } (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1246)); return Vertex_handle(); } template inline typename Triangulation_2::Vertex_handle Triangulation_2:: push_back(const Point &p) { return insert(p); } template inline void Triangulation_2:: remove_degree_3(Vertex_handle v, Face_handle f) { if (f == Face_handle()) f=v->face(); _tds.remove_degree_3(v, f); return; } template inline void Triangulation_2:: remove_first(Vertex_handle v) { _tds.remove_second(v); return; } template inline void Triangulation_2:: remove_second(Vertex_handle v) { _tds.remove_dim_down(v); return; } template void Triangulation_2:: remove(Vertex_handle v) { (CGAL::possibly(v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1293)); (CGAL::possibly(!is_infinite(v))?(static_cast(0)): ::CGAL::precondition_fail( "!is_infinite(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1294)); if (number_of_vertices() == 1) remove_first(v); else if (number_of_vertices() == 2) remove_second(v); else if ( dimension() == 1) remove_1D(v); else remove_2D(v); return; } template inline void Triangulation_2:: remove_1D(Vertex_handle v) { _tds.remove_1D(v); } template bool Triangulation_2:: test_dim_down(Vertex_handle v) const { (CGAL::possibly(dimension() == 2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension() == 2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1321)); bool dim1 = true; Finite_faces_iterator fit = finite_faces_begin(); while (dim1==true && fit != finite_faces_end()) { dim1 = dim1 && fit->has_vertex(v); fit++; } Face_circulator fic = incident_faces(v); while (is_infinite(fic)) {++fic;} Face_circulator done(fic); Face_handle start(fic); int iv = start->index(v); const Point& p = start->vertex(cw(iv))->point(); const Point& q = start->vertex(ccw(iv))->point(); while ( dim1 && ++fic != done) { iv = fic->index(v); if (fic->vertex(ccw(iv)) != infinite_vertex()) { dim1 = dim1 && orientation(p, q, fic->vertex(ccw(iv))->point()) == COLLINEAR; } } return dim1; } template void Triangulation_2:: remove_2D(Vertex_handle v) { if (test_dim_down(v)) { _tds.remove_dim_down(v); } else { std::list hole; make_hole(v, hole); fill_hole(v, hole); delete_vertex(v); } return; } template < class Gt, class Tds > template < class OutputItFaces > inline typename Triangulation_2::Vertex_handle Triangulation_2:: insert_and_give_new_faces(const Point &p, OutputItFaces oif, Face_handle start) { Vertex_handle v = insert(p, start); int dimension = this->dimension(); if(dimension == 2) { Face_circulator fc = incident_faces(v), done(fc); do { *oif++ = fc; } while(++fc != done); } else if(dimension == 1) { Face_handle c = v->face(); *oif++ = c; *oif++ = c->neighbor((~(c->index(v)))&1); } else *oif++ = v->face(); return v; } template < class Gt, class Tds > template < class OutputItFaces > inline typename Triangulation_2::Vertex_handle Triangulation_2:: insert_and_give_new_faces(const Point &p, Locate_type lt, Face_handle loc, int li, OutputItFaces oif) { Vertex_handle v = insert(p, lt, loc, li); int dimension = this->dimension(); if(dimension == 2) { Face_circulator fc = incident_faces(v), done(fc); do { *oif++ = fc; } while(++fc != done); } else if(dimension == 1) { Face_handle c = v->face(); *oif++ = c; *oif++ = c->neighbor((~(c->index(v)))&1); } else *oif++ = v->face(); return v; } template < class Gt, class Tds > template void Triangulation_2:: remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit) { (CGAL::possibly(v != Vertex_handle())?(static_cast(0)): ::CGAL::precondition_fail( "v != Vertex_handle()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1422)); (CGAL::possibly(!is_infinite(v))?(static_cast(0)): ::CGAL::precondition_fail( "!is_infinite(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 1423)); if(number_of_vertices() == 1) remove_first(v); else if(number_of_vertices() == 2) remove_second(v); else if( dimension() == 1) { Point p = v->point(); remove(v); *fit++ = locate(p); } else if (test_dim_down(v)) { _tds.remove_dim_down(v); for(All_faces_iterator afi = tds().face_iterator_base_begin(); afi != tds().face_iterator_base_begin(); afi++) *fit++ = afi; } else { std::list hole; make_hole(v, hole); fill_hole(v, hole, fit); delete_vertex(v); } return; } template void Triangulation_2:: make_hole ( Vertex_handle v, std::list & hole) { std::vector to_delete; to_delete.reserve(16); Face_handle f, fn; int i, in ; Vertex_handle vv; Face_circulator fc = incident_faces(v); Face_circulator done(fc); do { f = fc; fc++; i = f->index(v); fn = f->neighbor(i); in = fn->index(f); vv = f->vertex(cw(i)); vv->set_face(fn); vv = f->vertex(ccw(i)); vv->set_face(fn); fn->set_neighbor(in, Face_handle()); hole.push_back(Edge(fn,in)); to_delete.push_back(f); } while(fc != done); std::size_t size = to_delete.size(); for(std::size_t i=0; i void Triangulation_2:: make_hole(Vertex_handle v, std::list & hole, std::set &faces_set) { std::vector to_delete; to_delete.reserve(16); Face_handle f, fn; int i, in ; Vertex_handle vv; Face_circulator fc = incident_faces(v); Face_circulator done(fc); do { f = fc; fc++; i = f->index(v); fn = f->neighbor(i); in = fn->index(f); vv = f->vertex(cw(i)); vv->set_face(fn); vv = f->vertex(ccw(i)); vv->set_face(fn); fn->set_neighbor(in, Face_handle()); hole.push_back(Edge(fn,in)); to_delete.push_back(f); } while(fc != done); std::size_t size = to_delete.size(); for(std::size_t i=0; i void Triangulation_2:: fill_hole ( Vertex_handle v, std::list< Edge > & hole ) { typedef std::list Hole; Face_handle ff, fn; int ii , in; Vertex_handle v0, v1, v2; Bounded_side side; if( hole.size() != 3) { typename Hole::iterator hit = hole.begin(); typename Hole::iterator next= hit; while( hit != hole.end() && hole.size() != 3) { ff = (*hit).first; ii = (*hit).second; v0 = ff->vertex(cw(ii)); v1 = ff->vertex(ccw(ii)); if( !is_infinite(v0) && !is_infinite(v1)) { next=hit; next++; if(next == hole.end()) next=hole.begin(); fn = (*next).first; in = (*next).second; v2 = fn->vertex(ccw(in)); if ( !is_infinite(v2) && orientation(v0->point(), v1->point(), v2->point()) == LEFT_TURN ) { side = bounded_side(v0->point(), v1->point(), v2->point(), v->point()); if( side == ON_UNBOUNDED_SIDE || (side == ON_BOUNDARY && orientation(v0->point(), v->point(), v2->point()) == COLLINEAR && collinear_between(v0->point(),v->point(),v2->point()) )) { Face_handle newf = create_face(ff,ii,fn,in); typename Hole::iterator tempo=hit; hit = hole.insert(hit,Edge(newf,1)); hole.erase(tempo); hole.erase(next); if (hit != hole.begin() ) --hit; continue; } } } ++hit; } } if(hole.size() != 3) { typename Hole::iterator hit=hole.begin(); while(hit != hole.end()) { ff = (*hit).first; ii = (*hit).second; hit++; if(hit != hole.end()) { fn = (*hit).first; in = (*hit).second;} else { fn = ((hole.front()).first); in = (hole.front()).second;} if ( !is_infinite(ff->vertex(cw(ii))) && !is_infinite(fn->vertex(cw(in))) && !is_infinite(fn->vertex(ccw(in))) && orientation(ff->vertex(cw(ii))->point(), fn->vertex(cw(in))->point(), fn->vertex(ccw(in))->point()) == LEFT_TURN) { create_face(ff,ii,fn,in); break; } } } if(hole.size() != 3) { ff = (hole.front()).first; ii = (hole.front()).second; while ( ! is_infinite(ff->vertex(cw(ii)))){ hole.push_back(hole.front()); hole.pop_front(); ff = (hole.front()).first; ii = (hole.front()).second; } while(hole.size() != 3){ ff = (hole.front()).first; ii = (hole.front()).second; hole.pop_front(); fn = (hole.front()).first; in = (hole.front()).second; hole.pop_front(); Face_handle newf = create_face(ff,ii,fn,in); hole.push_front(Edge(newf,1)); } } typename Hole::iterator hit; hit = hole.begin(); ff = (*hit).first; ii = (*hit).second; fn = (* ++hit).first; in = (*hit).second; Face_handle f3 = (* ++hit).first; int i3 = (*hit).second; create_face(ff,ii,fn,in,f3,i3); } template < class Gt, class Tds > template void Triangulation_2:: fill_hole(Vertex_handle v, std::list & hole, OutputItFaces fit) { typedef std::list Hole; Face_handle ff, fn; int ii , in; Vertex_handle v0, v1, v2; Bounded_side side; if( hole.size() != 3) { typename Hole::iterator hit = hole.begin(); typename Hole::iterator next= hit; while( hit != hole.end() && hole.size() != 3) { ff = (*hit).first; ii = (*hit).second; v0 = ff->vertex(cw(ii)); v1 = ff->vertex(ccw(ii)); if( !is_infinite(v0) && !is_infinite(v1)) { next=hit; next++; if(next == hole.end()) next=hole.begin(); fn = (*next).first; in = (*next).second; v2 = fn->vertex(ccw(in)); if ( !is_infinite(v2) && orientation(v0->point(), v1->point(), v2->point()) == LEFT_TURN ) { side = bounded_side(v0->point(), v1->point(), v2->point(), v->point()); if( side == ON_UNBOUNDED_SIDE || (side == ON_BOUNDARY && orientation(v0->point(), v->point(), v2->point()) == COLLINEAR && collinear_between(v0->point(),v->point(),v2->point()) )) { Face_handle newf = create_face(ff,ii,fn,in); *fit++ = newf; typename Hole::iterator tempo=hit; hit = hole.insert(hit,Edge(newf,1)); hole.erase(tempo); hole.erase(next); if (hit != hole.begin() ) --hit; continue; } } } ++hit; } } if(hole.size() != 3) { typename Hole::iterator hit=hole.begin(); while(hit != hole.end()) { ff = (*hit).first; ii = (*hit).second; hit++; if(hit != hole.end()) { fn = (*hit).first; in = (*hit).second;} else { fn = ((hole.front()).first); in = (hole.front()).second;} if ( !is_infinite(ff->vertex(cw(ii))) && !is_infinite(fn->vertex(cw(in))) && !is_infinite(fn->vertex(ccw(in))) && orientation(ff->vertex(cw(ii))->point(), fn->vertex(cw(in))->point(), fn->vertex(ccw(in))->point()) == LEFT_TURN) { Face_handle newf = create_face(ff,ii,fn,in); *fit++ = newf; break; } } } if(hole.size() != 3) { ff = (hole.front()).first; ii = (hole.front()).second; while ( ! is_infinite(ff->vertex(cw(ii)))){ hole.push_back(hole.front()); hole.pop_front(); ff = (hole.front()).first; ii = (hole.front()).second; } while(hole.size() != 3){ ff = (hole.front()).first; ii = (hole.front()).second; hole.pop_front(); fn = (hole.front()).first; in = (hole.front()).second; hole.pop_front(); Face_handle newf = create_face(ff,ii,fn,in); *fit++ = newf; hole.push_front(Edge(newf,1)); } } typename Hole::iterator hit; hit = hole.begin(); ff = (*hit).first; ii = (*hit).second; fn = (* ++hit).first; in = (*hit).second; Face_handle f3 = (* ++hit).first; int i3 = (*hit).second; Face_handle newf = create_face(ff,ii,fn,in,f3,i3); *fit++ = newf; } template void Triangulation_2:: fill_hole_delaunay(std::list & first_hole) { typedef std::list Hole; typedef std::list Hole_list; Face_handle f, ff, fn; int i, ii, in; Hole_list hole_list; Hole hole; hole_list.push_front(first_hole); while( ! hole_list.empty()) { hole = hole_list.front(); hole_list.pop_front(); typename Hole::iterator hit = hole.begin(); if (hole.size() == 3) { hit = hole.begin(); f = (*hit).first; i = (*hit).second; ff = (* ++hit).first; ii = (*hit).second; fn = (* ++hit).first; in = (*hit).second; create_face(f,i,ff,ii,fn,in); continue; } # 1808 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" bool finite= false; while (!finite){ ff = (hole.front()).first; ii = (hole.front()).second; if ( is_infinite(ff->vertex(cw(ii))) || is_infinite(ff->vertex(ccw(ii)))) { hole.push_back(hole.front()); hole.pop_front(); } else finite=true; } ff = (hole.front()).first; ii =(hole.front()).second; hole.pop_front(); Vertex_handle v0 = ff->vertex(cw(ii)); Vertex_handle v1 = ff->vertex(ccw(ii)); Vertex_handle v2 = infinite_vertex(); Vertex_handle v3; const Point& p0 = v0->point(); const Point& p1 = v1->point(); typename Hole::iterator hdone = hole.end(); hit = hole.begin(); typename Hole::iterator cut_after(hit); hdone--; while( hit != hdone) { fn = (*hit).first; in = (*hit).second; Vertex_handle vv = fn->vertex(ccw(in)); if (is_infinite(vv)) { if(is_infinite(v2)) cut_after = hit; } else { const Point & p = vv->point(); if (orientation(p0,p1,p) == COUNTERCLOCKWISE) { if (is_infinite(v2)) { v2=vv; v3=vv; cut_after=hit;} else{ if (this->side_of_oriented_circle(p0,p1,v3->point(),p,true) == ON_POSITIVE_SIDE){ v2=vv; v3=vv; cut_after=hit;} } } } ++hit; } Face_handle newf; fn = (hole.front()).first; in = (hole.front()).second; if (fn->has_vertex(v2, i) && i == fn->ccw(in)) { newf = create_face(ff,ii,fn,in); hole.pop_front(); hole.push_front(Edge( newf,1)); hole_list.push_front(hole); } else{ fn = (hole.back()).first; in = (hole.back()).second; if (fn->has_vertex(v2, i) && i== fn->cw(in)) { newf = create_face(fn,in,ff,ii); hole.pop_back(); hole.push_back(Edge(newf,1)); hole_list.push_front(hole); } else{ newf = create_face(ff,ii,v2); Hole new_hole; ++cut_after; while( hole.begin() != cut_after ) { new_hole.push_back(hole.front()); hole.pop_front(); } hole.push_front(Edge( newf,1)); new_hole.push_front(Edge( newf,0)); hole_list.push_front(hole); hole_list.push_front(new_hole); } } } } template < class Gt, class Tds > template void Triangulation_2:: fill_hole_delaunay(std::list & first_hole, OutputItFaces fit) { typedef typename Gt::Orientation_2 Orientation_2; typedef typename Gt::Side_of_oriented_circle_2 In_circle; typedef std::list Hole; typedef std::list Hole_list; Orientation_2 orientation_2 = geom_traits().orientation_2_object(); In_circle in_circle = geom_traits().side_of_oriented_circle_2_object(); Face_handle f, ff, fn; int i, ii, in; Hole_list hole_list; Hole hole; hole_list.push_front(first_hole); while(!hole_list.empty()) { hole = hole_list.front(); hole_list.pop_front(); typename Hole::iterator hit = hole.begin(); if (hole.size() == 3) { hit = hole.begin(); f = (*hit).first; i = (*hit).second; ff = (* ++hit).first; ii = (*hit).second; fn = (* ++hit).first; in = (*hit).second; Face_handle newf = create_face(f,i,ff,ii,fn,in); *fit++ = newf; continue; } bool finite= false; while (!finite){ ff = (hole.front()).first; ii = (hole.front()).second; if ( is_infinite(ff->vertex(cw(ii))) || is_infinite(ff->vertex(ccw(ii)))) { hole.push_back(hole.front()); hole.pop_front(); } else finite=true; } ff = (hole.front()).first; ii =(hole.front()).second; hole.pop_front(); Vertex_handle v0 = ff->vertex(cw(ii)); Vertex_handle v1 = ff->vertex(ccw(ii)); Vertex_handle v2 = infinite_vertex(); const Point& p0 = v0->point(); const Point& p1 = v1->point(); typename Hole::iterator hdone = hole.end(); hit = hole.begin(); typename Hole::iterator cut_after(hit); hdone--; while( hit != hdone) { fn = (*hit).first; in = (*hit).second; Vertex_handle vv = fn->vertex(ccw(in)); if (is_infinite(vv)) { if(is_infinite(v2)) cut_after = hit; } else { const Point & p = vv->point(); if (orientation_2(p0,p1,p) == CGAL::COUNTERCLOCKWISE) { if (is_infinite(v2)) { v2 = vv; cut_after = hit;} else{ if (in_circle(p0,p1,v2->point(),p) == CGAL::ON_POSITIVE_SIDE){ v2 = vv; cut_after = hit; } } } } ++hit; } Face_handle newf; fn = (hole.front()).first; in = (hole.front()).second; if (fn->has_vertex(v2, i) && i == fn->ccw(in)) { newf = create_face(ff,ii,fn,in); hole.pop_front(); hole.push_front(Edge( newf,1)); hole_list.push_front(hole); } else { fn = (hole.back()).first; in = (hole.back()).second; if (fn->has_vertex(v2, i) && i== fn->cw(in)) { newf = create_face(fn,in,ff,ii); hole.pop_back(); hole.push_back(Edge(newf,1)); hole_list.push_front(hole); } else { newf = create_face(ff,ii,v2); Hole new_hole; ++cut_after; while( hole.begin() != cut_after ) { new_hole.push_back(hole.front()); hole.pop_front(); } hole.push_front(Edge(newf, 1)); new_hole.push_front(Edge(newf, 0)); hole_list.push_front(hole); hole_list.push_front(new_hole); } } *fit++ = newf; } } template typename Triangulation_2::Vertex_handle Triangulation_2:: move_if_no_collision(Vertex_handle v, const Point &p) { (CGAL::possibly(!is_infinite(v))?(static_cast(0)): ::CGAL::precondition_fail( "!is_infinite(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2028)); if(v->point() == p) return v; const int dim = dimension(); Locate_type lt; int li; Face_handle loc = locate(p, lt, li, v->face()); if(lt == VERTEX) return loc->vertex(li); if(dim == 0) { v->set_point(p); return v; } size_type n_vertices = tds().number_of_vertices(); if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) { v->set_point(p); return v; } if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) { if(loc->has_vertex(v)) { v->set_point(p); } else { Vertex_handle inserted = insert(p, lt, loc, li); Face_handle f = v->face(); int i = f->index(v); if (i==0) {f = f->neighbor(1);} (CGAL::possibly(f->index(v) == 1)?(static_cast(0)): ::CGAL::assertion_fail( "f->index(v) == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2059)); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); g->neighbor(0)->set_neighbor(1,f); g->vertex(1)->set_face(f); delete_face(g); Face_handle f_ins = inserted->face(); i = f_ins->index(inserted); if (i==0) {f_ins = f_ins->neighbor(1);} (CGAL::possibly(f_ins->index(inserted) == 1)?(static_cast(0)): ::CGAL::assertion_fail( "f_ins->index(inserted) == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2069)); Face_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); v->set_point(p); v->set_face(inserted->face()); delete_vertex(inserted); } return v; } if((lt != OUTSIDE_AFFINE_HULL) && test_dim_down(v)) { int iinf = 0; Face_circulator finf = incident_faces(infinite_vertex()), fdone(finf); do { if(!finf->has_vertex(v)) { iinf = ~(finf->index(infinite_vertex())); break; } } while(++finf != fdone); if(this->orientation(finf->vertex(iinf&1)->point(), finf->vertex(iinf&2)->point(), p) == COLLINEAR) { v->set_point(p); _tds.dim_down(loc, loc->index(v)); return v; } } Vertex_handle inserted = insert(p, lt, loc, li); std::list hole; make_hole(v, hole); fill_hole(v, hole); Face_circulator fc = this->incident_faces(inserted), done(fc); std::vector faces_pt; faces_pt.reserve(16); do { faces_pt.push_back(fc); } while(++fc != done); std::size_t ss = faces_pt.size(); for(std::size_t k=0; kindex(inserted); f->set_vertex(i, v); } v->set_point(p); v->set_face(inserted->face()); delete_vertex(inserted); return v; } template typename Triangulation_2::Vertex_handle Triangulation_2:: move(Vertex_handle v, const Point &p) { (CGAL::possibly(!is_infinite(v))?(static_cast(0)): ::CGAL::precondition_fail( "!is_infinite(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2130)); if(v->point() == p) return v; Vertex_handle w = move_if_no_collision(v,p); if(w != v) { remove(v); return w; } return v; } template template typename Triangulation_2::Vertex_handle Triangulation_2:: move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p, OutputItFaces oif) { (CGAL::possibly(!is_infinite(v))?(static_cast(0)): ::CGAL::precondition_fail( "!is_infinite(v)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2148)); if(v->point() == p) return v; typedef std::list Faces_list; const int dim = this->dimension(); Locate_type lt; int li; Vertex_handle inserted; Face_handle loc = locate(p, lt, li, v->face()); if(lt == VERTEX) return loc->vertex(li); if(dim == 0) { v->set_point(p); return v; } int n_vertices = tds().number_of_vertices(); if((lt == OUTSIDE_AFFINE_HULL) && (dim == 1) && (n_vertices == 3)) { v->set_point(p); for(All_faces_iterator afi = tds().face_iterator_base_begin(); afi != tds().face_iterator_base_begin(); afi++) *oif++ = afi; return v; } if((lt != OUTSIDE_AFFINE_HULL) && (dim == 1)) { if(loc->has_vertex(v)) { v->set_point(p); } else { inserted = insert(p, lt, loc, li); Face_handle f = v->face(); int i = f->index(v); if (i==0) {f = f->neighbor(1);} (CGAL::possibly(f->index(v) == 1)?(static_cast(0)): ::CGAL::assertion_fail( "f->index(v) == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2185)); Face_handle g= f->neighbor(0); f->set_vertex(1, g->vertex(1)); f->set_neighbor(0,g->neighbor(0)); g->neighbor(0)->set_neighbor(1,f); g->vertex(1)->set_face(f); delete_face(g); *oif++ = f; Face_handle f_ins = inserted->face(); i = f_ins->index(inserted); if (i==0) {f_ins = f_ins->neighbor(1);} (CGAL::possibly(f_ins->index(inserted) == 1)?(static_cast(0)): ::CGAL::assertion_fail( "f_ins->index(inserted) == 1" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2196)); Face_handle g_ins = f_ins->neighbor(0); f_ins->set_vertex(1, v); g_ins->set_vertex(0, v); v->set_point(p); v->set_face(inserted->face()); delete_vertex(inserted); } *oif++ = v->face(); if(v->face()->neighbor(0)->has_vertex(v)) *oif++ = v->face()->neighbor(0); if(v->face()->neighbor(1)->has_vertex(v)) *oif++ = v->face()->neighbor(1); return v; } if((lt != OUTSIDE_AFFINE_HULL) && test_dim_down(v)) { int iinf; Face_circulator finf = incident_faces(infinite_vertex()), fdone(finf); do { if(!finf->has_vertex(v)) { iinf = ~(finf->index(infinite_vertex())); break; } } while(++finf != fdone); if(this->orientation(finf->vertex(iinf&1)->point(), finf->vertex(iinf&2)->point(), p) == COLLINEAR) { v->set_point(p); _tds.dim_down(loc, loc->index(v)); return v; } for(All_faces_iterator afi = tds().face_iterator_base_begin(); afi != tds().face_iterator_base_begin(); afi++) *oif++ = afi; } std::set faces_set; inserted = insert(p, lt, loc, li); Face_circulator fc = incident_faces(inserted), done(fc); do { faces_set.insert(fc); } while(++fc != done); std::list hole; make_hole(v, hole, faces_set); fill_hole(v, hole, oif); fc = this->incident_faces(inserted), done(fc); std::vector faces_pt; faces_pt.reserve(16); do { faces_pt.push_back(fc); } while(++fc != done); int ss = faces_pt.size(); for(int k=0; kindex(inserted); f->set_vertex(i, v); } v->set_point(p); v->set_face(inserted->face()); delete_vertex(inserted); for(typename std::set::iterator ib = faces_set.begin(), iend = faces_set.end(); ib != iend; ib++) *oif++ = *ib; return v; } template inline typename Triangulation_2::Face_handle Triangulation_2:: create_face(Face_handle f1, int i1, Face_handle f2, int i2, Face_handle f3, int i3) { return _tds.create_face(f1, i1, f2, i2, f3, i3); } template inline typename Triangulation_2::Face_handle Triangulation_2:: create_face(Face_handle f1, int i1, Face_handle f2, int i2) { return _tds.create_face(f1, i1, f2, i2); } template inline typename Triangulation_2::Face_handle Triangulation_2:: create_face(Face_handle f, int i, Vertex_handle v) { return _tds.create_face(f, i, v); } template inline typename Triangulation_2::Face_handle Triangulation_2:: create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) { return _tds.create_face(v1, v2, v3); } template inline typename Triangulation_2::Face_handle Triangulation_2:: create_face(Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Face_handle f1, Face_handle f2, Face_handle f3) { return _tds.create_face(v1, v2, v3, f1, f2, f3); } template inline typename Triangulation_2::Face_handle Triangulation_2:: create_face(Face_handle fh) { return _tds.create_face(fh); } template inline typename Triangulation_2::Face_handle Triangulation_2:: create_face() { return _tds.create_face(); } template inline void Triangulation_2:: delete_face(Face_handle f) { _tds.delete_face(f); } template inline void Triangulation_2:: delete_vertex(Vertex_handle v) { _tds.delete_vertex(v); } template typename Triangulation_2::Face_handle Triangulation_2:: march_locate_1D(const Point& t, Locate_type& lt, int& li) const { Face_handle ff = infinite_face(); int iv = ff->index(infinite_vertex()); Face_handle f = ff->neighbor(iv); Orientation pqt = orientation(f->vertex(0)->point(), f->vertex(1)->point(), t); if(pqt == RIGHT_TURN || pqt == LEFT_TURN) { lt = OUTSIDE_AFFINE_HULL; li = 4 ; return Face_handle(); } int i= f->index(ff); if (collinear_between(t,f->vertex(1-i)->point(),f->vertex(i)->point())) { lt = OUTSIDE_CONVEX_HULL; li = iv; return ff; } if( xy_equal(t,f->vertex(1-i)->point()) ){ lt = VERTEX; li=1-i; return f; } ff = ff->neighbor(1-iv); iv = ff->index(infinite_vertex()); f = ff->neighbor(iv); i = f->index(ff); if (collinear_between(t,f->vertex(1-i)->point(),f->vertex(i)->point())) { lt = OUTSIDE_CONVEX_HULL; li = iv; return ff; } if( xy_equal(t,f->vertex(1-i)->point()) ){ lt = VERTEX; li=1-i; return f; } Finite_edges_iterator eit= finite_edges_begin(); Vertex_handle u,v; for( ; eit != finite_edges_end() ; eit++) { u = (*eit).first->vertex(0); v = (*eit).first->vertex(1); if(xy_equal(t,v->point())){ lt = VERTEX; li = 1; return (*eit).first; } if(collinear_between(u->point(), t, v->point())){ lt = EDGE; li = 2; return (*eit).first; } } (CGAL::possibly(false)?(static_cast(0)): ::CGAL::assertion_fail( "false" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2419)); return Face_handle(); } template typename Triangulation_2::Face_handle Triangulation_2:: march_locate_2D_LFC(Face_handle start, const Point& t, Locate_type& lt, int& li) const { const Point& p = start->vertex(0)->point(); const Point& q = start->vertex(1)->point(); const Point& r = start->vertex(2)->point(); if(xy_equal(t,p)) { lt = VERTEX; li = 0; return start; } Line_face_circulator lfc; Orientation o2 = orientation(p, q, t); Orientation o0 = orientation(q, r, t); Orientation o1 = orientation(r, p, t); if( (o2 == LEFT_TURN)&& (o1 == LEFT_TURN)) { lfc = Line_face_circulator(start, 0, Line_face_circulator::vertex_edge, this, p, t); } else if ( (o0 == LEFT_TURN)&& (o2 == LEFT_TURN)) { lfc = Line_face_circulator(start, 1, Line_face_circulator::vertex_edge, this, q, t); } else if ( (o1 == LEFT_TURN)&& (o0 == LEFT_TURN)) { lfc = Line_face_circulator(start, 2, Line_face_circulator::vertex_edge, this, r, t); } if( (o2 == RIGHT_TURN)&& (o1 == RIGHT_TURN)) { lfc = Line_face_circulator(start, 0, Line_face_circulator::edge_vertex, this, p, t); } else if ( (o0 == RIGHT_TURN)&& (o2 == RIGHT_TURN)) { lfc = Line_face_circulator(start, 1, Line_face_circulator::edge_vertex, this, q, t); } else if ( (o1 == RIGHT_TURN)&& (o0 == RIGHT_TURN)) { lfc = Line_face_circulator(start, 2, Line_face_circulator::edge_vertex, this, r, t); }else { lfc = Line_face_circulator(start->vertex(0), this, t); } if(lfc==0 || lfc.collinear_outside()){ Face_circulator fc = incident_faces(infinite_vertex()); Face_circulator done(fc); int ic = fc->index(infinite_vertex()); if (xy_equal(t,fc->vertex(cw(ic))->point())){ lt = VERTEX; li = cw(ic); return fc; } Orientation ori; do{ ic = fc->index(infinite_vertex()); if (xy_equal(t,fc->vertex(ccw(ic))->point())){ lt = VERTEX; li = ccw(ic); return fc; } ori = orientation( fc->vertex(cw(ic))->point(), fc->vertex(ccw(ic))->point(), t); if (ori == RIGHT_TURN) { lt = OUTSIDE_CONVEX_HULL; li = ic; return fc; } if (ori == COLLINEAR && collinear_between(fc->vertex(cw(ic))->point(), t, fc->vertex(ccw(ic))->point()) ) { lt = EDGE; li = ic; return fc; } } while (--fc != done); (CGAL::possibly(fc != done)?(static_cast(0)): ::CGAL::assertion_fail( "fc != done" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2509)); } while(! lfc.locate(t, lt, li) ){ ++lfc; } return lfc; } template void Triangulation_2:: compare_walks(const Point& p, Face_handle c1, Face_handle c2, Locate_type& lt1, Locate_type& lt2, int li1, int li2) const { bool b = true; b = b && (lt1 == lt2); if((lt1 == lt2) && (lt1 == VERTEX)) { b = b && ( c1->vertex(li1) == c2->vertex(li2) ); } else if((lt1 == lt2) && (lt1 == EDGE)) { b = b && ((c1 == c2) || ( (c1->neighbor(li1) == c2) && (c2->neighbor(li2) == c1))); }else if((lt1 == lt2) && (lt1 == OUTSIDE_CONVEX_HULL)) { b = b && (is_infinite(c1) && is_infinite(c2)); } else { b = b && (lt1 == lt2); b = b && (lt1 == FACE); b = b && (c1 == c2); } if ( c1 != c2) { std::cerr << "from compare_walks " << std::endl; std::cerr << "point " << p << std::endl; std::cerr << "locate 1 " << &*c1 << "\t" << lt1 << "\t" << li1 << std::endl; std::cerr << "locate 2 " << &*c2 << "\t" << lt2 << "\t" << li2 << std::endl; std::cerr << std::endl; show_face(c1); std::cerr << std::endl; show_face(c2); std::cerr << std::endl; } (CGAL::possibly(b)?(static_cast(0)): ::CGAL::assertion_fail( "b" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2554)); } template typename Triangulation_2::Face_handle Triangulation_2:: march_locate_2D(Face_handle c, const Point& t, Locate_type& lt, int& li) const { (CGAL::possibly(! is_infinite(c))?(static_cast(0)): ::CGAL::assertion_fail( "! is_infinite(c)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 2567)); boost::rand48 rng; boost::uniform_smallint<> two(0, 1); boost::variate_generator > coin(rng, two); Face_handle prev = Face_handle(); bool first = true; while (1) { if ( is_infinite(c) ) { lt = OUTSIDE_CONVEX_HULL; li = c->index(infinite_vertex()); return c; } # 2593 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" int left_first = coin()%2; const Point & p0 = c->vertex( 0 )->point(); const Point & p1 = c->vertex( 1 )->point(); const Point & p2 = c->vertex( 2 )->point(); Orientation o0, o1, o2; if(first){ prev = c; first = false; o0 = orientation(p0,p1,t); if ( o0 == NEGATIVE ) { c = c->neighbor( 2 ); continue; } o1 = orientation(p1,p2,t); if ( o1 == NEGATIVE ) { c = c->neighbor( 0 ); continue; } o2 = orientation(p2,p0,t); if ( o2 == NEGATIVE ) { c = c->neighbor( 1 ); continue; } } else if(left_first){ if(c->neighbor(0) == prev){ prev = c; o0 = orientation(p0,p1,t); if ( o0 == NEGATIVE ) { c = c->neighbor( 2 ); continue; } o2 = orientation(p2,p0,t); if ( o2 == NEGATIVE ) { c = c->neighbor( 1 ); continue; } o1 = POSITIVE; } else if(c->neighbor(1) == prev){ prev = c; o1 = orientation(p1,p2,t); if ( o1 == NEGATIVE ) { c = c->neighbor( 0 ); continue; } o0 = orientation(p0,p1,t); if ( o0 == NEGATIVE ) { c = c->neighbor( 2 ); continue; } o2 = POSITIVE; } else { prev = c; o2 = orientation(p2,p0,t); if ( o2 == NEGATIVE ) { c = c->neighbor( 1 ); continue; } o1 = orientation(p1,p2,t); if ( o1 == NEGATIVE ) { c = c->neighbor( 0 ); continue; } o0 = POSITIVE; } } else { if(c->neighbor(0) == prev){ prev = c; o2 = orientation(p2,p0,t); if ( o2 == NEGATIVE ) { c = c->neighbor( 1 ); continue; } o0 = orientation(p0,p1,t); if ( o0 == NEGATIVE ) { c = c->neighbor( 2 ); continue; } o1 = POSITIVE; } else if(c->neighbor(1) == prev){ prev = c; o0 = orientation(p0,p1,t); if ( o0 == NEGATIVE ) { c = c->neighbor( 2 ); continue; } o1 = orientation(p1,p2,t); if ( o1 == NEGATIVE ) { c = c->neighbor( 0 ); continue; } o2 = POSITIVE; } else { prev = c; o1 = orientation(p1,p2,t); if ( o1 == NEGATIVE ) { c = c->neighbor( 0 ); continue; } o2 = orientation(p2,p0,t); if ( o2 == NEGATIVE ) { c = c->neighbor( 1 ); continue; } o0 = POSITIVE; } } int sum = ( o0 == COLLINEAR ) + ( o1 == COLLINEAR ) + ( o2 == COLLINEAR ); switch (sum) { case 0: { lt = FACE; li = 4; break; } case 1: { lt = EDGE; li = ( o0 == COLLINEAR ) ? 2 : ( o1 == COLLINEAR ) ? 0 : 1; break; } case 2: { lt = VERTEX; li = ( o0 != COLLINEAR ) ? 2 : ( o1 != COLLINEAR ) ? 0 : 1; break; } } return c; } } # 2839 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" template typename Triangulation_2::Face_handle Triangulation_2:: exact_locate(const Point& p, Locate_type& lt, int& li, Face_handle start) const { if (dimension() < 0) { lt = OUTSIDE_AFFINE_HULL; li = 4; return Face_handle(); } if( dimension() == 0) { if (xy_equal(p,finite_vertex()->face()->vertex(0)->point())){ lt = VERTEX ; } else{ lt = OUTSIDE_AFFINE_HULL; } li = 4; return Face_handle(); } if(dimension() == 1){ return march_locate_1D(p, lt, li); } if(start == Face_handle()){ start = infinite_face()-> neighbor(infinite_face()->index(infinite_vertex())); }else if(is_infinite(start)){ start = start->neighbor(start->index(infinite_vertex())); } Face_handle res1 = march_locate_2D(start, p, lt, li); # 2903 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" return res1; # 2912 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" } # 2926 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" template inline typename Triangulation_2::Face_handle Triangulation_2:: inexact_locate(const Point & t, Face_handle start, int n_of_turns) const { if(dimension() < 2) return start; if(start == Face_handle()){ start = infinite_face()-> neighbor(infinite_face()->index(infinite_vertex())); } else if(is_infinite(start)){ start = start->neighbor(start->index(infinite_vertex())); } Face_handle prev = Face_handle(), c = start; bool first = true; while (1) { if(!(n_of_turns--)) return c; if ( is_infinite(c) ) return c; const Point & p0 = c->vertex( 0 )->point(); const Point & p1 = c->vertex( 1 )->point(); const Point & p2 = c->vertex( 2 )->point(); if(first) { prev = c; first = false; if(inexact_orientation(p0,p1,t) == NEGATIVE) { c = c->neighbor( 2 ); continue; } if(inexact_orientation(p1,p2,t) == NEGATIVE) { c = c->neighbor( 0 ); continue; } if (inexact_orientation(p2,p0,t) == NEGATIVE) { c = c->neighbor( 1 ); continue; } } else { if(c->neighbor(0) == prev){ prev = c; if (inexact_orientation(p0,p1,t) == NEGATIVE) { c = c->neighbor( 2 ); continue; } if (inexact_orientation(p2,p0,t) == NEGATIVE) { c = c->neighbor( 1 ); continue; } } else if(c->neighbor(1) == prev){ prev = c; if (inexact_orientation(p0,p1,t) == NEGATIVE) { c = c->neighbor( 2 ); continue; } if (inexact_orientation(p1,p2,t) == NEGATIVE) { c = c->neighbor( 0 ); continue; } } else { prev = c; if (inexact_orientation(p2,p0,t) == NEGATIVE) { c = c->neighbor( 1 ); continue; } if (inexact_orientation(p1,p2,t) == NEGATIVE) { c = c->neighbor( 0 ); continue; } } } break; } return c; } template inline Orientation Triangulation_2:: inexact_orientation(const Point &p, const Point &q, const Point &r) const { const double px = to_double(p.x()); const double py = to_double(p.y()); const double qx = to_double(q.x()); const double qy = to_double(q.y()); const double rx = to_double(r.x()); const double ry = to_double(r.y()); const double pqx = qx - px; const double pqy = qy - py; const double prx = rx - px; const double pry = ry - py; const double det = determinant(pqx, pqy, prx, pry); if (det > 0) return POSITIVE; if (det < 0) return NEGATIVE; return ZERO; } template typename Triangulation_2::Finite_faces_iterator Triangulation_2:: finite_faces_begin() const { if ( dimension() < 2 ) return finite_faces_end(); return CGAL::filter_iterator( all_faces_end(), Infinite_tester(this), all_faces_begin() ); } template typename Triangulation_2::Finite_faces_iterator Triangulation_2:: finite_faces_end() const { return CGAL::filter_iterator( all_faces_end(), Infinite_tester(this) ); } template typename Triangulation_2::Finite_vertices_iterator Triangulation_2:: finite_vertices_begin() const { if ( number_of_vertices() <= 0 ) return finite_vertices_end(); return CGAL::filter_iterator( all_vertices_end(), Infinite_tester(this), all_vertices_begin() ); } template typename Triangulation_2::Finite_vertices_iterator Triangulation_2:: finite_vertices_end() const { return CGAL::filter_iterator(all_vertices_end(), Infinite_tester(this)); } template typename Triangulation_2::Finite_edges_iterator Triangulation_2:: finite_edges_begin() const { if ( dimension() < 1 ) return finite_edges_end(); return CGAL::filter_iterator( all_edges_end(), infinite_tester(), all_edges_begin()); } template typename Triangulation_2::Finite_edges_iterator Triangulation_2:: finite_edges_end() const { return CGAL::filter_iterator(all_edges_end(), infinite_tester() ); } template typename Triangulation_2::Point_iterator Triangulation_2:: points_begin() const { return Point_iterator(finite_vertices_begin()); } template typename Triangulation_2::Point_iterator Triangulation_2:: points_end() const { return Point_iterator(finite_vertices_end()); } template typename Triangulation_2::All_faces_iterator Triangulation_2:: all_faces_begin() const { return _tds.faces_begin(); } template typename Triangulation_2::All_faces_iterator Triangulation_2:: all_faces_end() const { return _tds.faces_end();; } template typename Triangulation_2::All_vertices_iterator Triangulation_2:: all_vertices_begin() const { return _tds.vertices_begin(); } template typename Triangulation_2::All_vertices_iterator Triangulation_2:: all_vertices_end() const { return _tds.vertices_end(); } template typename Triangulation_2::All_edges_iterator Triangulation_2:: all_edges_begin() const { return _tds.edges_begin(); } template typename Triangulation_2::All_edges_iterator Triangulation_2:: all_edges_end() const { return _tds.edges_end(); } template inline typename Triangulation_2::Face_circulator Triangulation_2:: incident_faces(Vertex_handle v, Face_handle f) const { return _tds.incident_faces(v,f); } template inline typename Triangulation_2::Vertex_circulator Triangulation_2:: incident_vertices(Vertex_handle v, Face_handle f) const { return _tds.incident_vertices(v,f); } template inline typename Triangulation_2::Edge_circulator Triangulation_2:: incident_edges(Vertex_handle v, Face_handle f) const { return _tds.incident_edges(v,f); } template inline typename Triangulation_2::size_type Triangulation_2:: degree(Vertex_handle v) const { return _tds.degree(v); } template inline typename Triangulation_2::Vertex_handle Triangulation_2:: mirror_vertex(Face_handle f, int i) const { return _tds.mirror_vertex(f,i); } template inline int Triangulation_2:: mirror_index(Face_handle f, int i) const { return _tds.mirror_index(f,i); } template inline typename Triangulation_2::Edge Triangulation_2:: mirror_edge(const Edge e) const { return _tds.mirror_edge(e); } template typename Triangulation_2::Line_face_circulator Triangulation_2:: line_walk(const Point& p, const Point& q, Face_handle f) const { (CGAL::possibly((dimension() == 2) && ! xy_equal(p,q))?(static_cast(0)): ::CGAL::precondition_fail( "(dimension() == 2) && ! xy_equal(p,q)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" # 3225 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" , 3226 # 3225 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h" )) ; Line_face_circulator lfc = (f == Face_handle()) ? Line_face_circulator(p, q, this) : Line_face_circulator(p, q, f, this); if( (!lfc.is_empty()) && is_infinite( lfc )){ do { ++lfc ;} while (is_infinite(lfc)); } return lfc; } template Oriented_side Triangulation_2:: oriented_side(const Point &p0, const Point &p1, const Point &p2, const Point &p) const { Bounded_side bs=bounded_side(p0,p1,p2,p); if (bs == ON_BOUNDARY) return ON_ORIENTED_BOUNDARY; Orientation ot = orientation(p0, p1, p2); if (bs == ON_BOUNDED_SIDE) return (ot == LEFT_TURN) ? ON_POSITIVE_SIDE : ON_NEGATIVE_SIDE; return (ot == LEFT_TURN) ? ON_NEGATIVE_SIDE : ON_POSITIVE_SIDE; } template Bounded_side Triangulation_2:: bounded_side(const Point &p0, const Point &p1, const Point &p2, const Point &p) const { (CGAL::possibly(orientation(p0, p1, p2) != COLLINEAR)?(static_cast(0)): ::CGAL::precondition_fail( "orientation(p0, p1, p2) != COLLINEAR" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 3267)); Orientation o1 = orientation(p0, p1, p), o2 = orientation(p1, p2, p), o3 = orientation(p2, p0, p); if (o1 == COLLINEAR){ if (o2 == COLLINEAR || o3 == COLLINEAR) return ON_BOUNDARY; if (collinear_between(p0, p, p1)) return ON_BOUNDARY; return ON_UNBOUNDED_SIDE; } if (o2 == COLLINEAR){ if (o3 == COLLINEAR) return ON_BOUNDARY; if (collinear_between(p1, p, p2)) return ON_BOUNDARY; return ON_UNBOUNDED_SIDE; } if (o3 == COLLINEAR){ if (collinear_between(p2, p, p0)) return ON_BOUNDARY; return ON_UNBOUNDED_SIDE; } if (o1 == o2 && o2 == o3) return ON_BOUNDED_SIDE; return ON_UNBOUNDED_SIDE; } template Oriented_side Triangulation_2:: oriented_side(Face_handle f, const Point &p) const { (CGAL::possibly(dimension()==2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension()==2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 3300)); return oriented_side(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point(), p); } template Oriented_side Triangulation_2:: side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, const Point &p, bool perturb) const { typename Gt::Side_of_oriented_circle_2 pred = geom_traits().side_of_oriented_circle_2_object(); Oriented_side os = pred(p0, p1, p2, p); if ((os != ON_ORIENTED_BOUNDARY) || (! perturb)) return os; const Point * points[4] = {&p0, &p1, &p2, &p}; std::sort(points, points+4, Perturbation_order(this) ); for (int i=3; i>0; --i) { if (points[i] == &p) return ON_NEGATIVE_SIDE; Orientation o; if (points[i] == &p2 && (o = orientation(p0,p1,p)) != COLLINEAR ) return Oriented_side(o); if (points[i] == &p1 && (o = orientation(p0,p,p2)) != COLLINEAR ) return Oriented_side(o); if (points[i] == &p0 && (o = orientation(p,p1,p2)) != COLLINEAR ) return Oriented_side(o); } return ON_NEGATIVE_SIDE; } template < class Gt, class Tds > Oriented_side Triangulation_2:: side_of_oriented_circle(Face_handle f, const Point & p, bool perturb) const { if ( ! is_infinite(f) ) { return this->side_of_oriented_circle(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point(),p, perturb); } int i = f->index(infinite_vertex()); Orientation o = orientation(f->vertex(ccw(i))->point(), f->vertex(cw(i))->point(), p); return (o == NEGATIVE) ? ON_NEGATIVE_SIDE : (o == POSITIVE) ? ON_POSITIVE_SIDE : ON_ORIENTED_BOUNDARY; } template bool Triangulation_2:: collinear_between(const Point& p, const Point& q, const Point& r) const { Comparison_result c_pr = compare_x(p, r); Comparison_result c_pq; Comparison_result c_qr; if(c_pr == EQUAL) { c_pq = compare_y(p, q); c_qr = compare_y(q, r); } else { c_pq = compare_x(p, q); c_qr = compare_x(q, r); } return ( (c_pq == SMALLER) && (c_qr == SMALLER) ) || ( (c_pq == LARGER) && (c_qr == LARGER) ); } template inline Comparison_result Triangulation_2:: compare_x(const Point& p, const Point& q) const { return geom_traits().compare_x_2_object()(p,q); } template inline Comparison_result Triangulation_2:: compare_xy(const Point& p, const Point& q) const { Comparison_result res = geom_traits().compare_x_2_object()(p,q); if(res == EQUAL){ return geom_traits().compare_y_2_object()(p,q); } return res; } template inline Comparison_result Triangulation_2:: compare_y(const Point& p, const Point& q) const { return geom_traits().compare_y_2_object()(p,q); } template inline bool Triangulation_2:: xy_equal(const Point& p, const Point& q) const { return compare_x(p,q)== EQUAL && compare_y(p,q)== EQUAL ; } template inline Orientation Triangulation_2:: orientation(const Point& p, const Point& q,const Point& r ) const { return geom_traits().orientation_2_object()(p,q,r); } template inline typename Triangulation_2::Point Triangulation_2:: circumcenter (const Point& p0, const Point& p1, const Point& p2) const { return geom_traits().construct_circumcenter_2_object()(p0,p1,p2); } template typename Triangulation_2::Point Triangulation_2:: circumcenter(Face_handle f) const { (CGAL::possibly(dimension()==2)?(static_cast(0)): ::CGAL::precondition_fail( "dimension()==2" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 3471)); return circumcenter((f->vertex(0))->point(), (f->vertex(1))->point(), (f->vertex(2))->point()); } template void Triangulation_2:: show_all() const { std::cerr<< "AFFICHE TOUTE LA TRIANGULATION :"< "<< this; std::cerr << " dimension " << dimension() << std::endl; std::cerr << "nb of vertices " << number_of_vertices() << std::endl; if (dimension() < 1) return; if(dimension() == 1) { std::cerr<<" all edges "<first); } return; } std::cerr<<" faces finies "<1) { std::cerr << "affichage des sommets de la triangulation reguliere" <face())))<< std::endl;; } std::cerr< void Triangulation_2:: show_vertex(Vertex_handle vh) const { if(is_infinite(vh)) std::cerr << "inf \t"; else std::cerr << vh->point() << "\t"; return; } template void Triangulation_2:: show_face(Face_handle fh) const { std::cerr << "face : "<<(void*)&(*fh)<<" => "<dimension(); switch(i){ case 0: std::cerr <<"point :" ; show_vertex(fh->vertex(0)); std::cerr <<" / voisin " << &(*(fh->neighbor(0))); std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0)); std::cerr <<"]" << std::endl; break; case 1: std::cerr <<"point :" ; show_vertex(fh->vertex(0)); std::cerr <<" / voisin " << &(*(fh->neighbor(0))); std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0)); std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(1)); std::cerr <<"]" <vertex(1)); std::cerr <<" / voisin " << &(*(fh->neighbor(1))); std::cerr <<"[" ; show_vertex(fh->neighbor(1)->vertex(0)); std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(1)); std::cerr <<"]" <vertex(0)); std::cerr <<" / voisin " << &(*(fh->neighbor(0))); std::cerr <<"[" ; show_vertex(fh->neighbor(0)->vertex(0)); std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(1)); std::cerr <<"/" ; show_vertex(fh->neighbor(0)->vertex(2)); std::cerr <<"]" <vertex(1)); std::cerr <<" / voisin " << &(*(fh->neighbor(1))); std::cerr <<"[" ; show_vertex(fh->neighbor(1)->vertex(0)); std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(1)); std::cerr <<"/" ; show_vertex(fh->neighbor(1)->vertex(2)); std::cerr <<"]" <vertex(2)); std::cerr <<" / voisin " << &(*(fh->neighbor(2))); std::cerr <<"[" ; show_vertex(fh->neighbor(2)->vertex(0)); std::cerr <<"/" ; show_vertex(fh->neighbor(2)->vertex(1)); std::cerr <<"/" ; show_vertex(fh->neighbor(2)->vertex(2)); std::cerr <<"]" < void Triangulation_2:: file_output(std::ostream& os) const { _tds.file_output(os, infinite_vertex(), true); } template typename Triangulation_2::Vertex_handle Triangulation_2:: file_input(std::istream& is) { clear(); Vertex_handle v= _tds.file_input(is, true); set_infinite_vertex(v); return v; } template std::ostream& operator<<(std::ostream& os, const Triangulation_2 &tr) { tr.file_output(os); return os ; } template < class Gt, class Tds > std::istream& operator>>(std::istream& is, Triangulation_2 &tr) { tr.file_input(is); (CGAL::possibly(tr.is_valid())?(static_cast(0)): ::CGAL::assertion_fail( "tr.is_valid()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Triangulation_2.h", 3623)); return is; } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/grabbers.h" 1 # 25 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/grabbers.h" # 1 "/localhome/glisse2/include/boost/function_output_iterator.hpp" 1 # 16 "/localhome/glisse2/include/boost/function_output_iterator.hpp" namespace boost { template class function_output_iterator { typedef function_output_iterator self; public: typedef std::output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; explicit function_output_iterator() {} explicit function_output_iterator(const UnaryFunction& f) : m_f(f) {} struct output_proxy { output_proxy(UnaryFunction& f) : m_f(f) { } template output_proxy& operator=(const T& value) { m_f(value); return *this; } UnaryFunction& m_f; }; output_proxy operator*() { return output_proxy(m_f); } self& operator++() { return *this; } self& operator++(int) { return *this; } private: UnaryFunction m_f; }; template inline function_output_iterator make_function_output_iterator(const UnaryFunction& f = UnaryFunction()) { return function_output_iterator(f); } } # 26 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/grabbers.h" 2 namespace CGAL{ namespace internal{ template class Point_grabber{ output_iterator out; public: Point_grabber(output_iterator it):out(it){} void operator()(const typename Kernel::Point_2& p){ *out++=p; } void operator()(const typename Kernel::Segment_2& s){ *out++=s[0]; *out++=s[1]; } template void operator()(const CGAL::Polygon_2& p){ for(typename CGAL::Polygon_2::Vertex_iterator it= p.vertices_begin();it!=p.vertices_end();++it) *out++= *it; } }; template boost::function_output_iterator > point_grabber(output_iterator it){ return boost::make_function_output_iterator(Point_grabber(it)); } template class Segment_grabber{ output_iterator out; public: Segment_grabber(output_iterator it):out(it){} void operator()(const typename Kernel::Segment_2& s){ *out++=s; } template void operator()(const CGAL::Polygon_2& p){ for(typename CGAL::Polygon_2::Edge_const_iterator it=p.edges_begin();it!=p.edges_end();++it) *out++= *it; } }; template boost::function_output_iterator > segment_grabber(output_iterator it){ return boost::make_function_output_iterator(Segment_grabber(it)); } template class Wpoint_grabber{ output_iterator out; typedef CGAL::Weighted_point Self; public: Wpoint_grabber(output_iterator it):out(it){} void operator()(const Self& p){ *out++=p; } void operator()(const typename Kernel::Point_2& p){ *out++=Self(p,0); } void operator()(const typename Kernel::Circle_2& c){ *out++=Self(c.center(),c.squared_radius()); } void operator()(const typename Kernel::Segment_2& s){ *out++=Self(s[0],0); *out++=Self(s[1],0); } template void operator()(const CGAL::Polygon_2& p){ for(typename CGAL::Polygon_2::Vertex_iterator it=p.vertices_begin();it!=p.vertices_end();++it) *out++= Self(*it,0); } }; template boost::function_output_iterator > wpoint_grabber(output_iterator it){ return boost::make_function_output_iterator(Wpoint_grabber(it)); } } } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian.h" namespace CGAL { template < typename FT_, typename Kernel_ > struct Cartesian_base_ref_count : public Cartesian_base< Kernel_, FT_ > { typedef FT_ RT; typedef FT_ FT; template < typename T > struct Handle { typedef Handle_for type; }; template < typename Kernel2 > struct Base { typedef Cartesian_base_ref_count Type; }; typedef Kernel_ K; # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" 1 # 45 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Kernel/interface_macros.h" typedef CartesianKernelFunctors::Angle_2 Angle_2; Angle_2 angle_2_object() const { return Angle_2(); } typedef CartesianKernelFunctors::Angle_3 Angle_3; Angle_3 angle_3_object() const { return Angle_3(); } typedef CartesianKernelFunctors::Are_ordered_along_line_2 Are_ordered_along_line_2; Are_ordered_along_line_2 are_ordered_along_line_2_object() const { return Are_ordered_along_line_2(); } typedef CartesianKernelFunctors::Are_ordered_along_line_3 Are_ordered_along_line_3; Are_ordered_along_line_3 are_ordered_along_line_3_object() const { return Are_ordered_along_line_3(); } typedef CartesianKernelFunctors::Are_parallel_2 Are_parallel_2; Are_parallel_2 are_parallel_2_object() const { return Are_parallel_2(); } typedef CartesianKernelFunctors::Are_parallel_3 Are_parallel_3; Are_parallel_3 are_parallel_3_object() const { return Are_parallel_3(); } typedef CartesianKernelFunctors::Are_strictly_ordered_along_line_2 Are_strictly_ordered_along_line_2; Are_strictly_ordered_along_line_2 are_strictly_ordered_along_line_2_object() const { return Are_strictly_ordered_along_line_2(); } typedef CartesianKernelFunctors::Are_strictly_ordered_along_line_3 Are_strictly_ordered_along_line_3; Are_strictly_ordered_along_line_3 are_strictly_ordered_along_line_3_object() const { return Are_strictly_ordered_along_line_3(); } typedef CartesianKernelFunctors::Assign_2 Assign_2; Assign_2 assign_2_object() const { return Assign_2(); } typedef CartesianKernelFunctors::Assign_3 Assign_3; Assign_3 assign_3_object() const { return Assign_3(); } typedef CartesianKernelFunctors::Bounded_side_2 Bounded_side_2; Bounded_side_2 bounded_side_2_object() const { return Bounded_side_2(); } typedef CartesianKernelFunctors::Bounded_side_3 Bounded_side_3; Bounded_side_3 bounded_side_3_object() const { return Bounded_side_3(); } typedef CartesianKernelFunctors::Collinear_are_ordered_along_line_2 Collinear_are_ordered_along_line_2; Collinear_are_ordered_along_line_2 collinear_are_ordered_along_line_2_object() const { return Collinear_are_ordered_along_line_2(); } typedef CartesianKernelFunctors::Collinear_are_ordered_along_line_3 Collinear_are_ordered_along_line_3; Collinear_are_ordered_along_line_3 collinear_are_ordered_along_line_3_object() const { return Collinear_are_ordered_along_line_3(); } typedef CartesianKernelFunctors::Collinear_are_strictly_ordered_along_line_2 Collinear_are_strictly_ordered_along_line_2; Collinear_are_strictly_ordered_along_line_2 collinear_are_strictly_ordered_along_line_2_object() const { return Collinear_are_strictly_ordered_along_line_2(); } typedef CartesianKernelFunctors::Collinear_are_strictly_ordered_along_line_3 Collinear_are_strictly_ordered_along_line_3; Collinear_are_strictly_ordered_along_line_3 collinear_are_strictly_ordered_along_line_3_object() const { return Collinear_are_strictly_ordered_along_line_3(); } typedef CartesianKernelFunctors::Collinear_has_on_2 Collinear_has_on_2; Collinear_has_on_2 collinear_has_on_2_object() const { return Collinear_has_on_2(); } typedef CartesianKernelFunctors::Collinear_2 Collinear_2; Collinear_2 collinear_2_object() const { return Collinear_2(); } typedef CartesianKernelFunctors::Collinear_3 Collinear_3; Collinear_3 collinear_3_object() const { return Collinear_3(); } typedef CartesianKernelFunctors::Compare_angle_with_x_axis_2 Compare_angle_with_x_axis_2; Compare_angle_with_x_axis_2 compare_angle_with_x_axis_2_object() const { return Compare_angle_with_x_axis_2(); } typedef CartesianKernelFunctors::Compare_dihedral_angle_3 Compare_dihedral_angle_3; Compare_dihedral_angle_3 compare_dihedral_angle_3_object() const { return Compare_dihedral_angle_3(); } typedef CartesianKernelFunctors::Compare_distance_2 Compare_distance_2; Compare_distance_2 compare_distance_2_object() const { return Compare_distance_2(); } typedef CartesianKernelFunctors::Compare_distance_3 Compare_distance_3; Compare_distance_3 compare_distance_3_object() const { return Compare_distance_3(); } typedef CartesianKernelFunctors::Compare_slope_2 Compare_slope_2; Compare_slope_2 compare_slope_2_object() const { return Compare_slope_2(); } typedef CartesianKernelFunctors::Compare_squared_distance_2 Compare_squared_distance_2; Compare_squared_distance_2 compare_squared_distance_2_object() const { return Compare_squared_distance_2(); } typedef CartesianKernelFunctors::Compare_squared_distance_3 Compare_squared_distance_3; Compare_squared_distance_3 compare_squared_distance_3_object() const { return Compare_squared_distance_3(); } typedef CartesianKernelFunctors::Compare_squared_radius_3 Compare_squared_radius_3; Compare_squared_radius_3 compare_squared_radius_3_object() const { return Compare_squared_radius_3(); } typedef CartesianKernelFunctors::Compare_x_at_y_2 Compare_x_at_y_2; Compare_x_at_y_2 compare_x_at_y_2_object() const { return Compare_x_at_y_2(); } typedef CartesianKernelFunctors::Compare_xyz_3 Compare_xyz_3; Compare_xyz_3 compare_xyz_3_object() const { return Compare_xyz_3(); } typedef CartesianKernelFunctors::Compare_xy_2 Compare_xy_2; Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } typedef CartesianKernelFunctors::Compare_xy_3 Compare_xy_3; Compare_xy_3 compare_xy_3_object() const { return Compare_xy_3(); } typedef CartesianKernelFunctors::Compare_x_2 Compare_x_2; Compare_x_2 compare_x_2_object() const { return Compare_x_2(); } typedef CartesianKernelFunctors::Compare_x_3 Compare_x_3; Compare_x_3 compare_x_3_object() const { return Compare_x_3(); } typedef CartesianKernelFunctors::Compare_y_at_x_2 Compare_y_at_x_2; Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(); } typedef CartesianKernelFunctors::Compare_y_2 Compare_y_2; Compare_y_2 compare_y_2_object() const { return Compare_y_2(); } typedef CartesianKernelFunctors::Compare_y_3 Compare_y_3; Compare_y_3 compare_y_3_object() const { return Compare_y_3(); } typedef CartesianKernelFunctors::Compare_yx_2 Compare_yx_2; Compare_yx_2 compare_yx_2_object() const { return Compare_yx_2(); } typedef CartesianKernelFunctors::Compare_z_3 Compare_z_3; Compare_z_3 compare_z_3_object() const { return Compare_z_3(); } typedef CartesianKernelFunctors::Compute_a_2 Compute_a_2; Compute_a_2 compute_a_2_object() const { return Compute_a_2(); } typedef CartesianKernelFunctors::Compute_a_3 Compute_a_3; Compute_a_3 compute_a_3_object() const { return Compute_a_3(); } typedef CartesianKernelFunctors::Compute_b_2 Compute_b_2; Compute_b_2 compute_b_2_object() const { return Compute_b_2(); } typedef CartesianKernelFunctors::Compute_b_3 Compute_b_3; Compute_b_3 compute_b_3_object() const { return Compute_b_3(); } typedef CartesianKernelFunctors::Compute_c_2 Compute_c_2; Compute_c_2 compute_c_2_object() const { return Compute_c_2(); } typedef CartesianKernelFunctors::Compute_c_3 Compute_c_3; Compute_c_3 compute_c_3_object() const { return Compute_c_3(); } typedef CartesianKernelFunctors::Compute_d_3 Compute_d_3; Compute_d_3 compute_d_3_object() const { return Compute_d_3(); } typedef CartesianKernelFunctors::Compute_approximate_area_3 Compute_approximate_area_3; Compute_approximate_area_3 compute_approximate_area_3_object() const { return Compute_approximate_area_3(); } typedef CartesianKernelFunctors::Compute_approximate_squared_length_3 Compute_approximate_squared_length_3; Compute_approximate_squared_length_3 compute_approximate_squared_length_3_object() const { return Compute_approximate_squared_length_3(); } typedef CartesianKernelFunctors::Compute_area_2 Compute_area_2; Compute_area_2 compute_area_2_object() const { return Compute_area_2(); } typedef CartesianKernelFunctors::Compute_area_3 Compute_area_3; Compute_area_3 compute_area_3_object() const { return Compute_area_3(); } typedef CartesianKernelFunctors::Compute_area_divided_by_pi_3 Compute_area_divided_by_pi_3; Compute_area_divided_by_pi_3 compute_area_divided_by_pi_3_object() const { return Compute_area_divided_by_pi_3(); } typedef CartesianKernelFunctors::Compute_determinant_2 Compute_determinant_2; Compute_determinant_2 compute_determinant_2_object() const { return Compute_determinant_2(); } typedef CartesianKernelFunctors::Compute_determinant_3 Compute_determinant_3; Compute_determinant_3 compute_determinant_3_object() const { return Compute_determinant_3(); } typedef CartesianKernelFunctors::Compute_scalar_product_2 Compute_scalar_product_2; Compute_scalar_product_2 compute_scalar_product_2_object() const { return Compute_scalar_product_2(); } typedef CartesianKernelFunctors::Compute_scalar_product_3 Compute_scalar_product_3; Compute_scalar_product_3 compute_scalar_product_3_object() const { return Compute_scalar_product_3(); } typedef CartesianKernelFunctors::Compute_squared_area_3 Compute_squared_area_3; Compute_squared_area_3 compute_squared_area_3_object() const { return Compute_squared_area_3(); } typedef CartesianKernelFunctors::Compute_squared_distance_2 Compute_squared_distance_2; Compute_squared_distance_2 compute_squared_distance_2_object() const { return Compute_squared_distance_2(); } typedef CartesianKernelFunctors::Compute_squared_distance_3 Compute_squared_distance_3; Compute_squared_distance_3 compute_squared_distance_3_object() const { return Compute_squared_distance_3(); } typedef CartesianKernelFunctors::Compute_squared_length_2 Compute_squared_length_2; Compute_squared_length_2 compute_squared_length_2_object() const { return Compute_squared_length_2(); } typedef CartesianKernelFunctors::Compute_squared_length_3 Compute_squared_length_3; Compute_squared_length_3 compute_squared_length_3_object() const { return Compute_squared_length_3(); } typedef CartesianKernelFunctors::Compute_squared_length_divided_by_pi_square_3 Compute_squared_length_divided_by_pi_square_3; Compute_squared_length_divided_by_pi_square_3 compute_squared_length_divided_by_pi_square_3_object() const { return Compute_squared_length_divided_by_pi_square_3(); } typedef CartesianKernelFunctors::Compute_squared_radius_2 Compute_squared_radius_2; Compute_squared_radius_2 compute_squared_radius_2_object() const { return Compute_squared_radius_2(); } typedef CartesianKernelFunctors::Compute_squared_radius_3 Compute_squared_radius_3; Compute_squared_radius_3 compute_squared_radius_3_object() const { return Compute_squared_radius_3(); } typedef CartesianKernelFunctors::Compute_volume_3 Compute_volume_3; Compute_volume_3 compute_volume_3_object() const { return Compute_volume_3(); } typedef CartesianKernelFunctors::Compute_x_2 Compute_x_2; Compute_x_2 compute_x_2_object() const { return Compute_x_2(); } typedef CartesianKernelFunctors::Compute_x_3 Compute_x_3; Compute_x_3 compute_x_3_object() const { return Compute_x_3(); } typedef CartesianKernelFunctors::Compute_y_2 Compute_y_2; Compute_y_2 compute_y_2_object() const { return Compute_y_2(); } typedef CartesianKernelFunctors::Compute_y_3 Compute_y_3; Compute_y_3 compute_y_3_object() const { return Compute_y_3(); } typedef CartesianKernelFunctors::Compute_z_3 Compute_z_3; Compute_z_3 compute_z_3_object() const { return Compute_z_3(); } typedef CartesianKernelFunctors::Compute_dx_2 Compute_dx_2; Compute_dx_2 compute_dx_2_object() const { return Compute_dx_2(); } typedef CartesianKernelFunctors::Compute_dx_3 Compute_dx_3; Compute_dx_3 compute_dx_3_object() const { return Compute_dx_3(); } typedef CartesianKernelFunctors::Compute_dy_2 Compute_dy_2; Compute_dy_2 compute_dy_2_object() const { return Compute_dy_2(); } typedef CartesianKernelFunctors::Compute_dy_3 Compute_dy_3; Compute_dy_3 compute_dy_3_object() const { return Compute_dy_3(); } typedef CartesianKernelFunctors::Compute_dz_3 Compute_dz_3; Compute_dz_3 compute_dz_3_object() const { return Compute_dz_3(); } typedef CartesianKernelFunctors::Compute_hx_2 Compute_hx_2; Compute_hx_2 compute_hx_2_object() const { return Compute_hx_2(); } typedef CartesianKernelFunctors::Compute_hx_3 Compute_hx_3; Compute_hx_3 compute_hx_3_object() const { return Compute_hx_3(); } typedef CartesianKernelFunctors::Compute_hy_2 Compute_hy_2; Compute_hy_2 compute_hy_2_object() const { return Compute_hy_2(); } typedef CartesianKernelFunctors::Compute_hy_3 Compute_hy_3; Compute_hy_3 compute_hy_3_object() const { return Compute_hy_3(); } typedef CartesianKernelFunctors::Compute_hz_3 Compute_hz_3; Compute_hz_3 compute_hz_3_object() const { return Compute_hz_3(); } typedef CartesianKernelFunctors::Compute_hw_2 Compute_hw_2; Compute_hw_2 compute_hw_2_object() const { return Compute_hw_2(); } typedef CartesianKernelFunctors::Compute_hw_3 Compute_hw_3; Compute_hw_3 compute_hw_3_object() const { return Compute_hw_3(); } typedef CartesianKernelFunctors::Compute_x_at_y_2 Compute_x_at_y_2; Compute_x_at_y_2 compute_x_at_y_2_object() const { return Compute_x_at_y_2(); } typedef CartesianKernelFunctors::Compute_y_at_x_2 Compute_y_at_x_2; Compute_y_at_x_2 compute_y_at_x_2_object() const { return Compute_y_at_x_2(); } typedef CartesianKernelFunctors::Compute_xmin_2 Compute_xmin_2; Compute_xmin_2 compute_xmin_2_object() const { return Compute_xmin_2(); } typedef CartesianKernelFunctors::Compute_xmax_2 Compute_xmax_2; Compute_xmax_2 compute_xmax_2_object() const { return Compute_xmax_2(); } typedef CartesianKernelFunctors::Compute_ymin_2 Compute_ymin_2; Compute_ymin_2 compute_ymin_2_object() const { return Compute_ymin_2(); } typedef CartesianKernelFunctors::Compute_ymax_2 Compute_ymax_2; Compute_ymax_2 compute_ymax_2_object() const { return Compute_ymax_2(); } typedef CartesianKernelFunctors::Compute_xmin_3 Compute_xmin_3; Compute_xmin_3 compute_xmin_3_object() const { return Compute_xmin_3(); } typedef CartesianKernelFunctors::Compute_xmax_3 Compute_xmax_3; Compute_xmax_3 compute_xmax_3_object() const { return Compute_xmax_3(); } typedef CartesianKernelFunctors::Compute_ymin_3 Compute_ymin_3; Compute_ymin_3 compute_ymin_3_object() const { return Compute_ymin_3(); } typedef CartesianKernelFunctors::Compute_ymax_3 Compute_ymax_3; Compute_ymax_3 compute_ymax_3_object() const { return Compute_ymax_3(); } typedef CartesianKernelFunctors::Compute_zmin_3 Compute_zmin_3; Compute_zmin_3 compute_zmin_3_object() const { return Compute_zmin_3(); } typedef CartesianKernelFunctors::Compute_zmax_3 Compute_zmax_3; Compute_zmax_3 compute_zmax_3_object() const { return Compute_zmax_3(); } typedef CartesianKernelFunctors::Construct_barycenter_2 Construct_barycenter_2; Construct_barycenter_2 construct_barycenter_2_object() const { return Construct_barycenter_2(); } typedef CartesianKernelFunctors::Construct_barycenter_3 Construct_barycenter_3; Construct_barycenter_3 construct_barycenter_3_object() const { return Construct_barycenter_3(); } typedef CartesianKernelFunctors::Construct_base_vector_3 Construct_base_vector_3; Construct_base_vector_3 construct_base_vector_3_object() const { return Construct_base_vector_3(); } typedef CartesianKernelFunctors::Construct_bisector_2 Construct_bisector_2; Construct_bisector_2 construct_bisector_2_object() const { return Construct_bisector_2(); } typedef CartesianKernelFunctors::Construct_bisector_3 Construct_bisector_3; Construct_bisector_3 construct_bisector_3_object() const { return Construct_bisector_3(); } typedef CartesianKernelFunctors::Construct_center_2 Construct_center_2; Construct_center_2 construct_center_2_object() const { return Construct_center_2(); } typedef CartesianKernelFunctors::Construct_center_3 Construct_center_3; Construct_center_3 construct_center_3_object() const { return Construct_center_3(); } typedef CartesianKernelFunctors::Construct_centroid_2 Construct_centroid_2; Construct_centroid_2 construct_centroid_2_object() const { return Construct_centroid_2(); } typedef CartesianKernelFunctors::Construct_centroid_3 Construct_centroid_3; Construct_centroid_3 construct_centroid_3_object() const { return Construct_centroid_3(); } typedef CartesianKernelFunctors::Construct_circle_2 Construct_circle_2; Construct_circle_2 construct_circle_2_object() const { return Construct_circle_2(); } typedef CartesianKernelFunctors::Construct_circle_3 Construct_circle_3; Construct_circle_3 construct_circle_3_object() const { return Construct_circle_3(); } typedef CartesianKernelFunctors::Construct_circumcenter_2 Construct_circumcenter_2; Construct_circumcenter_2 construct_circumcenter_2_object() const { return Construct_circumcenter_2(); } typedef CartesianKernelFunctors::Construct_circumcenter_3 Construct_circumcenter_3; Construct_circumcenter_3 construct_circumcenter_3_object() const { return Construct_circumcenter_3(); } typedef CartesianKernelFunctors::Construct_cross_product_vector_3 Construct_cross_product_vector_3; Construct_cross_product_vector_3 construct_cross_product_vector_3_object() const { return Construct_cross_product_vector_3(); } typedef CartesianKernelFunctors::Construct_direction_2 Construct_direction_2; Construct_direction_2 construct_direction_2_object() const { return Construct_direction_2(); } typedef CartesianKernelFunctors::Construct_direction_3 Construct_direction_3; Construct_direction_3 construct_direction_3_object() const { return Construct_direction_3(); } typedef CartesianKernelFunctors::Construct_equidistant_line_3 Construct_equidistant_line_3; Construct_equidistant_line_3 construct_equidistant_line_3_object() const { return Construct_equidistant_line_3(); } typedef CartesianKernelFunctors::Construct_iso_cuboid_3 Construct_iso_cuboid_3; Construct_iso_cuboid_3 construct_iso_cuboid_3_object() const { return Construct_iso_cuboid_3(); } typedef CartesianKernelFunctors::Construct_iso_rectangle_2 Construct_iso_rectangle_2; Construct_iso_rectangle_2 construct_iso_rectangle_2_object() const { return Construct_iso_rectangle_2(); } typedef CartesianKernelFunctors::Construct_lifted_point_3 Construct_lifted_point_3; Construct_lifted_point_3 construct_lifted_point_3_object() const { return Construct_lifted_point_3(); } typedef CartesianKernelFunctors::Construct_line_2 Construct_line_2; Construct_line_2 construct_line_2_object() const { return Construct_line_2(); } typedef CartesianKernelFunctors::Construct_line_3 Construct_line_3; Construct_line_3 construct_line_3_object() const { return Construct_line_3(); } typedef CartesianKernelFunctors::Construct_midpoint_2 Construct_midpoint_2; Construct_midpoint_2 construct_midpoint_2_object() const { return Construct_midpoint_2(); } typedef CartesianKernelFunctors::Construct_midpoint_3 Construct_midpoint_3; Construct_midpoint_3 construct_midpoint_3_object() const { return Construct_midpoint_3(); } typedef CartesianKernelFunctors::Construct_min_vertex_2 Construct_min_vertex_2; Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(); } typedef CartesianKernelFunctors::Construct_max_vertex_2 Construct_max_vertex_2; Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(); } typedef CartesianKernelFunctors::Construct_min_vertex_3 Construct_min_vertex_3; Construct_min_vertex_3 construct_min_vertex_3_object() const { return Construct_min_vertex_3(); } typedef CartesianKernelFunctors::Construct_max_vertex_3 Construct_max_vertex_3; Construct_max_vertex_3 construct_max_vertex_3_object() const { return Construct_max_vertex_3(); } typedef CartesianKernelFunctors::Construct_normal_3 Construct_normal_3; Construct_normal_3 construct_normal_3_object() const { return Construct_normal_3(); } typedef CartesianKernelFunctors::Construct_object_2 Construct_object_2; Construct_object_2 construct_object_2_object() const { return Construct_object_2(); } typedef CartesianKernelFunctors::Construct_object_3 Construct_object_3; Construct_object_3 construct_object_3_object() const { return Construct_object_3(); } typedef CartesianKernelFunctors::Construct_opposite_circle_2 Construct_opposite_circle_2; Construct_opposite_circle_2 construct_opposite_circle_2_object() const { return Construct_opposite_circle_2(); } typedef CartesianKernelFunctors::Construct_opposite_direction_2 Construct_opposite_direction_2; Construct_opposite_direction_2 construct_opposite_direction_2_object() const { return Construct_opposite_direction_2(); } typedef CartesianKernelFunctors::Construct_opposite_direction_3 Construct_opposite_direction_3; Construct_opposite_direction_3 construct_opposite_direction_3_object() const { return Construct_opposite_direction_3(); } typedef CartesianKernelFunctors::Construct_opposite_line_2 Construct_opposite_line_2; Construct_opposite_line_2 construct_opposite_line_2_object() const { return Construct_opposite_line_2(); } typedef CartesianKernelFunctors::Construct_opposite_line_3 Construct_opposite_line_3; Construct_opposite_line_3 construct_opposite_line_3_object() const { return Construct_opposite_line_3(); } typedef CartesianKernelFunctors::Construct_opposite_plane_3 Construct_opposite_plane_3; Construct_opposite_plane_3 construct_opposite_plane_3_object() const { return Construct_opposite_plane_3(); } typedef CartesianKernelFunctors::Construct_opposite_ray_2 Construct_opposite_ray_2; Construct_opposite_ray_2 construct_opposite_ray_2_object() const { return Construct_opposite_ray_2(); } typedef CartesianKernelFunctors::Construct_opposite_ray_3 Construct_opposite_ray_3; Construct_opposite_ray_3 construct_opposite_ray_3_object() const { return Construct_opposite_ray_3(); } typedef CartesianKernelFunctors::Construct_opposite_segment_2 Construct_opposite_segment_2; Construct_opposite_segment_2 construct_opposite_segment_2_object() const { return Construct_opposite_segment_2(); } typedef CartesianKernelFunctors::Construct_opposite_segment_3 Construct_opposite_segment_3; Construct_opposite_segment_3 construct_opposite_segment_3_object() const { return Construct_opposite_segment_3(); } typedef CartesianKernelFunctors::Construct_opposite_sphere_3 Construct_opposite_sphere_3; Construct_opposite_sphere_3 construct_opposite_sphere_3_object() const { return Construct_opposite_sphere_3(); } typedef CartesianKernelFunctors::Construct_opposite_triangle_2 Construct_opposite_triangle_2; Construct_opposite_triangle_2 construct_opposite_triangle_2_object() const { return Construct_opposite_triangle_2(); } typedef CartesianKernelFunctors::Construct_opposite_vector_2 Construct_opposite_vector_2; Construct_opposite_vector_2 construct_opposite_vector_2_object() const { return Construct_opposite_vector_2(); } typedef CartesianKernelFunctors::Construct_difference_of_vectors_2 Construct_difference_of_vectors_2; Construct_difference_of_vectors_2 construct_difference_of_vectors_2_object() const { return Construct_difference_of_vectors_2(); } typedef CartesianKernelFunctors::Construct_difference_of_vectors_3 Construct_difference_of_vectors_3; Construct_difference_of_vectors_3 construct_difference_of_vectors_3_object() const { return Construct_difference_of_vectors_3(); } typedef CartesianKernelFunctors::Construct_sum_of_vectors_2 Construct_sum_of_vectors_2; Construct_sum_of_vectors_2 construct_sum_of_vectors_2_object() const { return Construct_sum_of_vectors_2(); } typedef CartesianKernelFunctors::Construct_sum_of_vectors_3 Construct_sum_of_vectors_3; Construct_sum_of_vectors_3 construct_sum_of_vectors_3_object() const { return Construct_sum_of_vectors_3(); } typedef CartesianKernelFunctors::Construct_opposite_vector_3 Construct_opposite_vector_3; Construct_opposite_vector_3 construct_opposite_vector_3_object() const { return Construct_opposite_vector_3(); } typedef CartesianKernelFunctors::Construct_orthogonal_vector_3 Construct_orthogonal_vector_3; Construct_orthogonal_vector_3 construct_orthogonal_vector_3_object() const { return Construct_orthogonal_vector_3(); } typedef CartesianKernelFunctors::Construct_perpendicular_direction_2 Construct_perpendicular_direction_2; Construct_perpendicular_direction_2 construct_perpendicular_direction_2_object() const { return Construct_perpendicular_direction_2(); } typedef CartesianKernelFunctors::Construct_perpendicular_line_2 Construct_perpendicular_line_2; Construct_perpendicular_line_2 construct_perpendicular_line_2_object() const { return Construct_perpendicular_line_2(); } typedef CartesianKernelFunctors::Construct_perpendicular_line_3 Construct_perpendicular_line_3; Construct_perpendicular_line_3 construct_perpendicular_line_3_object() const { return Construct_perpendicular_line_3(); } typedef CartesianKernelFunctors::Construct_perpendicular_plane_3 Construct_perpendicular_plane_3; Construct_perpendicular_plane_3 construct_perpendicular_plane_3_object() const { return Construct_perpendicular_plane_3(); } typedef CartesianKernelFunctors::Construct_perpendicular_vector_2 Construct_perpendicular_vector_2; Construct_perpendicular_vector_2 construct_perpendicular_vector_2_object() const { return Construct_perpendicular_vector_2(); } typedef CartesianKernelFunctors::Construct_plane_3 Construct_plane_3; Construct_plane_3 construct_plane_3_object() const { return Construct_plane_3(); } typedef CartesianKernelFunctors::Construct_point_on_2 Construct_point_on_2; Construct_point_on_2 construct_point_on_2_object() const { return Construct_point_on_2(); } typedef CartesianKernelFunctors::Construct_point_on_3 Construct_point_on_3; Construct_point_on_3 construct_point_on_3_object() const { return Construct_point_on_3(); } typedef CartesianKernelFunctors::Construct_point_2 Construct_point_2; Construct_point_2 construct_point_2_object() const { return Construct_point_2(); } typedef CartesianKernelFunctors::Construct_point_3 Construct_point_3; Construct_point_3 construct_point_3_object() const { return Construct_point_3(); } typedef CartesianKernelFunctors::Construct_projected_point_2 Construct_projected_point_2; Construct_projected_point_2 construct_projected_point_2_object() const { return Construct_projected_point_2(); } typedef CartesianKernelFunctors::Construct_projected_point_3 Construct_projected_point_3; Construct_projected_point_3 construct_projected_point_3_object() const { return Construct_projected_point_3(); } typedef CartesianKernelFunctors::Construct_projected_xy_point_2 Construct_projected_xy_point_2; Construct_projected_xy_point_2 construct_projected_xy_point_2_object() const { return Construct_projected_xy_point_2(); } typedef CartesianKernelFunctors::Construct_radical_line_2 Construct_radical_line_2; Construct_radical_line_2 construct_radical_line_2_object() const { return Construct_radical_line_2(); } typedef CartesianKernelFunctors::Construct_radical_plane_3 Construct_radical_plane_3; Construct_radical_plane_3 construct_radical_plane_3_object() const { return Construct_radical_plane_3(); } typedef CartesianKernelFunctors::Construct_ray_2 Construct_ray_2; Construct_ray_2 construct_ray_2_object() const { return Construct_ray_2(); } typedef CartesianKernelFunctors::Construct_ray_3 Construct_ray_3; Construct_ray_3 construct_ray_3_object() const { return Construct_ray_3(); } typedef CartesianKernelFunctors::Construct_scaled_vector_2 Construct_scaled_vector_2; Construct_scaled_vector_2 construct_scaled_vector_2_object() const { return Construct_scaled_vector_2(); } typedef CartesianKernelFunctors::Construct_divided_vector_2 Construct_divided_vector_2; Construct_divided_vector_2 construct_divided_vector_2_object() const { return Construct_divided_vector_2(); } typedef CartesianKernelFunctors::Construct_divided_vector_3 Construct_divided_vector_3; Construct_divided_vector_3 construct_divided_vector_3_object() const { return Construct_divided_vector_3(); } typedef CartesianKernelFunctors::Construct_scaled_vector_3 Construct_scaled_vector_3; Construct_scaled_vector_3 construct_scaled_vector_3_object() const { return Construct_scaled_vector_3(); } typedef CartesianKernelFunctors::Construct_second_point_2 Construct_second_point_2; Construct_second_point_2 construct_second_point_2_object() const { return Construct_second_point_2(); } typedef CartesianKernelFunctors::Construct_second_point_3 Construct_second_point_3; Construct_second_point_3 construct_second_point_3_object() const { return Construct_second_point_3(); } typedef CartesianKernelFunctors::Construct_segment_2 Construct_segment_2; Construct_segment_2 construct_segment_2_object() const { return Construct_segment_2(); } typedef CartesianKernelFunctors::Construct_segment_3 Construct_segment_3; Construct_segment_3 construct_segment_3_object() const { return Construct_segment_3(); } typedef CartesianKernelFunctors::Construct_source_2 Construct_source_2; Construct_source_2 construct_source_2_object() const { return Construct_source_2(); } typedef CartesianKernelFunctors::Construct_source_3 Construct_source_3; Construct_source_3 construct_source_3_object() const { return Construct_source_3(); } typedef CartesianKernelFunctors::Construct_sphere_3 Construct_sphere_3; Construct_sphere_3 construct_sphere_3_object() const { return Construct_sphere_3(); } typedef CartesianKernelFunctors::Construct_supporting_plane_3 Construct_supporting_plane_3; Construct_supporting_plane_3 construct_supporting_plane_3_object() const { return Construct_supporting_plane_3(); } typedef CartesianKernelFunctors::Construct_target_2 Construct_target_2; Construct_target_2 construct_target_2_object() const { return Construct_target_2(); } typedef CartesianKernelFunctors::Construct_target_3 Construct_target_3; Construct_target_3 construct_target_3_object() const { return Construct_target_3(); } typedef CartesianKernelFunctors::Construct_tetrahedron_3 Construct_tetrahedron_3; Construct_tetrahedron_3 construct_tetrahedron_3_object() const { return Construct_tetrahedron_3(); } typedef CartesianKernelFunctors::Construct_translated_point_2 Construct_translated_point_2; Construct_translated_point_2 construct_translated_point_2_object() const { return Construct_translated_point_2(); } typedef CartesianKernelFunctors::Construct_translated_point_3 Construct_translated_point_3; Construct_translated_point_3 construct_translated_point_3_object() const { return Construct_translated_point_3(); } typedef CartesianKernelFunctors::Construct_triangle_2 Construct_triangle_2; Construct_triangle_2 construct_triangle_2_object() const { return Construct_triangle_2(); } typedef CartesianKernelFunctors::Construct_triangle_3 Construct_triangle_3; Construct_triangle_3 construct_triangle_3_object() const { return Construct_triangle_3(); } typedef CartesianKernelFunctors::Construct_unit_normal_3 Construct_unit_normal_3; Construct_unit_normal_3 construct_unit_normal_3_object() const { return Construct_unit_normal_3(); } typedef CartesianKernelFunctors::Construct_vector_2 Construct_vector_2; Construct_vector_2 construct_vector_2_object() const { return Construct_vector_2(); } typedef CartesianKernelFunctors::Construct_vector_3 Construct_vector_3; Construct_vector_3 construct_vector_3_object() const { return Construct_vector_3(); } typedef CartesianKernelFunctors::Construct_vertex_2 Construct_vertex_2; Construct_vertex_2 construct_vertex_2_object() const { return Construct_vertex_2(); } typedef CartesianKernelFunctors::Construct_vertex_3 Construct_vertex_3; Construct_vertex_3 construct_vertex_3_object() const { return Construct_vertex_3(); } typedef CartesianKernelFunctors::Construct_bbox_2 Construct_bbox_2; Construct_bbox_2 construct_bbox_2_object() const { return Construct_bbox_2(); } typedef CartesianKernelFunctors::Construct_bbox_3 Construct_bbox_3; Construct_bbox_3 construct_bbox_3_object() const { return Construct_bbox_3(); } typedef CartesianKernelFunctors::Construct_cartesian_const_iterator_2 Construct_cartesian_const_iterator_2; Construct_cartesian_const_iterator_2 construct_cartesian_const_iterator_2_object() const { return Construct_cartesian_const_iterator_2(); } typedef CartesianKernelFunctors::Construct_cartesian_const_iterator_3 Construct_cartesian_const_iterator_3; Construct_cartesian_const_iterator_3 construct_cartesian_const_iterator_3_object() const { return Construct_cartesian_const_iterator_3(); } typedef CartesianKernelFunctors::Coplanar_orientation_3 Coplanar_orientation_3; Coplanar_orientation_3 coplanar_orientation_3_object() const { return Coplanar_orientation_3(); } typedef CartesianKernelFunctors::Coplanar_side_of_bounded_circle_3 Coplanar_side_of_bounded_circle_3; Coplanar_side_of_bounded_circle_3 coplanar_side_of_bounded_circle_3_object() const { return Coplanar_side_of_bounded_circle_3(); } typedef CartesianKernelFunctors::Coplanar_3 Coplanar_3; Coplanar_3 coplanar_3_object() const { return Coplanar_3(); } typedef CartesianKernelFunctors::Counterclockwise_in_between_2 Counterclockwise_in_between_2; Counterclockwise_in_between_2 counterclockwise_in_between_2_object() const { return Counterclockwise_in_between_2(); } typedef CartesianKernelFunctors::Do_intersect_2 Do_intersect_2; Do_intersect_2 do_intersect_2_object() const { return Do_intersect_2(); } typedef CartesianKernelFunctors::Do_intersect_3 Do_intersect_3; Do_intersect_3 do_intersect_3_object() const { return Do_intersect_3(); } typedef CartesianKernelFunctors::Equal_xy_3 Equal_xy_3; Equal_xy_3 equal_xy_3_object() const { return Equal_xy_3(); } typedef CartesianKernelFunctors::Equal_x_2 Equal_x_2; Equal_x_2 equal_x_2_object() const { return Equal_x_2(); } typedef CartesianKernelFunctors::Equal_x_3 Equal_x_3; Equal_x_3 equal_x_3_object() const { return Equal_x_3(); } typedef CartesianKernelFunctors::Equal_y_2 Equal_y_2; Equal_y_2 equal_y_2_object() const { return Equal_y_2(); } typedef CartesianKernelFunctors::Equal_y_3 Equal_y_3; Equal_y_3 equal_y_3_object() const { return Equal_y_3(); } typedef CartesianKernelFunctors::Equal_z_3 Equal_z_3; Equal_z_3 equal_z_3_object() const { return Equal_z_3(); } typedef CartesianKernelFunctors::Equal_2 Equal_2; Equal_2 equal_2_object() const { return Equal_2(); } typedef CartesianKernelFunctors::Equal_3 Equal_3; Equal_3 equal_3_object() const { return Equal_3(); } typedef CartesianKernelFunctors::Has_on_boundary_2 Has_on_boundary_2; Has_on_boundary_2 has_on_boundary_2_object() const { return Has_on_boundary_2(); } typedef CartesianKernelFunctors::Has_on_boundary_3 Has_on_boundary_3; Has_on_boundary_3 has_on_boundary_3_object() const { return Has_on_boundary_3(); } typedef CartesianKernelFunctors::Has_on_bounded_side_2 Has_on_bounded_side_2; Has_on_bounded_side_2 has_on_bounded_side_2_object() const { return Has_on_bounded_side_2(); } typedef CartesianKernelFunctors::Has_on_bounded_side_3 Has_on_bounded_side_3; Has_on_bounded_side_3 has_on_bounded_side_3_object() const { return Has_on_bounded_side_3(); } typedef CartesianKernelFunctors::Has_on_negative_side_2 Has_on_negative_side_2; Has_on_negative_side_2 has_on_negative_side_2_object() const { return Has_on_negative_side_2(); } typedef CartesianKernelFunctors::Has_on_negative_side_3 Has_on_negative_side_3; Has_on_negative_side_3 has_on_negative_side_3_object() const { return Has_on_negative_side_3(); } typedef CartesianKernelFunctors::Has_on_positive_side_2 Has_on_positive_side_2; Has_on_positive_side_2 has_on_positive_side_2_object() const { return Has_on_positive_side_2(); } typedef CartesianKernelFunctors::Has_on_positive_side_3 Has_on_positive_side_3; Has_on_positive_side_3 has_on_positive_side_3_object() const { return Has_on_positive_side_3(); } typedef CartesianKernelFunctors::Has_on_unbounded_side_2 Has_on_unbounded_side_2; Has_on_unbounded_side_2 has_on_unbounded_side_2_object() const { return Has_on_unbounded_side_2(); } typedef CartesianKernelFunctors::Has_on_unbounded_side_3 Has_on_unbounded_side_3; Has_on_unbounded_side_3 has_on_unbounded_side_3_object() const { return Has_on_unbounded_side_3(); } typedef CartesianKernelFunctors::Has_on_2 Has_on_2; Has_on_2 has_on_2_object() const { return Has_on_2(); } typedef CartesianKernelFunctors::Has_on_3 Has_on_3; Has_on_3 has_on_3_object() const { return Has_on_3(); } typedef CartesianKernelFunctors::Intersect_2 Intersect_2; Intersect_2 intersect_2_object() const { return Intersect_2(); } typedef CartesianKernelFunctors::Intersect_3 Intersect_3; Intersect_3 intersect_3_object() const { return Intersect_3(); } typedef CartesianKernelFunctors::Is_degenerate_2 Is_degenerate_2; Is_degenerate_2 is_degenerate_2_object() const { return Is_degenerate_2(); } typedef CartesianKernelFunctors::Is_degenerate_3 Is_degenerate_3; Is_degenerate_3 is_degenerate_3_object() const { return Is_degenerate_3(); } typedef CartesianKernelFunctors::Is_horizontal_2 Is_horizontal_2; Is_horizontal_2 is_horizontal_2_object() const { return Is_horizontal_2(); } typedef CartesianKernelFunctors::Is_vertical_2 Is_vertical_2; Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } typedef CartesianKernelFunctors::Left_turn_2 Left_turn_2; Left_turn_2 left_turn_2_object() const { return Left_turn_2(); } typedef CartesianKernelFunctors::Less_distance_to_point_2 Less_distance_to_point_2; Less_distance_to_point_2 less_distance_to_point_2_object() const { return Less_distance_to_point_2(); } typedef CartesianKernelFunctors::Less_distance_to_point_3 Less_distance_to_point_3; Less_distance_to_point_3 less_distance_to_point_3_object() const { return Less_distance_to_point_3(); } typedef CartesianKernelFunctors::Less_rotate_ccw_2 Less_rotate_ccw_2; Less_rotate_ccw_2 less_rotate_ccw_2_object() const { return Less_rotate_ccw_2(); } typedef CartesianKernelFunctors::Less_signed_distance_to_line_2 Less_signed_distance_to_line_2; Less_signed_distance_to_line_2 less_signed_distance_to_line_2_object() const { return Less_signed_distance_to_line_2(); } typedef CartesianKernelFunctors::Less_signed_distance_to_plane_3 Less_signed_distance_to_plane_3; Less_signed_distance_to_plane_3 less_signed_distance_to_plane_3_object() const { return Less_signed_distance_to_plane_3(); } typedef CartesianKernelFunctors::Less_xyz_3 Less_xyz_3; Less_xyz_3 less_xyz_3_object() const { return Less_xyz_3(); } typedef CartesianKernelFunctors::Less_xy_2 Less_xy_2; Less_xy_2 less_xy_2_object() const { return Less_xy_2(); } typedef CartesianKernelFunctors::Less_xy_3 Less_xy_3; Less_xy_3 less_xy_3_object() const { return Less_xy_3(); } typedef CartesianKernelFunctors::Less_x_2 Less_x_2; Less_x_2 less_x_2_object() const { return Less_x_2(); } typedef CartesianKernelFunctors::Less_x_3 Less_x_3; Less_x_3 less_x_3_object() const { return Less_x_3(); } typedef CartesianKernelFunctors::Less_yx_2 Less_yx_2; Less_yx_2 less_yx_2_object() const { return Less_yx_2(); } typedef CartesianKernelFunctors::Less_y_2 Less_y_2; Less_y_2 less_y_2_object() const { return Less_y_2(); } typedef CartesianKernelFunctors::Less_y_3 Less_y_3; Less_y_3 less_y_3_object() const { return Less_y_3(); } typedef CartesianKernelFunctors::Less_z_3 Less_z_3; Less_z_3 less_z_3_object() const { return Less_z_3(); } typedef CartesianKernelFunctors::Orientation_2 Orientation_2; Orientation_2 orientation_2_object() const { return Orientation_2(); } typedef CartesianKernelFunctors::Orientation_3 Orientation_3; Orientation_3 orientation_3_object() const { return Orientation_3(); } typedef CartesianKernelFunctors::Oriented_side_2 Oriented_side_2; Oriented_side_2 oriented_side_2_object() const { return Oriented_side_2(); } typedef CartesianKernelFunctors::Oriented_side_3 Oriented_side_3; Oriented_side_3 oriented_side_3_object() const { return Oriented_side_3(); } typedef CartesianKernelFunctors::Side_of_bounded_circle_2 Side_of_bounded_circle_2; Side_of_bounded_circle_2 side_of_bounded_circle_2_object() const { return Side_of_bounded_circle_2(); } typedef CartesianKernelFunctors::Side_of_bounded_sphere_3 Side_of_bounded_sphere_3; Side_of_bounded_sphere_3 side_of_bounded_sphere_3_object() const { return Side_of_bounded_sphere_3(); } typedef CartesianKernelFunctors::Side_of_oriented_circle_2 Side_of_oriented_circle_2; Side_of_oriented_circle_2 side_of_oriented_circle_2_object() const { return Side_of_oriented_circle_2(); } typedef CartesianKernelFunctors::Side_of_oriented_sphere_3 Side_of_oriented_sphere_3; Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const { return Side_of_oriented_sphere_3(); } # 55 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Cartesian.h" 2 }; template < typename FT_ > struct Cartesian : public Type_equality_wrapper< Cartesian_base_ref_count >, Cartesian > {}; } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits.h" 1 # 27 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Quotient.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits.h" 2 namespace CGAL { template < typename NT > struct Root_of_traits; template < class NT > inline typename Root_of_traits< NT >::Root_of_2 make_root_of_2(const NT &a, const NT &b, const NT &c) { typename Root_of_traits::Make_root_of_2 make_root_of_2; return make_root_of_2(a,b,c); } template < class NT > inline typename Root_of_traits< NT >::Root_of_2 make_root_of_2(const NT &a, const NT &b, const NT &c,const bool smaller) { typename Root_of_traits::Make_root_of_2 make_root_of_2; return make_root_of_2(a,b,c,smaller); } template < class NT > inline typename Root_of_traits< NT >::Root_of_2 make_sqrt(const NT &a) { typename Root_of_traits::Make_sqrt make_sqrt; return make_sqrt(a); } template < class NT , class OutputIterator> inline OutputIterator compute_roots_of_2(const NT &a_, const NT &b_, const NT &c_, OutputIterator oit) { typedef typename Root_of_traits::Root_of_1 Root_of_1; typedef typename Root_of_traits::Root_of_2 Root_of_2; typename CGAL::Coercion_traits::Cast cast; Root_of_1 a(cast(a_)), b(cast(b_)), c(cast(c_)); if ( a != 0 ) { Root_of_1 a0_ (-b/(2*a)); Root_of_1 root_(::CGAL:: square(a0_) - c/a); switch(CGAL::sign(root_)){ case CGAL::NEGATIVE: return oit; case CGAL::ZERO: *oit++ = Root_of_2(a0_); return oit; default: *oit++ = make_root_of_2(a0_,Root_of_1(-1),root_); *oit++ = make_root_of_2(a0_,Root_of_1( 1),root_); return oit; } } else { *oit++ = -c/b; return oit; } } namespace internal { template< typename T, typename fallback_ = boost::mpl::bool_ > struct Has_typedef_Arithmetic_kernel { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; template >::value> struct Get_rational_type{ typedef Quotient type; }; template struct Get_rational_type{ typedef typename Get_arithmetic_kernel::Arithmetic_kernel::Rational type; }; template < typename NT, class Algebraic_category> struct Root_of_traits_helper{ typedef typename Get_rational_type::type Root_of_1; typedef CGAL::Sqrt_extension Root_of_2; struct Make_root_of_2{ typedef Root_of_2 result_type; Root_of_2 operator()(const NT& a, const NT& b, const NT& c) const { return Root_of_2(a,b,c); } Root_of_2 operator()(const NT& a, const NT& b, const NT& c, bool s) const { return Root_of_2(a,b,c,s); } Root_of_2 operator()(const Root_of_1& a, const Root_of_1& b, const Root_of_1& c) const { return Root_of_2(a,b,c); } Root_of_2 operator()(const Root_of_1& a, const Root_of_1& b, const Root_of_1& c, bool s) const { return Root_of_2(a,b,c,s); } }; private: typedef CGAL::Algebraic_structure_traits AST; public: typedef typename AST::Square Square; typedef typename AST::Inverse Inverse; struct Make_sqrt { typedef Root_of_2 result_type; Root_of_2 operator()(const NT& x) const { return Root_of_2(x,true); } }; }; template < typename FT> struct Root_of_traits_helper < FT, Field_tag > { typedef FT Root_of_1; private: typedef Fraction_traits FrT; typedef typename FrT::Is_fraction ISF; static_assert((ISF::value), "(ISF::value)"); typedef typename FrT::Numerator_type RT; typedef typename FrT::Decompose Decompose; public: typedef CGAL::Sqrt_extension Root_of_2; struct Make_root_of_2{ typedef Root_of_2 result_type; Root_of_2 operator()(const FT& a, const FT& b, const FT& c) const { return Root_of_2(a,b,c); } Root_of_2 operator()(const FT& a, const FT& b, const FT& c, bool smaller) const { Decompose decompose; RT a_num,b_num,c_num; RT a_den,b_den,c_den; decompose(a,a_num,a_den); decompose(b,b_num,b_den); decompose(c,c_num,c_den); RT a_ = a_num * b_den * c_den; RT b_ = b_num * a_den * c_den; RT c_ = c_num * a_den * b_den; return make_root_of_2(a_,b_,c_,smaller); } }; private: typedef CGAL::Algebraic_structure_traits AST; public: typedef typename AST::Square Square; typedef typename AST::Inverse Inverse; struct Make_sqrt{ typedef Root_of_2 result_type; Root_of_2 operator()(const FT& x) const { return Root_of_2( FT(0),FT(1),x); } }; }; template < typename NT > struct Root_of_traits_helper < NT, Field_with_sqrt_tag > { typedef NT Root_of_1; typedef NT Root_of_2; struct Make_root_of_2{ typedef NT result_type; NT operator()(const NT& a, const NT& b, const NT& c, bool smaller) const { (CGAL::possibly(a != 0)?(static_cast(0)): ::CGAL::assertion_fail( "a != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits.h", 217)); NT discriminant = ::CGAL:: square(b) - a*c*4; (CGAL::possibly(discriminant >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "discriminant >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits.h", 219)); NT d = ::CGAL:: sqrt(discriminant); if ((smaller && a>0) || (!smaller && a<0)) d = -d; return (d-b)/(a*2); } NT operator()(const NT& a, const NT& b, const NT& c) const { return a + b * ::CGAL:: sqrt(c) ; } }; private: typedef CGAL::Algebraic_structure_traits AST; public: typedef typename AST::Square Square; typedef typename AST::Inverse Inverse; struct Make_sqrt{ typedef Root_of_2 result_type; Root_of_2 operator()(const NT& x) const { return CGAL::sqrt(x); } }; }; template < typename NT > struct Root_of_traits_helper < NT, Field_with_kth_root_tag > :public Root_of_traits_helper < NT, Field_with_sqrt_tag>{}; template < typename NT > struct Root_of_traits_helper < NT, Field_with_root_of_tag > :public Root_of_traits_helper < NT, Field_with_sqrt_tag>{}; } template < typename NT > struct Root_of_traits : public internal::Root_of_traits_helper::Algebraic_category> { typedef internal::Root_of_traits_helper::Algebraic_category> Base; typedef typename Base::Root_of_1 RootOf_1; typedef typename Base::Root_of_2 RootOf_2; }; template struct Root_of_traits >{ typedef Interval_nt Root_of_1; typedef Interval_nt Root_of_2; typedef Root_of_1 RootOf_1; typedef Root_of_2 RootOf_2; struct Make_root_of_2{ typedef Interval_nt result_type; Interval_nt operator()(const Interval_nt& a, const Interval_nt& b, const Interval_nt& c, bool smaller) const { if (CGAL::possibly(a==0)) return Interval_nt::largest(); Interval_nt discriminant = ::CGAL:: square(b) - a*c*4; (CGAL::possibly(discriminant >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "discriminant >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits.h", 283)); Interval_nt d = ::CGAL:: sqrt(discriminant); if ((smaller && a>0) || (!smaller && a<0)) d = -d; return (d-b)/(a*2); } Interval_nt operator()(const Interval_nt& a, const Interval_nt& b, const Interval_nt& c) const { return a + b * ::CGAL:: sqrt(c) ; } }; private: typedef CGAL::Algebraic_structure_traits > AST; public: typedef typename AST::Square Square; typedef typename AST::Inverse Inverse; typedef typename AST::Sqrt Make_sqrt; }; } # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits_specializations.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits_specializations.h" namespace CGAL { template struct Lazy_exact_ro2 : public Lazy_exact_nt_rep< typename Root_of_traits::Root_of_2 > { typedef typename Root_of_traits::Root_of_2 RO2; typedef Lazy_exact_nt_rep Base; typedef typename Base::AT::Protector P; mutable Lazy_exact_nt op1, op2, op3; bool smaller; bool old_rep; Lazy_exact_ro2 (const Lazy_exact_nt &a, const Lazy_exact_nt &b, const Lazy_exact_nt &c, bool s) : Base((P(), make_root_of_2(a.approx(), b.approx(), c.approx(), s))), op1(a), op2(b), op3(c), smaller(s), old_rep(true) {} Lazy_exact_ro2 (const Lazy_exact_nt &a, const Lazy_exact_nt &b, const Lazy_exact_nt &c) : Base((P(), make_root_of_2(a.approx(), b.approx(), c.approx()))), op1(a), op2(b), op3(c), smaller(true), old_rep(false) {} void update_exact() const { if (old_rep) this->et = new RO2(make_root_of_2(op1.exact(), op2.exact(), op3.exact(), smaller)); else this->et = new RO2(make_root_of_2(op1.exact(), op2.exact(), op3.exact())); if (!this->approx().is_point()) this->at = to_interval(*(this->et)); this->prune_dag(); } void prune_dag() const { op1 = op2 = op3 = Lazy_exact_nt(); } }; template struct Root_of_traits< Lazy_exact_nt < NT > > { private: typedef Root_of_traits T; public: typedef Root_of_traits< Lazy_exact_nt < NT > > Base; typedef Lazy_exact_nt< typename T::Root_of_1 > Root_of_1; typedef Lazy_exact_nt< typename T::Root_of_2 > Root_of_2; typedef Root_of_2 RootOf_2; typedef Root_of_1 RootOf_1; struct Make_root_of_2{ typedef Root_of_2 result_type; Root_of_2 operator()(const Lazy_exact_nt& a, const Lazy_exact_nt& b, const Lazy_exact_nt& c) const { return new Lazy_exact_ro2(a, b, c); }; Root_of_2 operator()(const Lazy_exact_nt& a, const Lazy_exact_nt& b, const Lazy_exact_nt& c, bool smaller) const{ return new Lazy_exact_ro2(a, b, c, smaller); }; }; private: typedef CGAL::Algebraic_structure_traits AST; public: typedef typename AST::Square Square; typedef typename AST::Inverse Inverse; struct Make_sqrt{ typedef Root_of_2 result_type; Root_of_2 operator()(const Lazy_exact_nt& x) const { return new Lazy_exact_ro2( Lazy_exact_nt(0), Lazy_exact_nt(1) , x); } }; }; template < typename RT > typename CGAL::Root_of_traits >::Root_of_2 make_sqrt(const CGAL::Lazy_exact_nt< RT> & r) { typedef Lazy_exact_nt< RT> TT; (CGAL::possibly(r >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "r >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits_specializations.h", 124)); if(::CGAL:: is_zero(r)) return make_root_of_2((TT) 1,(TT) 0,(TT) 0); return make_root_of_2((TT) 1,(TT) 0,-r,false); } } # 308 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_of_traits.h" 2 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polynomials_2_2.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polynomials_2_2.h" namespace CGAL { template < typename FT_ > class Polynomial_for_circles_2_2 { FT_ rep[3]; public: typedef FT_ FT; Polynomial_for_circles_2_2(){} Polynomial_for_circles_2_2(const FT & a, const FT & b, const FT & rsq) { rep[0]=a; rep[1]=b; rep[2]=rsq; } const FT & a() const { return rep[0]; } const FT & b() const { return rep[1]; } const FT & r_sq() const { return rep[2]; } }; template < typename FT > bool operator == ( const Polynomial_for_circles_2_2 & p1, const Polynomial_for_circles_2_2 & p2 ) { return( (p1.a() == p2.a()) && (p1.b() == p2.b()) && (p1.r_sq() == p2.r_sq()) ); } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polynomials_1_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Polynomials_1_2.h" namespace CGAL { template < typename RT_ > class Polynomial_1_2 { RT_ rep[3]; public: typedef RT_ RT; Polynomial_1_2(){} Polynomial_1_2(const RT & a, const RT & b, const RT & c) { rep[0]=a; rep[1]=b; rep[2]=c; } const RT & a() const { return rep[0]; } const RT & b() const { return rep[1]; } const RT & c() const { return rep[2]; } }; template < typename RT > bool operator == ( const Polynomial_1_2 & p1, const Polynomial_1_2 & p2 ) { return( (p1.a() == p2.a()) && (p1.b() == p2.b()) && (p1.c() == p2.c()) ); } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_for_circles_2_2.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_for_circles_2_2.h" namespace CGAL { template < typename RT_ > class Root_for_circles_2_2 { typedef RT_ RT; typedef typename Root_of_traits< RT >::RootOf_2 Root_of_2; typedef typename Root_of_traits< RT >::RootOf_1 FT; private: Handle_for x_; Handle_for y_; public: Root_for_circles_2_2(){} Root_for_circles_2_2(const Root_of_2& r1, const Root_of_2& r2) : x_(r1), y_(r2) { } const Root_of_2& x() const { return get(x_); } const Root_of_2& y() const { return get(y_); } CGAL::Bbox_2 bbox() const { CGAL::Interval_nt<> ix=to_interval(x()), iy=to_interval(y()); return CGAL::Bbox_2(ix.inf(),iy.inf(), ix.sup(),iy.sup()); # 98 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Root_for_circles_2_2.h" } template < typename RT > friend bool operator == ( const Root_for_circles_2_2& r1, const Root_for_circles_2_2& r2 ); }; template < typename RT > bool operator == ( const Root_for_circles_2_2& r1, const Root_for_circles_2_2& r2 ) { if (CGAL::identical(r1.x_, r2.x_) && CGAL::identical(r1.y_, r2.y_)) return true; return (r1.x() == r2.x()) && (r1.y() == r2.y()); } template < typename RT > std::ostream & operator<<(std::ostream & os, const Root_for_circles_2_2 &r) { return os << r.x() << " " << r.y() << " "; } template < typename RT > std::istream & operator>>(std::istream & is, Root_for_circles_2_2 &r) { typedef typename Root_of_traits< RT >::RootOf_2 Root_of_2; Root_of_2 x,y; is >> x >> y; if(is) r = Root_for_circles_2_2(x,y); return is; } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h" namespace CGAL { namespace AlgebraicFunctors { template < class AK, class OutputIterator > inline OutputIterator solve( const typename AK::Polynomial_for_circles_2_2 & e1, const typename AK::Polynomial_for_circles_2_2 & e2, OutputIterator res ) { (CGAL::possibly(! (e1 == e2))?(static_cast(0)): ::CGAL::precondition_fail( "! (e1 == e2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomials_2_2.h", 40)); typedef typename AK::FT FT; typedef typename AK::Root_of_2 Root_of_2; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; const FT dx = e2.a() - e1.a(); const FT dy = e2.b() - e1.b(); const FT dx2 = CGAL::square(dx); const FT dy2 = CGAL::square(dy); const FT dist2 = dx2 + dy2; const FT diff_sqr_rad = e1.r_sq() - e2.r_sq(); const FT disc = 2*dist2*(e1.r_sq() + e2.r_sq()) - (CGAL::square(diff_sqr_rad) + CGAL::square(dist2)); CGAL::Sign sign_disc = CGAL::sign(disc); if (sign_disc == NEGATIVE) return res; const FT x_base = ((e1.a() + e2.a()) + dx*diff_sqr_rad / dist2) / 2; const FT y_base = ((e1.b() + e2.b()) + dy*diff_sqr_rad / dist2) / 2; if (sign_disc == ZERO) { *res++ = std::make_pair ( Root_for_circles_2_2 (Root_of_2(x_base), Root_of_2(y_base)), static_cast(2) ); return res; } CGAL::Sign sign_dy = CGAL::sign (dy); CGAL::Sign sign_dx = CGAL::sign (dx); if (sign_dy == ZERO) { const FT y_root_coeff = dx / (2 * dist2); if(sign_dx == NEGATIVE) { * res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(x_base), make_root_of_2(y_base, y_root_coeff, disc)), static_cast(1) ); * res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(x_base), make_root_of_2(y_base, -y_root_coeff, disc)), static_cast(1) ); } else { * res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(x_base), make_root_of_2(y_base, -y_root_coeff, disc)), static_cast(1) ); * res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(x_base), make_root_of_2(y_base, y_root_coeff, disc)), static_cast(1) ); } return res; } if (sign_dx == ZERO) { const FT x_root_coeff = dy / (2 * dist2); if(sign_dy == POSITIVE) { * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc), Root_of_2(y_base)), static_cast(1) ); * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc), Root_of_2(y_base)), static_cast(1) ); } else { * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc), Root_of_2(y_base)), static_cast(1) ); * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc), Root_of_2(y_base)), static_cast(1) ); } return res; } const FT x_root_coeff = dy / (2 * dist2); const FT y_root_coeff = dx / (2 * dist2); if (sign_dy == POSITIVE) { * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc), make_root_of_2(y_base, y_root_coeff, disc)), static_cast(1) ); * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc), make_root_of_2(y_base, -y_root_coeff, disc)), static_cast(1) ); } else { * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc), make_root_of_2(y_base, -y_root_coeff, disc)), static_cast(1) ); * res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc), make_root_of_2(y_base, y_root_coeff, disc)), static_cast(1) ); } return res; } template < class AK > inline Sign sign_at( const typename AK::Polynomial_for_circles_2_2 & equation, const typename AK::Root_for_circles_2_2 & r) { typedef typename AK::Root_of_2 Root_of_2; Comparison_result c = compare(square(r.x() - equation.a()), equation.r_sq() - square(r.y() - equation.b())); if(c == EQUAL) return ZERO; if(c == LARGER) return POSITIVE; return NEGATIVE; } template typename AK::Root_for_circles_2_2 x_critical_point(const typename AK::Polynomial_for_circles_2_2 & c, bool i) { typedef typename AK::Root_of_2 Root_of_2; typedef typename AK::FT FT; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; const Root_of_2 a1 = make_root_of_2(c.a(),FT(i?-1:1),c.r_sq()); return Root_for_circles_2_2(a1, c.b()); } template OutputIterator x_critical_points(const typename AK::Polynomial_for_circles_2_2 & c, OutputIterator res) { typedef typename AK::Root_of_2 Root_of_2; typedef typename AK::FT FT; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; *res++ = Root_for_circles_2_2( make_root_of_2(c.a(),FT(-1),c.r_sq()), c.b()); *res++ = Root_for_circles_2_2( make_root_of_2(c.a(),FT(1),c.r_sq()), c.b()); return res; } template typename AK::Root_for_circles_2_2 y_critical_point(const typename AK::Polynomial_for_circles_2_2 &c, bool i) { typedef typename AK::Root_of_2 Root_of_2; typedef typename AK::FT FT; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; const Root_of_2 b1 = make_root_of_2(c.b(),FT(i?-1:1),c.r_sq()); return Root_for_circles_2_2(c.a(),b1); } template OutputIterator y_critical_points(const typename AK::Polynomial_for_circles_2_2 & c, OutputIterator res) { typedef typename AK::Root_of_2 Root_of_2; typedef typename AK::FT FT; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; *res++ = Root_for_circles_2_2(c.a(), make_root_of_2(c.b(),-1,c.r_sq())); *res++ = Root_for_circles_2_2(c.a(), make_root_of_2(c.b(),1,c.r_sq())); return res; } } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/internal_functions_on_roots_and_polynomial_1_2_and_2_2.h" namespace CGAL { namespace AlgebraicFunctors { template < class AK, class OutputIterator > inline OutputIterator solve( const typename AK::Polynomial_1_2 & e1, const typename AK::Polynomial_for_circles_2_2 & e2, OutputIterator res ) { typedef typename AK::FT FT; typedef typename AK::Root_of_2 Root_of_2; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; if (is_zero(e1.a())){ const FT hy = -e1.c()/e1.b(); const FT hdisc = e2.r_sq() - CGAL::square(hy - e2.b()); CGAL::Sign sign_hdisc = CGAL::sign(hdisc); if(sign_hdisc == NEGATIVE) return res; if(sign_hdisc == ZERO) { *res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(e2.a()), Root_of_2(hy)), 2u); return res; } const Root_of_2 x_res1 = make_root_of_2(e2.a(),FT(-1),hdisc); const Root_of_2 x_res2 = make_root_of_2(e2.a(),FT(1),hdisc); const Root_of_2 y_res = Root_of_2(hy); *res++ = std::make_pair ( Root_for_circles_2_2(x_res1, y_res), 1u); *res++ = std::make_pair ( Root_for_circles_2_2(x_res2, y_res), 1u); return res; } else if(is_zero(e1.b())){ const FT vx = -e1.c()/e1.a(); const FT vdisc = e2.r_sq() - CGAL::square(vx - e2.a()); CGAL::Sign sign_vdisc = CGAL::sign(vdisc); if(sign_vdisc == NEGATIVE) return res; if(sign_vdisc == ZERO) { *res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(vx), Root_of_2(e2.b())), 2u); return res; } const Root_of_2 x_res = Root_of_2(vx); const Root_of_2 y_res1 = make_root_of_2(e2.b(),FT(-1),vdisc); const Root_of_2 y_res2 = make_root_of_2(e2.b(),FT(1),vdisc); *res++ = std::make_pair ( Root_for_circles_2_2(x_res, y_res1), 1u); *res++ = std::make_pair ( Root_for_circles_2_2(x_res, y_res2), 1u); return res; } else { const FT line_factor = CGAL::square(e1.a()) + CGAL::square(e1.b()); const FT disc = line_factor*e2.r_sq() - CGAL::square(e1.a()*e2.a() + e1.b()*e2.b() + e1.c()); CGAL::Sign sign_disc = CGAL::sign(disc); if (sign_disc == NEGATIVE) return res; const FT aux = e1.b()*e2.a() - e1.a()*e2.b(); const FT x_base = (aux*e1.b() - e1.a()*e1.c()) / line_factor; const FT y_base = (-aux*e1.a() - e1.b()*e1.c()) / line_factor; if (sign_disc == ZERO) { *res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(x_base), Root_of_2(y_base)), 2u); return res; } const FT x_root_coeff = e1.b() / line_factor; const FT y_root_coeff = e1.a() / line_factor; if (CGAL::sign(e1.b()) == POSITIVE) { *res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc), make_root_of_2(y_base, y_root_coeff, disc)), 1u); *res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc), make_root_of_2(y_base, -y_root_coeff, disc)), 1u); } else { *res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, x_root_coeff, disc), make_root_of_2(y_base, -y_root_coeff, disc)), 1u); *res++ = std::make_pair ( Root_for_circles_2_2(make_root_of_2(x_base, -x_root_coeff, disc), make_root_of_2(y_base, y_root_coeff, disc)), 1u); } return res; } } template < class AK, class OutputIterator > inline OutputIterator solve( const typename AK::Polynomial_for_circles_2_2 & e1, const typename AK::Polynomial_1_2 & e2, OutputIterator res ) { return solve (e2, e1, res); } template < class AK, class OutputIterator > inline OutputIterator solve( const typename AK::Polynomial_1_2 & e1, const typename AK::Polynomial_1_2 & e2, OutputIterator res ) { typedef typename AK::FT FT; typedef typename AK::Root_of_2 Root_of_2; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; const FT delta = e1.a()*e2.b() - e2.a()*e1.b(); if(is_zero(delta)) return res; if(is_zero(e2.a())){ const FT sol = -e2.c()/e2.b(); *res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(-(e1.b()*sol + e1.c())/e1.a()), Root_of_2(sol)), 1u); return res; } const FT sol = (e2.a()*e1.c() - e2.c()*e1.a()) / delta; *res++ = std::make_pair ( Root_for_circles_2_2(Root_of_2(-(e2.b()*sol + e2.c())/e2.a()), Root_of_2(sol)), 1u); return res; } template < class AK > inline Sign sign_at( const typename AK::Polynomial_1_2 & equation, const typename AK::Root_for_circles_2_2 & r) { typedef typename AK::Root_of_2 Root_of_2; Comparison_result c = compare(r.x()*equation.a(), -equation.c() - r.y()*equation.b()); if(c == EQUAL) return ZERO; if(c == LARGER) return POSITIVE; return NEGATIVE; } } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/internal_functions_comparison_root_for_circles_2_2.h" namespace CGAL { namespace AlgebraicFunctors{ template Comparison_result compare_x(const CGAL::Root_for_circles_2_2& r1, const CGAL::Root_for_circles_2_2& r2){ return compare(r1.x(), r2.x()); } template Comparison_result compare_y(const CGAL::Root_for_circles_2_2& r1, const CGAL::Root_for_circles_2_2& r2){ return compare(r1.y(), r2.y()); } template Comparison_result compare_xy(const CGAL::Root_for_circles_2_2& r1, const CGAL::Root_for_circles_2_2& r2){ Comparison_result compx = compare_x(r1, r2); if(compx != 0) return compx; return compare_y(r1, r2); } } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles/function_objects_on_roots_and_polynomials_2_2.h" 2 namespace CGAL { namespace AlgebraicFunctors { template < class AK > class Solve { typedef typename AK::Polynomial_for_circles_2_2 Equation_Circle; typedef typename AK::Polynomial_1_2 Equation_Line; public: typedef void result_type; template < class OutputIterator > OutputIterator operator()(const Equation_Circle & e1, const Equation_Circle & e2, OutputIterator res) const { return AlgebraicFunctors::solve ( e1, e2, res); } template < class OutputIterator > OutputIterator operator()(const Equation_Line & e1, const Equation_Circle & e2, OutputIterator res) const { return AlgebraicFunctors::solve ( e1, e2, res); } template < class OutputIterator > OutputIterator operator()(const Equation_Circle & e1, const Equation_Line & e2, OutputIterator res) const { return AlgebraicFunctors::solve ( e1, e2, res); } template < class OutputIterator > OutputIterator operator()(const Equation_Line & e1, const Equation_Line & e2, OutputIterator res) const { return AlgebraicFunctors::solve ( e1, e2, res); } }; template < class AK > class Construct_polynomial_for_circles_2_2 { typedef typename AK::RT RT; typedef typename AK::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; public: typedef Polynomial_for_circles_2_2 result_type; result_type operator()(const RT& xc, const RT& yc, const RT& r_sq) const { return Polynomial_for_circles_2_2(xc, yc, r_sq); } }; template < class AK > class Construct_polynomial_1_2 { typedef typename AK::RT RT; typedef typename AK::Polynomial_1_2 Polynomial_1_2; public: typedef Polynomial_1_2 result_type; result_type operator()( const RT& a, const RT& b, const RT& c) const { return Polynomial_1_2(a, b, c); } }; template < class AK > class Sign_at { typedef typename AK::Polynomial_1_2 Polynomial_1_2; typedef typename AK::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; public: typedef CGAL::Sign result_type; result_type operator()( const Polynomial_for_circles_2_2 & equation, const Root_for_circles_2_2 & r ) const { return AlgebraicFunctors::sign_at(equation, r); } result_type operator()( const Polynomial_1_2 & equation, const Root_for_circles_2_2 & r ) const { return AlgebraicFunctors::sign_at(equation, r); } }; template < class AK > class X_critical_points { typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; typedef typename AK::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; public: typedef void result_type; Root_for_circles_2_2 operator()(const Polynomial_for_circles_2_2 & c, bool i) const { return AlgebraicFunctors::x_critical_point(c,i); } template OutputIterator operator()(const Polynomial_for_circles_2_2 & c, OutputIterator res) const { return AlgebraicFunctors::x_critical_points(c,res); } }; template < class AK > class Y_critical_points { typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; typedef typename AK::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; public: typedef void result_type; Root_for_circles_2_2 operator()(const Polynomial_for_circles_2_2 & c, bool i) const { return AlgebraicFunctors::y_critical_point(c,i); } template OutputIterator operator()(const Polynomial_for_circles_2_2 & c, OutputIterator res) const { return AlgebraicFunctors::y_critical_points(c,res); } }; template < class AK > class Compare_x { typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; typedef typename AK::RT RT; public: typedef CGAL::Comparison_result result_type; result_type operator()(const Root_for_circles_2_2& r1, const Root_for_circles_2_2& r2) const { return AlgebraicFunctors::compare_x(r1, r2); } }; template < class AK > class Compare_y { typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; typedef typename AK::RT RT; public: typedef CGAL::Comparison_result result_type; result_type operator()(const Root_for_circles_2_2& r1, const Root_for_circles_2_2& r2) const { return AlgebraicFunctors::compare_y(r1, r2); } }; template < class AK > class Compare_xy { typedef typename AK::Root_for_circles_2_2 Root_for_circles_2_2; typedef typename AK::RT RT; public: typedef CGAL::Comparison_result result_type; result_type operator()(const Root_for_circles_2_2& r1, const Root_for_circles_2_2& r2) const { return AlgebraicFunctors::compare_xy(r1, r2); } }; } } # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Algebraic_kernel_for_circles_2_2.h" 2 namespace CGAL { template< class RT_ > struct Algebraic_kernel_for_circles_2_2 { typedef Algebraic_kernel_for_circles_2_2 Self; typedef RT_ RT; typedef typename Root_of_traits< RT >::RootOf_1 FT; typedef CGAL::Polynomial_1_2 Polynomial_1_2; typedef CGAL::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; typedef typename Root_of_traits< RT >::RootOf_2 Root_of_2; typedef CGAL::Root_for_circles_2_2< RT > Root_for_circles_2_2; typedef AlgebraicFunctors::Construct_polynomial_1_2 Construct_polynomial_1_2; typedef AlgebraicFunctors::Construct_polynomial_for_circles_2_2 Construct_polynomial_for_circles_2_2; typedef AlgebraicFunctors::Solve Solve; typedef AlgebraicFunctors::Sign_at Sign_at; typedef AlgebraicFunctors::X_critical_points X_critical_points; typedef AlgebraicFunctors::Y_critical_points Y_critical_points; typedef AlgebraicFunctors::Compare_x Compare_x; typedef AlgebraicFunctors::Compare_y Compare_y; typedef AlgebraicFunctors::Compare_xy Compare_xy; Construct_polynomial_1_2 construct_polynomial_1_2_object() const { return Construct_polynomial_1_2(); } Construct_polynomial_for_circles_2_2 construct_polynomial_for_circles_2_2_object() const { return Construct_polynomial_for_circles_2_2(); } Solve solve_object() const { return Solve(); } Sign_at sign_at_object() const { return Sign_at(); } X_critical_points x_critical_points_object() const { return X_critical_points(); } Y_critical_points y_critical_points_object() const { return Y_critical_points(); } Compare_x compare_x_object() const { return Compare_x(); } Compare_y compare_y_object() const { return Compare_y(); } Compare_xy compare_xy_object() const { return Compare_xy(); } }; } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_arc_2.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_arc_2.h" namespace CGAL { template class Circular_arc_2 : public CircularKernel::Kernel_base::Circular_arc_2 { typedef typename CircularKernel::RT RT; typedef typename CircularKernel::FT FT; typedef typename CircularKernel::Point_2 Point_2; typedef typename CircularKernel::Line_2 Line_2; typedef typename CircularKernel::Circle_2 Circle_2; typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; typedef typename CircularKernel::Kernel_base::Circular_arc_2 RCircular_arc_2; public: typedef RCircular_arc_2 Rep; typedef CircularKernel R; const Rep& rep() const { return *this; } Rep& rep() { return *this; } Circular_arc_2() : RCircular_arc_2(typename R::Construct_circular_arc_2()()) {} Circular_arc_2(const Circle_2 &c) : RCircular_arc_2(typename R::Construct_circular_arc_2()(c)) {} Circular_arc_2(const Circle_2 &support, const Line_2 &l1, const bool b_l1, const Line_2 &l2, const bool b_l2) : RCircular_arc_2(typename R::Construct_circular_arc_2()(support,l1,b_l1,l2,b_l2)) {} Circular_arc_2(const Circle_2 &c, const Circle_2 &c1, const bool b_1, const Circle_2 &c2, const bool b_2) : RCircular_arc_2(typename R::Construct_circular_arc_2()(c,c1,b_1,c2,b_2)) {} Circular_arc_2(const Point_2 &start, const Point_2 &middle, const Point_2 &end) : RCircular_arc_2(typename R::Construct_circular_arc_2()(start, middle, end)) {} Circular_arc_2(const Circle_2 &support, const Circular_arc_point_2 &begin, const Circular_arc_point_2 &end) : RCircular_arc_2(typename R::Construct_circular_arc_2()(support, begin, end)) {} Circular_arc_2(const Point_2 &start, const Point_2 &end, const FT &bulge) : RCircular_arc_2(typename R::Construct_circular_arc_2()(start, end, bulge)) {} Circular_arc_2(const RCircular_arc_2 & a) : RCircular_arc_2(a) {} typename Qualified_result_of ::type source() const { return typename R::Construct_circular_source_vertex_2()(*this); } typename Qualified_result_of ::type target() const { return typename R::Construct_circular_target_vertex_2()(*this); } typename Qualified_result_of ::type left() const { return typename R::Construct_circular_min_vertex_2()(*this); } typename Qualified_result_of ::type right() const { return typename R::Construct_circular_max_vertex_2()(*this); } bool is_x_monotone() const { return typename R::Is_x_monotone_2()(*this); } bool is_y_monotone() const { return typename R::Is_y_monotone_2()(*this); } typename Qualified_result_of ::type supporting_circle() const { return typename R::Construct_circle_2()(*this); } typename Qualified_result_of ::type center() const { return typename R::Construct_center_2()(*this); } typename Qualified_result_of ::type squared_radius() const { return typename R::Compute_squared_radius_2()(*this); } Bbox_2 bbox(void) const { return typename R::Construct_bbox_2()(*this); } }; template < typename CircularKernel > inline bool operator==(const Circular_arc_2 &p, const Circular_arc_2 &q) { return CircularKernel().equal_2_object()(p, q); } template < typename CircularKernel > inline bool operator!=(const Circular_arc_2 &p, const Circular_arc_2 &q) { return ! (p == q); } template < typename CK > std::ostream & operator<<(std::ostream & os, const Circular_arc_2 &a) { return os << a.supporting_circle() << " " << a.source() << " " << a.target() << " "; } template < typename CK > std::istream & operator>>(std::istream & is, Circular_arc_2 &a) { typename CK::Circle_2 s; typename CK::Circular_arc_point_2 p1; typename CK::Circular_arc_point_2 p2; is >> s >> p1 >> p2 ; if (is) a = Circular_arc_2(s, p1, p2); return is; } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_arc_point_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_arc_point_2.h" namespace CGAL { template < typename CircularKernel > class Circular_arc_point_2 : public CircularKernel::Kernel_base::Circular_arc_point_2 { typedef typename CircularKernel::Kernel_base::Circular_arc_point_2 RCircular_arc_point_2; typedef typename CircularKernel::Point_2 Point_2; typedef typename CircularKernel::Circle_2 Circle_2; typedef typename CircularKernel::Root_of_2 Root_of_2; public: typedef typename CircularKernel::Root_for_circles_2_2 Root_for_circles_2_2; typedef CircularKernel R; typedef RCircular_arc_point_2 Rep; const Rep& rep() const { return *this; } Rep& rep() { return *this; } Circular_arc_point_2() : RCircular_arc_point_2(typename R::Construct_circular_arc_point_2()()) {} Circular_arc_point_2(const Root_for_circles_2_2 & np) : RCircular_arc_point_2(typename R::Construct_circular_arc_point_2()(np)) {} Circular_arc_point_2(const RCircular_arc_point_2 & p) : RCircular_arc_point_2(p) {} Circular_arc_point_2(const Point_2 & p) : RCircular_arc_point_2(typename R::Construct_circular_arc_point_2()(p)) {} typename Qualified_result_of ::type x() const { return typename R::Compute_circular_x_2()(*this); } typename Qualified_result_of ::type y() const { return typename R::Compute_circular_y_2()(*this); } Bbox_2 bbox() const { return typename R::Construct_bbox_2()(*this); } }; template < typename CircularKernel > inline bool operator==(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { return CircularKernel().equal_2_object()(p, q); } template < typename CircularKernel > inline bool operator!=(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { return ! (p == q); } template < typename CircularKernel > inline bool operator<(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { return CircularKernel().compare_xy_2_object()(p, q) == CGAL::SMALLER; } template < typename CircularKernel > inline bool operator>(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { return CircularKernel().compare_xy_2_object()(p, q) == CGAL::LARGER; } template < typename CircularKernel > inline bool operator<=(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { CGAL::Comparison_result c = CircularKernel().compare_xy_2_object()(p, q); return (c == CGAL::SMALLER) || (c == CGAL::EQUAL); } template < typename CircularKernel > inline bool operator>=(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { CGAL::Comparison_result c = CircularKernel().compare_xy_2_object()(p, q); return (c == CGAL::LARGER) || (c == CGAL::EQUAL); } template < typename CK > std::istream & operator>>(std::istream & is, Circular_arc_point_2 &p) { typedef typename CK::Root_of_2 Root_of_2; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; Root_for_circles_2_2 r; is >> r; if(is) p = Circular_arc_point_2(r); return is; } template < class CK > std::ostream& operator<<(std::ostream &os, const Circular_arc_point_2 &p) { return os << p.x() << " " << p.y() << " "; } } # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_arc_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Line_arc_2.h" namespace CGAL { template class Line_arc_2 : public CircularKernel::Kernel_base::Line_arc_2 { typedef typename CircularKernel::FT FT; typedef typename CircularKernel::RT RT; typedef typename CircularKernel::Point_2 Point_2; typedef typename CircularKernel::Line_2 Line_2; typedef typename CircularKernel::Circle_2 Circle_2; typedef typename CircularKernel::Circular_arc_point_2 Circular_arc_point_2; typedef typename CircularKernel::Segment_2 Segment_2; typedef typename CircularKernel::Kernel_base::Line_arc_2 RLine_arc_2; public: typedef RLine_arc_2 Rep; typedef CircularKernel R; const Rep& rep() const { return *this; } Rep& rep() { return *this; } Line_arc_2() : RLine_arc_2(typename R::Construct_line_arc_2()()) {} Line_arc_2(const Line_2 &support, const Circle_2 &c1,const bool b1, const Circle_2 &c2,const bool b2) : RLine_arc_2(typename R::Construct_line_arc_2()(support, c1, b1, c2, b2)) {} Line_arc_2(const Line_2 &support, const Line_2 &l1, const Line_2 &l2) : RLine_arc_2(typename R::Construct_line_arc_2()(support, l1, l2)) {} Line_arc_2(const Line_2 &support, const Circular_arc_point_2 &p1, const Circular_arc_point_2 &p2) : RLine_arc_2(typename R::Construct_line_arc_2()(support, p1, p2)) {} Line_arc_2(const Segment_2 &s) : RLine_arc_2(typename R::Construct_line_arc_2()(s)) {} Line_arc_2(const Point_2 &p1, const Point_2 &p2) : RLine_arc_2(typename R::Construct_line_arc_2()(p1, p2)) {} Line_arc_2(const RLine_arc_2 &a ) : RLine_arc_2(a) {} typename Qualified_result_of ::type source() const { return typename R::Construct_circular_source_vertex_2()(*this); } typename Qualified_result_of ::type target() const { return typename R::Construct_circular_target_vertex_2()(*this); } typename Qualified_result_of ::type left() const { return typename R::Construct_circular_min_vertex_2()(*this); } typename Qualified_result_of ::type right() const { return typename R::Construct_circular_max_vertex_2()(*this); } Line_2 supporting_line() const { return typename R::Construct_line_2()(*this); } bool is_vertical() const { return typename R::Is_vertical_2()(*this); } Bbox_2 bbox() const { return typename R::Construct_bbox_2()(*this); } }; template < typename CircularKernel > inline bool operator==(const Line_arc_2 &p, const Line_arc_2 &q) { return CircularKernel().equal_2_object()(p, q); } template < typename CircularKernel > inline bool operator!=(const Line_arc_2 &p, const Line_arc_2 &q) { return ! (p == q); } template < typename CK > std::ostream & operator<<(std::ostream & os, const Line_arc_2 &a) { return os << a.supporting_line() << " " << a.source() << " " << a.target() << " "; } template < typename CK > std::istream & operator>>(std::istream & is, Line_arc_2 &a) { typename CK::Line_2 l; typename CK::Circular_arc_point_2 p1; typename CK::Circular_arc_point_2 p2; is >> l >> p1 >> p2 ; if (is) a = Line_arc_2(l, p1, p2); return is; } } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h" 1 # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_point_2.h" namespace CGAL { namespace internal { template class Circular_arc_point_2_base { typedef typename CK::FT FT; typedef typename CK::Root_of_2 Root_of_2; typedef typename CK::Point_2 Point_2; public: typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; typedef typename CK::template Handle::type Base; Circular_arc_point_2_base() {} Circular_arc_point_2_base(const Root_for_circles_2_2 & np) : _p(np) {} Circular_arc_point_2_base(const Point_2 & p) : _p(p.x(),p.y() ) {} const Root_of_2 & x() const { return get(_p).x(); } const Root_of_2 & y() const { return get(_p).y(); } CGAL::Bbox_2 bbox() const { return get(_p).bbox(); } const Root_for_circles_2_2 & coordinates() const { return get(_p); } bool equal_ref(const Circular_arc_point_2_base &p) const { return CGAL::identical(_p, p._p); } private: Base _p; }; template < typename CK > std::ostream & print(std::ostream & os, const Circular_arc_point_2_base &p) { return os << "CirclArcEndPoint_2(" << std::endl << p.x() << ", " << p.y() << ')'; } template < typename BK, typename Base_CK > class Filtered_bbox_circular_arc_point_2_base : public Base_CK::Circular_arc_point_2 { public: typedef Filtered_bbox_circular_arc_point_2_base Self; typedef typename Base_CK::Circular_arc_point_2 P_point; typedef typename BK::Point_2 Point_2; typedef typename BK::Root_for_circles_2_2 Root_for_circles_2_2; Filtered_bbox_circular_arc_point_2_base() : P_point(), bb(__null) {} Filtered_bbox_circular_arc_point_2_base(const P_point& pt) : P_point(pt), bb(__null) {} explicit Filtered_bbox_circular_arc_point_2_base(const Root_for_circles_2_2 & np) : P_point(np), bb(__null) {} explicit Filtered_bbox_circular_arc_point_2_base(const Point_2 & p) : P_point(p), bb(__null) {} Filtered_bbox_circular_arc_point_2_base(const Self &c) : P_point(c), bb(c.bb ? new Bbox_2(*(c.bb)) : __null) {} Filtered_bbox_circular_arc_point_2_base& operator=(const Self& c) { if(this != &c) { this->P_point::operator=(c); bb = c.bb ? new Bbox_2(*(c.bb)) : __null; } return *this; } ~Filtered_bbox_circular_arc_point_2_base() { if(bb) { delete bb; bb = 0; } } bool has_no_bbox() const { return (bb==__null);} Bbox_2 bbox() const { if(this->has_no_bbox()) bb= new Bbox_2(P_point::bbox()); return *bb; } private: mutable Bbox_2 *bb; }; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" 1 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h" namespace CGAL { template< class CK> typename CK::Circular_arc_point_2 circle_intersect( const typename CK::Circle_2 & c1, const typename CK::Circle_2 & c2, bool b ) { typedef std::vector solutions_container; solutions_container solutions; intersection( c1, c2, std::back_inserter(solutions) ); typename solutions_container::iterator it = solutions.begin(); (CGAL::possibly(it != solutions.end())?(static_cast(0)): ::CGAL::precondition_fail( "it != solutions.end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circle_2.h", 44)); const std::pair *result; result = CGAL::object_cast< std::pair > (&(*it)); if ( result->second == 2 ) return result->first; if (b) return result->first; ++it; result = CGAL::object_cast< std::pair >(&(*it)); return result->first; } namespace CircularFunctors { template < class CK > typename CK::Polynomial_for_circles_2_2 get_equation( const typename CK::Circle_2 & c ) { typedef typename CK::RT RT; typedef typename CK::Algebraic_kernel AK; return AK().construct_polynomial_for_circles_2_2_object() ( c.center().x(), c.center().y(), c.squared_radius() ); } template < class CK > typename CK::Circle_2 construct_circle_2( const typename CK::Polynomial_for_circles_2_2 &eq ) { return typename CK::Circle_2( typename CK::Point_2(eq.a(), eq.b()), eq.r_sq() ); } template < class CK > bool has_on(const typename CK::Circle_2 &a, const typename CK::Circular_arc_point_2 &p) { typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; Polynomial_for_circles_2_2 equation = CircularFunctors::get_equation(a); return (AK().sign_at_object()(equation,p.coordinates()) == ZERO); } template < class CK > inline bool non_oriented_equal(const typename CK::Circle_2 & c1, const typename CK::Circle_2 & c2) { if(identical(c1,c2)) return true; return (c1.squared_radius() == c2.squared_radius()) && (c1.center() == c2.center()); } template < class CK > inline typename CK::Linear_kernel::Bounded_side bounded_side(const typename CK::Circle_2 &c, const typename CK::Circular_arc_point_2 &p) { typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_for_circles_2_2 Equation; Equation equation = get_equation(c); Sign sign = AK().sign_at_object()(equation,p.coordinates()); if(sign == NEGATIVE) return ON_BOUNDED_SIDE; else if(sign == POSITIVE) return ON_UNBOUNDED_SIDE; else return ON_BOUNDARY; } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Circle_2 & c1, const typename CK::Circle_2 & c2, OutputIterator res ) { typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_for_circles_2_2 Equation; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; Equation e1 = CircularFunctors::get_equation(c1); Equation e2 = CircularFunctors::get_equation(c2); if (e1 == e2) { *res++ = make_object(e1); return res; } typedef std::vector< std::pair < Root_for_circles_2_2, unsigned > > solutions_container; solutions_container solutions; AK().solve_object()(e1, e2, std::back_inserter(solutions)); typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; for ( typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it ) { *res++ = make_object(std::make_pair(Circular_arc_point_2(it->first), it->second )); } return res; } template typename CK::Circular_arc_point_2 x_extremal_point(const typename CK::Circle_2 & c, bool i) { typedef typename CK::Algebraic_kernel AK; return AK().x_critical_points_object()(typename CK::Get_equation()(c),i); } template OutputIterator x_extremal_points(const typename CK::Circle_2 & c, OutputIterator res) { typedef typename CK::Algebraic_kernel AK; return AK().x_critical_points_object()(typename CK::Get_equation()(c),res); } template typename CK::Circular_arc_point_2 y_extremal_point(const typename CK::Circle_2 & c, bool i) { typedef typename CK::Algebraic_kernel AK; return AK().y_critical_points_object()(typename CK::Get_equation()(c),i); } template OutputIterator y_extremal_points(const typename CK::Circle_2 & c, OutputIterator res) { typedef typename CK::Algebraic_kernel AK; return AK().y_critical_points_object()(typename CK::Get_equation()(c),res); } } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" 2 namespace CGAL { namespace CircularFunctors { template < class CK > inline Comparison_result compare_x(const typename CK::Circular_arc_point_2 &p0, const typename CK::Circular_arc_point_2 &p1) { typedef typename CK::Algebraic_kernel AK; if(p0.equal_ref(p1)) return static_cast(0); return AK().compare_x_object()(p0.coordinates(), p1.coordinates()); } template < class CK > inline Comparison_result compare_y(const typename CK::Circular_arc_point_2 &p0, const typename CK::Circular_arc_point_2 &p1) { typedef typename CK::Algebraic_kernel AK; if(p0.equal_ref(p1)) return static_cast(0); return AK().compare_y_object()(p0.coordinates(), p1.coordinates()); } template < class CK > Comparison_result compare_xy(const typename CK::Circular_arc_point_2 &p0, const typename CK::Circular_arc_point_2 &p1) { if(p0.equal_ref(p1)){ return EQUAL; } typedef typename CK::Algebraic_kernel AK; return AK().compare_xy_object()(p0.coordinates(), p1.coordinates()); } template < class CK > Orientation orientation(const typename CK::Circular_arc_point_2 &p, const typename CK::Circular_arc_point_2 &q, const typename CK::Circular_arc_point_2 &r) { typedef typename CK::Root_of_2 Root_of_2; const Root_of_2 px = p.x(); const Root_of_2 py = p.y(); const Root_of_2 qx = q.x(); const Root_of_2 qy = q.y(); const Root_of_2 rx = r.x(); const Root_of_2 ry = r.y(); const Root_of_2 a00 = qx-px; const Root_of_2 a01 = qy-py; const Root_of_2 a10 = rx-px; const Root_of_2 a11 = ry-py; return ::CGAL:: compare(a00*a11, a10*a01); } # 156 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" template < class CK > bool point_in_x_range(const typename CK::Circular_arc_point_2 &source, const typename CK::Circular_arc_point_2 &target, const typename CK::Circular_arc_point_2 &p) { return ( (CircularFunctors::compare_x(p, source) != CircularFunctors::compare_x(p, target)) || (CircularFunctors::compare_x(p, source) == CGAL::EQUAL) ); } template < class CK > bool point_in_x_range(const typename CK::Circular_arc_2 &A, const typename CK::Circular_arc_point_2 &p) { return CircularFunctors::compare_x( p, A.source()) != CircularFunctors::compare_x(p, A.target() ); } template < class CK > Comparison_result compare_y_at_x(const typename CK::Circular_arc_point_2 &p, const typename CK::Circular_arc_2 &A1) { if((p.equal_ref(A1.source())) || (p.equal_ref(A1.target()))){ return EQUAL; } Comparison_result sgn = CGAL::compare(p.y(), A1.supporting_circle().center().y()); Comparison_result cmp = A1.on_upper_part() ? LARGER : SMALLER; if (sgn == opposite(cmp)) return sgn; typedef typename CK::Root_of_2 Root; Root dx_sqr = CGAL::square(p.x() - A1.supporting_circle().center().x()); Root dy_sqr = CGAL::square(p.y() - A1.supporting_circle().center().y()); Comparison_result distance_to_center = CGAL::compare(dx_sqr, A1.supporting_circle().squared_radius() - dy_sqr); if (cmp > 0) return distance_to_center; else return opposite(distance_to_center); } template < class CK > Comparison_result compare_y_to_right(const typename CK::Circular_arc_2 &A1, const typename CK::Circular_arc_2 &A2, const typename CK::Circular_arc_point_2 &p) { typedef std::vector solutions_container; typedef typename CK::Circular_arc_2 Circular_arc_2; # 242 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" const typename CK::Circle_2 & C1 = A1.supporting_circle(); const typename CK::Circle_2 & C2 = A2.supporting_circle(); if (CircularFunctors::non_oriented_equal(C1,C2)) { bool b1 = A1.on_upper_part(); bool b2 = A2.on_upper_part(); if (b1 == b2) return EQUAL; if (b1 == true && b2 == false) return LARGER; (CGAL::possibly(b1 == false && b2 == true)?(static_cast(0)): ::CGAL::assertion_fail( "b1 == false && b2 == true" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 254)); return SMALLER; } const typename CK::Root_of_2 b1_y = C1.center().y() - p.y(); const typename CK::Root_of_2 b2_y = C2.center().y() - p.y(); int s_b1_y = CGAL::sign(b1_y); int s_b2_y = CGAL::sign(b2_y); if (s_b1_y == 0) { if (s_b2_y != 0) return A1.on_upper_part() ? LARGER : SMALLER; bool b1 = A1.on_upper_part(); bool b2 = A2.on_upper_part(); if (b1 == b2) return b1 ? compare_x(C1.center(), C2.center()) : compare_x(C2.center(), C1.center()); if (b1 == true && b2 == false) return LARGER; (CGAL::possibly(b1 == false && b2 == true)?(static_cast(0)): ::CGAL::assertion_fail( "b1 == false && b2 == true" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 276)); return SMALLER; } if (s_b2_y == 0) { return A2.on_upper_part() ? SMALLER : LARGER; } (CGAL::possibly(s_b1_y != 0)?(static_cast(0)): ::CGAL::assertion_fail( "s_b1_y != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 286)); (CGAL::possibly(s_b2_y != 0)?(static_cast(0)): ::CGAL::assertion_fail( "s_b2_y != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 287)); int s_b1_x = (int) CGAL::compare(p.x(), C1.center().x()); int s_b2_x = (int) CGAL::compare(p.x(), C2.center().x()); Comparison_result cmp = CGAL::compare(s_b1_y * s_b1_x, s_b2_y * s_b2_x); if (cmp != 0) return cmp; if (CGAL::square(squared_distance(C1.center(), C2.center()) - C1.squared_radius() - C2.squared_radius()) < 4 * C1.squared_radius() * C2.squared_radius() ) { return static_cast (CGAL::compare(C1.squared_radius() * CGAL::square(b2_y), C2.squared_radius() * CGAL::square(b1_y)) * s_b1_y * s_b1_x ); } if (s_b1_x * s_b2_x < 0) return compare_y(C1.center(), C2.center()); if (s_b1_x * s_b2_x > 0) return compare_y(C2.center(), C1.center()); (CGAL::possibly(s_b1_x == 0 && s_b2_x == 0)?(static_cast(0)): ::CGAL::assertion_fail( "s_b1_x == 0 && s_b2_x == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 321)); if (s_b1_y == s_b2_y) return compare_y(C2.center(), C1.center()); return compare_y(C1.center(), C2.center()); } template < class CK > inline bool equal(const typename CK::Circular_arc_point_2 &p0, const typename CK::Circular_arc_point_2 &p1) { if(p0.equal_ref(p1)) return static_cast(1); return CircularFunctors::compare_xy(p0, p1) == 0; } template < class CK > bool equal(const typename CK::Circular_arc_2 &A1, const typename CK::Circular_arc_2 &A2) { if(!CircularFunctors::non_oriented_equal( A1.supporting_circle(), A2.supporting_circle())) return false; return (CircularFunctors::equal(A1.source(), A2.source()) && CircularFunctors::equal(A1.target(), A2.target())); } # 403 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" template < class CK > bool has_on(const typename CK::Circular_arc_2 &a, const typename CK::Circular_arc_point_2 &p, const bool has_on_supporting_circle = false) { if( (p.equal_ref(a.source())) || (p.equal_ref(a.source()))) { return true; } if(!has_on_supporting_circle) { if ( ! CircularFunctors::has_on(a.supporting_circle(),p) ) return false; } if(a.is_full()) return true; if(a.is_x_monotone()) { int cmp_ps = CircularFunctors::compare_x(p,a.source()); int cmp_pt = CircularFunctors::compare_x(p,a.target()); if(cmp_ps == cmp_pt) return false; int cmp = CGAL::compare(p.y(), a.supporting_circle().center().y()); return cmp == 0 || (cmp > 0 && a.on_upper_part()) || (cmp < 0 && !a.on_upper_part()); } else if(a.is_complementary_x_monotone()) { int cmp_ps = CircularFunctors::compare_x(p,a.source()); int cmp_pt = CircularFunctors::compare_x(p,a.target()); if(cmp_ps == cmp_pt) return true; if((!cmp_ps) || (!cmp_pt)) return true; int cmp = CGAL::compare(p.y(), a.supporting_circle().center().y()); return cmp == 0 || (cmp < 0 && a.complementary_on_upper_part()) || (cmp > 0 && !a.complementary_on_upper_part()); } else if(a.is_y_monotone()) { int cmp_ps = CircularFunctors::compare_y(p,a.source()); int cmp_pt = CircularFunctors::compare_y(p,a.target()); if(cmp_ps == cmp_pt) return false; int cmp = CGAL::compare(p.x(), a.supporting_circle().center().x()); return cmp == 0 || (cmp < 0 && a.on_left_part()) || (cmp > 0 && !a.on_left_part()); } else if(a.is_complementary_y_monotone()) { int cmp_ps = CircularFunctors::compare_y(p,a.source()); int cmp_pt = CircularFunctors::compare_y(p,a.target()); if(cmp_ps == cmp_pt) return true; if((!cmp_ps) || (!cmp_pt)) return true; int cmp = CGAL::compare(p.x(), a.supporting_circle().center().x()); return cmp == 0 || (cmp > 0 && a.complementary_on_left_part()) || (cmp < 0 && !a.complementary_on_left_part()); } else { int cmp_scy = CGAL::compare(a.source().y(), a.supporting_circle().center().y()); int cmp = CGAL::compare(p.y(), a.supporting_circle().center().y()); if(cmp_scy < 0) { if(cmp > 0) return CGAL::compare(p.x(), a.target().x()) >= 0; else return CGAL::compare(p.x(), a.source().x()) >= 0; } else { if(cmp > 0) return CGAL::compare(p.x(), a.source().x()) <= 0; else return CGAL::compare(p.x(), a.target().x()) <= 0; } } } template < class CK > bool do_overlap(const typename CK::Circular_arc_2 &A1, const typename CK::Circular_arc_2 &A2) { if(!CircularFunctors::non_oriented_equal( A1.supporting_circle(), A2.supporting_circle())) return false; if(A1.is_full()) return true; if(A2.is_full()) return true; if((has_on(A1,A2.target(),true)) || (has_on(A1,A2.source(),true))) return true; return has_on(A2,A1.source(),true); } template < class CK > void split(const typename CK::Circular_arc_2 &A, const typename CK::Circular_arc_point_2 &p, typename CK::Circular_arc_2 &ca1, typename CK::Circular_arc_2 &ca2) { (CGAL::possibly(CircularFunctors::has_on(A, p))?(static_cast(0)): ::CGAL::precondition_fail( "CircularFunctors::has_on(A, p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 498)); typedef typename CK::Circular_arc_2 Circular_arc_2; const Circular_arc_2 &rc1 = Circular_arc_2( A.supporting_circle(), A.source(), p); const Circular_arc_2 &rc2 = Circular_arc_2( A.supporting_circle(), p, A.target()); if ( CircularFunctors::compare_x(rc1.source(), rc2.source()) != SMALLER) { ca1 = rc2; ca2 = rc1; } else { ca1 = rc1; ca2 = rc2; } # 536 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Circular_arc_2 &a1, const typename CK::Circular_arc_2 &a2, OutputIterator res ) { typedef std::vector solutions_container; typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; # 636 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" const bool sqr1_eq_sqr2 = (a1.squared_radius() == a2.squared_radius()); const bool c1_eq_c2 = (a1.center() == a2.center()); if(sqr1_eq_sqr2 && c1_eq_c2) { if(a1.is_full()) { *res++ = make_object(a2); } else if(a2.is_full()) { *res++ = make_object(a1); } else { bool t2_in_a1 = has_on(a1,a2.target(),true); bool s2_in_a1 = has_on(a1,a2.source(),true); if(t2_in_a1 && s2_in_a1) { bool t1_in_a2 = has_on(a2,a1.target(),true); bool s1_in_a2 = has_on(a2,a1.source(),true); if(t1_in_a2 && s1_in_a2) { const Comparison_result comp = CircularFunctors::compare_xy(a1.source(), a2.source()); if(comp < 0) { if(a1.source() == a2.target()) { *res++ = make_object(std::make_pair(a1.source(),1u)); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); *res++ = make_object(arc); } if(a2.source() == a1.target()) { *res++ = make_object(std::make_pair(a2.source(),1u)); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); *res++ = make_object(arc); } } else if (comp > 0) { if(a2.source() == a1.target()) { *res++ = make_object(std::make_pair(a2.source(),1u)); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); *res++ = make_object(arc); } if(a1.source() == a2.target()) { *res++ = make_object(std::make_pair(a1.source(),1u)); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); *res++ = make_object(arc); } } else { *res++ = make_object(a1); } } else { *res++ = make_object(a2); } } else if(t2_in_a1) { if(a1.source() == a2.target()) *res++ = make_object(std::make_pair(a1.source(),1u)); else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a1.source(),a2.target()); *res++ = make_object(arc); } } else if(s2_in_a1) { if(a2.source() == a1.target()) { *res++ = make_object(std::make_pair(a2.source(),1u)); } else { const Circular_arc_2 & arc = Circular_arc_2(a1.supporting_circle(),a2.source(),a1.target()); *res++ = make_object(arc); } } else if(has_on(a2,a1.source(),true)) { *res++ = make_object(a1); } } } else if(!c1_eq_c2) { solutions_container solutions; intersection( a1.supporting_circle(), a2.supporting_circle(), std::back_inserter(solutions) ); # 735 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" if(solutions.size() == 0) return res; else { for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { const std::pair *result = CGAL::object_cast > (&(*it)); # 753 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" if (has_on(a1,result->first,true) && has_on(a2,result->first,true)) { *res++ = *it; } } } } return res; } # 1046 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" template < class CK > bool is_vertical(const typename CK::Circular_arc_2 &) { return false; } template < class CK, class OutputIterator > OutputIterator make_x_monotone( const typename CK::Circular_arc_2 &A, OutputIterator res ) { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::FT FT; typedef typename CK::Point_2 Point_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; (CGAL::possibly(A.supporting_circle().squared_radius() != 0)?(static_cast(0)): ::CGAL::precondition_fail( "A.supporting_circle().squared_radius() != 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 1065)); if (A.is_x_monotone()) { *res++ = make_object(A); return res; } std::vector< Root_for_circles_2_2 > vector_x_extremal_points; CircularFunctors::x_extremal_points(A.supporting_circle(), std::back_inserter(vector_x_extremal_points)); Circular_arc_point_2 x_extremal_point1 = vector_x_extremal_points[0]; Circular_arc_point_2 x_extremal_point2 = vector_x_extremal_points[1]; if (A.is_full()) { const Circular_arc_2 &ca1 = Circular_arc_2(A.supporting_circle(), x_extremal_point1, x_extremal_point2); const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, x_extremal_point1); ca1._setx_info(2,1,0); ca2._setx_info(2,2,0); *res++ = make_object(ca1); *res++ = make_object(ca2); # 1116 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" return res; } int cmp_begin = CGAL::compare(A.source().y(), A.center().y()); int cmp_end = CGAL::compare(A.target().y(), A.center().y()); if (cmp_begin > 0) { const Circular_arc_2 &ca1 = Circular_arc_2(A.supporting_circle(), A.source(), x_extremal_point1); ca1._setx_info(2,2,0); *res++ = make_object(ca1); if (cmp_end > 0) { const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point1, x_extremal_point2); const Circular_arc_2 &ca3 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, A.target()); ca2._setx_info(2,1,0); ca3._setx_info(2,2,0); *res++ = make_object(ca2); *res++ = make_object(ca3); # 1165 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" } else { const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point1, A.target()); ca2._setx_info(2,1,0); *res++ = make_object(ca2); } } else if (cmp_begin < 0) { const Circular_arc_2 &ca1 = Circular_arc_2(A.supporting_circle(), A.source(), x_extremal_point2); ca1._setx_info(2,1,0); *res++ = make_object(ca1); if (cmp_end < 0) { const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, x_extremal_point1); const Circular_arc_2 &ca3 = Circular_arc_2(A.supporting_circle(), x_extremal_point1, A.target()); ca2._setx_info(2,2,0); ca3._setx_info(2,1,0); *res++ = make_object(ca2); *res++ = make_object(ca3); # 1226 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" } else { const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, A.target()); ca2._setx_info(2,2,0); *res++ = make_object(ca2); } } else { if (CGAL::compare(A.source().x(), A.center().x()) < 0) { (CGAL::possibly(cmp_end >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "cmp_end >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 1249)); const Circular_arc_2 &ca1 = Circular_arc_2(A.supporting_circle(), x_extremal_point1, x_extremal_point2); const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, A.target()); ca1._setx_info(2,1,0); ca2._setx_info(2,2,0); *res++ = make_object(ca1); *res++ = make_object(ca2); } else { (CGAL::possibly(CGAL::compare(A.source().x(), A.center().x()) > 0)?(static_cast(0)): ::CGAL::assertion_fail( "CGAL::compare(A.source().x(), A.center().x()) > 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" # 1275 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" , 1276 # 1275 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" )) ; (CGAL::possibly(cmp_end != LARGER)?(static_cast(0)): ::CGAL::assertion_fail( "cmp_end != LARGER" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 1277)); const Circular_arc_2 &ca1 = Circular_arc_2(A.supporting_circle(), x_extremal_point2, x_extremal_point1); const Circular_arc_2 &ca2 = Circular_arc_2(A.supporting_circle(), x_extremal_point1, A.target()); ca1._setx_info(2,2,0); ca2._setx_info(2,1,0); *res++ = make_object(ca1); *res++ = make_object(ca2); } } return res; } # 1316 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" template < class CK, class OutputIterator > OutputIterator advanced_make_x_monotone( const typename CK::Circular_arc_2 &A, OutputIterator res ) { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::FT FT; typedef typename CK::Point_2 Point_2; typedef std::pair S_pair; int cmp_begin_y = CGAL::compare (A.source().y(), A.supporting_circle().center().y()); int cmp_end_y = CGAL::compare (A.target().y(), A.supporting_circle().center().y()); int cmp_x=compare_x(A.source(),A.target()); if ((cmp_begin_y != opposite(cmp_end_y)) && ((((cmp_begin_y > 0) || (cmp_end_y > 0)) && (cmp_x > 0)) || (((cmp_begin_y < 0) || (cmp_end_y < 0)) && (cmp_x < 0)))) { *res++ = S_pair(make_object(A),(cmp_begin_y>0 || cmp_end_y>0) ); return res; } if (cmp_begin_y == 0 && cmp_end_y == 0 && cmp_x != 0) { *res++ = std::make_pair(make_object(A), cmp_x>0 ); return res; } if (cmp_begin_y > 0) { *res++ = S_pair (make_object(Circular_arc_2(A.supporting_circle(), A.source(), CircularFunctors::x_extremal_point (A.supporting_circle(),true))), true); if (cmp_end_y > 0) { *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),true), CircularFunctors::x_extremal_point (A.supporting_circle(),false))), false); *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),false), A.target())), true); } else { *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),true), A.target())), false); } } else if (cmp_begin_y < 0) { *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), A.source(), CircularFunctors::x_extremal_point (A.supporting_circle(),false))), false); if (cmp_end_y < CGAL::EQUAL) { *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),false), CircularFunctors::x_extremal_point (A.supporting_circle(),true))) , true ); *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),true), A.target())), false); } else { *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),false), A.target())), true); } } else { if ( compare(A.source().x(),A.supporting_circle().center().x())< 0) { (CGAL::possibly(cmp_end_y >= 0)?(static_cast(0)): ::CGAL::assertion_fail( "cmp_end_y >= 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 1421)); *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), A.source(), CircularFunctors::x_extremal_point (A.supporting_circle(),false))), false); *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),false), A.target())), true); } else { (CGAL::possibly(compare(A.source().x(),A.supporting_circle().center().x())< 0)?(static_cast(0)): ::CGAL::assertion_fail( "compare(A.source().x(),A.supporting_circle().center().x())< 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 1437)); (CGAL::possibly(cmp_end_y != LARGER)?(static_cast(0)): ::CGAL::assertion_fail( "cmp_end_y != LARGER" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h", 1438)); *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), A.source(), CircularFunctors::x_extremal_point (A.supporting_circle(),true))), true); *res++ = std::make_pair (make_object(Circular_arc_2 (A.supporting_circle(), CircularFunctors::x_extremal_point (A.supporting_circle(),true), A.target())), false); } } return res; } # 1469 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" template < typename CK , typename Output_iterator> Output_iterator advanced_make_xy_monotone( const typename CK::Circular_arc_2 &a, Output_iterator res) { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef std::pair relat_pos; typedef std::pair< CGAL::Object, bool> Obj_descr_1; typedef std::pair< CGAL::Object, relat_pos> Obj_descr_2; typedef std::vector Obj_vector_1; typedef std::vector Obj_vector_2; Obj_vector_1 vec; Obj_vector_2 vec2; Obj_descr_2 dscr2; advanced_make_x_monotone(a,std::back_inserter(vec)); for(unsigned int i=0;i(&vec.at(i).first); int cmp_begin_x = CGAL::compare (tmp_arc->source().x(), tmp_arc->supporting_circle().center().x()); int cmp_end_x = CGAL::compare (tmp_arc->target().x(), tmp_arc->supporting_circle().center().x()); if(cmp_begin_x!=opposite(cmp_end_x) || cmp_begin_x==CGAL::EQUAL) { dscr2.first=vec.at(i).first; dscr2.second.first=vec.at(i).second; dscr2.second.second= (cmp_begin_x==CGAL::SMALLER || cmp_end_x==CGAL::SMALLER ) ? true : false; *res++=dscr2; } else{ Obj_descr_1 tmp=vec.at(i); Obj_descr_2 tmp1,tmp2; const Circular_arc_2 *tmp_arc = CGAL::object_cast(&tmp.first); tmp1.first = make_object (Circular_arc_2(a.supporting_circle(),tmp_arc->source(), CircularFunctors::y_extremal_point (a.supporting_circle(),!tmp.second))); tmp1.second.first=tmp.second; tmp1.second.second= (tmp.second)? false : true ; tmp2.first = make_object (Circular_arc_2(a.supporting_circle(), CircularFunctors::y_extremal_point (a.supporting_circle(),!tmp.second), tmp_arc->target())); tmp2.second.first=tmp.second; tmp2.second.second= (tmp.second)? true : false ; *res++=tmp1; *res++=tmp2; } } return res; } template CGAL::Bbox_2 circular_arc_bbox ( const typename CK::Kernel_base::Circular_arc_2 & a) { typedef typename CK::Root_of_2 Root_of_2; typedef typename CK::FT FT; typedef CGAL::Interval_nt::Protector IntervalProtector; typedef CGAL::Interval_nt Interval; if(a.is_x_monotone()) { if(a.is_y_monotone()) return a.left().bbox() + a.right().bbox(); bool is_on_upper = a.on_upper_part(); Bbox_2 left_bb = a.left().bbox(), right_bb = a.right().bbox(); IntervalProtector ip; Interval cy = to_interval(a.center().y()); Interval r2 = to_interval(a.squared_radius()); Interval r = CGAL::sqrt(r2); double ymin, ymax; if(is_on_upper) { ymin = (CGAL::min)(left_bb.ymin(),right_bb.ymin()); ymax = cy.sup() + r.sup(); } else { ymin = cy.inf() - r.sup(); ymax = (CGAL::max)(left_bb.ymax(),right_bb.ymax()); } # 1585 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" return Bbox_2(left_bb.xmin(),ymin,right_bb.xmax(),ymax); } if(a.is_y_monotone()) { bool is_on_left = a.on_left_part(); IntervalProtector ip; Bbox_2 source_bb = a.source().bbox(), target_bb = a.target().bbox(); Interval cx = to_interval(a.center().x()); Interval r2 = to_interval(a.squared_radius()); Interval r = CGAL::sqrt(r2); double xmin, xmax; if(is_on_left) { xmax = (CGAL::max)(source_bb.xmax(), target_bb.xmax()); xmin = cx.inf() - r.sup(); } else { xmax = cx.sup() + r.sup(); xmin = (CGAL::min)(source_bb.xmin(), target_bb.xmin()); } return Bbox_2(xmin, (CGAL::min)(source_bb.ymin(),target_bb.ymin()), xmax, (CGAL::max)(source_bb.ymax(),target_bb.ymax())); } return a.supporting_circle().bbox(); # 1673 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h" } } } # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" 2 namespace CGAL { namespace internal { template class Circular_arc_2_base { public: typedef CK_ CK; typedef typename CK::FT FT; typedef typename CK::RT RT; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Root_of_2 Root_of_2; private: typedef struct bit_field { unsigned short int is_full:2; unsigned short int is_x_monotonic:2; unsigned short int is_y_monotonic:2; unsigned short int two_end_points_on_upper_part:2; unsigned short int two_end_points_on_left_part:2; unsigned short int is_complementary_x_monotone:1; unsigned short int is_complementary_y_monotone:1; } bit_field; private: void reset_flags() const { flags.is_full = 0; flags.is_x_monotonic = 0; flags.is_y_monotonic = 0; flags.two_end_points_on_upper_part = 0; flags.two_end_points_on_left_part = 0; flags.is_complementary_x_monotone = 0; flags.is_complementary_y_monotone = 0; } public: Circular_arc_2_base() { reset_flags(); } Circular_arc_2_base(const Circle_2 &c) : _support(c) { reset_flags(); flags.is_full = 2; _begin = _end = CircularFunctors::x_extremal_point(supporting_circle(),true); } Circular_arc_2_base(const Circle_2 &support, const Line_2 &l1, bool b1, const Line_2 &l2, bool b2) { Point_2 center1 (support.center().x() + l1.a()/2, support.center().y() + l1.b()/2); FT sqr1 = support.squared_radius() + l1.c() - CGAL::square(support.center().x()) - CGAL::square(support.center().y()) + CGAL::square(center1.x()) + CGAL::square(center1.y()); Circle_2 c1 (center1, sqr1); Point_2 center2 (support.center().x() + l2.a()/2, support.center().y() + l2.b()/2); FT sqr2 = support.squared_radius() + l2.c() - CGAL::square(support.center().x()) - CGAL::square(support.center().y()) + CGAL::square(center2.x()) + CGAL::square(center2.y()); Circle_2 c2 (center2, sqr2); *this = Circular_arc_2_base(support, c1, b1, c2, b2); (CGAL::possibly(do_intersect(support, c1))?(static_cast(0)): ::CGAL::assertion_fail( "do_intersect(support, c1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 152)); (CGAL::possibly(do_intersect(support, c2))?(static_cast(0)): ::CGAL::assertion_fail( "do_intersect(support, c2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 153)); } Circular_arc_2_base(const Circle_2 &c, const Circle_2 &c1, const bool b_1, const Circle_2 &c2, const bool b_2) : _support(c) { reset_flags(); if (c1 != c2) { _begin = CGAL::circle_intersect(c, c1, b_1); _end = CGAL::circle_intersect(c, c2, b_2); } else{ typedef std::vector solutions_container; solutions_container solutions; intersection( c, c1, std::back_inserter(solutions) ); typename solutions_container::iterator it = solutions.begin(); (CGAL::possibly(it != solutions.end())?(static_cast(0)): ::CGAL::precondition_fail( "it != solutions.end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 182)); const std::pair *result; result = CGAL::object_cast< std::pair > (&(*it)); if ( result->second == 2 ){ _begin = result->first; _end = result->first; } else{ if (b_1) _begin = result->first; if (b_2) _end = result->first; if (!(b_1 & b_2)) { ++it; result = CGAL::object_cast< std::pair >(&(*it)); if (!b_1) _begin = result->first; if (!b_2) _end = result->first; } } } } Circular_arc_2_base(const Circular_arc_2_base &A, const bool b, const Circle_2 &ccut, const bool b_cut) : _support(A.supporting_circle()) { reset_flags(); (CGAL::possibly(A.is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "A.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 228)); (CGAL::possibly(do_intersect(A.supporting_circle(), ccut))?(static_cast(0)): ::CGAL::precondition_fail( "do_intersect(A.supporting_circle(), ccut)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 229)); Circular_arc_point_2 new_p = CGAL::circle_intersect(A.supporting_circle(), ccut, b_cut); (CGAL::possibly(A.on_upper_part() == (CGAL::compare(new_p.y(), A.center().y()) >= 0))?(static_cast(0)): ::CGAL::assertion_fail( "A.on_upper_part() == (CGAL::compare(new_p.y(), A.center().y()) >= 0)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" # 235 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" , 236 # 235 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" )) ; if (b) { _begin = A._begin; _end = new_p; } else { _begin = new_p; _end = A._end; } } Circular_arc_2_base(const Point_2 &begin, const Point_2 &middle, const Point_2 &end) : _begin(begin), _end(end) { reset_flags(); (CGAL::possibly(!CGAL::collinear(begin, middle, end))?(static_cast(0)): ::CGAL::precondition_fail( "!CGAL::collinear(begin, middle, end)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 265)); _support = Circle_2(begin, middle, end); # 276 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" } Circular_arc_2_base(const Circle_2 &support, const Circular_arc_point_2 &source, const Circular_arc_point_2 &target) : _begin(source), _end(target), _support(support) { reset_flags(); # 298 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" } Circular_arc_2_base(const Point_2 &begin, const Point_2 &end, const FT &bulge) : _begin(begin), _end(end) { reset_flags(); const FT sqr_bulge = CGAL::square(bulge); const FT common = (FT(1) - sqr_bulge) / (FT(4)*bulge); const FT x_coord = (begin.x() + end.x())/FT(2) + common*(begin.y() - end.y()); const FT y_coord = (begin.y() + end.y())/FT(2) + common*(end.x() - begin.x()); const FT sqr_rad = squared_distance(begin, end) * (FT(1)/sqr_bulge + FT(2) + sqr_bulge) / FT(16); _support = Circle_2(Point_2(x_coord, y_coord), sqr_rad); } private: Circular_arc_point_2 _begin, _end; Circle_2 _support; mutable bit_field flags; public: # 385 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" const Circular_arc_point_2 & left() const { (CGAL::possibly(is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 387)); (CGAL::possibly(on_upper_part() ? compare_xy(_end,_begin)<0 : compare_xy(_begin,_end)<0)?(static_cast(0)): ::CGAL::precondition_fail( "on_upper_part() ? compare_xy(_end,_begin)<0 : compare_xy(_begin,_end)<0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" # 388 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" , 389 # 388 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" )) ; if (on_upper_part()) return _end; return _begin; } const Circular_arc_point_2 & right() const { (CGAL::possibly(is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 396)); (CGAL::possibly(on_upper_part() ? compare_xy(_end,_begin)<0 : compare_xy(_begin,_end)<0)?(static_cast(0)): ::CGAL::precondition_fail( "on_upper_part() ? compare_xy(_end,_begin)<0 : compare_xy(_begin,_end)<0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" # 397 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" , 398 # 397 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" )) ; if (on_upper_part()) return _begin; return _end; } const Circular_arc_point_2 & source() const { return _begin; } const Circular_arc_point_2 & target() const { return _end; } bool is_full() const { return flags.is_full == 2; } private: bool _is_x_monotone() const { if (is_full()) return false; int cmp_begin = CGAL::compare(_begin.y(), center().y()); int cmp_end = CGAL::compare(_end.y(), center().y()); if (cmp_begin == opposite(cmp_end) && cmp_begin != 0) return false; flags.is_complementary_x_monotone = 1; int cmp_x = compare_x(_begin, _end); if (cmp_begin > 0 || cmp_end > 0) return cmp_x > 0; if (cmp_begin < 0 || cmp_end < 0) return cmp_x < 0; (CGAL::possibly(cmp_begin == 0 && cmp_end == 0)?(static_cast(0)): ::CGAL::assertion_fail( "cmp_begin == 0 && cmp_end == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 453)); return cmp_x != 0; } bool _is_y_monotone() const { if (is_full()) return false; int cmp_begin = CGAL::compare(_begin.x(), center().x()); int cmp_end = CGAL::compare(_end.x(), center().x()); if (cmp_begin == opposite(cmp_end) && cmp_begin != 0) return false; flags.is_complementary_y_monotone = 1; int cmp_y = compare_y(_begin, _end); if (cmp_begin > 0 || cmp_end > 0) return cmp_y < 0; if (cmp_begin < 0 || cmp_end < 0) return cmp_y > 0; (CGAL::possibly(cmp_begin == 0 && cmp_end == 0)?(static_cast(0)): ::CGAL::assertion_fail( "cmp_begin == 0 && cmp_end == 0" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 485)); return cmp_y != 0; } bool _two_end_points_on_upper_part() const { int c1y = CGAL::compare(_begin.y(), supporting_circle().center().y()); if(c1y > 0) return true; if(c1y < 0) return false; int c2y = CGAL::compare(_end.y(), supporting_circle().center().y()); if(c2y > 0) return true; if(c2y < 0) return false; return compare_x(_begin, _end) > 0; } bool _two_end_points_on_left_part() const { int c1x = CGAL::compare(_begin.x(), supporting_circle().center().x()); if(c1x < 0) return true; if(c1x > 0) return false; int c2x = CGAL::compare(_end.x(), supporting_circle().center().x()); if(c2x < 0) return true; if(c2x > 0) return false; return compare_y(_begin, _end) > 0; } public: bool is_x_monotone() const { if(flags.is_x_monotonic == 0) { bool b = _is_x_monotone(); if(b) { flags.is_x_monotonic = 2; flags.is_complementary_x_monotone = 0; } else flags.is_x_monotonic = 1; return b; } else { return (flags.is_x_monotonic == 1) ? false : true; } } bool is_complementary_x_monotone() const { is_x_monotone(); return (flags.is_complementary_x_monotone == 0) ? false : true; } bool is_y_monotone() const { if(flags.is_y_monotonic == 0) { bool b = _is_y_monotone(); if(b) { flags.is_y_monotonic = 2; flags.is_complementary_y_monotone = 0; } else flags.is_y_monotonic = 1; return b; } else { return (flags.is_y_monotonic == 1) ? false : true; } } bool is_complementary_y_monotone() const { is_y_monotone(); return (flags.is_complementary_y_monotone == 0) ? false : true; } bool two_end_points_on_upper_part() const { if(flags.two_end_points_on_upper_part == 0) { bool b = _two_end_points_on_upper_part(); if(b) flags.two_end_points_on_upper_part = 2; else flags.two_end_points_on_upper_part = 1; return b; } else { return (flags.two_end_points_on_upper_part == 1) ? false : true; } } bool on_upper_part() const { (CGAL::possibly(is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 579)); return two_end_points_on_upper_part(); } bool complementary_on_upper_part() const { if(is_x_monotone()) return false; return two_end_points_on_upper_part(); } bool two_end_points_on_left_part() const { if(flags.two_end_points_on_left_part == 0) { bool b = _two_end_points_on_left_part(); if(b) flags.two_end_points_on_left_part = 2; else flags.two_end_points_on_left_part = 1; return b; } else { return (flags.two_end_points_on_left_part == 1) ? false : true; } } bool on_left_part() const { (CGAL::possibly(is_y_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "is_y_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h", 603)); return two_end_points_on_left_part(); } bool complementary_on_left_part() const { if(is_y_monotone()) return false; return two_end_points_on_left_part(); } # 631 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" const Circle_2 & supporting_circle() const { return _support; } const Point_2 & center() const { return supporting_circle().center(); } const FT & squared_radius() const { return supporting_circle().squared_radius(); } Bbox_2 bbox() const { return CGAL::CircularFunctors::circular_arc_bbox(*this); } void _setx_info(unsigned short int v_is_x_monotone, unsigned short int v_two_end_points_on_upper_part, unsigned short int v_is_complementary_x_monotone) const { flags.is_x_monotonic = v_is_x_monotone; flags.two_end_points_on_upper_part = v_two_end_points_on_upper_part; flags.is_complementary_x_monotone = v_is_complementary_x_monotone; } }; # 674 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" template < typename CK > std::ostream & operator<<(std::ostream & os, const Circular_arc_2_base &a) { return os << a.supporting_circle() << " " << a.source() << " " << a.target() << " "; } template < typename CK > std::istream & operator>>(std::istream & is, Circular_arc_2_base &a) { typename CK::Circle_2 s; typename CK::Circular_arc_point_2 p1; typename CK::Circular_arc_point_2 p2; is >> s >> p1 >> p2 ; if (is) a = Circular_arc_2_base(s, p1, p2); return is; } template < typename CK > std::ostream & print(std::ostream & os, const Circular_arc_2_base &a) { if(a.is_x_monotone()) { return os << "Circular_arc_2_base( " << std::endl << "left : " << a.left() << " , " << std::endl << "right : " << a.right() << " , " << std::endl << "upper part : " << a.on_upper_part() << std::endl << " [[ approximate circle is (x,y,r) : " << CGAL::to_double(a.supporting_circle().center().x()) << "" << CGAL::to_double(a.supporting_circle().center().y()) << "" << std::sqrt(CGAL::to_double(a.supporting_circle().squared_radius())) << " ]])" << std::endl; } else { return os << "Circular_arc_2_base( " << std::endl << " [[ approximate circle is (x,y,r) : " << CGAL::to_double(a.supporting_circle().center().x()) << "" << CGAL::to_double(a.supporting_circle().center().y()) << "" << std::sqrt(CGAL::to_double(a.supporting_circle().squared_radius())) << " ]])" << std::endl; } } template < typename CK, typename Base_CK> class Filtered_bbox_circular_arc_2_base : public Base_CK::Circular_arc_2 { typedef Filtered_bbox_circular_arc_2_base Self; typedef typename Base_CK::Circular_arc_2 P_arc; typedef typename CK::FT FT; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Root_of_2 Root_of_2; public: Filtered_bbox_circular_arc_2_base() : P_arc(), bb(__null) {} Filtered_bbox_circular_arc_2_base(const P_arc& arc) : P_arc(arc), bb(__null) {} explicit Filtered_bbox_circular_arc_2_base(const Circle_2 &c) : P_arc(c),bb(__null) {} Filtered_bbox_circular_arc_2_base(const Circle_2 &support, const Line_2 &l1, const bool b_l1, const Line_2 &l2, const bool b_l2) : P_arc(support,l1,b_l1,l2,b_l2),bb(__null) {} Filtered_bbox_circular_arc_2_base(const Circle_2 &c, const Circle_2 &c1, const bool b_1, const Circle_2 &c2, const bool b_2) : P_arc(c,c1,b_1,c2,b_2),bb(__null) {} Filtered_bbox_circular_arc_2_base(const Point_2 &start, const Point_2 &middle, const Point_2 &end) : P_arc(start, middle, end),bb(__null) {} Filtered_bbox_circular_arc_2_base(const Point_2 &begin, const Point_2 &end, const FT &bulge) : P_arc(begin, end, bulge),bb(__null) {} Filtered_bbox_circular_arc_2_base(const Circle_2 &support, const Circular_arc_point_2 &begin, const Circular_arc_point_2 &end) : P_arc(support, begin, end),bb(__null) {} Filtered_bbox_circular_arc_2_base(const Self &c) : P_arc(c), bb(c.bb ? new Bbox_2(*(c.bb)) : __null) {} Filtered_bbox_circular_arc_2_base& operator=(const Self& c) { if(this != &c) { this->P_arc::operator=(c); bb = c.bb ? new Bbox_2(*(c.bb)) : __null; } return *this; } ~Filtered_bbox_circular_arc_2_base() { if(bb) delete bb; } Bbox_2 bbox() const { if(bb==__null) bb=new Bbox_2(CGAL::CircularFunctors::circular_arc_bbox(*this)); return *bb; } bool has_no_bbox() const { return (bb==__null);} private: mutable Bbox_2 *bb; }; } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/global_functions_circular_kernel_2.h" 1 # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/global_functions_circular_kernel_2.h" namespace CGAL { template Circular_arc_point_2 x_extremal_point(const Circle_2 & c, bool i) { return CircularFunctors::x_extremal_point(c,i); } template OutputIterator x_extremal_points(const Circle_2 & c, OutputIterator res) { return CircularFunctors::x_extremal_points(c,res); } template Circular_arc_point_2 y_extremal_point(const Circle_2 & c, bool i) { return CircularFunctors::y_extremal_point(c,i); } template OutputIterator y_extremal_points(const Circle_2 & c, OutputIterator res) { return CircularFunctors::y_extremal_points(c,res); } template< class CK > inline CGAL::Comparison_result compare_x(const Circular_arc_2 &A1, const bool b1, const Circular_arc_2 &A2, const bool b2) { return CK().compare_x_2_object()(A1, b1, A2, b2); } template< class CK > inline CGAL::Comparison_result compare_x(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { return CK().compare_x_2_object()(p, q); } template< class CK > inline CGAL::Comparison_result compare_y(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { return CK().compare_y_2_object()(p, q); } template< class CK > inline CGAL::Comparison_result compare_xy(const Circular_arc_point_2 &p, const Circular_arc_point_2 &q) { return CK().compare_xy_2_object()(p, q); } template< class CK > inline CGAL::Comparison_result compare_y_to_right(const Circular_arc_2 &A1, const Circular_arc_2 &A2, const Circular_arc_point_2 &p) { return CK().compare_y_to_right_2_object()(A1, A2, p); } template < class CK > inline bool has_in_x_range(const Circular_arc_2 &A, const Circular_arc_point_2 &p) { return CK().in_x_range_2_object()(A, p); } template < class CK > CGAL::Comparison_result compare_y_at_x(const Circular_arc_point_2 &p, const Circular_arc_2 &a) { return CK().compare_y_at_x_2_object()(p, a); } template < class CK, class OutputIterator > OutputIterator make_x_monotone(const Circular_arc_2 &A, OutputIterator it) { return CK().make_x_monotone_2_object()(A, it); } template < class CK, class OutputIterator > OutputIterator make_xy_monotone(const Circular_arc_2 &A, OutputIterator it) { return CK().make_xy_monotone_2_object()(A, it); } template< class CK > inline bool has_on(const Circle_2 &c, const Circular_arc_point_2 &p) { return CK().has_on_2_object()(c, p); } template< class CK > inline CGAL::Comparison_result compare_y_to_right(const Line_arc_2 &A1, const Line_arc_2 &A2, const Circular_arc_point_2 &p) { return CK().compare_y_to_right_2_object()(A1, A2, p); } template < class CK > inline bool has_in_x_range(const Line_arc_2 &A, const Circular_arc_point_2 &p) { return CK().in_x_range_2_object()(A, p); } template < class CK > CGAL::Comparison_result compare_y_at_x(const Circular_arc_point_2 &p, const Line_arc_2 &a) { return CK().compare_y_at_x_2_object()(p, a); } template < class CK, class OutputIterator > OutputIterator make_x_monotone(const Line_arc_2 &A, OutputIterator it) { return CK().make_x_monotone_2_object()(A, it); } template < class CK, class OutputIterator > OutputIterator make_xy_monotone(const Line_arc_2 &A, OutputIterator it) { return CK().make_xy_monotone_2_object()(A, it); } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h" namespace CGAL { namespace LinearFunctors { template < class CK > typename CK::Polynomial_1_2 get_equation( const typename CK::Line_2 & L ) { typedef typename CK::RT RT; return typename CK::Polynomial_1_2(L.a(),L.b(),L.c()); } template < class CK > typename CK::Line_2 construct_line_2 ( const typename CK::Polynomial_1_2 &eq ) { return typename CK::Line_2(eq[2],eq[1],eq[0]); } template < class CK > bool has_on(const typename CK::Line_2 & l, const typename CK::Circular_arc_point_2 &p) { typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_1_2 Polynomial_1_2; Polynomial_1_2 equation = CGAL::LinearFunctors::get_equation(l); return(AK().sign_at_object()(equation,p.coordinates())== ZERO); } template < class CK > inline bool non_oriented_equal(const typename CK::Line_2 & a1, const typename CK::Line_2 & a2) { if(identical(a1,a2)) return true; const typename CK::RT &a1c = a1.a(); const typename CK::RT &b1c = a1.b(); const typename CK::RT &c1c = a1.c(); const typename CK::RT &a2c = a2.a(); const typename CK::RT &b2c = a2.b(); const typename CK::RT &c2c = a2.c(); return (a1c*b2c == a2c*b1c) && (a1c*c2c == a2c*c1c) && (b1c*c2c == b2c*c1c); } } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" namespace CGAL { namespace CircularFunctors { template < class CK > bool point_in_x_range(const typename CK::Line_arc_2 &A, const typename CK::Circular_arc_point_2 &p) { return ( (CircularFunctors::compare_x(p, A.source()) != CircularFunctors::compare_x(p, A.target())) || (CircularFunctors::compare_x(p, A.source()) == CGAL::EQUAL) ); } template < class CK > bool equal(const typename CK::Line_arc_2 &A1, const typename CK::Line_arc_2 &A2) { if (!LinearFunctors::non_oriented_equal( A1.supporting_line(),A2.supporting_line())) return false; return ( (equal(A1.source(), A2.source()) && equal(A1.target(), A2.target())) || (equal(A1.target(), A2.source()) && equal(A1.source(), A2.target())) ); } template < class CK > bool do_overlap(const typename CK::Line_arc_2 &A1, const typename CK::Line_arc_2 &A2) { if (!LinearFunctors::non_oriented_equal( A1.supporting_line(),A2.supporting_line())) return false; return CircularFunctors::compare_xy(A1.right(), A2.left()) >= 0 && CircularFunctors::compare_xy(A1.left(), A2.right()) <= 0; } template < class CK > bool has_on(const typename CK::Line_arc_2 &a, const typename CK::Circular_arc_point_2 &p, const bool has_on_supporting_line = false) { if(p.equal_ref(a.source()) || p.equal_ref(a.target())){ return true; } if(!has_on_supporting_line) { if(!CGAL::LinearFunctors::has_on(a.supporting_line(),p)) return false; } return (CircularFunctors::compare_xy(p, a.source()) != CircularFunctors::compare_xy(p, a.target())); } template< class CK> bool is_vertical(const typename CK::Line_arc_2 &l) { return l.supporting_line().is_vertical(); } template< class CK> bool is_x_monotone(const typename CK::Line_arc_2 &l) { return true; } template< class CK> bool is_y_monotone(const typename CK::Line_arc_2 &l) { return true; } template < class CK > Comparison_result compare_y_at_x(const typename CK::Circular_arc_point_2 &p, const typename CK::Line_arc_2 &A1) { if(p.equal_ref(A1.source()) || p.equal_ref(A1.target())){ return EQUAL; } if (CircularFunctors::is_vertical(A1)) { if (p.y() <= A1.right().y()) { if(A1.left().y() <= p.y()) { return CGAL::EQUAL; } return CGAL::SMALLER; } return CGAL::LARGER; } typedef typename CK::Polynomial_1_2 Polynomial_1_2; typedef typename CK::Root_of_2 Root_of_2; Polynomial_1_2 equation = CGAL::LinearFunctors::get_equation(A1.supporting_line()); Root_of_2 y((-p.x()*equation.a() - equation.c())/equation.b()); if (y == p.y()) return CGAL::EQUAL; else if (y < p.y()) return CGAL::LARGER; else return CGAL::SMALLER; } template < class CK > Comparison_result compare_y_to_right(const typename CK::Line_arc_2 &A1, const typename CK::Line_arc_2 &A2, const typename CK::Circular_arc_point_2 & ) { if(A1.supporting_line().is_vertical()){ if(A2.supporting_line().is_vertical()) return CGAL::EQUAL; return CGAL::LARGER; } if(A2.supporting_line().is_vertical()) return CGAL::SMALLER; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Polynomial_1_2 Polynomial_1_2; typedef typename CK::Root_of_2 Root_of_2; Polynomial_1_2 equation; if(A1.right().x() < A2.right().x()){ equation = CGAL::LinearFunctors::get_equation(A2.supporting_line()); Root_of_2 y((-A1.right().x()*equation.a() - equation.c())/equation.b()); Root_of_2 A1_right_y = A1.right().y(); if (y == A1_right_y) return CGAL::EQUAL; if (y < A1_right_y) return CGAL::LARGER; return CGAL::SMALLER; } else{ equation = CGAL::LinearFunctors::get_equation(A1.supporting_line()); Root_of_2 y((-A2.right().x()*equation.a() - equation.c())/equation.b()); Root_of_2 A2_right_y = A2.right().y(); if (y == A2_right_y) return CGAL::EQUAL; if (y < A2_right_y) return CGAL::SMALLER; return CGAL::LARGER; } } template < class CK > Comparison_result compare_y_to_right(const typename CK::Line_arc_2 &A1, const typename CK::Circular_arc_2 &A2, const typename CK::Circular_arc_point_2 &p) { if(A1.supporting_line().is_vertical()) return CGAL::LARGER; typedef typename CK::Polynomial_1_2 Polynomial_1_2; typedef typename CK::Root_of_2 Root_of_2; const typename CK::Circle_2 & C2 = A2.supporting_circle(); Root_of_2 b2_y = C2.center().y() - p.y(); int s_b2_y = CGAL::sign(b2_y); if (s_b2_y == 0) { return A2.on_upper_part() ? CGAL::SMALLER : CGAL::LARGER; } typename CK::Root_of_2 b2_x = C2.center().x() - p.x(); Root_of_2 tangent_2_x; Root_of_2 tangent_2_y; if (b2_y < 0){ tangent_2_x = -b2_y; tangent_2_y = b2_x; } else{ tangent_2_x = b2_y; tangent_2_y = -b2_x; } Polynomial_1_2 equation = CGAL::LinearFunctors::get_equation(A1.supporting_line()); typedef typename CK::FT FT; FT tangent_1_x; FT tangent_1_y; if (equation.b() < 0){ tangent_1_x = -equation.b(); tangent_1_y = equation.a(); } else{ tangent_1_x = equation.b(); tangent_1_y = -equation.a(); } if (((tangent_1_x < 0) && (tangent_2_x > 0)) || ((tangent_1_x > 0) && (tangent_2_x < 0))){ Root_of_2 prod_left = tangent_1_y * tangent_2_x; Root_of_2 prod_right = tangent_2_y * tangent_1_x; if (prod_left < prod_right){ return CGAL::LARGER; } if (prod_left == prod_right){ return A2.on_upper_part() ? CGAL::LARGER : CGAL::SMALLER; } return CGAL::SMALLER; } else{ Root_of_2 prod_left = tangent_1_y * tangent_2_x; Root_of_2 prod_right = tangent_2_y * tangent_1_x; if (prod_left < prod_right){ return CGAL::SMALLER; } if (prod_left == prod_right){ return A2.on_upper_part() ? CGAL::LARGER : CGAL::SMALLER; } return CGAL::LARGER; } } template < class CK > Comparison_result compare_y_to_left(const typename CK::Line_arc_2 &A1, const typename CK::Circular_arc_2 &A2, const typename CK::Circular_arc_point_2 &p) { if(A1.supporting_line().is_vertical()) return CGAL::LARGER; typedef typename CK::Polynomial_1_2 Polynomial_1_2; typedef typename CK::Root_of_2 Root_of_2; const typename CK::Circle_2 & C2 = A2.supporting_circle(); Root_of_2 b2_y = C2.center().y() - p.y(); int s_b2_y = CGAL::sign(b2_y); if (s_b2_y == 0) { return A2.on_upper_part() ? CGAL::SMALLER : CGAL::LARGER; } typename CK::Root_of_2 b2_x = C2.center().x() - p.x(); Root_of_2 tangent_2_x; Root_of_2 tangent_2_y; if (b2_y < 0){ tangent_2_x = -b2_y; tangent_2_y = b2_x; } else{ tangent_2_x = b2_y; tangent_2_y = -b2_x; } Polynomial_1_2 equation = CGAL::LinearFunctors::get_equation(A1.supporting_line()); typedef typename CK::FT FT; FT tangent_1_x; FT tangent_1_y; if (equation.b() < 0){ tangent_1_x = -equation.b(); tangent_1_y = equation.a(); } else{ tangent_1_x = equation.b(); tangent_1_y = -equation.a(); } if (((tangent_1_x < 0) && (tangent_2_x > 0)) || ((tangent_1_x > 0) && (tangent_2_x < 0))){ Root_of_2 prod_left = tangent_1_y * tangent_2_x; Root_of_2 prod_right = tangent_2_y * tangent_1_x; if (prod_left < prod_right){ return CGAL::SMALLER; } if (prod_left == prod_right){ return A2.on_upper_part() ? CGAL::LARGER : CGAL::SMALLER; } return CGAL::LARGER; } else{ Root_of_2 prod_left = tangent_1_y * tangent_2_x; Root_of_2 prod_right = tangent_2_y * tangent_1_x; if (prod_left < prod_right){ return CGAL::LARGER; } if (prod_left == prod_right){ return A2.on_upper_part() ? CGAL::LARGER : CGAL::SMALLER; } return CGAL::SMALLER; } } template < class CK > Comparison_result compare_y_to_right(const typename CK::Circular_arc_2 &A1, const typename CK::Line_arc_2 &A2, const typename CK::Circular_arc_point_2 &p) { if (compare_y_to_right(A2, A1, p) == CGAL::LARGER) return CGAL::SMALLER; return CGAL::LARGER; } template < class CK > void split(const typename CK::Line_arc_2 &A, const typename CK::Circular_arc_point_2 &p, typename CK::Line_arc_2 &ca1, typename CK::Line_arc_2 &ca2) { (CGAL::possibly(has_on(A, p))?(static_cast(0)): ::CGAL::precondition_fail( "has_on(A, p)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h", 363)); typedef typename CK::Line_arc_2 Line_arc_2; ca1 = Line_arc_2( A.supporting_line(), A.source(), p); ca2 = Line_arc_2( A.supporting_line(), p, A.target()); if ( CircularFunctors::compare_xy(ca1.left(), ca2.left()) != SMALLER ) { std::swap(ca1,ca2); } return; } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Line_2 & l, const typename CK::Circle_2 & c, OutputIterator res ) { typedef typename CK::Algebraic_kernel AK; typedef typename CK::Polynomial_1_2 Equation_line; typedef typename CK::Polynomial_for_circles_2_2 Equation_circle; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; Equation_line e1 = CK().get_equation_object()(l); Equation_circle e2 = CK().get_equation_object()(c); typedef std::vector< std::pair < Root_for_circles_2_2, unsigned > > solutions_container; solutions_container solutions; AK().solve_object()(e1, e2, std::back_inserter(solutions)); typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; for ( typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it ) { *res++ = make_object (std::make_pair(Circular_arc_point_2(it->first), it->second )); } return res; } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Line_arc_2 &a1, const typename CK::Line_arc_2 &a2, OutputIterator res ) { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Root_of_2 Root_of_2; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; # 443 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" if(LinearFunctors::non_oriented_equal( a1.supporting_line(),a2.supporting_line())) { if(compare_xy(a1.left(),a2.left()) < 0) { int comparison = compare_xy(a2.left(),a1.right()); if(comparison < 0){ if(compare_xy(a1.right(),a2.right()) <= 0){ *res++ = make_object (Line_arc_2(a1.supporting_line(), a2.left(), a1.right() )); } else{ *res++ = make_object (Line_arc_2(a1.supporting_line(), a2.left(), a2.right() )); } } else if (comparison == 0){ *res++ =make_object ( std::make_pair(a2.left(),1u)); } return res; } else{ int comparison = compare_xy(a1.left(),a2.right()); if(comparison < 0){ if(compare_xy(a1.right(),a2.right()) <= 0){ *res++ = make_object (Line_arc_2(a1.supporting_line(), a1.left(), a1.right() )); } else{ *res++ = make_object (Line_arc_2(a1.supporting_line(), a1.left(), a2.right() )); } } else if (comparison == 0){ *res++ = make_object ( std::make_pair(a1.left(),1u)); } return res; } } Object obj = intersection(a1.supporting_line(), a2.supporting_line()); const Point_2 *pt = CGAL::object_cast(&obj); if(pt == __null) return res; Circular_arc_point_2 intersect_point = Circular_arc_point_2(*pt); if ((CircularFunctors::compare_xy(intersect_point, a1.source()) != CircularFunctors::compare_xy(intersect_point, a1.target())) && (CircularFunctors::compare_xy(intersect_point, a2.source()) != CircularFunctors::compare_xy(intersect_point, a2.target()))) *res++ = make_object(std::make_pair(intersect_point, 1u)); return res; } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Line_arc_2 &l, const typename CK::Circle_2 &c, OutputIterator res ) { typedef std::vector solutions_container; solutions_container solutions; CircularFunctors::intersect_2 ( l.supporting_line(), c, std::back_inserter(solutions) ); for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { const std::pair *result = CGAL::object_cast > (&(*it)); if ( has_on(l,result->first,true)) *res++ = *it; } return res; } # 543 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Circle_2 &c, const typename CK::Line_arc_2 &l, OutputIterator res ) { return intersect_2(l,c,res); } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Line_arc_2 &l, const typename CK::Circular_arc_2 &c, OutputIterator res ) { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef std::vector solutions_container; # 660 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" solutions_container solutions; CGAL::CircularFunctors::intersect_2 ( l.supporting_line(), c.supporting_circle(), std::back_inserter(solutions) ); # 679 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { const std::pair *result = CGAL::object_cast > (&(*it)); # 693 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" if (has_on(l,result->first,true) && has_on(c,result->first,true)) { *res++ = *it; } } return res; } # 749 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h" template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Line_2 &l, const typename CK::Line_arc_2 &la, OutputIterator res ) { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Root_of_2 Root_of_2; typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; if(LinearFunctors::non_oriented_equal(l, la.supporting_line())) { *res++ = make_object(la); } Object obj = intersection(l, la.supporting_line()); const Point_2 *pt = CGAL::object_cast(&obj); if(pt == __null) return res; Circular_arc_point_2 intersect_point = Circular_arc_point_2(*pt); if (CircularFunctors::compare_xy(intersect_point, la.source()) != CircularFunctors::compare_xy(intersect_point, la.target())) *res++ = make_object(std::make_pair(intersect_point, 1u)); return res; } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Line_2 &l, const typename CK::Circular_arc_2 &c, OutputIterator res ) { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_2 Line_2; typedef std::vector solutions_container; solutions_container solutions; CGAL::CircularFunctors::intersect_2 ( l, c.supporting_circle(), std::back_inserter(solutions) ); for (typename solutions_container::iterator it = solutions.begin(); it != solutions.end(); ++it) { const std::pair *result = CGAL::object_cast > (&(*it)); if (has_on(c,result->first,true)) { *res++ = *it; } } return res; } template< class CK, class OutputIterator> OutputIterator intersect_2( const typename CK::Circular_arc_2 &c, const typename CK::Line_arc_2 &l, OutputIterator res ) { return intersect_2(l,c,res); } template < class CK, class OutputIterator > OutputIterator make_x_monotone( const typename CK::Line_arc_2 &A, OutputIterator res ) { *res++ = make_object(A); return res; } } } # 33 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Circular_arc_2.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" 2 namespace CGAL { namespace internal { template class Line_arc_2_base { public: typedef typename CK::FT FT; typedef typename CK::RT RT; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Root_of_2 Root_of_2; typedef typename CK::Segment_2 Segment_2; private: typedef struct bit_field { unsigned char begin_less_xy_than_end:2; } bit_field; void reset_flags() const { flags.begin_less_xy_than_end = 0; } public: typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2; static Circular_arc_point_2 intersect(const Line_2 & l, const Circle_2 & c, const bool b) { typedef std::vector solutions_container; solutions_container solutions; CGAL::CircularFunctors::intersect_2 ( l, c, std::back_inserter(solutions) ); typename solutions_container::iterator it = solutions.begin(); (CGAL::possibly(it != solutions.end())?(static_cast(0)): ::CGAL::precondition_fail( "it != solutions.end()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h", 85)); const std::pair *result; result = CGAL::object_cast< std::pair >(&(*it)); if ( result->second == 2 ) return result->first; if (b) return result->first; ++it; result = CGAL::object_cast< std::pair >(&(*it)); return result->first; } public: Line_arc_2_base() {} Line_arc_2_base(const Line_2 &support, const Circle_2 &c1,const bool b1, const Circle_2 &c2,const bool b2) :_support(support) { _begin = intersect(support, c1, b1); _end = intersect(support, c2, b2); reset_flags(); } Line_arc_2_base(const Line_2 &support, const Line_2 &l1, const Line_2 &l2) :_support(support) { (CGAL::possibly(do_intersect(support, l1))?(static_cast(0)): ::CGAL::precondition_fail( "do_intersect(support, l1)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h", 130)); (CGAL::possibly(do_intersect(support, l2))?(static_cast(0)): ::CGAL::precondition_fail( "do_intersect(support, l2)" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h", 131)); Object obj = intersection(support, l1); const Point_2 *pt = CGAL::object_cast(&obj); _begin = Circular_arc_point_2(*pt); obj = intersection(support, l2); const Point_2 *pt2 = CGAL::object_cast(&obj); _end = Circular_arc_point_2(*pt2); reset_flags(); } Line_arc_2_base(const Line_2 &support, const Circular_arc_point_2 &p1, const Circular_arc_point_2 &p2) :_support(support) { _begin = p1; _end = p2; reset_flags(); } Line_arc_2_base(const Segment_2 &s) :_support(s.supporting_line()) { _begin = Circular_arc_point_2(s.source()); _end = Circular_arc_point_2(s.target()); reset_flags(); } Line_arc_2_base(const Point_2 &p1, const Point_2 &p2) { _support = Line_2(p1, p2); _begin = Circular_arc_point_2(p1); _end = Circular_arc_point_2(p2); reset_flags(); } private: Line_2 _support; Circular_arc_point_2 _begin, _end; mutable bit_field flags; # 199 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" private: bool begin_less_xy_than_end() const { if(flags.begin_less_xy_than_end == 0) { if(compare_xy(_begin, _end) < 0) flags.begin_less_xy_than_end = 2; else flags.begin_less_xy_than_end = 1; } return flags.begin_less_xy_than_end == 2; } public : # 233 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" const Line_2 & supporting_line() const { return _support; } const Circular_arc_point_2 & left() const { return begin_less_xy_than_end() ? _begin : _end; } const Circular_arc_point_2 & right() const { return begin_less_xy_than_end() ? _end : _begin; } const Circular_arc_point_2 & source() const { return _begin; } const Circular_arc_point_2 & target() const { return _end; } bool is_vertical() const { return supporting_line().is_vertical(); } CGAL::Bbox_2 bbox() const { return _begin.bbox() + _end.bbox(); } }; template class Filtered_bbox_line_arc_2_base : public Base_CK::Line_arc_2 { typedef Filtered_bbox_line_arc_2_base Self; typedef typename Base_CK::Line_arc_2 P_arc; public: typedef typename CB::Point_2 Point_2; typedef typename CB::Line_2 Line_2; typedef typename CB::Segment_2 Segment_2; typedef typename CB::Circle_2 Circle_2; typedef typename CB::Circular_arc_point_2 Circular_arc_point_2; Filtered_bbox_line_arc_2_base() : P_arc(), bb(__null) {} Filtered_bbox_line_arc_2_base(const P_arc& arc) : P_arc(arc), bb(__null) {} Filtered_bbox_line_arc_2_base(const Line_2 &support, const Circle_2 &l1, const bool b_l1, const Circle_2 &l2, const bool b_l2) : P_arc(support,l1,b_l1,l2,b_l2), bb(__null) {} Filtered_bbox_line_arc_2_base(const Line_2 &support, const Line_2 &l1, const Line_2 &l2) : P_arc(support,l1,l2), bb(__null) {} Filtered_bbox_line_arc_2_base(const Line_2 &support, const Circular_arc_point_2 &begin, const Circular_arc_point_2 &end) : P_arc(support, begin, end) , bb(__null) {} Filtered_bbox_line_arc_2_base(const Segment_2 &s) : P_arc(s) , bb(__null) {} Filtered_bbox_line_arc_2_base(const Point_2 &p1, const Point_2 &p2) : P_arc(p1,p2) , bb(__null) {} Filtered_bbox_line_arc_2_base(const Filtered_bbox_line_arc_2_base &c) : P_arc(c), bb(c.bb ? new Bbox_2(*(c.bb)) : __null) {} Filtered_bbox_line_arc_2_base& operator=(const Self& c) { if(this != &c) { this->P_arc::operator=(c); bb = c.bb ? new Bbox_2(*(c.bb)) : __null; } return *this; } ~Filtered_bbox_line_arc_2_base() { if(bb) delete bb; } Bbox_2 bbox() const { if(bb==__null) bb=new Bbox_2(P_arc::bbox()); return *bb; } bool has_no_bbox() const { return (bb==__null);} private: mutable Bbox_2 *bb; }; # 374 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/Line_arc_2.h" } } # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_type_equality_wrapper.h" 1 # 37 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_type_equality_wrapper.h" namespace CGAL { template < typename K_base, typename Kernel > struct Circular_kernel_type_equality_wrapper : public Type_equality_wrapper { typedef K_base Kernel_base; typedef CGAL::Circular_arc_2 Circular_arc_2; typedef CGAL::Line_arc_2 Line_arc_2; typedef CGAL::Circular_arc_point_2 Circular_arc_point_2; }; } # 36 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" 1 # 28 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_intersections.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_intersections.h" namespace CGAL { # 65 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_intersections.h" template < class OutputIterator, class K > OutputIterator intersection(const Circle_2 &c1, const Circle_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } template < class OutputIterator, class K > OutputIterator intersection(const Circle_2 &c1, const Line_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } template < class OutputIterator, class K > OutputIterator intersection(const Line_2 &c1, const Circle_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } template < class OutputIterator, class K > OutputIterator intersection(const Circular_arc_2 &c1, const Circular_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Circular_arc_2 &c1, const typename K::Circular_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Circular_arc_2 &c1, const Circular_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Line_arc_2 &c1, const Line_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Line_arc_2 &c1, const typename K::Line_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Line_arc_2 &c1, const Line_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Line_arc_2 &c1, const Circle_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Line_arc_2 &c1, const typename K::Circle_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Line_arc_2 &c1, const Circle_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Circle_2 &c1, const Line_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Circle_2 &c1, const typename K::Line_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Circle_2 &c1, const Line_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Circular_arc_2 &c1, const Circle_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Circular_arc_2 &c1, const typename K::Circle_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Circular_arc_2 &c1, const Circle_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Circle_2 &c1, const Circular_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Circle_2 &c1, const typename K::Circular_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Circle_2 &c1, const Circular_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Line_arc_2 &c1, const Circular_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Line_arc_2 &c1, const typename K::Circular_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Line_arc_2 &c1, const Circular_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Circular_arc_2 &c1, const Line_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Circular_arc_2 &c1, const typename K::Line_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Circular_arc_2 &c1, const Line_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Line_2 &c1, const Circular_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Line_2 &c1, const typename K::Circular_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Line_2 &c1, const Circular_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Line_2 &c1, const Line_arc_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Line_2 &c1, const typename K::Line_arc_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Line_2 &c1, const Line_arc_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Circular_arc_2 &c1, const Line_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Circular_arc_2 &c1, const typename K::Line_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Circular_arc_2 &c1, const Line_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } template < class OutputIterator, class K > OutputIterator intersection(const Line_arc_2 &c1, const Line_2 &c2, OutputIterator res) { return typename K::Intersect_2()(c1, c2, res); } namespace internal { template inline bool do_intersect(const typename K::Line_arc_2 &c1, const typename K::Line_2 &c2, const K&) { std::vector< Object > res; typename K::Intersect_2()(c1,c2,std::back_inserter(res)); return res.size() != 0; } } template inline bool do_intersect(const Line_arc_2 &c1, const Line_2 &c2) { return typename K::Do_intersect_2()(c1, c2); } } # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" 2 namespace CGAL { namespace CircularFunctors { template < class CK > class Compare_x_2 : public CK::Linear_kernel::Compare_x_2 { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Point_2 Point_2; public: typedef typename CK::Linear_kernel::Compare_x_2::result_type result_type; using CK::Linear_kernel::Compare_x_2::operator(); # 90 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator() (const Circular_arc_point_2 &p0, const Circular_arc_point_2 &p1) const { return CircularFunctors::compare_x(p0, p1);} }; template < class CK > class Compare_y_2 : public CK::Linear_kernel::Compare_y_2 { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Point_2 Point_2; public: typedef typename CK::Linear_kernel::Compare_y_2::result_type result_type; using CK::Linear_kernel::Compare_y_2::operator(); # 151 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator() (const Circular_arc_point_2 &p0, const Circular_arc_point_2 &p1) const {return CircularFunctors::compare_y(p0, p1);} }; template < class CK > class Compare_xy_2 : public CK::Linear_kernel::Compare_xy_2 { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Point_2 Point_2; public: typedef typename CK::Linear_kernel::Compare_xy_2::result_type result_type; using CK::Linear_kernel::Compare_xy_2::operator(); # 184 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator() (const Circular_arc_point_2 &p0, const Circular_arc_point_2 &p1) const { return CircularFunctors::compare_xy(p0, p1);} }; template < class CK > class In_x_range_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef bool result_type; result_type operator()(const Circular_arc_2 &a, const Circular_arc_point_2 &p) const { return CircularFunctors::point_in_x_range(a, p); } result_type operator()(const Line_arc_2 &a, const Circular_arc_point_2 &p) const { return CircularFunctors::point_in_x_range(a, p); } }; template < class CK > class Has_on_2 : public CK::Linear_kernel::Has_on_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Line_2 Line_2; public: typedef typename CK::Linear_kernel::Has_on_2::result_type result_type; using CK::Linear_kernel::Has_on_2::operator(); result_type operator()(const Circle_2 &a, const Circular_arc_point_2 &p) const { return CircularFunctors::has_on(a, p); } result_type operator()(const Line_2 &a, const Circular_arc_point_2 &p) const { return LinearFunctors::has_on(a, p); } result_type operator()(const Circular_arc_2 &a, const Circular_arc_point_2 &p) const { return CircularFunctors::has_on(a, p); } result_type operator()(const Line_arc_2 &a, const Circular_arc_point_2 &p) const { return CircularFunctors::has_on(a, p); } }; template < class CK > class Compare_y_to_right_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef CGAL::Comparison_result result_type; result_type operator()(const Circular_arc_2 &a1, const Circular_arc_2 &a2, const Circular_arc_point_2 &p) const { return CircularFunctors::compare_y_to_right(a1, a2, p); } result_type operator()(const Line_arc_2 &a1, const Line_arc_2 &a2, const Circular_arc_point_2 &p) const { return CircularFunctors::compare_y_to_right(a1, a2, p); } result_type operator()(const Line_arc_2 &a1, const Circular_arc_2 &a2, const Circular_arc_point_2 &p) const { return CircularFunctors::compare_y_to_right(a1, a2, p); } result_type operator()(const Circular_arc_2 &a1, const Line_arc_2 &a2, const Circular_arc_point_2 &p) const { if (CircularFunctors::compare_y_to_right(a2, a1, p) == CGAL::LARGER) return CGAL::SMALLER; return CGAL::LARGER; } }; template < class CK > class Equal_2 : public CK::Linear_kernel::Equal_2 { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef typename CK::Linear_kernel LK; typedef typename LK::Equal_2 LK_Equal_2; typedef typename CK::Point_2 Point_2; typedef typename CK::Vector_2 Vector_2; typedef typename CK::Direction_2 Direction_2; typedef typename CK::Segment_2 Segment_2; typedef typename CK::Ray_2 Ray_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Triangle_2 Triangle_2; typedef typename CK::Iso_rectangle_2 Iso_rectangle_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Linear_kernel::Equal_2::result_type result_type; using CK::Linear_kernel::Equal_2::operator(); # 376 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator() (const Circular_arc_point_2 &p0, const Circular_arc_point_2 &p1) const { return CircularFunctors::equal(p0, p1); } result_type operator() (const Circular_arc_2 &a0, const Circular_arc_2 &a1) const { return CircularFunctors::equal(a0, a1); } result_type operator() (const Line_arc_2 &a0, const Line_arc_2 &a1) const { return CircularFunctors::equal(a0, a1); } }; template < class CK > class Compare_y_at_x_2 : public CK::Linear_kernel::Compare_y_at_x_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef typename CK::Linear_kernel::Compare_y_at_x_2::result_type result_type; using CK::Linear_kernel::Compare_y_at_x_2::operator(); result_type operator() (const Circular_arc_point_2 &p, const Circular_arc_2 &A1) const { return CircularFunctors::compare_y_at_x(p, A1); } result_type operator() (const Circular_arc_point_2 &p, const Line_arc_2 &A1) const { return CircularFunctors::compare_y_at_x(p, A1); } }; template < class CK > class Do_overlap_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef bool result_type; result_type operator() (const Circular_arc_2 &A1, const Circular_arc_2 &A2) const { return CircularFunctors::do_overlap(A1, A2); } result_type operator() (const Line_arc_2 &A1, const Line_arc_2 &A2) const { return CircularFunctors::do_overlap(A1, A2); } }; template < class CK > class Make_x_monotone_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef void result_type; template < class OutputIterator > OutputIterator operator()(const Circular_arc_2 &A, OutputIterator res) const { return CircularFunctors::make_x_monotone (A, res); } template < class OutputIterator > OutputIterator operator()(const Line_arc_2 &A, OutputIterator res) const { return CircularFunctors::make_x_monotone(A,res); } }; template < class CK > class Make_xy_monotone_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef void result_type; template < class OutputIterator > OutputIterator operator()(const Circular_arc_2 &A, OutputIterator res) const { typedef std::pair relat_pos; typedef std::pair< CGAL::Object, relat_pos> Obj_descr_2; std::vector vec; CircularFunctors::advanced_make_xy_monotone (A, std::back_inserter(vec)); for(unsigned i=0;i OutputIterator operator()(const Line_arc_2 &A, OutputIterator res) const { *res++ = make_object(A); return res; } }; template < class CK > class Do_intersect_2 : public CK::Linear_kernel::Do_intersect_2 { public: typedef typename CK::Linear_kernel::Do_intersect_2::result_type result_type; template result_type operator()(const T1& t1, const T2& t2) const { return internal::do_intersect(t1, t2, CK()); } }; template < class CK > class Intersect_2 : public CK::Linear_kernel::Intersect_2 { typedef typename CK::Circle_2 Circle; typedef typename CK::Circular_arc_2 Circular_arc; typedef typename CK::Line_arc_2 Line_arc; typedef typename CK::Line_2 Line; public: typedef typename CK::Linear_kernel::Intersect_2::result_type result_type; using CK::Linear_kernel::Intersect_2::operator(); template < class OutputIterator > OutputIterator operator()(const Line & c1, const Circle & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Line & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c2,c1,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Circle & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Circular_arc & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (Circular_arc(c1),c2,res); } template < class OutputIterator > OutputIterator operator()(const Circular_arc & c1, const Circle & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c1,Circular_arc(c2),res); } template < class OutputIterator > OutputIterator operator()(const Circular_arc & c1, const Circular_arc & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Line_arc & c1, const Line_arc & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Line_arc & c1, const Circle & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Line_arc & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c2,c1,res); } template < class OutputIterator > OutputIterator operator()(const Line_arc & c1, const Circular_arc & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circular_arc & c1, const Line_arc & c2, OutputIterator res) const { return CircularFunctors::intersect_2 (c2,c1,res); } template < class OutputIterator > OutputIterator operator()(const Line & l, const Circular_arc & c, OutputIterator res) const { return CircularFunctors::intersect_2 (l,c,res); } template < class OutputIterator > OutputIterator operator()(const Line & l, const Line_arc & la, OutputIterator res) const { return CircularFunctors::intersect_2 (l,la,res); } template < class OutputIterator > OutputIterator operator()(const Circular_arc & c, const Line & l, OutputIterator res) const { return CircularFunctors::intersect_2 (l,c,res); } template < class OutputIterator > OutputIterator operator()(const Line_arc & la, const Line & l, OutputIterator res) const { return CircularFunctors::intersect_2 (l,la,res); } }; template < class CK > class Get_equation { public: typedef void result_type; typename CK::Polynomial_1_2 operator() ( const typename CK::Line_2 & l ) { return LinearFunctors::get_equation(l); } typename CK::Polynomial_for_circles_2_2 operator() ( const typename CK::Circle_2 & c ) { return CircularFunctors::get_equation(c); } }; template < class CK > class Split_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef void result_type; result_type operator()(const Circular_arc_2 &A, const Circular_arc_point_2 &p, Circular_arc_2 &ca1, Circular_arc_2 &ca2) const { return CircularFunctors::split(A, p, ca1, ca2); } result_type operator()(const Line_arc_2 &A, const Circular_arc_point_2 &p, Line_arc_2 &ca1, Line_arc_2 &ca2) const { return CircularFunctors::split(A, p, ca1, ca2); } }; template < class CK > class Is_vertical_2 : public CK::Linear_kernel::Is_vertical_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef typename CK::Linear_kernel::Is_vertical_2::result_type result_type; using CK::Linear_kernel::Is_vertical_2::operator(); result_type operator()(const Circular_arc_2 &A) const { return CircularFunctors::is_vertical(A); } result_type operator()(const Line_arc_2 &A) const { return CircularFunctors::is_vertical(A); } }; template < class CK > class Construct_circular_arc_2 { typedef typename CK::FT FT; typedef typename CK::RT RT; typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Kernel_base::Circular_arc_2 RCircular_arc_2; typedef typename Circular_arc_2::Rep Rep; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef Circular_arc_2 result_type; result_type operator()(void) { return Rep(); } result_type operator()(const Circle_2 &c) const { return Rep(c); } result_type operator()(const Circle_2 &support, const Circular_arc_point_2 &source, const Circular_arc_point_2 &target) const { return Rep(support,source,target); } result_type operator()(const Circle_2 &support, const Line_2 &l1, bool b1, const Line_2 &l2, bool b2) const { return Rep(support,l1,b1,l2,b2); } result_type operator()(const Circle_2 &c, const Circle_2 &c1, bool b_1, const Circle_2 &c2, bool b_2) const { return Rep(c,c1,b_1,c2,b_2); } result_type operator()(const Point_2 &begin, const Point_2 &middle, const Point_2 &end) const { return Rep(begin,middle,end); } result_type operator()(const Point_2 &begin, const Point_2 &end, const FT& bulge) const { return Rep(begin,end,bulge); } }; template < class CK > class Construct_line_arc_2 { typedef typename CK::Point_2 Point_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Segment_2 Segment_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Kernel_base::Line_arc_2 RLine_arc_2; typedef typename Line_arc_2::Rep Rep; public: typedef Line_arc_2 result_type; result_type operator()(void) { return Rep(); } result_type operator()(const Line_2 &support, const Circle_2 &c1,const bool b1, const Circle_2 &c2,const bool b2) const { return Rep(support,c1,b1,c2,b2); } result_type operator()(const Line_2 &support, const Line_2 &l1, const Line_2 &l2) const { return Rep(support,l1,l2); } result_type operator()(const Line_2 &support, const Circular_arc_point_2 &p1, const Circular_arc_point_2 &p2) const { return Rep(support,p1,p2); } result_type operator()(const Segment_2 &s) const { return Rep(s); } result_type operator()(const Point_2 &p1, const Point_2 &p2) const { return Rep(p1,p2); } }; template < class CK > class Construct_circular_arc_point_2 { typedef typename CK::Point_2 Point_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Kernel_base::Circular_arc_point_2 RCircular_arc_point_2; typedef typename Circular_arc_point_2::Rep Rep; typedef typename Circular_arc_point_2::Root_for_circles_2_2 Root_for_circles_2_2; public: typedef Circular_arc_point_2 result_type; result_type operator()(void) { return Rep(); } result_type operator()(const Root_for_circles_2_2 & np) const { return Rep(np); } result_type operator()(const Point_2 & p) const { return Rep(p); } }; template class Compute_circular_x_2: Has_qrt { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Root_of_2 Root_of_2; public: typedef Root_of_2 result_type; typedef const result_type & qualified_result_type; qualified_result_type operator() (const Circular_arc_point_2 & a) const { return (a.rep().x()); } }; template class Compute_circular_y_2: Has_qrt { typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Root_of_2 Root_of_2; public: typedef Root_of_2 result_type; typedef const result_type & qualified_result_type; qualified_result_type operator() (const Circular_arc_point_2 & a) const { return (a.rep().y()); } }; template class Construct_circular_min_vertex_2 : Has_qrt { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef Circular_arc_point_2 result_type; typedef const result_type & qualified_result_type; qualified_result_type operator() (const Circular_arc_2 & a) const { return (a.rep().left()); } qualified_result_type operator() (const Line_arc_2 & a) const { return (a.rep().left()); } }; template class Construct_circular_max_vertex_2: Has_qrt { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef Circular_arc_point_2 result_type; typedef const result_type & qualified_result_type; qualified_result_type operator() (const Circular_arc_2 & a) const { return (a.rep().right()); } qualified_result_type operator() (const Line_arc_2 & a) const { return (a.rep().right()); } }; template class Construct_circular_source_vertex_2: Has_qrt { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef Circular_arc_point_2 result_type; typedef const result_type & qualified_result_type; qualified_result_type operator() (const Circular_arc_2 & a) const { return a.rep().source(); } qualified_result_type operator() (const Line_arc_2 & a) const { return a.rep().source();} }; template class Construct_circular_target_vertex_2: Has_qrt { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef Circular_arc_point_2 result_type; typedef const result_type & qualified_result_type; qualified_result_type operator() (const Circular_arc_2 & a) const { return a.rep().target();} qualified_result_type operator() (const Line_arc_2 & a) const { return a.rep().target();} }; template class Is_x_monotone_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef bool result_type; result_type operator() (const Circular_arc_2 & a) const { return (a.rep().is_x_monotone()); } result_type operator() (const Line_arc_2 & a) const { return (a.rep().is_x_monotone()); } }; template class Is_y_monotone_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Line_arc_2 Line_arc_2; public: typedef bool result_type; result_type operator() (const Circular_arc_2 & a) const { return (a.rep().is_y_monotone()); } result_type operator() (const Line_arc_2 & a) const { return (a.rep().is_y_monotone()); } }; template class Construct_bbox_2 : public CK::Linear_kernel::Construct_bbox_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Circle_2 Circle_2; public: typedef typename CK::Linear_kernel::Construct_bbox_2::result_type result_type; using CK::Linear_kernel::Construct_bbox_2::operator(); # 1057 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator() (const Circular_arc_point_2 & a) const { return a.rep().bbox(); } result_type operator() (const Circular_arc_2 & a) const { return a.rep().bbox(); } result_type operator() (const Line_arc_2 & a) const { return a.rep().bbox(); } }; template class Bounded_side_2 : public CK::Linear_kernel::Bounded_side_2 { typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef typename CK::Linear_kernel::Bounded_side_2::result_type result_type; using CK::Linear_kernel::Bounded_side_2::operator(); # 1109 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator()(const Circle_2& c, const Circular_arc_point_2& p) const { return CircularFunctors::bounded_side(c,p); } }; template class Has_on_bounded_side_2 : public CK::Linear_kernel::Has_on_bounded_side_2 { typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef typename CK::Linear_kernel::Has_on_bounded_side_2::result_type result_type; using CK::Linear_kernel::Has_on_bounded_side_2::operator(); # 1149 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator()(const Circle_2& c, const Circular_arc_point_2& p) const { return CK().bounded_side_2_object()(c,p) == ON_BOUNDED_SIDE; } }; template class Has_on_unbounded_side_2 : public CK::Linear_kernel::Has_on_unbounded_side_2 { typedef typename CK::Circle_2 Circle_2; typedef typename CK::Circular_arc_point_2 Circular_arc_point_2; public: typedef typename CK::Linear_kernel::Has_on_unbounded_side_2::result_type result_type; using CK::Linear_kernel::Has_on_unbounded_side_2::operator(); # 1189 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" result_type operator()(const Circle_2& c, const Circular_arc_point_2& p) const { return CK().bounded_side_2_object()(c,p) == ON_UNBOUNDED_SIDE; } }; template class Construct_supporting_circle_2: Has_qrt { typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Circle_2 Circle_2; public: typedef Circle_2 result_type; __attribute__((__deprecated__)) result_type operator() (const Circular_arc_2 & a) const { return a.rep().supporting_circle(); } }; template class Construct_supporting_line_2: Has_qrt { typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Line_2 Line_2; typedef typename CK::Circle_2 Circle_2; public: typedef Line_2 result_type; __attribute__((__deprecated__)) result_type operator() (const Line_arc_2 & a) const { return a.rep().supporting_line(); } }; template class Construct_center_2 : public CK::Linear_kernel::Construct_center_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; public: typedef typename CK::Linear_kernel::Construct_center_2::result_type result_type; using CK::Linear_kernel::Construct_center_2::operator(); # 1260 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" const result_type& operator()(const Circular_arc_2& c) const { return c.rep().center(); } }; template class Compute_squared_radius_2 : public CK::Linear_kernel::Compute_squared_radius_2 { typedef typename CK::Circular_arc_2 Circular_arc_2; public: typedef typename CK::Linear_kernel::Compute_squared_radius_2::result_type result_type; using CK::Linear_kernel::Compute_squared_radius_2::operator(); # 1306 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_polynomial_circular.h" const result_type& operator()(const Circular_arc_2& c) const { return c.rep().squared_radius(); } }; } template < typename K> struct Qualified_result_of, typename K::Circular_arc_2> { typedef typename K::Point_2 const & type; }; template < typename K> struct Qualified_result_of, typename K::Circular_arc_2> { typedef typename K::FT const & type; }; template < typename K> struct Qualified_result_of, typename K::Circle_2> { typedef typename K::FT const & type; }; } # 38 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h" 1 # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_on_line_2.h" namespace CGAL { namespace LinearFunctors { template < class CK > class Construct_line_2 : public CK::Linear_kernel::Construct_line_2 { typedef typename CK::Line_arc_2 Line_arc_2; typedef typename CK::Line_2 Line_2; public: typedef typename CK::Linear_kernel::Construct_line_2::result_type result_type; using CK::Linear_kernel::Construct_line_2::operator(); result_type operator() (const Line_arc_2 & a) const { return (a.rep().supporting_line()); } result_type operator() ( const typename CK::Polynomial_1_2 &eq ) { return construct_line_2(eq); } }; } } # 41 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h" 1 # 34 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/function_objects_on_circle_2.h" namespace CGAL { namespace CircularFunctors { template < class CK > class Construct_circle_2 : public CK::Linear_kernel::Construct_circle_2 { public: typedef typename CK::Circular_arc_2 Circular_arc_2; typedef typename CK::Linear_kernel::Construct_circle_2::result_type result_type; using CK::Linear_kernel::Construct_circle_2::operator(); result_type operator() ( const typename CK::Polynomial_for_circles_2_2 &eq ) { return construct_circle_2(eq); } const result_type& operator() (const Circular_arc_2 & a) const { return (a.rep().supporting_circle()); } }; } template < typename K> struct Qualified_result_of, typename K::Circular_arc_2> { typedef const typename K::Circle_2 & type; }; } # 43 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 namespace CGAL { namespace internal { template < class CircularKernel, class LinearKernelBase, class AlgebraicKernel > struct Circular_kernel_base_ref_count: public LinearKernelBase { typedef internal::Circular_arc_2_base Circular_arc_2; typedef internal::Circular_arc_point_2_base Circular_arc_point_2; typedef internal::Line_arc_2_base Line_arc_2; typedef LinearKernelBase Linear_kernel; typedef AlgebraicKernel Algebraic_kernel; typedef typename Algebraic_kernel::Root_of_2 Root_of_2; typedef typename Algebraic_kernel::Root_for_circles_2_2 Root_for_circles_2_2; typedef typename Algebraic_kernel::Polynomial_for_circles_2_2 Polynomial_for_circles_2_2; typedef typename Algebraic_kernel::Polynomial_1_2 Polynomial_1_2; typedef typename Linear_kernel::RT RT; typedef typename Linear_kernel::FT FT; template < typename T > struct Handle { typedef Handle_for type; }; template < typename Kernel2 > struct Base { typedef typename LinearKernelBase::template Base::Type ReboundLK; typedef Circular_kernel_base_ref_count Type; }; # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/interface_macros.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2/interface_macros.h" typedef CircularFunctors::Compute_squared_radius_2 Compute_squared_radius_2; Compute_squared_radius_2 compute_squared_radius_2_object() const { return Compute_squared_radius_2(); } typedef CircularFunctors::Construct_center_2 Construct_center_2; Construct_center_2 construct_center_2_object() const { return Construct_center_2(); } typedef CircularFunctors::Get_equation Get_equation; Get_equation get_equation_object() const { return Get_equation(); } typedef CircularFunctors::Construct_circle_2 Construct_circle_2; Construct_circle_2 construct_circle_2_object() const { return Construct_circle_2(); } typedef CircularFunctors::Compare_x_2 Compare_x_2; Compare_x_2 compare_x_2_object() const { return Compare_x_2(); } typedef CircularFunctors::Compare_y_2 Compare_y_2; Compare_y_2 compare_y_2_object() const { return Compare_y_2(); } typedef CircularFunctors::Compare_xy_2 Compare_xy_2; Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } typedef CircularFunctors::Compare_y_at_x_2 Compare_y_at_x_2; Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(); } typedef CircularFunctors::Compare_y_to_right_2 Compare_y_to_right_2; Compare_y_to_right_2 compare_y_to_right_2_object() const { return Compare_y_to_right_2(); } typedef CircularFunctors::Do_overlap_2 Do_overlap_2; Do_overlap_2 do_overlap_2_object() const { return Do_overlap_2(); } typedef CircularFunctors::Equal_2 Equal_2; Equal_2 equal_2_object() const { return Equal_2(); } typedef CircularFunctors::In_x_range_2 In_x_range_2; In_x_range_2 in_x_range_2_object() const { return In_x_range_2(); } typedef CircularFunctors::Make_x_monotone_2 Make_x_monotone_2; Make_x_monotone_2 make_x_monotone_2_object() const { return Make_x_monotone_2(); } typedef CircularFunctors::Make_xy_monotone_2 Make_xy_monotone_2; Make_xy_monotone_2 make_xy_monotone_2_object() const { return Make_xy_monotone_2(); } typedef CircularFunctors::Intersect_2 Intersect_2; Intersect_2 intersect_2_object() const { return Intersect_2(); } typedef CircularFunctors::Split_2 Split_2; Split_2 split_2_object() const { return Split_2(); } typedef CircularFunctors::Construct_circular_arc_2 Construct_circular_arc_2; Construct_circular_arc_2 construct_circular_arc_2_object() const { return Construct_circular_arc_2(); } typedef CircularFunctors::Construct_line_arc_2 Construct_line_arc_2; Construct_line_arc_2 construct_line_arc_2_object() const { return Construct_line_arc_2(); } typedef CircularFunctors::Construct_circular_arc_point_2 Construct_circular_arc_point_2; Construct_circular_arc_point_2 construct_circular_arc_point_2_object() const { return Construct_circular_arc_point_2(); } typedef CircularFunctors::Compute_circular_x_2 Compute_circular_x_2; Compute_circular_x_2 compute_circular_x_2_object() const { return Compute_circular_x_2(); } typedef CircularFunctors::Compute_circular_y_2 Compute_circular_y_2; Compute_circular_y_2 compute_circular_y_2_object() const { return Compute_circular_y_2(); } typedef CircularFunctors::Construct_circular_min_vertex_2 Construct_circular_min_vertex_2; Construct_circular_min_vertex_2 construct_circular_min_vertex_2_object() const { return Construct_circular_min_vertex_2(); } typedef CircularFunctors::Construct_circular_max_vertex_2 Construct_circular_max_vertex_2; Construct_circular_max_vertex_2 construct_circular_max_vertex_2_object() const { return Construct_circular_max_vertex_2(); } typedef CircularFunctors::Construct_circular_source_vertex_2 Construct_circular_source_vertex_2; Construct_circular_source_vertex_2 construct_circular_source_vertex_2_object() const { return Construct_circular_source_vertex_2(); } typedef CircularFunctors::Construct_circular_target_vertex_2 Construct_circular_target_vertex_2; Construct_circular_target_vertex_2 construct_circular_target_vertex_2_object() const { return Construct_circular_target_vertex_2(); } typedef CircularFunctors::Is_x_monotone_2 Is_x_monotone_2; Is_x_monotone_2 is_x_monotone_2_object() const { return Is_x_monotone_2(); } typedef CircularFunctors::Is_y_monotone_2 Is_y_monotone_2; Is_y_monotone_2 is_y_monotone_2_object() const { return Is_y_monotone_2(); } typedef CircularFunctors::Is_vertical_2 Is_vertical_2; Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(); } typedef CircularFunctors::Has_on_2 Has_on_2; Has_on_2 has_on_2_object() const { return Has_on_2(); } typedef CircularFunctors::Has_on_bounded_side_2 Has_on_bounded_side_2; Has_on_bounded_side_2 has_on_bounded_side_2_object() const { return Has_on_bounded_side_2(); } typedef CircularFunctors::Has_on_unbounded_side_2 Has_on_unbounded_side_2; Has_on_unbounded_side_2 has_on_unbounded_side_2_object() const { return Has_on_unbounded_side_2(); } typedef CircularFunctors::Bounded_side_2 Bounded_side_2; Bounded_side_2 bounded_side_2_object() const { return Bounded_side_2(); } typedef CircularFunctors::Do_intersect_2 Do_intersect_2; Do_intersect_2 do_intersect_2_object() const { return Do_intersect_2(); } typedef CircularFunctors::Construct_supporting_circle_2 Construct_supporting_circle_2; Construct_supporting_circle_2 construct_supporting_circle_2_object() const { return Construct_supporting_circle_2(); } typedef CircularFunctors::Construct_supporting_line_2 Construct_supporting_line_2; Construct_supporting_line_2 construct_supporting_line_2_object() const { return Construct_supporting_line_2(); } typedef CircularFunctors::Construct_bbox_2 Construct_bbox_2; Construct_bbox_2 construct_bbox_2_object() const { return Construct_bbox_2(); } # 82 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Circular_kernel_2.h" 2 typedef LinearFunctors::Construct_line_2 Construct_line_2; Construct_line_2 construct_line_2_object() const { return Construct_line_2(); } }; } template < class LinearKernel, class AlgebraicKernel > struct Circular_kernel_2 : public Circular_kernel_type_equality_wrapper < internal::Circular_kernel_base_ref_count < Circular_kernel_2, typename LinearKernel:: template Base >::Type, AlgebraicKernel >, Circular_kernel_2 > { struct Circular_tag{}; typedef Circular_tag Definition_tag; }; } # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" 2 # 46 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2.h" 1 # 31 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h" 1 # 29 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h" # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/assertions.h" 1 # 30 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h" 2 namespace CGAL { namespace Bbox_functors { template class Compare_x_2 : public BK::Circular_kernel:: template Base< BK >::Type::Compare_x_2 { typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Point_2 Point_2; typedef typename BK::Circular_kernel:: template Base< BK >::Type::Compare_x_2 CK_Compare_x_2; public: typedef typename CK_Compare_x_2::result_type result_type; result_type operator() (const Point_2 &p0, const Point_2 &p1) const { return CK_Compare_x_2()(p0, p1); } using CK_Compare_x_2::operator(); # 89 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h" result_type operator()( const Circular_arc_point_2 &a, const Circular_arc_point_2 &b) const { Bbox_2 bb1=a.bbox(),bb2=b.bbox(); if( bb1.xmin()>bb2.xmax() ) return LARGER; if( bb1.xmax() class Compare_y_2 : public BK::Circular_kernel:: template Base< BK >::Type::Compare_y_2 { typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Point_2 Point_2; typedef typename BK::Circular_kernel:: template Base< BK >::Type::Compare_y_2 CK_Compare_y_2; public: typedef typename CK_Compare_y_2::result_type result_type; result_type operator() (const Point_2 &p0, const Point_2 &p1) const { return CK_Compare_y_2()(p0, p1); } using CK_Compare_y_2::operator(); # 156 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h" result_type operator()( const Circular_arc_point_2 &a, const Circular_arc_point_2 &b) const { Bbox_2 bb1=a.bbox(),bb2=b.bbox(); if( bb1.ymin()>bb2.ymax() ) return LARGER; if( bb1.ymax() class Compare_xy_2 : public BK::Circular_kernel:: template Base< BK >::Type::Compare_xy_2 { typedef typename BK::Circular_kernel:: template Base< BK >::Type::Compare_xy_2 CK_Compare_xy_2; typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Point_2 Point_2; public: typedef typename CK_Compare_xy_2::result_type result_type; using CK_Compare_xy_2::operator(); public: result_type operator()( const Point_2 &a, const Point_2 &b) const { return CK_Compare_xy_2()(a,b); } result_type operator()( const Circular_arc_point_2 &a, const Circular_arc_point_2 &b) const { typename BK::Compare_x_2 compx; typename BK::Compare_y_2 compy; Comparison_result tmp; if( (tmp=compx(a,b))!=EQUAL) return tmp; return compy(a,b); } }; template class In_x_range_2 : public BK::Circular_kernel:: template Base< BK >::Type::In_x_range_2 { typedef typename BK::Circular_kernel:: template Base< BK >::Type::In_x_range_2 CK_In_x_range_2; typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Circular_arc_2 Circular_arc_2; typedef typename BK::Line_arc_2 Line_arc_2; public: typedef typename CK_In_x_range_2::result_type result_type; using CK_In_x_range_2::operator(); private: template result_type _in_x_range_2(const Arc_2 &a, const Circular_arc_point_2 &p) const { Bbox_2 bb11 = a.source().bbox(), bb12 = a.target().bbox(), bb2=p.bbox(); if(bb11.xmin() > bb12.xmax()) { if(bb2.xmax() < bb12.xmin()) return false; else if(bb2.xmin() > bb11.xmax()) return false; else if(bb12.xmax() < bb2.xmin() && bb2.xmax() < bb11.xmin()) return true; } else if(bb11.xmax() < bb12.xmin()) { if(bb2.xmax() < bb11.xmin()) return false; else if(bb2.xmin() > bb12.xmax()) return false; else if(bb11.xmax() < bb2.xmin() && bb2.xmax() < bb12.xmin()) return true; } else { if(bb2.xmin() > (std::max)(bb11.xmax(),bb12.xmax())) return false; if(bb2.xmax() < (std::min)(bb11.xmin(),bb12.xmin())) return false; } CK_In_x_range_2 Range; return Range(a,p); } public: result_type operator()( const Circular_arc_2 &a, const Circular_arc_point_2 &p) const { (CGAL::possibly(a.is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "a.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 260)); return _in_x_range_2(a,p); } result_type operator()( const Line_arc_2 &a, const Circular_arc_point_2 &p) const { return _in_x_range_2(a,p);} }; template class Compare_y_at_x_2 : public BK::Circular_kernel:: template Base< BK >::Type::Compare_y_at_x_2 { typedef typename BK::Circular_kernel:: template Base< BK >::Type::Compare_y_at_x_2 CK_Compare_y_at_x_2; typedef typename BK::Circular_arc_2 Circular_arc_2; typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Line_arc_2 Line_arc_2; public: typedef typename CK_Compare_y_at_x_2::result_type result_type; using CK_Compare_y_at_x_2::operator(); private: template result_type _compare_y_at_x_2(const Circular_arc_point_2 &p,const Arc_2 &a) const { bool tmp=In_x_range_2()(a,p); (CGAL::possibly(tmp)?(static_cast(0)): ::CGAL::precondition_fail( "tmp" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 293)); Bbox_2 bb1=a.bbox(),bb2=p.bbox(); if(bb1.ymin()>bb2.ymax()) return SMALLER; else if(bb1.ymax()(0)): ::CGAL::precondition_fail( "a.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 311)); return _compare_y_at_x_2(p,a); } result_type operator()( const Circular_arc_point_2 &p,const Line_arc_2 &a ) const {return _compare_y_at_x_2(p,a);} }; template class Has_on_2 : public BK::Circular_kernel:: template Base< BK >::Type::Has_on_2 { typedef typename BK::Circular_kernel:: template Base< BK >::Type::Has_on_2 CK_Has_on_2; typedef typename BK::Circular_arc_2 Circular_arc_2; typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Line_arc_2 Line_arc_2; public: typedef typename CK_Has_on_2::result_type result_type; using CK_Has_on_2::operator(); private: template result_type _has_on_2(const Arc_2 &a, const Circular_arc_point_2 &p) const { Bbox_2 bb1=a.bbox(),bb2=p.bbox(); if(do_overlap(bb1,bb2)) return CK_Has_on_2()(a,p); return false; } public: result_type operator()( const Circular_arc_2 &a,const Circular_arc_point_2 &p ) const { (CGAL::possibly(a.is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "a.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 355)); return _has_on_2(a,p); } result_type operator()( const Line_arc_2 &a, const Circular_arc_point_2 &p ) const {return _has_on_2(a,p);} }; template class Equal_2 : public BK::Circular_kernel:: template Base< BK >::Type::Equal_2 { typedef typename BK::Circular_kernel:: template Base< BK >::Type::Equal_2 CK_Equal_2; typedef typename BK::Circular_arc_2 Circular_arc_2; typedef typename BK::Point_2 Point_2; typedef typename BK::Direction_2 Direction_2; typedef typename BK::Vector_2 Vector_2; typedef typename BK::Segment_2 Segment_2 ; typedef typename BK::Ray_2 Ray_2; typedef typename BK::Line_2 Line_2; typedef typename BK::Circle_2 Circle_2; typedef typename BK::Triangle_2 Triangle_2; typedef typename BK::Iso_rectangle_2 Iso_rectangle_2; typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Line_arc_2 Line_arc_2; public: typedef typename CK_Equal_2::result_type result_type; result_type operator() (const Point_2 &p0, const Point_2 &p1) const { return CK_Equal_2()(p0,p1); } using CK_Equal_2::operator(); # 456 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h" private: template result_type _equal_2(const Arc_2 &a,const Arc_2 &b) const { Bbox_2 bb11=a.source().bbox(), bb12=a.target().bbox(), bb21=b.source().bbox(), bb22=b.target().bbox(); if(bb11.xmin() > bb21.xmax()) return false; if(bb11.xmax() < bb21.xmin()) return false; if(bb11.ymin() > bb21.ymax()) return false; if(bb11.ymax() < bb21.ymin()) return false; if(bb12.xmin() > bb22.xmax()) return false; if(bb12.xmax() < bb22.xmin()) return false; if(bb12.ymin() > bb22.ymax()) return false; if(bb12.ymax() < bb22.ymin()) return false; return CK_Equal_2()( a,b ); } public: result_type operator()( const Circular_arc_point_2 &a , const Circular_arc_point_2 &b) const { Bbox_2 bb1=a.bbox(),bb2=b.bbox(); if(bb1.xmin() > bb2.xmax()) return false; if(bb1.xmax() < bb2.xmin()) return false; if(bb1.ymin() > bb2.ymax()) return false; if(bb1.ymax() < bb2.ymin()) return false; return CK_Equal_2()( a,b ); } # 504 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h" result_type operator()( const Circular_arc_2 &a , const Circular_arc_2 &b ) const { (CGAL::possibly(a.is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "a.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 507)); (CGAL::possibly(b.is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "b.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 508)); return _equal_2(a,b); } result_type operator()( const Line_arc_2 &a , const Line_arc_2 &b ) const { return _equal_2(a,b);} result_type operator()( const Circular_arc_2 &a , const Line_arc_2 &b ) const { return false;} result_type operator()( const Line_arc_2 &a , const Circular_arc_2 &b ) const { return false;} }; template class Do_overlap_2 : public BK::Circular_kernel:: template Base< BK >::Type::Do_overlap_2 { typedef typename BK::Circular_kernel:: template Base< BK >::Type::Do_overlap_2 CK_Do_overlap_2; typedef typename BK::Circular_arc_2 Circular_arc_2; typedef typename BK::Line_arc_2 Line_arc_2; public: typedef typename CK_Do_overlap_2::result_type result_type; using CK_Do_overlap_2::operator(); private: template result_type _do_overlap_2(const Arc_2 &a, const Arc_2 &b) const { Bbox_2 bb1=a.bbox(),bb2=b.bbox(); if(do_overlap(bb1,bb2)) return CK_Do_overlap_2()(a,b); return false; } public: result_type operator()( const Circular_arc_2 &a , const Circular_arc_2 &b ) const { (CGAL::possibly(a.is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "a.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 564)); (CGAL::possibly(b.is_x_monotone())?(static_cast(0)): ::CGAL::precondition_fail( "b.is_x_monotone()" , "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/bbox_filtered_predicates.h", 565)); return _do_overlap_2(a,b); } result_type operator()( const Line_arc_2 &a , const Line_arc_2 &b ) const { return _do_overlap_2(a,b);} result_type operator()( const Circular_arc_2 &a , const Line_arc_2 &b ) const { return false;} result_type operator()( const Line_arc_2 &a , const Circular_arc_2 &b ) const { return false;} }; template < class BK > class Intersect_2 : public BK::Circular_kernel:: template Base< BK >::Type::Intersect_2 { public: typedef typename BK::Circular_kernel:: template Base< BK >::Type::Intersect_2 CK_Intersect_2; typedef typename BK::Circular_arc_2 Circular_arc_2; typedef typename BK::Circular_arc_point_2 Circular_arc_point_2; typedef typename BK::Line_arc_2 Line_arc_2; typedef typename BK::Circle_2 Circle; typedef typename BK::Line_2 Line_2; typedef typename CK_Intersect_2::result_type result_type; using CK_Intersect_2::operator(); template < class OutputIterator > OutputIterator operator()(const Line_2 & c1, const Circle & c2, OutputIterator res) { return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Line_2 & c2, OutputIterator res) { return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Line_arc_2 & c1, const Circle & c2, OutputIterator res) { if(!do_overlap(c1.bbox(),c2.bbox())) return res; return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Line_arc_2 & c2, OutputIterator res) { if(!do_overlap(c1.bbox(),c2.bbox())) return res; return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Line_2 & c1, const Circular_arc_2 & c2, OutputIterator res) { return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Line_2 & c1, const Line_arc_2 & c2, OutputIterator res) { return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Circle & c2, OutputIterator res) { if(!do_overlap(c1.bbox(),c2.bbox())) return res; return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circle & c1, const Circular_arc_2 & c2, OutputIterator res) { return operator()(Circular_arc(c1),c2,res); } template < class OutputIterator > OutputIterator operator()(const Circular_arc_2 & c1, const Circle & c2, OutputIterator res) { return operator()(c1,Circular_arc_2(c2),res); } template < class OutputIterator > OutputIterator operator()(const Circular_arc_2 & c1, const Circular_arc_2 & c2, OutputIterator res) { Bbox_2 bb1=c1.bbox(),bb2=c2.bbox(); if(!do_overlap(bb1,bb2 )) return res; return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Line_arc_2 & c1, const Line_arc_2 & c2, OutputIterator res) { Bbox_2 bb1=c1.bbox(),bb2=c2.bbox(); if(!do_overlap(bb1,bb2 )) return res; return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Circular_arc_2 & c1, const Line_arc_2 & c2, OutputIterator res) { Bbox_2 bb1=c1.bbox(),bb2=c2.bbox(); if(!do_overlap(bb1,bb2 )) return res; return CK_Intersect_2()(c1,c2,res); } template < class OutputIterator > OutputIterator operator()(const Line_arc_2 & c1, const Circular_arc_2 & c2, OutputIterator res) { return operator()(c2,c1,res);} template < class OutputIterator > OutputIterator operator()(const Circular_arc_2 & c1, const Line_2 & c2, OutputIterator res) { return operator()(c2,c1,res);} template < class OutputIterator > OutputIterator operator()(const Line_arc_2 & c1, const Line_2 & c2, OutputIterator res) { return operator()(c2,c1,res);} }; } } # 32 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2.h" 2 namespace CGAL { namespace internal { template < class FilteredBboxKernel, class CircularKernel > struct Filtered_bbox_circular_kernel_base_ref_count : public CircularKernel { typedef internal::Filtered_bbox_circular_arc_2_base Circular_arc_2; typedef internal::Filtered_bbox_line_arc_2_base Line_arc_2; typedef internal::Filtered_bbox_circular_arc_point_2_base Circular_arc_point_2; template < typename T > struct Handle { typedef Handle_for type; }; template < typename Kernel2 > struct Base { typedef Filtered_bbox_circular_kernel_base_ref_count Type; }; template < typename T > struct Ambient_dimension { typedef typename T::Ambient_dimension type; }; template < typename T > struct Feature_dimension { typedef typename T::Feature_dimension type; }; # 1 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h" 1 # 35 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h" typedef Bbox_functors::Compare_x_2< FilteredBboxKernel > Compare_x_2; Compare_x_2 compare_x_2_object() const { return Compare_x_2(); } typedef Bbox_functors::Compare_y_2< FilteredBboxKernel > Compare_y_2; Compare_y_2 compare_y_2_object() const { return Compare_y_2(); } typedef Bbox_functors::Compare_xy_2< FilteredBboxKernel > Compare_xy_2; Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(); } typedef Bbox_functors::Has_on_2< FilteredBboxKernel > Has_on_2; Has_on_2 has_on_2_object() const { return Has_on_2(); } typedef Bbox_functors::Compare_y_at_x_2< FilteredBboxKernel > Compare_y_at_x_2; Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(); } typedef Bbox_functors::Do_overlap_2< FilteredBboxKernel > Do_overlap_2; Do_overlap_2 do_overlap_2_object() const { return Do_overlap_2(); } typedef Bbox_functors::Equal_2< FilteredBboxKernel > Equal_2; Equal_2 equal_2_object() const { return Equal_2(); } typedef Bbox_functors::In_x_range_2< FilteredBboxKernel > In_x_range_2; In_x_range_2 in_x_range_2_object() const { return In_x_range_2(); } typedef Bbox_functors::Intersect_2< FilteredBboxKernel > Intersect_2; Intersect_2 intersect_2_object() const { return Intersect_2(); } # 67 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Filtered_bbox_circular_kernel_2.h" 2 }; } template < typename K_base, typename FbcKernel > struct Filtered_bbox_circular_kernel_type_equality_wrapper : public Type_equality_wrapper { typedef K_base Kernel_base; typedef CGAL::Circular_arc_2 Circular_arc_2; typedef CGAL::Line_arc_2 Line_arc_2; typedef CGAL::Circular_arc_point_2 Circular_arc_point_2; }; template < class CircularKernel > struct Filtered_bbox_circular_kernel_2 : public Filtered_bbox_circular_kernel_type_equality_wrapper < internal::Filtered_bbox_circular_kernel_base_ref_count < Filtered_bbox_circular_kernel_2< CircularKernel >, typename CircularKernel:: template Base >::Type >, Filtered_bbox_circular_kernel_2< CircularKernel > > { typedef CircularKernel Circular_kernel; typedef Filtered_bbox_circular_kernel_2< CircularKernel > Self; }; } # 47 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" 2 namespace CGAL { namespace internal { typedef CGAL::Gmpq NT1; typedef Cartesian Linear_k1; typedef Algebraic_kernel_for_circles_2_2 Algebraic_k1; typedef Circular_kernel_2 CK1; # 72 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/Exact_circular_kernel_2.h" } typedef Filtered_bbox_circular_kernel_2 Exact_circular_kernel_2; } # 39 "/tmp/cgal-testsuite/CGAL-3.10-Ic-197/include/CGAL/CGAL_Ipelet_base_v7.h" 2 namespace CGAL{ template class Ipelet_base : public ipe::Ipelet { private: const std::string* SubLab; const std::string* HMsg; std::string Name; ipe::IpeletData* data_; ipe::IpeletHelper* helper_; public: typedef ipe::Vector IpeVector; typedef ipe::Curve IpeSegmentSubPath; typedef ipe::Matrix IpeMatrix; typedef ipe::Path IpePath; void transform_selected_objects_(const IpeMatrix& tfm) const { for (int i=0;icount();++i) if (get_IpePage()->select(i)!=ipe::ENotSelected) get_IpePage()->transform(i,tfm); } void delete_selected_objects_() const { for (unsigned i=get_IpePage()->count();i>0;--i) if (get_IpePage()->select(i-1)!=ipe::ENotSelected) get_IpePage()->remove(i-1); } void group_selected_objects_() const { ipe::Group* grp=new ipe::Group(); for (unsigned i=get_IpePage()->count();i>0;--i) if (get_IpePage()->select(i-1)!=ipe::ENotSelected){ grp->push_back( get_IpePage()->object(i-1)->clone() ); get_IpePage()->remove(i-1); } get_IpePage()->append(ipe::ESecondarySelected,get_IpeletData()->iLayer,grp); } typedef typename Kernel::FT FT; typedef typename CGAL::Point_2 Point_2; typedef typename CGAL::Weighted_point Weighted_point_2; typedef typename Kernel::Segment_2 Segment_2; typedef typename Kernel::Ray_2 Ray_2; typedef typename Kernel::Line_2 Line_2; typedef typename Kernel::Iso_rectangle_2 Iso_rectangle_2; typedef typename Kernel::Triangle_2 Triangle_2; typedef CGAL::Polygon_2 Polygon_2; typedef typename Kernel::Circle_2 Circle_2; typedef CGAL::cpp0x::tuple Circular_arc_2; Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[]) :SubLab(&SubLabS[0]),HMsg(&HMsgS[0]),Name(NameS),data_(__null),helper_(__null){}; ipe::Page* get_IpePage() const {return data_->iPage;} ipe::IpeletData* get_IpeletData() const {return data_;} ipe::IpeletHelper* get_IpeletHelper() const {return helper_;} int ipelibVersion() const { return ipe::IPELIB_VERSION; } int NumFunctions() const { return nbf; } virtual const char *Label() const{ return &Name[0]; } const char *About() const {return "http://www.cgal.org";}; virtual const char *SubLabel(int function) const {return &SubLab[function][0];}; virtual const char *HelpMsg(int function) const{return &HMsg[function][0];}; bool run (int i, ipe::IpeletData* data, ipe::IpeletHelper* helper) { data_=data; helper_=helper; try{ protected_run(i); return true; } catch(...){ helper->messageBox("Error : Save your page in a file and submit it to \n http://www.cgal.org/bug_report.html",__null,ipe::IpeletHelper::EOkCancelButtons); return false; } }; virtual void protected_run(int)=0; void show_help(bool gen=true) const{ std::string hmsg; hmsg="

"+Name+"