Classes | Public Member Functions | Protected Member Functions | Protected Attributes
rrel_wgted_ran_sam_search Class Reference

#include <rrel_wgted_ran_sam_search.h>

Inheritance diagram for rrel_wgted_ran_sam_search:
Inheritance graph
[legend]

List of all members.

Classes

struct  prob_interval

Public Member Functions

 rrel_wgted_ran_sam_search ()
 Constructor using a non-deterministic random-sampling seed.
 rrel_wgted_ran_sam_search (int seed)
 Constructor using a given random-sampling seed.
 ~rrel_wgted_ran_sam_search ()
virtual bool estimate (const rrel_estimation_problem *problem, const rrel_objective *obj_fcn)
 Estimation for an "ordinary" estimation problem.
void set_gen_all_samples ()
 Indicate that all possible minimal subset samples should be tried.
void set_sampling_params (double max_outlier_frac=0.5, double desired_prob_good=0.99, unsigned int max_populations_expected=1, unsigned int min_samples=0)
 Set the parameters for random sampling.
double scale () const
 Get the scale estimate.
const vnl_vector< double > & params () const
 Get the parameter estimate.
const vcl_vector< int > & index () const
 Get the indices of best data sample.
const vcl_vector< double > & residuals () const
 Get the residuals for best sample.
double cost () const
 Get the cost for best sample returned by rrel_objective function.
int samples_tested () const
 Get the number of samples tested in during estimation.
void print_params () const
 Print the sampling parameters. Used for debugging.
void set_trace_level (int level)

Protected Member Functions

virtual void next_sample (unsigned int taken, unsigned int num_points, vcl_vector< int > &sample, unsigned int points_per_sample)
 Determine the next random sample, filling in the "sample" vector.
virtual void calc_num_samples (const rrel_estimation_problem *problem)
 Calculate number of samples --- non-unique matching estimation problems.

Protected Attributes

vcl_vector< prob_intervalintervals_
 store the intervals.
bool is_sim_wgt_set_
double max_outlier_frac_
double desired_prob_good_
unsigned int max_populations_expected_
unsigned int min_samples_
bool generate_all_
vnl_randomgenerator_
 Random number generator.
bool own_generator_
vnl_vector< double > params_
double scale_
vcl_vector< int > indices_
vcl_vector< double > residuals_
double min_obj_
unsigned int samples_to_take_
int trace_level_

Detailed Description

Definition at line 12 of file rrel_wgted_ran_sam_search.h.


Constructor & Destructor Documentation

rrel_wgted_ran_sam_search::rrel_wgted_ran_sam_search ( ) [inline]

Constructor using a non-deterministic random-sampling seed.

Definition at line 16 of file rrel_wgted_ran_sam_search.h.

rrel_wgted_ran_sam_search::rrel_wgted_ran_sam_search ( int  seed) [inline]

Constructor using a given random-sampling seed.

Definition at line 21 of file rrel_wgted_ran_sam_search.h.

rrel_wgted_ran_sam_search::~rrel_wgted_ran_sam_search ( )

Definition at line 12 of file rrel_wgted_ran_sam_search.cxx.


Member Function Documentation

void rrel_ran_sam_search::calc_num_samples ( const rrel_estimation_problem problem) [protected, virtual, inherited]

Calculate number of samples --- non-unique matching estimation problems.

Definition at line 186 of file rrel_ran_sam_search.cxx.

double rrel_ran_sam_search::cost ( ) const [inline, inherited]

Get the cost for best sample returned by rrel_objective function.

Definition at line 90 of file rrel_ran_sam_search.h.

bool rrel_wgted_ran_sam_search::estimate ( const rrel_estimation_problem problem,
const rrel_objective obj_fcn 
) [virtual]

Estimation for an "ordinary" estimation problem.

Reimplemented from rrel_ran_sam_search.

Definition at line 21 of file rrel_wgted_ran_sam_search.cxx.

const vcl_vector<int>& rrel_ran_sam_search::index ( ) const [inline, inherited]

Get the indices of best data sample.

Definition at line 84 of file rrel_ran_sam_search.h.

void rrel_wgted_ran_sam_search::next_sample ( unsigned int  taken,
unsigned int  num_points,
vcl_vector< int > &  sample,
unsigned int  points_per_sample 
) [protected, virtual]

Determine the next random sample, filling in the "sample" vector.

Reimplemented from rrel_ran_sam_search.

Definition at line 57 of file rrel_wgted_ran_sam_search.cxx.

const vnl_vector<double>& rrel_ran_sam_search::params ( ) const [inline, inherited]

Get the parameter estimate.

Definition at line 81 of file rrel_ran_sam_search.h.

void rrel_ran_sam_search::print_params ( ) const [inherited]

Print the sampling parameters. Used for debugging.

Definition at line 282 of file rrel_ran_sam_search.cxx.

const vcl_vector<double>& rrel_ran_sam_search::residuals ( ) const [inline, inherited]

Get the residuals for best sample.

Definition at line 87 of file rrel_ran_sam_search.h.

int rrel_ran_sam_search::samples_tested ( ) const [inline, inherited]

Get the number of samples tested in during estimation.

Definition at line 93 of file rrel_ran_sam_search.h.

double rrel_ran_sam_search::scale ( ) const [inline, inherited]

Get the scale estimate.

Definition at line 78 of file rrel_ran_sam_search.h.

void rrel_ran_sam_search::set_gen_all_samples ( ) [inherited]

Indicate that all possible minimal subset samples should be tried.

Definition at line 52 of file rrel_ran_sam_search.cxx.

void rrel_ran_sam_search::set_sampling_params ( double  max_outlier_frac = 0.5,
double  desired_prob_good = 0.99,
unsigned int  max_populations_expected = 1,
unsigned int  min_samples = 0 
) [inherited]

Set the parameters for random sampling.

Definition at line 60 of file rrel_ran_sam_search.cxx.

void rrel_ran_sam_search::set_trace_level ( int  level) [inline, inherited]

Definition at line 98 of file rrel_ran_sam_search.h.


Member Data Documentation

double rrel_ran_sam_search::desired_prob_good_ [protected, inherited]

Definition at line 125 of file rrel_ran_sam_search.h.

bool rrel_ran_sam_search::generate_all_ [protected, inherited]

Definition at line 128 of file rrel_ran_sam_search.h.

Random number generator.

Normally, this will point to the "global" generator, but a could point to a local one if the user wants to specify a seed.

Definition at line 133 of file rrel_ran_sam_search.h.

vcl_vector<int> rrel_ran_sam_search::indices_ [protected, inherited]

Definition at line 141 of file rrel_ran_sam_search.h.

store the intervals.

Definition at line 65 of file rrel_wgted_ran_sam_search.h.

Definition at line 66 of file rrel_wgted_ran_sam_search.h.

double rrel_ran_sam_search::max_outlier_frac_ [protected, inherited]

Definition at line 124 of file rrel_ran_sam_search.h.

unsigned int rrel_ran_sam_search::max_populations_expected_ [protected, inherited]

Definition at line 126 of file rrel_ran_sam_search.h.

double rrel_ran_sam_search::min_obj_ [protected, inherited]

Definition at line 144 of file rrel_ran_sam_search.h.

unsigned int rrel_ran_sam_search::min_samples_ [protected, inherited]

Definition at line 127 of file rrel_ran_sam_search.h.

bool rrel_ran_sam_search::own_generator_ [protected, inherited]

Definition at line 134 of file rrel_ran_sam_search.h.

vnl_vector<double> rrel_ran_sam_search::params_ [protected, inherited]

Definition at line 139 of file rrel_ran_sam_search.h.

vcl_vector<double> rrel_ran_sam_search::residuals_ [protected, inherited]

Definition at line 142 of file rrel_ran_sam_search.h.

unsigned int rrel_ran_sam_search::samples_to_take_ [protected, inherited]

Definition at line 148 of file rrel_ran_sam_search.h.

double rrel_ran_sam_search::scale_ [protected, inherited]

Definition at line 140 of file rrel_ran_sam_search.h.

int rrel_ran_sam_search::trace_level_ [protected, inherited]

Definition at line 150 of file rrel_ran_sam_search.h.


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