mapss.dif.csdf.sdf.sched
Class ScheduleTree

java.lang.Object
  extended by mapss.dif.csdf.sdf.sched.ScheduleTree

public class ScheduleTree
extends java.lang.Object

A binary tree expression of R-schedule. Schedule tree is a binary tree where all nodes are associated with schedule loop counts and leaves with SDF actors in addition. The alternative representation helps visualizing a schedule and devising efficient scheduling algorithms.

Version:
$Id: ScheduleTree.java 406 2007-05-10 14:27:07Z plishker $
Author:
Mingyung Ko

Constructor Summary
ScheduleTree(mocgraph.sched.Schedule schedule)
          Constructor for a given schedule.
 
Method Summary
 ScheduleTreeNode leafNode(mocgraph.Node graphNode)
          Get schedule tree leaf node with given graph node.
 java.util.List leafNodes()
          Get a list of the tree leaf nodes.
 ScheduleTreeNode leastParent(ScheduleTreeNode uNode, ScheduleTreeNode vNode)
          The least(youngest/closet/nearest) common parent of given pair of schedule tree nodes
 java.util.List parents(ScheduleTreeNode uNode, ScheduleTreeNode vNode)
          Common parents for a given pair of nodes.
 ScheduleTreeNode root()
          Get the tree root node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduleTree

public ScheduleTree(mocgraph.sched.Schedule schedule)
Constructor for a given schedule.

Parameters:
schedule - The given schedule.
Method Detail

leafNode

public ScheduleTreeNode leafNode(mocgraph.Node graphNode)
Get schedule tree leaf node with given graph node.

Parameters:
graphNode - The given graph node.
Returns:
A schedule tree node corresponding to the given graph node.

leafNodes

public java.util.List leafNodes()
Get a list of the tree leaf nodes.

Returns:
A list of leaf nodes.

leastParent

public ScheduleTreeNode leastParent(ScheduleTreeNode uNode,
                                    ScheduleTreeNode vNode)
The least(youngest/closet/nearest) common parent of given pair of schedule tree nodes

Parameters:
uNode - The first given node.
vNode - The second given node.
Returns:
The least common parent.

parents

public java.util.List parents(ScheduleTreeNode uNode,
                              ScheduleTreeNode vNode)
Common parents for a given pair of nodes. The parents are returned in the form of List, from least(youngest) to greatest(oldest).

Parameters:
uNode - The first node.
vNode - The second node.
Returns:
A list of common parents.

root

public ScheduleTreeNode root()
Get the tree root node.

Returns:
The tree root.