NuPIC Core
Core algorithms for NuPIC(the Numenta Platform for Intelligent Computing), implemented in C++
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
nta::algorithms::connections::Connections Class Reference

Connections implementation in C++. More...

#include <Connections.hpp>

Public Member Functions

Segment createSegment (const Cell &cell)
 Creates a segment on the specified cell. More...
 
Synapse createSynapse (const Segment &segment, const Cell &presynapticCell, Permanence permanence)
 Creates a synapse on the specified segment. More...
 
void updateSynapsePermanence (const Synapse &synapse, Permanence permanence)
 Updates a synapse's permanence. More...
 
std::vector< SegmentsegmentsForCell (const Cell &cell)
 Gets the segments for a cell. More...
 
std::vector< SynapsesynapsesForSegment (const Segment &segment)
 Gets the synapses for a segment. More...
 
SynapseData dataForSynapse (const Synapse &synapse) const
 Gets the data for a synapse. More...
 
bool mostActiveSegmentForCells (const std::vector< Cell > &cells, std::vector< Cell > input, UInt synapseThreshold, Segment &retSegment) const
 Gets the segment with the most active synapses due to given input, from among all the segments on all the given cells. More...
 
Activity computeActivity (const std::vector< Cell > &input, Permanence permanenceThreshold, UInt synapseThreshold) const
 Forward-propagates input to synapses, dendrites, and cells, to compute their activity. More...
 
std::vector< SegmentactiveSegments (const Activity &activity)
 Gets the active segments from activity. More...
 
std::vector< CellactiveCells (const Activity &activity)
 Gets the active cells from activity. More...
 
UInt numSegments () const
 Gets the number of segments. More...
 
UInt numSynapses () const
 Gets the number of synapses. More...
 

Detailed Description

Connections implementation in C++.

Description The Connections class is a data structure that represents the connections of a collection of cells. It is used in the HTM learning algorithms to store and access data related to the connectivity of cells.

It's main utility is to provide a common, optimized data structure that all HTM learning algorithms can use. It is flexible enough to support any learning algorithm that operates on a collection of cells.

Each type of connection (proximal, distal, apical) should be represented by a different instantiation of this class. This class will help compute the activity along those connections due to active input cells. The responsibility for what effect that activity has on the cells and connections lies in the user of this class.

This class is optimized to store connections between cells, and compute the activity of cells due to input over the connections.

Definition at line 205 of file Connections.hpp.

Member Function Documentation

std::vector<Cell> nta::algorithms::connections::Connections::activeCells ( const Activity activity)

Gets the active cells from activity.

Parameters
activityActivity.
Return values
Activecells.
std::vector<Segment> nta::algorithms::connections::Connections::activeSegments ( const Activity activity)

Gets the active segments from activity.

Parameters
activityActivity.
Return values
Activesegments.
Activity nta::algorithms::connections::Connections::computeActivity ( const std::vector< Cell > &  input,
Permanence  permanenceThreshold,
UInt  synapseThreshold 
) const

Forward-propagates input to synapses, dendrites, and cells, to compute their activity.

Parameters
inputActive cells in the input.
permanenceThresholdOnly consider synapses with permanences greater than this threshold.
synapseThresholdOnly consider segments with number of active synapses greater than this threshold.
Return values
Activityto return.
Segment nta::algorithms::connections::Connections::createSegment ( const Cell cell)

Creates a segment on the specified cell.

Parameters
cellCell to create segment on.
Return values
Createdsegment.
Synapse nta::algorithms::connections::Connections::createSynapse ( const Segment segment,
const Cell presynapticCell,
Permanence  permanence 
)

Creates a synapse on the specified segment.

Parameters
segmentSegment to create synapse on.
presynapticCellCell to synapse on.
permanenceInitial permanence of new synapse.

Created synapse.

SynapseData nta::algorithms::connections::Connections::dataForSynapse ( const Synapse synapse) const

Gets the data for a synapse.

Parameters
synapseSynapse to get data for.
Return values
Synapsedata.
bool nta::algorithms::connections::Connections::mostActiveSegmentForCells ( const std::vector< Cell > &  cells,
std::vector< Cell input,
UInt  synapseThreshold,
Segment retSegment 
) const

Gets the segment with the most active synapses due to given input, from among all the segments on all the given cells.

Parameters
cellsCells to look among.
inputActive cells in the input.
synapseThresholdOnly consider segments with number of active synapses greater than this threshold.
segmentSegment to return.
Return values
Segmentfound?
UInt nta::algorithms::connections::Connections::numSegments ( ) const

Gets the number of segments.

Return values
Numberof segments.
UInt nta::algorithms::connections::Connections::numSynapses ( ) const

Gets the number of synapses.

Return values
Numberof synapses.
std::vector<Segment> nta::algorithms::connections::Connections::segmentsForCell ( const Cell cell)

Gets the segments for a cell.

Parameters
cellCell to get segments for.
Return values
Segmentson cell.
std::vector<Synapse> nta::algorithms::connections::Connections::synapsesForSegment ( const Segment segment)

Gets the synapses for a segment.

Parameters
segmentSegment to get synapses for.
Return values
Synapseson segment.
void nta::algorithms::connections::Connections::updateSynapsePermanence ( const Synapse synapse,
Permanence  permanence 
)

Updates a synapse's permanence.

Parameters
synapseSynapse to update.
permanenceNew permanence.

The documentation for this class was generated from the following file: