pygimli.matrix

Some special and usefull matrices.

Overview

Functions

createCm05(*args, **kwargs)

dstack(mats)

Syntactic sugar function to diagonally stacked matrix.

hstack(mats)

Syntactic sugar function to horizontally stacked matrix.

vstack(mats)

Syntactic sugar function to vertically stacked matrix.

Classes

Add2Matrix(A, B)

Matrix by addition of two matrices implicitly.

BlockMatrix

alias of RBlockMatrix

CMatrix

CSparseMapMatrix

CSparseMatrix

Cm05Matrix(A[, verbose])

Matrix implicitly representing the inverse square-root.

DiagonalMatrix(d)

Square matrix with a vector on the main diagonal.

ElementMatrix

FrameConstraintMatrix(A, num[, scale])

Matrix constraining meshes inside and between frames of same mesh.

GeostatisticConstraintsMatrix([CM, mesh])

Geostatistic constraints matrix

IdentityMatrix

Identity matrix: derived from matrixBase

LMultRMatrix

alias of MultLeftMatrix

LRMultRMatrix

alias of MultLeftRightMatrix

Matrix

alias of RMatrix

MatrixBase

Interface class for matrices.

Mult2Matrix(A, B)

Matrix by multipication of two matrices implicitly.

MultLeftMatrix(A, left[, verbose])

Matrix consisting of actual RMatrix and lef-side vector.

MultLeftRightMatrix(A, left, right[, verbose])

Matrix consisting of actual RMatrix and left-hand-side vector.

MultMatrix(A[, verbose])

Base Matrix class for all matrix types holding a matrix.

MultRightMatrix(A[, r, verbose])

Some Matrix, multiplied with a right hand side vector r.

NDMatrix(num, nrows, ncols)

Diagonal block (block-Jacobi) matrix .

RMultRMatrix

alias of MultRightMatrix

RSparseMapMatrix

RSparseMatrix

RepeatDMatrix(A, num)

Matrix repeating a base matrix N times diagonally.

RepeatHMatrix(A, num)

Matrix repeating a base matrix N times horizontally.

RepeatVMatrix(A, num)

Matrix repeating a base matrix N times vertically.

SparseMapMatrix

alias of RSparseMapMatrix

SparseMatrix

alias of RSparseMatrix

SquaredMatrix(A[, verbose])

Wrapper for squared (least-squares) matrix A^T*A (of any kind).

SquaredTransposeMatrix(A[, verbose])

Wrapper for squared (least-squares) matrix A*A^T (of any kind).

TransposedMatrix(A[, verbose])

Wrapper for transposed matrix (of any kind).

Functions

createCm05

pygimli.matrix.createCm05(*args, **kwargs)

dstack

pygimli.matrix.dstack(mats)

Syntactic sugar function to diagonally stacked matrix.

Parameters

mats (iterable) – list of matrices (any pyGIMLi matrix)

Returns

mat – pyGIMLi block matrix

Return type

GIMLI::Blockmatrix

>>> import pygimli as pg
>>> A = pg.Matrix(2, 3)
>>> B = pg.Matrix(4, 5)
>>> D = pg.matrix.dstack([A, B])
>>> ax, _ = pg.show(D)
>>> print(D)
pg.matrix.BlockMatrix of size 6 x 8 consisting of 2 submatrices.

(png, pdf)

../../_images/pygimli-matrix-1.png

hstack

pygimli.matrix.hstack(mats)

Syntactic sugar function to horizontally stacked matrix.

Parameters

mats (iterable) – list of matrices (any pyGIMLi matrix)

Returns

mat – pyGIMLi block matrix

Return type

GIMLI::Blockmatrix

>>> import pygimli as pg
>>> A = pg.Matrix(4, 3)
>>> B = pg.Matrix(4, 2)
>>> H = pg.matrix.hstack([A, B])
>>> ax, _ = pg.show(H)
>>> print(H)
pg.matrix.BlockMatrix of size 4 x 5 consisting of 2 submatrices.

(png, pdf)

../../_images/pygimli-matrix-2.png

vstack

pygimli.matrix.vstack(mats)

Syntactic sugar function to vertically stacked matrix.

Parameters

mats (iterable) – list of matrices (any pyGIMLi matrix)

Returns

mat – pyGIMLi block matrix

Return type

GIMLI::Blockmatrix

>>> import pygimli as pg
>>> A = pg.Matrix(3, 4)
>>> B = pg.Matrix(2, 4)
>>> V = pg.matrix.vstack([A, B])
>>> ax, _ = pg.show(V)
>>> print(V)
pg.matrix.BlockMatrix of size 5 x 4 consisting of 2 submatrices.

(png, pdf)

../../_images/pygimli-matrix-3.png

Classes

Add2Matrix

class pygimli.matrix.Add2Matrix(A, B)

Bases: MatrixBase

Matrix by addition of two matrices implicitly.

The matrix holds two matrices and distributes multiplication in 2 parts

M = A + B M * x = A * x + B * x M.T * y = B^T * y + A.T^*y

__init__(A, B)

Initialize matrix.

Parameters
  • A (any Matrix derived from pg.core.MatrixBase) – submatrices to be multiplied (A/B.cols() and rows() need to match)

  • B (any Matrix derived from pg.core.MatrixBase) – submatrices to be multiplied (A/B.cols() and rows() need to match)

cols()

Number of columns.

mult(x)

Return M*x = A*(r*x)

rows()

Number of rows.

transMult(x)

Return M.T*x=(A.T*x)*r

BlockMatrix

pygimli.matrix.BlockMatrix

alias of RBlockMatrix

CMatrix

class pygimli.matrix.CMatrix

Bases: MatrixBase

__init__((object)arg1) object :

Constructs an empty matrix with the dimension rows x cols. Content of the matrix is zero.

C++ signature :

void* __init__(_object*)

__init__( (object)arg1, (object)rows) -> object :

C++ signature :

void* __init__(_object*,unsigned long)

__init__( (object)arg1, (object)rows, (object)cols) -> object :

no default arg here .. pygimli@win64 linker bug

C++ signature :

void* __init__(_object*,unsigned long,unsigned long)

__init__( (object)arg1, (object)rows, (object)cols, (object)src) -> object :

C++ signature :

void* __init__(_object*,unsigned long,unsigned long,std::complex<double>*)

__init__( (object)arg1, (object)mat) -> object :

C++ signature :

void* __init__(_object*,std::vector<GIMLI::Vector<std::complex<double> >, std::allocator<GIMLI::Vector<std::complex<double> > > >)

__init__( (object)arg1, (object)filename) -> object :

Constructor, read matrix from file see load(Matrix < ValueType > & A, const std::string & filename).

C++ signature :

void* __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

__init__( (object)arg1, (object)mat) -> object :

Copyconstructor

C++ signature :

void* __init__(_object*,GIMLI::Matrix<std::complex<double> >)

add((object)arg1, (object)a) object :

A += a

C++ signature :

GIMLI::Matrix<std::complex<double> > {lvalue} add(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Matrix<std::complex<double> >)

addCol((object)arg1, (object)col, (object)v) object :

Add one specific column

C++ signature :

void* addCol(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long,GIMLI::Vector<std::complex<double> >)

addVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* addVal(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long,unsigned long,std::complex<double>)

assign((object)arg1, (object)mat) object :

Assignment operator

C++ signature :

GIMLI::Matrix<std::complex<double> > {lvalue} assign(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Matrix<std::complex<double> >)

back((object)arg1) object :

Return last row vector.

C++ signature :

GIMLI::Vector<std::complex<double> > {lvalue} back(GIMLI::Matrix<std::complex<double> > {lvalue})

clean((object)arg1) object :
C++ signature :

void* clean(GIMLI::Matrix<std::complex<double> > {lvalue})

clean( (object)arg1) -> object :

C++ signature :

void* clean(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::Matrix<std::complex<double> > {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

col((object)arg1, (object)i) object :
C++ signature :

GIMLI::Vector<std::complex<double> > col(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long)

col( (object)arg1, (object)i) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > col(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},unsigned long)

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::Matrix<std::complex<double> > {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

copy((object)arg1, (object)mat) object :

Force the copy of the matrix entries.

C++ signature :

void* copy(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Matrix<std::complex<double> >)

dot((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> dot(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<double>)

dot( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> dot(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>)

dtype

alias of complex

dumpData((object)arg1, (object)target) object :
C++ signature :

void* dumpData(GIMLI::Matrix<std::complex<double> > {lvalue},std::complex<double>*)

fromData((object)arg1, (object)src, (object)m, (object)n) object :
C++ signature :

void* fromData(GIMLI::Matrix<std::complex<double> > {lvalue},std::complex<double>*,unsigned long,unsigned long)

property mat_
mult((object)arg1, (object)b) object :
C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)b) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

push_back((object)arg1, (object)vec) object :

Add another row vector add the end.

C++ signature :

void* push_back(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<std::complex<double> >)

resize((object)arg1, (object)rows, (object)cols) object :
C++ signature :

void* resize(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long,unsigned long)

resize( (object)arg1, (object)rows, (object)cols) -> object :

C++ signature :

void* resize(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},unsigned long,unsigned long)

round((object)arg1, (object)tolerance) object :

Round each matrix element to a given tolerance.

C++ signature :

void* round(GIMLI::Matrix<std::complex<double> > {lvalue},std::complex<double>)

row((object)arg1, (object)i) object :

Readonly getter.

C++ signature :

GIMLI::Vector<std::complex<double> > row(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long)

rowFlag((object)arg1) object :

Return reference to row flag vector. Maybee you can check if the rows are valid. Size is set automatic to the amount of rows.

C++ signature :

GIMLI::Vector<bool> {lvalue} rowFlag(GIMLI::Matrix<std::complex<double> > {lvalue})

rowRef((object)arg1, (object)i) object :

Return reference to row. Used for pygimli.

C++ signature :

GIMLI::Vector<std::complex<double> > {lvalue} rowRef(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long)

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::Matrix<std::complex<double> > {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

rtti((object)arg1) object :
C++ signature :

unsigned int rtti(GIMLI::Matrix<std::complex<double> > {lvalue})

rtti( (object)arg1) -> object :

C++ signature :

unsigned int rtti(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

save((object)arg1, (object)filename) object :
C++ signature :

void* save(GIMLI::Matrix<std::complex<double> > {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

save( (object)arg1, (object)filename) -> object :

C++ signature :

void* save(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

setCol((object)arg1, (object)col, (object)v) object :

Set one specific column

C++ signature :

void* setCol(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long,GIMLI::Vector<std::complex<double> >)

setRow((object)arg1, (object)i, (object)val) object :

Set a value. Throws out of range exception if index check fails. inline void setRow(const Vector < ValueType > & val, Index i) { log(Warning, deprecated use setRow(i, val)); ASSERT_THIS_SIZE(i) mat_[i] = val; }

C++ signature :

void* setRow(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long,GIMLI::Vector<std::complex<double> >)

setVal((object)arg1, (object)i, (object)val) object :
Set a value. Throws out of range exception if index check fails.

inline void setVal(const Vector < ValueType > & val, Index i) { log(Warning, deprecated, use setVal(i, val)); return setRow(i, val); }

C++ signature :

void* setVal(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long,GIMLI::Vector<std::complex<double> >)

setVal( (object)arg1, (object)i, (object)j, (object)val) -> object :

C++ signature :

void* setVal(GIMLI::Matrix<std::complex<double> > {lvalue},unsigned long,unsigned long,std::complex<double>)

transAdd((object)arg1, (object)a) object :
C++ signature :

GIMLI::Matrix<std::complex<double> > {lvalue} transAdd(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Matrix<std::complex<double> >)

transMult((object)arg1, (object)b) object :
C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)b) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(GIMLI::Matrix<std::complex<double> > {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(Matrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>)

CSparseMapMatrix

class pygimli.matrix.CSparseMapMatrix

Bases: MatrixBase

class Aux

Bases: instance

__init__((object)arg1, (object)r, (object)maxs, (object)Cont, (object)stype) object :
C++ signature :

void* __init__(_object*,unsigned long,unsigned long,std::map<std::pair<unsigned long, unsigned long>, std::complex<double>, std::less<std::pair<unsigned long, unsigned long> >, std::allocator<std::pair<std::pair<unsigned long, unsigned long> const, std::complex<double> > > > {lvalue},int)

__init__((object)arg1[, (object)r=0[, (object)c=0[, (object)stype=0]]]) object :

stype .. symmetric style. stype=0 (full), stype=1 (UpperRight), stype=2 (LowerLeft)

C++ signature :

void* __init__(_object* [,unsigned long=0 [,unsigned long=0 [,int=0]]])

__init__( (object)arg1, (object)filename) -> object :

C++ signature :

void* __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

__init__( (object)arg1, (object)S) -> object :

C++ signature :

void* __init__(_object*,GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

__init__( (object)arg1, (object)S) -> object :

C++ signature :

void* __init__(_object*,GIMLI::SparseMatrix<std::complex<double> >)

__init__( (object)arg1, (object)i, (object)j, (object)v) -> object :

Contruct Map Matrix from 3 arrays of the same length. Number of colums are max(j)+1 and Number of rows are max(i)+1.

C++ signature :

void* __init__(_object*,GIMLI::Vector<unsigned long>,GIMLI::Vector<unsigned long>,GIMLI::Vector<double>)

add((object)arg1, (object)rows, (object)cols, (object)vals) object :

Add this values to the matrix.

C++ signature :

void* add(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<unsigned long>,GIMLI::Vector<unsigned long>,GIMLI::Vector<double>)

add( (object)arg1, (object)A [, (object)scale=1.0]) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::ElementMatrix<double> [,std::complex<double>=1.0])

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Pos)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Matrix<std::complex<double> >)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Vector<std::complex<double> >)

addToCol((object)arg1, (object)id, (object)A[, (object)scale=1.0[, (object)isDiag=False]]) object :
C++ signature :

void* addToCol(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long,GIMLI::ElementMatrix<double> [,std::complex<double>=1.0 [,bool=False]])

addToRow((object)arg1, (object)id, (object)A[, (object)scale=1.0[, (object)isDiag=False]]) object :
C++ signature :

void* addToRow(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long,GIMLI::ElementMatrix<double> [,std::complex<double>=1.0 [,bool=False]])

addVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* addVal(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long,unsigned long,std::complex<double>)

assign((object)arg1, (object)S) object :
C++ signature :

GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue} assign(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

assign( (object)arg1, (object)S) -> object :

C++ signature :

GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue} assign(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::SparseMatrix<std::complex<double> >)

clean((object)arg1) object :
C++ signature :

void* clean(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

clean( (object)arg1) -> object :

C++ signature :

void* clean(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue})

cleanCol((object)arg1, (object)col) object :
C++ signature :

void* cleanCol(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long)

cleanRow((object)arg1, (object)row) object :
C++ signature :

void* cleanRow(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long)

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue})

col((object)arg1, (object)i) object :
C++ signature :

GIMLI::Vector<std::complex<double> > col(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long)

col( (object)arg1, (object)i) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > col(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},unsigned long)

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue})

copy_((object)arg1, (object)S) object :
C++ signature :

void* copy_(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::SparseMatrix<double>)

copy_( (object)arg1, (object)S) -> object :

C++ signature :

void* copy_(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::SparseMatrix<std::complex<double> >)

dot((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> dot(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<double>)

dot( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> dot(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>)

dtype

alias of complex

fillArrays((object)arg1, (object)vals, (object)rows, (object)cols) object :

Fill existing arrays with values, row and column indieces of this SparseMapMatrix

C++ signature :

void* fillArrays(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<std::complex<double> > {lvalue},GIMLI::Vector<unsigned long> {lvalue},GIMLI::Vector<unsigned long> {lvalue})

getVal((object)arg1, (object)i, (object)j) object :
C++ signature :

std::complex<double> getVal(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long,unsigned long)

idx1((object)arg1, (object)I) object :
C++ signature :

unsigned long idx1(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},std::_Rb_tree_const_iterator<std::pair<std::pair<unsigned long, unsigned long> const, std::complex<double> > >)

idx2((object)arg1, (object)I) object :
C++ signature :

unsigned long idx2(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},std::_Rb_tree_const_iterator<std::pair<std::pair<unsigned long, unsigned long> const, std::complex<double> > >)

importCol((object)arg1, (object)filename, (object)dropTol, (object)colOffset) object :

Import columnwise from bmat starting at offset

C++ signature :

void* importCol(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,double,unsigned long)

importCol( (object)arg1, (object)filename [, (object)dropTol=0.001]) -> object :

no default arg here .. pygimli@win64 linker bug

C++ signature :

void* importCol(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,double=0.001])

load((object)arg1, (object)filename) object :
C++ signature :

void* load(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

max_size((object)arg1) object :
C++ signature :

unsigned long max_size(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

mult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

nCols((object)arg1) object :
C++ signature :

unsigned long nCols(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

nCols( (object)arg1) -> object :

C++ signature :

unsigned long nCols(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue})

nRows((object)arg1) object :
C++ signature :

unsigned long nRows(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

nRows( (object)arg1) -> object :

C++ signature :

unsigned long nRows(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue})

nVals((object)arg1) object :
C++ signature :

unsigned long nVals(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

ndim = 2
resize((object)arg1, (object)rows, (object)cols) object :
C++ signature :

void* resize(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long,unsigned long)

resize( (object)arg1, (object)rows, (object)cols) -> object :

C++ signature :

void* resize(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},unsigned long,unsigned long)

row((object)arg1, (object)i) object :
C++ signature :

GIMLI::Vector<std::complex<double> > row(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long)

row( (object)arg1, (object)i) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > row(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},unsigned long)

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue})

rtti((object)arg1) object :
C++ signature :

unsigned int rtti(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

rtti( (object)arg1) -> object :

C++ signature :

unsigned int rtti(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue})

save((object)arg1, (object)filename) object :
C++ signature :

void* save(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

save( (object)arg1, (object)filename) -> object :

C++ signature :

void* save(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

setCols((object)arg1, (object)c) object :
C++ signature :

void* setCols(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long)

setRows((object)arg1, (object)r) object :
C++ signature :

void* setRows(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long)

setVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* setVal(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},unsigned long,unsigned long,std::complex<double>)

property shape
size((object)arg1) object :
C++ signature :

unsigned long size(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

stype((object)arg1) object :

symmetric type. 0 = nonsymmetric, -1 symmetric lower part, 1 symmetric upper part.

C++ signature :

int stype(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

transMult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(SparseMapMatrix_less__std_scope_complex_less__double__greater__comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>)

values((object)arg1) object :
C++ signature :

GIMLI::Vector<std::complex<double> > values(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long> {lvalue})

CSparseMatrix

class pygimli.matrix.CSparseMatrix

Bases: MatrixBase

__init__((object)arg1) object :

Default constructor. Builds invalid sparse matrix

C++ signature :

void* __init__(_object*)

__init__( (object)arg1, (object)S) -> object :

Copy constructor.

C++ signature :

void* __init__(_object*,GIMLI::SparseMatrix<std::complex<double> >)

__init__( (object)arg1, (object)S) -> object :

Copy constructor.

C++ signature :

void* __init__(_object*,GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

__init__( (object)arg1, (object)colPtr, (object)rowIdx, (object)vals [, (object)stype=0]) -> object :

C++ signature :

void* __init__(_object*,GIMLI::Vector<unsigned long>,GIMLI::Vector<unsigned long>,GIMLI::Vector<std::complex<double> > [,int=0])

__init__( (object)arg1, (object)colPtr, (object)rowIdx, (object)vals [, (object)stype=0]) -> object :

C++ signature :

void* __init__(_object*,std::vector<int, std::allocator<int> >,std::vector<int, std::allocator<int> >,GIMLI::Vector<std::complex<double> > [,int=0])

add((object)arg1, (object)A) object :
C++ signature :

void* add(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::ElementMatrix<double>)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::ElementMatrix<double>,std::complex<double>)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Pos)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Matrix<std::complex<double> >)

addVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* addVal(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int,int,std::complex<double>)

assign((object)arg1, (object)S) object :

Copy assignment operator.

C++ signature :

GIMLI::SparseMatrix<std::complex<double> > {lvalue} assign(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::SparseMatrix<std::complex<double> >)

assign( (object)arg1, (object)S) -> object :

C++ signature :

GIMLI::SparseMatrix<std::complex<double> > {lvalue} assign(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

buildSparsityPattern((object)arg1, (object)mesh) object :
C++ signature :

void* buildSparsityPattern(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Mesh)

clean((object)arg1) object :
C++ signature :

void* clean(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

clean( (object)arg1) -> object :

C++ signature :

void* clean(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

cleanCol((object)arg1, (object)col) object :
C++ signature :

void* cleanCol(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int)

cleanRow((object)arg1, (object)row) object :
C++ signature :

void* cleanRow(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int)

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

colPtr((object)arg1) object :
C++ signature :

int* colPtr(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

colPtr( (object)arg1) -> object :

C++ signature :

int colPtr(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

copy_((object)arg1, (object)S) object :
C++ signature :

void* copy_(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::SparseMapMatrix<double, unsigned long>)

copy_( (object)arg1, (object)S) -> object :

C++ signature :

void* copy_(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

divVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* divVal(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int,int,std::complex<double>)

dot((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> dot(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Vector<double>)

dot( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> dot(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>)

dtype

alias of complex

fillMassMatrix((object)arg1, (object)mesh) object :
C++ signature :

void* fillMassMatrix(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Mesh)

fillMassMatrix( (object)arg1, (object)mesh, (object)a) -> object :

C++ signature :

void* fillMassMatrix(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Mesh,GIMLI::Vector<double>)

fillStiffnessMatrix((object)arg1, (object)mesh) object :
C++ signature :

void* fillStiffnessMatrix(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Mesh)

fillStiffnessMatrix( (object)arg1, (object)mesh, (object)a) -> object :

C++ signature :

void* fillStiffnessMatrix(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Mesh,GIMLI::Vector<double>)

getVal((object)arg1, (object)i, (object)j[, (object)warn=True]) object :

Get matrix value at i,j. If i and j is not part of the matrix sparsity pattern return 0 and print a warning. This warning can be disabled by setting warn to false.

C++ signature :

std::complex<double> getVal(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int,int [,bool=True])

mulVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* mulVal(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int,int,std::complex<double>)

mult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

nCols((object)arg1) object :
C++ signature :

unsigned long nCols(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

nRows((object)arg1) object :
C++ signature :

unsigned long nRows(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

nVals((object)arg1) object :
C++ signature :

unsigned long nVals(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

ndim = 2
resize((object)arg1, (object)rows, (object)cols) object :
C++ signature :

void* resize(GIMLI::SparseMatrix<std::complex<double> > {lvalue},unsigned long,unsigned long)

resize( (object)arg1, (object)rows, (object)cols) -> object :

C++ signature :

void* resize(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},unsigned long,unsigned long)

rowIdx((object)arg1) object :
C++ signature :

int* rowIdx(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

rowIdx( (object)arg1) -> object :

C++ signature :

int rowIdx(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

rtti((object)arg1) object :
C++ signature :

unsigned int rtti(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

rtti( (object)arg1) -> object :

C++ signature :

unsigned int rtti(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue})

save((object)arg1, (object)fileName) object :
C++ signature :

void* save(GIMLI::SparseMatrix<std::complex<double> > {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

save( (object)arg1, (object)fileName) -> object :

C++ signature :

void* save(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

setVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* setVal(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int,int,std::complex<double>)

property shape
size((object)arg1) object :
C++ signature :

unsigned long size(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

stype((object)arg1) object :

symmetric type. 0 = nonsymmetric, -1 symmetric lower part, 1 symmetric upper part.

C++ signature :

int stype(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

subVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* subVal(GIMLI::SparseMatrix<std::complex<double> > {lvalue},int,int,std::complex<double>)

transMult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(SparseMatrix_less__std_scope_complex_less__double__greater___greater__wrapper {lvalue},GIMLI::Vector<double>)

valid((object)arg1) object :
C++ signature :

bool valid(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

vals((object)arg1) object :
C++ signature :

std::complex<double>* vals(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

vecColPtr((object)arg1) object :
C++ signature :

std::vector<int, std::allocator<int> > vecColPtr(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

vecRowIdx((object)arg1) object :
C++ signature :

std::vector<int, std::allocator<int> > vecRowIdx(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

vecVals((object)arg1) object :
inline const ValueType vals() const { if (valid_) return &vals_[0]; else SPARSE_NOT_VALID; return 0; }

inline const ValueType & vals() const { if (valid_) return vals_[0]; else SPARSE_NOT_VALID; return vals_[0]; }

C++ signature :

GIMLI::Vector<std::complex<double> > vecVals(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

vecVals( (object)arg1) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > {lvalue} vecVals(GIMLI::SparseMatrix<std::complex<double> > {lvalue})

Cm05Matrix

class pygimli.matrix.Cm05Matrix(A, verbose=False)

Bases: MatrixBase

Matrix implicitly representing the inverse square-root.

__init__(A, verbose=False)

Constructor saving matrix and vector.

Parameters

A (ndarray) – numpy type (full) matrix

cols()

Return number of columns (using underlying matrix).

load(fileName)

Load the content of this matrix.

Used for caching until pickling is possible for this class

property mul
mult(x)

Multiplication from right-hand side (dot product).

rows()

Return number of rows (using underlying matrix).

save(fileName)

Save the content of this matrix.

Used for caching until pickling is possible for this class

transMult(x)

Multiplication from right-hand side (dot product).

DiagonalMatrix

class pygimli.matrix.DiagonalMatrix(d)

Bases: MatrixBase

Square matrix with a vector on the main diagonal.

__init__(d)

Initialize matrix

Parameters

d (Vector) – vector holding diagonal elements

cols()

Number of columns (length of diagonal).

mult(x)

Return M*x = d*x (element-wise)

rows()

Number of rows (length of diagonal).

transMult(x)

Return M.T*x = M*x

ElementMatrix

class pygimli.matrix.ElementMatrix

Bases: instance

__init__((object)arg1[, (object)dof=0]) object :
If dof = 0 then scalar field approximation is to be supposed.

For vector field solution give a dof, means be the number of nodes of the current mesh.

C++ signature :

void* __init__(_object* [,unsigned long=0])

__init__( (object)arg1, (object)nCoeff, (object)dofPerCoeff, (object)dofOffset) -> object :

new interface starts here

C++ signature :

void* __init__(_object*,unsigned long,unsigned long,unsigned long)

__init__( (object)arg1, (object)E) -> object :

C++ signature :

void* __init__(_object*,GIMLI::ElementMatrix<double>)

addVal((object)arg1, (object)i, (object)j, (object)v) object :
C++ signature :

void* addVal(GIMLI::ElementMatrix<double> {lvalue},unsigned long,unsigned long,double)

col((object)arg1, (object)i) object :

Return data for col i.

C++ signature :

GIMLI::Vector<double> col(GIMLI::ElementMatrix<double> {lvalue},unsigned long)

colIDs((object)arg1) object :

Return all column node indices.

C++ signature :

GIMLI::Vector<unsigned long> colIDs(GIMLI::ElementMatrix<double> {lvalue})

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::ElementMatrix<double> {lvalue})

copyFrom((object)arg1, (object)E[, (object)withMat=True]) object :
C++ signature :

void* copyFrom(GIMLI::ElementMatrix<double> {lvalue},GIMLI::ElementMatrix<double> [,bool=True])

dofOffset((object)arg1) object :
C++ signature :

unsigned long dofOffset(GIMLI::ElementMatrix<double> {lvalue})

dofPerCoeff((object)arg1) object :
C++ signature :

unsigned long dofPerCoeff(GIMLI::ElementMatrix<double> {lvalue})

dudi((object)arg1, (object)ent, (object)w, (object)x, (object)i[, (object)verbose=False]) object :
C++ signature :

GIMLI::ElementMatrix<double> {lvalue} dudi(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos>,unsigned long [,bool=False])

elastic((object)arg1) object :
C++ signature :

bool elastic(GIMLI::ElementMatrix<double> {lvalue})

entity((object)arg1) object :

Return const reference to the last active entity.

C++ signature :

GIMLI::MeshEntity entity(GIMLI::ElementMatrix<double> {lvalue})

fillGradientBase((object)arg1, (object)ent, (object)w, (object)x, (object)nC, (object)voigtNotation) object :

Fill Element Gradients Matrix for all integration points.

C++ signature :

void* fillGradientBase(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos>,unsigned long,bool)

fillIds((object)arg1, (object)ent[, (object)nC=1]) object :

Fill the node ids with a number of coefficents. For vector field approximation give field dimension 2 or 3. Please note that you need to give the number of nodes to the ElementMatrix constructor.

C++ signature :

void* fillIds(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity [,unsigned long=1])

getVal((object)arg1, (object)i, (object)j) object :
C++ signature :

double getVal(GIMLI::ElementMatrix<double> {lvalue},unsigned long,unsigned long)

getWeightsAndPoints((object)arg1, (object)ent, (object)w, (object)x, (object)order) object :

Get integration weights and points for the entity.

C++ signature :

void* getWeightsAndPoints(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double> const* {lvalue},GIMLI::Vector<GIMLI::Pos> const* {lvalue},int)

grad((object)arg1, (object)ent, (object)order, (object)elastic, (object)sum, (object)div, (object)nCoeff, (object)dof, (object)dofOffset[, (object)kelvin=False]) object :

Fill this ElementMatrix with value (u for scalar, v for vector values) basis. Cache the matrix in entity

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} grad(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,unsigned long,bool,bool,bool,unsigned long,unsigned long,unsigned long [,bool=False])

grad( (object)arg1, (object)ent, (object)order [, (object)elastic=False [, (object)sum=False [, (object)div=False [, (object)kelvin=False]]]]) -> object :

Fill this ElementMatrix with gradient of ent.

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} grad(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,unsigned long [,bool=False [,bool=False [,bool=False [,bool=False]]]])

gradU((object)arg1, (object)cell, (object)nC[, (object)voigtNotation=False]) object :

Fill this element matrix with int_domain C grad u

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} gradU(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Cell,unsigned long [,bool=False])

gradU( (object)arg1, (object)ent, (object)w, (object)x, (object)nC [, (object)voigtNotation=False]) -> object :

Fill this element matrix with int_domain C grad u

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} gradU(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos>,unsigned long [,bool=False])

gradU2((object)arg1, (object)cell, (object)C[, (object)voigtNotation=False]) object :
Fill this element matrix with int_domain C grad u grad u.

For scalar field approximation define C.size() = (1x1) isotropic or anisotropic C.size() = (cell.dim() x cell.dim()) parameter. For vector field approximation create the ElementMatrix with appropriate dof and C can be of size = (1x1) for isotropic, (cell.dim() x cell.dim()) for anisotropic, or (3x3) for 2D elastic and (6x6) 3D elastic parameter. Notation for elastic parameters Kelvin notation as default and can be Voigts notation if needed.

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} gradU2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Cell,GIMLI::Matrix<double> [,bool=False])

gradU2( (object)arg1, (object)cell, (object)c) -> object :

Fill this element matrix with int_domain C grad u grad u.

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} gradU2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Cell,double)

gradU2( (object)arg1, (object)ent, (object)C, (object)w, (object)x [, (object)voigtNotation=False]) -> object :

Fill this element matrix with int_domain C grad u grad u.

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} gradU2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Matrix<double>,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

gradientBase((object)arg1) object :

Return gradient base for the last entity, i.e., integrate over gradient u over the cell.

C++ signature :

GIMLI::Matrix<double> gradientBase(GIMLI::ElementMatrix<double> {lvalue})

ids((object)arg1) object :

Return all node indices.

C++ signature :

GIMLI::Vector<unsigned long> ids(GIMLI::ElementMatrix<double> {lvalue})

idx((object)arg1, (object)i) object :

Return the node index for node i.

C++ signature :

unsigned long idx(GIMLI::ElementMatrix<double> {lvalue},unsigned long)

init((object)arg1, (object)nCoeff, (object)dofPerCoeff, (object)dofOffset) object :
C++ signature :

void* init(GIMLI::ElementMatrix<double> {lvalue},unsigned long,unsigned long,unsigned long)

integrate((object)arg1) object :

Integrate, i.e., sum over quadrature matrices.

C++ signature :

void* integrate(GIMLI::ElementMatrix<double> {lvalue})

integrated((object)arg1, (object)i) object :
C++ signature :

void* integrated(GIMLI::ElementMatrix<double> {lvalue},bool)

isDiv((object)arg1) object :
C++ signature :

bool isDiv(GIMLI::ElementMatrix<double> {lvalue})

isIntegrated((object)arg1) object :
C++ signature :

bool isIntegrated(GIMLI::ElementMatrix<double> {lvalue})

mat((object)arg1) object :

Return data for row i.

C++ signature :

GIMLI::Matrix<double> mat(GIMLI::ElementMatrix<double> {lvalue})

matX((object)arg1) object :

Return reference to all matrices per quadrature point.

C++ signature :

std::vector<GIMLI::Matrix<double>, std::allocator<GIMLI::Matrix<double> > > matX(GIMLI::ElementMatrix<double> {lvalue})

mult((object)arg1, (object)v) object :
C++ signature :

GIMLI::Vector<double> mult(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a, (object)ret) -> object :

Return S a

C++ signature :

void* mult(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double> {lvalue})

mult( (object)arg1, (object)a, (object)b) -> object :

Return (S a) b

C++ signature :

double mult(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double>)

mult( (object)arg1, (object)a, (object)b, (object)m, (object)n) -> object :

C++ signature :

double mult(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double>,GIMLI::Vector<double>,GIMLI::Vector<double>)

mult( (object)arg1, (object)a, (object)b, (object)m, (object)n) -> object :

C++ signature :

std::complex<double> mult(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<std::complex<double> >,GIMLI::Vector<std::complex<double> >,GIMLI::Vector<std::complex<double> >,GIMLI::Vector<std::complex<double> >)

mult_((object)arg1, (object)a, (object)b, (object)m, (object)n) object :

Return (S (a-b)) (m-n) TODO Check if its the same like mult(a-b, m-n)

C++ signature :

double mult_(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<double>,GIMLI::Vector<double>,GIMLI::Vector<double>,GIMLI::Vector<double>)

mult_( (object)arg1, (object)a, (object)b, (object)m, (object)n) -> object :

Return (S (a-b)) (m-n) TODO Check if its the same like mult(a-b, m-n)

C++ signature :

std::complex<double> mult_(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<std::complex<double> >,GIMLI::Vector<std::complex<double> >,GIMLI::Vector<std::complex<double> >,GIMLI::Vector<std::complex<double> >)

nCoeff((object)arg1) object :
C++ signature :

unsigned long nCoeff(GIMLI::ElementMatrix<double> {lvalue})

oldStyle((object)arg1) object :
C++ signature :

bool oldStyle(GIMLI::ElementMatrix<double> {lvalue})

order((object)arg1) object :
C++ signature :

unsigned long order(GIMLI::ElementMatrix<double> {lvalue})

pMat((object)arg1) object :

Return data matrix.

C++ signature :

GIMLI::Matrix<double>* pMat(GIMLI::ElementMatrix<double> {lvalue})

pMatX((object)arg1) object :
C++ signature :

std::vector<GIMLI::Matrix<double>, std::allocator<GIMLI::Matrix<double> > >* pMatX(GIMLI::ElementMatrix<double> {lvalue})

pot((object)arg1, (object)ent, (object)order, (object)sum, (object)nCoeff, (object)dof, (object)dofOffset) object :

Fill this ElementMatrix with value (u for scalar, v for vector values) basis. Cache the matrix in entity

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} pot(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,unsigned long,bool,unsigned long,unsigned long,unsigned long)

pot( (object)arg1, (object)ent, (object)order [, (object)sum=False]) -> object :

Fill this ElementMatrix with value (u for scalar, v for vector values) basis.

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} pot(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,unsigned long [,bool=False])

resize((object)arg1, (object)rows[, (object)cols=0]) object :
C++ signature :

void* resize(GIMLI::ElementMatrix<double> {lvalue},unsigned long [,unsigned long=0])

row((object)arg1, (object)i) object :

Return data for row i.

C++ signature :

GIMLI::Vector<double> row(GIMLI::ElementMatrix<double> {lvalue},unsigned long)

rowIDs((object)arg1) object :

Return all row node indices.

C++ signature :

GIMLI::Vector<unsigned long> rowIDs(GIMLI::ElementMatrix<double> {lvalue})

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::ElementMatrix<double> {lvalue})

setDiv((object)arg1, (object)div) object :
C++ signature :

void* setDiv(GIMLI::ElementMatrix<double> {lvalue},bool)

setIds((object)arg1, (object)idsR, (object)idsC) object :

Set all node indices for row and columns. Can be unsymmetric.

C++ signature :

void* setIds(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<unsigned long>,GIMLI::Vector<unsigned long>)

setIds( (object)arg1, (object)ids) -> object :

Set all node indices.

C++ signature :

void* setIds(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Vector<unsigned long>)

setMat((object)arg1, (object)m) object :

Set data matrix.

C++ signature :

void* setMat(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Matrix<double>)

setVal((object)arg1, (object)i, (object)j, (object)v) object :
C++ signature :

void* setVal(GIMLI::ElementMatrix<double> {lvalue},unsigned long,unsigned long,double)

setValid((object)arg1, (object)v) object :
C++ signature :

void* setValid(GIMLI::ElementMatrix<double> {lvalue},bool)

size((object)arg1) object :
C++ signature :

unsigned long size(GIMLI::ElementMatrix<double> {lvalue})

stress((object)arg1, (object)ent, (object)C, (object)u[, (object)voigtNotation=False]) object :

Return the stress matrix for this entity.

C++ signature :

GIMLI::Vector<double> stress(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Matrix<double>,GIMLI::Vector<double> [,bool=False])

u((object)arg1, (object)ent) object :

Fill this element matrix with int_boundary C u

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} u(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity)

u( (object)arg1, (object)ent, (object)w, (object)x [, (object)verbose=False]) -> object :

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} u(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

u2((object)arg1, (object)ent) object :

Fill this element matrix with int_domain C u u

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} u2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity)

u2( (object)arg1, (object)ent, (object)w, (object)x [, (object)verbose=False]) -> object :

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} u2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

ux((object)arg1, (object)ent, (object)w, (object)x[, (object)verbose=False]) object :
C++ signature :

GIMLI::ElementMatrix<double> {lvalue} ux(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

ux2((object)arg1, (object)ent, (object)w, (object)x[, (object)verbose=False]) object :
C++ signature :

GIMLI::ElementMatrix<double> {lvalue} ux2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

ux2uy2((object)arg1, (object)ent, (object)w, (object)x[, (object)verbose=False]) object :
C++ signature :

GIMLI::ElementMatrix<double> {lvalue} ux2uy2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

ux2uy2uz2((object)arg1, (object)cell[, (object)useCache=False]) object :
C++ signature :

GIMLI::ElementMatrix<double> {lvalue} ux2uy2uz2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::Cell [,bool=False])

ux2uy2uz2( (object)arg1, (object)ent, (object)w, (object)x [, (object)verbose=False]) -> object :

C++ signature :

GIMLI::ElementMatrix<double> {lvalue} ux2uy2uz2(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

uy((object)arg1, (object)ent, (object)w, (object)x[, (object)verbose=False]) object :
C++ signature :

GIMLI::ElementMatrix<double> {lvalue} uy(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

uz((object)arg1, (object)ent, (object)w, (object)x[, (object)verbose=False]) object :
C++ signature :

GIMLI::ElementMatrix<double> {lvalue} uz(GIMLI::ElementMatrix<double> {lvalue},GIMLI::MeshEntity,GIMLI::Vector<double>,GIMLI::Vector<GIMLI::Pos> [,bool=False])

valid((object)arg1) object :
C++ signature :

bool valid(GIMLI::ElementMatrix<double> {lvalue})

w((object)arg1) object :

Return const reference to the last quadrature weights.

C++ signature :

GIMLI::Vector<double> w(GIMLI::ElementMatrix<double> {lvalue})

x((object)arg1) object :

Return const reference to the last quadrature points.

C++ signature :

GIMLI::Vector<GIMLI::Pos> x(GIMLI::ElementMatrix<double> {lvalue})

FrameConstraintMatrix

class pygimli.matrix.FrameConstraintMatrix(A, num, scale=1.0)

Bases: RepeatDMatrix

Matrix constraining meshes inside and between frames of same mesh.

M = | A |
A |
A |
-I +I |
-I +I |
__init__(A, num, scale=1.0)

Init matrix by specifying number of frames.

Parameters
  • A (pg.MatrixBase (or derived)) – matrix for constraining a single frame (e.g. 1st order smoothness)

  • num (int) – number of frames

GeostatisticConstraintsMatrix

class pygimli.matrix.GeostatisticConstraintsMatrix(CM=None, mesh=None, **kwargs)

Bases: MatrixBase

Geostatistic constraints matrix

Uses geostatistical operators described by Jordi et al. (2018), however corrects for the remaining non-smooth (damping) part by correcting for the spur of the inverse root matrix.

Jordi, C., Doetsch, J., Günther, T., Schmelzbach, C. & Robertsson, J.O.A. (2018): Geostatistical regularisation operators for geophysical inverse problems on irregular meshes. Geoph. J. Int. 213, 1374-1386, doi:10.1093/gji/ggy055.

__init__(CM=None, mesh=None, **kwargs)

Initialize by computing the covariance matrix & its inverse root.

Parameters
  • CM (pg.Matrix or pg.SparseMapMatrix) – covariance matrix, if not given, use mesh and I

  • mesh (pg.Mesh) – mesh of which the cell midpoints are used for covariance

  • I (float | iterable of floats) – axis correlation length (isotropic) or lengths (anisotropic)

  • dip (float [0]) – angle of main axis corresponding to I[0] (2D) or I[0]&I[1] (3D)

  • strike (float [0]) – angle of main axis corresponding to I[0] versus I[1] (3D)

  • withRef (bool [False]) – neglect spur (reference model effect) that is otherwise corrected

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::MatrixBase {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(MatrixBase_wrapper {lvalue})

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::MatrixBase {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(MatrixBase_wrapper {lvalue})

load(fileName)

Load the content of this matrix.

Used for caching until pickling is possible for this class

mult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

property nModel
rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::MatrixBase {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(MatrixBase_wrapper {lvalue})

save(fileName)

Save content of this matrix.

Used for caching until pickling is possible for this class

property spur
transMult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> transMult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(MatrixBase_wrapper {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(MatrixBase_wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

IdentityMatrix

class pygimli.matrix.IdentityMatrix

Bases: MatrixBase

Identity matrix: derived from matrixBase

__init__((object)arg1) object :

Default constructor (empty matrix).

C++ signature :

void* __init__(_object*)

__init__( (object)arg1, (object)nrows [, (object)val=1.0]) -> object :

Constructor with number of rowscolums.

C++ signature :

void* __init__(_object*,unsigned long [,double=1.0])

clean((object)arg1) object :
C++ signature :

void* clean(GIMLI::IdentityMatrix {lvalue})

clean( (object)arg1) -> object :

C++ signature :

void* clean(IdentityMatrix_wrapper {lvalue})

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::IdentityMatrix {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(IdentityMatrix_wrapper {lvalue})

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::IdentityMatrix {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(IdentityMatrix_wrapper {lvalue})

dot((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> dot(GIMLI::IdentityMatrix {lvalue},GIMLI::Vector<double>)

dot( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> dot(IdentityMatrix_wrapper {lvalue},GIMLI::Vector<double>)

mult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> mult(GIMLI::IdentityMatrix {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(IdentityMatrix_wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::IdentityMatrix {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(IdentityMatrix_wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::IdentityMatrix {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(IdentityMatrix_wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::IdentityMatrix {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(IdentityMatrix_wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

ndim = 2
resize((object)arg1, (object)rows, (object)cols) object :
C++ signature :

void* resize(GIMLI::IdentityMatrix {lvalue},unsigned long,unsigned long)

resize( (object)arg1, (object)rows, (object)cols) -> object :

C++ signature :

void* resize(IdentityMatrix_wrapper {lvalue},unsigned long,unsigned long)

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::IdentityMatrix {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(IdentityMatrix_wrapper {lvalue})

rtti((object)arg1) object :
C++ signature :

unsigned int rtti(GIMLI::IdentityMatrix {lvalue})

rtti( (object)arg1) -> object :

C++ signature :

unsigned int rtti(IdentityMatrix_wrapper {lvalue})

save((object)arg1, (object)filename) object :
C++ signature :

void* save(GIMLI::IdentityMatrix {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

save( (object)arg1, (object)filename) -> object :

C++ signature :

void* save(IdentityMatrix_wrapper {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

property shape
transMult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> transMult(GIMLI::IdentityMatrix {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(IdentityMatrix_wrapper {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::IdentityMatrix {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(IdentityMatrix_wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

LMultRMatrix

pygimli.matrix.LMultRMatrix

alias of MultLeftMatrix

LRMultRMatrix

pygimli.matrix.LRMultRMatrix

alias of MultLeftRightMatrix

Matrix

pygimli.matrix.Matrix

alias of RMatrix

MatrixBase

class pygimli.matrix.MatrixBase

Bases: instance

Interface class for matrices. Pure virtual interface class for matrices. If you want your own Jacobian matrix to be used in Inversion or ModellingBase you have to derive your matrix from this class and implement all necessary members.

__init__((object)arg1[, (object)verbose=False]) object :

Default constructor.

C++ signature :

void* __init__(_object* [,bool=False])

clean((object)arg1) object :
C++ signature :

void* clean(GIMLI::MatrixBase {lvalue})

clean( (object)arg1) -> object :

C++ signature :

void* clean(MatrixBase_wrapper {lvalue})

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::MatrixBase {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(MatrixBase_wrapper {lvalue})

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::MatrixBase {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(MatrixBase_wrapper {lvalue})

dot((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> dot(GIMLI::MatrixBase {lvalue},GIMLI::Vector<double>)

dot( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> dot(MatrixBase_wrapper {lvalue},GIMLI::Vector<double>)

mult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(MatrixBase_wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

ndim = 2
resize((object)arg1, (object)rows, (object)cols) object :
C++ signature :

void* resize(GIMLI::MatrixBase {lvalue},unsigned long,unsigned long)

resize( (object)arg1, (object)rows, (object)cols) -> object :

C++ signature :

void* resize(MatrixBase_wrapper {lvalue},unsigned long,unsigned long)

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::MatrixBase {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(MatrixBase_wrapper {lvalue})

rtti((object)arg1) object :
C++ signature :

unsigned int rtti(GIMLI::MatrixBase {lvalue})

rtti( (object)arg1) -> object :

C++ signature :

unsigned int rtti(MatrixBase_wrapper {lvalue})

save((object)arg1, (object)filename) object :
C++ signature :

void* save(GIMLI::MatrixBase {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

save( (object)arg1, (object)filename) -> object :

C++ signature :

void* save(MatrixBase_wrapper {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

setVerbose((object)arg1, (object)verbose) object :
C++ signature :

void* setVerbose(GIMLI::MatrixBase {lvalue},bool)

property shape
size((object)arg1) object :

Return number of rows

C++ signature :

unsigned long size(GIMLI::MatrixBase {lvalue})

transMult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> transMult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(MatrixBase_wrapper {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::MatrixBase {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(MatrixBase_wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

verbose((object)arg1) object :
C++ signature :

bool verbose(GIMLI::MatrixBase {lvalue})

Mult2Matrix

class pygimli.matrix.Mult2Matrix(A, B)

Bases: MatrixBase

Matrix by multipication of two matrices implicitly.

The matrix holds two matrices and distributes multiplication in 2 parts

M = A * B M * x = A * (B*x) M.T * y = B^T * (A.T^*y) = (y^T * A * B)^T

__init__(A, B)

Initialize matrix.

Parameters
  • A (any Matrix derived from pg.core.MatrixBase) – submatrices to be multiplied (A.cols() must equal B.rows())

  • B (any Matrix derived from pg.core.MatrixBase) – submatrices to be multiplied (A.cols() must equal B.rows())

cols()

Number of columns.

mult(x)

Return M*x = A*(B*x)

rows()

Number of rows.

transMult(x)

Return M.T*x=(A.T*x)*B

MultLeftMatrix

class pygimli.matrix.MultLeftMatrix(A, left, verbose=False)

Bases: MultMatrix

Matrix consisting of actual RMatrix and lef-side vector.

__init__(A, left, verbose=False)

Constructor saving matrix and vector.

property l
mult(x)

Multiplication from right-hand-side (dot product A*x).

property r
transMult(x)

Multiplication from right-hand-side (dot product A.T * x)

MultLeftRightMatrix

class pygimli.matrix.MultLeftRightMatrix(A, left, right, verbose=False)

Bases: MultMatrix

Matrix consisting of actual RMatrix and left-hand-side vector.

__init__(A, left, right, verbose=False)

Initialize matrix by matrix and vectors.

Parameters
  • A (pg.core.MatrixBase derived) – main matrix

  • left (pg.Vector) – left and right side vectors to weight individual rows & columns

  • right (pg.Vector) – left and right side vectors to weight individual rows & columns

property l
mult(x)

Multiplication from right-hand-side (dot product A*x).

property r
transMult(x)

Multiplication from right-hand-side (dot product A.T*x).

MultMatrix

class pygimli.matrix.MultMatrix(A, verbose=False)

Bases: MatrixBase

Base Matrix class for all matrix types holding a matrix.

property A
__init__((object)arg1[, (object)verbose=False]) object :

Default constructor.

C++ signature :

void* __init__(_object* [,bool=False])

cols()

Return number of columns (using underlying matrix).

rows()

Return number of rows (using underlying matrix).

save(filename)

So it can be used in inversion with dosave flag

MultRightMatrix

class pygimli.matrix.MultRightMatrix(A, r=None, verbose=False)

Bases: MultMatrix

Some Matrix, multiplied with a right hand side vector r.

__init__((object)arg1[, (object)verbose=False]) object :

Default constructor.

C++ signature :

void* __init__(_object* [,bool=False])

mult(x)

Return M*x = A*(r*x)

property r
transMult(x)

Return M.T*x=(A.T*x)*r

NDMatrix

class pygimli.matrix.NDMatrix(num, nrows, ncols)

Bases: RBlockMatrix

Diagonal block (block-Jacobi) matrix .

__init__((object)arg1[, (object)verbose=False]) object :
C++ signature :

void* __init__(_object* [,bool=False])

RMultRMatrix

pygimli.matrix.RMultRMatrix

alias of MultRightMatrix

RSparseMapMatrix

class pygimli.matrix.RSparseMapMatrix

Bases: MatrixBase

class Aux

Bases: instance

__init__((object)arg1, (object)r, (object)maxs, (object)Cont, (object)stype) object :
C++ signature :

void* __init__(_object*,unsigned long,unsigned long,std::map<std::pair<unsigned long, unsigned long>, double, std::less<std::pair<unsigned long, unsigned long> >, std::allocator<std::pair<std::pair<unsigned long, unsigned long> const, double> > > {lvalue},int)

__init__((object)arg1[, (object)r=0[, (object)c=0[, (object)stype=0]]]) object :

stype .. symmetric style. stype=0 (full), stype=1 (UpperRight), stype=2 (LowerLeft)

C++ signature :

void* __init__(_object* [,unsigned long=0 [,unsigned long=0 [,int=0]]])

__init__( (object)arg1, (object)filename) -> object :

C++ signature :

void* __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

__init__( (object)arg1, (object)S) -> object :

C++ signature :

void* __init__(_object*,GIMLI::SparseMapMatrix<double, unsigned long>)

__init__( (object)arg1, (object)S) -> object :

C++ signature :

void* __init__(_object*,GIMLI::SparseMatrix<double>)

__init__( (object)arg1, (object)i, (object)j, (object)v) -> object :

Contruct Map Matrix from 3 arrays of the same length. Number of colums are max(j)+1 and Number of rows are max(i)+1.

C++ signature :

void* __init__(_object*,GIMLI::Vector<unsigned long>,GIMLI::Vector<unsigned long>,GIMLI::Vector<double>)

add((object)arg1, (object)rows, (object)cols, (object)vals) object :

Add this values to the matrix.

C++ signature :

void* add(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<unsigned long>,GIMLI::Vector<unsigned long>,GIMLI::Vector<double>)

add( (object)arg1, (object)A [, (object)scale=1.0]) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::ElementMatrix<double> [,double=1.0])

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Pos)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Matrix<double>)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Vector<double>)

addToCol((object)arg1, (object)id, (object)A[, (object)scale=1.0[, (object)isDiag=False]]) object :
C++ signature :

void* addToCol(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long,GIMLI::ElementMatrix<double> [,double=1.0 [,bool=False]])

addToRow((object)arg1, (object)id, (object)A[, (object)scale=1.0[, (object)isDiag=False]]) object :
C++ signature :

void* addToRow(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long,GIMLI::ElementMatrix<double> [,double=1.0 [,bool=False]])

addVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* addVal(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long,unsigned long,double)

assign((object)arg1, (object)S) object :
C++ signature :

GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} assign(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::SparseMapMatrix<double, unsigned long>)

assign( (object)arg1, (object)S) -> object :

C++ signature :

GIMLI::SparseMapMatrix<double, unsigned long> {lvalue} assign(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::SparseMatrix<double>)

clean((object)arg1) object :
C++ signature :

void* clean(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

clean( (object)arg1) -> object :

C++ signature :

void* clean(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue})

cleanCol((object)arg1, (object)col) object :
C++ signature :

void* cleanCol(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long)

cleanRow((object)arg1, (object)row) object :
C++ signature :

void* cleanRow(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long)

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue})

col((object)arg1, (object)i) object :
C++ signature :

GIMLI::Vector<double> col(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long)

col( (object)arg1, (object)i) -> object :

C++ signature :

GIMLI::Vector<double> col(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},unsigned long)

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue})

copy()

Create a copy.

copy_((object)arg1, (object)S) object :

SparseMapMatrix specialized type traits in sparsematrix.cpp

C++ signature :

void* copy_(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::SparseMatrix<double>)

copy_( (object)arg1, (object)S) -> object :

C++ signature :

void* copy_(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::SparseMatrix<std::complex<double> >)

dot((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> dot(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<double>)

dot( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> dot(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>)

dtype

alias of float

fillArrays((object)arg1, (object)vals, (object)rows, (object)cols) object :

Fill existing arrays with values, row and column indieces of this SparseMapMatrix

C++ signature :

void* fillArrays(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<double> {lvalue},GIMLI::Vector<unsigned long> {lvalue},GIMLI::Vector<unsigned long> {lvalue})

getVal((object)arg1, (object)i, (object)j) object :
C++ signature :

double getVal(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long,unsigned long)

idx1((object)arg1, (object)I) object :
C++ signature :

unsigned long idx1(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},std::_Rb_tree_const_iterator<std::pair<std::pair<unsigned long, unsigned long> const, double> >)

idx2((object)arg1, (object)I) object :
C++ signature :

unsigned long idx2(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},std::_Rb_tree_const_iterator<std::pair<std::pair<unsigned long, unsigned long> const, double> >)

importCol((object)arg1, (object)filename, (object)dropTol, (object)colOffset) object :

Import columnwise from bmat starting at offset

C++ signature :

void* importCol(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,double,unsigned long)

importCol( (object)arg1, (object)filename [, (object)dropTol=0.001]) -> object :

no default arg here .. pygimli@win64 linker bug

C++ signature :

void* importCol(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,double=0.001])

load((object)arg1, (object)filename) object :
C++ signature :

void* load(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

max_size((object)arg1) object :
C++ signature :

unsigned long max_size(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

mult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

nCols((object)arg1) object :
C++ signature :

unsigned long nCols(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

nCols( (object)arg1) -> object :

C++ signature :

unsigned long nCols(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue})

nRows((object)arg1) object :
C++ signature :

unsigned long nRows(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

nRows( (object)arg1) -> object :

C++ signature :

unsigned long nRows(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue})

nVals((object)arg1) object :
C++ signature :

unsigned long nVals(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

ndim = 2
resize((object)arg1, (object)rows, (object)cols) object :
C++ signature :

void* resize(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long,unsigned long)

resize( (object)arg1, (object)rows, (object)cols) -> object :

C++ signature :

void* resize(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},unsigned long,unsigned long)

row((object)arg1, (object)i) object :
C++ signature :

GIMLI::Vector<double> row(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long)

row( (object)arg1, (object)i) -> object :

C++ signature :

GIMLI::Vector<double> row(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},unsigned long)

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue})

rtti((object)arg1) object :
C++ signature :

unsigned int rtti(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

rtti( (object)arg1) -> object :

C++ signature :

unsigned int rtti(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue})

save((object)arg1, (object)filename) object :
C++ signature :

void* save(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

save( (object)arg1, (object)filename) -> object :

C++ signature :

void* save(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

setCols((object)arg1, (object)c) object :
C++ signature :

void* setCols(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long)

setRows((object)arg1, (object)r) object :
C++ signature :

void* setRows(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long)

setVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* setVal(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},unsigned long,unsigned long,double)

property shape
size((object)arg1) object :
C++ signature :

unsigned long size(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

stype((object)arg1) object :

symmetric type. 0 = nonsymmetric, -1 symmetric lower part, 1 symmetric upper part.

C++ signature :

int stype(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

transMult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> transMult(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(SparseMapMatrix_less__double_comma__unsigned_long__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

values((object)arg1) object :
C++ signature :

GIMLI::Vector<double> values(GIMLI::SparseMapMatrix<double, unsigned long> {lvalue})

RSparseMatrix

class pygimli.matrix.RSparseMatrix

Bases: MatrixBase

__init__((object)arg1) object :

Default constructor. Builds invalid sparse matrix

C++ signature :

void* __init__(_object*)

__init__( (object)arg1, (object)S) -> object :

Copy constructor.

C++ signature :

void* __init__(_object*,GIMLI::SparseMatrix<double>)

__init__( (object)arg1, (object)S) -> object :

Copy constructor.

C++ signature :

void* __init__(_object*,GIMLI::SparseMapMatrix<double, unsigned long>)

__init__( (object)arg1, (object)colPtr, (object)rowIdx, (object)vals [, (object)stype=0]) -> object :

C++ signature :

void* __init__(_object*,GIMLI::Vector<unsigned long>,GIMLI::Vector<unsigned long>,GIMLI::Vector<double> [,int=0])

__init__( (object)arg1, (object)colPtr, (object)rowIdx, (object)vals [, (object)stype=0]) -> object :

C++ signature :

void* __init__(_object*,std::vector<int, std::allocator<int> >,std::vector<int, std::allocator<int> >,GIMLI::Vector<double> [,int=0])

add((object)arg1, (object)A) object :
C++ signature :

void* add(GIMLI::SparseMatrix<double> {lvalue},GIMLI::ElementMatrix<double>)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMatrix<double> {lvalue},GIMLI::ElementMatrix<double>,double)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMatrix<double> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Pos)

add( (object)arg1, (object)A, (object)scale) -> object :

C++ signature :

void* add(GIMLI::SparseMatrix<double> {lvalue},GIMLI::ElementMatrix<double>,GIMLI::Matrix<double>)

addVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* addVal(GIMLI::SparseMatrix<double> {lvalue},int,int,double)

assign((object)arg1, (object)S) object :

Copy assignment operator.

C++ signature :

GIMLI::SparseMatrix<double> {lvalue} assign(GIMLI::SparseMatrix<double> {lvalue},GIMLI::SparseMatrix<double>)

assign( (object)arg1, (object)S) -> object :

C++ signature :

GIMLI::SparseMatrix<double> {lvalue} assign(GIMLI::SparseMatrix<double> {lvalue},GIMLI::SparseMapMatrix<double, unsigned long>)

buildSparsityPattern((object)arg1, (object)mesh) object :
C++ signature :

void* buildSparsityPattern(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Mesh)

clean((object)arg1) object :
C++ signature :

void* clean(GIMLI::SparseMatrix<double> {lvalue})

clean( (object)arg1) -> object :

C++ signature :

void* clean(SparseMatrix_less__double__greater__wrapper {lvalue})

cleanCol((object)arg1, (object)col) object :
C++ signature :

void* cleanCol(GIMLI::SparseMatrix<double> {lvalue},int)

cleanRow((object)arg1, (object)row) object :
C++ signature :

void* cleanRow(GIMLI::SparseMatrix<double> {lvalue},int)

clear((object)arg1) object :
C++ signature :

void* clear(GIMLI::SparseMatrix<double> {lvalue})

clear( (object)arg1) -> object :

C++ signature :

void* clear(SparseMatrix_less__double__greater__wrapper {lvalue})

colPtr((object)arg1) object :
C++ signature :

int* colPtr(GIMLI::SparseMatrix<double> {lvalue})

colPtr( (object)arg1) -> object :

C++ signature :

int colPtr(GIMLI::SparseMatrix<double> {lvalue})

cols((object)arg1) object :
C++ signature :

unsigned long cols(GIMLI::SparseMatrix<double> {lvalue})

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(SparseMatrix_less__double__greater__wrapper {lvalue})

copy()

Create a copy.

copy_((object)arg1, (object)S) object :
C++ signature :

void* copy_(GIMLI::SparseMatrix<double> {lvalue},GIMLI::SparseMapMatrix<double, unsigned long>)

copy_( (object)arg1, (object)S) -> object :

C++ signature :

void* copy_(GIMLI::SparseMatrix<double> {lvalue},GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

divVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* divVal(GIMLI::SparseMatrix<double> {lvalue},int,int,double)

dot((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> dot(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Vector<double>)

dot( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> dot(SparseMatrix_less__double__greater__wrapper {lvalue},GIMLI::Vector<double>)

dtype

alias of float

fillMassMatrix((object)arg1, (object)mesh) object :
C++ signature :

void* fillMassMatrix(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Mesh)

fillMassMatrix( (object)arg1, (object)mesh, (object)a) -> object :

C++ signature :

void* fillMassMatrix(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Mesh,GIMLI::Vector<double>)

fillStiffnessMatrix((object)arg1, (object)mesh) object :
C++ signature :

void* fillStiffnessMatrix(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Mesh)

fillStiffnessMatrix( (object)arg1, (object)mesh, (object)a) -> object :

C++ signature :

void* fillStiffnessMatrix(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Mesh,GIMLI::Vector<double>)

getVal((object)arg1, (object)i, (object)j[, (object)warn=True]) object :

Get matrix value at i,j. If i and j is not part of the matrix sparsity pattern return 0 and print a warning. This warning can be disabled by setting warn to false.

C++ signature :

double getVal(GIMLI::SparseMatrix<double> {lvalue},int,int [,bool=True])

mulVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* mulVal(GIMLI::SparseMatrix<double> {lvalue},int,int,double)

mult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMatrix_less__double__greater__wrapper {lvalue},GIMLI::Vector<double>)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMatrix_less__double__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<double> mult(SparseMatrix_less__double__greater__wrapper {lvalue},GIMLI::Vector<double>,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

mult( (object)arg1, (object)b, (object)startI, (object)endI) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > mult(SparseMatrix_less__double__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >,unsigned long,unsigned long)

nCols((object)arg1) object :
C++ signature :

unsigned long nCols(GIMLI::SparseMatrix<double> {lvalue})

nRows((object)arg1) object :
C++ signature :

unsigned long nRows(GIMLI::SparseMatrix<double> {lvalue})

nVals((object)arg1) object :
C++ signature :

unsigned long nVals(GIMLI::SparseMatrix<double> {lvalue})

ndim = 2
resize((object)arg1, (object)rows, (object)cols) object :
C++ signature :

void* resize(GIMLI::SparseMatrix<double> {lvalue},unsigned long,unsigned long)

resize( (object)arg1, (object)rows, (object)cols) -> object :

C++ signature :

void* resize(SparseMatrix_less__double__greater__wrapper {lvalue},unsigned long,unsigned long)

rowIdx((object)arg1) object :
C++ signature :

int* rowIdx(GIMLI::SparseMatrix<double> {lvalue})

rowIdx( (object)arg1) -> object :

C++ signature :

int rowIdx(GIMLI::SparseMatrix<double> {lvalue})

rows((object)arg1) object :
C++ signature :

unsigned long rows(GIMLI::SparseMatrix<double> {lvalue})

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(SparseMatrix_less__double__greater__wrapper {lvalue})

rtti((object)arg1) object :
C++ signature :

unsigned int rtti(GIMLI::SparseMatrix<double> {lvalue})

rtti( (object)arg1) -> object :

C++ signature :

unsigned int rtti(SparseMatrix_less__double__greater__wrapper {lvalue})

save((object)arg1, (object)fileName) object :
C++ signature :

void* save(GIMLI::SparseMatrix<double> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

save( (object)arg1, (object)fileName) -> object :

C++ signature :

void* save(SparseMatrix_less__double__greater__wrapper {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

setVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* setVal(GIMLI::SparseMatrix<double> {lvalue},int,int,double)

property shape
size((object)arg1) object :
C++ signature :

unsigned long size(GIMLI::SparseMatrix<double> {lvalue})

stype((object)arg1) object :

symmetric type. 0 = nonsymmetric, -1 symmetric lower part, 1 symmetric upper part.

C++ signature :

int stype(GIMLI::SparseMatrix<double> {lvalue})

subVal((object)arg1, (object)i, (object)j, (object)val) object :
C++ signature :

void* subVal(GIMLI::SparseMatrix<double> {lvalue},int,int,double)

transMult((object)arg1, (object)a) object :
C++ signature :

GIMLI::Vector<double> transMult(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> transMult(SparseMatrix_less__double__greater__wrapper {lvalue},GIMLI::Vector<double>)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(GIMLI::SparseMatrix<double> {lvalue},GIMLI::Vector<std::complex<double> >)

transMult( (object)arg1, (object)a) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > transMult(SparseMatrix_less__double__greater__wrapper {lvalue},GIMLI::Vector<std::complex<double> >)

valid((object)arg1) object :
C++ signature :

bool valid(GIMLI::SparseMatrix<double> {lvalue})

vals((object)arg1) object :
C++ signature :

double* vals(GIMLI::SparseMatrix<double> {lvalue})

vecColPtr((object)arg1) object :
C++ signature :

std::vector<int, std::allocator<int> > vecColPtr(GIMLI::SparseMatrix<double> {lvalue})

vecRowIdx((object)arg1) object :
C++ signature :

std::vector<int, std::allocator<int> > vecRowIdx(GIMLI::SparseMatrix<double> {lvalue})

vecVals((object)arg1) object :
inline const ValueType vals() const { if (valid_) return &vals_[0]; else SPARSE_NOT_VALID; return 0; }

inline const ValueType & vals() const { if (valid_) return vals_[0]; else SPARSE_NOT_VALID; return vals_[0]; }

C++ signature :

GIMLI::Vector<double> vecVals(GIMLI::SparseMatrix<double> {lvalue})

vecVals( (object)arg1) -> object :

C++ signature :

GIMLI::Vector<double> {lvalue} vecVals(GIMLI::SparseMatrix<double> {lvalue})

RepeatDMatrix

class pygimli.matrix.RepeatDMatrix(A, num)

Bases: RBlockMatrix

Matrix repeating a base matrix N times diagonally. Only A is stored.

M = | A |
A |
A |
__init__(A, num)

Init matrix by specify matrix and number of repetitions.

Parameters
  • A (pg.MatrixBase (or derived)) – matrix for constraining a single frame (e.g. 1st order smoothness)

  • num (int) – number of repetitions

RepeatHMatrix

class pygimli.matrix.RepeatHMatrix(A, num)

Bases: RBlockMatrix

Matrix repeating a base matrix N times horizontally. Only A is stored.

M = [ A A A ]

__init__(A, num)

Init matrix by specify matrix and number of repetitions.

Parameters
  • A (pg.MatrixBase (or derived)) – matrix for constraining a single frame (e.g. 1st order smoothness)

  • num (int) – number of repetitions

RepeatVMatrix

class pygimli.matrix.RepeatVMatrix(A, num)

Bases: RBlockMatrix

Matrix repeating a base matrix N times vertically. Only A is stored.

M = | A |
A |
A |
__init__(A, num)

Init matrix by specify matrix and number of repetitions.

Parameters
  • A (pg.MatrixBase (or derived)) – matrix for constraining a single frame (e.g. 1st order smoothness)

  • num (int) – number of repetitions

SparseMapMatrix

pygimli.matrix.SparseMapMatrix

alias of RSparseMapMatrix

SparseMatrix

pygimli.matrix.SparseMatrix

alias of RSparseMatrix

SquaredMatrix

class pygimli.matrix.SquaredMatrix(A, verbose=False)

Bases: MatrixBase

Wrapper for squared (least-squares) matrix A^T*A (of any kind).

__init__((object)arg1[, (object)verbose=False]) object :

Default constructor.

C++ signature :

void* __init__(_object* [,bool=False])

cols()

Return number of cols (cols of underlying matrix).

mult(x)

Multiplication from right-hand-side (A.T*A*x).

rows()

Return number of rows (cols of underlying matrix).

transMult(x)

Multiplication from right-hand-side ((A^T*A)^T*x).

SquaredTransposeMatrix

class pygimli.matrix.SquaredTransposeMatrix(A, verbose=False)

Bases: MatrixBase

Wrapper for squared (least-squares) matrix A*A^T (of any kind).

__init__((object)arg1[, (object)verbose=False]) object :

Default constructor.

C++ signature :

void* __init__(_object* [,bool=False])

cols()

Return number of cols (rows of underlying matrix).

mult(x)

Multiplication from right-hand-side (A.T*A*x).

rows()

Return number of rows (rows of underlying matrix).

transMult(x)

Multiplication from right-hand-side ((A^T*A)^T*x).

TransposedMatrix

class pygimli.matrix.TransposedMatrix(A, verbose=False)

Bases: MatrixBase

Wrapper for transposed matrix (of any kind).

__init__((object)arg1[, (object)verbose=False]) object :

Default constructor.

C++ signature :

void* __init__(_object* [,bool=False])

cols()

Return number of cols (rows of underlying matrix).

mult(x)

Multiplication from right-hand-side (A.T*x).

rows()

Return number of rows (cols of underlying matrix).

transMult(x)

Multiplication from right-hand-side (A*x)