Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Champs de données | |
const | VARIABLE = 0 |
const | DATA = 1 |
Champs de données hérités de Base | |
const | VARIABLE = 0 |
const | DATA = 1 |
Champs de données hérités de BCMath | |
const | FAST_BITWISE = false |
const | ENGINE_DIR = 'BCMath' |
Champs de données hérités de Engine | |
const | PRIMES |
Fonctions membres protégées statiques | |
static | reduce ($n, $m) |
Fonctions membres protégées statiques hérités de Base | |
static | powModHelper (BCMath $x, BCMath $e, BCMath $n, $class) |
static | prepareReduce ($x, $n, $class) |
static | multiplyReduce ($x, $y, $n, $class) |
static | squareReduce ($x, $n, $class) |
Fonctions membres protégées statiques hérités de BCMath | |
static | setBitmask ($bits) |
Fonctions membres protégées statiques hérités de Engine | |
static | setBitmask ($bits) |
static | base256_lshift (&$x, $shift) |
static | slidingWindow (Engine $x, Engine $e, Engine $n, $class) |
static | randomRangePrimeOuter (Engine $min, Engine $max) |
static | randomRangeHelper (Engine $min, Engine $max) |
static | randomRangePrimeInner (Engine $x, Engine $min, Engine $max) |
static | minHelper (array $nums) |
static | maxHelper (array $nums) |
Fonctions membres privées statiques | |
static | regularBarrett ($x, $n) |
|
staticprotected |
Barrett Modular Reduction
See HAC 14.3.3 / MPM 6.2.5 for more information. Modified slightly, so as not to require negative numbers (initially, this script didn't support negative numbers).
Employs "folding", as described at thesis-149.pdf#page=66. To quote from it, "the idea [behind folding] is to find a value x' such that x (mod m) = x' (mod m), with x' being smaller than x."
Unfortunately, the "Barrett Reduction with Folding" algorithm described in thesis-149.pdf is not, as written, all that usable on account of (1) its not using reasonable radix points as discussed in MPM 6.2.2 and (2) the fact that, even with reasonable radix points, it only works when there are an even number of digits in the denominator. The reason for (2) is that (x >> 1) + (x >> 1) != x / 2 + x / 2. If x is even, they're the same, but if x is odd, they're not. See the in-line comments for details.
string | $n | |
string | $m |
|
staticprivate |
(Regular) Barrett Modular Reduction
For numbers with more than four digits BigInteger::_barrett() is faster. The difference between that and this is that this function does not fold the denominator into a smaller form.
string | $x | |
string | $n |
const DATA = 1 |
$cache[self::DATA] contains the cached data.
private
const VARIABLE = 0 |
Cache constants
$cache[self::VARIABLE] tells us whether or not the cached data is still valid.
private