Class NetworkProjectionDryer
java.lang.Object
repast.simphony.freezedry.freezedryers.proj.ProjectionDryer<Network<?>>
repast.simphony.freezedry.freezedryers.proj.NetworkProjectionDryer
A class that handles Networks. This uses the
DefaultNetworkFactory
to create directed
or undirected networks (based on the network's type). This stores the
directedness of the network and its edges (including the edge weights).- Author:
- Jerry Vos
-
Field Summary
Fields inherited from class repast.simphony.freezedry.freezedryers.proj.ProjectionDryer
CONTEXT_LISTENING_KEY, NAME_KEY, PROJ_LISTENING_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Stores the network's directedness and edges (each edges as a tuple of (source, target, weight)).protected Object[]
getEdgeProps
(RepastEdge edge) boolean
Returns true when the type could be casted toNetwork
.Network<?>
instantiate
(Context<?> context, Map<String, Object> properties) This instantiates the network using theDefaultNetworkFactory
, based on the network's name, and directedness (determined from the properties).protected void
protected void
Loads in the network's edges.Methods inherited from class repast.simphony.freezedry.freezedryers.proj.ProjectionDryer
addProjectionDryer, buildAndAddProjection, getDryer, getProperties
-
Field Details
-
DIRECTED_KEY
- See Also:
-
EDGES_KEY
- See Also:
-
-
Constructor Details
-
NetworkProjectionDryer
public NetworkProjectionDryer()
-
-
Method Details
-
addProperties
Stores the network's directedness and edges (each edges as a tuple of (source, target, weight)).- Specified by:
addProperties
in classProjectionDryer<Network<?>>
- Parameters:
context
- the context the network is a member ofnet
- the network itselfmap
- the destination for the properties
-
getEdgeProps
-
instantiate
This instantiates the network using theDefaultNetworkFactory
, based on the network's name, and directedness (determined from the properties).- Specified by:
instantiate
in classProjectionDryer<Network<?>>
- Parameters:
context
- the context the network is a part ofproperties
- the properties of the network- Returns:
- a created projection
-
loadProperties
Loads in the network's edges.- Overrides:
loadProperties
in classProjectionDryer<Network<?>>
- Parameters:
context
- ignoredproj
- the network edges will be loaded intoproperties
- the properties for the network
-
loadEdges
-
handles
Returns true when the type could be casted toNetwork
.- Specified by:
handles
in classProjectionDryer<Network<?>>
- Parameters:
type
- the type of the projection- Returns:
- if the implementation handles the given type
- See Also:
-