A Ruby implementation of Dijkstra's Shunting Yard Algorithm, for converting tokens from infix notation to postfix notation (aka Reverse Polish Notation).
Vincenty published an algorithm for calculating the distance between two latitudes and longitudes and another to find the destination latitude and longitude, given the start coordinate, bearing and distance
Ad-hoc algorithm for copy-move forgery detection in images.
This algorithm is robust so it can detect copy-move forgery in lossy compression formats such as jpeg.
Because this algorithm is ad-hoc - it heavily depends on script...
An implementation of Butcher's Algorithm for determining the date of Easter for the Western church. Works for any date in the Gregorian calendar (1583 and onward). Returns a date object.
O(n) quicksort style algorithm for looking up data based on rank order. Useful for finding medians, percentiles, quartiles, and deciles. Equivalent to data[n] when the data is already sorted.
The XML specification describes the outlines of an algorithm for detecting the
Unicode encoding that an XML document uses. This function will do that.
This is an implementation of Edmonds' blossom-contraction algorithm for maximum cardinality matching in general graphs. It's maybe a little long and complex for the recipe book, but I hope it will spare someone else the agony of implementing it...
This is an implementation of the Knuth-Morris-Pratt algorithm for finding copies of a given pattern as a contiguous subsequence of a larger text. Since KMP accesses the text only sequentially, it is natural to implement it in a way that allows...
Algorithm for solving problems of the form:
min ||Ax||_p s.t. ||y-Hx||_2 < err
Algorithm for solving problems of the form:
min ||x||_p s.t. ||y-Hx||_2 < err
It is a hill climbing optimization algorithm for finding the minimum of a fitness function in the real space. The space should be constrained and defined properly. It attempts steps on every dimension and proceeds searching to the dimension and...
how to solve the attached problem in genetic algorithm
for association rules.
1) plz concentrate on table-1, table-2 and table-3 here we are
looking for series whose numbers are not increasing as number of items
In 1975, Vincenty published a rapidly converging algorithm for computing the distance between points on an ellipsoidal earth. The algorithm is precise to within a few millimeters. Since then, his algorithm has since seen significant implementation...
The Erdos-Renyi (Erdos and Renyi, 1959) is the first ever proposed algorithm for the formation of random graphs. It selects with equal probability pairs of nodes from the graph set of nodes and connects them with a predefined probability.
This is an implementantion of the Gauss algorithm for block tridiagonal systems. The blocks must all be the same size. This approach requires for loops so is of value when the matrix is large. Ideal for solving 1D BVPs using finite element or...
This is a parallel implementation of the Expectation Maximization algorithm for multidimensional Gaussian Mixture Models, designed to run on NVidia graphics cards supporting
CUDA. On my machine, it provides up to 170x performance increases...
This function implements a standard algorithm for computing factorials. It may not be the most efficient for very large arguments, but it is very transparent. The function accepts single numbers as inputs or arrays.
Note that for any...
em_uvp : Expectation-Maximization algorithm for a Univariate Poisson Mixture
[logl , R , P] = em_upm(Z , R0 , P0 , [nbite]);
Z Discrete measurements (1 x K x [n1] x ... x [nl])
This library implements a randomized algorithm for solving the least-squares equation x = arg min norm(A * x - b, 2) or the underdetermined system min(norm(x, 2)) s.t. Ax=b. With high probability the running this o(mn^2) for an m-by-n matrix.
An efficient algorithm for identification of strong polarity-inversion line (SPIL) on Solar Dynamic Observatory (SDO) Helioseismic and Magnetic Imager (HMI) magnetograms.
Detailed description will appear in the paper: Volobuev, D.M....
C++ std::nth_element is an efficient algorithm for selecting a ranked element from a vector of data. Typically it is implemented as a variant of quickselect, AKA Hoare's Selection Algorithm. The mex-file in this package will run nth_element over a...