com.graphbuilder.math.func
Class CombinFunction

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

public class CombinFunction
extends java.lang.Object
implements Function

The combination function.

See Also:
PascalsTriangle

Constructor Summary
CombinFunction()
           
 
Method Summary
 boolean acceptNumParam(int numParam)
          Returns true only for 2 parameters, false otherwise.
 double of(double[] d, int numParam)
          Returns the number of ways r items can be chosen from n items.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CombinFunction

public CombinFunction()
Method Detail

of

public double of(double[] d,
                 int numParam)
Returns the number of ways r items can be chosen from n items. The value of n is (int) d[0] and the value of r is (int) d[1].

Specified by:
of in interface Function

acceptNumParam

public boolean acceptNumParam(int numParam)
Returns true only for 2 parameters, false otherwise.

Specified by:
acceptNumParam in interface Function

toString

public java.lang.String toString()