![]() |
NuPIC Core
Core algorithms for NuPIC(the Numenta Platform for Intelligent Computing), implemented in C++
|
Represents a named input to a Region. More...
#include <Input.hpp>
Public Types | |
| typedef std::vector < std::vector< size_t > > | SplitterMap |
Public Member Functions | |
| Input (Region ®ion, NTA_BasicType type, bool isRegionLevel) | |
| Constructor. More... | |
| ~Input () | |
| Destructor. | |
| void | setName (const std::string &name) |
| Set the name for the input. More... | |
| const std::string & | getName () const |
| Get the name of the input. More... | |
| void | addLink (const std::string &linkType, const std::string &linkParams, Output *srcOutput) |
| Create a new Link between this input and the srcOutput. More... | |
| Link * | findLink (const std::string &srcRegionName, const std::string &srcOutputName) |
| Locate an existing Link to the input. More... | |
| void | removeLink (Link *&link) |
| Removing an existing link from the input. More... | |
| void | prepare () |
| Make input data available. More... | |
| const Array & | getData () const |
| Get the data of the input. More... | |
| Region & | getRegion () |
| Get the Region that the input belongs to. More... | |
| const std::vector< Link * > & | getLinks () |
| Get all the Link objects added to the input. More... | |
| bool | isRegionLevel () |
| Tells whether the input is region level. More... | |
| size_t | evaluateLinks () |
| Called by Region.evaluateLinks() as part of network initialization. More... | |
| void | initialize () |
| Initialize the Input . More... | |
| bool | isInitialized () |
| Tells whether the Input is initialized. More... | |
| const SplitterMap & | getSplitterMap () const |
| Get splitter map from an initialized input. More... | |
| template<typename T > | |
| void | getInputForNode (size_t nodeIndex, std::vector< T > &input) const |
| explicitly instantiated for various types | |
Represents a named input to a Region.
(e.g. bottomUpIn)
| typedef std::vector< std::vector<size_t> > nupic::Input::SplitterMap |
| nupic::Input::Input | ( | Region & | region, |
| NTA_BasicType | type, | ||
| bool | isRegionLevel | ||
| ) |
Constructor.
| region | The region that the input belongs to. |
| type | The type of the input, i.e. TODO |
| isRegionLevel | Whether the input is region level, i.e. TODO |
| void nupic::Input::addLink | ( | const std::string & | linkType, |
| const std::string & | linkParams, | ||
| Output * | srcOutput | ||
| ) |
| size_t nupic::Input::evaluateLinks | ( | ) |
Called by Region.evaluateLinks() as part of network initialization.
| Link* nupic::Input::findLink | ( | const std::string & | srcRegionName, |
| const std::string & | srcOutputName | ||
| ) |
Locate an existing Link to the input.
It's called by Network.removeLink() and internally when adding a link
NULL if no such link exists | const Array& nupic::Input::getData | ( | ) | const |
Get the data of the input.
Array | const std::vector<Link*>& nupic::Input::getLinks | ( | ) |
| const std::string& nupic::Input::getName | ( | ) | const |
Get the name of the input.
| Region& nupic::Input::getRegion | ( | ) |
| const SplitterMap& nupic::Input::getSplitterMap | ( | ) | const |
Get splitter map from an initialized input.
| void nupic::Input::initialize | ( | ) |
Initialize the Input .
After the input has all the information it needs, it is initialized by this method. Volatile data structures (e.g. the input buffer) are set up。
| bool nupic::Input::isInitialized | ( | ) |
| bool nupic::Input::isRegionLevel | ( | ) |
Tells whether the input is region level.
| void nupic::Input::prepare | ( | ) |
Make input data available.
Called by Region.prepareInputs()
| void nupic::Input::removeLink | ( | Link *& | link | ) |
Removing an existing link from the input.
It's called in four cases:
It is an error to call this if our containing region is uninitialized.
| link | The Link to remove, possibly retrieved by findLink(), note that it is a reference to the pointer, not the pointer itself. |
| void nupic::Input::setName | ( | const std::string & | name | ) |
Set the name for the input.
Inputs need to know their own name for error messages.
| name | The name of the input |
1.8.3.1