|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.actor.RelationWidthInference
public class RelationWidthInference
A class that offers convenience utility methods to infer the widths of relations in a composite actor.
Red (rodiers) |
Field Summary | |
---|---|
private boolean |
_inferringWidths
|
private boolean |
_needsWidthInference
|
private CompositeActor |
_topLevel
|
Constructor Summary | |
---|---|
RelationWidthInference(CompositeActor topLevel)
Create RelationWidthInference, the algorithm for width inference. |
Method Summary | |
---|---|
private static void |
_checkConsistency(IOPort port)
Check whether the widths at a port are consistent. |
protected static java.util.Set<IORelation> |
_relationsWithUnspecifiedWidths(java.util.List<?> relationList)
Filter the relations for which the width still has to be inferred. |
private static boolean |
_updateRelationsFromDefaultWidth(IOPort port,
java.util.List<IORelation> updatedRelations)
Infer the width for the relations connected to the port (which should have a default width). |
private static boolean |
_updateRelationsFromMultiport(IOPort port,
java.util.List<IORelation> updatedRelations)
Infer the width for the relations connected to the port. |
boolean |
inferringWidths()
Determine whether widths are currently being inferred or not. |
void |
inferWidths()
Infer the width of the relations for which no width has been specified yet. |
boolean |
needsWidthInference()
Return whether the current widths of the relation in the model are no longer valid anymore and the widths need to be inferred again. |
void |
notifyConnectivityChange()
Notify the width inference algorithm that the connectivity in the model changed (width of relation changed, relations added, linked to different ports, ...). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean _inferringWidths
private boolean _needsWidthInference
private CompositeActor _topLevel
Constructor Detail |
---|
public RelationWidthInference(CompositeActor topLevel)
topLevel
- The top level CompositeActor.
java.lang.IllegalArgumentException
- If the specified actor is not the
top level container. That is, its container is not null.Method Detail |
---|
public boolean inferringWidths()
public void inferWidths() throws IllegalActionException
IllegalActionException
- If the widths of the relations at port are not consistent
or if the width cannot be inferred for a relation.public boolean needsWidthInference()
public void notifyConnectivityChange()
protected static java.util.Set<IORelation> _relationsWithUnspecifiedWidths(java.util.List<?> relationList) throws IllegalActionException
relationList
- The relations that need to be filtered.
IllegalActionException
- If the expression for the width cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.private static void _checkConsistency(IOPort port) throws IllegalActionException
port
- The port which will be checked.
IllegalActionException
- If the widths of the relations at port
are not consistent.private static boolean _updateRelationsFromMultiport(IOPort port, java.util.List<IORelation> updatedRelations) throws IllegalActionException
port
- The port for whose connected relations the width should be inferred.updatedRelations
- The relations for which the width has been updated.
IllegalActionException
- If the widths of the relations at port are not consistent.private static boolean _updateRelationsFromDefaultWidth(IOPort port, java.util.List<IORelation> updatedRelations) throws IllegalActionException
port
- The port for whose connected relations the width should be inferred.updatedRelations
- The relations for which the width has been updated.
IllegalActionException
- If the expression for the width cannot
be parsed or cannot be evaluated, or if the result of evaluation
violates type constraints, or if the result of evaluation is null
and there are variables that depend on this one.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |