#include <divergence.h>
Public Methods | |
Divergence (int nb_dimensions) | |
Constructor : Memory allocation. | |
virtual | ~Divergence () |
Destructor : Memory desallocation. | |
void | Initialise (float **C_A, float **C_B, float *M_A, float *M_B) |
Initialisation with 2 Gaussian Distributions. More... | |
int | BoundResolution_Calculation (float *min_bound, float *max_bound, float *resolution, float PrecisionFactor) |
Calculation of the integration resolution and the integration bounds. More... | |
void | InvertCovMatrix () |
Inversion of the covariance matrices using a LU decomposition. | |
float | MeanDifference () |
Rough approximation of Kullback-Leibler distance by Mean vector difference. | |
float | Divergence2GaussModel (float *min_bound, float *max_bound, float *resolution, float weight) |
Global method for calculating the ratio of a divergence integration (between a MT and a TL cluster) and the quantity of pixel belonging to the intersection of the MT and TL spatial classes. More... | |
Private Methods | |
float | Div_MultiDimFunc (float x, float y, float z) |
analytical function to integrate. More... | |
void | BoundCalculus (float *pas, float *resolution) |
Method to fix the portion of the integration domain to integrate. | |
float | Integration () |
Integration of a part of the integrable domain. More... | |
float | f1 (float x) |
recursive funtions. The 3D function is defined with recursive functions. More... | |
float | f2 (float y) |
recursive funtions. The 3D function is defined with recursive functions. More... | |
float | f3 (float z) |
recursive funtions. The 3D function is defined with recursive functions. More... | |
float | Qgaus (float(Divergence::*func)(float), float a, float b) |
Function approximating the integral with Gaussian smoothing. More... | |
Private Attributes | |
float * | MeanA |
mean vector A. | |
float * | MeanB |
mean vector B. | |
float ** | CovA |
covariance matrix A. | |
float ** | CovB |
covariance matrix B. | |
float ** | InvCovA |
Inverse covariance matrix A. | |
float ** | InvCovB |
Inverse covariance matrix B. | |
float * | a |
Max bound for integration. | |
float * | b |
Min bound for integration. | |
float | xsav |
auxiliary variable for integration calculus. | |
float | ysav |
auxiliary variable for integration calculus. | |
float | determinantA |
Inverse covariance matrix determinant. | |
float | determinantB |
Inverse covariance matrix determinant. | |
int | nb_dim |
Dimensionnality of the distribution (implemented for 3 dim only). | |
int | nb_Gdim |
number of dimension with a distribution different from a Dirac. |
Definition at line 13 of file divergence.h.
|
Calculation of the integration resolution and the integration bounds.
For each band, the integration resolution is proportional to the smallest value in the diagonal of the 2 different covariance matrices
Definition at line 257 of file divergence.cpp. |
|
analytical function to integrate. The function is the kullback-Leibler divergence with 2 Gaussians. Definition at line 169 of file divergence.cpp. |
|
Global method for calculating the ratio of a divergence integration (between a MT and a TL cluster) and the quantity of pixel belonging to the intersection of the MT and TL spatial classes.
The global integration in the 3D space is decomposed. We partition the 3D integration domain into small "cubes", sized according to the previously calculated resolution. All the cube contributions are added to form the global divergence value.
Definition at line 335 of file divergence.cpp. |
|
recursive funtions. The 3D function is defined with recursive functions. This recursive integration method is inspired from the numerical recepies book. Definition at line 235 of file divergence.cpp. |
|
recursive funtions. The 3D function is defined with recursive functions. This recursive integration method is inspired from the numerical recepies book. Definition at line 240 of file divergence.cpp. |
|
recursive funtions. The 3D function is defined with recursive functions. This recursive integration method is inspired from the numerical recepies book. Definition at line 245 of file divergence.cpp. |
|
Initialisation with 2 Gaussian Distributions. The components of the multivariate Gaussian distribution which are too narrow are moved to the last dimensions of the covariance matrix. A variable saves the number of dimension presenting a too narrow marginal Gaussian distribution.In this case, the divergence will be equal to a simple multiplication. Definition at line 48 of file divergence.cpp. |
|
Integration of a part of the integrable domain. The divergence is performed by an analytical integration using a Gaussian approximation. This recursive integration method is inspired from the numerical recepies book.
Definition at line 227 of file divergence.cpp. |
|
Function approximating the integral with Gaussian smoothing. This integration method is inspired from the numerical recepies book. Definition at line 206 of file divergence.cpp. |