Advanced concepts

From Impure Wiki

Jump to: navigation, search

Pattern Structures

A pattern structure is a specific form of using an Impure data structure. The pattern represents a typical arrangement of data that is found in many cases.

For example, a 'pairs table' is a Table with at least two Lists of the same length, in such a way that those (first) two Lists hold a collection of pairs of items. There's no explicit PairsTable structure, although some operators expect (and can only work with) a pairs table. The type of the corresponding inlet will be just Table, but the operator does actually work with a more specific type of Table, as just described.

Some of the most common pattern structures are:

1. pairs Table

A Table with a least two Lists of the same length. Two paired elements (at the same position within their respective Lists) are said to be a pair.

With a pairs Table you can build a Network, or you can define a configurable List replacement function using configurableListOperator.

2. table3D

a List of Tables (which is the same as a Table of Lists, or a List of Lists or Lists, since a Table is a List of Lists)

Personal tools