Path 1.0
Cost Class Reference

This class implements a generic cost function. More...

#include <shortestpath.h>

Public Member Functions

 Cost ()
 Creates a generic cost function. Simply set the cost function to null.
 
 Cost (const double &, const double &)
 Constructeur de la class Cost.
 
 ~Cost ()
 Destructor, empty.
 
void Set (const double &, const double &)
 Set the maximum range of the domain and the infinity value of the function when computed outside of the domain.
 
double Eval (const double &) const
 Compute the cost.
 

Static Public Attributes

static const double Infinity = 100000000.0
 Infinity constant, set to an arbitrary large value.
 
static const int n = 50
 Sampling of the cost function.
 

Protected Attributes

double c [50]
 Array of values defining the cost within a given interval.
 
double infinity
 Maximum returned value when computing the cost with an input parameter outside authorized input interval.
 
double range
 Defines the range of input interval.
 

Detailed Description

This class implements a generic cost function.

Member Function Documentation

◆ Eval()

double Cost::Eval ( const double & x) const

Compute the cost.

Parameters
xArgument value.

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