|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmapss.dif.DIFScheduleUtilities
public class DIFScheduleUtilities
Utilities for DIF schedules. The utility tools are for deriving the associated graph elements from a schedule.
| Constructor Summary | |
|---|---|
protected |
DIFScheduleUtilities()
A protected constructor to prevent the object to be accidentally created and allow more specialized schedule classes to extend from. |
| Method Summary | |
|---|---|
static java.util.List |
actorFirings(mocgraph.sched.ScheduleElement scheduleElement)
Return an actor firing sequence given by the schedule element. |
static mocgraph.sched.ScheduleElement |
cloneScheduleElement(mocgraph.sched.ScheduleElement element)
Clone a schedule element. |
static int |
clusterRepetitions(mocgraph.sched.ScheduleElement scheduleElement)
Compute the repetitions as if the scheduled actors are treated as a cluster. |
static int |
codeSize(mocgraph.sched.ScheduleElement sched)
A simplified code size computation for a given schedule. |
static int |
codeSize(mocgraph.sched.ScheduleElement sched,
java.util.Map sizeMap,
int loopCodeSize)
Compute the (inlined) code size of a given schedule. |
static boolean |
compareScheduleByActorFirings(mocgraph.sched.ScheduleElement s1,
mocgraph.sched.ScheduleElement s2)
Compare two schedules by their flattened actor firings. |
static boolean |
compareScheduleByStructure(mocgraph.sched.ScheduleElement s1,
mocgraph.sched.ScheduleElement s2)
Compare two schedules by their looping structures. |
static java.util.Collection |
crossingEdges(mocgraph.sched.ScheduleElement sched1,
mocgraph.sched.ScheduleElement sched2,
DIFGraph graph)
Get the induced crossing edges between two schedule elements. |
static java.util.Map |
generateNameMap(DIFGraph graph)
Generate a map that maps Node object to its String name. |
static DIFGraph |
inducedGraph(mocgraph.sched.ScheduleElement scheduleElement,
DIFGraph graph)
Get the induced DIF graph from the schedule element. |
static mocgraph.sched.Schedule |
topSortToSchedule(java.util.List topSort)
Convert a topological sorting order to a schedule for instances of SingleRateGraph. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DIFScheduleUtilities()
| Method Detail |
|---|
public static java.util.List actorFirings(mocgraph.sched.ScheduleElement scheduleElement)
ScheduleElement.firingElementIterator().
Therefore, the functionality can be viewed as a List
version of firingElementIterator.
Clarification: Actor firings are in the type of
Node, not Firing.
scheduleElement - The schedule element.public static mocgraph.sched.ScheduleElement cloneScheduleElement(mocgraph.sched.ScheduleElement element)
The - original schedule element.
public static int clusterRepetitions(mocgraph.sched.ScheduleElement scheduleElement)
SDFGraph.clusterRepetitions(Collection)
scheduleElement - The schedule element.
public static int codeSize(mocgraph.sched.ScheduleElement sched)
sched - The schedule.
public static int codeSize(mocgraph.sched.ScheduleElement sched,
java.util.Map sizeMap,
int loopCodeSize)
sched - The schedule.sizeMap - The map from actors to code size (in class
Integer).loopCodeSize - The code size for loops.
public static boolean compareScheduleByActorFirings(mocgraph.sched.ScheduleElement s1,
mocgraph.sched.ScheduleElement s2)
Clarification: Actor firings are in the type of
Node, not Firing.
s1 - The first schedule.s2 - The second schedule.
public static boolean compareScheduleByStructure(mocgraph.sched.ScheduleElement s1,
mocgraph.sched.ScheduleElement s2)
s1 - The first schedule.s2 - The second schedule.
public static java.util.Collection crossingEdges(mocgraph.sched.ScheduleElement sched1,
mocgraph.sched.ScheduleElement sched2,
DIFGraph graph)
inducedGraph(ScheduleElement, DIFGraph).
sched1 - The first schedule element.sched2 - The second schedule element.graph - The original graph in which to get the crossing edges.
public static java.util.Map generateNameMap(DIFGraph graph)
mocgraph.sched.Schedule.toParenthesisString(
Map, String).
Note that, each node in the input DIFGraph graph should have
its name.
graph - The DIFGraph or subclass of DIFGraph instance.
public static DIFGraph inducedGraph(mocgraph.sched.ScheduleElement scheduleElement,
DIFGraph graph)
scheduleElement - The schedule element.graph - The original/parent graph to induce the subgraph.
public static mocgraph.sched.Schedule topSortToSchedule(java.util.List topSort)
SingleRateGraph. This method does not check
any error between the order and the associated graph. Users need to
make sure that the order contains the desired graph nodes.
topSort - The topological sorting order.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||