Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 91 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Combinations:: (2 methods):
  withoutRepetition()
  withRepetition()


Class: Combinations  - X-Ref

withoutRepetition($numObjs, $numInSet)   X-Ref
COMBIN.

Returns the number of combinations for a given number of items. Use COMBIN to
determine the total possible number of groups for a given number of items.

Excel Function:
COMBIN(numObjs,numInSet)

param: mixed $numObjs Number of different objects, or can be an array of numbers
param: mixed $numInSet Number of objects in each combination, or can be an array of numbers
return: array|float|int|string Number of combinations, or a string containing an error

withRepetition($numObjs, $numInSet)   X-Ref
COMBINA.

Returns the number of combinations for a given number of items. Use COMBIN to
determine the total possible number of groups for a given number of items.

Excel Function:
COMBINA(numObjs,numInSet)

param: mixed $numObjs Number of different objects, or can be an array of numbers
param: mixed $numInSet Number of objects in each combination, or can be an array of numbers
return: array|float|int|string Number of combinations, or a string containing an error