include/it/source_func.h File Reference

#include <it/vec.h>
#include <it/mat.h>

Go to the source code of this file.

Functions

double entropy (vec pdf)
double entropy_markov (mat pt)
double entropy_bin (double p)
ivec histogram (int omega, ivec S)
vec histogram_normalized (int omega, ivec S)
imat histogram_cond (int omega, ivec S)
double source_expectation (vec pdf, vec symbols)
double source_variance (vec pdf, vec symbols)
int is_valid_pdf (vec pdf, double tol)
int is_valid_markov_matrix (mat pt, double tol)
vec markov_marg_pdf (mat pt)


Function Documentation

double entropy ( vec  pdf  ) 

Return the entropy of a memoryless discrete source

Definition at line 33 of file source_func.c.

References vec_length().

Referenced by entropy_markov(), main(), and test_quantizer().

double entropy_bin ( double  p  ) 

Return the entropy of a binary source source

Definition at line 47 of file source_func.c.

References log2.

double entropy_markov ( mat  pt  ) 

Entropy rate of a Markov chain defined by transition matrix pt

Definition at line 80 of file source_func.c.

References entropy(), is_valid_markov_matrix(), it_assert, IT_EPSILON, markov_marg_pdf(), mat_width(), and vec_delete().

ivec histogram ( int  omega,
ivec  S 
)

Return the histogram of the realization S. The source is assumed to take its values between 0 and omega-1

Definition at line 133 of file source_func.c.

References ivec_length(), and ivec_new_zeros().

Referenced by main().

imat histogram_cond ( int  omega,
ivec  S 
)

Return the conditionnal (i.e., bi-dimensional) histogram of a source realization

Definition at line 166 of file source_func.c.

References imat_new_zeros(), and ivec_length().

vec histogram_normalized ( int  omega,
ivec  S 
)

Same as histogram return a normalized histogram, i.e. a pdf

Definition at line 151 of file source_func.c.

References ivec_length(), and vec_new_zeros().

Referenced by main(), and test_quantizer().

int is_valid_markov_matrix ( mat  pt,
double  tol 
)

Check if pt is a valid matrix of transition probabilities (Markov chain)

Definition at line 189 of file source_func.c.

References mat_col_sum(), and mat_width().

Referenced by entropy_markov().

int is_valid_pdf ( vec  pdf,
double  tol 
)

Verify if the input vector is a valid probability density function

Definition at line 179 of file source_func.c.

References vec_sum().

Referenced by source_memoryless(), source_variance(), and vec_distance_kullback_leibler().

vec markov_marg_pdf ( mat  pt  ) 

Return the stationary probability of a Markov chain defined by transition matrix pt

Definition at line 103 of file source_func.c.

References it_error(), mat_clone(), mat_delete(), mat_height(), mat_new_mul(), mat_rows_sum(), mat_width(), vec_normalize(), and vec_null.

Referenced by entropy_markov().

double source_expectation ( vec  pdf,
vec  symbols 
)

Return the expectation of a source defined by the pdf and the symbols values

Definition at line 56 of file source_func.c.

References vec_inner_product(), and vec_length().

Referenced by source_variance().

double source_variance ( vec  pdf,
vec  symbols 
)

Return the variance of a source defined by its pdf and its symbols

Definition at line 65 of file source_func.c.

References is_valid_pdf(), source_expectation(), and vec_length().


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau