ReFRACtor
FullPhysics::CostFunction Class Referenceabstract

This class calculates a cost function, along with a jacobian. More...

#include <cost_function.h>

+ Inheritance diagram for FullPhysics::CostFunction:
+ Collaboration diagram for FullPhysics::CostFunction:

Public Member Functions

virtual ~CostFunction ()
 
virtual void cost_function (const blitz::Array< double, 1 > &X, blitz::Array< double, 1 > &Residual, blitz::Array< double, 1 > &Se, blitz::Array< double, 2 > &Jacobian) const =0
 For the given value of X, calculate the residuals and jacobians. More...
 
virtual void print (std::ostream &Os) const
 Print description of object. More...
 
std::string print_to_string () const
 Print to string. More...
 

Detailed Description

This class calculates a cost function, along with a jacobian.

Definition at line 10 of file cost_function.h.

Constructor & Destructor Documentation

◆ ~CostFunction()

virtual FullPhysics::CostFunction::~CostFunction ( )
inlinevirtual

Definition at line 12 of file cost_function.h.

Member Function Documentation

◆ cost_function()

virtual void FullPhysics::CostFunction::cost_function ( const blitz::Array< double, 1 > &  X,
blitz::Array< double, 1 > &  Residual,
blitz::Array< double, 1 > &  Se,
blitz::Array< double, 2 > &  Jacobian 
) const
pure virtual

For the given value of X, calculate the residuals and jacobians.

The residual is defined as F(x) - y, so the Jacobian of the residuals is the same as the Jacobian of F(x).

Parameters
XInput value
ResidualOn exit, set to the residual of the cost function
SeOn exit, the covariance of the residual. We assume the covariance is a diagonal matrix, and just return the diagonal elements
JacobianOn exit, the Jacobian of the cost function.

Implemented in FullPhysics::ConnorCostFunction.

◆ print()

virtual void FullPhysics::CostFunction::print ( std::ostream &  Os) const
inlinevirtual

Print description of object.

Reimplemented in FullPhysics::ConnorCostFunction.

Definition at line 37 of file cost_function.h.

◆ print_to_string()

std::string FullPhysics::Printable< CostFunction >::print_to_string ( ) const
inlineinherited

Print to string.

This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.

Definition at line 31 of file printable.h.


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

Copyright © 2017, California Institute of Technology.
ALL RIGHTS RESERVED.
U.S. Government Sponsorship acknowledged.
Generated Fri Aug 24 2018 15:44:12