pygimli.math

Collection of mathematical functions.

Overview

Functions

angle(p1, p2, p3)

C++ signature :

besselI0(x)

Caluculate modified Bessel function of the first kind See Abramowitz: Handbook of math.

besselI1(x)

Caluculate modified Bessel function of the first kind See Abramowitz: Handbook of math.

besselK0(x)

Caluculate modified Bessel function of the second kind See Abramowitz: Handbook of math.

besselK1(x)

Caluculate modified Bessel function of the second kind See Abramowitz: Handbook of math.

cos(a)

C++ signature :

cot(a)

C++ signature :

det(A)

Return determinant for Matrix A.

dot(v1, v2)

C++ signature :

exp(a)

C++ signature :

exp10(a)

C++ signature :

imag(A)

C++ signature :

log(a)

C++ signature :

log10(a)

C++ signature :

max(v)

C++ signature :

median(a)

C++ signature :

min(v)

C++ signature :

pow(v, npower)

C++ signature :

rand(vec [[, min, max])

C++ signature :

randn(vec)

C++ signature :

real(A)

C++ signature :

rms(a)

C++ signature :

round(v, tol)

C++ signature :

rrms(a, b)

C++ signature :

sign(a)

C++ signature :

sin(a)

C++ signature :

sqrt(a)

C++ signature :

sum(c)

Templates argue with python bindings

toComplex(re, im)

C++ signature :

unique(a)

C++ signature :

Functions

angle

pygimli.math.angle((object)p1, (object)p2, (object)p3) → object :
C++ signature :

double angle(GIMLI::Pos,GIMLI::Pos,GIMLI::Pos)

angle( (object)z) -> object :

C++ signature :

GIMLI::Vector<double> angle(GIMLI::Vector<std::complex<double> >)

angle( (object)b, (object)a) -> object :

C++ signature :

GIMLI::Vector<double> angle(GIMLI::Vector<double>,GIMLI::Vector<double>)

besselI0

pygimli.math.besselI0((object)x) → object :

Caluculate modified Bessel function of the first kind See Abramowitz: Handbook of math. functions; DLLEXPORT double besselI0(double x);

C++ signature :

double besselI0(double)

besselI1

pygimli.math.besselI1((object)x) → object :

Caluculate modified Bessel function of the first kind See Abramowitz: Handbook of math. functions DLLEXPORT double besselI1(double x);

C++ signature :

double besselI1(double)

besselK0

pygimli.math.besselK0((object)x) → object :

Caluculate modified Bessel function of the second kind See Abramowitz: Handbook of math. functions DLLEXPORT double besselK0(double x);

C++ signature :

double besselK0(double)

Examples using pygimli.math.besselK0

besselK1

pygimli.math.besselK1((object)x) → object :

Caluculate modified Bessel function of the second kind See Abramowitz: Handbook of math. functions DLLEXPORT double besselK1(double x);

C++ signature :

double besselK1(double)

Examples using pygimli.math.besselK1

cos

pygimli.math.cos((object)a) → object :
C++ signature :

GIMLI::Vector<double> cos(GIMLI::Vector<double>)

cot

pygimli.math.cot((object)a) → object :
C++ signature :

GIMLI::Vector<double> cot(GIMLI::Vector<double>)

cot( (object)a) -> object :

C++ signature :

double cot(double)

det

pygimli.math.det((object)A) → object :

Return determinant for Matrix A. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

C++ signature :

double det(GIMLI::Matrix3<double>)

det( (object)A) -> object :

Return determinant for Matrix A. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

C++ signature :

double det(GIMLI::Matrix<double>)

det( (object)A) -> object :

Return determinant for Matrix A. This function is a stub. Only Matrix dimensions of 2 and 3 are considered.

C++ signature :

double det(GIMLI::Matrix3<double>)

dot

pygimli.math.dot((object)v1, (object)v2) → object :
C++ signature :

double dot(GIMLI::Vector<double>,GIMLI::Vector<double>)

exp

pygimli.math.exp((object)a) → object :
C++ signature :

GIMLI::Vector<double> exp(GIMLI::Vector<double>)

exp10

pygimli.math.exp10((object)a) → object :
C++ signature :

GIMLI::Vector<double> exp10(GIMLI::Vector<double>)

exp10( (object)a) -> object :

C++ signature :

double exp10(double)

imag

pygimli.math.imag((object)A) → object :
C++ signature :

GIMLI::SparseMapMatrix<double, unsigned long> imag(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

imag( (object)A) -> object :

C++ signature :

GIMLI::SparseMatrix<double> imag(GIMLI::SparseMatrix<std::complex<double> >)

imag( (object)cv) -> object :

C++ signature :

GIMLI::Matrix<double> imag(GIMLI::Matrix<std::complex<double> >)

imag( (object)A) -> object :

C++ signature :

GIMLI::Matrix<double> imag(GIMLI::Matrix<std::complex<double> >)

imag( (object)cv) -> object :

C++ signature :

GIMLI::Vector<double> imag(GIMLI::Vector<std::complex<double> >)

log

pygimli.math.log((object)a) → object :
C++ signature :

GIMLI::Vector<double> log(GIMLI::Vector<double>)

log( (object)type, (object)msg) -> object :

C++ signature :

void* log(GIMLI::LogType,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

log10

pygimli.math.log10((object)a) → object :
C++ signature :

GIMLI::Vector<double> log10(GIMLI::Vector<double>)

max

pygimli.math.max((object)v) → object :
C++ signature :

int max(std::vector<int, std::allocator<int> >)

max( (object)v) -> object :

C++ signature :

std::complex<double> max(GIMLI::Vector<std::complex<double> >)

max( (object)v) -> object :

C++ signature :

unsigned long max(GIMLI::Vector<unsigned long>)

max( (object)v) -> object :

C++ signature :

double max(GIMLI::Vector<double>)

max( (object)a, (object)b) -> object :

C++ signature :

int max(int,unsigned long)

max( (object)a, (object)b) -> object :

C++ signature :

unsigned long max(unsigned long,unsigned long)

max( (object)a, (object)b) -> object :

C++ signature :

double max(double,double)

median

pygimli.math.median((object)a) → object :
C++ signature :

double median(GIMLI::Vector<double>)

min

pygimli.math.min((object)v) → object :
C++ signature :

std::complex<double> min(GIMLI::Vector<std::complex<double> >)

min( (object)v) -> object :

C++ signature :

double min(GIMLI::Vector<double>)

min( (object)a, (object)b) -> object :

C++ signature :

unsigned long min(unsigned long,unsigned long)

min( (object)a, (object)b) -> object :

C++ signature :

double min(double,double)

pow

pygimli.math.pow((object)v, (object)npower) → object :
C++ signature :

GIMLI::Vector<double> pow(GIMLI::Vector<double>,GIMLI::Vector<double>)

pow( (object)v, (object)npower) -> object :

C++ signature :

GIMLI::Vector<double> pow(GIMLI::Vector<double>,double)

pow( (object)v, (object)npower) -> object :

no template < int|double > since castxml interprets it as pow(vec,vec(int))

C++ signature :

GIMLI::Vector<double> pow(GIMLI::Vector<double>,int)

Examples using pygimli.math.pow

rand

pygimli.math.rand((object)vec[, (object)min=0.0[, (object)max=1.0]]) → object :
C++ signature :

void* rand(GIMLI::Vector<double> {lvalue} [,double=0.0 [,double=1.0]])

randn

pygimli.math.randn((object)vec) → object :
C++ signature :

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

randn( (object)n) -> object :

Create a array of len n with normal distributed randomized values.

C++ signature :

GIMLI::Vector<double> randn(unsigned long)

real

pygimli.math.real((object)A) → object :
C++ signature :

GIMLI::SparseMapMatrix<double, unsigned long> real(GIMLI::SparseMapMatrix<std::complex<double>, unsigned long>)

real( (object)A) -> object :

C++ signature :

GIMLI::SparseMatrix<double> real(GIMLI::SparseMatrix<std::complex<double> >)

real( (object)cv) -> object :

C++ signature :

GIMLI::Matrix<double> real(GIMLI::Matrix<std::complex<double> >)

real( (object)A) -> object :

C++ signature :

GIMLI::Matrix<double> real(GIMLI::Matrix<std::complex<double> >)

real( (object)cv) -> object :

C++ signature :

GIMLI::Vector<double> real(GIMLI::Vector<std::complex<double> >)

rms

pygimli.math.rms((object)a) → object :
C++ signature :

double rms(GIMLI::Vector<double>)

rms( (object)a, (object)b) -> object :

C++ signature :

double rms(GIMLI::Vector<double>,GIMLI::Vector<double>)

round

pygimli.math.round((object)v, (object)tol) → object :
C++ signature :

GIMLI::Vector<double> round(GIMLI::Vector<double>,double)

rrms

pygimli.math.rrms((object)a, (object)b) → object :
C++ signature :

double rrms(GIMLI::Vector<double>,GIMLI::Vector<double>)

sign

pygimli.math.sign((object)a) → object :
C++ signature :

GIMLI::Vector<double> sign(GIMLI::Vector<double>)

sign( (object)a) -> object :

C++ signature :

double sign(double)

sin

pygimli.math.sin((object)a) → object :
C++ signature :

GIMLI::Vector<double> sin(GIMLI::Vector<double>)

sqrt

pygimli.math.sqrt((object)a) → object :
C++ signature :

GIMLI::Vector<double> sqrt(GIMLI::Vector<double>)

sum

pygimli.math.sum((object)c) → object :

Templates argue with python bindings

C++ signature :

std::complex<double> sum(GIMLI::Vector<std::complex<double> >)

sum( (object)r) -> object :

C++ signature :

double sum(GIMLI::Vector<double>)

sum( (object)i) -> object :

C++ signature :

long sum(GIMLI::Vector<long>)

toComplex

pygimli.math.toComplex((object)re, (object)im) → object :
C++ signature :

GIMLI::Vector<std::complex<double> > toComplex(GIMLI::Vector<double>,GIMLI::Vector<double>)

toComplex( (object)re [, (object)im=0.0]) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > toComplex(GIMLI::Vector<double> [,double=0.0])

toComplex( (object)re, (object)im) -> object :

C++ signature :

GIMLI::Vector<std::complex<double> > toComplex(double,GIMLI::Vector<double>)

unique

pygimli.math.unique((object)a) → object :
C++ signature :

std::vector<long, std::allocator<long> > unique(std::vector<long, std::allocator<long> >)

unique( (object)a) -> object :

Returning a copy of the vector and replacing all consecutive occurrences of a value by a single instance of that value. e.g. [0 1 1 2 1 1] -> [0 1 2 1]. To remove all double values from the vector use an additionally sorting. e.g. unique(sort(v)) gets you [0 1 2].

C++ signature :

GIMLI::Vector<double> unique(GIMLI::Vector<double>)

unique( (object)a) -> object :

Returning a copy of the vector and replacing all consecutive occurrences of a value by a single instance of that value. e.g. [0 1 1 2 1 1] -> [0 1 2 1]. To remove all double values from the vector use an additionally sorting. e.g. unique(sort(v)) gets you [0 1 2].

C++ signature :

GIMLI::Vector<long> unique(GIMLI::Vector<long>)