#include <GEnergy.h>
Inheritance diagram for GCS::GEnergy:


Public Member Functions | |
| GEnergy () | |
| GEnergy (double level, double amount, double sigma) | |
| GEnergy (const GEnergy &original) | |
| virtual | ~GEnergy () |
| double | level () const |
| double | amount () const |
| double | sigma () const |
| void | set (double level, double amount, double sigma) |
| void | set (const GEnergy original) |
| void | operator= (const GEnergy &original) |
| GEnergy | take (double fraction) |
| void | put (GEnergy &energy) |
Protected Attributes | |
| double | Level |
| double | Amount |
| double | Sigma |
Energy consists of:
See the description of the attributes for details about how energy is represented.
Togehter with the element's form the energy characterises the element. agents make the element "alive".
|
|
Construct an empty energy object. |
|
||||||||||||||||
|
This constructor initalizes with given attributes. |
|
|
Copy constructor |
|
|
if GEnergy is subclassed then a virtual destructor ensures proper deletion of a GEnergy object
|
|
|
|
|
|
|
|
|
Copies values from given energy. |
|
|
Adds given energy.
|
|
|
Copies values from given energy. |
|
||||||||||||||||
|
Sets the energy to given values. |
|
|
|
|
|
Removes given fraction of this energy and returns it. This can be useful for sending out influences with some fraction of the elements own energy.
|
|
|
Since it is not possible (hardware limitations) to represent every atom as a seperate element the amount attribute is used to tell how much of this energy is in the element. |
|
|
The energy level is just like a frequency - put on a very large scale it can either represent sound (low frequency) or light (high frequency). Even different light colours are just represented by different energy levels. Thus every object gets its individual characteristic by its energy. |
|
|
Sigma tells the range of the energy "level" ( in frequency, not space ); the smaller sigma is the more "distinct" and less changeable the energy is; it should thus be only influencable by a narrow band of frequency (with low sigma). This is needed because we don't work on (sub-)atomic levels where there is really only one energy level. So we get a collection of energies with a general average level (this is where the attribute "level" is set to) and a divergence around this average value. The result is a certain amount of energy with a energy level of a "normal distribution". |
1.3.6