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.
References in periodicals archive ?
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.
In addition to the general pattern match ATR system, McDonnell Douglas is offering its combat-proven man-in-the-loop target identification system for the GRAND SLAM missile configuration being proposed to the Royal Air Force.
McDonnell Douglas conducted three independent tests of its general pattern match ATR system between 1994 and 1996.
Sorcerer(TM) and Pattern Match Accelerator(TM) are trademarks of Sage-N Research, Inc.
Using patent-pending Pattern Match Accelerator(TM) hardware and systems technology, it offers processing throughput for protein identification that otherwise might require hundreds of compute nodes.
Sorcerer(TM), Pattern Match Accelerator(TM) and the Integrated Data Appliance Company(TM) are trademarks of Sage-N Research, Inc.