wodka.util
Class PeakFunction

java.lang.Object
  extended bywodka.util.PeakFunction

public class PeakFunction
extends java.lang.Object

A class that can calculate the values of a peak function. The peak is defined by its xValue, its height and the width of its base. It may also have a certain elevation that moves the whole peak along the y-axe. The width is the distance from the xValue to the point where the peak function reaches its lowest value.


Constructor Summary
PeakFunction(int xValue, int height, int width)
           
PeakFunction(int elevation, int xValue, int height, int width)
           
 
Method Summary
 int calculate(int x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeakFunction

public PeakFunction(int xValue,
                    int height,
                    int width)

PeakFunction

public PeakFunction(int elevation,
                    int xValue,
                    int height,
                    int width)
Method Detail

calculate

public int calculate(int x)