This class can be use to manipulate hierarchic trees of records stored in a MySQL database using Joe Celko visitation model.
It can perform the following tasks in a very effecient way mostly using one SELECT query statement:
- Find out leaf nodes in the current tree (nodes have no children)
- Find out nodes of a sub-tree for given node
- Find out the context path of given node
- Find out the level or depth of a given node
- Find out how many descendants a given node has
This class implements a "sounds like" algorithm developed by Lawrence Philips which he published in the June, 2000 issue of C/C++ Users Journal. Double Metaphone is an improved version of Philips' original Metaphone algorithm. Double Metaphone is a significant improvement on the Soundex algorithm.
This class performs several types of numerical and statistical functions.
Currently, it generates gaussian normal distributions, does numerical integration of arbitrary functions, generates random numbers with gaussian distributions, provides a number of standard statistical functions, e.g., mean, standard deviation, variance, etc., has two different methods of solving for the roots of an equation (bisection and steepest descent), converts floating point to rational number representation (useful for infinite precision calculations), generates a Sieve of Erastophenes for a specified integer, factors integers into their prime factors, finds the minimum or maximum value of a function within a specified interval, solves simultaneous equations, inverts matrices using gaussian elimination, calculates variance and covariance and has interfaces for vector addition, division and multiplication.
The minimum/maximum functions now support all datatypes who support a > or < operator.