Nano Brain for Unity v0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
NanoBrain.Cluster Class Reference

Description

A Cluster combines a collection of Nuclei to implement reusable behaviour.

A Cluster is an instantiation of a ClusterPrefab. Clusters can be nested inside other clusters.

Inheritance diagram for NanoBrain.Cluster:
NanoBrain.Nucleus

Public Types

enum  Type { None , Neuron , MemoryCell , Cluster }
 The types of Nucleus.
 

Public Member Functions

 Cluster (ClusterPrefab prefab, Cluster parent)
 Instantiate a new copy of a ClusterPrefab in the given parent.
 
 Cluster (ClusterPrefab prefab, ClusterPrefab parent=null)
 Add a new cluster to a ClusterPrefab.
 
override Nucleus Clone (ClusterPrefab parent)
 
override Nucleus ShallowCloneTo (Cluster parent)
 
void AddInstance ()
 
void AddInstance (ClusterPrefab prefab)
 
void RemoveInstance ()
 
bool SameSiblingsAs (Cluster[] otherSiblingClusters)
 
void AddArrayReceiver (Nucleus receiverToAdd, float weight=1)
 
void RefreshComputeOrders ()
 
void RefreshOutputs ()
 
bool TryGetNucleus (string nucleusName, out Nucleus foundNucleus)
 
Nucleus GetNucleus (string nucleusName)
 
Neuron GetNeuron (string neuronName)
 
Neuron GetNeuron (int thingId, string neuronName, string thingName=null)
 
bool DeleteNucleus (Nucleus nucleus)
 
virtual List< NucleusCollectReceivers (bool removeDuplicates=false)
 
List<(Neuron, Nucleus)> CollectConnections ()
 
List< SynapseCollectSynapsesTo (Cluster otherCluster)
 
void MoveReceivers (Cluster newCluster)
 
void UpdateFromNucleus (Nucleus startNucleus)
 
override void UpdateStateIsolated ()
 
void Refresh ()
 
virtual void Initialize ()
 
virtual void UpdateNuclei ()
 Update the state and recursively all Nuclei receiving data from this Nucleus.
 

Static Public Member Functions

static int GetNucleusIndex (List< Nucleus > nuclei, Nucleus nucleus)
 
static int GetNucleusIndex (List< Nucleus > nuclei, string nucleusName)
 

Public Attributes

ClusterPrefab prefab
 
Cluster[] siblingClusters
 
int instanceCount = 1
 
Dictionary< int, ClusterthingClusters = new()
 
List< Nucleusnuclei = new()
 
List< NucleussortedNuclei
 
List< Nucleus_inputs = null
 
string name
 The name of the Nucleus.
 
Cluster parent
 The cluster prefab in which the nucleus is located.
 

Protected Member Functions

int GetNucleusIndex (Nucleus[] nuclei, Nucleus nucleus)
 

Protected Attributes

List< Neuron_outputs = null
 

Properties

string baseName [get]
 The base name of the cluster. I don't think this is actively used at this moment.
 
virtual List< Nucleusinputs [get]
 
Dictionary< Nucleus, List< Nucleus > > computeOrders [get]
 
virtual Neuron defaultOutput [get]
 
List< Neuronoutputs [get]
 

Constructor & Destructor Documentation

◆ Cluster() [1/2]

NanoBrain.Cluster.Cluster ( ClusterPrefab  prefab,
Cluster  parent 
)

Instantiate a new copy of a ClusterPrefab in the given parent.

Parameters
prefabThe prefab to use
parentThe cluster in which this new cluster will be placed

◆ Cluster() [2/2]

NanoBrain.Cluster.Cluster ( ClusterPrefab  prefab,
ClusterPrefab  parent = null 
)

Add a new cluster to a ClusterPrefab.

Parameters
prefabThe prefab to copy
parentThe prefab in which the new copy is placed

Member Function Documentation

◆ UpdateNuclei()

virtual void NanoBrain.Nucleus.UpdateNuclei ( )
virtualinherited

Update the state and recursively all Nuclei receiving data from this Nucleus.

Reimplemented in NanoBrain.MemoryCell.

Member Data Documentation

◆ parent

Cluster NanoBrain.Nucleus.parent
inherited

The cluster prefab in which the nucleus is located.

The cluster instance in which the nucleus is located


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