Epstein Zeta Library 0.6.2
Calculates the Epstein Zeta function
Loading...
Searching...
No Matches
Functions
tools.h File Reference

Minimal linear algebra for matrix vector and multi-index operations. More...

#include <complex.h>
#include <stdbool.h>
Include dependency graph for tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

unsigned int mult_abs (unsigned int dim, const unsigned int *alpha)
 Compute absolute value of multi-index, that is the sum of its components.
 
unsigned long long binom (unsigned long long n, unsigned long long k)
 Compute the binomial coefficient bionm(n,k).
 
void transpose (unsigned int dim, double *m)
 square matrix transpose.
 
bool equals (unsigned int dim, const double *v1, const double *v2)
 check if two vectors are equal.
 
void invert (unsigned int dim, double *m, int *p, double *r)
 Invert matrix.
 
double inf_norm (unsigned int dim, const double *m)
 Compute infinity norm (maximum sum row norm).
 
double * vectorProj (unsigned int dim, const double *m, const double *m_invt, const double *v)
 calculate projection of vector to elementary lattice cell.
 

Detailed Description

Minimal linear algebra for matrix vector and multi-index operations.

Function Documentation

◆ binom()

unsigned long long binom ( unsigned long long n,
unsigned long long k )

Compute the binomial coefficient bionm(n,k).

Parameters
[in]nnon-negative integer greater or equal k.
[in]knon-negative integer smaller or equal n.
Returns
binom(n)(k).

◆ equals()

bool equals ( unsigned int dim,
const double * v1,
const double * v2 )

check if two vectors are equal.

Parameters
[in]dimdimension of the vectors.
[in]v1first vector.
[in]v2second vector.
Returns
true if the vectors are equal, false if the vectors are not equal.

check if two vectors are equal.

Parameters
[in]dimdimension of the vectors.
[in]v1first vector.
[in]v2second vector.
Returns
true if the vectors are equal, false if the vectors are not equal.

◆ inf_norm()

double inf_norm ( unsigned int dim,
const double * m )

Compute infinity norm (maximum sum row norm).

Parameters
[in]dimdimension of the vectors.
[in]mmatrix to compute infinity norm of.

◆ invert()

void invert ( unsigned int dim,
double * m,
int * p,
double * r )

Invert matrix.

Parameters
[in]dimdimension of the vectors.
[in,out]mmatrix to invert. overwritten bei LU-decomposition.
[out]ppermutation vector.
[out]rwhere inverse matrix is stored.
Precondition
dim > 0
Parameters
[in]dimdimension of the vectors.
[in,out]mmatrix to invert. overwritten bei LU-decomposition.
[out]ppermutation vector.
[out]rwhere inverse matrix is stored.

◆ mult_abs()

unsigned int mult_abs ( unsigned int dim,
const unsigned int * alpha )

Compute absolute value of multi-index, that is the sum of its components.

Parameters
[in]dimdimension of alpha end vec.
[in]alphamulti-index.
Returns
absolute values of alpha.
absolute values of alpha.

◆ transpose()

void transpose ( unsigned int dim,
double * m )

square matrix transpose.

Parameters
[in]dimdimension of the square matrix.
[in,out]msquare matrix.

square matrix transpose.

Parameters
[in]dimdimension of the square matrix.
[in,out]msquare matrix.

◆ vectorProj()

double * vectorProj ( unsigned int dim,
const double * m,
const double * m_invt,
const double * v )

calculate projection of vector to elementary lattice cell.

Parameters
[in]dimdimension of the input vectors
[in]mmatrix that transforms the lattice in the function.
[in]m_invtinverse of m.
[in]vvector for which the projection to the elementary lattice cell is needet.
Returns
projection of v to the elementary lattice cell.