minieigen documentation¶
Overview¶
Todo
Something concise here.
Naming conventions¶
- Classes are suffixed with number indicating size where it makes sense (it does not make sense for
minieigen.Quaternion):minieigen.Vector3is a 3-vector (column vector);minieigen.Matrix3is a 3×3 matrix;minieigen.AlignedBox3is aligned box in 3d;Xindicates dynamic-sized types, such asminieigen.VectorXorminieigen.MatrixX.
- Scalar (element) type is suffixed at the end:
- nothing is suffixed for floats (
minieigen.Matrix3); iindicates integers (minieigen.Matrix3i);cindicates complex numbers (minieigen.Matrix3c).
- nothing is suffixed for floats (
- 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.
- nullary static methods are exposed as properties, if they return a constant (e.g.
- non-static methods are lower-case (as in c++), e.g.
minieigen.Matrix3.inverse.
- static methods are upper-case (as in c++), e.g.
- 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
- methods modifying the instance in-place return
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]=0would 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
MatrixXtoVectorXis 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:
- Debian
- 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
-
center() → Vector2¶
-
clamp((AlignedBox2)arg2) → None¶
-
contains((Vector2)arg2) → bool¶ contains( (AlignedBox2)arg1, (AlignedBox2)arg2) → bool
-
empty() → bool¶
-
extend((Vector2)arg2) → None¶ extend( (AlignedBox2)arg1, (AlignedBox2)arg2) → None
-
intersection((AlignedBox2)arg2) → AlignedBox2¶
-
max¶
-
merged((AlignedBox2)arg2) → AlignedBox2¶
-
min¶
-
sizes() → Vector2¶
-
volume() → float¶
-
-
class
minieigen.AlignedBox3¶ Axis-aligned box object, defined by its minimum and maximum corners
-
center() → Vector3¶
-
clamp((AlignedBox3)arg2) → None¶
-
contains((Vector3)arg2) → bool¶ contains( (AlignedBox3)arg1, (AlignedBox3)arg2) → bool
-
empty() → bool¶
-
extend((Vector3)arg2) → None¶ extend( (AlignedBox3)arg1, (AlignedBox3)arg2) → None
-
intersection((AlignedBox3)arg2) → AlignedBox3¶
-
max¶
-
merged((AlignedBox3)arg2) → AlignedBox3¶
-
min¶
-
sizes() → Vector3¶
-
volume() → float¶
-
-
class
minieigen.Matrix3¶ 3x3 float matrix.
Supported operations (
mis a Matrix3,fif a float/int,vis 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)¶
-
col((int)col) → Vector3¶ Return column as vector.
-
cols() → int¶ Number of columns.
-
computeUnitaryPositive() → tuple¶ Compute polar decomposition (unitary matrix U and positive semi-definite symmetric matrix P such that self=U*P).
-
determinant() → float¶ Return matrix determinant.
-
diagonal() → Vector3¶ Return diagonal as vector.
-
inverse() → Matrix3¶ Return inverted matrix.
-
isApprox((Matrix3)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
jacobiSVD() → tuple¶ Compute SVD decomposition of square matrix, retuns (U,S,V) such that self=U*S*V.transpose()
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
maxCoeff() → float¶ Maximum value over all elements.
-
mean() → float¶ Mean value over all elements.
-
minCoeff() → float¶ Minimum value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Matrix3¶ Return normalized copy of this object
-
polarDecomposition() → tuple¶ Alias for
computeUnitaryPositive.
-
prod() → float¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Matrix3¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
row((int)row) → Vector3¶ Return row as vector.
-
rows() → int¶ Number of rows.
-
selfAdjointEigenDecomposition() → tuple¶ 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() → tuple¶ Alias for
selfAdjointEigenDecomposition.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → float¶ Sum of all elements.
-
trace() → float¶ Return sum of diagonal elements.
-
transpose() → Matrix3¶ Return transposed matrix.
-
-
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)¶
-
col((int)col) → Vector3c¶ Return column as vector.
-
cols() → int¶ Number of columns.
-
determinant() → complex¶ Return matrix determinant.
-
diagonal() → Vector3c¶ Return diagonal as vector.
-
inverse() → Matrix3c¶ Return inverted matrix.
-
isApprox((Matrix3c)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
mean() → complex¶ Mean value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Matrix3c¶ Return normalized copy of this object
-
prod() → complex¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Matrix3c¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
row((int)row) → Vector3c¶ Return row as vector.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → complex¶ Sum of all elements.
-
trace() → complex¶ Return sum of diagonal elements.
-
transpose() → Matrix3c¶ Return transposed matrix.
-
-
class
minieigen.Matrix6¶ 6x6 float matrix. Constructed from 4 3x3 sub-matrices, from 6xVector6 (rows).
Supported operations (
mis a Matrix6,fif a float/int,vis 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) )¶
-
col((int)col) → Vector6¶ Return column as vector.
-
cols() → int¶ Number of columns.
-
computeUnitaryPositive() → tuple¶ Compute polar decomposition (unitary matrix U and positive semi-definite symmetric matrix P such that self=U*P).
-
determinant() → float¶ Return matrix determinant.
-
diagonal() → Vector6¶ Return diagonal as vector.
-
inverse() → Matrix6¶ Return inverted matrix.
-
isApprox((Matrix6)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
jacobiSVD() → tuple¶ Compute SVD decomposition of square matrix, retuns (U,S,V) such that self=U*S*V.transpose()
-
ll() → Matrix3¶ Return lower-left 3x3 block
-
lr() → Matrix3¶ Return lower-right 3x3 block
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
maxCoeff() → float¶ Maximum value over all elements.
-
mean() → float¶ Mean value over all elements.
-
minCoeff() → float¶ Minimum value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Matrix6¶ Return normalized copy of this object
-
polarDecomposition() → tuple¶ Alias for
computeUnitaryPositive.
-
prod() → float¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Matrix6¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
row((int)row) → Vector6¶ Return row as vector.
-
rows() → int¶ Number of rows.
-
selfAdjointEigenDecomposition() → tuple¶ 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() → tuple¶ Alias for
selfAdjointEigenDecomposition.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → float¶ Sum of all elements.
-
trace() → float¶ Return sum of diagonal elements.
-
transpose() → Matrix6¶ Return transposed matrix.
-
ul() → Matrix3¶ Return upper-left 3x3 block
-
ur() → Matrix3¶ Return upper-right 3x3 block
-
-
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) )¶
-
col((int)col) → Vector6c¶ Return column as vector.
-
cols() → int¶ Number of columns.
-
determinant() → complex¶ Return matrix determinant.
-
diagonal() → Vector6c¶ Return diagonal as vector.
-
inverse() → Matrix6c¶ Return inverted matrix.
-
isApprox((Matrix6c)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
ll() → Matrix3c¶ Return lower-left 3x3 block
-
lr() → Matrix3c¶ Return lower-right 3x3 block
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
mean() → complex¶ Mean value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Matrix6c¶ Return normalized copy of this object
-
prod() → complex¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Matrix6c¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
row((int)row) → Vector6c¶ Return row as vector.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → complex¶ Sum of all elements.
-
trace() → complex¶ Return sum of diagonal elements.
-
transpose() → Matrix6c¶ Return transposed matrix.
-
ul() → Matrix3c¶ Return upper-left 3x3 block
-
ur() → Matrix3c¶ Return upper-right 3x3 block
-
-
class
minieigen.MatrixX¶ XxX (dynamic-sized) float matrix. Constructed from list of rows (as VectorX).
Supported operations (
mis a MatrixX,fif a float/int,vis 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).
-
static
Zero((int)rows, (int)cols) → MatrixX [STATIC]¶ Create zero matrix of given dimensions
-
col((int)col) → VectorX¶ Return column as vector.
-
cols() → int¶ Number of columns.
-
computeUnitaryPositive() → tuple¶ Compute polar decomposition (unitary matrix U and positive semi-definite symmetric matrix P such that self=U*P).
-
determinant() → float¶ Return matrix determinant.
-
diagonal() → VectorX¶ Return diagonal as vector.
-
inverse() → MatrixX¶ Return inverted matrix.
-
isApprox((MatrixX)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
jacobiSVD() → tuple¶ Compute SVD decomposition of square matrix, retuns (U,S,V) such that self=U*S*V.transpose()
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
maxCoeff() → float¶ Maximum value over all elements.
-
mean() → float¶ Mean value over all elements.
-
minCoeff() → float¶ Minimum value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → MatrixX¶ Return normalized copy of this object
-
polarDecomposition() → tuple¶ Alias for
computeUnitaryPositive.
-
prod() → float¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → MatrixX¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
resize((int)rows, (int)cols) → None¶ Change size of the matrix, keep values of elements which exist in the new matrix
-
row((int)row) → VectorX¶ Return row as vector.
-
rows() → int¶ Number of rows.
-
selfAdjointEigenDecomposition() → tuple¶ 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() → tuple¶ Alias for
selfAdjointEigenDecomposition.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → float¶ Sum of all elements.
-
trace() → float¶ Return sum of diagonal elements.
-
transpose() → MatrixX¶ Return transposed matrix.
-
static
-
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).
-
static
Zero((int)rows, (int)cols) → MatrixXc [STATIC]¶ Create zero matrix of given dimensions
-
col((int)col) → VectorXc¶ Return column as vector.
-
cols() → int¶ Number of columns.
-
determinant() → complex¶ Return matrix determinant.
-
diagonal() → VectorXc¶ Return diagonal as vector.
-
inverse() → MatrixXc¶ Return inverted matrix.
-
isApprox((MatrixXc)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
mean() → complex¶ Mean value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → MatrixXc¶ Return normalized copy of this object
-
prod() → complex¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → MatrixXc¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
resize((int)rows, (int)cols) → None¶ Change size of the matrix, keep values of elements which exist in the new matrix
-
row((int)row) → VectorXc¶ Return row as vector.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → complex¶ Sum of all elements.
-
trace() → complex¶ Return sum of diagonal elements.
-
transpose() → MatrixXc¶ Return transposed matrix.
-
static
-
class
minieigen.Quaternion¶ Quaternion representing rotation.
Supported operations (
qis a Quaternion,vis a Vector3):q*q(rotation composition),q*=q,q*v(rotatingvbyq),q==q,q!=q.Static attributes:
Identity.-
Identity= Quaternion((1,0,0),0)¶
-
Rotate((Vector3)v) → Vector3¶
-
angularDistance((Quaternion)arg2) → float¶
-
conjugate() → Quaternion¶
-
inverse() → Quaternion¶
-
norm() → float¶
-
normalize() → None¶
-
normalized() → Quaternion¶
-
setFromTwoVectors((Vector3)u, (Vector3)v) → None¶
-
slerp((float)t, (Quaternion)other) → Quaternion¶
-
toAngleAxis() → tuple¶
-
toAxisAngle() → tuple¶
-
toRotationMatrix() → Matrix3¶
-
toRotationVector() → Vector3¶
-
-
class
minieigen.Vector2¶ 3-dimensional float vector.
Supported operations (
fif a float/int,vis 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.
-
static
Unit((int)arg1) → Vector2 [STATIC]¶
-
UnitX= Vector2(1,0)¶
-
UnitY= Vector2(0,1)¶
-
Zero= Vector2(0,0)¶
-
asDiagonal() → object¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((Vector2)other) → float¶ Dot product with other.
-
isApprox((Vector2)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
maxCoeff() → float¶ Maximum value over all elements.
-
mean() → float¶ Mean value over all elements.
-
minCoeff() → float¶ Minimum value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Vector2¶ Return normalized copy of this object
-
outer((Vector2)other) → object¶ Outer product with other.
-
prod() → float¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Vector2¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → float¶ 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.
-
static
Unit((int)arg1) → Vector2c [STATIC]¶
-
UnitX= Vector2c(1,0)¶
-
UnitY= Vector2c(0,1)¶
-
Zero= Vector2c(0,0)¶
-
asDiagonal() → object¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((Vector2c)other) → complex¶ Dot product with other.
-
isApprox((Vector2c)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
mean() → complex¶ Mean value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Vector2c¶ Return normalized copy of this object
-
outer((Vector2c)other) → object¶ Outer product with other.
-
prod() → complex¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Vector2c¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → complex¶ Sum of all elements.
-
-
class
minieigen.Vector2i¶ 2-dimensional integer vector.
Supported operations (
iif an int,vis 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.
-
static
Unit((int)arg1) → Vector2i [STATIC]¶
-
UnitX= Vector2i(1,0)¶
-
UnitY= Vector2i(0,1)¶
-
Zero= Vector2i(0,0)¶
-
asDiagonal() → object¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((Vector2i)other) → int¶ Dot product with other.
-
isApprox((Vector2i)other[, (int)prec=0]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → int¶ Maximum absolute value over all elements.
-
maxCoeff() → int¶ Maximum value over all elements.
-
mean() → int¶ Mean value over all elements.
-
minCoeff() → int¶ Minimum value over all elements.
-
outer((Vector2i)other) → object¶ Outer product with other.
-
prod() → int¶ Product of all elements.
-
rows() → int¶ Number of rows.
-
sum() → int¶ Sum of all elements.
-
-
class
minieigen.Vector3¶ 3-dimensional float vector.
Supported operations (
fif a float/int,vis 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 withMatrix3andQuaternion.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.
-
static
Unit((int)arg1) → Vector3 [STATIC]¶
-
UnitX= Vector3(1,0,0)¶
-
UnitY= Vector3(0,1,0)¶
-
UnitZ= Vector3(0,0,1)¶
-
Zero= Vector3(0,0,0)¶
-
asDiagonal() → Matrix3¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
cross((Vector3)arg2) → Vector3¶
-
dot((Vector3)other) → float¶ Dot product with other.
-
isApprox((Vector3)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
maxCoeff() → float¶ Maximum value over all elements.
-
mean() → float¶ Mean value over all elements.
-
minCoeff() → float¶ Minimum value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Vector3¶ Return normalized copy of this object
-
outer((Vector3)other) → Matrix3¶ Outer product with other.
-
prod() → float¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Vector3¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → float¶ Sum of all elements.
-
xy() → Vector2¶
-
xz() → Vector2¶
-
yx() → Vector2¶
-
yz() → Vector2¶
-
zx() → Vector2¶
-
zy() → Vector2¶
-
-
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.
-
static
Unit((int)arg1) → Vector3c [STATIC]¶
-
UnitX= Vector3c(1,0,0)¶
-
UnitY= Vector3c(0,1,0)¶
-
UnitZ= Vector3c(0,0,1)¶
-
Zero= Vector3c(0,0,0)¶
-
asDiagonal() → Matrix3c¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
cross((Vector3c)arg2) → Vector3c¶
-
dot((Vector3c)other) → complex¶ Dot product with other.
-
isApprox((Vector3c)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
mean() → complex¶ Mean value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Vector3c¶ Return normalized copy of this object
-
outer((Vector3c)other) → Matrix3c¶ Outer product with other.
-
prod() → complex¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Vector3c¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → complex¶ Sum of all elements.
-
xy() → Vector2c¶
-
xz() → Vector2c¶
-
yx() → Vector2c¶
-
yz() → Vector2c¶
-
zx() → Vector2c¶
-
zy() → Vector2c¶
-
-
class
minieigen.Vector3i¶ 3-dimensional integer vector.
Supported operations (
iif an int,vis 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.
-
static
Unit((int)arg1) → Vector3i [STATIC]¶
-
UnitX= Vector3i(1,0,0)¶
-
UnitY= Vector3i(0,1,0)¶
-
UnitZ= Vector3i(0,0,1)¶
-
Zero= Vector3i(0,0,0)¶
-
asDiagonal() → object¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
cross((Vector3i)arg2) → Vector3i¶
-
dot((Vector3i)other) → int¶ Dot product with other.
-
isApprox((Vector3i)other[, (int)prec=0]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → int¶ Maximum absolute value over all elements.
-
maxCoeff() → int¶ Maximum value over all elements.
-
mean() → int¶ Mean value over all elements.
-
minCoeff() → int¶ Minimum value over all elements.
-
outer((Vector3i)other) → object¶ Outer product with other.
-
prod() → int¶ Product of all elements.
-
rows() → int¶ Number of rows.
-
sum() → int¶ Sum of all elements.
-
xy() → Vector2i¶
-
xz() → Vector2i¶
-
yx() → Vector2i¶
-
yz() → Vector2i¶
-
zx() → Vector2i¶
-
zy() → Vector2i¶
-
-
class
minieigen.Vector6¶ 6-dimensional float vector.
Supported operations (
fif a float/int,vis 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.
-
static
Unit((int)arg1) → Vector6 [STATIC]¶
-
Zero= Vector6(0,0,0, 0,0,0)¶
-
asDiagonal() → Matrix6¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((Vector6)other) → float¶ Dot product with other.
-
head() → Vector3¶
-
isApprox((Vector6)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
maxCoeff() → float¶ Maximum value over all elements.
-
mean() → float¶ Mean value over all elements.
-
minCoeff() → float¶ Minimum value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Vector6¶ Return normalized copy of this object
-
outer((Vector6)other) → Matrix6¶ Outer product with other.
-
prod() → float¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Vector6¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → float¶ Sum of all elements.
-
tail() → Vector3¶
-
-
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.
-
static
Unit((int)arg1) → Vector6c [STATIC]¶
-
Zero= Vector6c(0,0,0, 0,0,0)¶
-
asDiagonal() → Matrix6c¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((Vector6c)other) → complex¶ Dot product with other.
-
head() → Vector3c¶
-
isApprox((Vector6c)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
mean() → complex¶ Mean value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → Vector6c¶ Return normalized copy of this object
-
outer((Vector6c)other) → Matrix6c¶ Outer product with other.
-
prod() → complex¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → Vector6c¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → complex¶ Sum of all elements.
-
tail() → Vector3c¶
-
-
class
minieigen.Vector6i¶ 6-dimensional float vector.
Supported operations (
fif a float/int,vis 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.
-
static
Unit((int)arg1) → Vector6i [STATIC]¶
-
Zero= Vector6i(0,0,0, 0,0,0)¶
-
asDiagonal() → object¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((Vector6i)other) → int¶ Dot product with other.
-
head() → Vector3i¶
-
isApprox((Vector6i)other[, (int)prec=0]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → int¶ Maximum absolute value over all elements.
-
maxCoeff() → int¶ Maximum value over all elements.
-
mean() → int¶ Mean value over all elements.
-
minCoeff() → int¶ Minimum value over all elements.
-
outer((Vector6i)other) → object¶ Outer product with other.
-
prod() → int¶ Product of all elements.
-
rows() → int¶ Number of rows.
-
sum() → int¶ Sum of all elements.
-
tail() → Vector3i¶
-
-
class
minieigen.VectorX¶ Dynamic-sized float vector.
Supported operations (
fif a float/int,vis 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
Ones((int)arg1) → VectorX [STATIC]¶
-
static
Random((int)len) → VectorX [STATIC]¶ Return vector of given length with all elements set to values between 0 and 1 randomly.
-
static
Unit((int)arg1, (int)arg2) → VectorX [STATIC]¶
-
static
Zero((int)arg1) → VectorX [STATIC]¶
-
asDiagonal() → MatrixX¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((VectorX)other) → float¶ Dot product with other.
-
isApprox((VectorX)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
maxCoeff() → float¶ Maximum value over all elements.
-
mean() → float¶ Mean value over all elements.
-
minCoeff() → float¶ Minimum value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → VectorX¶ Return normalized copy of this object
-
outer((VectorX)other) → MatrixX¶ Outer product with other.
-
prod() → float¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → VectorX¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
resize((int)arg2) → None¶
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → float¶ Sum of all elements.
-
static
-
class
minieigen.VectorXc¶ /TODO/
-
static
Ones((int)arg1) → VectorXc [STATIC]¶
-
static
Random((int)len) → VectorXc [STATIC]¶ Return vector of given length with all elements set to values between 0 and 1 randomly.
-
static
Unit((int)arg1, (int)arg2) → VectorXc [STATIC]¶
-
static
Zero((int)arg1) → VectorXc [STATIC]¶
-
asDiagonal() → MatrixXc¶ Return diagonal matrix with this vector on the diagonal.
-
cols() → int¶ Number of columns.
-
dot((VectorXc)other) → complex¶ Dot product with other.
-
isApprox((VectorXc)other[, (float)prec=1e-12]) → bool¶ Approximate comparison with precision prec.
-
maxAbsCoeff() → float¶ Maximum absolute value over all elements.
-
mean() → complex¶ Mean value over all elements.
-
norm() → float¶ Euclidean norm.
-
normalize() → None¶ Normalize this object in-place.
-
normalized() → VectorXc¶ Return normalized copy of this object
-
outer((VectorXc)other) → MatrixXc¶ Outer product with other.
-
prod() → complex¶ Product of all elements.
-
pruned([(float)absTol=1e-06]) → VectorXc¶ Zero all elements which are greater than absTol. Negative zeros are not pruned.
-
resize((int)arg2) → None¶
-
rows() → int¶ Number of rows.
-
squaredNorm() → float¶ Square of the Euclidean norm.
-
sum() → complex¶ Sum of all elements.
-
static
-
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.