Home
last modified time | relevance | path

Searched refs:rational (Results 1 – 25 of 193) sorted by relevance

12345678

/third_party/boost/boost/geometry/util/
Drational.hpp34 struct coordinate_cast<rational<T> >
55 static inline rational<T> apply(std::string const& source) in apply()
69 return rational<T>(atol(source.c_str())); in apply()
74 ? -rational<T>(before, after) in apply()
75 : rational<T>(before, after) in apply()
89 ? -rational<T>(before) - rational<T>(after, den) in apply()
90 : rational<T>(before) + rational<T>(after, den) in apply()
99 struct select_most_precise<boost::rational<T1>, boost::rational<T2> >
101 typedef typename boost::rational
108 struct select_most_precise<boost::rational<T>, double>
[all …]
/third_party/boost/boost/
Drational.hpp165 class rational class
181 rational() : num(0), den(1) {} in rational() function in boost::rational
184 BOOST_CONSTEXPR rational(const T& n, typename enable_if_c< in rational() function in boost::rational
189 BOOST_CXX14_CONSTEXPR rational(const T& n, const U& d, typename enable_if_c< in rational() function in boost::rational
197rational(rational<NewType> const &r, typename enable_if_c<rational_detail::is_compatible_integer<N… in rational() function in boost::rational
204rational(rational<NewType> const &r, typename disable_if_c<rational_detail::is_compatible_integer<… in rational() function in boost::rational
213 rational_detail::is_compatible_integer<T, IntType>::value, rational &
219 …integer<T, IntType>::value && rational_detail::is_compatible_integer<U, IntType>::value, rational &
222 return *this = rational<IntType>(static_cast<IntType>(n), static_cast<IntType>(d)); in assign()
233 BOOST_CXX14_CONSTEXPR rational(const T& n, typename enable_if_c< in rational() function in boost::rational
[all …]
/third_party/boost/libs/rational/
DREADME.md1 … [Boost C++ Libraries](http://github.com/boostorg), provides an implementation of rational numbers.
16rational/tree/master) | [![Build Status](https://travis-ci.org/boostorg/rational.svg?branch=master…
17rational/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/rational.svg?branch=devel…
28 * [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-rational)
29 * [Report bugs](https://github.com/boostorg/rational/issues): Be sure to mention Boost version, pla…
31 …ttp://www.boost.org/community/policy.html) before posting and add the `[rational]` tag at the begi…
/third_party/boost/libs/icl/test/
Dtest_type_lists.hpp50 ,boost::rational<int>
53 ,boost::rational<boost::xint::integer>
71 … typedef boch::duration<boost::rational<int>, boost::ratio<101,997> > duration_rational_101_997s;
74 typedef boch::time_point<Now, boch::duration<boost::rational<int> > > Now_time_rational;
89 typedef boost::rational<int> bicremental_type_4;
99 ,boost::rational<int>
102 ,boost::rational<boost::xint::integer>
120 typedef boost::rational<int> signed_bicremental_type_3;
132 ,boost::rational<int>
134 ,boost::rational<boost::xint::integer>
[all …]
/third_party/boost/libs/metaparse/example/rational/
Dmain.cpp36 struct rational struct
38 typedef rational type; argument
40 static boost::rational<int> run() in run() argument
42 return boost::rational<int>(Num::type::value, Denom::type::value); in run()
48 rational,
77 const boost::rational<int> r1 = RATIONAL("1/3"); in main()
78 const boost::rational<int> r2 = RATIONAL("4/4"); in main()
79 const boost::rational<int> r3 = RATIONAL("1"); in main()
80 const boost::rational<int> r4 = RATIONAL("13/11"); in main()
/third_party/boost/libs/safe_numerics/test/
Dtest_rational.cpp40 using boost::rational;
47 rational<int_type> half(1,2); in main()
48 rational<int_type> one(1); in main()
49 rational<int_type> two(2); in main()
57 ! boost::safe_numerics::is_safe<rational<int_type>>::value, in main()
75 rational<int_type> minus_half(-1,2); in main()
81 rational<int_type> big(maxint, 2); in main()
91 << " (rational: " << rational<int>(maxint) << ")" << endl; in main()
99 rational<int_type> r; // Forgot to initialise - set to 0 in main()
/third_party/boost/libs/metaparse/example/minimal_rational/
Dmain.cpp30 struct rational struct
32 typedef rational type; argument
34 static boost::rational<int> run() in run() argument
36 return boost::rational<int>(Num::type::value, Denom::type::value); in run()
42 rational,
68 const boost::rational<int> r1 = RATIONAL("1/3"); in main()
69 const boost::rational<int> r2 = RATIONAL("4/4"); in main()
70 const boost::rational<int> r3 = RATIONAL("13/11"); in main()
/third_party/boost/libs/rational/test/
Drational_example.cpp29 using boost::rational;
45 rational<int> half(1,2); in main()
46 rational<int> one(1); in main()
47 rational<int> two(2); in main()
68 rational<int> minus_half(-1,2); in main()
78 rational<int> big(maxint, 2); in main()
88 << " (rational: " << rational<int>(maxint) << ")" << endl; in main()
91 rational<int> pi(22,7); in main()
96 rational<int> r; // Forgot to initialise - set to 0 in main()
Drational_test.cpp357 typedef ::boost::rational<int_type> rational_type;
395 typedef ::boost::rational<T> rational_type;
438 ::boost::rational<short> dummy1;
439 ::boost::rational<int> dummy2;
440 ::boost::rational<long> dummy3;
441 ::boost::rational<MyInt> dummy4;
442 ::boost::rational<MyOverflowingUnsigned> dummy5;
443 ::boost::rational<unsigned> dummy6;
506 boost::rational<T> &r1 = h.r_[ 0 ], &r2 = h.r_[ 1 ], &r3 = h.r_[ 2 ], in BOOST_FIXTURE_TEST_SUITE()
530 BOOST_CHECK_THROW( boost::rational<T>( 3, 0), boost::bad_rational ); in BOOST_FIXTURE_TEST_SUITE()
[all …]
Dconstexpr_test.cpp12 constexpr boost::rational<int> i1; in main()
13 constexpr boost::rational<int> i2(3); in main()
14 constexpr boost::rational<long long> i3(i2); in main()
15 constexpr boost::rational<short> i4(i2); in main()
16 constexpr boost::rational<long long> i5(23u); // converting constructor in main()
Dexpected_compile_12.cpp15 void test(const boost::rational<int>& rational) in test() argument
17 (void)rational; in test()
/third_party/boost/libs/spirit/example/lex/
Dcustom_token_attribute.cpp22 struct rational struct
24 rational(int n = 0, int d = 0) in rational() argument
48 struct assign_to_attribute_from_iterators<rational, Iterator>
51 call(Iterator const& first, Iterator const& last, rational& attr) in call()
57 attr = rational(x, y); in call()
74 lex::token_def<rational> rt;
83 mpl::vector<rational> > token_type; in main()
101 rational r; in main()
/third_party/boost/libs/icl/example/dynamic_interval_/
Ddynamic_interval.cpp95 interval<rational<int> >::type unit_interval in main()
96 = interval<rational<int> >::right_open(rational<int>(0), rational<int>(1)); in main()
97 interval_set<rational<int> > unit_set(unit_interval); in main()
98 interval_set<rational<int> > ratio_set(unit_set); in main()
99 ratio_set -= rational<int>(1,3); // Subtract 1/3 from the set in main()
103 cout << "The set does " << string(contains(ratio_set, rational<int>(1,3))?"":"NOT") in main()
/third_party/boost/libs/icl/example/interval_/
Dinterval.cpp86 right_open_interval<rational<int> > range1(rational<int>(0,1), rational<int>(2,3)); in main()
87 right_open_interval<rational<int> > range2(rational<int>(1,3), rational<int>(1,1)); in main()
/third_party/boost/libs/icl/example/static_interval_/
Dstatic_interval.cpp104 interval<rational<int> >::type unit_interval in main()
105 = interval<rational<int> >::right_open(rational<int>(0), rational<int>(1)); in main()
106 interval_set<rational<int> > unit_set(unit_interval); in main()
107 interval_set<rational<int> > ratio_set(unit_set); in main()
/third_party/boost/libs/safe_numerics/example/
Dexample15.cpp9 const boost::rational<int> r {1, 2}; in main()
11 const boost::rational<int> q {-2, 4}; in main()
17 const boost::rational<int> c {1, INT_MAX}; in main()
19 const boost::rational<int> d {1, 2}; in main()
25 using safe_rational = boost::rational< in main()
/third_party/boost/libs/regex/example/
DJamfile.v250 [ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
51 [ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
52 [ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
53 [ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
55 [ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
56 [ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
57 [ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
62 [ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
/third_party/boost/boost/icl/
Drational.hpp38 struct is_numeric<boost::rational<Integral> >
45 struct is_continuous<boost::rational<Integral> >
52 struct is_discrete<boost::rational<Integral> >
59 struct has_inverse<boost::rational<Integral> >
/third_party/gstreamer/gstplugins_bad/tests/check/elements/
Djifmux.c410 ExifSRational rational; in compare_shutter_speed() local
421 rational = exif_get_srational (entry->data, in compare_shutter_speed()
425 gst_value_set_fraction (&exif_value, rational.numerator, in compare_shutter_speed()
426 rational.denominator); in compare_shutter_speed()
445 ExifSRational rational; in compare_aperture_value() local
454 rational = exif_get_srational (entry->data, in compare_aperture_value()
458 gst_value_set_fraction (&value, rational.numerator, rational.denominator); in compare_aperture_value()
512 ExifRational rational; in compare_geo_elevation() local
519 rational = exif_get_rational (entry->data, in compare_geo_elevation()
521 gst_util_fraction_to_double (rational.numerator, rational.denominator, in compare_geo_elevation()
[all …]
/third_party/boost/libs/multiprecision/test/
Dtest_arithmetic_tommath_br.cpp20 struct is_boost_rational<boost::rational<T> > : public boost::mpl::true_
26 struct number_category<rational<tom_int> > : public mpl::int_<number_kind_rational>
33 test<boost::rational<boost::multiprecision::tom_int> >(); in main()
Dtest_arithmetic_mpz_br.cpp19 struct is_boost_rational<boost::rational<T> > : public boost::mpl::true_
25 struct number_category<rational<mpz_int> > : public mpl::int_<number_kind_rational>
32 test<boost::rational<boost::multiprecision::mpz_int> >(); in main()
/third_party/boost/libs/geometry/test/util/
Drational.cpp24 boost::rational<int> a = bg::detail::coordinate_cast<boost::rational<int> >::apply(s); in test_coordinate_cast()
32 bg::model::point<boost::rational<int>, 2, bg::cs::cartesian> p; in test_wkt()
/third_party/boost/libs/multiprecision/doc/html/
Dstandalone_HTML.manifest33 boost_multiprecision/tut/rational.html
34 boost_multiprecision/tut/rational/cpp_rational.html
35 boost_multiprecision/tut/rational/gmp_rational.html
36 boost_multiprecision/tut/rational/tommath_rational.html
37 boost_multiprecision/tut/rational/br.html
38 boost_multiprecision/tut/rational/rational_adaptor.html
/third_party/ffmpeg/tests/ref/fate/
Dopt7 rational=1/1
23 -rational <rational> E......... set rational (from 0 to 10) (default 1/1)
52 name: rational default:0 error:
79 name: rational default:1 error:
108 name: rational get: 1/1 set: OK get: 1/1 OK
132 num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr…
135 Setting entry with key 'rational' to value '1/1'
157 num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr…
224 Setting options string 'rational=0 : rational=1/2 : rational=1/-1'
225 Setting entry with key 'rational' to value '0'
[all …]
/third_party/boost/libs/ratio/
DCMakeLists.txt26 # NOTE: As of Boost 1.70, the dependency on rational is only
29 # Boost::rational as a dependency themselves,
31 Boost::rational

12345678