|
UQTk: Uncertainty Quantification Toolkit 3.1.5
|
Tools to evaluate combinatorial quantities. More...
#include "Array1D.h"#include "Array2D.h"#include "gen_defs.h"#include "probability.h"#include "combin.h"#include <math.h>#include <float.h>#include "error_handlers.h"Macros | |
| #define | STOP 1.0e-8 |
| #define | TINY 1.0e-30 |
Functions | |
| int | choose (int n, int k) |
| Calculates binomial coefficient C(n,k): n-choose-k. | |
| int | factorial (int number) |
| Calculates the factorial of a number. | |
| double | logfactorial (int number) |
| Calculates the logfactorial of a number. | |
| void | chooseComb (int n, int k, Array2D< int > &fullInd) |
| Computes all possible k-combinations of the first n non-negative integers and returns them in fullInd. | |
| void | get_perm (Array1D< int > &perm, int seed) |
| Computes a random permutation of the first n non-negative integers and returns is in perm. | |
| void | get_perm (int nn, int *perm, int seed) |
| Computes a random permutation of the first n non-negative integers and returns is in perm | |
| double | gammai (const double p, const double x) |
| Compute the incomplete Gamma function with parameter a at point x. | |
| double | beta (const double z, const double w) |
| Compute the Beta function at the point pair (z,w) | |
| double | betai (double a, double b, double x) |
| Compute the incomplete Beta function with parameters a and b at point x. | |
| double | digama (double x) |
| Computes the digamma, or psi, function, i.e. derivative of the logarithm of gamma function. | |
| void | clust (Array2D< double > &data_in, Array1D< double > &w, int ncl, Array1D< int > &numData, int *pClusterIndex) |
| K-center clustering of data. | |
| double | clust_best (Array2D< double > &data_in, Array1D< double > &w, int ncl, Array1D< int > &bestnumData, int *bestClusterIndex, int ntry) |
| Multiple trials of K-center clustering and picking the best one according to explained variance criterion. | |
| int | findNumCl (Array2D< double > &data_in, Array1D< double > &w, int ntry) |
| Find the best number of clusters in a dataset according to one of three (hardcoded) criteria. | |
Tools to evaluate combinatorial quantities.
| #define STOP 1.0e-8 |
| #define TINY 1.0e-30 |
| double beta | ( | const double | z, |
| const double | w ) |
Compute the Beta function at the point pair (z,w)
| double betai | ( | const double | p, |
| const double | q, | ||
| const double | x ) |
Compute the incomplete Beta function with parameters a and b at point x.
| int choose | ( | int | n, |
| int | k ) |
Calculates binomial coefficient C(n,k): n-choose-k.
| void chooseComb | ( | int | n, |
| int | k, | ||
| Array2D< int > & | fullInd ) |
Computes all possible k-combinations of the first n non-negative integers and returns them in fullInd.
| void clust | ( | Array2D< double > & | data_in, |
| Array1D< double > & | w, | ||
| int | ncl, | ||
| Array1D< int > & | numData, | ||
| int * | pClusterIndex ) |
K-center clustering of data.
| [in] | data_in | : Nxd matrix of data |
| [in] | w | : Array of size d; dimension-wise scaling weights |
| [in] | ncl | : Number of clusters |
| [out] | numData | : Array of size ncl; stores the number of elements for each cluster |
| [out] | pClusterIndex | : Array of size N indicating the cluster index for each data point |
| double clust_best | ( | Array2D< double > & | data_in, |
| Array1D< double > & | w, | ||
| int | ncl, | ||
| Array1D< int > & | bestnumData, | ||
| int * | bestClusterIndex, | ||
| int | ntry ) |
Multiple trials of K-center clustering and picking the best one according to explained variance criterion.
| double digama | ( | double | x | ) |
Computes the digamma, or psi, function, i.e. derivative of the logarithm of gamma function.
| int factorial | ( | int | number | ) |
Calculates the factorial of a number.
Find the best number of clusters in a dataset according to one of three (hardcoded) criteria.
| double gammai | ( | const double | a, |
| const double | x ) |
Compute the incomplete Gamma function with parameter a at point x.
| void get_perm | ( | Array1D< int > & | perm, |
| int | seed ) |
Computes a random permutation of the first n non-negative integers and returns is in perm.
| void get_perm | ( | int | nn, |
| int * | perm, | ||
| int | seed ) |
Computes a random permutation of the first n non-negative integers and returns is in perm
| double logfactorial | ( | int | number | ) |
Calculates the logfactorial of a number.