Locators

Back to Mathematics

A locator is a function which maps a variable to . It abstracts the representation of geometric points. A point is an element of the domain of the locator. The coordinate of a point is the value of the locator at that point. The is called the dimensionality of the locator. Using points as abstraction units leads to geometric algorithms, where problems are recast as visualizable geometric problems in .

The locator abstraction allows only a read-access to points. Indeed, the memory that stores a returned coordinate may only exist as a temporary variable. To store points requires concrete point data-types, such as the vector.

Motivation

Abstract storage

While it is possible to use a single data type, such as the vector, for representing points, requiring to do so is often inconvenient. The problem is that point data often comes in various different forms and data types, and therefore would first need to be temporarily converted to a set of vectors. This duplicates memory-use, and perhaps more importantly, fills the code with distracting conversion boiler-plate. A locator allows the existing data to be used directly. For example, a point could store a coordinate in with only a one bit per coordinate.

Abstract representation

The most common use-case is for the underlying data-type to directly store the coordinates of a point. However, the locator can also store the coordinates in a transformed form. For example, if a point is stored in polar coordinates, then the locator can convert a point to normal coordinates on the fly, or the other way around.

Files

Array locator

Indirect locator

Locator archetype

Locator concept

Locator module

Pointer locator

Pointer-range locator

Sub locator

Testing for locators

Transform locator

Vector locator