Permutations
Table of Contents
| PERMUT() | PERMUT. | int|string |
|---|---|---|
| PERMUTATIONA() | PERMUTATIONA. | int|string |
Methods
PERMUT()
PERMUT.
public
static PERMUT(
$numObjs :
int
, $numInSet :
int
)
: int|string
Returns the number of permutations for a given number of objects that can be selected from number objects. A permutation is any set or subset of objects or events where internal order is significant. Permutations are different from combinations, for which the internal order is not significant. Use this function for lottery-style probability calculations.
Parameters
- $numObjs : int
Number of different objects
- $numInSet : int
Number of objects in each permutation
Return values
int|string —Number of permutations, or a string containing an error
PERMUTATIONA()
PERMUTATIONA.
public
static PERMUTATIONA(
$numObjs :
int
, $numInSet :
int
)
: int|string
Returns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects.
Parameters
- $numObjs : int
Number of different objects
- $numInSet : int
Number of objects in each permutation
Return values
int|string —Number of permutations, or a string containing an error