Package jline.lang
Class Ensemble
java.lang.Object
jline.lang.Model
jline.lang.Ensemble
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Environment,LayeredNetwork
A model defined by a collection of sub-models
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of network models in this ensemble.getModel(int modelIdx) Gets a specific network model from the ensemble by index.static NetworkCreates a union Network from a list of Networks.static NetworkCreates a union Network from all Networks in an ensemble.voidsetEnsemble(List<Network> ensemble) Sets the list of network models for this ensemble.intsize()Gets the number of network models in this ensemble.static NetworkAlias for merge - creates a union Network from this ensemble.Methods inherited from class jline.lang.Model
getName, getVersion, setName, setVersion
-
Field Details
-
ensemble
-
-
Constructor Details
-
Ensemble
Creates a new ensemble containing the specified network models.- Parameters:
models- the list of network models to include in this ensemble
-
Ensemble
Creates a new ensemble with the specified name. The ensemble's model list must be set separately.- Parameters:
name- the name for this ensemble
-
-
Method Details
-
getEnsemble
Gets the list of network models in this ensemble.- Returns:
- the list of network models
-
setEnsemble
Sets the list of network models for this ensemble.- Parameters:
ensemble- the list of network models to set
-
getModel
Gets a specific network model from the ensemble by index.- Parameters:
modelIdx- the index of the model to retrieve (0-based)- Returns:
- the network model at the specified index
- Throws:
IndexOutOfBoundsException- if the index is out of range
-
size
public int size()Gets the number of network models in this ensemble.- Returns:
- the number of models in the ensemble
-
merge
Creates a union Network from all Networks in an ensemble. Returns a single Network containing all nodes and classes from each Network in the ensemble as disconnected subnetworks. Node and class names are prefixed with their originating model name to avoid collisions.- Parameters:
ensemble- the Ensemble object to merge- Returns:
- Network object containing merged subnetworks
-
merge
Creates a union Network from a list of Networks. Returns a single Network containing all nodes and classes from each Network as disconnected subnetworks. Node and class names are prefixed with their originating model name to avoid collisions.- Parameters:
models- the list of Network objects to merge- Returns:
- Network object containing merged subnetworks
-
toNetwork
Alias for merge - creates a union Network from this ensemble.- Parameters:
ensemble- the Ensemble object to convert- Returns:
- Network object containing merged subnetworks
-