com.graphbuilder.math.func
Class AvgFunction

java.lang.Object
  extended bycom.graphbuilder.math.func.AvgFunction
All Implemented Interfaces:
Function

public class AvgFunction
extends java.lang.Object
implements Function

The average function.


Constructor Summary
AvgFunction()
           
 
Method Summary
 boolean acceptNumParam(int numParam)
          Returns true for 1 or more parameters, false otherwise.
 double of(double[] d, int numParam)
          Returns the average of the values in the array from [0, numParam).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AvgFunction

public AvgFunction()
Method Detail

of

public double of(double[] d,
                 int numParam)
Returns the average of the values in the array from [0, numParam).

Specified by:
of in interface Function

acceptNumParam

public boolean acceptNumParam(int numParam)
Returns true for 1 or more parameters, false otherwise.

Specified by:
acceptNumParam in interface Function

toString

public java.lang.String toString()