Sandia Home Sandia Home
Main Page | Publications | Downloads | Configuration | Running the Code | Solver Parameters | FAQ | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CustomEvaluator Class Reference

#include <cev_evaluator.hpp>

Inheritance diagram for CustomEvaluator:

Inheritance graph
[legend]
Collaboration diagram for CustomEvaluator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Example custom evaluator derived from APPSPACK::Evaluator::Interface.

See also:
Customizing the APPSPACK::Evaluator to change the way single function evaluations are handled

Definition at line 17 of file cev_evaluator.hpp.

Public Member Functions

 CustomEvaluator ()
 Constructor - can take any arguments that are appropriate. In this case, we don't have any.
 ~CustomEvaluator ()
 Destructor.
void operator() (int tag_in, const APPSPACK::Vector &x_in, APPSPACK::Vector &f_out, string &msg_out)
 Main function of the class because it does the evaluation.
void print () const
 Prints out information about the evaluator.

Private Member Functions

bool constraint (const APPSPACK::Vector &x)
 Return true is the constraint is satisfied, false otherwise.
double feval (const APPSPACK::Vector &x)
 Evaluate function at x.

Private Attributes

int cnt
 Number of calls to the evaluator.


Constructor & Destructor Documentation

CustomEvaluator::CustomEvaluator  ) 
 

Constructor - can take any arguments that are appropriate. In this case, we don't have any.

Definition at line 13 of file cev_evaluator.cpp.

CustomEvaluator::~CustomEvaluator  ) 
 

Destructor.

Definition at line 17 of file cev_evaluator.cpp.

References print().


Member Function Documentation

void CustomEvaluator::operator() int  tag_in,
const APPSPACK::Vector x_in,
APPSPACK::Vector f_out,
string &  msg_out
 

Main function of the class because it does the evaluation.

Evaluates the function at x, returning a vector of function values (usually just a single value) and any error messages. It must fill in the vector f_out and the string msg_out. For successful evaluations, msg_out should be something like "Success". If the iteration is unsuccessful, the vector f must be empty, i.e., by calling f_out.resize(0).

See APPSPACK::Evaluator::Interface::operator()() for more details.

Definition at line 22 of file cev_evaluator.cpp.

References cnt, constraint(), feval(), and APPSPACK::Vector::resize().

void CustomEvaluator::print  )  const [virtual]
 

Prints out information about the evaluator.

Reimplemented from APPSPACK::Evaluator::Interface.

Definition at line 40 of file cev_evaluator.cpp.

References cnt.

Referenced by ~CustomEvaluator().

bool CustomEvaluator::constraint const APPSPACK::Vector x  )  [private]
 

Return true is the constraint is satisfied, false otherwise.

Definition at line 55 of file cev_evaluator.cpp.

References APPSPACK::Vector::size().

Referenced by operator()().

double CustomEvaluator::feval const APPSPACK::Vector x  )  [private]
 

Evaluate function at x.

Definition at line 45 of file cev_evaluator.cpp.

References APPSPACK::Vector::size().

Referenced by operator()().


Member Data Documentation

int CustomEvaluator::cnt [private]
 

Number of calls to the evaluator.

Definition at line 56 of file cev_evaluator.hpp.

Referenced by operator()(), and print().


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

 

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Fri Feb 16 10:33:35 2007 for APPSPACK 5.0.1 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2002