liveBook · Manning

Function type

As explained in Geometry for Programmers

A function type specifies the kinds of inputs and outputs a function accepts, including its domain and codomain.

A function type describes the inputs a function accepts and the outputs it can return. Its domain names the input set, while its codomain names the output set; in programming, these correspond closely to input and output types. section 2.4.2 section 2.8

Geometric modeling makes the idea concrete. A transformation maps points from ℝᴺ to ℝᴺ, such as translation, which shifts every point by the same distance and direction. A vector field instead maps each point in ℝᴺ to an M-dimensional vector in ℝᴹ. section 2.4.2 section 2.4.2

Common function types in geometric modeling include:

  • Geometric transformation: turns a point into another point, normally in the same space. section 2.4.2
  • Vector field: assigns a vector to every point, indicating movement, color, or another value. section 2.4.2
  • Scalar field and distance function: appear among the principal function types used for geometric work. section 2.8

Translation

Applying a translation to the vertices of a square illustrates the rule, but the function is defined for every point in ℝ², not just that square. section 2.4.2

Figure 2.23 The simplest geometric transformation: translation
02-23

Visualizes translation as the simplest geometric transformation. section 2.4.2

How Geometry for Programmers covers it

How deep it goes
Defines domains and codomains, then distinguishes transformations and vector fields, without developing their later chapters’ mechanics.
Examples
Uses translation of a square in ℝ² and vector-field illustrations to ground abstract function types.
What it assumes
Assumes familiarity with real numbers and introduces ℝ², ℝ³, and ℝᴺ as one-, two-, three-, and N-dimensional spaces.
What you can do after
Evaluate/understand geometric functions by identifying their input spaces, output spaces, and per-input values.
How it connects
Connects domain and codomain with geometric transformations, vector fields, scalar fields, distance functions, points, and vectors.

Also explained in

Compare how 4 books explain function type →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.