- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Generators::BFIG::BFIGObjectiveFunction Class Reference

`#include <BFIGObjectiveFunction.h>`

Inheritance diagram for Mers::Generators::BFIG::BFIGObjectiveFunction:

[legend]
List of all members.

## Public Member Functions
| BFIGObjectiveFunction (const bool mpi=true)
virtual | ~BFIGObjectiveFunction ()
double | getUtility (std::vector< Mers::Generators::BFIG::BFIGAssignment const * > &implicantAssignments, int sourceStateIndex=-1) const
double | getUtility (Mers::Models::Base::BaseModelAssignmentArray const *bmAssignments, int sourceStateIndex=-1) const
double | getCost (std::vector< Mers::Generators::BFIG::BFIGAssignment const * > &implicantAssignments, int sourceStateIndex=-1) const
bool | isMPI (void) const
## Protected Member Functions
virtual double | calculateUtility (std::vector< Mers::Models::Base::BaseModelAssignment const * > &bmAssignments, int sourceStateIndex=-1) const=0

## Detailed Description

BFIG Objective Function This is a pure virtual class that sets up the BFIG objective function framework for users to adapt to. Each OCSP has its own objective function and it is important that BFIG understand how to evaluate it at the level of the implicants. All relevant cost values are stored in this class and the user directly requests the implicant cost.

Author:
  Oliver Martin

Date:
  12/30/05

Definition at line 45 of file BFIGObjectiveFunction.h.

## Constructor & Destructor Documentation

Mers::Generators::BFIG::BFIGObjectiveFunction::BFIGObjectiveFunction | ( | const bool | mpi = `true` | ) | `[inline]`

Creates a new BFIG Objective Function

Definition at line 56 of file BFIGObjectiveFunction.h.

virtual Mers::Generators::BFIG::BFIGObjectiveFunction::~BFIGObjectiveFunction | ( |  | ) | `[inline, virtual]`

Destroys this object

Definition at line 61 of file BFIGObjectiveFunction.h.

## Member Function Documentation

double Mers::Generators::BFIG::BFIGObjectiveFunction::getUtility | ( | std::vector< Mers::Generators::BFIG::BFIGAssignment const * > & | implicantAssignments,
|  | int | sourceStateIndex = `-1` |
| ) |  |  | const`[inline]`

Calculates the utility of the implicant assignments based on the objective fucntion being used.

Parameters:

  | implicantAssignments | the current assignments from which to calculate the utility.
  | sourceStateIndex | is an optional argument as required by BFTE

Returns:
  the utility

Definition at line 77 of file BFIGObjectiveFunction.h.

References calculateUtility().

Here is the call graph for this function:

double Mers::Generators::BFIG::BFIGObjectiveFunction::getUtility | ( | Mers::Models::Base::BaseModelAssignmentArray const * | bmAssignments,
|  | int | sourceStateIndex = `-1` |
| ) |  |  | const`[inline]`

Calculates the utility of the implicant assignments based on the objective fucntion being used.

Parameters:

  | implicantAssignments | the current assignments from which to calculate the utility.
  | sourceStateIndex | is an optional argument as required by BFTE

Returns:
  the utility

Definition at line 99 of file BFIGObjectiveFunction.h.

References calculateUtility(), and Mers::Utils::Containers::DynamicArray::getLength().

Here is the call graph for this function:

double Mers::Generators::BFIG::BFIGObjectiveFunction::getCost | ( | std::vector< Mers::Generators::BFIG::BFIGAssignment const * > & | implicantAssignments,
|  | int | sourceStateIndex = `-1` |
| ) |  |  | const`[inline]`

Calculates the cost of the implicant assignments based on the objective fucntion being used. (Negative log of the utilitiy).

Parameters:

  | implicantAssignments | the current assignments from which to calculate the cost.
  | sourceStateIndex | is an optional argument as required by BFTE

Returns:
  the cost

Definition at line 120 of file BFIGObjectiveFunction.h.

References calculateUtility().

Referenced by Mers::Generators::BFIG::BFIGImplicant::addAssignment(), and Mers::Generators::BFIG::BFIGImplicantNoMPI::BFIGImplicantNoMPI().

Here is the call graph for this function:

bool Mers::Generators::BFIG::BFIGObjectiveFunction::isMPI | ( | void |  | ) | const`[inline]`

States if the objective function is Mutual Preferentially Independent (MPI)

Returns:
  true if MPI, false otherwise

Definition at line 139 of file BFIGObjectiveFunction.h.

Referenced by Mers::Generators::BFIG::BFIG::createNewImplicant().

virtual double Mers::Generators::BFIG::BFIGObjectiveFunction::calculateUtility | ( | std::vector< Mers::Models::Base::BaseModelAssignment const * > & | bmAssignments,
|  | int | sourceStateIndex = `-1` |
| ) |  |  | const`[protected, pure virtual]`

Evaluates the objective function to determine the utiltiy of the implicant. This is where the actual objective function is specified.

Parameters:

  | implicantAssignments | the current assignments from which to calculate the utility based on the objective function.
  | sourceStateIndex | is an optional argument as required by BFTE

Returns:
  the utility

Implemented in Mers::Estimation::Discrete::ApproximateBeliefState::BSEObjectiveFunction, Mers::Estimation::Discrete::ApproximateBeliefState::BSUObjectiveFunction, Mers::Estimation::Discrete::BFTEObjectiveFunction, and Mers::Estimation::Discrete::MEObjectiveFunction.

Referenced by getCost(), and getUtility().

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

- /Users/fpy/titan-1-5-MBARI/Mers/Generators/BFIG/BFIGObjectiveFunction.h