public void connect() {  inputSSGEdges = new SSGEdge[prevs.size()]; outputSSGEdges = new SSGEdge[nexts.size()];  for (int i = 0; i < outputSSGEdges.length; i++) {        FlatNode dest = (FlatNode)nexts.get(outputs[i]); StaticStreamGraph input = streamGraph.getParentSSG(dest); outputSSGEdges[i] = new SSGEdge(this, input, i, input.getInputNum(dest)); outputSSGEdges[i].outputNode = outputs[i]; outputSSGEdges[i].inputNode = dest; }
public void connect() {  inputSSGEdges = new SSGEdge[prevs.size()]; outputSSGEdges = new SSGEdge[nexts.size()];
    public void connect()     {	//build the inputSSGEdges and outputSSGEdges arrays	inputSSGEdges = new SSGEdge[prevs.size()];	outputSSGEdges = new SSGEdge[nexts.size()];		for (int i = 0; i < outputSSGEdges.length; i++) {	    //nexts.put(outputs[i], outputs[i]);	    //	    System.out.println(outputs[i]);	    //System.out.println(nexts.size());	    //System.out.println(nexts.keySet().toArray()[0]);	    //System.out.println((nexts.keySet().toArray()[0] == outputs[i]) + " " +	    //		       nexts.containsKey(outputs[i]));	    	    FlatNode dest = (FlatNode)nexts.get(outputs[i]);	    StaticStreamGraph input = streamGraph.getParentSSG(dest);	    outputSSGEdges[i] = new SSGEdge(this, input, i, input.getInputNum(dest));	    outputSSGEdges[i].outputNode = outputs[i];	    outputSSGEdges[i].inputNode = dest;	}	//for input, just get the sources SSGEdges!	for (int i = 0; i < inputSSGEdges.length; i++) {	    FlatNode source = (FlatNode)prevs.get(inputs[i]);	    StaticStreamGraph input = streamGraph.getParentSSG(source);	    inputSSGEdges[i] = input.getOutputSSGEdgeSource(source);	}		//update the connections	updateSSGEdges();		for (int i = 0; i < outputs.length; i++)	    assert outputs[i] != null : this.toString() + 		" has null output " + i;	for (int i = 0; i < inputs.length; i++)	    assert inputs[i] != null : this.toString() + 		" has null input " + i;	    }