LILAC
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
stable Class Reference

A system that attempts to reach an equilibrium. More...

#include <stable.h>

Inheritance diagram for stable:
Inheritance graph
[legend]
Collaboration diagram for stable:
Collaboration graph
[legend]

Public Member Functions

double simulate ()
virtual ~stable ()
- Public Member Functions inherited from simulation
virtual double score ()
 This function returns the score of the system in its current state.
- Public Member Functions inherited from item_dim
size_t get_dimension () const
- Public Member Functions inherited from item
 item ()
virtual ~item ()
virtual void print () const
 Standard print function.
virtual void update ()
virtual std::string type () const =0
void setname (const std::string n)
void set_write_name (std::string wname)
const std::stringname () const
const std::stringwrite_name () const
- Public Member Functions inherited from vartype
virtual const std::type_info & vtype () const =0
bool compare (const vartype *in) const
bool compare (const vartype &in) const
bool compare (const std::type_info &tinf)
template<typename T >
bool compare () const
template<typename T >
bool compare (const T &in) const
std::string vname () const
virtual const std::type_info & vtype_internal () const
bool compare_internal (const vartype *in) const
bool compare_internal (const vartype &in) const
bool compare_internal (const std::type_info &tinf)
template<typename T >
bool compare_internal () const
template<typename T >
bool compare_internal (const T &in) const
std::string vname_internal () const
virtual ~vartype ()

Protected Member Functions

virtual double get_change ()=0
 Returns the difference between the two most recent iterations.
virtual void iterate_system ()=0
virtual std::vector< std::stringdependencies () const =0
virtual void postprocess (input &invals)=0

Protected Attributes

int max_iterations
 Maximum number of times the system is iterated before assuming an unstable state.
double change_threshold
 The threshold of change between two iterations for which the system will be considered stable.
int num_gone
int round
int bad_res
std::shared_ptr< writercur_writer
- Protected Attributes inherited from simulation
controllercont
 The controller.
objectiveobj
 The objective function.
writercur_writer
- Protected Attributes inherited from item_dim
mempool memp
std::set< item_dim * > children
item_dimparent
size_t dimension
- Protected Attributes inherited from item
std::string _name
std::string _write_name
char has_write_name

Additional Inherited Members

- Static Public Member Functions inherited from item
static std::shared_ptr< itemcreate (std::string name, engineimp *rval)
- Public Attributes inherited from simulation
std::string out_f_name

Detailed Description

A system that attempts to reach an equilibrium.

This class defines a system that tries to reach an equilibrium through repeated iterations

Definition at line 25 of file stable.h.

Constructor & Destructor Documentation

virtual stable::~stable ( )
inlinevirtual

Definition at line 43 of file stable.h.

Member Function Documentation

std::vector< std::string > stable::dependencies ( ) const
protectedpure virtual

This function returns the dependencies of the stable class. The stable class depends on:

 - double change_threshold: When the change between two iterations is less than change_threshold, the iteration stops.
 - integer max_iterations: The number at which the iteration stops and the system is deemed unstable

Implements simulation.

Implemented in stable_ode, jones_optical, stable_spectral_pde_1d_tmpl< T >, and stable_spectral_pde_1d_tmpl< comp >.

Definition at line 68 of file stable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual double stable::get_change ( )
protectedpure virtual

Returns the difference between the two most recent iterations.

Implemented in stable_ode, jones_optical, stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Here is the caller graph for this function:

virtual void stable::iterate_system ( )
protectedpure virtual

Implemented in stable_ode, stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Here is the caller graph for this function:

void stable::postprocess ( input invals)
protectedpure virtual

Implements simulation.

Implemented in stable_ode, jones_optical, stable_spectral_pde_1d_tmpl< T >, stable_spectral_pde_1d_tmpl< comp >, stable_ode_tmpl< T >, and stable_ode_tmpl< comp >.

Definition at line 73 of file stable.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double stable::simulate ( )
virtual

This function iterates the system forwards in time until it reaches a stable state or a certain number of iterations, and then returns the objective function of that state.

Implements simulation.

Definition at line 29 of file stable.cpp.

Here is the call graph for this function:

Member Data Documentation

int stable::bad_res
protected

Definition at line 39 of file stable.h.

double stable::change_threshold
protected

The threshold of change between two iterations for which the system will be considered stable.

Definition at line 30 of file stable.h.

std::shared_ptr<writer> stable::cur_writer
protected

Definition at line 40 of file stable.h.

int stable::max_iterations
protected

Maximum number of times the system is iterated before assuming an unstable state.

Definition at line 28 of file stable.h.

int stable::num_gone
protected

Definition at line 37 of file stable.h.

int stable::round
protected

Definition at line 38 of file stable.h.


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