WinnerTakeAllConfigurator Class Reference

WinnerTakeAll configurator. More...

#include <Neuro/WinnerTakeAllConfigurator.H>

Inheritance diagram for WinnerTakeAllConfigurator:
Inheritance graph
[legend]
Collaboration diagram for WinnerTakeAllConfigurator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 WinnerTakeAllConfigurator (OptionManager &mgr, const std::string &descrName="Winner-Take-All Configurator", const std::string &tagName="WinnerTakeAllConfigurator")
 Constructor.
virtual ~WinnerTakeAllConfigurator ()
 destructor
nub::ref< WinnerTakeAllgetWTA () const
 Get the chosen WTA.

Protected Member Functions

virtual void paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status)
 Intercept people changing our ModelParam.

Protected Attributes

OModelParam< std::stringitsWTAtype
 type of winner-take-all

Detailed Description

WinnerTakeAll configurator.

This will export the --wta-type=XX command-line option and will instantiate a WTA of the desired type as the option gets assigned a value. As this happens, new options may become available in the command-line. To see them, use --help AFTER you have chosen the type to use. The current WTA may be retrieved using getWTA().

Definition at line 55 of file WinnerTakeAllConfigurator.H.


Constructor & Destructor Documentation

WinnerTakeAllConfigurator::WinnerTakeAllConfigurator ( OptionManager mgr,
const std::string descrName = "Winner-Take-All Configurator",
const std::string tagName = "WinnerTakeAllConfigurator" 
)

Constructor.

Definition at line 54 of file WinnerTakeAllConfigurator.C.

References ModelComponent::addSubComponent().

WinnerTakeAllConfigurator::~WinnerTakeAllConfigurator (  )  [virtual]

destructor

Definition at line 66 of file WinnerTakeAllConfigurator.C.


Member Function Documentation

nub::ref< WinnerTakeAll > WinnerTakeAllConfigurator::getWTA (  )  const

Get the chosen WTA.

You should call this during start() of the ModelComponent that needs the WTA. CAUTION: this may be a rutz::shared_ptr(NULL) if no WTA type has been chosen.

Definition at line 72 of file WinnerTakeAllConfigurator.C.

void WinnerTakeAllConfigurator::paramChanged ( ModelParamBase *const   param,
const bool  valueChanged,
ParamClient::ChangeStatus status 
) [protected, virtual]

Intercept people changing our ModelParam.

See ModelComponent.H; as parsing the command-line or reading a config file sets our name, we'll also here instantiate a controller of the proper type (and export its options)

Reimplemented from ModelComponent.

Definition at line 79 of file WinnerTakeAllConfigurator.C.

References ModelComponent::addSubComponent(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsWTAtype, MC_RECURSE, ModelComponent::removeSubComponent(), and nub::ref< T >::reset().


Member Data Documentation

type of winner-take-all

Definition at line 75 of file WinnerTakeAllConfigurator.H.

Referenced by paramChanged().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:26:50 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3