LoveBrains  1.0.0
Public Member Functions | List of all members
Graphics::IBrain Class Referenceabstract

Define the interface of an object that contains a neural network. More...

#include <i_brain.h>

Inheritance diagram for Graphics::IBrain:
Graphics::IObject

Public Member Functions

virtual ~IBrain (void)
 Destructor.
 
virtual double getFitness (void) const =0
 Get the current fitness of the object. More...
 
virtual void setFitness (double fitness)=0
 Set the current fitness of the object. More...
 
virtual void setBrain (GANN::ANN const &brain)=0
 Set the current neural network of the object. More...
 
virtual void setInput (unsigned int index, double value)=0
 Set an input for the neural network. More...
 
- Public Member Functions inherited from Graphics::IObject
virtual ~IObject (void)
 Destructor.
 
virtual bool isDead (void) const =0
 Verify if the object is dead (not be able to draw). More...
 
virtual bool hasBrain (void) const =0
 Verify if the object contains a neural network. More...
 
virtual std::string getType (void) const =0
 Get the ky (type) of the object in the environment. More...
 
virtual void setPosition (sf::Vector2f const &position)=0
 Set the current position of the object. More...
 
virtual void setIsDead (bool condition)=0
 Set the current state of the object. More...
 
virtual void setElapsedTime (sf::Time &time)=0
 Set the elapsed time between the previous and the current update. More...
 
virtual IObjectClone (void)=0
 Clone the current object. More...
 
virtual void Update (void)=0
 Update the object.
 

Additional Inherited Members

- Protected Member Functions inherited from Graphics::IObject
virtual void draw (sf::RenderTarget &target, sf::RenderStates states) const =0
 Allow the object to be drawn on the window. More...
 

Detailed Description

Define the interface of an object that contains a neural network.

Member Function Documentation

virtual double Graphics::IBrain::getFitness ( void  ) const
pure virtual

Get the current fitness of the object.

Returns
double
virtual void Graphics::IBrain::setBrain ( GANN::ANN const &  brain)
pure virtual

Set the current neural network of the object.

Parameters
brain: Contains the new neural network.
virtual void Graphics::IBrain::setFitness ( double  fitness)
pure virtual

Set the current fitness of the object.

Parameters
fitness: Contains the new fitness of the object.
virtual void Graphics::IBrain::setInput ( unsigned int  index,
double  value 
)
pure virtual

Set an input for the neural network.

Parameters
index: Contains the index of the input.
value: Contains the input value.

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