Class FourFunctions

  extended by com.perisic.function.AnyFunction
      extended by com.perisic.function.LinCombOfFunctions
          extended by com.perisic.function.FourFunctions

public class FourFunctions
extends LinCombOfFunctions

Defines a function via four functions in the corners of a rectangle and a point within this rectangle.

Copyright:(c) Marc Conrad, Tim French 2010; Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument. DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.

Marc Conrad

Constructor Summary
FourFunctions(AnyFunction f00, AnyFunction f10, AnyFunction f01, AnyFunction f11)
          Generates a set of four function.
Method Summary
static FourFunctions getFourFunctionsSpecial(long seed)
          Factory method for the sonic mouse system.
static void main(java.lang.String[] args)
          Tests this class via visualization.
 void setWeightsViaPoint(double a, double b)
          a is the horizontal direction, b is the Vertical direction.
Methods inherited from class com.perisic.function.LinCombOfFunctions
eval, setWeights
Methods inherited from class com.perisic.function.AnyFunction
addToImage, addToImage, getImage, getImage, normalizeResult
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FourFunctions(AnyFunction f00,
                     AnyFunction f10,
                     AnyFunction f01,
                     AnyFunction f11)
Generates a set of four function. When weights are set the weighted average of these four functions can be retrieved.

Method Detail


public static FourFunctions getFourFunctionsSpecial(long seed)
Factory method for the sonic mouse system. The function in the upper left corner is almost constant zero, the function in the lower right corner is almost constant one. The functions in the two other corners a random 'nice' functions.


public void setWeightsViaPoint(double a,
                               double b)
a is the horizontal direction, b is the Vertical direction. Computes the respective weight for all the four functions.


public static void main(java.lang.String[] args)
Tests this class via visualization.

args -