3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Synopsis
</title>
5 <link rel=
"stylesheet" href=
"../math.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.77.1">
7 <link rel=
"home" href=
"../index.html" title=
"Math Toolkit 2.5.1">
8 <link rel=
"up" href=
"../gcd_lcm.html" title=
"Chapter 11. Integer Utilities (Greatest Common Divisor and Least Common Multiple)">
9 <link rel=
"prev" href=
"introduction.html" title=
"Introduction">
10 <link rel=
"next" href=
"gcd_function_object.html" title=
"GCD Function Object">
12 <body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF">
13 <table cellpadding=
"2" width=
"100%"><tr>
14 <td valign=
"top"><img alt=
"Boost C++ Libraries" width=
"277" height=
"86" src=
"../../../../../boost.png"></td>
15 <td align=
"center"><a href=
"../../../../../index.html">Home
</a></td>
16 <td align=
"center"><a href=
"../../../../../libs/libraries.htm">Libraries
</a></td>
17 <td align=
"center"><a href=
"http://www.boost.org/users/people.html">People
</a></td>
18 <td align=
"center"><a href=
"http://www.boost.org/users/faq.html">FAQ
</a></td>
19 <td align=
"center"><a href=
"../../../../../more/index.htm">More
</a></td>
22 <div class=
"spirit-nav">
23 <a accesskey=
"p" href=
"introduction.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../gcd_lcm.html"><img src=
"../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../index.html"><img src=
"../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"gcd_function_object.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h2 class=
"title" style=
"clear: both">
27 <a name=
"math_toolkit.synopsis"></a><a class=
"link" href=
"synopsis.html" title=
"Synopsis">Synopsis
</a>
28 </h2></div></div></div>
29 <pre class=
"programlisting"><span class=
"keyword">namespace
</span> <span class=
"identifier">boost
</span>
30 <span class=
"special">{
</span>
31 <span class=
"keyword">namespace
</span> <span class=
"identifier">math
</span>
32 <span class=
"special">{
</span>
34 <span class=
"keyword">template
</span> <span class=
"special"><</span> <span class=
"keyword">typename
</span> <span class=
"identifier">IntegerType
</span> <span class=
"special">></span>
35 <span class=
"keyword">class
</span> <span class=
"identifier">gcd_evaluator
</span><span class=
"special">;
</span>
36 <span class=
"keyword">template
</span> <span class=
"special"><</span> <span class=
"keyword">typename
</span> <span class=
"identifier">IntegerType
</span> <span class=
"special">></span>
37 <span class=
"keyword">class
</span> <span class=
"identifier">lcm_evaluator
</span><span class=
"special">;
</span>
39 <span class=
"keyword">template
</span> <span class=
"special"><</span> <span class=
"keyword">typename
</span> <span class=
"identifier">IntegerType
</span> <span class=
"special">></span>
40 <span class=
"identifier">IntegerType
</span> <span class=
"identifier">gcd
</span><span class=
"special">(
</span> <span class=
"identifier">IntegerType
</span> <span class=
"keyword">const
</span> <span class=
"special">&</span><span class=
"identifier">a
</span><span class=
"special">,
</span> <span class=
"identifier">IntegerType
</span> <span class=
"keyword">const
</span> <span class=
"special">&</span><span class=
"identifier">b
</span> <span class=
"special">);
</span>
41 <span class=
"keyword">template
</span> <span class=
"special"><</span> <span class=
"keyword">typename
</span> <span class=
"identifier">ForwardIterator
</span> <span class=
"special">></span>
42 <span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">pair
</span><span class=
"special"><</span><span class=
"keyword">typename
</span> <span class=
"identifier">std
</span><span class=
"special">::
</span><span class=
"identifier">iterator_traits
</span><span class=
"special"><</span><span class=
"identifier">I
</span><span class=
"special">>::
</span><span class=
"identifier">value_type
</span><span class=
"special">,
</span> <span class=
"identifier">I
</span><span class=
"special">></span> <span class=
"identifier">gcd_range
</span><span class=
"special">(
</span><span class=
"identifier">I
</span> <span class=
"identifier">first
</span><span class=
"special">,
</span> <span class=
"identifier">I
</span> <span class=
"identifier">last
</span><span class=
"special">);
</span>
43 <span class=
"keyword">template
</span> <span class=
"special"><</span> <span class=
"keyword">typename
</span> <span class=
"identifier">IntegerType
</span> <span class=
"special">></span>
44 <span class=
"identifier">IntegerType
</span> <span class=
"identifier">lcm
</span><span class=
"special">(
</span> <span class=
"identifier">IntegerType
</span> <span class=
"keyword">const
</span> <span class=
"special">&</span><span class=
"identifier">a
</span><span class=
"special">,
</span> <span class=
"identifier">IntegerType
</span> <span class=
"keyword">const
</span> <span class=
"special">&</span><span class=
"identifier">b
</span> <span class=
"special">);
</span>
46 <span class=
"keyword">typedef
</span> <span class=
"emphasis"><em>see-below
</em></span> <span class=
"identifier">static_gcd_type
</span><span class=
"special">;
</span>
48 <span class=
"keyword">template
</span> <span class=
"special"><</span> <span class=
"identifier">static_gcd_type
</span> <span class=
"identifier">Value1
</span><span class=
"special">,
</span> <span class=
"identifier">static_gcd_type
</span> <span class=
"identifier">Value2
</span> <span class=
"special">></span>
49 <span class=
"keyword">struct
</span> <span class=
"identifier">static_gcd
</span><span class=
"special">;
</span>
50 <span class=
"keyword">template
</span> <span class=
"special"><</span> <span class=
"identifier">static_gcd_type
</span> <span class=
"identifier">Value1
</span><span class=
"special">,
</span> <span class=
"identifier">static_gcd_type
</span> <span class=
"identifier">Value2
</span> <span class=
"special">></span>
51 <span class=
"keyword">struct
</span> <span class=
"identifier">static_lcm
</span><span class=
"special">;
</span>
53 <span class=
"special">}
</span>
54 <span class=
"special">}
</span>
57 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
58 <td align=
"left"></td>
59 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2006-
2010,
2012-
2014 Nikhar Agrawal,
60 Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
61 Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R
åde, Gautam Sewani,
62 Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang
<p>
63 Distributed under the Boost Software License, Version
1.0. (See accompanying
64 file LICENSE_1_0.txt or copy at
<a href=
"http://www.boost.org/LICENSE_1_0.txt" target=
"_top">http://www.boost.org/LICENSE_1_0.txt
</a>)
69 <div class=
"spirit-nav">
70 <a accesskey=
"p" href=
"introduction.html"><img src=
"../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../gcd_lcm.html"><img src=
"../../../../../doc/src/images/up.png" alt=
"Up"></a><a accesskey=
"h" href=
"../index.html"><img src=
"../../../../../doc/src/images/home.png" alt=
"Home"></a><a accesskey=
"n" href=
"gcd_function_object.html"><img src=
"../../../../../doc/src/images/next.png" alt=
"Next"></a>