org.joone.helpers.structure
Class ConnectionHelper
- java.lang.Object
-
- org.joone.helpers.structure.ConnectionHelper
-
public class ConnectionHelper extends java.lang.ObjectThis class permits to easily make connections between elements of a neural network. In this class all the needed logic is already implemented.
-
-
Constructor Summary
Constructors Constructor and Description ConnectionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleancanConnect(java.lang.Object source, java.lang.Object target)Checks if two elements of a neural network can be attached Warning: This method is sensitive to the order of the elements.static booleanconnect(java.lang.Object source, java.lang.Object media, java.lang.Object target)Connects two elements of a neural network Warning: This method is sensitive to the order of the elements.static booleandisconnect(java.lang.Object source, java.lang.Object target)Disconnects two elements.
-
-
-
Method Detail
-
canConnect
public static boolean canConnect(java.lang.Object source, java.lang.Object target)Checks if two elements of a neural network can be attached Warning: This method is sensitive to the order of the elements. Example: canConnect(Layer, StreamInputSynapse) returns false canConnect(StreamInputSynapse, Layer) returns true- Parameters:
source- he source elementtarget- The target element- Returns:
- true if the connection can be established
-
connect
public static boolean connect(java.lang.Object source, java.lang.Object media, java.lang.Object target)Connects two elements of a neural network Warning: This method is sensitive to the order of the elements. Example: connect(Layer, null, StreamInputSynapse) returns false connect(StreamInputSynapse, null, Layer) returns true- Parameters:
source- The source elementtarget- The target elementmedia- If both source and target are Layers, this parameter contains the Synapse to use to connect them, otherwise null- Returns:
- true if the connection has been established
-
disconnect
public static boolean disconnect(java.lang.Object source, java.lang.Object target)Disconnects two elements. Warning: This method is sensitive to the order of the elements. If this method returns false when called with (obj1, obj2) as parameters, you should recall it using the parameters in reverse order (obj2, obj1)- Parameters:
source- The source element to disconnecttarget- The target element to disconnect- Returns:
- true if the two elements have been disconnected
-
-
DataMelt 3.0 © DataMelt by jWork.ORG