public abstract class Subnetwork extends Group
Constructor and Description |
---|
Subnetwork(Network net)
Create subnetwork group.
|
Modifier and Type | Method and Description |
---|---|
void |
addAndLabelSynapseGroup(SynapseGroup synGrp)
Adds an already constructed synapse group to the subnetwork and provides
it with an appropriate label.
|
void |
addNeuronGroup(NeuronGroup group)
Add a neuron group.
|
void |
addRowToTrainingSet()
If this subnetwork is trainable, then add the current activation of the
"input" neuron group to the input data of the training set.
|
void |
addSynapseGroup(SynapseGroup group)
Add a synapse group.
|
void |
clearActivations()
Set all activations to 0.
|
SynapseGroup |
connectNeuronGroups(NeuronGroup source,
NeuronGroup target)
Connects one group of neurons to another group of neurons using an All to
All connection.
|
SynapseGroup |
connectNeuronGroups(NeuronGroup source,
NeuronGroup target,
ConnectNeurons connection)
Connects two groups of neurons according to some connection style.
|
SynapseGroup |
connectNeuronGroups(NeuronGroup source,
NeuronGroup target,
java.lang.String sourceLabel,
java.lang.String targetLabel,
ConnectNeurons connection)
Connects two groups of neurons according to some connection style, and
allows for custom labels of the neuron groups within the weights label.
|
void |
delete()
Perform necessary deletion cleanup.
|
boolean |
displayNeuronGroups() |
boolean |
getEnabled() |
java.util.List<Neuron> |
getFlatNeuronList()
Return a "flat" list containing every neuron in every neuron group in
this subnetwork.
|
java.util.List<Synapse> |
getFlatSynapseList()
Return a "flat" list containing every synapse in every synapse group in
this subnetwork.
|
int |
getIndexOfNeuronGroup(NeuronGroup group)
Returns the index of a neuron group.
|
java.lang.String |
getLongDescription()
Get long description for info box, formmated in html.
|
protected java.util.List<Neuron> |
getModifiableNeuronList()
Returns a "flat" list containing every neuron in every neuron group in
this subnetwork.
|
NeuronGroup |
getNeuronGroup()
Get the first neuron group in the list.
|
NeuronGroup |
getNeuronGroup(int index)
Get a neuron group by index.
|
NeuronGroup |
getNeuronGroupByLabel(java.lang.String label)
Find neuron group with a given label, or null if none found.
|
int |
getNeuronGroupCount()
Get number of neuron groups or "layers" in the list.
|
java.util.List<NeuronGroup> |
getNeuronGroupList()
Returns an unmodifiable version of the neuron group list.
|
java.util.List<java.util.List<Neuron>> |
getNeuronGroupsAsList()
Return neuron groups as a list.
|
SynapseGroup |
getSynapseGroup()
Get the first synapse group in the list.
|
SynapseGroup |
getSynapseGroup(int index)
Get a synapse group by index.
|
SynapseGroup |
getSynapseGroupByLabel(java.lang.String label)
Find synapse group with a given label, or null if none found.
|
int |
getSynapseGroupCount()
Get number of synapse groups in the list.
|
java.util.List<SynapseGroup> |
getSynapseGroupList()
Returns an unmodifiable version of the synapse group list.
|
java.lang.String |
getUpdateMethodDesecription()
Returns a description of this group's update method, which is displayed
in the update manager panel.
|
boolean |
isEmpty()
Whether this group is empty or not.
|
void |
recursivelySetIds()
Set the id for this group.
|
void |
removeNeuronGroup(NeuronGroup neuronGroup)
Remove a neuron group.
|
void |
removeSynapseGroup(SynapseGroup synapseGroup)
Remove a synapse group.
|
void |
setDisplayNeuronGroups(boolean displayNeuronGroups) |
void |
setEnabled(boolean enabled) |
int |
size() |
java.lang.String |
toString() |
void |
update()
Update this group.
|
getId, getLabel, getParentGroup, getParentNetwork, getStateInfo, hasParentGroup, isMarkedForDeletion, isTopLevelGroup, setId, setLabel, setMarkedForDeletion, setParentGroup, setStateInfo
public Subnetwork(Network net)
net
- parent network.public void delete()
Group
public boolean isEmpty()
Group
public void addSynapseGroup(SynapseGroup group)
group
- the synapse group to addpublic void addNeuronGroup(NeuronGroup group)
group
- the neuron group to addpublic SynapseGroup connectNeuronGroups(NeuronGroup source, NeuronGroup target)
source
- the source grouptarget
- the target grouppublic SynapseGroup connectNeuronGroups(NeuronGroup source, NeuronGroup target, ConnectNeurons connection)
source
- the source grouptarget
- the target groupconnection
- the type of connection desired between the two groupspublic SynapseGroup connectNeuronGroups(NeuronGroup source, NeuronGroup target, java.lang.String sourceLabel, java.lang.String targetLabel, ConnectNeurons connection)
source
- the source grouptarget
- the target groupsourceLabel
- the name of the source group in the weights labeltargetLabel
- the name of the target group in the weights labelconnection
- the type of connection desired between the two groupspublic void addAndLabelSynapseGroup(SynapseGroup synGrp)
synGrp
- group to addpublic void removeNeuronGroup(NeuronGroup neuronGroup)
neuronGroup
- group to removepublic void removeSynapseGroup(SynapseGroup synapseGroup)
synapseGroup
- group to removepublic NeuronGroup getNeuronGroup(int index)
index
- which neuron group to getpublic NeuronGroup getNeuronGroupByLabel(java.lang.String label)
label
- label to search for.public SynapseGroup getSynapseGroupByLabel(java.lang.String label)
label
- label to search for.public NeuronGroup getNeuronGroup()
public int getNeuronGroupCount()
public java.util.List<NeuronGroup> getNeuronGroupList()
public java.util.List<java.util.List<Neuron>> getNeuronGroupsAsList()
public int getIndexOfNeuronGroup(NeuronGroup group)
group
- the group being queried.public SynapseGroup getSynapseGroup(int index)
index
- which synapse group to getpublic SynapseGroup getSynapseGroup()
public int getSynapseGroupCount()
public java.util.List<SynapseGroup> getSynapseGroupList()
public java.util.List<Neuron> getFlatNeuronList()
protected java.util.List<Neuron> getModifiableNeuronList()
public java.util.List<Synapse> getFlatSynapseList()
public int size()
public java.lang.String getLongDescription()
public boolean getEnabled()
public void setEnabled(boolean enabled)
enabled
- public void update()
Group
public boolean displayNeuronGroups()
public void setDisplayNeuronGroups(boolean displayNeuronGroups)
displayNeuronGroups
- the displayNeuronGroups to setpublic void clearActivations()
public java.lang.String getUpdateMethodDesecription()
Group
getUpdateMethodDesecription
in class Group
public void addRowToTrainingSet()
public void recursivelySetIds()
Group
recursivelySetIds
in class Group