Combinatorics
[ class tree: Combinatorics ] [ index: Combinatorics ] [ all elements ]

Class: Math_Combinatorics

Source Location: /Math_Combinatorics-1.0.0/Combinatorics.php

Class Overview


Math_Combinatorics


Author(s):

Version:

  • Release: 1.0.0

Methods


Inherited Variables

Inherited Methods


Class Details

[line 37]
Math_Combinatorics

Math_Combinatorics provides the ability to find all combinations and permutations given an set and a subset size. Associative arrays are preserved.



[ Top ]


Method Detail

array_shift_assoc   [line 204]

array array_shift_assoc( array &$array, array $array)

Associative version of array_shift()
  • Return: Array with 1st element as the shifted key and the 2nd element as the shifted value
  • Access: public

Parameters:

array   $array   —  Reference to the array to shift
array   &$array   — 

[ Top ]

combinations   [line 55]

array combinations( array $set, [int $subset_size = null])

Find all combinations given a set and a subset size.
  • Return: An array of combinations
  • Access: public

Parameters:

array   $set   —  Parent set
int   $subset_size   —  Subset size

[ Top ]

permutations   [line 140]

array permutations( array $set, [int $subset_size = null])

Find all permutations given a set and a subset size.
  • Return: An array of permutations
  • Access: public

Parameters:

array   $set   —  Parent set
int   $subset_size   —  Subset size

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:11:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.