Skip to content

mccube._custom_types

Defines custom types that are used throughout the package. The following symbols are used in the definitions of the custom types:

  • d: the dimensionality of the particles.
  • n: the number of particles.
  • n_hat: the number of recombined particles.
  • k: the number of versions of a particles (resulting from the same number of cubature paths/points).
  • m: the number of partitions of the particles.

RealScalarLike module-attribute ¤

RealScalarLike = FloatScalarLike | IntScalarLike

A value which can be considered as a real scalar value.

Particles module-attribute ¤

Particles = PyTree[Shaped[Array, '?n d'], 'P']

A PyTree where each leaf is an array of n particles of dimension d.

PartitionedParticles module-attribute ¤

PartitionedParticles = PyTree[Shaped[Array, '?m ?n_div_m d'], 'P']

A Particles PyTree where each leaf has been reorganised into m equally sized partitions of n/m particles of dimension d.

RecombinedParticles module-attribute ¤

RecombinedParticles = PyTree[Shaped[Array, '?n_hat d'], 'P']

A Particles PyTree where each leaf has been recombined/compressed into n_hat < n particles of dimension d.

UnpackedParticles module-attribute ¤

UnpackedParticles = PyTree[Shaped[Array, '?n d-1'], 'P']

A Particles PyTree of n particles of dimension d-1, which have been unpacked from a PyTree of n particles of dimension d, where the d-th dimension represents the particle Weights.

PackedParticles module-attribute ¤

PackedParticles = PyTree[Shaped[Array, '?n d+1'], 'P']

A Particles PyTree of n particles of dimension d+1, where the d+1-th dimension represents the particle Weights, which have been packed from a PyTree of n particles of dimension d, and a PyTree of n weights.

Weights module-attribute ¤

Weights = PyTree[Shaped[Array, '?*n'] | None, 'P']

A PyTree where each leaf is an array of n Weights or None.

Args module-attribute ¤

Args = PyTree[Any]

A PyTree of auxillary arguments.

CubaturePoints module-attribute ¤

CubaturePoints = Shaped[ArrayLike, 'k d']

An array of k points/vectors of dimension d which form the nodes of a cubature formula.

CubaturePointsTree module-attribute ¤

CubaturePointsTree = PyTree[Shaped[ArrayLike, '?k_i d'], 'CPT']

A PyTree of CubaturePoints, where each leaf is associated with a different leaf in a CubatureWeightsTree.

CubatureWeights module-attribute ¤

CubatureWeights = Shaped[ArrayLike, ' k']

An array of k weights which together with the appropriate CubaturePoints, defines a cubature formula.

CubatureWeightsTree module-attribute ¤

CubatureWeightsTree = PyTree[RealScalarLike, 'CPT']

A PyTree of CubatureWeights, where each leaf is associated with a different leaf in a CubaturePointsTree.