PHP Algorithm
PHP Numerical and Statistical algorithms
This script can be used to generate permutations of elements of an array. It takes an array as parameter and generate arrays with permutations of its elements. The script calls a given callback function to process the generated permutation arrays in user defined way. Requirement:PHP 5.0 or higher

This script can be used to find the shortest path in a map. It takes an array with the definition of the weights of the positions of the map and the path start and end positions. This script is used for a few indevelopment browser based games which utilize tilebased square maps. Map is stored as an array of tile's, ...

This package can be used to manage and search associative arrays using a Kart tree (key alteration radix tree). It can insert text strings that act as keys in a tree structure. The script can also search for the presence of such keys in the tree.

This script can be used to generate points of an Hilbert curve. It generates points of an Hilbert curve and returns the point in an array. The script implements both the two and three dimension implementations.

This script can be used to calculate the distance between Earth two points. It takes the latitude and longitude coordinates of two points of the Earth and calculates the distance between them using the Haversine formula. The distances may be returned in Kilometers, meters, miles, yards, feet or inches. Requirement: PHP 5.2 or higher

This script attempts to guess the gender of Chinese names. Generally speaking, a name is associated to a gender. A name can be male or female name. However it is difficult to guess the gender of names with neutral characters. This script can lookup in a lexicon file the gender tendency of the characters used in a given name and ...

This script implements base methods to apply genetic algorithms to arbitrary subjects. Its functions can be call instantiating a class object or called static methods. The script can perform several types of generic algorithm operations like crossover, mutation, selection and death over populations of any objects of the same class. It can be used as a base implementation of genetic ...

This script can be used to compute the Fast Fourier Transform (FFT) of sampled data, as well the inverse Fast Fourier transform. It takes an array of sample data values and calculates the respective Fast Fourier Transform. The result is returned as an array of complex values. The script can also do the opposite, i.e. compute the inverse Fast Fourier ...

This script calculates and generates all combinations of array elements for n variables with a k class. The script takes an array elements and returns another array with values set to the specified type of combination of elements.The combination types implemented by this class are:  Pn  Pn(k)  Dn,k  D'n,k  Cn,k  C'n,k

This script can be used to create and manipulate adjacency lists in MySQL. It can perform several types of operations to store and retrieve information in a MySQL table of nodes of an adjacency list. Currently it can: add nodes, retrieve the list of all nodes, get the children of a given node, change the parent of a node, and ...

This package can be used to perform different types of geometric operations with polygons. It provides generic polygon and vertex classes that support mixing lines and arc segments between vertices. Polygons may be selfintersecting. It provides means to perform boolean operations AND and OR (Intersect and Union) with the shapes and compute shape clipping (AB and BA).

This script can compare two images and check if they are identical to each other. It will parse two given PNG images of the same size to determine which pixels are different. The script can circle or fill the areas that are different with a given color. The resulting image is displayed as the current output in the PNG format.Requirements:PHP ...

To include it into an application, just use include or a derivative function.What's New in This Release: changed HTTP version from 1.1 to 1.0 (with thanks to Jan De Poorter). No longer issues a separate HTTP request to check validity of the API key with every instantiation. Added a new public method 'isKeyValid' to manually check validity of the API ...

Graf is meant for computing all the possible ways from a point to another and the distance between them.

CTokenBucket implements a token bucket filter. Token bucket filters are used in software engineering to limit a number of events within a certain time.An example of CTokenBucket is how ISP's limit bandwidth to a fixed Kilobyte per second rate. A typical usage of CTokenBucket is limiting the amount of posts to, for example, a guestbook or forum for a user ...