Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
bsta_joint_histogram< T > Class Template Reference

#include <bsta_joint_histogram.h>

Inheritance diagram for bsta_joint_histogram< T >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  bsta_joint_hist_type { HIST_TYPE_UNKNOWN = 0, HIST_TYPE_FLOAT = 1, HIST_TYPE_DOUBLE = 2, HIST_TYPE_END = 3 }

Public Member Functions

 bsta_joint_histogram ()
 bsta_joint_histogram (const T range, const unsigned int nbins, const T min_prob=0.0)
 bsta_joint_histogram (const T range_a, const unsigned int nbins_a, const T range_b, const unsigned int nbins_b, const T min_prob=0.0)
 bsta_joint_histogram (const T min_a, const T max_a, const unsigned int nbins_a, const T min_b, const T max_b, const unsigned int nbins_b, const T min_prob=0.0)
 More general constructor defining a signed value range.
 ~bsta_joint_histogram ()
unsigned int nbins () const
 legacy use where a and b have the same bin granularity.
unsigned int nbins_a () const
 number of bins for variable a.
unsigned int nbins_b () const
 number of bins for variable b.
range () const
 legacy use where a and b have the same range.
range_a () const
 range for variable a.
range_b () const
 range for variable b.
min_a () const
 min value for variable a.
max_a () const
 max value for variable a.
min_b () const
 min value for variable b.
max_b () const
 max value for variable b.
delta_a () const
 delta value for variable a.
delta_b () const
 delta value for variable b.
min_prob () const
vbl_array_2d< T > counts () const
void upcount (T a, T mag_a, T b, T mag_b)
void parzen (const T sigma)
p (unsigned int a, unsigned int b) const
 access by bin index.
p (T a, T b) const
 access by value.
volume () const
entropy () const
mutual_information () const
renyi_entropy () const
entropy_marginal_a () const
void print (vcl_ostream &os=vcl_cout) const
bool avg_and_variance_bin_for_row_a (const unsigned int a, T &avg, T &var) const
 The average and variance bin value for row a using counts to compute probs.
void set_count (unsigned r, unsigned c, T cnt)
get_count (unsigned r, unsigned c) const
 access by index.
get_count (T a, T b) const
 access by value.
void print_to_vrml (vcl_ostream &os) const
void print_to_m (vcl_ostream &os) const
void print_to_text (vcl_ostream &os) const
void clear ()
 restore to default constructor state.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Public Attributes

bsta_joint_hist_type type_

Private Member Functions

void compute_volume () const

Private Attributes

bool volume_valid_
volume_
unsigned int nbins_a_
unsigned int nbins_b_
range_a_
range_b_
delta_a_
delta_b_
min_a_
max_a_
min_b_
max_b_
min_prob_
vbl_array_2d< T > counts_

Detailed Description

template<class T>
class bsta_joint_histogram< T >

Definition at line 24 of file bsta_joint_histogram.h.


Member Enumeration Documentation

Enumerator:
HIST_TYPE_UNKNOWN 
HIST_TYPE_FLOAT 
HIST_TYPE_DOUBLE 
HIST_TYPE_END 

Definition at line 17 of file bsta_joint_histogram_base.h.


Constructor & Destructor Documentation

template<class T >
bsta_joint_histogram< T >::bsta_joint_histogram ( )

Definition at line 12 of file bsta_joint_histogram.txx.

template<class T >
bsta_joint_histogram< T >::bsta_joint_histogram ( const T  range,
const unsigned int  nbins,
const T  min_prob = 0.0 
)

Definition at line 26 of file bsta_joint_histogram.txx.

template<class T >
bsta_joint_histogram< T >::bsta_joint_histogram ( const T  range_a,
const unsigned int  nbins_a,
const T  range_b,
const unsigned int  nbins_b,
const T  min_prob = 0.0 
)

Definition at line 43 of file bsta_joint_histogram.txx.

template<class T >
bsta_joint_histogram< T >::bsta_joint_histogram ( const T  min_a,
const T  max_a,
const unsigned int  nbins_a,
const T  min_b,
const T  max_b,
const unsigned int  nbins_b,
const T  min_prob = 0.0 
)

More general constructor defining a signed value range.

Definition at line 62 of file bsta_joint_histogram.txx.

template<class T>
bsta_joint_histogram< T >::~bsta_joint_histogram ( ) [inline]

Definition at line 42 of file bsta_joint_histogram.h.


Member Function Documentation

template<class T >
bool bsta_joint_histogram< T >::avg_and_variance_bin_for_row_a ( const unsigned int  a,
T &  avg,
T &  var 
) const

The average and variance bin value for row a using counts to compute probs.

T avg_and_variance_bin_for_row_a(const unsigned int a) const;

Definition at line 176 of file bsta_joint_histogram.txx.

template<class T >
void bsta_joint_histogram< T >::clear ( )

restore to default constructor state.

Definition at line 315 of file bsta_joint_histogram.txx.

template<class T >
void bsta_joint_histogram< T >::compute_volume ( ) const [private]

Definition at line 118 of file bsta_joint_histogram.txx.

template<class T>
vbl_array_2d<T> bsta_joint_histogram< T >::counts ( ) const [inline]

Definition at line 74 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::delta_a ( ) const [inline]

delta value for variable a.

Definition at line 68 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::delta_b ( ) const [inline]

delta value for variable b.

Definition at line 70 of file bsta_joint_histogram.h.

template<class T >
T bsta_joint_histogram< T >::entropy ( ) const

Definition at line 210 of file bsta_joint_histogram.txx.

template<class T >
T bsta_joint_histogram< T >::entropy_marginal_a ( ) const

Definition at line 266 of file bsta_joint_histogram.txx.

template<class T>
T bsta_joint_histogram< T >::get_count ( unsigned  r,
unsigned  c 
) const [inline]

access by index.

Definition at line 104 of file bsta_joint_histogram.h.

template<class T >
T bsta_joint_histogram< T >::get_count ( a,
b 
) const

access by value.

Definition at line 306 of file bsta_joint_histogram.txx.

template<class T>
T bsta_joint_histogram< T >::max_a ( ) const [inline]

max value for variable a.

Definition at line 62 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::max_b ( ) const [inline]

max value for variable b.

Definition at line 66 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::min_a ( ) const [inline]

min value for variable a.

Definition at line 60 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::min_b ( ) const [inline]

min value for variable b.

Definition at line 64 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::min_prob ( ) const [inline]

Definition at line 72 of file bsta_joint_histogram.h.

template<class T >
T bsta_joint_histogram< T >::mutual_information ( ) const

Definition at line 225 of file bsta_joint_histogram.txx.

template<class T>
unsigned int bsta_joint_histogram< T >::nbins ( ) const [inline]

legacy use where a and b have the same bin granularity.

Definition at line 45 of file bsta_joint_histogram.h.

template<class T>
unsigned int bsta_joint_histogram< T >::nbins_a ( ) const [inline]

number of bins for variable a.

Definition at line 48 of file bsta_joint_histogram.h.

template<class T>
unsigned int bsta_joint_histogram< T >::nbins_b ( ) const [inline]

number of bins for variable b.

Definition at line 50 of file bsta_joint_histogram.h.

template<class T >
T bsta_joint_histogram< T >::p ( unsigned int  a,
unsigned int  b 
) const

access by bin index.

Definition at line 128 of file bsta_joint_histogram.txx.

template<class T >
T bsta_joint_histogram< T >::p ( a,
b 
) const

access by value.

Definition at line 143 of file bsta_joint_histogram.txx.

template<class T >
void bsta_joint_histogram< T >::parzen ( const T  sigma)

Definition at line 288 of file bsta_joint_histogram.txx.

template<class T >
void bsta_joint_histogram< T >::print ( vcl_ostream &  os = vcl_cout) const

Definition at line 323 of file bsta_joint_histogram.txx.

template<class T >
void bsta_joint_histogram< T >::print_to_m ( vcl_ostream &  os) const

Definition at line 417 of file bsta_joint_histogram.txx.

template<class T >
void bsta_joint_histogram< T >::print_to_text ( vcl_ostream &  os) const

Definition at line 434 of file bsta_joint_histogram.txx.

template<class T >
void bsta_joint_histogram< T >::print_to_vrml ( vcl_ostream &  os) const

Definition at line 332 of file bsta_joint_histogram.txx.

template<class T>
T bsta_joint_histogram< T >::range ( ) const [inline]

legacy use where a and b have the same range.

Definition at line 53 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::range_a ( ) const [inline]

range for variable a.

Definition at line 56 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::range_b ( ) const [inline]

range for variable b.

Definition at line 58 of file bsta_joint_histogram.h.

template<class T >
T bsta_joint_histogram< T >::renyi_entropy ( ) const

Definition at line 251 of file bsta_joint_histogram.txx.

template<class T>
void bsta_joint_histogram< T >::set_count ( unsigned  r,
unsigned  c,
cnt 
) [inline]

Definition at line 97 of file bsta_joint_histogram.h.

template<class T >
void bsta_joint_histogram< T >::upcount ( a,
mag_a,
b,
mag_b 
)

Definition at line 91 of file bsta_joint_histogram.txx.

template<class T >
T bsta_joint_histogram< T >::volume ( ) const

Definition at line 202 of file bsta_joint_histogram.txx.


Member Data Documentation

template<class T>
vbl_array_2d<T> bsta_joint_histogram< T >::counts_ [private]

Definition at line 131 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::delta_a_ [private]

Definition at line 127 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::delta_b_ [private]

Definition at line 127 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::max_a_ [private]

Definition at line 128 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::max_b_ [private]

Definition at line 129 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::min_a_ [private]

Definition at line 128 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::min_b_ [private]

Definition at line 129 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::min_prob_ [private]

Definition at line 130 of file bsta_joint_histogram.h.

template<class T>
unsigned int bsta_joint_histogram< T >::nbins_a_ [private]

Definition at line 125 of file bsta_joint_histogram.h.

template<class T>
unsigned int bsta_joint_histogram< T >::nbins_b_ [private]

Definition at line 125 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::range_a_ [private]

Definition at line 126 of file bsta_joint_histogram.h.

template<class T>
T bsta_joint_histogram< T >::range_b_ [private]

Definition at line 126 of file bsta_joint_histogram.h.

Definition at line 27 of file bsta_joint_histogram_base.h.

template<class T>
T bsta_joint_histogram< T >::volume_ [mutable, private]

Definition at line 124 of file bsta_joint_histogram.h.

template<class T>
bool bsta_joint_histogram< T >::volume_valid_ [mutable, private]

Definition at line 123 of file bsta_joint_histogram.h.


The documentation for this class was generated from the following files: