pop_graph_cost_function Class Reference

#include <pop_graph_cost_function.h>

Inheritance diagram for pop_graph_cost_function:

vnl_least_squares_function List of all members.

Detailed Description

A parameter that can be optimized.

Definition at line 22 of file pop_graph_cost_function.h.


Public Types

enum  UseGradient

Public Member Functions

 pop_graph_cost_function (vcl_vector< pop_parameter * > &params, vcl_vector< pop_geometric_cost_function * > &cfs, pop_manager *manager)
 constructor.
 ~pop_graph_cost_function ()
 destructor.
virtual void f (vnl_vector< double > const &x, vnl_vector< double > &fx)
 the method for evaluating the cost of the parameter values (x) and getting the residuals (fx).
vnl_vector< double > get_parameter_values ()
 get the current parameter values.
vnl_vector< double > get_current_costs ()
 get the current costs.
void throw_failure ()
void clear_failure ()
virtual void gradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian)
void fdgradf (vnl_vector< double > const &x, vnl_matrix< double > &jacobian, double stepsize)
virtual void trace (int iteration, vnl_vector< double > const &x, vnl_vector< double > const &fx)
double rms (vnl_vector< double > const &x)
unsigned int get_number_of_unknowns () const
unsigned int get_number_of_residuals () const
bool has_gradient () const

Public Attributes

 no_gradient
 use_gradient
bool failure

Protected Member Functions

void init (unsigned int number_of_unknowns, unsigned int number_of_residuals)

Protected Attributes

unsigned int p_
unsigned int n_
bool use_gradient_

Private Attributes

vcl_vector< pop_parameter * > params_
vcl_vector< pop_geometric_cost_function * > cfs_
pop_managermanager_

Constructor & Destructor Documentation

pop_graph_cost_function::pop_graph_cost_function ( vcl_vector< pop_parameter * > &  params,
vcl_vector< pop_geometric_cost_function * > &  cfs,
pop_manager manager 
)

constructor.

We send in the parameters that can change, the residuals that would be evaluated and the pop manager that is responsible for updating the graph based on the current parameter values.

Definition at line 11 of file pop_graph_cost_function.cxx.

pop_graph_cost_function::~pop_graph_cost_function (  ) 

destructor.

Definition at line 23 of file pop_graph_cost_function.cxx.


Member Function Documentation

void pop_graph_cost_function::f ( vnl_vector< double > const &  x,
vnl_vector< double > &  fx 
) [virtual]

the method for evaluating the cost of the parameter values (x) and getting the residuals (fx).

Implements vnl_least_squares_function.

Definition at line 29 of file pop_graph_cost_function.cxx.

vnl_vector< double > pop_graph_cost_function::get_parameter_values (  ) 

get the current parameter values.

Definition at line 47 of file pop_graph_cost_function.cxx.

vnl_vector< double > pop_graph_cost_function::get_current_costs (  ) 

get the current costs.

Definition at line 56 of file pop_graph_cost_function.cxx.


Member Data Documentation

vcl_vector<pop_parameter*> pop_graph_cost_function::params_ [private]

Definition at line 47 of file pop_graph_cost_function.h.

vcl_vector<pop_geometric_cost_function*> pop_graph_cost_function::cfs_ [private]

Definition at line 48 of file pop_graph_cost_function.h.

pop_manager* pop_graph_cost_function::manager_ [private]

Definition at line 49 of file pop_graph_cost_function.h.


The documentation for this class was generated from the following files:
Generated on Tue Oct 14 05:14:40 2008 for contrib/gel/pop by  doxygen 1.5.1