SMAWK totally monotone matrix searching algorithm Icon

SMAWK totally monotone matrix searching algorithm

This algorithm takes as input a function for computing matrix values.

SMAWK totally monotone matrix searching algorithmOverview

Editor: This Algorithm takes as input a function for computing Matrix values, and searches for the position of maximum value in each row. The matrix must satisfy the "totally monotone" property: in each submatrix (in particular each 2x2 submatrix) the positions of the Maxima must move leftward as you go down the rows. The algorithm uses this property to greatly reduce the number of matrix elements evaluated, compared to a naive algorithm that explicitly constructs the matrix.

As a simple example, we apply the algorithm to finding nearest neighbors in B for each point in A, where B may be distributed arbitrarily in space but the points of A lie along a single line. Using SMAWK for this problem takes only linear time if the input is already sorted.

NEW

Fixed some bugs.

SMAWK totally monotone matrix searching algorithmInformation

Version
1.0
Date
02.04.10
License
Language
English
File Size
N/A
Category
SubCategory
Operating Systems
Windows ,Linux,Mac OS,BSD,Solaris
System Requirements
No additional system requirements.
LaTeX codec Icon
Codec for converting unicodes to LaTeX markup and vice versa.
Sieve of Eratosthenes Icon
Computes an infinite sequence of primes using simple generators.
Dendrogram drawing Icon
This recipe draws a dendrogram (horizontal format used for evolutionary trees)
Breadth first traversal of tree Icon
Uses a recursively called simple generator to traverse a tree in breadth first
Convex hull and diameter of 2d point sets Icon
Convex hull and diameter of 2d point sets script returns the convex hul
Dijkstra's algorithm for shortest paths Icon
Dijkstra(G,s) finds all shortest paths from s to each other vertex in the graph
Hopcroft-Karp bipartite matching Icon
A bipartite graph in a variation of Guido van Rossum's dictionary-of-lists forma
More
Principal Component Analysis (PCA) Icon
A class that carries out Principal Component Analysis (PCA).
Free
Deal Or No Deal Game Icon
A game based on the tv game show, Deal Or No Deal.
Free
Disk Dumper Icon
This recipe will display a hex dump of the disk specified on the command line.
Complex Boolean Regular Expression Class Icon
Need to look for the occurence of words in a string or group of words
Free
Display an Image from a specified file Icon
Reads an image file from the filename specified as the 1st parameter
Free
Quickslice decorator Icon
Quickslice decorator script defines a decorator that allows for an abbreviated
Free
mx.ODBC example Icon
mx.ODBC example script shows you how to get the columns of a table and get data.
Free
Python replacement for java.util.Properties Icon
Quick and easy way to process Java properties files using pure Python
Free
More