Skip to main content

Module math

Module math 

Source
Expand description

Mathematics library.

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§

FxHasher
A non-cryptographic hasher (the FxHash algorithm).
Graph
A connected set of members or nodes.
Matrix
A matrix.
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.
Vector
A vector.

Enums§

Norm
Different norms for tensors.
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§

ContractAllWithFirst
Transforms all four indices of a rank-4 tensor.
ContractFirstSecondWithSecond
Transforms the first and second indices of a rank-4 tensor.
ContractFirstThirdFourthWithFirst
Transforms the first, third, and fourth indices of a rank-4 tensor.
ContractSecondFourthWithFirst
Contracts the second and fourth indices of a rank-4 tensor with two vectors.
ContractSecondWithFirst
Transforms the second index of a rank-4 tensor.
ContractThirdFourthWithFirstSecond
Double-contracts the third and fourth indices of a rank-4 tensor.
ContractThirdWithFirst
Transforms the third index of a rank-4 tensor.
CrossProduct
The cross product of two rank-1 tensors.
Hessian
Common methods for Hessians.
HessianAccumulate
Accumulates rank-2 blocks into a sparse Hessian-like structure.
HessianAccumulateGeneral
Accumulates a rank-2 block at an exact (a, b) position.
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§

FxHashMap
A HashMap using FxHasher instead of the default SipHash.
FxHashSet
A HashSet using FxHasher.
Scalar
A scalar.
ScalarList
A list of scalars.
ScalarListVec
A vector of lists of scalars.
Scalars
A vector of scalars.
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.