Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GCS::GEnergy Class Reference

Everything consists of energy, it thus classifies the element. More...

#include <GEnergy.h>

Inheritance diagram for GCS::GEnergy:

Inheritance graph
[legend]
Collaboration diagram for GCS::GEnergy:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Everything consists of energy, it thus classifies the element.

Author:
Raphael Langerhorst
Everything consists of energy. So, naturally, the "content" of objects are certain energies. Only with energy can anything be done, thus, agents should be programmed with heavy usage of energy to determine their actions. Also, to actually perform an action an agent normally uses energy to determine the strength and character of the action.

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".

Note:
The great idea behind the whole G System is that everything actually influences each other AND that the only attribute ever needed (if we don't specialise anything) is energy. This results in the fact that elements influence each other depending on their energies. Influencing behaviour is defined by the agents of an element.
See also:
GAgent, GForm


Constructor & Destructor Documentation

GCS::GEnergy::GEnergy  )  [inline]
 

Construct an empty energy object.

GCS::GEnergy::GEnergy double  level,
double  amount,
double  sigma
[inline]
 

This constructor initalizes with given attributes.

GCS::GEnergy::GEnergy const GEnergy original  )  [inline]
 

Copy constructor

virtual GCS::GEnergy::~GEnergy  )  [inline, virtual]
 

if GEnergy is subclassed then a virtual destructor ensures proper deletion of a GEnergy object

Note:
There should be no reason for subclassing. Please contact the author if you think there is.


Member Function Documentation

double GCS::GEnergy::amount  )  const [inline]
 

Returns:
energy amount.

double GCS::GEnergy::level  )  const [inline]
 

Returns:
energy level.

void GCS::GEnergy::operator= const GEnergy original  )  [inline]
 

Copies values from given energy.

void GCS::GEnergy::put GEnergy energy  )  [inline]
 

Adds given energy.

Note:
The attributes are not just summed up, it's more like mixing two kinds of liquids together.
Todo:
depending on sigma and energy level not all energy should

be accepted!

void GCS::GEnergy::set const GEnergy  original  )  [inline]
 

Copies values from given energy.

void GCS::GEnergy::set double  level,
double  amount,
double  sigma
[inline]
 

Sets the energy to given values.

double GCS::GEnergy::sigma  )  const [inline]
 

Returns:
energy sigma.

GEnergy GCS::GEnergy::take double  fraction  )  [inline]
 

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.

Returns:
fraction of own energy


Member Data Documentation

double GCS::GEnergy::Amount [protected]
 

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.

double GCS::GEnergy::Level [protected]
 

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.

double GCS::GEnergy::Sigma [protected]
 

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".


The documentation for this class was generated from the following file:
Generated on Thu Oct 21 21:18:22 2004 for G System by doxygen 1.3.6