PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Chun-Sheng, Li   Math Combinatorics   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Math Combinatorics
Combinations and permutations of a set of values
Author: By
Last change:
Date: 26 days ago
Size: 359 bytes
 

Contents

Class file image Download
<?php

   
require_once 'Combinatorics.php';

   
$combinatorics = new Math_Combinatorics;
   
$set = range(0, 9);
   
   
$asc_num = 97;
    while (
$asc_num<= 122) {
       
# code...
       
array_push($set, chr($asc_num));
       
$asc_num++;
    }

   
//??
   
echo $combinations = $combinatorics->combinations($set, 16);
   
//??
    //$permutations = $combinatorics->permutations($set, 16);
?>