|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.slicegraph.SliceNode
at.dms.kjc.slicegraph.InputSliceNode
public class InputSliceNode
Each Slice is started by an InputSlice Node that is either a joiner connecting several other slices,
or a connection to a single other slice.
Has an array of weights and corresponding InterSliceEdge
s.
Constructor Summary | |
---|---|
InputSliceNode()
Constructor: no edges, no weights |
|
InputSliceNode(int[] weights)
Constructor: weights, edges to be set later. |
|
InputSliceNode(int[] weights,
InterSliceEdge[] sources)
Creator |
|
InputSliceNode(int[] weights,
OutputSliceNode[] sources)
Constructor |
Method Summary | |
---|---|
void |
canonicalize()
Merge neighboring edges and weights if the neighboring edges are actually the same Edge object. |
String |
debugString(boolean escape)
Return a string that gives some information for this input slice node. |
String |
getIdent()
Returns unique string identifying slice. |
int |
getItems(InterSliceEdge edge)
Return the number of items that traverse this edge on one iteration of this input slice node, remember that a single edge can appear multiple times in the joining pattern. |
FilterSliceNode |
getNextFilter()
Get the following FilterSliceNode. |
InterSliceEdge |
getSingleEdge()
Get the singleton edge. |
LinkedList<InterSliceEdge> |
getSourceList()
Return a linked list of the sources pattern. |
InterSliceEdge[] |
getSources()
|
LinkedList<InterSliceEdge> |
getSourceSequence()
Return a list of the edges with each edge appearing once and ordered by the order in which each edge appears in the join pattern. |
Set<InterSliceEdge> |
getSourceSet()
|
CType |
getType()
|
int |
getWeight(Edge out)
|
int[] |
getWeights()
|
int |
getWidth()
Return the number of unique inputs (Edges) to this join. |
boolean |
hasFileInput()
|
boolean |
isFileOutput()
InputSliceNode is FileOutput if FilterSliceNode is FileOutput. |
boolean |
isJoiner()
Is a joiner if there are at least 2 sources (even if same Edge object). |
boolean |
noInputs()
Are there no inputs? |
boolean |
oneInput()
Does sources have a single element. |
double |
ratio(Edge edge)
return ratio of weight of edge to totalWeights(). |
void |
replaceEdge(InterSliceEdge oldEdge,
InterSliceEdge newEdge)
In the sources array for the input, replace all instances of oldEdge with newEdge. |
void |
set(LinkedList<Integer> weights,
LinkedList<InterSliceEdge> edges)
Set the weights and sources array of this input slice node to the weights list and the edges list. |
void |
setSources(InterSliceEdge[] sources)
Set the source edges. |
void |
setWeights(int[] newWeights)
Set the weights to newWeights. |
int |
totalWeights()
|
Methods inherited from class at.dms.kjc.slicegraph.SliceNode |
---|
getAsFilter, getAsInput, getAsOutput, getEdgeToNext, getNext, getParent, getPrevious, isFilterSlice, isInputSlice, isOutputSlice, setNext, setParent, setPrevious |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InputSliceNode(int[] weights, InterSliceEdge[] sources)
public InputSliceNode(int[] weights, OutputSliceNode[] sources)
public InputSliceNode(int[] weights)
public InputSliceNode()
Method Detail |
---|
public void canonicalize()
OutputSliceNode.canonicalize()
being run on all output nodes whose edges are combined by canonicalize.
public boolean isFileOutput()
public String getIdent()
public int getWidth()
public int getItems(InterSliceEdge edge)
edge
- The edge to query.
public int[] getWeights()
public InterSliceEdge[] getSources()
public void set(LinkedList<Integer> weights, LinkedList<InterSliceEdge> edges)
weights
- The list of weights (Integer).edges
- The list of edges.public void setWeights(int[] newWeights)
newWeights
- public void setSources(InterSliceEdge[] sources)
public int totalWeights()
public int getWeight(Edge out)
out
- The Edge that we are interested in
public boolean oneInput()
public boolean isJoiner()
public InterSliceEdge getSingleEdge()
public FilterSliceNode getNextFilter()
public boolean noInputs()
public double ratio(Edge edge)
edge
-
public LinkedList<InterSliceEdge> getSourceSequence()
public LinkedList<InterSliceEdge> getSourceList()
public Set<InterSliceEdge> getSourceSet()
public String debugString(boolean escape)
escape
- Should we escape the new lines?
public boolean hasFileInput()
public void replaceEdge(InterSliceEdge oldEdge, InterSliceEdge newEdge)
oldEdge
- The edge to replace.newEdge
- The edge to install.public CType getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |