pybertini.minieigen

quick nav links:

Notes

Auto-generated docs

The MiniEigen submodule, for PyBertini

Bertini2 uses Eigen for linear algebra, enabling expression templates on linear algebraic objects and operations for arbitrary types – most importantly the multiprecision complex numbers needed for working near singularities in algebraic geometry.

This module exposes some functionality. Not near all of Eigen is exposed. We could use help on this. If you know some Boost.Python and some Eigen, please consider helping expose more of Eigen through MiniEigen. Bertini2 is not the host of MiniEigen – user Eudoxus on GitHub provided MiniEigen.

If you encounter any problems with this functionality, please ask for help via a GitHub issue.

class pybertini.minieigen.MatrixXd((object)arg1) → None

Bases: Boost.Python.instance

Double precision complex matrix type, runtime-adjustable size

__init__( (object)arg1, (int)arg2, (int)arg3) -> None

__init__( (object)arg1, (MatrixXd)other) -> None

__init__( (object)arg1, (VectorXd)diag) -> object

__init__( (object)arg1 [, (VectorXd)r0=VectorXd() [, (VectorXd)r1=VectorXd() [, (VectorXd)r2=VectorXd() [, (VectorXd)r3=VectorXd() [, (VectorXd)r4=VectorXd() [, (VectorXd)r5=VectorXd() [, (VectorXd)r6=VectorXd() [, (VectorXd)r7=VectorXd() [, (VectorXd)r8=VectorXd() [, (VectorXd)r9=VectorXd() [, (bool)cols=False]]]]]]]]]]]) -> object

__init__( (object)arg1, (object)rows [, (bool)cols=False]) -> object

static Identity((int)arg1, (int)rank) → MatrixXd :

Create identity matrix with given rank (square).

static Ones((int)rows, (int)cols) → MatrixXd :

Create matrix of given dimensions where all elements are set to 1.

static Random((int)rows, (int)cols) → MatrixXd :

Create matrix with given dimensions where all elements are set to number between 0 and 1 (uniformly-distributed).

static Zero((int)rows, (int)cols) → MatrixXd :

Create zero matrix of given dimensions

col((MatrixXd)arg1, (int)col) → VectorXd :

Return column as vector.

cols((MatrixXd)arg1) → int :

Number of columns.

determinant((MatrixXd)arg1) → complex :

Return matrix determinant.

diagonal((MatrixXd)arg1) → VectorXd :

Return diagonal as vector.

inverse((MatrixXd)arg1) → MatrixXd :

Return inverted matrix.

isApprox((MatrixXd)arg1, (MatrixXd)other[, (float)prec=1e-12]) → bool :

Approximate comparison with precision prec.

maxAbsCoeff((MatrixXd)arg1) → float :

Maximum absolute value over all elements.

mean((MatrixXd)arg1) → complex :

Mean value over all elements.

norm((MatrixXd)arg1) → float :

Euclidean norm.

normalize((MatrixXd)arg1) → None :

Normalize this object in-place.

normalized((MatrixXd)arg1) → MatrixXd :

Return normalized copy of this object

prod((MatrixXd)arg1) → complex :

Product of all elements.

pruned((MatrixXd)arg1[, (float)absTol=1e-06]) → MatrixXd :

Zero all elements which are greater than absTol. Negative zeros are not pruned.

resize((MatrixXd)arg1, (int)rows, (int)cols) → None :

Change size of the matrix, keep values of elements which exist in the new matrix

row((MatrixXd)arg1, (int)row) → VectorXd :

Return row as vector.

rows((MatrixXd)arg1) → int :

Number of rows.

squaredNorm((MatrixXd)arg1) → float :

Square of the Euclidean norm.

sum((MatrixXd)arg1) → complex :

Sum of all elements.

trace((MatrixXd)arg1) → complex :

Return sum of diagonal elements.

transpose((MatrixXd)arg1) → MatrixXd :

Return transposed matrix.

class pybertini.minieigen.MatrixXmp((object)arg1) → None

Bases: Boost.Python.instance

Variable precision complex matrix of runtime-adjustable size

__init__( (object)arg1, (int)arg2, (int)arg3) -> None

__init__( (object)arg1, (MatrixXmp)other) -> None

__init__( (object)arg1, (VectorXmp)diag) -> object

__init__( (object)arg1 [, (VectorXmp)r0=VectorXmp() [, (VectorXmp)r1=VectorXmp() [, (VectorXmp)r2=VectorXmp() [, (VectorXmp)r3=VectorXmp() [, (VectorXmp)r4=VectorXmp() [, (VectorXmp)r5=VectorXmp() [, (VectorXmp)r6=VectorXmp() [, (VectorXmp)r7=VectorXmp() [, (VectorXmp)r8=VectorXmp() [, (VectorXmp)r9=VectorXmp() [, (bool)cols=False]]]]]]]]]]]) -> object

__init__( (object)arg1, (object)rows [, (bool)cols=False]) -> object

static Identity((int)arg1, (int)rank) → MatrixXmp :

Create identity matrix with given rank (square).

static Ones((int)rows, (int)cols) → MatrixXmp :

Create matrix of given dimensions where all elements are set to 1.

static Random((int)rows, (int)cols) → MatrixXmp :

Create matrix with given dimensions where all elements are set to number between 0 and 1 (uniformly-distributed).

static Zero((int)rows, (int)cols) → MatrixXmp :

Create zero matrix of given dimensions

col((MatrixXmp)arg1, (int)col) → VectorXmp :

Return column as vector.

cols((MatrixXmp)arg1) → int :

Number of columns.

determinant((MatrixXmp)arg1) → Complex :

Return matrix determinant.

diagonal((MatrixXmp)arg1) → VectorXmp :

Return diagonal as vector.

inverse((MatrixXmp)arg1) → MatrixXmp :

Return inverted matrix.

isApprox((MatrixXmp)arg1, (MatrixXmp)other[, (Float)prec=1.0000000000000000000020e-17]) → bool :

Approximate comparison with precision prec.

maxAbsCoeff((MatrixXmp)arg1) → Float :

Maximum absolute value over all elements.

mean((MatrixXmp)arg1) → Complex :

Mean value over all elements.

norm((MatrixXmp)arg1) → Float :

Euclidean norm.

normalize((MatrixXmp)arg1) → None :

Normalize this object in-place.

normalized((MatrixXmp)arg1) → MatrixXmp :

Return normalized copy of this object

prod((MatrixXmp)arg1) → Complex :

Product of all elements.

pruned((MatrixXmp)arg1[, (float)absTol=1e-06]) → MatrixXmp :

Zero all elements which are greater than absTol. Negative zeros are not pruned.

resize((MatrixXmp)arg1, (int)rows, (int)cols) → None :

Change size of the matrix, keep values of elements which exist in the new matrix

row((MatrixXmp)arg1, (int)row) → VectorXmp :

Return row as vector.

rows((MatrixXmp)arg1) → int :

Number of rows.

squaredNorm((MatrixXmp)arg1) → Float :

Square of the Euclidean norm.

sum((MatrixXmp)arg1) → Complex :

Sum of all elements.

trace((MatrixXmp)arg1) → Complex :

Return sum of diagonal elements.

transpose((MatrixXmp)arg1) → MatrixXmp :

Return transposed matrix.

class pybertini.minieigen.VectorXd((object)arg1) → None

Bases: Boost.Python.instance

Double precision complex vector of arbitrary runtime size, built on MiniEigen, on top of Eigen

__init__( (object)arg1, (int)arg2) -> None

__init__( (object)arg1, (VectorXd)other) -> None

__init__( (object)arg1, (object)vv) -> object

static Ones((int)arg1) → VectorXd
static Random((int)len) → VectorXd :

Return vector of given length with all elements set to values between 0 and 1 randomly.

static Unit((int)arg1, (int)arg2) → VectorXd
static Zero((int)arg1) → VectorXd
asDiagonal((VectorXd)arg1) → MatrixXd :

Return diagonal matrix with this vector on the diagonal.

cols((VectorXd)arg1) → int :

Number of columns.

dot((VectorXd)arg1, (VectorXd)other) → complex :

Dot product with other.

isApprox((VectorXd)arg1, (VectorXd)other[, (float)prec=1e-12]) → bool :

Approximate comparison with precision prec.

maxAbsCoeff((VectorXd)arg1) → float :

Maximum absolute value over all elements.

mean((VectorXd)arg1) → complex :

Mean value over all elements.

norm((VectorXd)arg1) → float :

Euclidean norm.

normalize((VectorXd)arg1) → None :

Normalize this object in-place.

normalized((VectorXd)arg1) → VectorXd :

Return normalized copy of this object

outer((VectorXd)arg1, (VectorXd)other) → MatrixXd :

Outer product with other.

prod((VectorXd)arg1) → complex :

Product of all elements.

pruned((VectorXd)arg1[, (float)absTol=1e-06]) → VectorXd :

Zero all elements which are greater than absTol. Negative zeros are not pruned.

resize((VectorXd)arg1, (int)arg2) → None
rows((VectorXd)arg1) → int :

Number of rows.

squaredNorm((VectorXd)arg1) → float :

Square of the Euclidean norm.

sum((VectorXd)arg1) → complex :

Sum of all elements.

class pybertini.minieigen.VectorXmp((object)arg1) → None

Bases: Boost.Python.instance

Runtime-adjustable multiple precision complex vector of arbitrary runtime size, built on MiniEigen, on top of Eigen

__init__( (object)arg1, (int)arg2) -> None

__init__( (object)arg1, (VectorXmp)other) -> None

__init__( (object)arg1, (object)vv) -> object

static Ones((int)arg1) → VectorXmp
static Random((int)len) → VectorXmp :

Return vector of given length with all elements set to values between 0 and 1 randomly.

static Unit((int)arg1, (int)arg2) → VectorXmp
static Zero((int)arg1) → VectorXmp
asDiagonal((VectorXmp)arg1) → MatrixXmp :

Return diagonal matrix with this vector on the diagonal.

cols((VectorXmp)arg1) → int :

Number of columns.

dot((VectorXmp)arg1, (VectorXmp)other) → Complex :

Dot product with other.

isApprox((VectorXmp)arg1, (VectorXmp)other[, (Float)prec=1.0000000000000000000020e-17]) → bool :

Approximate comparison with precision prec.

maxAbsCoeff((VectorXmp)arg1) → Float :

Maximum absolute value over all elements.

mean((VectorXmp)arg1) → Complex :

Mean value over all elements.

norm((VectorXmp)arg1) → Float :

Euclidean norm.

normalize((VectorXmp)arg1) → None :

Normalize this object in-place.

normalized((VectorXmp)arg1) → VectorXmp :

Return normalized copy of this object

outer((VectorXmp)arg1, (VectorXmp)other) → MatrixXmp :

Outer product with other.

prod((VectorXmp)arg1) → Complex :

Product of all elements.

pruned((VectorXmp)arg1[, (float)absTol=1e-06]) → VectorXmp :

Zero all elements which are greater than absTol. Negative zeros are not pruned.

resize((VectorXmp)arg1, (int)arg2) → None
rows((VectorXmp)arg1) → int :

Number of rows.

squaredNorm((VectorXmp)arg1) → Float :

Square of the Euclidean norm.

sum((VectorXmp)arg1) → Complex :

Sum of all elements.