Public Types | Public Member Functions | Protected Attributes
bsta_parzen_sphere< T, 1 > Class Template Reference

specialize to the scalar case, needed due to differences in computing the covariance matrix. More...

#include <bsta_parzen_sphere.h>

Inheritance diagram for bsta_parzen_sphere< T, 1 >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef bsta_distribution< T, 1 >
::vector_type 
vect_t
typedef vcl_vector< vect_tsample_vector
typedef
sample_vector::const_iterator 
sv_const_it
enum  { dimension = n }
 The dimension of the distribution. More...
typedef T math_type
 The type used for calculations.
typedef vnl_vector_fixed
< math_type, dimension > 
vector_type
 The type used for a n-dimensional vector of math types.
typedef vector_type field_type
 for compatibility with vpdl/vpdt.

Public Member Functions

 bsta_parzen_sphere ()
 bsta_parzen_sphere (typename bsta_parzen< T, 1 >::sample_vector const &samples, T bandwidth=T(1))
 ~bsta_parzen_sphere ()
bandwidth () const
 kernel bandwidth.
void set_bandwidth (T bandwidth)
bool bandwidth_adapted () const
void set_bandwidth_adapted (bool bandwidth_adapted)
mean () const
 The mean of the distribution (just the sample mean).
covar () const
 The covariance of the distribution (the sample covariance + bandwidth*I).
prob_density (vect_t const &pt) const
 The probability density at sample pt.
probability (vect_t const &min_pt, vect_t const &max_pt) const
 The probability density integrated over a box (returns a probability).
nearest_sample (const vect_t &pt, unsigned &index) const
 the distance and index of the nearest sample.
void insert_sample (const vect_t &sample)
 Insert a new sample into the distribution.
void insert_samples (const sample_vector &samples)
 Insert a vector of samples.
sample_vector samples () const
vect_t sample (unsigned index) const
bool remove_sample (unsigned index)
void clear ()
 clear the sample set.
unsigned size () const
 number of samples.

Protected Attributes

bandwidth_
bool bandwidth_adapted_
sample_vector samples_
 The samples.

Detailed Description

template<class T>
class bsta_parzen_sphere< T, 1 >

specialize to the scalar case, needed due to differences in computing the covariance matrix.

Definition at line 80 of file bsta_parzen_sphere.h.


Member Typedef Documentation

template<class T, unsigned n>
typedef vector_type bsta_distribution< T, n >::field_type [inherited]

for compatibility with vpdl/vpdt.

Reimplemented in bsta_von_mises< T, n >.

Definition at line 29 of file bsta_distribution.h.

template<class T, unsigned n>
typedef T bsta_distribution< T, n >::math_type [inherited]

The type used for calculations.

Reimplemented in bsta_von_mises< T, n >.

Definition at line 25 of file bsta_distribution.h.

typedef vcl_vector<vect_t > bsta_parzen< T, n >::sample_vector [inherited]

Definition at line 63 of file bsta_parzen.h.

typedef sample_vector::const_iterator bsta_parzen< T, n >::sv_const_it [inherited]

Definition at line 64 of file bsta_parzen.h.

template<class T >
typedef bsta_distribution<T,1>::vector_type bsta_parzen_sphere< T, 1 >::vect_t

Reimplemented from bsta_parzen< T, 1 >.

Definition at line 84 of file bsta_parzen_sphere.h.

template<class T, unsigned n>
typedef vnl_vector_fixed<math_type,dimension> bsta_distribution< T, n >::vector_type [inherited]

The type used for a n-dimensional vector of math types.

Reimplemented in bsta_von_mises< T, n >.

Definition at line 27 of file bsta_distribution.h.


Member Enumeration Documentation

template<class T, unsigned n>
anonymous enum [inherited]

The dimension of the distribution.

Enumerator:
dimension 

Definition at line 23 of file bsta_distribution.h.


Constructor & Destructor Documentation

template<class T >
bsta_parzen_sphere< T, 1 >::bsta_parzen_sphere ( ) [inline]

Definition at line 86 of file bsta_parzen_sphere.h.

template<class T >
bsta_parzen_sphere< T, 1 >::bsta_parzen_sphere ( typename bsta_parzen< T, 1 >::sample_vector const &  samples,
bandwidth = T(1) 
) [inline]

Definition at line 89 of file bsta_parzen_sphere.h.

template<class T >
bsta_parzen_sphere< T, 1 >::~bsta_parzen_sphere ( ) [inline]

Definition at line 93 of file bsta_parzen_sphere.h.


Member Function Documentation

template<class T >
T bsta_parzen_sphere< T, 1 >::bandwidth ( ) const [inline]

kernel bandwidth.

Definition at line 96 of file bsta_parzen_sphere.h.

template<class T >
bool bsta_parzen_sphere< T, 1 >::bandwidth_adapted ( ) const [inline]

Definition at line 100 of file bsta_parzen_sphere.h.

void bsta_parzen< T, n >::clear ( ) [inline, inherited]

clear the sample set.

Definition at line 105 of file bsta_parzen.h.

template<class T >
T bsta_parzen_sphere< T, 1 >::covar ( ) const

The covariance of the distribution (the sample covariance + bandwidth*I).

the covariance matrix for a Parzen distribution, specialization for 1-d case.

Definition at line 138 of file bsta_parzen_sphere.txx.

void bsta_sample_set< T, n >::insert_sample ( const vect_t sample) [inline, inherited]

Insert a new sample into the distribution.

Definition at line 79 of file bsta_parzen.h.

void bsta_parzen< T, n >::insert_samples ( const sample_vector samples) [inline, inherited]

Insert a vector of samples.

Definition at line 83 of file bsta_parzen.h.

template<class T >
T bsta_parzen_sphere< T, 1 >::mean ( ) const

The mean of the distribution (just the sample mean).

Definition at line 90 of file bsta_parzen_sphere.txx.

template<class T >
T bsta_parzen_sphere< T, 1 >::nearest_sample ( const vect_t pt,
unsigned &  index 
) const

the distance and index of the nearest sample.

distance to nearest sample, specialized to scalar case.

general case for distance and index of nearest sample.

Definition at line 200 of file bsta_parzen_sphere.txx.

template<class T >
T bsta_parzen_sphere< T, 1 >::prob_density ( vect_t const &  pt) const

The probability density at sample pt.

template<class T >
T bsta_parzen_sphere< T, 1 >::probability ( vect_t const &  min_pt,
vect_t const &  max_pt 
) const

The probability density integrated over a box (returns a probability).

bool bsta_parzen< T, n >::remove_sample ( unsigned  index) [inline, inherited]

Definition at line 98 of file bsta_parzen.h.

vect_t bsta_parzen< T, n >::sample ( unsigned  index) const [inline, inherited]

Definition at line 92 of file bsta_parzen.h.

sample_vector bsta_parzen< T, n >::samples ( ) const [inline, inherited]

Definition at line 89 of file bsta_parzen.h.

template<class T >
void bsta_parzen_sphere< T, 1 >::set_bandwidth ( bandwidth) [inline]

Definition at line 98 of file bsta_parzen_sphere.h.

template<class T >
void bsta_parzen_sphere< T, 1 >::set_bandwidth_adapted ( bool  bandwidth_adapted) [inline]

Definition at line 102 of file bsta_parzen_sphere.h.

unsigned bsta_parzen< T, n >::size ( ) const [inline, inherited]

number of samples.

Definition at line 108 of file bsta_parzen.h.


Member Data Documentation

template<class T >
T bsta_parzen_sphere< T, 1 >::bandwidth_ [protected]

Definition at line 121 of file bsta_parzen_sphere.h.

template<class T >
bool bsta_parzen_sphere< T, 1 >::bandwidth_adapted_ [protected]

Definition at line 122 of file bsta_parzen_sphere.h.

sample_vector bsta_parzen< T, n >::samples_ [protected, inherited]

The samples.

Definition at line 68 of file bsta_parzen.h.


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