mt.geond.dilatation
Classes
Dlt
: Dilatation (scaling and translation) in n-dim space. Here, scaling is per dimension, not uniform scaling.
- class mt.geond.dilatation.Dlt(offset=array([0., 0., 0.]), scale=array([1., 1., 1.]), check_shapes=True)
Dilatation (scaling and translation) in n-dim space. Here, scaling is per dimension, not uniform scaling.
Examples
>>> import numpy as _np >>> from mt.geond.dilatation import Dlt >>> a = Dlt(offset=np.array([1,2]), scale=np.array([3,4])) >>> ~a Dlt(offset=[-0.33333333 -0.5 ], scale=[0.33333333 0.25 ]) >>> a*~a Dlt(offset=[0. 0.], scale=[1. 1.]) >>> a/a Dlt(offset=[0. 0.], scale=[1. 1.]) >>> a%a Dlt(offset=[0. 0.], scale=[1. 1.]) >>> b = _mg.Dlt(offset=np.array([1,0.5]), scale=np.array([1/3,0.25])) >>> a*b Dlt(offset=[4. 4.], scale=[1. 1.]) >>> b*a Dlt(offset=[1.33333333 1. ], scale=[1. 1.]) >>> a/b Dlt(offset=[-8. -6.], scale=[ 9. 16.]) >>> b/a Dlt(offset=[0.88888889 0.375 ], scale=[0.11111111 0.0625 ]) >>> a << np.ones(2) array([4., 6.])
Inheritance
digraph inheritance608af13a80 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Aff" [URL="mt.geond.affine.html#mt.geond.affine.Aff",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A transformer to perform affine transformations using the same transformation matrix in n-dim space."]; "LieTransformer" -> "Aff" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeometricObject" -> "Aff" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Dlt" [URL="#mt.geond.dilatation.Dlt",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Dilatation (scaling and translation) in n-dim space. Here, scaling is per dimension, not uniform scaling."]; "Aff" -> "Dlt" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeometricObject" [URL="../mt.geo/mt.geo.object.html#mt.geo.object.GeometricObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A geometric object which lives in a d-dimensional Euclidean space."]; "InvertibleTransformer" [URL="../mt.geo/mt.geo.transformation.html#mt.geo.transformation.InvertibleTransformer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A mixin asserting that this is a class of invertible transformers. "]; "Transformer" -> "InvertibleTransformer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "LieTransformer" [URL="../mt.geo/mt.geo.transformation.html#mt.geo.transformation.LieTransformer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A mixin asserting that this is a class of transformers living in a Lie group, supporting the associative multiplication operator and the inversion operator. "]; "InvertibleTransformer" -> "LieTransformer" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Transformer" [URL="../mt.geo/mt.geo.transformation.html#mt.geo.transformation.Transformer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A mixin asserting that this is a class of transformers."]; }- __init__(offset=array([0., 0., 0.]), scale=array([1., 1., 1.]), check_shapes=True)
- __repr__()
Return repr(self).
- property bias
The bias component of the affine transformation matrix.
- property bias_dim
Returns the dimension of the bias vector.
- property dim
Returns the dimension of the transformation.
- invert()
Lie inverse
- multiply(other)
a*b = Lie operator
- property offset
The offset/bias part of the dilated isometry.
- property scale
The scale component/scalar of the dilated isometry.
- property weight
The weight/linear component of the affine transformation matrix.
- property weight_shape
Returns the shape of the weight matrix.