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

Retinal_Composite Class Reference

Base class for composite objects, which are Retinal_Objects which may be composed of other Retinal_Objects. More...

#include <retinalobjs.h>

Inheritance diagram for Retinal_Composite

Inheritance graph

[legend]
Collaboration diagram for Retinal_Composite:

Collaboration graph

[legend]
List of all members.

Public Types

enum  AccumulationType {
  Max,
  Min,
  Add,
  OneHot
}
 Possible values for an accum_type.


Public Methods

Constructors and destructors
 Retinal_Composite ( const string& name_val, AccumulationType accum_type_i=Max, const VarMap& init_vars=VarMap())
RetinalObjectStringArgs::ParamList paramlist ()
 Retinal_Composite ( const string& name_val, RetinalObjectStringArgs& sa)
 Retinal_Composite (const Retinal_Composite& b)
virtual ~Retinal_Composite ()
Primary Interface
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...

Composite-only interface
virtual void add (Retinal_Object* obj)
 Incorporate the given retinal object (must be allocated from the heap). More...

virtual bool is_empty () const
 Whether there are currently any children. More...

virtual Retinal_Objectfind (const string& othername)
 Returns the first object with a matching name from a preorder search on self and children. More...

virtual void remove (const string& name="")
 Remove all children with the specified name. More...

virtual void remove_all ()
 Remove all children; separate routine for use with for_each. More...

virtual const Retinal_Objectmostactive (Coordinate x, Coordinate y) const
 Rarely needed: Returns child which has the highest activation at that location, or self if childless. More...

Retinal_Objectoperator[] (unsigned int idx) const
 Deprecated: Returns child specified by number. More...

size_t size () const
 Incorporate the given retinal object (must be allocated from the heap). More...

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

virtual Retinal_Objectclone () const
 Return an identical copy of this object allocated from the heap. More...


Protected Types

typedef std::vector<Retinal_Object*> ChildrenContainer
 Container with pointers to the child objects managed by this instance. More...

typedef ChildrenContainer::iterator iterator
 Iterator over this instance's children. More...

typedef ChildrenContainer::const_iterator const_iterator
 Iterator over this instance's children. More...


Protected Methods

Activity accum_base () const
 Starting value for an accumulation. More...


Protected Attributes

ChildrenContainer children
 The child objects managed by this instance. More...

AccumulationType accum_type
 How to combine the responses from multiple children. More...

Variable cosmt
 Cached values for activ(). More...

Variable sinmt
Variable cx
Variable cy
Variable div_size
Retinal_Objectdominant_child
 If accum_type is OneHot, the currently-dominant child. More...


Detailed Description

Base class for composite objects, which are Retinal_Objects which may be composed of other Retinal_Objects.

Additional operations are supported for composite objects; other derived Retinal_Objects should rarely need to define their own operations other than those overriding or completing the ones in Retinal_Object.

Definition at line 309 of file retinalobjs.h.


Member Typedef Documentation

typedef std::vector<Retinal_Object*> Retinal_Composite::ChildrenContainer [protected]
 

Container with pointers to the child objects managed by this instance.

Definition at line 406 of file retinalobjs.h.

typedef ChildrenContainer::const_iterator Retinal_Composite::const_iterator [protected]
 

Iterator over this instance's children.

Definition at line 410 of file retinalobjs.h.

typedef ChildrenContainer::iterator Retinal_Composite::iterator [protected]
 

Iterator over this instance's children.

Definition at line 408 of file retinalobjs.h.


Member Enumeration Documentation

enum Retinal_Composite::AccumulationType
 

Possible values for an accum_type.

Definition at line 312 of file retinalobjs.h.


Constructor & Destructor Documentation

Retinal_Composite::Retinal_Composite ( const string & name_val,
AccumulationType accum_type_i = Max,
const VarMap & init_vars = VarMap() )
 

Definition at line 316 of file retinalobjs.h.

Retinal_Composite::Retinal_Composite ( const string & name_val,
RetinalObjectStringArgs & sa )
 

Definition at line 325 of file retinalobjs.h.

Retinal_Composite::Retinal_Composite ( const Retinal_Composite & b )
 

Definition at line 333 of file retinalobjs.h.

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

Definition at line 338 of file retinalobjs.h.


Member Function Documentation

Activity Retinal_Composite::accum_base ( ) const [protected]
 

Starting value for an accumulation.

Definition at line 247 of file retinalobjs.c.

void Retinal_Composite::add ( Retinal_Object * obj ) [inline, virtual]
 

Incorporate the given retinal object (must be allocated from the heap).

Definition at line 354 of file retinalobjs.h.

Referenced by WorldViews::create_object().

Retinal_Object * Retinal_Composite::clone ( ) const [inline, virtual]
 

Return an identical copy of this object allocated from the heap.

Reimplemented from Retinal_Object.

Reimplemented in Retinal_ManagedComposite, and Retinal_AnchoredManagedComposite.

Definition at line 400 of file retinalobjs.h.

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

Returns the first object with a matching name from a preorder search on self and children.

The empty string matches the first object found, whatever it is.

Reimplemented from Retinal_Object.

Definition at line 364 of file retinalobjs.h.

bool Retinal_Composite::is_empty ( ) const [inline, virtual]
 

Whether there are currently any children.

Definition at line 357 of file retinalobjs.h.

const Retinal_Object & Retinal_Composite::mostactive ( Coordinate x,
Coordinate y ) const [virtual]
 

Rarely needed: Returns child which has the highest activation at that location, or self if childless.

There might be a way to encode this using max_element, mem_fun, bind1st, bind2nd, etc.

Definition at line 283 of file retinalobjs.c.

bool Retinal_Composite::next ( void ) [virtual]
 

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

Reimplemented from Retinal_Object.

Reimplemented in Retinal_ManagedComposite.

Definition at line 122 of file retinalobjs.c.

Retinal_Object * Retinal_Composite::operator[] ( unsigned int idx ) const [inline]
 

Deprecated: Returns child specified by number.

Definition at line 392 of file retinalobjs.h.

RetinalObjectStringArgs::ParamList Retinal_Composite::paramlist ( )
 

Definition at line 140 of file retinalobjs.c.

void Retinal_Composite::remove ( const string & name = "" ) [inline, virtual]
 

Remove all children with the specified name.

Definition at line 374 of file retinalobjs.h.

Referenced by WorldViews::remove_object().

void Retinal_Composite::remove_all ( ) [inline, virtual]
 

Remove all children; separate routine for use with for_each.

Definition at line 384 of file retinalobjs.h.

void Retinal_Composite::reset ( ) [virtual]
 

Reset to the starting state.

Reimplemented from Retinal_Object.

Definition at line 131 of file retinalobjs.c.

size_t Retinal_Composite::size ( ) const [inline]
 

Incorporate the given retinal object (must be allocated from the heap).

Definition at line 393 of file retinalobjs.h.

string Retinal_Composite::stringrep ( ) const [virtual]
 

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

Reimplemented from Retinal_Object.

Reimplemented in Retinal_AnchoredManagedComposite.

Definition at line 311 of file retinalobjs.c.

bool Retinal_Composite::update ( ) const [virtual]
 

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

Reimplemented from Retinal_Object.

Definition at line 156 of file retinalobjs.c.


Member Data Documentation

AccumulationType Retinal_Composite::accum_type [protected]
 

How to combine the responses from multiple children.

Definition at line 415 of file retinalobjs.h.

ChildrenContainer Retinal_Composite::children [protected]
 

The child objects managed by this instance.

Definition at line 412 of file retinalobjs.h.

Variable Retinal_Composite::cosmt [mutable, protected]
 

Cached values for activ().

Definition at line 419 of file retinalobjs.h.

Variable Retinal_Composite::cx [protected]
 

Reimplemented from Retinal_Object.

Definition at line 419 of file retinalobjs.h.

Variable Retinal_Composite::cy [protected]
 

Reimplemented from Retinal_Object.

Definition at line 419 of file retinalobjs.h.

Variable Retinal_Composite::div_size [protected]
 

Definition at line 419 of file retinalobjs.h.

Retinal_Object * Retinal_Composite::dominant_child [mutable, protected]
 

If accum_type is OneHot, the currently-dominant child.

Definition at line 421 of file retinalobjs.h.

Variable Retinal_Composite::sinmt [protected]
 

Definition at line 419 of file retinalobjs.h.


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