System.out.println(((double)in.getWeight(out) / in.totalWeights())); System.out.println(in.getWeights().length + " " + in.getWeights()[0]); for (int i = 0; i < in.getWeights().length; i++) { System.out.println(in.getSources()[i] + " " + in.getWeights()[i]); }
System.out.println(out);
    public static int steadyBufferSize(Edge edge)    {	int itemsReceived, itemsSent;	InputTraceNode in = edge.getDest();	OutputTraceNode out = edge.getSrc();		//calculate the items the input trace receives	FilterInfo next = FilterInfo.getFilterInfo((FilterTraceNode)in.getNext());	itemsSent = (int)((next.steadyMult * next.pop) *	    ((double)in.getWeight(edge) / in.totalWeights()));		//calculate the items the output trace sends	FilterInfo prev = FilterInfo.getFilterInfo((FilterTraceNode)out.getPrevious());	itemsReceived = (int)((prev.steadyMult * prev.push) *	    ((double)out.getWeight(edge) / out.totalWeights()));	/*	System.out.println("Steady Buffer: " + in + " -> " + out + ", sent = " + 			   itemsSent + ", received = " + itemsReceived);	System.out.println(((double)in.getWeight(out) / in.totalWeights()));	System.out.println(in.getWeights().length + " " + in.getWeights()[0]);	for (int i = 0; i < in.getWeights().length; i++) {	    System.out.println(in.getSources()[i] + " " + in.getWeights()[i]);	}	for (int i = 0; i < out.getWeights().length; i++) {	    System.out.println(" ---- Weight = " + out.getWeights()[i]);	    for (int j = 0; j < out.getDests()[i].length; j++) 		System.out.println(out.getDests()[i][j]);	     System.out.println(" ---- ");	}	*/		//see if they are different	assert (itemsSent == itemsReceived) :	    "Calculating steady state: items received != items send on buffer";		return itemsSent * getTypeSize(next.filter.getInputType());    }