版权所有 © 2001-2009 Beman Dawes, Daryle Walker, Gennaro Prota, John Maddock
根据 Boost 软件许可证 1.0 版分发。(请参阅随附的 LICENSE_1_0.txt 文件或访问 https://boost.ac.cn/LICENSE_1_0.txt 获取副本)
目录
Boost.Integer 提供了整数类型支持,在泛型编程中尤其有用。它提供了根据整数属性(如位数或支持的最大值)选择整数类型的方法,以及编译时位掩码选择。它提供了一个 `std::numeric_limits` 的派生类,为 `min` 和 `max` 提供整型常量表达式。最后,它提供了两个编译时算法:确定编译时值中的最高二的幂;以及计算常量表达式的 min 和 max。
Component |
头文件 |
目的 |
---|---|---|
Forward Declarations.(前向声明) |
Classes and class templates forward declarations - for use when just the name of a class is needed.(类和类模板的前向声明 - 当只需要类名时使用。) |
|
The class template |
||
Templates for integer type selection based on properties such as maximum value or number of bits: Use to select the type of an integer when some property such as maximum value or number of bits is known. Useful for generic programming.(用于根据最大值或位数等属性选择整数类型的模板:当已知最大值或位数等属性时,用于选择整数的类型。适用于泛型编程。) |
||
Greatest Common Divisor and Least Common Multiple(最大公约数和最小公倍数). |
|
Functions |
Templates for the selection of integer masks, single or lowest group, based on the number of bits: Use to select a particular mask when the bit position(s) are based on a compile-time variable. Useful for generic programming.(用于根据位数选择整数掩码(单个或最低组)的模板:当位位置基于编译时变量时,用于选择特定掩码。适用于泛型编程。) |
||
Template for finding the highest power of two in a number: Use to find the bit-size/range based on a maximum value. Useful for generic programming.(用于查找数字中最高二的幂的模板:用于根据最大值查找位大小/范围。适用于泛型编程。) |
||
Templates for finding the extrema of two numbers: Use to find a bound based on a minimum or maximum value. Useful for generic programming.(用于查找两个数字的极值(min/max)的模板:用于根据最小值或最大值查找界限。适用于泛型编程。) |
||
Solves mx + ny = gcd(x,y) for x and y.(求解 `mx + ny = gcd(x,y)` 中的 `x` 和 `y`。) |
||
Given a and m, solves ax = 1 mod m for x.(给定 `a` 和 `m`,求解 `ax` = 1 mod `m` 中的 `x`。) |