Package com.graphbuilder.math.func
Class CombinFunction
java.lang.Object
com.graphbuilder.math.func.CombinFunction
- All Implemented Interfaces:
Function
The combination function.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptNumParam(int numParam) Returns true only for 2 parameters, false otherwise.doubleof(double[] d, int numParam) Returns the number of ways r items can be chosen from n items.toString()
-
Constructor Details
-
CombinFunction
public CombinFunction()
-
-
Method Details
-
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]. -
acceptNumParam
public boolean acceptNumParam(int numParam) Returns true only for 2 parameters, false otherwise.- Specified by:
acceptNumParamin interfaceFunction
-
toString
-