tuple

(redirected from quintuple)
Also found in: Dictionary, Thesaurus, Wikipedia.

tuple

[′tü·pəl]
(computer science)
A horizontal row of data items in a relational data structure; corresponds to a record or segment in other types of data structures.

TUPLE

(1)

tuple

(2)
In functional languages, a data object containing two or more components. Also known as a product type or pair, triple, quad, etc. Tuples of different sizes have different types, in contrast to lists where the type is independent of the length. The components of a tuple may be of different types whereas all elements of a list have the same type. Examples of tuples in Haskell notation are (1,2), ("Tuple",True), (w,(x,y),z). The degenerate tuple with zero components, written (), is known as the unit type since it has only one possible value which is also written ().

The implementation of tuples in a language may be either "lifted" or not. If tuples are lifted then (bottom,bottom) /= bottom and the evaluation of a tuple may fail to terminate. E.g. in Haskell:

f (x,y) = 1 --> f bottom = bottom f (bottom,bottom) = 1

With lifted tuples, a tuple pattern is refutable. Thus in Haskell, pattern matching on tuples is the same as pattern matching on types with multiple constructors (algebraic data types) - the expression being matched is evaluated as far as the top level constructor, even though, in the case of tuples, there is only one possible constructor for a given type.

If tuples are unlifted then (bottom, bottom) = bottom and evaluation of a tuple will never fail to terminate though any of the components may. E.g. in Miranda:

f (x,y) = 1 --> f bottom = 1 f (bottom,bottom) = 1

Thus in Miranda, any object whose type is compatible with a tuple pattern is assumed to match at the top level without evaluation - it is an irrefutable pattern. This also applies to user defined data types with only one constructor. In Haskell, patterns can be made irrefutable by adding a "~" as in

f ~(x,y) = 1.

If tuple constructor functions were strict in all their arguments then (bottom,x) = (x,bottom) = bottom for any x so matching a refutable pattern would fail to terminate if any component was bottom.

tuple

(1) In a relational database, a tuple is one record (one row). See record and relational database.

(2) A set of values passed from one programming language to another application program or to a system program such as the operating system. Typically separated by commas, the values may be parameters for a function call or a set of data values for a database. See function.
References in periodicals archive ?
Assuming that {a; b; c; d; e} is a Diophantine quintuple with a < b < c < d < e, the following upper bounds of the element d are known:
He had his quintuple heart bypass in 1986 and "died" twice while being treated for a second heart attack in 2002.
Summary: Jose Mourinho has tipped Alex Ferguson to guide Manchester United to an unprecedented quintuple.
United stayed on course for an unprecedented quintuple by overcoming Inter Milan at Old Trafford to reach the Champions League quarter-finals.
2 (ANI): Manchester United and Portugal striker Cristiano Ronaldo believes his team can go on to win the Quintuple.
The automaker's purchasing office in India will quintuple its global sourcing from India which amounted to EUR50m in 2008 and will increase to EUR250m by the end of 2010.
2bn will be spent by the city and Continental Airlines over the next seven to ten years to almost quintuple the size of Terminal B.
King underwent quintuple bypass heart surgery in 1987, and recently started a foundation that will cover the cost of cardiac care for 300 uninsured patients in the city.
I probably did my first quadruple or quintuple there.
Kirk Kerkorian was among those wishing King, who had quintuple bypass heart surgery in 1987 and turned 73 on Sunday, a belated happy birthday.
Softly glowing bookstacks enclose a quintuple height void which is audaciously crowned by a Chareau-goes-disco ceiling canopy of glittering glass blocks.
On October 17, Abraham Solomon Krivelin, real estate stalwart, died at the age of 80, after undergoing a successful quintuple bypass operation at Delray Beach Hospital in Florida.