Skip to main content

Module math

Module math 

Source
Expand description

Mathematical methods.

Modules§

assert
Assertion helpers for comparing values.
integrate
Integration, ODEs, and DAEs.
interpolate
Interpolation schemes.
optimize
Optimization and root finding.
random
Random number generation.
sparse
Sparse data types.
special
Special functions.

Structs§

Auxiliary
A second intermediate configuration.
Current
The current configuration.
Factor
The shared index of a factorization.
Flattened
The second index of a flattened higher-rank tensor.
FxHasher
A non-cryptographic hasher (the FxHash algorithm).
Graph
A connected set of members or nodes.
Intermediate
An intermediate configuration.
LdlDecomposition
The LDLᵀ decomposition of a symmetric matrix.
LuDecomposition
The LU decomposition of a square matrix.
Matrix
A matrix.
Projection
The space a composite element projects onto.
Quantity
A scalar carrying a physical unit.
QuantitySparseVec
A sparse vector of quantities, storing only inserted entries.
Reference
The reference configuration.
Set
A collection of members with optional numbering.
Sets
A set of sets that optionally provides the converse.
SquareMatrix
A square matrix.
TensorList
A fixed-size collection of tensors.
TensorRank1
A d-dimensional tensor of rank 1.
TensorRank2
A d-dimensional tensor of rank 2.
TensorRank3
A d-dimensional tensor of rank 3.
TensorRank4
A d-dimensional tensor of rank 4.
TensorRank2SparseVec
A sparse vector of rank-2 tensors, storing only inserted entries.
TensorRank2SparseVec2DSymmetric
A vector of sparse vectors of rank-2 tensors, storing only the symmetric half.
TensorTuple
A fixed-size nested collection of different tensors.
TensorVector
A resizable collection of tensors.
Transposed
A HessianBlock with its rows and columns swapped.
Vector
A vector.

Enums§

Norm
Different norms for tensors.
Spectrum
A cached eigendecomposition of a symmetric tensor, letting Self::powm/Self::dpowm be evaluated at several exponents while paying for only one cubic eigensolve.
TensorError
Possible errors for tensors.

Constants§

IDENTITY
The 3D identity, configurations (1, 1).
IDENTITY_00
The 3D identity, configurations (0, 0).
IDENTITY_10
The 3D identity, configurations (1, 0).
IDENTITY_22
The 3D identity, configurations (2, 2).
IDENTITY_1010
The 3D rank-4 identity, configurations (1, 0, 1, 0).
LEVI_CIVITA
The 3D Levi-Civita permutation tensor, configurations (1, 1, 1).
ZERO
The 3D zero tensor, configurations (1, 1).
ZERO_10
The 3D zero tensor, configurations (1, 0).

Traits§

Configuration
The configuration a tensor index belongs to.
ContractAllWithFirst
Transforms all four indices of a rank-4 tensor.
ContractFirstSecondWithSecond
ContractFirstThirdFourthWithFirst
ContractSecondFourthWithFirst
ContractSecondWithFirst
ContractThirdFourthWithFirstSecond
ContractThirdWithFirst
ContractWith
The full contraction of two tensors whose units need not agree.
CrossProduct
The cross product of two rank-1 tensors.
Differentiable
A tensor that can be differentiated with respect to a variable of unit T.
Erase
Views a tensor with its configurations and unit discarded.
Hessian
Common methods for Hessians.
HessianAccumulate
Accumulates rank-2 blocks into a sparse Hessian-like structure.
HessianBlock
Common methods for blocks of a Hessian.
Is
Implemented only where the two types are the same, so that a unit may be named where it is discarded without allowing a different one.
Jacobian
Common methods for Jacobians.
Rank2
Common methods for rank-2 tensors.
Solution
Common methods for solutions.
Tensor
Common methods for tensors.
TensorArray
Common methods for tensors derived from arrays.
TensorVec
Common methods for tensors derived from Vec.

Functions§

levi_civita
Returns the rank-3 Levi-Civita symbol.
tensor_rank_1_zero
Returns the rank-1 zero tensor as a constant.

Type Aliases§

Derivative
The derivative of Y with respect to a variable of unit T.
FxHashMap
A HashMap using FxHasher instead of the default SipHash.
FxHashSet
A HashSet using FxHasher.
QuantitySparseVec2D
A vector of sparse vectors of quantities, storing only inserted entries.
QuantityVector
A vector of quantities.
Scalar
A scalar.
ScalarList
A list of scalars.
ScalarListVec
A vector of lists of scalars.
Scalars
A vector of scalars.
Square
The unit a quantity of unit U carries once squared.
TensorRank0
A tensor of rank 0 (a scalar).
TensorRank0List
A list of rank-0 tensors (scalars).
TensorRank0List2D
A list of lists of rank-0 tensors (scalars).
TensorRank1List
A list of rank-1 tensors.
TensorRank1List2D
A list of lists of rank-1 tensors.
TensorRank1RefVec
A vector of references to rank-1 tensors.
TensorRank1Vec
A vector of rank-1 tensors.
TensorRank1Vec2D
A vector of vectors of rank-1 tensors.
TensorRank2List
A list of rank-2 tensors.
TensorRank2List2D
A list of lists of rank-2 tensors.
TensorRank2ListVec
A vector of lists of rank-2 tensors.
TensorRank2SparseVec2D
A vector of sparse vectors of rank-2 tensors, storing only inserted entries.
TensorRank2Vec
A vector of rank-2 tensors.
TensorRank2Vec2D
A vector of vectors of rank-2 tensors.
TensorRank4List
A list of rank-4 tensors.
TensorRank4Vec
A vector of rank-4 tensors.
TensorTupleList
A list of tensor tuples.
TensorTupleListVec
A vector of lists of tensor tuples.
TensorTupleListVec2D
A vector of vectors of lists of tensor tuples.
TensorTupleVec
A vector of tensor tuples.