ptolemy.domains.sdf.lib
Class DotProduct.PortFunction

java.lang.Object
  extended by ptolemy.data.type.MonotonicFunction
      extended by ptolemy.domains.sdf.lib.DotProduct.PortFunction
All Implemented Interfaces:
InequalityTerm
Enclosing class:
DotProduct

private static class DotProduct.PortFunction
extends MonotonicFunction

This class implements a function on the two input port types. f(port1, port2) == LUB(elementType(port1), elementType(port2)) if both are matrices LUB(elementType(port1), elementType(port2)) if both are arrays UNKNOWN otherwise This function's value determinese the output port type.


Field Summary
private  TypedIOPort _port1
           
private  TypedIOPort _port2
           
 
Constructor Summary
private DotProduct.PortFunction(TypedIOPort port1, TypedIOPort port2)
           
 
Method Summary
 java.lang.Object getValue()
          Return the function result.
 InequalityTerm[] getVariables()
          Return the type variables in this InequalityTerm.
 
Methods inherited from class ptolemy.data.type.MonotonicFunction
getAssociatedObject, getVerboseString, initialize, isSettable, isValueAcceptable, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_port1

private TypedIOPort _port1

_port2

private TypedIOPort _port2
Constructor Detail

DotProduct.PortFunction

private DotProduct.PortFunction(TypedIOPort port1,
                                TypedIOPort port2)
Method Detail

getValue

public java.lang.Object getValue()
Return the function result.

Specified by:
getValue in interface InequalityTerm
Specified by:
getValue in class MonotonicFunction
Returns:
A Type.
See Also:
MonotonicFunction.setValue(Object)

getVariables

public InequalityTerm[] getVariables()
Return the type variables in this InequalityTerm. If neither type variable has been set, return an array of size two, containing the InequalityTerms corresponding to the port. If exactly one is set, return the InequalityTerm corresponding to the other port (in a size one array). If both have been set, return an empty InequalityTerm array.

Specified by:
getVariables in interface InequalityTerm
Specified by:
getVariables in class MonotonicFunction
Returns:
An array of InequalityTerm.