public class Apgan
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Actor |
collapsedLeftActor
Internal variables of the algorithm
|
private Actor |
collapsedRightActor
Internal variables of the algorithm
|
private Actor |
currentOmegaActor
Internal variables of the algorithm
|
(package private) java.util.HashMap<java.lang.String,java.lang.String> |
equations
Solution of omega actor.
|
private GraphExpressions |
expressions
Expressions for the graph
|
boolean |
generateSubGraphDotFiles
Generate Dot files at every stage
|
private int |
omegacount
Internal variables to generate names of new actors / channels.
|
private int |
portCount
Internal variables to generate names of new actors / channels.
|
private Solutions |
prevSolutions
Solutions at previous step of the the algorithm
|
(package private) java.util.HashMap<Actor,java.util.List<Actor>> |
reachability
Reachability matrix
|
(package private) java.util.HashMap<Channel,java.lang.Integer> |
repCount
Repetition count with respect to channels
|
private Solutions |
solutions
Solutions of the input graph
|
Constructor and Description |
---|
Apgan() |
Modifier and Type | Method and Description |
---|---|
private Graph |
collapseChannelInGraph(Channel slctChannel)
Collapse a selected channel in the graph.
|
private void |
constructReachability(Graph graph)
Construct Reachability matrix of the input graph
This algorithm comes from the book -
Essential Java for Scientists and Engineers
page no.
|
private void |
createNewLink(Graph graph,
java.lang.String rate,
Actor oppositeActor,
Port oppositePort,
int multPortRate,
Actor newActor)
Create a new link between two actors.
|
private boolean |
edgeIntroducesCycle(Channel channel)
Check if this channel introduces a cycle
|
void |
generateScheduleApgan(Graph inputGraph)
Generate Single appearance schedule using APGAN algorithm.
|
private void |
getRepetitionCount(Graph inputGraph)
Construction repetition count for each channel.
|
java.lang.String |
getStringSchedule()
Get APGAN schedule.
|
Channel |
selectEdge()
Select an edge for collapsing.
|
private void |
storeEquation()
Storing APGAN equations
|
public boolean generateSubGraphDotFiles
private Solutions solutions
private Solutions prevSolutions
private GraphExpressions expressions
java.util.HashMap<Channel,java.lang.Integer> repCount
private int omegacount
private int portCount
java.util.HashMap<java.lang.String,java.lang.String> equations
private Actor currentOmegaActor
private Actor collapsedLeftActor
private Actor collapsedRightActor
private void constructReachability(Graph graph)
graph
- input graphprivate void getRepetitionCount(Graph inputGraph)
inputGraph
- input graphpublic Channel selectEdge()
private boolean edgeIntroducesCycle(Channel channel)
channel
- channel to checkprivate void createNewLink(Graph graph, java.lang.String rate, Actor oppositeActor, Port oppositePort, int multPortRate, Actor newActor)
graph
- input graphrate
- rateoppositeActor
- actor on other sideoppositePort
- port on other sidemultPortRate
- new port ratenewActor
- newly inserted actorprivate Graph collapseChannelInGraph(Channel slctChannel)
slctChannel
- selected channelprivate void storeEquation()
public java.lang.String getStringSchedule()
public void generateScheduleApgan(Graph inputGraph)
inputGraph
- input SDF graph