Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Retinal_Object Class Reference

Semi-abstract base class: Retinal_Obj with a name, intensity scale, intensity offset, center X and Y position, and angle which can be enabled and disabled on command. More...

#include <retinalobjs.h>

Inheritance diagram for Retinal_Object

Inheritance graph

[legend]
Collaboration diagram for Retinal_Object:

Collaboration graph

[legend]
List of all members.

Quasi-protected members.

These members would otherwise be marked 'protected', but a Retinal_Composite object needs to be able to access them.

A composite object is not necessarily (or even usually) the same type as the objects it contains, and an obscure C++ rule stipulates that a class can only access protected members of objects of its own specific type. Thus even though these members are nominally public, only derived classes should use them.

virtual Activity default_activation () const
 As activation() is to activ(), this is to default_activ(). More...

BBox bounding_box
 Bounding box enclosing this object in the plane. More...


Public Types

typedef double Variable
 Underlying type for a ValueGenerator variable. More...

typedef ValueGenerator<VariableVarGen
 Type of ValueGenerator to use for variables. More...

typedef ValueGeneratorMap<
Variable
VarMap
 Type of ValueGenerator map to use to hold variables. More...


Public Methods

Constructors and destructors
 Retinal_Object (const string& name_val, const VarMap& init_vars=VarMap())
 Retinal_Object (const Retinal_Object& b)
virtual ~Retinal_Object ()
Primary Interface
If a derived class overrides one of these virtual functions, it should call this base-class version when it is done.

virtual bool next ()
 Advance to the next state (whatever that means for this object). More...

virtual void reset ()
 Reset to the starting state. More...

virtual bool update () const
 Must be called just before calling activation() one or more times. More...

virtual Activity activation (Coordinate x, Coordinate y) const
 Returns the activation at a given set of coordinates. More...

Other functions which may be useful
virtual string stringrep () const
 (Partial) representation of this object's state as a string. More...

virtual Retinal_Object* clone () const = 0
 Return an identical copy of this object allocated from the heap.

virtual void relink (const Retinal_Object* master)
 Replace all Variables with those in the specified object. More...

bool get_active () const
 Query whether the object is currently displayed. More...

void set_active (bool whether_active)
 Set whether the object is currently displayed. More...

const string& get_name () const
 Query name string. More...

void set_name (const string& newname)
 Set name string. More...

const Variable get_var (const string& varname) const
 Query a parameter. More...

Variableget_varptr (const string& varname)
 Deprecated: get a pointer to the actual parameter storage location. More...

virtual Angle angle () const
 Query current angle. More...

virtual Retinal_Object* find (const string& othername)
 Find by name; see Retinal_Composite::find() for more info. More...

void merge_vars (const VarMap& init_vars)
 For use in complicated constructors: set a lot of variables at once. More...


Protected Types

typedef AARBoundingBox<CoordinateBBox
 Concrete type of bounding box to use. More...


Protected Methods

const void set_var_default (const string& varname, Variable val)
 Set a parameter only if not yet set; accepts only a variable, not a generator. More...


Friends

class  DefaultActivityAccumulator

Detailed Description

Semi-abstract base class: Retinal_Obj with a name, intensity scale, intensity offset, center X and Y position, and angle which can be enabled and disabled on command.

This class is actually fairly concrete, supplying implementations for nearly all operations. A derived class need only provide activ() and clone() to be complete. Most will also override update() to handle values needed to be cached for activ() to use quickly, and some may override other virtual functions.

The parameters are primarily ValueGenerator types; these are all passed in a map for convenience in object creation and to make it easier to manage next() and reset() of those variables. The current values of those variables may be cached internally by a call to update(). To ensure the coherence of this cache, update() should be called before calling activation(), after any ValueGenerator might have changed its value. Ordinarily this is achieved by calling update() just before a series of calls to activation().

No assignment operator is defined yet.

Definition at line 51 of file retinalobjs.h.


Member Typedef Documentation

typedef AARBoundingBox<Coordinate> Retinal_Object::BBox [protected]
 

Concrete type of bounding box to use.

Definition at line 54 of file retinalobjs.h.

typedef ValueGenerator<Variable> Retinal_Object::VarGen
 

Type of ValueGenerator to use for variables.

Definition at line 60 of file retinalobjs.h.

typedef ValueGeneratorMap<Variable> Retinal_Object::VarMap
 

Type of ValueGenerator map to use to hold variables.

Definition at line 62 of file retinalobjs.h.

typedef double Retinal_Object::Variable
 

Underlying type for a ValueGenerator variable.

Definition at line 58 of file retinalobjs.h.


Constructor & Destructor Documentation

Retinal_Object::Retinal_Object ( const string & name_val,
const VarMap & init_vars = VarMap() )
 

Definition at line 66 of file retinalobjs.h.

Retinal_Object::Retinal_Object ( const Retinal_Object & b )
 

Definition at line 72 of file retinalobjs.h.

Retinal_Object::~Retinal_Object ( ) [inline, virtual]
 

Definition at line 76 of file retinalobjs.h.


Member Function Documentation

Activity Retinal_Object::activation ( Coordinate x,
Coordinate y ) const [inline, virtual]
 

Returns the activation at a given set of coordinates.

Must call update() just before this, though multiple activation() calls in a row are fine.

Reimplemented from Retinal_Obj.

Reimplemented in Retinal_RandomNoise.

Definition at line 105 of file retinalobjs.h.

Referenced by Retinal_Composite::mostactive(), and ActivityAccumulator::operator()().

Angle Retinal_Object::angle ( ) const [inline, virtual]
 

Query current angle.

Reimplemented from Retinal_Obj.

Reimplemented in Retinal_AnchoredManagedComposite.

Definition at line 141 of file retinalobjs.h.

Activity Retinal_Object::default_activation ( ) const [inline, virtual]
 

As activation() is to activ(), this is to default_activ().

Definition at line 165 of file retinalobjs.h.

Referenced by DefaultActivityAccumulator::operator()().

Retinal_Object * Retinal_Object::find ( const string & othername ) [inline, virtual]
 

Find by name; see Retinal_Composite::find() for more info.

Reimplemented in Retinal_Composite.

Definition at line 144 of file retinalobjs.h.

Referenced by Retinal_Composite::find(), and WorldViews::print_object().

bool Retinal_Object::get_active ( ) const [inline]
 

Query whether the object is currently displayed.

Definition at line 125 of file retinalobjs.h.

const string & Retinal_Object::get_name ( ) const [inline]
 

Query name string.

Definition at line 130 of file retinalobjs.h.

Referenced by Retinal_AnchoredManagedComposite::stringrep().

const Variable Retinal_Object::get_var ( const string & varname ) const [inline]
 

Query a parameter.

Definition at line 135 of file retinalobjs.h.

Referenced by angle(), default_activation(), stringrep(), Retinal_RandomNoise::update(), update(), Retinal_PGM::update(), Retinal_FuzzyRing::update(), Retinal_FuzzyLine::update(), Retinal_Gabor::update(), Retinal_SineGrating::update(), Retinal_Rectangle::update(), Retinal_Gaussian::update(), Retinal_CircularGaussian::update(), and Retinal_Composite::update().

Variable * Retinal_Object::get_varptr ( const string & varname ) [inline]
 

Deprecated: get a pointer to the actual parameter storage location.

Definition at line 138 of file retinalobjs.h.

void Retinal_Object::merge_vars ( const VarMap & init_vars ) [inline]
 

For use in complicated constructors: set a lot of variables at once.

Definition at line 148 of file retinalobjs.h.

bool Retinal_Object::next ( void ) [inline, virtual]
 

Advance to the next state (whatever that means for this object).

Reimplemented from Retinal_Obj.

Reimplemented in Retinal_Composite, and Retinal_ManagedComposite.

Definition at line 86 of file retinalobjs.h.

Referenced by Retinal_ManagedComposite::next(), and Retinal_Composite::next().

void Retinal_Object::relink ( const Retinal_Object * master ) [inline, virtual]
 

Replace all Variables with those in the specified object.

Definition at line 121 of file retinalobjs.h.

void Retinal_Object::reset ( ) [inline, virtual]
 

Reset to the starting state.

Reimplemented from Retinal_Obj.

Reimplemented in Retinal_Composite.

Definition at line 87 of file retinalobjs.h.

Referenced by Retinal_Composite::reset().

void Retinal_Object::set_active ( bool whether_active ) [inline]
 

Set whether the object is currently displayed.

Definition at line 127 of file retinalobjs.h.

void Retinal_Object::set_name ( const string & newname ) [inline]
 

Set name string.

Definition at line 132 of file retinalobjs.h.

const void Retinal_Object::set_var_default ( const string & varname,
Variable val ) [inline, protected]
 

Set a parameter only if not yet set; accepts only a variable, not a generator.

Definition at line 177 of file retinalobjs.h.

Referenced by VarMap().

string Retinal_Object::stringrep ( ) const [virtual]
 

(Partial) representation of this object's state as a string.

Reimplemented from Retinal_Obj.

Reimplemented in Retinal_Composite, and Retinal_AnchoredManagedComposite.

Definition at line 56 of file retinalobjs.c.

Referenced by accumulate_stringreps(), WorldViews::print_object(), and Retinal_Composite::stringrep().

bool Retinal_Object::update ( ) const [inline, virtual]
 

Must be called just before calling activation() one or more times.

Reimplemented from Retinal_Obj.

Reimplemented in Retinal_Composite, Retinal_RandomNoise, Retinal_CircularGaussian, Retinal_Gaussian, Retinal_Rectangle, Retinal_SineGrating, Retinal_Gabor, Retinal_FuzzyLine, Retinal_FuzzyRing, and Retinal_PGM.

Definition at line 88 of file retinalobjs.h.

Referenced by Retinal_PGM::update(), Retinal_FuzzyRing::update(), Retinal_FuzzyLine::update(), Retinal_Gabor::update(), Retinal_SineGrating::update(), Retinal_Rectangle::update(), Retinal_Gaussian::update(), Retinal_CircularGaussian::update(), and Retinal_Composite::update().


Friends And Related Function Documentation

class DefaultActivityAccumulator [friend]
 

Definition at line 174 of file retinalobjs.h.


Member Data Documentation

BBox Retinal_Object::bounding_box [mutable]
 

Bounding box enclosing this object in the plane.

Definition at line 169 of file retinalobjs.h.


The documentation for this class was generated from the following files:
Generated at Mon Aug 21 00:31:24 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000