UQTk: Uncertainty Quantification Toolkit 3.1.5
|
Tools that deal with integer multiindices. More...
#include <math.h>
#include <assert.h>
#include "gen_defs.h"
#include "tools.h"
#include "arraytools.h"
Functions | |
int | computeNPCTerms (int ndim, int norder) |
Computes the number of PC basis terms for Total-Order truncation with a given dimensionality and order. | |
int | computeMultiIndex (int ndim, int norder, Array2D< int > &mi) |
Computes the multiindex set of a PC basis for Total-Order truncation with a given dimensionality and order Also, returns the number of terms. | |
int | computeMultiIndexT (int ndim, int norder, int *mi) |
Computes the multiindex set of a PC basis for Total-Order truncation with a given dimensionality and order Also, returns the number of terms. Note that here, the multiindex array pointer stores indices in column-major format, i.e. mi[j*ndim+i] holds the j-th index for dimension i. | |
int | computeMultiIndex (int ndim, int norder, Array2D< int > &mi, string ordtype) |
Computes the multiindex set of a PC basis for Total-Order truncation with a given dimensionality and order Also, returns the number of terms. | |
int | computeMultiIndexTP (Array1D< int > &maxorders, Array2D< int > &mindex) |
Computes the multiindex set of a PC basis for Tensor-Product truncation with a given maximum order per dimensionality Also, returns the number of terms. | |
int | computeNPCTermsHDMR (int ndim, Array1D< int > &maxorders) |
Computes the number of PC basis terms for HDMR truncation with a given dimensionality and maxorders array that contains maximal orders per interaction dimensionalities. | |
int | computeMultiIndexHDMR (int ndim, Array1D< int > &maxorders, Array2D< int > &mindex) |
Computes the multiindex set of a PC basis for HDMR truncation with a given dimensionality and maxorders array that contains maximal orders per interaction dimensionalities. | |
void | decodeMindex (Array1D< Array2D< int > > &sp_mindex, int ndim, Array2D< int > &mindex) |
Decode a multiindex set from a sparse format to a regular format. | |
bool | is_admis (Array1D< int > &mindex_try, Array2D< int > &mindex) |
A boolean check to see if a new basis term is admissible or not. | |
void | upOrder (Array2D< int > &mindex, Array2D< int > &new_mindex) |
Given a multiindex set it computes a new multiindex set where only 'admissible' bases are added. | |
void | getOrders (Array2D< int > &mindex, Array1D< int > &orders) |
Given a multiindex set, it returns the orders of each basis term. | |
int | get_invmindex (Array1D< int > mi) |
Given a single multiindex, this returns its relative position in the total-order multiindex set. | |
int | get_invmindex_ord (Array1D< int > mi) |
Given a single multiindex, this returns its relative position in the total-order multiindex set among the bases of the same order. | |
Tools that deal with integer multiindices.
int computeMultiIndex | ( | int | ndim, |
int | norder, | ||
Array2D< int > & | mi ) |
Computes the multiindex set of a PC basis for Total-Order truncation with a given dimensionality and order Also, returns the number of terms.
int computeMultiIndex | ( | int | ndim, |
int | norder, | ||
Array2D< int > & | mi, | ||
string | ordtype ) |
Computes the multiindex set of a PC basis for Total-Order truncation with a given dimensionality and order Also, returns the number of terms.
Computes the multiindex set of a PC basis for HDMR truncation with a given dimensionality and maxorders array that contains maximal orders per interaction dimensionalities.
int computeMultiIndexT | ( | int | ndim, |
int | norder, | ||
int * | mi ) |
Computes the multiindex set of a PC basis for Total-Order truncation with a given dimensionality and order Also, returns the number of terms. Note that here, the multiindex array pointer stores indices in column-major format, i.e. mi[j*ndim+i] holds the j-th index for dimension i.
Computes the multiindex set of a PC basis for Tensor-Product truncation with a given maximum order per dimensionality Also, returns the number of terms.
int computeNPCTerms | ( | int | ndim, |
int | norder ) |
Computes the number of PC basis terms for Total-Order truncation with a given dimensionality and order.
int computeNPCTermsHDMR | ( | int | ndim, |
Array1D< int > & | maxorders ) |
Computes the number of PC basis terms for HDMR truncation with a given dimensionality and maxorders array that contains maximal orders per interaction dimensionalities.
int get_invmindex | ( | Array1D< int > | mi | ) |
Given a single multiindex, this returns its relative position in the total-order multiindex set.
int get_invmindex_ord | ( | Array1D< int > | mi | ) |
Given a single multiindex, this returns its relative position in the total-order multiindex set among the bases of the same order.
Given a multiindex set, it returns the orders of each basis term.
A boolean check to see if a new basis term is admissible or not.
Given a multiindex set it computes a new multiindex set where only 'admissible' bases are added.