.:: Chi's PHP classes mirror ::.

2-phase algorithm for the open capacitated vehicle routing problem

2-phase algorithm for the open capacitated vehicle routing problem. It takes the geographic coordinates of a depot and the locations clients with orders to be delivered by a fleet of trucks. The class uses a 2-phase algorithm for solving the open capacitated vehicle routing problem. It tries to minimize the total route cost by trying all possible combinations. The trucks are not required to return to the depot.

Additively weighted voronoi diagram

The additively weighted Voronoi diagram is defined when positive weights are subtracted from the distances between points. In the plane under the ordinary Euclidean distance this diagram is also known as the hyperbolic Dirichlet tessellation and its edges are hyperbolic arc and straight line segments.

Alpha-shape

This class can find an alpha shape that contains a set of points known as the concave hull. It takes a set of points in a two dimensional plane and uses the alpha shape algorithm to calculate the coordinates of the edges of a shape that contains all the points in the set. Another class can render the points and the concave hull shape as an image file in the PNG format.

Bin packing

This class implements one dimensional bin packing algorithms. It takes an array of values and can determine the next fit, first fit, best fit, worst fit.

Christofides heuristic

This class can solve salesman travel problem using the Christofides heuristic. It takes a list of point through which the salesman needs to pass. The class can use the Christofides heuristic to find a path with a cost that is at most 3/2 of the optimal cost.

Concave hull

This class can find a concave shape that contains a set of points known as the concave hull. It takes a set of points in a two dimensional plane and uses the concave hull algorithm to calculate the coordinates of the edges of a shape that contains all the points in the set. Another class can render the points and the concave hull shape as an image file in the PNG format.

Convex hull

This class can find a convex shape that contain a set of points known as the convex hull. It takes a set of points in a two dimensional plane and uses the convex hull algorithm to calculate the coordinates of the edges of a shape that contains all the points in the set. Another class can render the points and the convex hull shape as an image file in the PNG format.

CPU Frequency Tuner

This class can calculate the approximate AMD CPU frequency. It takes the CPU base frequency and CPU clock multiplier FID and DID factors and calculates the frequency for family 10h and family 11h AMD CPUs. The class returns an array with the FID, DID and VID values.

Delaunay Triangulation

This package can perform Delaunay triangulation for a set of points in a plane. The main class takes the coordinates a set of points and determines which form edges of a triangle whose points are on the same circumference. It can be used to find minimum spanning trees. Another class can render the graph of triangles with the edges computed with the Delaunay triangulation.

Energytools

Energytools is a fix when the pc can't resume from hibernate. Please check the energy plan options in the power system menu and enable both shutdown (power off) and hybrid-standby, disable (uncheck) hibernation. Open a command shell with elevated privilege and type powercfg.exe -H on and press the return key to activate hybrid-standby. Then download and install this fix.

Euler circuit

Finds euler circuit and hamiltonian path.

Fan control kernel module for FSC Amilo XA3530 computers

Fan control kernel module for FSC Amilo XA3530 computers.

Fancontroller

Fancontrol systray exe for Windows.

Fast pattern matching with ternarytrie

Fast pattern matching with ternarytrie.

Fractal generator

This class can generate Mandelbrot, Burning ship and Julia set fractal images. It can iterate a given number of times the fractal generation algorithm to render an image with the fractal image. The generated fractal image is returned as a string with the image data in the PNG format. The fractal type can be of Mandelbrot, Burning ship or Julia set. The fractal image length and the number of algorithm iterations are configurable parameters.


FSCXA3530fancontroller

Fancontroller with Winring0.

I-Ching

This class can generate fortune telling phrases with the I-Ching book of changes. It can pick random hexagrams looking of a iging table that is used to find the index of the current and the change symbol. The class can also look up the printable names of the returned current and change symbol.

JS observer pattern

Simple observer pattern.

Kart-Trie

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 class can also search for the presence of such keys in the tree.

K-Nearest neighbor map

Find nearest neighbor of a set of points and create maps with the euclidian distance.

Linksys WAG200G firmware.

Linksys WAG200G firmware

Linksys WAG200G toolchain.

Linksys WAG200G toolchain

Megacpu

Megacpu it's a small system tray tool to start and switch between custom profiles created with Turion Power control. It's useful for undervolter and software overclocker.

Mercator projection

This class can render geograpic coordinates with the mercator projection. It takes the latitude and longitude coordinates of a set of map points and calculates their positions using the mercator projection. A separate class can render an image with the projected points. The generated image is saved to a file in a given directory in the PNG format.

Monster curves

Monster curves are fractals used in space filling graphics and mapping applications. This class provides a pure PHP implementation of the Hilbert curve fractals. It generates points of an Hilbert curve and returns the point in an array. The class implements also the Moore curve and the Morton curve.

Nokia N900 Tune up

Nokia N900 Tune up tool.

PHP Aho-Corasick

Pure PHP Aho-Corasick algorithm (finite state machine) and a string match with a wildcard and a ternary trie.
Unittest:
$tree = new Ahocorasick\Ahocorasick();
$tree->add("AC");
$tree->add("GTG");
$tree->add("AACT");
echo $tree->match("ACCGAGTGCGTGGACAAACTACGATTGTGGAATGAACT","AC*GT");
$this->expectOutputString("ACCGAGT, ACCGAGTGCGT, ACCGAGTGCGTGGACAAACTACGATTGT, ACAAACTACGATTGT, ACTACGATTGT, ACGATTGT");

PHP decorator pattern.

Simple decorator pattern

Regular delaunay triangulation

Regular delaunay triangulation

PHP suffix tree extension

PHP suffix tree extension.

Rle compression

This class implements the rle compression.

Sweepstake

It takes a range of time and computes the new week- and monthnumber depending on various inputs. The inputs are day of the week, weekly or monthly cycle, duration in days and an execption list of days or months. It also remembers the old week and monthnumber.

Ternary Search Tree

This class can insert and search text using ternary search trees. It can build a tree data structure that sorts text strings in order to be searched and found more efficiently using the ternary search tree algorithm.

Voronoi diagram (Thiessen polygone)

This package can generate a voronoi diagram for a set of points. It takes a set of seed points and divides the space into Voronoi cell regions defined by all seed points closer to that region. An additional class can render the graph of the regions defined by the computed Voronoi cells.


.:: Chi's blog ::.