|
4 | 4 | This module describes two types of *mappings*:
|
5 | 5 |
|
6 | 6 | * CoordinateMap: a general function from a domain to a range, with a possible
|
7 |
| - inverse function. |
8 |
| -
|
| 7 | + inverse function; |
9 | 8 | * AffineTransform: an affine function from a domain to a range, not
|
10 |
| - necessarily of the same dimension, hence not always invertible. |
| 9 | + necessarily of the same dimension, hence not always invertible. |
11 | 10 |
|
12 |
| -Each of these objects is meant to encapsulate a tuple of |
13 |
| -(domain, range, function). |
14 |
| -Each of the mapping objects contain all the details about their domain |
15 |
| -CoordinateSystem, their range CoordinateSystem and the mapping between |
| 11 | +Each of these objects is meant to encapsulate a tuple of (domain, range, |
| 12 | +function). Each of the mapping objects contain all the details about their |
| 13 | +domain CoordinateSystem, their range CoordinateSystem and the mapping between |
16 | 14 | them.
|
17 | 15 |
|
18 | 16 | Common API
|
|
21 | 19 | They are separate classes, neither one inheriting from the other.
|
22 | 20 | They do, however, share some parts of an API, each having methods:
|
23 | 21 |
|
24 |
| -* renamed_domain : rename on the coordinates of the domain (returns a new mapping) |
| 22 | +* renamed_domain : rename on the coordinates of the domain (returns a new |
| 23 | + mapping) |
25 | 24 |
|
26 | 25 | * renamed_range : rename the coordinates of the range (returns a new mapping)
|
27 | 26 |
|
28 |
| -* reordered_domain : reorder the coordinates of the domain (returns a new mapping) |
| 27 | +* reordered_domain : reorder the coordinates of the domain (returns a new |
| 28 | + mapping) |
29 | 29 |
|
30 |
| -* reordered_range : reorder the coordinates of the range (returns a new mapping) |
| 30 | +* reordered_range : reorder the coordinates of the range (returns a new |
| 31 | + mapping) |
31 | 32 |
|
32 | 33 | * inverse : when appropriate, return the inverse *mapping*
|
33 | 34 |
|
|
45 | 46 | -----------------------------------------------
|
46 | 47 |
|
47 | 48 | * compose : Take a sequence of mappings (either CoordinateMaps or
|
48 |
| - AffineTransforms) and return their composition. If they are all |
49 |
| - AffineTransforms, an AffineTransform is returned. This checks to |
50 |
| - ensure that domains and ranges of the various mappings agree. |
| 49 | + AffineTransforms) and return their composition. If they are all |
| 50 | + AffineTransforms, an AffineTransform is returned. This checks to ensure that |
| 51 | + domains and ranges of the various mappings agree. |
51 | 52 | * product : Take a sequence of mappings (either CoordinateMaps or
|
52 |
| - AffineTransforms) and return a new mapping that has domain and range |
53 |
| - given by the concatenation of their domains and ranges, and the |
54 |
| - mapping simply concatenates the output of each of the individual |
55 |
| - mappings. If they are all AffineTransforms, an AffineTransform is |
56 |
| - returned. If they are all AffineTransforms that are in fact linear |
57 |
| - (i.e. origin=0) then can is represented as a block matrix with the |
58 |
| - size of the blocks determined by |
| 53 | + AffineTransforms) and return a new mapping that has domain and range given by |
| 54 | + the concatenation of their domains and ranges, and the mapping simply |
| 55 | + concatenates the output of each of the individual mappings. If they are all |
| 56 | + AffineTransforms, an AffineTransform is returned. If they are all |
| 57 | + AffineTransforms that are in fact linear (i.e. origin=0) then can is |
| 58 | + represented as a block matrix with the size of the blocks determined by |
59 | 59 | * concat : Take a mapping and prepend a coordinate to its domain and
|
60 |
| - range. For mapping `m`, this is the same as |
61 |
| - product(AffineTransform.identity('concat'), `m`) |
| 60 | + range. For mapping ``m``, this is the same as |
| 61 | + ``product(AffineTransform.identity('concat'), m)`` |
62 | 62 | """
|
63 | 63 | from __future__ import absolute_import
|
64 | 64 |
|
|
0 commit comments