WaveBlocksND
Classes | Typedefs | Functions
waveblocks::math Namespace Reference

Classes

class  ContinuousSqrt
 This class deals with the issue, that the square root of complex numbers is not unique. More...
 
class  KahanSum
 The Kahan's algorithm achieves O(1) error growth for summing N numbers. More...
 

Typedefs

template<int D>
using partition_t = std::array< int, D >
 
template<int D>
using partitions_t = std::list< partition_t< D >>
 
template<int D>
using point_t = std::array< int, D >
 
template<int D>
using latticepoints_t = std::list< point_t< D >>
 
template<int D>
using permutation_t = std::array< int, D >
 
template<int D>
using permutations_t = std::list< permutation_t< D >>
 

Functions

template<int D>
int sum (const point_t< D > Z)
 Sum of the components of the point Z. More...
 
template<int D>
int nz (const point_t< D > Z)
 
template<int D>
int nnz (const point_t< D > Z)
 
template<int D>
partitions_t< D > partitions (const int K)
 
template<int D>
latticepoints_t< D > lattice_points (const int N)
 
template<int D>
permutations_t< D > permutations (const permutation_t< D > permutation)
 
template<class T >
constexpr T pi ()
 

Typedef Documentation

template<int D>
using waveblocks::math::latticepoints_t = typedef std::list<point_t<D>>
template<int D>
using waveblocks::math::partition_t = typedef std::array<int, D>
template<int D>
using waveblocks::math::partitions_t = typedef std::list<partition_t<D>>
template<int D>
using waveblocks::math::permutation_t = typedef std::array<int, D>
template<int D>
using waveblocks::math::permutations_t = typedef std::list<permutation_t<D>>
template<int D>
using waveblocks::math::point_t = typedef std::array<int, D>

Function Documentation

template<int D>
latticepoints_t<D> waveblocks::math::lattice_points ( const int  N)

This method enumerates all lattice points of a lattice \(\Lambda \subset \mathbb{N}^D\) in \(D\) dimensions having fixed \(l_1\) norm \(N\).

Parameters
NThe \(l_1\) norm of the lattice points.
template<int D>
int waveblocks::math::nnz ( const point_t< D >  Z)

Number of non-zero components of the point Z.

template<int D>
int waveblocks::math::nz ( const point_t< D >  Z)

Number of zero components of the point Z.

template<int D>
partitions_t<D> waveblocks::math::partitions ( const int  K)

Enumerate integer partitions in anti-lexocographic order for integers up to some limit K. All partitions have exactly D parts, some may be zero.

Parameters
KThe Level
template<int D>
permutations_t<D> waveblocks::math::permutations ( const permutation_t< D >  permutation)

Enumerate all permutations in anti-lexicographical order follwing the given permutation \(P\).

Parameters
permutationA permutation.
template<class T >
constexpr T waveblocks::math::pi ( )
template<int D>
int waveblocks::math::sum ( const point_t< D >  Z)

Sum of the components of the point Z.