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

#include <bsta_joint_histogram_3d.h>

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

List of all members.

Public Types

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

Public Member Functions

 bsta_joint_histogram_3d ()
 bsta_joint_histogram_3d (const T range, const unsigned nbins, const T min_prob=0.0)
 bsta_joint_histogram_3d (const T min, const T max, const unsigned nbins, const T min_prob=0.0)
 bsta_joint_histogram_3d (const T range_a, const unsigned nbins_a, const T range_b, const unsigned nbins_b, const T range_c, const unsigned nbins_c, const T min_prob=0.0)
 bsta_joint_histogram_3d (const T min_a, const T max_a, const unsigned nbins_a, const T min_b, const T max_b, const unsigned nbins_b, const T min_c, const T max_c, const unsigned nbins_c, const T min_prob=0.0)
 More general constructor defining a signed value range.
 ~bsta_joint_histogram_3d ()
unsigned nbins () const
 legacy use where a, b and c, have the same bin granularity.
unsigned nbins_a () const
 number of bins for variable a.
unsigned nbins_b () const
 number of bins for variable b.
unsigned nbins_c () 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.
range_c () const
 range for variable c.
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.
min_c () const
 min value for variable b.
max_c () const
 max value for variable b.
delta_a () const
 delta value for variable a.
delta_b () const
 delta value for variable b.
delta_c () const
 delta value for variable c.
min_prob () const
vbl_array_3d< T > counts () const
void upcount (T a, T mag_a, T b, T mag_b, T c, T mag_c)
 update the count of the cell corresponding to the input values.
void parzen (const T sigma)
 smooth histogram with a spherical Gaussian kernel.
p (unsigned ia, unsigned ib, unsigned ic) const
 access by bin index.
p (T a, T b, T c) const
 access by value.
volume () const
 The average and variance bin value for row a using counts to compute probs.
entropy () const
void set_count (unsigned ia, unsigned ib, unsigned ic, T cnt)
get_count (unsigned ia, unsigned ib, unsigned ic) const
 access by index.
get_count (T a, T b, T c) const
 access by value.
void print (vcl_ostream &os=vcl_cout) const
void print_to_vrml (vcl_ostream &os, bool relative_prob_scale=true, T red=T(1), T green=T(0), T blue=T(0)) const
 If relative_probability_scale = true, then the largest probability sphere will occupy one histogram cell. Otherwise only p=1 will occupy a full cell.
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_3d_type type_

Private Member Functions

void compute_volume () const

Private Attributes

bool volume_valid_
volume_
unsigned nbins_a_
unsigned nbins_b_
unsigned nbins_c_
range_a_
range_b_
range_c_
delta_a_
delta_b_
delta_c_
min_a_
max_a_
min_b_
max_b_
min_c_
max_c_
min_prob_
vbl_array_3d< T > counts_

Detailed Description

template<class T>
class bsta_joint_histogram_3d< T >

Definition at line 22 of file bsta_joint_histogram_3d.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_3d_base.h.


Constructor & Destructor Documentation

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

Definition at line 12 of file bsta_joint_histogram_3d.txx.

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

Definition at line 27 of file bsta_joint_histogram_3d.txx.

template<class T >
bsta_joint_histogram_3d< T >::bsta_joint_histogram_3d ( const T  min,
const T  max,
const unsigned  nbins,
const T  min_prob = 0.0 
)

Definition at line 76 of file bsta_joint_histogram_3d.txx.

template<class T >
bsta_joint_histogram_3d< T >::bsta_joint_histogram_3d ( const T  range_a,
const unsigned  nbins_a,
const T  range_b,
const unsigned  nbins_b,
const T  range_c,
const unsigned  nbins_c,
const T  min_prob = 0.0 
)

Definition at line 51 of file bsta_joint_histogram_3d.txx.

template<class T >
bsta_joint_histogram_3d< T >::bsta_joint_histogram_3d ( const T  min_a,
const T  max_a,
const unsigned  nbins_a,
const T  min_b,
const T  max_b,
const unsigned  nbins_b,
const T  min_c,
const T  max_c,
const unsigned  nbins_c,
const T  min_prob = 0.0 
)

More general constructor defining a signed value range.

Definition at line 105 of file bsta_joint_histogram_3d.txx.

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

Definition at line 48 of file bsta_joint_histogram_3d.h.


Member Function Documentation

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

restore to default constructor state.

Definition at line 355 of file bsta_joint_histogram_3d.txx.

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

Definition at line 184 of file bsta_joint_histogram_3d.txx.

template<class T>
vbl_array_3d<T> bsta_joint_histogram_3d< T >::counts ( ) const [inline]

Definition at line 100 of file bsta_joint_histogram_3d.h.

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

delta value for variable a.

Definition at line 92 of file bsta_joint_histogram_3d.h.

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

delta value for variable b.

Definition at line 94 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::delta_c ( ) const [inline]

delta value for variable c.

Definition at line 96 of file bsta_joint_histogram_3d.h.

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

Definition at line 310 of file bsta_joint_histogram_3d.txx.

template<class T>
T bsta_joint_histogram_3d< T >::get_count ( unsigned  ia,
unsigned  ib,
unsigned  ic 
) const [inline]

access by index.

Definition at line 134 of file bsta_joint_histogram_3d.h.

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

access by value.

Definition at line 346 of file bsta_joint_histogram_3d.txx.

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

max value for variable a.

Definition at line 79 of file bsta_joint_histogram_3d.h.

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

max value for variable b.

Definition at line 84 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::max_c ( ) const [inline]

max value for variable b.

Definition at line 89 of file bsta_joint_histogram_3d.h.

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

min value for variable a.

Definition at line 77 of file bsta_joint_histogram_3d.h.

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

min value for variable b.

Definition at line 82 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::min_c ( ) const [inline]

min value for variable b.

Definition at line 87 of file bsta_joint_histogram_3d.h.

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

Definition at line 98 of file bsta_joint_histogram_3d.h.

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

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

Definition at line 51 of file bsta_joint_histogram_3d.h.

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

number of bins for variable a.

Definition at line 56 of file bsta_joint_histogram_3d.h.

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

number of bins for variable b.

Definition at line 59 of file bsta_joint_histogram_3d.h.

template<class T>
unsigned bsta_joint_histogram_3d< T >::nbins_c ( ) const [inline]

number of bins for variable b.

Definition at line 62 of file bsta_joint_histogram_3d.h.

template<class T >
T bsta_joint_histogram_3d< T >::p ( unsigned  ia,
unsigned  ib,
unsigned  ic 
) const

access by bin index.

Definition at line 195 of file bsta_joint_histogram_3d.txx.

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

access by value.

Definition at line 212 of file bsta_joint_histogram_3d.txx.

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

smooth histogram with a spherical Gaussian kernel.

Definition at line 253 of file bsta_joint_histogram_3d.txx.

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

Definition at line 363 of file bsta_joint_histogram_3d.txx.

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

Definition at line 510 of file bsta_joint_histogram_3d.txx.

template<class T >
void bsta_joint_histogram_3d< T >::print_to_vrml ( vcl_ostream &  os,
bool  relative_prob_scale = true,
red = T(1),
green = T(0),
blue = T(0) 
) const

If relative_probability_scale = true, then the largest probability sphere will occupy one histogram cell. Otherwise only p=1 will occupy a full cell.

bin axis lines: a = red, b = green, c = blue color arguments define color of bin probability spheres

Definition at line 373 of file bsta_joint_histogram_3d.txx.

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

legacy use where a and b have the same range.

Definition at line 65 of file bsta_joint_histogram_3d.h.

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

range for variable a.

Definition at line 70 of file bsta_joint_histogram_3d.h.

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

range for variable b.

Definition at line 72 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::range_c ( ) const [inline]

range for variable c.

Definition at line 74 of file bsta_joint_histogram_3d.h.

template<class T>
void bsta_joint_histogram_3d< T >::set_count ( unsigned  ia,
unsigned  ib,
unsigned  ic,
cnt 
) [inline]

Definition at line 126 of file bsta_joint_histogram_3d.h.

template<class T >
void bsta_joint_histogram_3d< T >::upcount ( a,
mag_a,
b,
mag_b,
c,
mag_c 
)

update the count of the cell corresponding to the input values.

Definition at line 148 of file bsta_joint_histogram_3d.txx.

template<class T >
T bsta_joint_histogram_3d< T >::volume ( ) 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 a) const;

Definition at line 302 of file bsta_joint_histogram_3d.txx.


Member Data Documentation

template<class T>
vbl_array_3d<T> bsta_joint_histogram_3d< T >::counts_ [private]

Definition at line 169 of file bsta_joint_histogram_3d.h.

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

Definition at line 164 of file bsta_joint_histogram_3d.h.

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

Definition at line 164 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::delta_c_ [private]

Definition at line 164 of file bsta_joint_histogram_3d.h.

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

Definition at line 165 of file bsta_joint_histogram_3d.h.

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

Definition at line 166 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::max_c_ [private]

Definition at line 167 of file bsta_joint_histogram_3d.h.

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

Definition at line 165 of file bsta_joint_histogram_3d.h.

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

Definition at line 166 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::min_c_ [private]

Definition at line 167 of file bsta_joint_histogram_3d.h.

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

Definition at line 168 of file bsta_joint_histogram_3d.h.

template<class T>
unsigned bsta_joint_histogram_3d< T >::nbins_a_ [private]

Definition at line 162 of file bsta_joint_histogram_3d.h.

template<class T>
unsigned bsta_joint_histogram_3d< T >::nbins_b_ [private]

Definition at line 162 of file bsta_joint_histogram_3d.h.

template<class T>
unsigned bsta_joint_histogram_3d< T >::nbins_c_ [private]

Definition at line 162 of file bsta_joint_histogram_3d.h.

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

Definition at line 163 of file bsta_joint_histogram_3d.h.

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

Definition at line 163 of file bsta_joint_histogram_3d.h.

template<class T>
T bsta_joint_histogram_3d< T >::range_c_ [private]

Definition at line 163 of file bsta_joint_histogram_3d.h.

Definition at line 28 of file bsta_joint_histogram_3d_base.h.

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

Definition at line 161 of file bsta_joint_histogram_3d.h.

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

Definition at line 160 of file bsta_joint_histogram_3d.h.


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