<?php
require_once('progression.class.php');
require_once('detector.interface.php');
// progression::include_native_detectors();
// progression::use_bcmath();
echo '<pre>';
$progression=progression(9,8,7,6,5,4,3,2,1,0);
$progression->print_r();
progression::add_native_detectors($progression);
var_dump($progression->detect_type());
var_dump($progression->getNext(false));//get but not pushed
var_dump($progression->getNth(100000));
var_dump($progression->sum());
var_dump($progression->min());
var_dump($progression->max());
var_dump($progression->avg());
$progression->buildToNth(25);
$progression->print_r();
$harmonic=$progression->inverse();
progression::add_native_detectors($harmonic);
$harmonic->print_r();
var_dump($harmonic->detect_type());
echo '</pre>';
|