|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.gt.GraphAnalyzer
public abstract class GraphAnalyzer
Superclass of classes that need to analyze the graph structures of models.
Red (tfeng) |
Yellow (tfeng) |
Nested Class Summary | |
---|---|
static class |
GraphAnalyzer.IndexedList
A pair of a list and an index number. |
static class |
GraphAnalyzer.IndexedLists
A list of IndexedLists. |
static class |
GraphAnalyzer.Path
A path between two ports. |
Constructor Summary | |
---|---|
GraphAnalyzer()
|
Method Summary | |
---|---|
protected boolean |
_isIgnored(java.lang.Object object)
Test whether an object should be ignored from analysis. |
protected abstract boolean |
_isOpaque(CompositeEntity entity)
Test whether a composite entity should be considered as opaque. |
protected abstract boolean |
_relationCollapsing(NamedObj container)
Test whether the relations contained in the container should be considered as collapsed, i.e., whether multiple connected relations should be considered as just one. |
private void |
_removeIgnoredObjects(java.lang.Iterable<?> list)
Remove all the ignored objects from the list. |
NamedObj |
findFirstChild(CompositeEntity top,
GraphAnalyzer.IndexedLists indexedLists,
java.util.Collection<java.lang.Object> excludedObjects)
Find the first child within the top composite entity. |
boolean |
findFirstPath(Port startPort,
GraphAnalyzer.Path path,
java.util.Set<? super Relation> visitedRelations,
java.util.Set<? super Port> visitedPorts)
Find the first path starting from the startPort, and store it in the path parameter if found. |
NamedObj |
findNextChild(CompositeEntity top,
GraphAnalyzer.IndexedLists indexedLists,
java.util.Collection<java.lang.Object> excludedObjects)
Find the next child within the top composite entity. |
boolean |
findNextPath(GraphAnalyzer.Path path,
java.util.Set<Relation> visitedRelations,
java.util.Set<Port> visitedPorts)
Find the next path, and store it in the path parameter if found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphAnalyzer()
Method Detail |
---|
public NamedObj findFirstChild(CompositeEntity top, GraphAnalyzer.IndexedLists indexedLists, java.util.Collection<java.lang.Object> excludedObjects)
AtomicActor
) or an opaque composite
entity, one that has a director in it. If the top composite entity does
not have any child, null is returned.
top
- The top composite entity in which the search is performed.indexedLists
- A list that is used to encode the composite entities
visited.excludedObjects
- The atomic actor or opaque composite entities
that should not be returned.
findNextChild(CompositeEntity, IndexedLists, Collection)
public boolean findFirstPath(Port startPort, GraphAnalyzer.Path path, java.util.Set<? super Relation> visitedRelations, java.util.Set<? super Port> visitedPorts)
Port
) and relations (Relation
),
starting and ending with two ports (which may be equal, in which case
the path is a loop). If a path contains ports between the start port and
the end port, those ports in between must be ports of a transparent
composite entities (those with no directors inside). If no path is found
starting from the startPort, null is returned.
startPort
- The port from which the search starts.path
- The path to obtain the result.visitedRelations
- A set that records all the relations that have
been visited during the search.visitedPorts
- A set that records all the ports that have been
visited during the search.
findNextPath(Path, Set, Set)
public NamedObj findNextChild(CompositeEntity top, GraphAnalyzer.IndexedLists indexedLists, java.util.Collection<java.lang.Object> excludedObjects)
AtomicActor
) or an opaque composite entity, one
that has a director in it. If the top composite entity does not have any
more child, null is returned.
top
- The top composite entity in which the search is performed.indexedLists
- A list that is used to encode the composite entities
visited.excludedObjects
- The atomic actor or opaque composite entities
that should not be returned.
findFirstChild(CompositeEntity, IndexedLists, Collection)
public boolean findNextPath(GraphAnalyzer.Path path, java.util.Set<Relation> visitedRelations, java.util.Set<Port> visitedPorts)
Port
) and
relations (Relation
), starting and ending with two ports (which
may be equal, in which case the path is a loop). If a path contains
ports between the start port and the end port, those ports in between
must be ports of a transparent composite entities (those with no
directors inside). If no more path is found, null is returned.
path
- The path to obtain the result.visitedRelations
- A set that records all the relations that have
been visited during the search.visitedPorts
- A set that records all the ports that have been
visited during the search.
findFirstPath(Port, Path, Set, Set)
protected boolean _isIgnored(java.lang.Object object)
object
- The object to be tested.
protected abstract boolean _isOpaque(CompositeEntity entity)
entity
- The composite entity to be tested.
protected abstract boolean _relationCollapsing(NamedObj container)
container
- The container.
private void _removeIgnoredObjects(java.lang.Iterable<?> list)
list
- The list._isIgnored(Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |