Public Member Functions | Protected Attributes
sdet_mrf_site_bp Class Reference

#include <sdet_mrf_site_bp.h>

Inheritance diagram for sdet_mrf_site_bp:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 sdet_mrf_site_bp (unsigned n_labels, float lambda, float truncation_cost)
void switch_buffers ()
int prior () const
int current () const
void set_label (float obs_label)
 set the observed label.
float D (unsigned fp)
 data cost due to observed continuous label value.
float M (unsigned nq, unsigned fp)
 sum over stored prior messages, except the message from neighbor nq.
float h (unsigned nq, unsigned fp)
 total of D and M.
float b (unsigned fp)
 belief, sum of data cost and sum of all four prior messages.
unsigned believed_label ()
 the most probable label, label with minimum belief.
void set_cur_message (unsigned nq, unsigned fp, float msg)
float cur_message (unsigned nq, unsigned fp) const
 the current message value.
float prior_message (unsigned nq, unsigned fp) const
 the prior message value.
vcl_vector< float > prior_message (unsigned nq)
 entire prior message.
void set_prior_message (unsigned nq, vcl_vector< float >const &msg)
 set prior message.
void clear ()
 clear messages.
void print_prior_messages ()
 print the value of the messages held in the prior queue.
void print_current_messages ()
void print_belief_vector ()
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Protected Attributes

float lambda_
float truncation_cost_
int prior_
 this index is toggled to swap the buffers.
unsigned n_labels_
 typically 256.
unsigned n_ngbh_
 currently 4, but might change in the future.
vcl_vector< vcl_vector
< vcl_vector< short > > > 
msg_
 a set of 2 message buffers, prior and current, one for each neighbor.
float obs_label_
 the label represented by the data.

Detailed Description

Definition at line 34 of file sdet_mrf_site_bp.h.


Constructor & Destructor Documentation

sdet_mrf_site_bp::sdet_mrf_site_bp ( unsigned  n_labels,
float  lambda,
float  truncation_cost 
)

Definition at line 10 of file sdet_mrf_site_bp.cxx.


Member Function Documentation

float sdet_mrf_site_bp::b ( unsigned  fp)

belief, sum of data cost and sum of all four prior messages.

Definition at line 78 of file sdet_mrf_site_bp.cxx.

unsigned sdet_mrf_site_bp::believed_label ( )

the most probable label, label with minimum belief.

Definition at line 86 of file sdet_mrf_site_bp.cxx.

void sdet_mrf_site_bp::clear ( )

clear messages.

Definition at line 107 of file sdet_mrf_site_bp.cxx.

float sdet_mrf_site_bp::cur_message ( unsigned  nq,
unsigned  fp 
) const [inline]

the current message value.

Definition at line 66 of file sdet_mrf_site_bp.h.

int sdet_mrf_site_bp::current ( ) const [inline]

Definition at line 41 of file sdet_mrf_site_bp.h.

float sdet_mrf_site_bp::D ( unsigned  fp)

data cost due to observed continuous label value.

Definition at line 25 of file sdet_mrf_site_bp.cxx.

float sdet_mrf_site_bp::h ( unsigned  nq,
unsigned  fp 
) [inline]

total of D and M.

Definition at line 54 of file sdet_mrf_site_bp.h.

float sdet_mrf_site_bp::M ( unsigned  nq,
unsigned  fp 
)

sum over stored prior messages, except the message from neighbor nq.

Definition at line 36 of file sdet_mrf_site_bp.cxx.

void sdet_mrf_site_bp::print_belief_vector ( )

Definition at line 98 of file sdet_mrf_site_bp.cxx.

void sdet_mrf_site_bp::print_current_messages ( )

Definition at line 68 of file sdet_mrf_site_bp.cxx.

void sdet_mrf_site_bp::print_prior_messages ( )

print the value of the messages held in the prior queue.

Definition at line 58 of file sdet_mrf_site_bp.cxx.

int sdet_mrf_site_bp::prior ( ) const [inline]

Definition at line 40 of file sdet_mrf_site_bp.h.

float sdet_mrf_site_bp::prior_message ( unsigned  nq,
unsigned  fp 
) const [inline]

the prior message value.

Definition at line 69 of file sdet_mrf_site_bp.h.

vcl_vector< float > sdet_mrf_site_bp::prior_message ( unsigned  nq)

entire prior message.

Definition at line 50 of file sdet_mrf_site_bp.cxx.

void sdet_mrf_site_bp::set_cur_message ( unsigned  nq,
unsigned  fp,
float  msg 
)

Definition at line 45 of file sdet_mrf_site_bp.cxx.

void sdet_mrf_site_bp::set_label ( float  obs_label) [inline]

set the observed label.

Definition at line 43 of file sdet_mrf_site_bp.h.

void sdet_mrf_site_bp::set_prior_message ( unsigned  nq,
vcl_vector< float >const &  msg 
)

set prior message.

Definition at line 116 of file sdet_mrf_site_bp.cxx.

void sdet_mrf_site_bp::switch_buffers ( ) [inline]

Definition at line 39 of file sdet_mrf_site_bp.h.


Member Data Documentation

float sdet_mrf_site_bp::lambda_ [protected]

Definition at line 87 of file sdet_mrf_site_bp.h.

vcl_vector< vcl_vector<vcl_vector<short> > > sdet_mrf_site_bp::msg_ [protected]

a set of 2 message buffers, prior and current, one for each neighbor.

(p, c) n_ngbh_ n_labels_

Definition at line 106 of file sdet_mrf_site_bp.h.

unsigned sdet_mrf_site_bp::n_labels_ [protected]

typically 256.

Definition at line 94 of file sdet_mrf_site_bp.h.

unsigned sdet_mrf_site_bp::n_ngbh_ [protected]

currently 4, but might change in the future.

Definition at line 97 of file sdet_mrf_site_bp.h.

float sdet_mrf_site_bp::obs_label_ [protected]

the label represented by the data.

Definition at line 110 of file sdet_mrf_site_bp.h.

int sdet_mrf_site_bp::prior_ [protected]

this index is toggled to swap the buffers.

Definition at line 91 of file sdet_mrf_site_bp.h.

Definition at line 88 of file sdet_mrf_site_bp.h.


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