pygimli.matrix

Some matrix specialization.

Overview

Functions

covarianceMatrix(mesh[, nodes])

Geostatistical covariance matrix (cell or node) for given mesh.

critical(*args)

warn(*args)

Classes

Add2Matrix(A, B)

Matrix by adding two matrices.

BlockMatrix

alias of pygimli.core._pygimli_.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

GeostatisticConstraintsMatrix([CM, mesh])

Geostatistic constraints matrix

IVector

IdentityMatrix

Identity matrix: derived from matrixBase

LMultRMatrix

alias of pygimli.core.matrix.MultLeftMatrix

LRMultRMatrix

alias of pygimli.core.matrix.MultLeftRightMatrix

Matrix

alias of pygimli.core._pygimli_.RMatrix

MatrixBase

Mult2Matrix(A, B)

Matrix by multiplying two matrices.

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 derived from pg.matrix.BlockMatrix.

R3Vector

RMultRMatrix

alias of pygimli.core.matrix.MultRightMatrix

RVector

SparseMapMatrix

alias of pygimli.core._pygimli_.RSparseMapMatrix

SparseMatrix

alias of pygimli.core._pygimli_.RSparseMatrix

Functions

covarianceMatrix

pygimli.matrix.covarianceMatrix(mesh, nodes=False, **kwargs)

Geostatistical covariance matrix (cell or node) for given mesh.

Parameters
  • mesh (gimliapi:GIMLI::Mesh) – Mesh

  • nodes (bool [False]) – use node positions, otherwise (default) cell centers are used

  • **kwargs

    Ifloat or list of floats

    correlation lengths (range) in individual directions

    dipfloat

    dip angle (in degree) of major axis (I[0])

    strikefloat

    strike angle (for 3D)

Returns

Cm – covariance matrix

Return type

np.array (square matrix of size cellCount/nodeCount)

Examples using pygimli.matrix.covarianceMatrix

critical

pygimli.matrix.critical(*args)

warn

pygimli.matrix.warn(*args)

Classes

Add2Matrix

class pygimli.matrix.Add2Matrix(A, B)

Bases: pygimli.core._pygimli_.MatrixBase

Matrix by adding two matrices.

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

Default constructor.

C++ signature :

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

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 pygimli.core._pygimli_.RBlockMatrix

CMatrix

class pygimli.matrix.CMatrix

Bases: pygimli.core._pygimli_.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)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> >)

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 builtins.complex

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)

ndim = 2
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>)

property shape
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: pygimli.core._pygimli_.MatrixBase

class Aux

Bases: Boost.Python.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])

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>)

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>)

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>)

CSparseMatrix

class pygimli.matrix.CSparseMatrix

Bases: pygimli.core._pygimli_.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*,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 :

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

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

C++ signature :

GIMLI::SparseMatrix<std::complex<double> > {lvalue} add(GIMLI::SparseMatrix<std::complex<double> > {lvalue},GIMLI::ElementMatrix<double>,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>)

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>)

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: pygimli.core._pygimli_.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).

mult(x)

Multiplication from right-hand side (dot product).

rows()

Return number of rows (using underlying matrix).

transMult(x)

Multiplication from right-hand side (dot product).

DiagonalMatrix

class pygimli.matrix.DiagonalMatrix(d)

Bases: pygimli.core._pygimli_.MatrixBase

Square matrix with a vector on the main diagonal.

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

Default constructor.

C++ signature :

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

cols()

Number of columns (length of diagonal).

mult(x)

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

rows()

Number of rows (length of diagonal).

transMult(x)

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

ElementMatrix

class pygimli.matrix.ElementMatrix

Bases: Boost.Python.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])

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

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

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})

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])

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)

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 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)

mat((object)arg1) → object :

Return data matrix.

C++ signature :

GIMLI::Matrix<double> mat(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> >)

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})

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)

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])

GeostatisticConstraintsMatrix

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

Bases: pygimli.core._pygimli_.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

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

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

cols( (object)arg1) -> object :

C++ signature :

unsigned long cols(MatrixBase_wrapper {lvalue})

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)

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

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

rows( (object)arg1) -> object :

C++ signature :

unsigned long rows(MatrixBase_wrapper {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> >)

IVector

class pygimli.matrix.IVector

Bases: Boost.Python.instance

__init__((object)arg1) → object :
Construct one-dimensional array of size n. The vector is cleaned (filled with zero)

#ifndef PYGIMLI_CAST this constructor is dangerous for IndexArray in pygimli .. there is an autocast from int -> IndexArray(int)

C++ signature :

void* __init__(_object*)

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

C++ signature :

void* __init__(_object*,unsigned long)

__init__( (object)arg1, (object)n, (object)val) -> object :

#endif Construct one-dimensional array of size n, and fill it with val

C++ signature :

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

__init__( (object)arg1, (object)filename [, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) -> object :

Construct vector from file. Shortcut for Vector::load

C++ signature :

void* __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

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

Copy constructor. Create new vector as a deep copy of v.

C++ signature :

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

__init__( (object)arg1, (object)v, (object)start, (object)end) -> object :

Copy constructor. Create new vector as a deep copy of the slice v[start, end)

C++ signature :

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

add((object)arg1, (object)A) → object :
Add Values from an ElementMatrix. For vectors only the first row will

be taken.

C++ signature :

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

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

Add Values from an ElementMatrix. For vectors only the first row will be taken. Optional scale with scalar.

C++ signature :

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

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

Add Values from an ElementMatrix. For vectors only the first row will be taken. Optional scale with values from vector.

C++ signature :

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

addVal((object)arg1, (object)vals, (object)start, (object)end) → object :

Like setVal(vals, start, end) instead copy use +=

C++ signature :

GIMLI::Vector<long> {lvalue} addVal(GIMLI::Vector<long> {lvalue},GIMLI::Vector<long>,unsigned long,unsigned long)

addVal( (object)arg1, (object)vals, (object)pair) -> object :

C++ signature :

GIMLI::Vector<long> {lvalue} addVal(GIMLI::Vector<long> {lvalue},GIMLI::Vector<long>,std::pair<unsigned long, long>)

addVal( (object)arg1, (object)vals, (object)idx) -> object :

Add values from vals at IndexArray idx. Throws length exception if sizes of vals and idx mismatch.

C++ signature :

GIMLI::Vector<long> {lvalue} addVal(GIMLI::Vector<long> {lvalue},GIMLI::Vector<long>,GIMLI::Vector<unsigned long>)

addVal( (object)arg1, (object)val, (object)i) -> object :

Add val to index idx.

C++ signature :

GIMLI::Vector<long> {lvalue} addVal(GIMLI::Vector<long> {lvalue},long,unsigned long)

assign((object)arg1, (object)v) → object :

Assignment operator. Creates a new vector as copy of v

C++ signature :

GIMLI::Vector<long> {lvalue} assign(GIMLI::Vector<long> {lvalue},GIMLI::Vector<long>)

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

Assignment operator. Fill the existing vector with val. Shortcut for fill.

C++ signature :

GIMLI::Vector<long> {lvalue} assign(GIMLI::Vector<long> {lvalue},long)

beginPyIter((object)arg1) → object :
C++ signature :

GIMLI::VectorIterator<long> beginPyIter(GIMLI::Vector<long> {lvalue})

capacity((object)arg1) → object :
C++ signature :

unsigned long capacity(GIMLI::Vector<long> {lvalue})

clean((object)arg1) → object :

Fill Vector with 0.0. Dont change size.

C++ signature :

void* clean(GIMLI::Vector<long> {lvalue})

clear((object)arg1) → object :

Empty the vector. Frees memory and resize to 0.

C++ signature :

void* clear(GIMLI::Vector<long> {lvalue})

copy((object)arg1) → object :

Return a deep copy. For numpy compatibility.

C++ signature :

GIMLI::Vector<long> copy(GIMLI::Vector<long> {lvalue})

data((object)arg1) → object :
C++ signature :

long* data(GIMLI::Vector<long> {lvalue})

dtype

alias of builtins.int

empty((object)arg1) → object :
C++ signature :

bool empty(GIMLI::Vector<long> {lvalue})

fill((object)arg1, (object)val) → object :

Fill the whole vector with val.

C++ signature :

GIMLI::Vector<long> {lvalue} fill(GIMLI::Vector<long> {lvalue},long)

getVal((object)arg1, (object)i) → object :
Get value for index i.

Throws out of range exception if index check fails.

C++ signature :

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

getVal( (object)arg1, (object)start, (object)end) -> object :

C++ signature :

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

getVal( (object)arg1, (object)pair) -> object :

C++ signature :

GIMLI::Vector<long> getVal(GIMLI::Vector<long> {lvalue},std::pair<unsigned long, long>)

get_((object)arg1, (object)idx) → object :
C++ signature :

GIMLI::Vector<long> get_(GIMLI::Vector<long> {lvalue},GIMLI::Vector<unsigned long>)

get_( (object)arg1, (object)idx) -> object :

C++ signature :

GIMLI::Vector<long> get_(GIMLI::Vector<long> {lvalue},std::vector<long, std::allocator<long> >)

get_( (object)arg1, (object)idx) -> object :

C++ signature :

GIMLI::Vector<long> get_(GIMLI::Vector<long> {lvalue},GIMLI::Vector<long>)

hash((object)arg1) → object :
C++ signature :

unsigned long hash(GIMLI::Vector<long> {lvalue})

load((object)arg1, (object)filename[, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) → object :

Load the object from file. Returns true on success and in case of trouble an exception is thrown. The IOFormat flag will be overwritten if the filename have a proper file suffix. Ascii format is forced if VECTORASCSUFFIX is given. Binary format is forced if VECTORBINSUFFIX is set. See Vector< ValueType >::save for file format.

C++ signature :

bool load(GIMLI::Vector<long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

nThreads((object)arg1) → object :
C++ signature :

unsigned long nThreads(GIMLI::Vector<long> {lvalue})

ndim = 1
push_back((object)arg1, (object)v) → object :
C++ signature :

GIMLI::Vector<long> {lvalue} push_back(GIMLI::Vector<long> {lvalue},long)

reserve((object)arg1, (object)n) → object :

Reserve memory. Old data are preserved

C++ signature :

void* reserve(GIMLI::Vector<long> {lvalue},unsigned long)

resize((object)arg1, (object)n, (object)fill) → object :

Resize if n differs size() and fill new with val. Old data are preserved.

C++ signature :

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

resize( (object)arg1, (object)n) -> object :

default args lead win64 pygimli segfault .. WTF??

C++ signature :

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

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

Round all values of this array to a given tolerance.

C++ signature :

GIMLI::Vector<long> {lvalue} round(GIMLI::Vector<long> {lvalue},long)

save((object)arg1, (object)filename[, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) → object :

Save the object to file. Returns true on success and in case of trouble an exception is thrown. The IOFormat flag will be overwritten if the filename have a proper file suffix. Ascii format is forced if VECTORASCSUFFIX is given. Binary format is forced if VECTORBINSUFFIX is set. If no suffix is provided VECTORASCSUFFIX or VECTORBINSUFFIX will be append. nn Binary format is: n Unsigned int64 [8Byte] - length of the Array [0.. length) n ValueType [sizeof(ValueType)] - 0th value n … n ValueType [sizeof(ValueType)] - length -1 value nn Ascii format is a simple list of the values nn param filename string of the file name param IOFormat enum, either Ascii for human readable format, or Binary for fast save and load.

C++ signature :

bool save(GIMLI::Vector<long> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

setVal(*args, **kwargs)
singleCalcCount((object)arg1) → object :
C++ signature :

unsigned long singleCalcCount(GIMLI::Vector<long> {lvalue})

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

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

IdentityMatrix

class pygimli.matrix.IdentityMatrix

Bases: pygimli.core._pygimli_.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)

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> >)

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 pygimli.core.matrix.MultLeftMatrix

LRMultRMatrix

pygimli.matrix.LRMultRMatrix

alias of pygimli.core.matrix.MultLeftRightMatrix

Matrix

pygimli.matrix.Matrix

alias of pygimli.core._pygimli_.RMatrix

MatrixBase

class pygimli.matrix.MatrixBase

Bases: Boost.Python.instance

__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)

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: pygimli.core._pygimli_.MatrixBase

Matrix by multiplying two matrices.

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

Default constructor.

C++ signature :

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

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

MultLeftMatrix

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

Bases: pygimli.core.matrix.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: pygimli.core.matrix.MultMatrix

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

__init__(A, left, right, 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).

MultMatrix

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

Bases: pygimli.core._pygimli_.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: pygimli.core.matrix.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: pygimli.core._pygimli_.RBlockMatrix

Diagonal block (block-Jacobi) matrix derived from pg.matrix.BlockMatrix.

(to be moved to a better place at a later stage)

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

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

R3Vector

class pygimli.matrix.R3Vector

Bases: Boost.Python.instance

__init__((object)arg1) → object :
Construct one-dimensional array of size n. The vector is cleaned (filled with zero)

#ifndef PYGIMLI_CAST this constructor is dangerous for IndexArray in pygimli .. there is an autocast from int -> IndexArray(int)

C++ signature :

void* __init__(_object*)

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

C++ signature :

void* __init__(_object*,unsigned long)

__init__( (object)arg1, (object)n, (object)val) -> object :

#endif Construct one-dimensional array of size n, and fill it with val

C++ signature :

void* __init__(_object*,unsigned long,GIMLI::Pos)

__init__( (object)arg1, (object)filename [, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) -> object :

Construct vector from file. Shortcut for Vector::load

C++ signature :

void* __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

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

Copy constructor. Create new vector as a deep copy of v.

C++ signature :

void* __init__(_object*,GIMLI::Vector<GIMLI::Pos>)

__init__( (object)arg1, (object)v, (object)start, (object)end) -> object :

Copy constructor. Create new vector as a deep copy of the slice v[start, end)

C++ signature :

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

add((object)arg1, (object)A) → object :
Add Values from an ElementMatrix. For vectors only the first row will

be taken.

C++ signature :

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

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

Add Values from an ElementMatrix. For vectors only the first row will be taken. Optional scale with scalar.

C++ signature :

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

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

Add Values from an ElementMatrix. For vectors only the first row will be taken. Optional scale with values from vector.

C++ signature :

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

addVal((object)arg1, (object)vals, (object)start, (object)end) → object :

Like setVal(vals, start, end) instead copy use +=

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} addVal(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Vector<GIMLI::Pos>,unsigned long,unsigned long)

addVal( (object)arg1, (object)vals, (object)pair) -> object :

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} addVal(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Vector<GIMLI::Pos>,std::pair<unsigned long, long>)

addVal( (object)arg1, (object)vals, (object)idx) -> object :

Add values from vals at IndexArray idx. Throws length exception if sizes of vals and idx mismatch.

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} addVal(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Vector<GIMLI::Pos>,GIMLI::Vector<unsigned long>)

addVal( (object)arg1, (object)val, (object)i) -> object :

Add val to index idx.

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} addVal(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Pos,unsigned long)

array((object)arg1) → object :

PyGIMLI Helper Function: extract a numpy array object from a R3Vector

C++ signature :

_object* array(GIMLI::Vector<GIMLI::Pos> {lvalue})

assign((object)arg1, (object)v) → object :

Assignment operator. Creates a new vector as copy of v

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} assign(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Vector<GIMLI::Pos>)

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

Assignment operator. Fill the existing vector with val. Shortcut for fill.

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} assign(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Pos)

beginPyIter((object)arg1) → object :
C++ signature :

GIMLI::VectorIterator<GIMLI::Pos> beginPyIter(GIMLI::Vector<GIMLI::Pos> {lvalue})

capacity((object)arg1) → object :
C++ signature :

unsigned long capacity(GIMLI::Vector<GIMLI::Pos> {lvalue})

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

void* clean(GIMLI::Vector<GIMLI::Pos> {lvalue})

clear((object)arg1) → object :

Empty the vector. Frees memory and resize to 0.

C++ signature :

void* clear(GIMLI::Vector<GIMLI::Pos> {lvalue})

copy((object)arg1) → object :

Return a deep copy. For numpy compatibility.

C++ signature :

GIMLI::Vector<GIMLI::Pos> copy(GIMLI::Vector<GIMLI::Pos> {lvalue})

data((object)arg1) → object :
C++ signature :

GIMLI::Pos* data(GIMLI::Vector<GIMLI::Pos> {lvalue})

empty((object)arg1) → object :
C++ signature :

bool empty(GIMLI::Vector<GIMLI::Pos> {lvalue})

fill((object)arg1, (object)val) → object :

Fill the whole vector with val.

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} fill(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Pos)

getVal((object)arg1, (object)i) → object :
Get value for index i.

Throws out of range exception if index check fails.

C++ signature :

GIMLI::Pos getVal(GIMLI::Vector<GIMLI::Pos> {lvalue},unsigned long)

getVal( (object)arg1, (object)start, (object)end) -> object :

C++ signature :

GIMLI::Vector<GIMLI::Pos> getVal(GIMLI::Vector<GIMLI::Pos> {lvalue},unsigned long,long)

getVal( (object)arg1, (object)pair) -> object :

C++ signature :

GIMLI::Vector<GIMLI::Pos> getVal(GIMLI::Vector<GIMLI::Pos> {lvalue},std::pair<unsigned long, long>)

get_((object)arg1, (object)idx) → object :
C++ signature :

GIMLI::Vector<GIMLI::Pos> get_(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Vector<unsigned long>)

get_( (object)arg1, (object)idx) -> object :

C++ signature :

GIMLI::Vector<GIMLI::Pos> get_(GIMLI::Vector<GIMLI::Pos> {lvalue},std::vector<long, std::allocator<long> >)

get_( (object)arg1, (object)idx) -> object :

C++ signature :

GIMLI::Vector<GIMLI::Pos> get_(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Vector<long>)

hash((object)arg1) → object :
C++ signature :

unsigned long hash(GIMLI::Vector<GIMLI::Pos> {lvalue})

load((object)arg1, (object)filename[, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) → object :

Load the object from file. Returns true on success and in case of trouble an exception is thrown. The IOFormat flag will be overwritten if the filename have a proper file suffix. Ascii format is forced if VECTORASCSUFFIX is given. Binary format is forced if VECTORBINSUFFIX is set. See Vector< ValueType >::save for file format.

C++ signature :

bool load(GIMLI::Vector<GIMLI::Pos> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

nThreads((object)arg1) → object :
C++ signature :

unsigned long nThreads(GIMLI::Vector<GIMLI::Pos> {lvalue})

ndim = 2
push_back((object)arg1, (object)v) → object :
C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} push_back(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Pos)

reserve((object)arg1, (object)n) → object :

Reserve memory. Old data are preserved

C++ signature :

void* reserve(GIMLI::Vector<GIMLI::Pos> {lvalue},unsigned long)

resize((object)arg1, (object)n, (object)fill) → object :

Resize if n differs size() and fill new with val. Old data are preserved.

C++ signature :

void* resize(GIMLI::Vector<GIMLI::Pos> {lvalue},unsigned long,GIMLI::Pos)

resize( (object)arg1, (object)n) -> object :

default args lead win64 pygimli segfault .. WTF??

C++ signature :

void* resize(GIMLI::Vector<GIMLI::Pos> {lvalue},unsigned long)

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

Round all values of this array to a given tolerance.

C++ signature :

GIMLI::Vector<GIMLI::Pos> {lvalue} round(GIMLI::Vector<GIMLI::Pos> {lvalue},GIMLI::Pos)

save((object)arg1, (object)filename[, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) → object :

Save the object to file. Returns true on success and in case of trouble an exception is thrown. The IOFormat flag will be overwritten if the filename have a proper file suffix. Ascii format is forced if VECTORASCSUFFIX is given. Binary format is forced if VECTORBINSUFFIX is set. If no suffix is provided VECTORASCSUFFIX or VECTORBINSUFFIX will be append. nn Binary format is: n Unsigned int64 [8Byte] - length of the Array [0.. length) n ValueType [sizeof(ValueType)] - 0th value n … n ValueType [sizeof(ValueType)] - length -1 value nn Ascii format is a simple list of the values nn param filename string of the file name param IOFormat enum, either Ascii for human readable format, or Binary for fast save and load.

C++ signature :

bool save(GIMLI::Vector<GIMLI::Pos> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

setVal(*args, **kwargs)
singleCalcCount((object)arg1) → object :
C++ signature :

unsigned long singleCalcCount(GIMLI::Vector<GIMLI::Pos> {lvalue})

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

unsigned long size(GIMLI::Vector<GIMLI::Pos> {lvalue})

RMultRMatrix

pygimli.matrix.RMultRMatrix

alias of pygimli.core.matrix.MultRightMatrix

RVector

class pygimli.matrix.RVector

Bases: Boost.Python.instance

__init__((object)arg1) → object :
Construct one-dimensional array of size n. The vector is cleaned (filled with zero)

#ifndef PYGIMLI_CAST this constructor is dangerous for IndexArray in pygimli .. there is an autocast from int -> IndexArray(int)

C++ signature :

void* __init__(_object*)

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

C++ signature :

void* __init__(_object*,unsigned long)

__init__( (object)arg1, (object)n, (object)val) -> object :

#endif Construct one-dimensional array of size n, and fill it with val

C++ signature :

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

__init__( (object)arg1, (object)filename [, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) -> object :

Construct vector from file. Shortcut for Vector::load

C++ signature :

void* __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

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

Copy constructor. Create new vector as a deep copy of v.

C++ signature :

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

__init__( (object)arg1, (object)v, (object)start, (object)end) -> object :

Copy constructor. Create new vector as a deep copy of the slice v[start, end)

C++ signature :

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

add((object)arg1, (object)A) → object :
Load the object from file. Returns true on success and in case of trouble an exception is thrown.

The IOFormat flag will be overwritten if the filename have a proper file suffix. Ascii format is forced if VECTORASCSUFFIX is given. Binary format is forced if VECTORBINSUFFIX is set. See Vector< ValueType >::save for file format. bool load(const std::string & filename, IOFormat format = Ascii){ if (filename.rfind(VECTORASCSUFFIX) = std::string::npos) format = Ascii; else if (filename.rfind(VECTORBINSUFFIX) = std::string::npos) format = Binary; if (fileExist(filename)){ if (fileExist(filename + VECTORBINSUFFIX)) return this->load(filename + VECTORBINSUFFIX, Binary); if (fileExist(filename + VECTORASCSUFFIX)) return this->load(filename + VECTORASCSUFFIX, Ascii); } if (format == Ascii){ std::vector < ValueType > tmp; std::fstream file; openInFile(filename.c_str(), &file); ValueType val; while(file >> val) { tmp.push_back(val); } so haett ich das gern std::ifstream file(filename.c_str()); std::copy( std::istream_iterator<double>(file), std::istream_iterator<double>(), std::back_inserter(tmp)); std::back_inserter< double > (tmp)); std::copy(file.begin(), file.end(), back_inserter< double >(& tmp[0])); this->resize(tmp.size()); std::copy(tmp.begin(), tmp.end(), &data_[0]); file.close(); } else { FILE file; file = fopen(filename.c_str(), r+b); if (file) { throwError(filename + : + strerror(errno)); } Index ret = 0; int64 size; ret = fread(&size, sizeof(int64), 1, file); if (ret) this->resize(size); ret = fread(&data_[0], sizeof(ValueType), size, file); if (ret) { } fclose(file); } return true; } VectorIterator< ValueType > beginPyIter() const { return VectorIterator< ValueType >(data_, size_); } VectorIterator< ValueType > begin() const { return VectorIterator< ValueType >(data_, size_); } VectorIterator< ValueType > end() const { return VectorIterator< ValueType >(data_ + size_, 0); } Index hash() const { Index seed = 0; for (Index i = 0; i < this->size_; ++i) { hashCombine(seed, this->data_[i]); } return seed; } protected: void free_(){ size_ = 0; capacity_ = 0; if (data_) delete [] data_; data_ = NULL; } void copy_(const Vector< ValueType > & v){ if (v.size()) { resize(v.size()); check speed for memcpy here std::memcpy(data_, v.data_, sizeof(ValType)v.size()); memcpy is approx 0.3% faster but copy is extensively testet cleanest solution needs iterator rewriting: std::copy(v.begin(), v.end(), this->begin()); std::copy(&v[0], &v[v.size()], data_); only works without bound check in subscription operator } __MS(data_) __MS(this) } template < class ExprOP > inline void assign_(const ExprOP & v) { if (v.size()) { std::cout << assign_ << v.size() << std::endl; resize(v.size()); v.assign(this); } } Index size_; ValueType data_; Index capacity_; static const Index minSizePerThread = 10000; static const int maxThreads = 8; int nThreads_; Index singleCalcCount_; }; Implement specialized type traits in vector.cpp

C++ signature :

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

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

C++ signature :

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

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

C++ signature :

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

addVal((object)arg1, (object)vals, (object)start, (object)end) → object :

Like setVal(vals, start, end) instead copy use +=

C++ signature :

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

addVal( (object)arg1, (object)vals, (object)pair) -> object :

C++ signature :

GIMLI::Vector<double> {lvalue} addVal(GIMLI::Vector<double> {lvalue},GIMLI::Vector<double>,std::pair<unsigned long, long>)

addVal( (object)arg1, (object)vals, (object)idx) -> object :

Add values from vals at IndexArray idx. Throws length exception if sizes of vals and idx mismatch.

C++ signature :

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

addVal( (object)arg1, (object)val, (object)i) -> object :

Add val to index idx.

C++ signature :

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

array((object)arg1) → object :

PyGIMLI Helper Function: extract a numpy array object from a RVector

C++ signature :

_object* array(GIMLI::Vector<double> {lvalue})

assign((object)arg1, (object)v) → object :

Assignment operator. Creates a new vector as copy of v

C++ signature :

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

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

Assignment operator. Creates a new vector as from expression.

C++ signature :

GIMLI::Vector<double> {lvalue} assign(GIMLI::Vector<double> {lvalue},GIMLI::__VectorExpr<double, GIMLI::__VectorUnaryExprOp<double, GIMLI::__VectorExpr<double, GIMLI::__VectorValExprOp<double, GIMLI::VectorIterator<double>, GIMLI::MULT> >, GIMLI::TANH> >)

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

Assignment operator. Creates a new vector as from expression.

C++ signature :

GIMLI::Vector<double> {lvalue} assign(GIMLI::Vector<double> {lvalue},GIMLI::__VectorExpr<double, GIMLI::__ValVectorExprOp<double, GIMLI::VectorIterator<double>, GIMLI::DIVID> >)

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

Assignment operator. Creates a new vector as from expression.

C++ signature :

GIMLI::Vector<double> {lvalue} assign(GIMLI::Vector<double> {lvalue},GIMLI::__VectorExpr<double, GIMLI::__VectorBinaryExprOp<double, GIMLI::VectorIterator<double>, GIMLI::VectorIterator<double>, GIMLI::MINUS> >)

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

Assignment operator. Fill the existing vector with val. Shortcut for fill.

C++ signature :

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

beginPyIter((object)arg1) → object :
C++ signature :

GIMLI::VectorIterator<double> beginPyIter(GIMLI::Vector<double> {lvalue})

capacity((object)arg1) → object :
C++ signature :

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

clean((object)arg1) → object :

Fill Vector with 0.0. Dont change size.

C++ signature :

void* clean(GIMLI::Vector<double> {lvalue})

clear((object)arg1) → object :

Empty the vector. Frees memory and resize to 0.

C++ signature :

void* clear(GIMLI::Vector<double> {lvalue})

copy((object)arg1) → object :

Return a deep copy. For numpy compatibility.

C++ signature :

GIMLI::Vector<double> copy(GIMLI::Vector<double> {lvalue})

data((object)arg1) → object :
C++ signature :

double* data(GIMLI::Vector<double> {lvalue})

dtype

alias of builtins.float

empty((object)arg1) → object :
C++ signature :

bool empty(GIMLI::Vector<double> {lvalue})

fill((object)arg1, (object)val) → object :

Fill the whole vector with val.

C++ signature :

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

getVal((object)arg1, (object)i) → object :
Get value for index i.

Throws out of range exception if index check fails.

C++ signature :

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

getVal( (object)arg1, (object)start, (object)end) -> object :

C++ signature :

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

getVal( (object)arg1, (object)pair) -> object :

C++ signature :

GIMLI::Vector<double> getVal(GIMLI::Vector<double> {lvalue},std::pair<unsigned long, long>)

get_((object)arg1, (object)idx) → object :
C++ signature :

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

get_( (object)arg1, (object)idx) -> object :

C++ signature :

GIMLI::Vector<double> get_(GIMLI::Vector<double> {lvalue},std::vector<long, std::allocator<long> >)

get_( (object)arg1, (object)idx) -> object :

C++ signature :

GIMLI::Vector<double> get_(GIMLI::Vector<double> {lvalue},GIMLI::Vector<long>)

hash((object)arg1) → object :
C++ signature :

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

load((object)arg1, (object)filename[, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) → object :

Load the object from file. Returns true on success and in case of trouble an exception is thrown. The IOFormat flag will be overwritten if the filename have a proper file suffix. Ascii format is forced if VECTORASCSUFFIX is given. Binary format is forced if VECTORBINSUFFIX is set. See Vector< ValueType >::save for file format.

C++ signature :

bool load(GIMLI::Vector<double> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

nThreads((object)arg1) → object :
C++ signature :

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

ndim = 1
push_back((object)arg1, (object)v) → object :
C++ signature :

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

reserve((object)arg1, (object)n) → object :

Reserve memory. Old data are preserved

C++ signature :

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

resize((object)arg1, (object)n, (object)fill) → object :

Resize if n differs size() and fill new with val. Old data are preserved.

C++ signature :

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

resize( (object)arg1, (object)n) -> object :

default args lead win64 pygimli segfault .. WTF??

C++ signature :

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

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

Round all values of this array to a given tolerance.

C++ signature :

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

save((object)arg1, (object)filename[, (object)format=pygimli.core._pygimli_.IOFormat.Ascii]) → object :

Save the object to file. Returns true on success and in case of trouble an exception is thrown. The IOFormat flag will be overwritten if the filename have a proper file suffix. Ascii format is forced if VECTORASCSUFFIX is given. Binary format is forced if VECTORBINSUFFIX is set. If no suffix is provided VECTORASCSUFFIX or VECTORBINSUFFIX will be append. nn Binary format is: n Unsigned int64 [8Byte] - length of the Array [0.. length) n ValueType [sizeof(ValueType)] - 0th value n … n ValueType [sizeof(ValueType)] - length -1 value nn Ascii format is a simple list of the values nn param filename string of the file name param IOFormat enum, either Ascii for human readable format, or Binary for fast save and load.

C++ signature :

bool save(GIMLI::Vector<double> {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,GIMLI::IOFormat=pygimli.core._pygimli_.IOFormat.Ascii])

setVal(*args, **kwargs)
singleCalcCount((object)arg1) → object :
C++ signature :

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

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

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

SparseMapMatrix

pygimli.matrix.SparseMapMatrix

alias of pygimli.core._pygimli_.RSparseMapMatrix

SparseMatrix

pygimli.matrix.SparseMatrix

alias of pygimli.core._pygimli_.RSparseMatrix