KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions
prob_util.h File Reference

Various utility functions for probabiliity-related stuff. More...

#include <iterator>
#include <algorithm>
#include <cmath>

Go to the source code of this file.

Namespaces

 kjb
 Classes and functions for dealing with trajectory files.
 

Functions

double kjb::log_sum (double n1, double n2)
 
double kjb::log_sum (double n1, double n2, double n3)
 
template<class Iterator >
double kjb::log_sum (Iterator first, Iterator last)
 
double kjb::log_diff (double n1, double n2)
 
Vector kjb::log_normalize (const Vector &vec)
 normalize a probability vector in log space More...
 
Vector kjb::exponentiate (const Vector &vec)
 elementwise exponentiate a vector without normalizing More...
 
Vector kjb::log_normalize_and_exponentiate (const Vector &vec)
 normalize and exponentiate a vector of unnormalized log probabilities More...
 
Matrix kjb::log_normalize_rows (const Matrix &mat)
 normalize the rows of a stochastic matrix in log space More...
 
Matrix kjb::log_normalize_and_exponentiate (const Matrix &mat)
 row-wise normalize and exponentiate a matrix of log probabilities More...
 
Vector kjb::log_marginalize_over_cols (const Matrix &mat)
 marginalize down the columns of a matrix of log probabilities More...
 
Vector kjb::log_marginalize_over_rows (const Matrix &mat)
 marginalize across the rows of a matrix of log probabilities More...
 

Detailed Description

Various utility functions for probabiliity-related stuff.

Author
Ernesto Brau