A Direction_d is a vector in the -dimensional vector space where we forget about its length. We represent directions in -dimensional space as a tuple of variables of type RT which we call the homogeneous coordinates of the direction. The coordinate must be positive. The Cartesian coordinates of a direction are for , which are of type FT. Two directions are equal if their Cartesian coordinates are positive multiples of each other. Directions are in one-to-one correspondence to points on the unit sphere.
| |
the linear algebra layer.
| |
| |
a read-only iterator for the deltas of dir.
| |
| |
construction tag.
|
| |||||
introduces a variable dir of
type Direction_d<Kernel>.
| |||||
| |||||
introduces a variable dir of type Direction_d<Kernel>
initialized to the direction of v.
| |||||
| |||||
| |||||
introduces a variable dir of type Direction_d<Kernel> in
dimension d with representation tuple set [first,last).
| |||||
| |||||
returns
a variable dir of type Direction_d<Kernel> initialized to the
direction of the -th base vector of dimension .
| |||||
| |||||
introduces a variable dir of type Direction_d<Kernel> in
-dimensional space.
| |||||
| |||||
introduces a variable dir of type Direction_d<Kernel> in
-dimensional space.
|
|
| returns the dimension of dir. | ||
|
|
returns the -th component of dir.
| ||
|
|
returns the -th delta of dir.
| ||
|
| returns an iterator pointing to the first delta of dir. | ||
|
| returns an iterator pointing beyond the last delta of dir. | ||
|
| returns a vector pointing in direction dir. | ||
|
| returns true iff dir.delta(i)==0 for all . | ||
|
| |||
returns . | ||||
|
| returns the direction opposite to dir. | ||
|
| returns the direction opposite to dir. |
Directions are implemented by arrays of integers as an item type. All operations like creation, initialization, tests, inversion, input and output on a direction take time . dimension(), coordinate access and conversion take constant time. The space requirement is .