pattern matching

(redirected from Pattern match)
Also found in: Dictionary.

pattern matching

(1)
A function is defined to take arguments of a particular type, form or value. When applying the function to its actual arguments it is necessary to match the type, form or value of the actual arguments against the formal arguments in some definition. For example, the function

length [] = 0 length (x:xs) = 1 + length xs

uses pattern matching in its argument to distinguish a null list from a non-null one.

There are well known algorithm for translating pattern matching into conditional expressions such as "if" or "case". E.g. the above function could be transformed to

length l = case l of [] -> 0 x:xs -> 1 : length xs

Pattern matching is usually performed in textual order though there are languages which match more specific patterns before less specific ones.

pattern matching

(2)
Descriptive of a type of language or utility such as awk or Perl which is suited to searching for strings or patterns in input data, usually using some kind of regular expression.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
References in periodicals archive ?
Once the pattern matches the upper part near the waist, address the pattern lower edge and lengthen or shorten to even out the hemline.
+ At the center of the Mereon Matrix is a core structure that is a pattern match for theories about the FCC structure of the nucleus of an atom.
Comparisons of the electrical activity in the four channels are used to predict seizures by detecting when the electrical activity of certain channels begins to converge on specific pattern match regularity statistics over time, indicating that a seizure is imminent.
The first challenge is to make a pleated skirt, ensuring the pattern matches across the pleats, which catches a few of the hopefuls out.
Her scarf adds a pop of color but it works because the plaid pattern matches her skirt.
The record shows that his voting pattern matches two men in Parliament very closely, Tony Blair and Gordon Brown.
When a submitted pattern matched a pattern already in the database, the submitted pattern was reported back with the existing designation.
More recently, Nymeyer and Katoen [1997] describe an implementation of an algorithm based on BURS theory, that computes all pattern matches, and which does a search that results in optimal code.
Always over-estimate and allow for pattern matches. If you're a beginner it's as well to choose a style you don't have to match and avoid stairwells and ceiling units.
If the pattern matches your body measurement length, then you don't need to adjust; that area of the pattern will fit.
Content searchers are important as well, for while federated databases use software to integrate different database formats, content searchers go out to a variety of content sources to return pattern matches. For example, British KM developer Autonomy uses advanced, pattern-matching technology (non-linear, adaptive, digital signal processing) to extract a document's digital essence.
Cosmic strings have recently run into trouble in that arena because their expected pattern matches neither the distribution of galactic clusters nor the patchiness of background radiation left over from the Big Bang (SN: 1/27/96, p.