minieigen documentation¶
Overview¶
Todo
Something concise here.
Examples¶
Todo
Some examples of what can be done with minieigen
.
Naming conventions¶
Classes are suffixed with number indicating size where it makes sense (it does not make sense for
minieigen.Quaternion
):minieigen.Vector3
is a 3-vector (column vector);minieigen.Matrix3
is a 3×3 matrix;minieigen.AlignedBox3
is aligned box in 3d;X
indicates dynamic-sized types, such asminieigen.VectorX
orminieigen.MatrixX
.
Scalar (element) type is suffixed at the end:
nothing is suffixed for floats (
minieigen.Matrix3
);i
indicates integers (minieigen.Matrix3i
);c
indicates complex numbers (minieigen.Matrix3c
).
Methods are named as follows:
static methods are upper-case (as in c++), e.g.
minieigen.Matrix3.Random
;nullary static methods are exposed as properties, if they return a constant (e.g.
minieigen.Matrix3.Identity
); if they don’t, they are exposed as methods (minieigen.Matrix3.Random
); the idea is that the necessity to call the method (Matrix3.Random()
) singifies that there is some computation going on, whereas constants behave like immutable singletons.
non-static methods are lower-case (as in c++), e.g.
minieigen.Matrix3.inverse
.
Return types:
methods modifying the instance in-place return
None
(e.g.minieigen.Vector3.normalize
); some methods in c++ (e.g. Quaternion::setFromTwoVectors) both modify the instance and return the reference to it, which we don’t want to do in Python (minieigen.Quaternion.setFromTwoVectors
);methods returning another object (e.g.
minieigen.Vector3.normalized
) do not modify the instance;methods returning (non-const) references return by value in python
Limitations¶
Type conversions (e.g. float to complex) are not supported.
Methods returning references in c++ return values in Python (so e.g.
Matrix3().diagonal()[2]=0
would zero the last diagonal element in c++ but not in Python).Many methods are not wrapped, though they are fairly easy to add.
Conversion from 1-column
MatrixX
toVectorX
is not automatic in places where the algebra requires it.Alignment of matrices is not supported (therefore Eigen cannot vectorize the code well); it might be a performance issue in some cases; c++ code interfacing with minieigen (in a way that c++ values can be set from Python) must compile with
EIGEN_DONT_ALIGN
, otherwise there might be crashes at runtime when vector instructions receive unaligned data. It seems that alignment is difficult to do with boost::python.Proper automatic tests are missing.
Links¶
http://eigen.tuxfamily.org (Eigen itself)
http://www.launchpad.net/minieigen (upstream repository, bug reports, answers)
https://pypi.python.org/pypi/minieigen (Python package index page, used by
easy_install
)packages:
Ubuntu: distribution, PPA
Documentation¶
miniEigen is wrapper for a small part of the Eigen library. Refer to its documentation for details. All classes in this module support pickling.
- class minieigen.AlignedBox2¶
Axis-aligned box object in 2d, defined by its minimum and maximum corners
- clamp((AlignedBox2)arg1, (AlignedBox2)arg2) None[STATIC] ¶
- contains((AlignedBox2)arg1, (Vector2)arg2) bool[STATIC] ¶
contains( (AlignedBox2)arg1, (AlignedBox2)arg2) → bool
- empty((AlignedBox2)arg1) bool[STATIC] ¶
- extend((AlignedBox2)arg1, (Vector2)arg2) None[STATIC] ¶
extend( (AlignedBox2)arg1, (AlignedBox2)arg2) → None
- intersection((AlignedBox2)arg1, (AlignedBox2)arg2) AlignedBox2[STATIC] ¶
- property max¶
- merged((AlignedBox2)arg1, (AlignedBox2)arg2) AlignedBox2[STATIC] ¶
- property min¶
- volume((AlignedBox2)arg1) float[STATIC] ¶
- class minieigen.AlignedBox3¶
Axis-aligned box object, defined by its minimum and maximum corners
- clamp((AlignedBox3)arg1, (AlignedBox3)arg2) None[STATIC] ¶
- contains((AlignedBox3)arg1, (Vector3)arg2) bool[STATIC] ¶
contains( (AlignedBox3)arg1, (AlignedBox3)arg2) → bool
- empty((AlignedBox3)arg1) bool[STATIC] ¶
- extend((AlignedBox3)arg1, (Vector3)arg2) None[STATIC] ¶
extend( (AlignedBox3)arg1, (AlignedBox3)arg2) → None
- intersection((AlignedBox3)arg1, (AlignedBox3)arg2) AlignedBox3[STATIC] ¶
- property max¶
- merged((AlignedBox3)arg1, (AlignedBox3)arg2) AlignedBox3[STATIC] ¶
- property min¶
- volume((AlignedBox3)arg1) float[STATIC] ¶
- class minieigen.Matrix3¶
3x3 float matrix.
Supported operations (
m
is a Matrix3,f
if a float/int,v
is a Vector3):-m
,m+m
,m+=m
,m-m
,m-=m
,m*f
,f*m
,m*=f
,m/f
,m/=f
,m*m
,m*=m
,m*v
,v*m
,m==m
,m!=m
.Static attributes:
Zero
,Ones
,Identity
.- Identity = Matrix3(1,0,0, 0,1,0, 0,0,1)¶
- Ones = Matrix3(1,1,1, 1,1,1, 1,1,1)¶
- static Random() Matrix3[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Matrix3(0,0,0, 0,0,0, 0,0,0)¶
- cols((Matrix3)arg1) int[STATIC] ¶
Number of columns.
- computeUnitaryPositive((Matrix3)arg1) tuple[STATIC] ¶
Compute polar decomposition (unitary matrix U and positive semi-definite symmetric matrix P such that self=U*P).
- determinant((Matrix3)arg1) float[STATIC] ¶
Return matrix determinant.
- isApprox((Matrix3)arg1, (Matrix3)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- jacobiSVD((Matrix3)arg1) tuple[STATIC] ¶
Compute SVD decomposition of square matrix, retuns (U,S,V) such that self=U*S*V.transpose()
- maxAbsCoeff((Matrix3)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Matrix3)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((Matrix3)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((Matrix3)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((Matrix3)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Matrix3)arg1) None[STATIC] ¶
Normalize this object in-place.
- polarDecomposition((Matrix3)arg1) tuple[STATIC] ¶
Alias for
computeUnitaryPositive
.
- prod((Matrix3)arg1) float[STATIC] ¶
Product of all elements.
- pruned((Matrix3)arg1[, (float)absTol=1e-06]) Matrix3[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Matrix3)arg1) int[STATIC] ¶
Number of rows.
- selfAdjointEigenDecomposition((Matrix3)arg1) tuple[STATIC] ¶
Compute eigen (spectral) decomposition of symmetric matrix, returns (eigVecs,eigVals). eigVecs is orthogonal Matrix3 with columns ar normalized eigenvectors, eigVals is Vector3 with corresponding eigenvalues. self=eigVecs*diag(eigVals)*eigVecs.transpose().
- spectralDecomposition((Matrix3)arg1) tuple[STATIC] ¶
Alias for
selfAdjointEigenDecomposition
.
- squaredNorm((Matrix3)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Matrix3)arg1) float[STATIC] ¶
Sum of all elements.
- trace((Matrix3)arg1) float[STATIC] ¶
Return sum of diagonal elements.
- class minieigen.Matrix3c¶
/TODO/
- Identity = Matrix3c(1,0,0, 0,1,0, 0,0,1)¶
- Ones = Matrix3c(1,1,1, 1,1,1, 1,1,1)¶
- static Random() Matrix3c[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Matrix3c(0,0,0, 0,0,0, 0,0,0)¶
- cols((Matrix3c)arg1) int[STATIC] ¶
Number of columns.
- determinant((Matrix3c)arg1) complex[STATIC] ¶
Return matrix determinant.
- isApprox((Matrix3c)arg1, (Matrix3c)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Matrix3c)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- mean((Matrix3c)arg1) complex[STATIC] ¶
Mean value over all elements.
- norm((Matrix3c)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Matrix3c)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((Matrix3c)arg1) complex[STATIC] ¶
Product of all elements.
- pruned((Matrix3c)arg1[, (float)absTol=1e-06]) Matrix3c[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Matrix3c)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Matrix3c)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Matrix3c)arg1) complex[STATIC] ¶
Sum of all elements.
- trace((Matrix3c)arg1) complex[STATIC] ¶
Return sum of diagonal elements.
- class minieigen.Matrix6¶
6x6 float matrix. Constructed from 4 3x3 sub-matrices, from 6xVector6 (rows).
Supported operations (
m
is a Matrix6,f
if a float/int,v
is a Vector6):-m
,m+m
,m+=m
,m-m
,m-=m
,m*f
,f*m
,m*=f
,m/f
,m/=f
,m*m
,m*=m
,m*v
,v*m
,m==m
,m!=m
.Static attributes:
Zero
,Ones
,Identity
.- Identity = Matrix6( ( 1, 0, 0, 0, 0, 0), ( 0, 1, 0, 0, 0, 0), ( 0, 0, 1, 0, 0, 0), ( 0, 0, 0, 1, 0, 0), ( 0, 0, 0, 0, 1, 0), ( 0, 0, 0, 0, 0, 1) )¶
- Ones = Matrix6( ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1) )¶
- static Random() Matrix6[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Matrix6( ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0) )¶
- cols((Matrix6)arg1) int[STATIC] ¶
Number of columns.
- computeUnitaryPositive((Matrix6)arg1) tuple[STATIC] ¶
Compute polar decomposition (unitary matrix U and positive semi-definite symmetric matrix P such that self=U*P).
- determinant((Matrix6)arg1) float[STATIC] ¶
Return matrix determinant.
- isApprox((Matrix6)arg1, (Matrix6)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- jacobiSVD((Matrix6)arg1) tuple[STATIC] ¶
Compute SVD decomposition of square matrix, retuns (U,S,V) such that self=U*S*V.transpose()
- maxAbsCoeff((Matrix6)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Matrix6)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((Matrix6)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((Matrix6)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((Matrix6)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Matrix6)arg1) None[STATIC] ¶
Normalize this object in-place.
- polarDecomposition((Matrix6)arg1) tuple[STATIC] ¶
Alias for
computeUnitaryPositive
.
- prod((Matrix6)arg1) float[STATIC] ¶
Product of all elements.
- pruned((Matrix6)arg1[, (float)absTol=1e-06]) Matrix6[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Matrix6)arg1) int[STATIC] ¶
Number of rows.
- selfAdjointEigenDecomposition((Matrix6)arg1) tuple[STATIC] ¶
Compute eigen (spectral) decomposition of symmetric matrix, returns (eigVecs,eigVals). eigVecs is orthogonal Matrix3 with columns ar normalized eigenvectors, eigVals is Vector3 with corresponding eigenvalues. self=eigVecs*diag(eigVals)*eigVecs.transpose().
- spectralDecomposition((Matrix6)arg1) tuple[STATIC] ¶
Alias for
selfAdjointEigenDecomposition
.
- squaredNorm((Matrix6)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Matrix6)arg1) float[STATIC] ¶
Sum of all elements.
- trace((Matrix6)arg1) float[STATIC] ¶
Return sum of diagonal elements.
- class minieigen.Matrix6c¶
/TODO/
- Identity = Matrix6c( ( 1, 0, 0, 0, 0, 0), ( 0, 1, 0, 0, 0, 0), ( 0, 0, 1, 0, 0, 0), ( 0, 0, 0, 1, 0, 0), ( 0, 0, 0, 0, 1, 0), ( 0, 0, 0, 0, 0, 1) )¶
- Ones = Matrix6c( ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1), ( 1, 1, 1, 1, 1, 1) )¶
- static Random() Matrix6c[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Matrix6c( ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0, 0) )¶
- cols((Matrix6c)arg1) int[STATIC] ¶
Number of columns.
- determinant((Matrix6c)arg1) complex[STATIC] ¶
Return matrix determinant.
- isApprox((Matrix6c)arg1, (Matrix6c)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Matrix6c)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- mean((Matrix6c)arg1) complex[STATIC] ¶
Mean value over all elements.
- norm((Matrix6c)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Matrix6c)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((Matrix6c)arg1) complex[STATIC] ¶
Product of all elements.
- pruned((Matrix6c)arg1[, (float)absTol=1e-06]) Matrix6c[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Matrix6c)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Matrix6c)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Matrix6c)arg1) complex[STATIC] ¶
Sum of all elements.
- trace((Matrix6c)arg1) complex[STATIC] ¶
Return sum of diagonal elements.
- class minieigen.MatrixX¶
XxX (dynamic-sized) float matrix. Constructed from list of rows (as VectorX).
Supported operations (
m
is a MatrixX,f
if a float/int,v
is a VectorX):-m
,m+m
,m+=m
,m-m
,m-=m
,m*f
,f*m
,m*=f
,m/f
,m/=f
,m*m
,m*=m
,m*v
,v*m
,m==m
,m!=m
.- static Identity((int)arg1, (int)rank) MatrixX[STATIC] ¶
Create identity matrix with given rank (square).
- static Ones((int)rows, (int)cols) MatrixX[STATIC] ¶
Create matrix of given dimensions where all elements are set to 1.
- static Random((int)rows, (int)cols) MatrixX[STATIC] ¶
Create matrix with given dimensions where all elements are set to number between 0 and 1 (uniformly-distributed).
- cols((MatrixX)arg1) int[STATIC] ¶
Number of columns.
- computeUnitaryPositive((MatrixX)arg1) tuple[STATIC] ¶
Compute polar decomposition (unitary matrix U and positive semi-definite symmetric matrix P such that self=U*P).
- determinant((MatrixX)arg1) float[STATIC] ¶
Return matrix determinant.
- isApprox((MatrixX)arg1, (MatrixX)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- jacobiSVD((MatrixX)arg1) tuple[STATIC] ¶
Compute SVD decomposition of square matrix, retuns (U,S,V) such that self=U*S*V.transpose()
- maxAbsCoeff((MatrixX)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((MatrixX)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((MatrixX)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((MatrixX)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((MatrixX)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((MatrixX)arg1) None[STATIC] ¶
Normalize this object in-place.
- polarDecomposition((MatrixX)arg1) tuple[STATIC] ¶
Alias for
computeUnitaryPositive
.
- prod((MatrixX)arg1) float[STATIC] ¶
Product of all elements.
- pruned((MatrixX)arg1[, (float)absTol=1e-06]) MatrixX[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- resize((MatrixX)arg1, (int)rows, (int)cols) None[STATIC] ¶
Change size of the matrix, keep values of elements which exist in the new matrix
- rows((MatrixX)arg1) int[STATIC] ¶
Number of rows.
- selfAdjointEigenDecomposition((MatrixX)arg1) tuple[STATIC] ¶
Compute eigen (spectral) decomposition of symmetric matrix, returns (eigVecs,eigVals). eigVecs is orthogonal Matrix3 with columns ar normalized eigenvectors, eigVals is Vector3 with corresponding eigenvalues. self=eigVecs*diag(eigVals)*eigVecs.transpose().
- spectralDecomposition((MatrixX)arg1) tuple[STATIC] ¶
Alias for
selfAdjointEigenDecomposition
.
- squaredNorm((MatrixX)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((MatrixX)arg1) float[STATIC] ¶
Sum of all elements.
- trace((MatrixX)arg1) float[STATIC] ¶
Return sum of diagonal elements.
- class minieigen.MatrixXc¶
/TODO/
- static Identity((int)arg1, (int)rank) MatrixXc[STATIC] ¶
Create identity matrix with given rank (square).
- static Ones((int)rows, (int)cols) MatrixXc[STATIC] ¶
Create matrix of given dimensions where all elements are set to 1.
- static Random((int)rows, (int)cols) MatrixXc[STATIC] ¶
Create matrix with given dimensions where all elements are set to number between 0 and 1 (uniformly-distributed).
- cols((MatrixXc)arg1) int[STATIC] ¶
Number of columns.
- determinant((MatrixXc)arg1) complex[STATIC] ¶
Return matrix determinant.
- isApprox((MatrixXc)arg1, (MatrixXc)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((MatrixXc)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- mean((MatrixXc)arg1) complex[STATIC] ¶
Mean value over all elements.
- norm((MatrixXc)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((MatrixXc)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((MatrixXc)arg1) complex[STATIC] ¶
Product of all elements.
- pruned((MatrixXc)arg1[, (float)absTol=1e-06]) MatrixXc[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- resize((MatrixXc)arg1, (int)rows, (int)cols) None[STATIC] ¶
Change size of the matrix, keep values of elements which exist in the new matrix
- rows((MatrixXc)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((MatrixXc)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((MatrixXc)arg1) complex[STATIC] ¶
Sum of all elements.
- trace((MatrixXc)arg1) complex[STATIC] ¶
Return sum of diagonal elements.
- class minieigen.Quaternion¶
Quaternion representing rotation.
Supported operations (
q
is a Quaternion,v
is a Vector3):q*q
(rotation composition),q*=q
,q*v
(rotatingv
byq
),q==q
,q!=q
.Static attributes:
Identity
.- Identity = Quaternion((1,0,0),0)¶
- angularDistance((Quaternion)arg1, (Quaternion)arg2) float[STATIC] ¶
- conjugate((Quaternion)arg1) Quaternion[STATIC] ¶
- inverse((Quaternion)arg1) Quaternion[STATIC] ¶
- norm((Quaternion)arg1) float[STATIC] ¶
- normalize((Quaternion)arg1) None[STATIC] ¶
- normalized((Quaternion)arg1) Quaternion[STATIC] ¶
- setFromTwoVectors((Quaternion)arg1, (Vector3)u, (Vector3)v) None[STATIC] ¶
- slerp((Quaternion)arg1, (float)t, (Quaternion)other) Quaternion[STATIC] ¶
- toAngleAxis((Quaternion)arg1) tuple[STATIC] ¶
- toAxisAngle((Quaternion)arg1) tuple[STATIC] ¶
- class minieigen.Vector2¶
3-dimensional float vector.
Supported operations (
f
if a float/int,v
is a Vector3):-v
,v+v
,v+=v
,v-v
,v-=v
,v*f
,f*v
,v*=f
,v/f
,v/=f
,v==v
,v!=v
.Implicit conversion from sequence (list, tuple, …) of 2 floats.
Static attributes:
Zero
,Ones
,UnitX
,UnitY
.- Identity = Vector2(1,0)¶
- Ones = Vector2(1,1)¶
- static Random() Vector2[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- UnitX = Vector2(1,0)¶
- UnitY = Vector2(0,1)¶
- Zero = Vector2(0,0)¶
- asDiagonal((Vector2)arg1) object[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector2)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector2)arg1, (Vector2)other) float[STATIC] ¶
Dot product with other.
- isApprox((Vector2)arg1, (Vector2)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector2)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Vector2)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((Vector2)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((Vector2)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((Vector2)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Vector2)arg1) None[STATIC] ¶
Normalize this object in-place.
- outer((Vector2)arg1, (Vector2)other) object[STATIC] ¶
Outer product with other.
- prod((Vector2)arg1) float[STATIC] ¶
Product of all elements.
- pruned((Vector2)arg1[, (float)absTol=1e-06]) Vector2[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Vector2)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Vector2)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Vector2)arg1) float[STATIC] ¶
Sum of all elements.
- class minieigen.Vector2c¶
/TODO/
- Identity = Vector2c(1,0)¶
- Ones = Vector2c(1,1)¶
- static Random() Vector2c[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- UnitX = Vector2c(1,0)¶
- UnitY = Vector2c(0,1)¶
- Zero = Vector2c(0,0)¶
- asDiagonal((Vector2c)arg1) object[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector2c)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector2c)arg1, (Vector2c)other) complex[STATIC] ¶
Dot product with other.
- isApprox((Vector2c)arg1, (Vector2c)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector2c)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- mean((Vector2c)arg1) complex[STATIC] ¶
Mean value over all elements.
- norm((Vector2c)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Vector2c)arg1) None[STATIC] ¶
Normalize this object in-place.
- outer((Vector2c)arg1, (Vector2c)other) object[STATIC] ¶
Outer product with other.
- prod((Vector2c)arg1) complex[STATIC] ¶
Product of all elements.
- pruned((Vector2c)arg1[, (float)absTol=1e-06]) Vector2c[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Vector2c)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Vector2c)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Vector2c)arg1) complex[STATIC] ¶
Sum of all elements.
- class minieigen.Vector2i¶
2-dimensional integer vector.
Supported operations (
i
if an int,v
is a Vector2i):-v
,v+v
,v+=v
,v-v
,v-=v
,v*i
,i*v
,v*=i
,v==v
,v!=v
.Implicit conversion from sequence (list, tuple, …) of 2 integers.
Static attributes:
Zero
,Ones
,UnitX
,UnitY
.- Identity = Vector2i(1,0)¶
- Ones = Vector2i(1,1)¶
- static Random() Vector2i[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- UnitX = Vector2i(1,0)¶
- UnitY = Vector2i(0,1)¶
- Zero = Vector2i(0,0)¶
- asDiagonal((Vector2i)arg1) object[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector2i)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector2i)arg1, (Vector2i)other) int[STATIC] ¶
Dot product with other.
- isApprox((Vector2i)arg1, (Vector2i)other[, (int)prec=0]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector2i)arg1) int[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Vector2i)arg1) int[STATIC] ¶
Maximum value over all elements.
- mean((Vector2i)arg1) int[STATIC] ¶
Mean value over all elements.
- minCoeff((Vector2i)arg1) int[STATIC] ¶
Minimum value over all elements.
- outer((Vector2i)arg1, (Vector2i)other) object[STATIC] ¶
Outer product with other.
- prod((Vector2i)arg1) int[STATIC] ¶
Product of all elements.
- rows((Vector2i)arg1) int[STATIC] ¶
Number of rows.
- sum((Vector2i)arg1) int[STATIC] ¶
Sum of all elements.
- class minieigen.Vector3¶
3-dimensional float vector.
Supported operations (
f
if a float/int,v
is a Vector3):-v
,v+v
,v+=v
,v-v
,v-=v
,v*f
,f*v
,v*=f
,v/f
,v/=f
,v==v
,v!=v
, plus operations withMatrix3
andQuaternion
.Implicit conversion from sequence (list, tuple, …) of 3 floats.
Static attributes:
Zero
,Ones
,UnitX
,UnitY
,UnitZ
.- Identity = Vector3(1,0,0)¶
- Ones = Vector3(1,1,1)¶
- static Random() Vector3[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- UnitX = Vector3(1,0,0)¶
- UnitY = Vector3(0,1,0)¶
- UnitZ = Vector3(0,0,1)¶
- Zero = Vector3(0,0,0)¶
- asDiagonal((Vector3)arg1) Matrix3[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector3)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector3)arg1, (Vector3)other) float[STATIC] ¶
Dot product with other.
- isApprox((Vector3)arg1, (Vector3)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector3)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Vector3)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((Vector3)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((Vector3)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((Vector3)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Vector3)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((Vector3)arg1) float[STATIC] ¶
Product of all elements.
- pruned((Vector3)arg1[, (float)absTol=1e-06]) Vector3[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Vector3)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Vector3)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Vector3)arg1) float[STATIC] ¶
Sum of all elements.
- class minieigen.Vector3c¶
/TODO/
- Identity = Vector3c(1,0,0)¶
- Ones = Vector3c(1,1,1)¶
- static Random() Vector3c[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- UnitX = Vector3c(1,0,0)¶
- UnitY = Vector3c(0,1,0)¶
- UnitZ = Vector3c(0,0,1)¶
- Zero = Vector3c(0,0,0)¶
- asDiagonal((Vector3c)arg1) Matrix3c[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector3c)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector3c)arg1, (Vector3c)other) complex[STATIC] ¶
Dot product with other.
- isApprox((Vector3c)arg1, (Vector3c)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector3c)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- mean((Vector3c)arg1) complex[STATIC] ¶
Mean value over all elements.
- norm((Vector3c)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Vector3c)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((Vector3c)arg1) complex[STATIC] ¶
Product of all elements.
- pruned((Vector3c)arg1[, (float)absTol=1e-06]) Vector3c[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Vector3c)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Vector3c)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Vector3c)arg1) complex[STATIC] ¶
Sum of all elements.
- class minieigen.Vector3i¶
3-dimensional integer vector.
Supported operations (
i
if an int,v
is a Vector3i):-v
,v+v
,v+=v
,v-v
,v-=v
,v*i
,i*v
,v*=i
,v==v
,v!=v
.Implicit conversion from sequence (list, tuple, …) of 3 integers.
Static attributes:
Zero
,Ones
,UnitX
,UnitY
,UnitZ
.- Identity = Vector3i(1,0,0)¶
- Ones = Vector3i(1,1,1)¶
- static Random() Vector3i[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- UnitX = Vector3i(1,0,0)¶
- UnitY = Vector3i(0,1,0)¶
- UnitZ = Vector3i(0,0,1)¶
- Zero = Vector3i(0,0,0)¶
- asDiagonal((Vector3i)arg1) object[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector3i)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector3i)arg1, (Vector3i)other) int[STATIC] ¶
Dot product with other.
- isApprox((Vector3i)arg1, (Vector3i)other[, (int)prec=0]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector3i)arg1) int[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Vector3i)arg1) int[STATIC] ¶
Maximum value over all elements.
- mean((Vector3i)arg1) int[STATIC] ¶
Mean value over all elements.
- minCoeff((Vector3i)arg1) int[STATIC] ¶
Minimum value over all elements.
- outer((Vector3i)arg1, (Vector3i)other) object[STATIC] ¶
Outer product with other.
- prod((Vector3i)arg1) int[STATIC] ¶
Product of all elements.
- rows((Vector3i)arg1) int[STATIC] ¶
Number of rows.
- sum((Vector3i)arg1) int[STATIC] ¶
Sum of all elements.
- class minieigen.Vector4¶
4-dimensional float vector.
Supported operations (
f
if a float/int,v
is a Vector3):-v
,v+v
,v+=v
,v-v
,v-=v
,v*f
,f*v
,v*=f
,v/f
,v/=f
,v==v
,v!=v
.Implicit conversion from sequence (list, tuple, …) of 4 floats.
Static attributes:
Zero
,Ones
.- Identity = Vector4(1,0,0, 0)¶
- Ones = Vector4(1,1,1, 1)¶
- static Random() Vector4[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Vector4(0,0,0, 0)¶
- asDiagonal((Vector4)arg1) object[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector4)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector4)arg1, (Vector4)other) float[STATIC] ¶
Dot product with other.
- isApprox((Vector4)arg1, (Vector4)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector4)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Vector4)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((Vector4)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((Vector4)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((Vector4)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Vector4)arg1) None[STATIC] ¶
Normalize this object in-place.
- outer((Vector4)arg1, (Vector4)other) object[STATIC] ¶
Outer product with other.
- prod((Vector4)arg1) float[STATIC] ¶
Product of all elements.
- pruned((Vector4)arg1[, (float)absTol=1e-06]) Vector4[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Vector4)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Vector4)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Vector4)arg1) float[STATIC] ¶
Sum of all elements.
- class minieigen.Vector6¶
6-dimensional float vector.
Supported operations (
f
if a float/int,v
is a Vector6):-v
,v+v
,v+=v
,v-v
,v-=v
,v*f
,f*v
,v*=f
,v/f
,v/=f
,v==v
,v!=v
.Implicit conversion from sequence (list, tuple, …) of 6 floats.
Static attributes:
Zero
,Ones
.- Identity = Vector6(1,0,0, 0,0,0)¶
- Ones = Vector6(1,1,1, 1,1,1)¶
- static Random() Vector6[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Vector6(0,0,0, 0,0,0)¶
- asDiagonal((Vector6)arg1) Matrix6[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector6)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector6)arg1, (Vector6)other) float[STATIC] ¶
Dot product with other.
- isApprox((Vector6)arg1, (Vector6)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector6)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Vector6)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((Vector6)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((Vector6)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((Vector6)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Vector6)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((Vector6)arg1) float[STATIC] ¶
Product of all elements.
- pruned((Vector6)arg1[, (float)absTol=1e-06]) Vector6[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Vector6)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Vector6)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Vector6)arg1) float[STATIC] ¶
Sum of all elements.
- class minieigen.Vector6c¶
/TODO/
- Identity = Vector6c(1,0,0, 0,0,0)¶
- Ones = Vector6c(1,1,1, 1,1,1)¶
- static Random() Vector6c[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Vector6c(0,0,0, 0,0,0)¶
- asDiagonal((Vector6c)arg1) Matrix6c[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector6c)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector6c)arg1, (Vector6c)other) complex[STATIC] ¶
Dot product with other.
- isApprox((Vector6c)arg1, (Vector6c)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector6c)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- mean((Vector6c)arg1) complex[STATIC] ¶
Mean value over all elements.
- norm((Vector6c)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((Vector6c)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((Vector6c)arg1) complex[STATIC] ¶
Product of all elements.
- pruned((Vector6c)arg1[, (float)absTol=1e-06]) Vector6c[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- rows((Vector6c)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((Vector6c)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((Vector6c)arg1) complex[STATIC] ¶
Sum of all elements.
- class minieigen.Vector6i¶
6-dimensional float vector.
Supported operations (
f
if a float/int,v
is a Vector6):-v
,v+v
,v+=v
,v-v
,v-=v
,v*f
,f*v
,v*=f
,v/f
,v/=f
,v==v
,v!=v
.Implicit conversion from sequence (list, tuple, …) of 6 floats.
Static attributes:
Zero
,Ones
.- Identity = Vector6i(1,0,0, 0,0,0)¶
- Ones = Vector6i(1,1,1, 1,1,1)¶
- static Random() Vector6i[STATIC] ¶
Return an object where all elements are randomly set to values between 0 and 1.
- Zero = Vector6i(0,0,0, 0,0,0)¶
- asDiagonal((Vector6i)arg1) object[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((Vector6i)arg1) int[STATIC] ¶
Number of columns.
- dot((Vector6i)arg1, (Vector6i)other) int[STATIC] ¶
Dot product with other.
- isApprox((Vector6i)arg1, (Vector6i)other[, (int)prec=0]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((Vector6i)arg1) int[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((Vector6i)arg1) int[STATIC] ¶
Maximum value over all elements.
- mean((Vector6i)arg1) int[STATIC] ¶
Mean value over all elements.
- minCoeff((Vector6i)arg1) int[STATIC] ¶
Minimum value over all elements.
- outer((Vector6i)arg1, (Vector6i)other) object[STATIC] ¶
Outer product with other.
- prod((Vector6i)arg1) int[STATIC] ¶
Product of all elements.
- rows((Vector6i)arg1) int[STATIC] ¶
Number of rows.
- sum((Vector6i)arg1) int[STATIC] ¶
Sum of all elements.
- class minieigen.VectorX¶
Dynamic-sized float vector.
Supported operations (
f
if a float/int,v
is a VectorX):-v
,v+v
,v+=v
,v-v
,v-=v
,v*f
,f*v
,v*=f
,v/f
,v/=f
,v==v
,v!=v
.Implicit conversion from sequence (list, tuple, …) of X floats.
- static Random((int)len) VectorX[STATIC] ¶
Return vector of given length with all elements set to values between 0 and 1 randomly.
- asDiagonal((VectorX)arg1) MatrixX[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((VectorX)arg1) int[STATIC] ¶
Number of columns.
- dot((VectorX)arg1, (VectorX)other) float[STATIC] ¶
Dot product with other.
- isApprox((VectorX)arg1, (VectorX)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((VectorX)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- maxCoeff((VectorX)arg1) float[STATIC] ¶
Maximum value over all elements.
- mean((VectorX)arg1) float[STATIC] ¶
Mean value over all elements.
- minCoeff((VectorX)arg1) float[STATIC] ¶
Minimum value over all elements.
- norm((VectorX)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((VectorX)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((VectorX)arg1) float[STATIC] ¶
Product of all elements.
- pruned((VectorX)arg1[, (float)absTol=1e-06]) VectorX[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- resize((VectorX)arg1, (int)arg2) None[STATIC] ¶
- rows((VectorX)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((VectorX)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((VectorX)arg1) float[STATIC] ¶
Sum of all elements.
- class minieigen.VectorXc¶
/TODO/
- static Random((int)len) VectorXc[STATIC] ¶
Return vector of given length with all elements set to values between 0 and 1 randomly.
- asDiagonal((VectorXc)arg1) MatrixXc[STATIC] ¶
Return diagonal matrix with this vector on the diagonal.
- cols((VectorXc)arg1) int[STATIC] ¶
Number of columns.
- dot((VectorXc)arg1, (VectorXc)other) complex[STATIC] ¶
Dot product with other.
- isApprox((VectorXc)arg1, (VectorXc)other[, (float)prec=1e-12]) bool[STATIC] ¶
Approximate comparison with precision prec.
- maxAbsCoeff((VectorXc)arg1) float[STATIC] ¶
Maximum absolute value over all elements.
- mean((VectorXc)arg1) complex[STATIC] ¶
Mean value over all elements.
- norm((VectorXc)arg1) float[STATIC] ¶
Euclidean norm.
- normalize((VectorXc)arg1) None[STATIC] ¶
Normalize this object in-place.
- prod((VectorXc)arg1) complex[STATIC] ¶
Product of all elements.
- pruned((VectorXc)arg1[, (float)absTol=1e-06]) VectorXc[STATIC] ¶
Zero all elements which are greater than absTol. Negative zeros are not pruned.
- resize((VectorXc)arg1, (int)arg2) None[STATIC] ¶
- rows((VectorXc)arg1) int[STATIC] ¶
Number of rows.
- squaredNorm((VectorXc)arg1) float[STATIC] ¶
Square of the Euclidean norm.
- sum((VectorXc)arg1) complex[STATIC] ¶
Sum of all elements.
- minieigen.float2str((float)f[, (int)pad=0]) str ¶
Return the shortest string representation of f which will is equal to f when converted back to float. This function is only useful in Python prior to 3.0; starting from that version, standard string conversion does just that.