transform¶
The transform module.
- class nutils.transform.TransformItem(todims, fromdims)¶
Bases:
nutils.types.Singleton
Affine transformation.
Base class for transformations of the type \(x ↦ A x + b\).
- class nutils.transform.Matrix(linear, offset)¶
Bases:
nutils.transform.TransformItem
Affine transformation \(x ↦ A x + b\), with \(A\) an \(n×m\) matrix, \(n≥m\)
- Parameters
linear (
numpy.ndarray
) – The transformation matrix \(A\).offset (
numpy.ndarray
) – The offset \(b\).
- class nutils.transform.Square(linear, offset)¶
Bases:
nutils.transform.Matrix
Affine transformation \(x ↦ A x + b\), with \(A\) square
- Parameters
linear (
numpy.ndarray
) – The transformation matrix \(A\).offset (
numpy.ndarray
) – The offset \(b\).
- class nutils.transform.Shift(offset)¶
Bases:
nutils.transform.Square
Shift transformation \(x ↦ x + b\)
- Parameters
offset (
numpy.ndarray
) – The offset \(b\).
- class nutils.transform.Identity(ndims)¶
Bases:
nutils.transform.Shift
Identity transformation \(x ↦ x\)
- Parameters
ndims (
int
) – Dimension of \(x\).
- class nutils.transform.Scale(scale, offset)¶
Bases:
nutils.transform.Square
Affine transformation \(x ↦ a x + b\), with \(a\) a scalar
- Parameters
scale (
float
) – The scalar \(a\).offset (
numpy.ndarray
) – The offset \(b\).
- class nutils.transform.Updim(linear, offset, isflipped)¶
Bases:
nutils.transform.Matrix
Affine transformation \(x ↦ A x + b\), with \(A\) an \(n×(n-1)\) matrix
- Parameters
linear (
numpy.ndarray
) – The transformation matrix \(A\).offset (
numpy.ndarray
) – The offset \(b\).
- class nutils.transform.Identifier(ndims, token)¶
Bases:
nutils.transform.Identity
Generic identifier
This transformation serves as an element-specific or topology-specific token to form the basis of transformation lookups. Otherwise, the transform behaves like an identity.