moment_index.h File Reference
#include <array>
#include <cassert>
#include <cmath>
#include <utility>

Go to the source code of this file.

Namespaces

 Wonton
 Factorize a number N into D equal (or nearly equal) factors.
 

Functions

template<int D>
constexpr int Wonton::moment_to_index (int const order, std::array< int, D > const exponents)
 
template<>
constexpr int Wonton::moment_to_index< 3 > (int const order, std::array< int, 3 > const exponents)
 
template<>
constexpr int Wonton::moment_to_index< 2 > (int const order, std::array< int, 2 > const exponents)
 
template<>
constexpr int Wonton::moment_to_index< 1 > (int const order, std::array< int, 1 > const exponents)
 
template<int D>
constexpr int Wonton::count_moments (int const order)
 
template<>
constexpr int Wonton::count_moments< 3 > (int const order)
 
template<>
constexpr int Wonton::count_moments< 2 > (int const order)
 
template<>
constexpr int Wonton::count_moments< 1 > (int const order)
 
template<int D>
std::pair< int, std::array< int, D > > Wonton::index_to_moment (int const index)
 
template<>
std::pair< int, std::array< int, 3 > > Wonton::index_to_moment< 3 > (int const index)
 
template<>
std::pair< int, std::array< int, 2 > > Wonton::index_to_moment< 2 > (int const index)
 
template<>
std::pair< int, std::array< int, 1 > > Wonton::index_to_moment< 1 > (int const index)