detail/gcd_lcm.hpp は2つの汎用整数アルゴリズムを提供する。 最大公約数と最小公倍数である。
namespace details { namespace pool { template <typename Integer> Integer gcd(Integer A, Integer B); template <typename Integer> Integer lcm(Integer A, Integer B); } // namespace pool } // namespace details
Symbol | Meaning |
---|---|
Integer | An integral type |
A, B | Values of type Integer |
Expression | Result Type | Precondition | Notes |
---|---|---|---|
gcd(A, B) | Integer | A > 0 && B > 0 | A と B の最大公約数を返す。 |
lcm(A, B) | Integer | A > 0 && B > 0 | A と B の最小公倍数を返す。 |
速度のため、A > Bとする。
なし。
このヘッダーは Boost algorithms library に置き換えられるかもしれない。
Copyright © 2000, 2001 Stephen Cleary (shammah@voyager.net)
This file can be redistributed and/or modified under the terms found in copyright.html
This software and its documentation is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.