#include <retinalobjs.h>
Inheritance diagram for Retinal_Object


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<Variable> | VarGen |
| 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... | |
| Variable* | get_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<Coordinate> | BBox |
| 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 |
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.
|
|
Concrete type of bounding box to use.
Definition at line 54 of file retinalobjs.h. |
|
|
Type of ValueGenerator to use for variables.
Definition at line 60 of file retinalobjs.h. |
|
|
Type of ValueGenerator map to use to hold variables.
Definition at line 62 of file retinalobjs.h. |
|
|
Underlying type for a ValueGenerator variable.
Definition at line 58 of file retinalobjs.h. |
|
|
Definition at line 66 of file retinalobjs.h. |
|
|
Definition at line 72 of file retinalobjs.h. |
|
|
Definition at line 76 of file retinalobjs.h. |
|
|
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()(). |
|
|
Query current angle.
Reimplemented from Retinal_Obj. Reimplemented in Retinal_AnchoredManagedComposite. Definition at line 141 of file retinalobjs.h. |
|
|
As activation() is to activ(), this is to default_activ().
Definition at line 165 of file retinalobjs.h. Referenced by DefaultActivityAccumulator::operator()(). |
|
|
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(). |
|
|
Query whether the object is currently displayed.
Definition at line 125 of file retinalobjs.h. |
|
|
Query name string.
Definition at line 130 of file retinalobjs.h. Referenced by Retinal_AnchoredManagedComposite::stringrep(). |
|
|
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(). |
|
|
Deprecated: get a pointer to the actual parameter storage location.
Definition at line 138 of file retinalobjs.h. |
|
|
For use in complicated constructors: set a lot of variables at once.
Definition at line 148 of file retinalobjs.h. |
|
|
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(). |
|
|
Replace all Variables with those in the specified object.
Definition at line 121 of file retinalobjs.h. |
|
|
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(). |
|
|
Set whether the object is currently displayed.
Definition at line 127 of file retinalobjs.h. |
|
|
Set name string.
Definition at line 132 of file retinalobjs.h. |
|
|
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(). |
|
|
(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(). |
|
|
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(). |
|
|
Definition at line 174 of file retinalobjs.h. |
|
|
Bounding box enclosing this object in the plane.
Definition at line 169 of file retinalobjs.h. |
1.2.1 written by Dimitri van Heesch,
© 1997-2000