at.dms.kjc.sir.linear
Class LinearComputationTuple

java.lang.Object
  extended by at.dms.kjc.sir.linear.LinearComputationTuple

public class LinearComputationTuple
extends Object

A LinearComputationTuple represents tuples of (input position, coefficent) (eg the terms that are calculated to produce linear output.) The input position is defined as follows: input position 0 is the input generated by peek(0); input position 1 is the input generated by peek(1) and so on. The primary use of a tuple is to determine redundant computation across filter executions, and the correspondence of position to peek expressions in subsequent firings of the work function as explained in LinearRedundancy.


Method Summary
 boolean equals(Object o)
          Two tuples are equal if their position and coefficient are equal.
 ComplexNumber getCoefficient()
          Return the coefficient of this tuple.
 int getPosition()
          Returns the input position of the data that this tuple uses.
 int hashCode()
          Reimplement hashcode so that if two tuples are equal, their hashcodes are also equal.
 String toString()
          Pretty print.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCoefficient

public ComplexNumber getCoefficient()
Return the coefficient of this tuple.


getPosition

public int getPosition()
Returns the input position of the data that this tuple uses.


equals

public boolean equals(Object o)
Two tuples are equal if their position and coefficient are equal.

Overrides:
equals in class Object

hashCode

public int hashCode()
Reimplement hashcode so that if two tuples are equal, their hashcodes are also equal.

Overrides:
hashCode in class Object

toString

public String toString()
Pretty print.

Overrides:
toString in class Object