Expand description
Traits for arithmetic on IntegerVectors.
Modules§
- abs_
squared - Implementations of
AbsSquared, the squared norm of a vector: the sum of the squares of its elements. - add
- Implementations of
AddandAddAssign, for adding vectors. - add_mul
- Adding a multiple of one vector to another, by implementations of
AddMulandAddMulAssign. - add_
mul_ shl - Implementations of
AddMulShlandAddMulShlAssign, for adding a scalar multiple of one vector, shifted left, to another. - balanced_
mod - Implementations of
BalancedModandBalancedModAssign, which reduce every element of a vector to the representative closest to zero modulo a number. - balanced_
mod_ power_ of_ 2 - Implementations of
BalancedModPowerOf2andBalancedModPowerOf2Assign, which reduce every element of a vector to the representative closest to zero modulo a power of 2. - canonical_
primitive_ part - Implementations of
CanonicalPrimitivePart,CanonicalPrimitivePartAssign, andContentAndCanonicalPrimitivePart, which compute the primitive part of a vector with its first nonzero element made positive. - canonicalize_
sign - Implementations of
CanonicalizeSignandCanonicalizeSignAssign, which negate a vector if its pivot is negative. - content
- Implementations of
Content,PrimitivePart,PrimitivePartAssign, andContentAndPrimitivePart, which compute the GCD of a vector’s elements and the vector divided by it. - content_
chained - Implementations of
ContentChained, which computes the GCD of a number and a vector’s elements. - div_
exact - Exact division of a vector by a scalar, by implementations of
DivExactandDivExactAssign. - dot
- Implementations of
Dot, the dot product of two vectors. - dot_
sign - Implementations of
DotSign, the sign of the dot product of two vectors. - element_
lcm - An implementation of
ElementLcm, the LCM of the elements. - element_
product - An implementation of
ElementProduct, the product of the elements. - element_
sum - An implementation of
ElementSum, the sum of the elements. - entrywise_
abs - Implementations of
EntrywiseAbs,EntrywiseAbsAssign, andEntrywiseUnsignedAbs, which replace every element of a vector by its absolute value. - entrywise_
div_ round - Dividing every element of a vector by a scalar and rounding each quotient, by implementations of
EntrywiseDivRoundandEntrywiseDivRoundAssign. - entrywise_
shl_ round - Left-shifting a vector (multiplying it by a power of 2) and rounding every element, by
implementations of
EntrywiseShlRoundandEntrywiseShlRoundAssign. - entrywise_
shr_ round - Right-shifting a vector (dividing it by a power of 2) and rounding every element, by
implementations of
EntrywiseShrRoundandEntrywiseShrRoundAssign. - height
- An implementation of
HeightandHeightRef, the largest height of any element. - l1_norm
- An implementation of
L1Norm, the sum of the absolute values of the elements. - mod_op
- Implementations of
Mod,Rem, andRemAssign, for reducing every element of a vector modulo a number. - mod_
power_ of_ 2 - Implementations of
ModPowerOf2,RemPowerOf2, andRemPowerOf2Assign, for reducing every element of a vector modulo a power of 2. - multi_
crt IntegerVector::multi_balanced_crt, which combines vectors of residues modulo many word-sized moduli into balanced representatives by the Chinese remainder theorem.- neg
- Implementations of
NegandNegAssign, for negating a vector. - scalar_
div - Implementations of
DivandDivAssign, for dividing a vector by a scalar. - scalar_
mul - Implementations of
MulandMulAssign, for multiplying a vector by a scalar, with the scalar on either side. - shl
- Left-shifting a vector (multiplying it by a power of 2), by implementations of
ShlandShlAssign. - shr
- Right-shifting a vector (dividing it by a power of 2 and taking the floor), by implementations
of
ShrandShrAssign. - sub
- Implementations of
SubandSubAssign, for subtracting vectors. - sub_mul
- Subtracting a multiple of one vector from another, by implementations of
SubMulandSubMulAssign. - sub_
mul_ shl - Implementations of
SubMulShlandSubMulShlAssign, for subtracting a scalar multiple of one vector, shifted left, from another. - sum
- Implementations of
Sum, for adding up vectors entry by entry.