|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmapss.dif.ptolemy.GraphReader
mapss.dif.ptolemy.DIFGraphReader
public class DIFGraphReader
Conversion of Ptolemy II models to DIFGraphs.
This class provides methods for converting Ptolemy II models
into DIFGraph
s. All actors are deeply connected such that the
hierarchical ptolemy application can be expressed by a single graph.
For import and export of Ptolemy application, please see
DIFGraphImporter
and
DIFGraphExporter
.
GraphReader
Constructor Summary | |
---|---|
DIFGraphReader()
Construct a new graph reader. |
Method Summary | |
---|---|
protected java.lang.Object |
_computeEdgeWeight(ptolemy.actor.IOPort sourcePort,
ptolemy.actor.IOPort sinkPort)
Determine the weight to be assigned to the weighted graph edge that represents a given connection in a Ptolemy II model. |
protected java.lang.Object |
_computeNodeWeight(ptolemy.actor.Actor actor)
Determine the weight to be assigned to the weighted graph node that represents a given actor. |
protected mocgraph.Graph |
_initializeGraph(ptolemy.actor.CompositeActor compositeActor)
This method override the method in (ptolemy.actor.GraphReader). |
protected void |
_processNewEdge(mocgraph.Graph graph,
mocgraph.Edge edge,
ptolemy.actor.IOPort sourcePort,
ptolemy.actor.IOPort sinkPort)
Process a new edge that is added to the graph. |
protected void |
_processNewNode(mocgraph.Graph graph,
mocgraph.Node node,
ptolemy.actor.Actor actor)
Process a new node that is added to the graph. |
Methods inherited from class mapss.dif.ptolemy.GraphReader |
---|
_transformTopology, convert |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DIFGraphReader()
Method Detail |
---|
protected java.lang.Object _computeEdgeWeight(ptolemy.actor.IOPort sourcePort, ptolemy.actor.IOPort sinkPort)
_computeEdgeWeight
in class mapss.dif.ptolemy.GraphReader
sourcePort
- the output port of the connection associated with
the edge.sinkPort
- the input port of the connection associated with the
edge
protected java.lang.Object _computeNodeWeight(ptolemy.actor.Actor actor)
_computeNodeWeight
in class mapss.dif.ptolemy.GraphReader
actor
- the actor whose node weight is to be determined.
protected mocgraph.Graph _initializeGraph(ptolemy.actor.CompositeActor compositeActor)
_initializeGraph
in class mapss.dif.ptolemy.GraphReader
compositeActor
- the Ptolemy II model that will be converted.
protected void _processNewEdge(mocgraph.Graph graph, mocgraph.Edge edge, ptolemy.actor.IOPort sourcePort, ptolemy.actor.IOPort sinkPort)
_processNewEdge
in class mapss.dif.ptolemy.GraphReader
graph
- The graph.edge
- The new edge.sourcePort
- The source port associated with the edge in the model.sinkPort
- The sink port associated with the edge in the model.protected void _processNewNode(mocgraph.Graph graph, mocgraph.Node node, ptolemy.actor.Actor actor)
_processNewNode
in class mapss.dif.ptolemy.GraphReader
graph
- The graph.node
- The new node.actor
- The actor that corresponds to the node in the model.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |