mirror of https://github.com/CGAL/cgal
unlink
This commit is contained in:
parent
d8fca76ea1
commit
730f1b5682
|
|
@ -4,7 +4,7 @@ namespace CGAL {
|
|||
/*!
|
||||
\ingroup PkgKernelDKernels
|
||||
|
||||
A model for `Kernel_d` that uses Cartesian coordinates to represent the
|
||||
A model for `Kernel_d` that uses %Cartesian coordinates to represent the
|
||||
geometric objects. In order for `Cartesian_d` to model Euclidean geometry
|
||||
in \f$ E^d\f$ , for some mathematical field \f$ E\f$ (<I>e.g.</I>,
|
||||
the rationals \f$\mathbb{Q}\f$ or the reals \f$\mathbb{R}\f$), the template parameter `FieldNumberType`
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ the kernel is only an approximation of Euclidean geometry.
|
|||
|
||||
\models ::Kernel_d
|
||||
|
||||
\sa `CGAL::Cartesian_d<FieldumberType>`
|
||||
\sa `CGAL::Cartesian_d<FieldNumberType>`
|
||||
|
||||
*/
|
||||
template< typename RingNumberType >
|
||||
class Homogeneous {
|
||||
class Homogeneous_d {
|
||||
public:
|
||||
|
||||
/// @}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ A `Direction_d` is a vector in the \f$ d\f$-dimensional vector space
|
|||
where we forget about its length. We represent directions in
|
||||
\f$ d\f$-dimensional space as a tuple \f$ (h_0,\ldots,h_d)\f$ of variables of
|
||||
type `RT` which we call the homogeneous coordinates of the
|
||||
direction. The coordinate \f$ h_d\f$ must be positive. The Cartesian
|
||||
direction. The coordinate \f$ h_d\f$ must be positive. The %Cartesian
|
||||
coordinates of a direction are \f$ c_i = h_i/h_d\f$ for \f$ 0 \le i < d\f$,
|
||||
which are of type `FT`. Two directions are equal if their
|
||||
Cartesian coordinates are positive multiples of each other. Directions
|
||||
%Cartesian coordinates are positive multiples of each other. Directions
|
||||
are in one-to-one correspondence to points on the unit sphere.
|
||||
|
||||
### Downward compatibility ###
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ in \f$ d\f$ - dimensional space. A hyperplane \f$ h\f$ is represented by
|
|||
coefficients \f$ (c_0,c_1,\ldots,c_d)\f$ of type `RT`. At least one of
|
||||
\f$ c_0\f$ to \f$ c_{ d - 1 }\f$ must be non-zero. The plane equation is
|
||||
\f$ \sum_{ 0 \le i < d } c_i x_i + c_d = 0\f$, where \f$ x_0\f$ to \f$ x_{d-1}\f$ are
|
||||
Cartesian point coordinates. For a particular \f$ x\f$ the sign of \f$ \sum_{
|
||||
%Cartesian point coordinates. For a particular \f$ x\f$ the sign of \f$ \sum_{
|
||||
0 \le i < d } c_i x_i + c_d\f$ determines the position of a point \f$ x\f$
|
||||
with respect to the hyperplane (on the hyperplane, on the negative
|
||||
side, or on the positive side).
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ space in dimension \f$ d\f$. A point \f$ p = (p_0,\ldots,p_{ d - 1 })\f$ in
|
|||
h_i/h_d\f$, which is of type `FT`. The homogenizing coordinate \f$ h_d\f$
|
||||
is positive.
|
||||
|
||||
We call \f$ p_i\f$, \f$ 0 \leq i < d\f$ the \f$ i\f$-th Cartesian coordinate and
|
||||
We call \f$ p_i\f$, \f$ 0 \leq i < d\f$ the \f$ i\f$-th %Cartesian coordinate and
|
||||
\f$ h_i\f$, \f$ 0 \le i \le d\f$, the \f$ i\f$-th homogeneous coordinate. We call \f$ d\f$
|
||||
the dimension of the point.
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ typedef Hidden_type LA;
|
|||
|
||||
/*!
|
||||
a read-only iterator for the
|
||||
Cartesian coordinates.
|
||||
%Cartesian coordinates.
|
||||
*/
|
||||
typedef Hidden_type Cartesian_const_iterator;
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ Point_d<Kernel>(int d, Origin);
|
|||
|
||||
/*!
|
||||
introduces a variable
|
||||
`p` of type `Point_d<Kernel>` in dimension `d`. If `size [first,last) == d` this creates a point with Cartesian coordinates
|
||||
`p` of type `Point_d<Kernel>` in dimension `d`. If `size [first,last) == d` this creates a point with %Cartesian coordinates
|
||||
`set [first,last)`. If `size [first,last) == d+1` the range
|
||||
specifies the homogeneous coordinates
|
||||
\f$ H = set [first,last) = (\pm h_0, \pm h_1, \ldots, \pm h_d)\f$
|
||||
|
|
@ -127,7 +127,7 @@ returns the dimension of `p`.
|
|||
int dimension() ;
|
||||
|
||||
/*!
|
||||
returns the \f$ i\f$-th Cartesian
|
||||
returns the \f$ i\f$-th %Cartesian
|
||||
coordinate of `p`.
|
||||
|
||||
\pre \f$ 0 \leq i < d\f$.
|
||||
|
|
@ -135,7 +135,7 @@ coordinate of `p`.
|
|||
FT cartesian(int i) ;
|
||||
|
||||
/*!
|
||||
returns the \f$ i\f$-th Cartesian
|
||||
returns the \f$ i\f$-th %Cartesian
|
||||
coordinate of `p`.
|
||||
|
||||
\pre \f$ 0 \leq i < d\f$.
|
||||
|
|
@ -152,14 +152,14 @@ RT homogeneous(int i) ;
|
|||
|
||||
/*!
|
||||
returns an
|
||||
iterator pointing to the zeroth Cartesian coordinate \f$ p_0\f$ of
|
||||
iterator pointing to the zeroth %Cartesian coordinate \f$ p_0\f$ of
|
||||
`p`.
|
||||
*/
|
||||
Cartesian_const_iterator cartesian_begin() ;
|
||||
|
||||
/*!
|
||||
returns an
|
||||
iterator pointing beyond the last Cartesian coordinate of `p`.
|
||||
iterator pointing beyond the last %Cartesian coordinate of `p`.
|
||||
|
||||
*/
|
||||
Cartesian_const_iterator cartesian_end() ;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ An instance of data type `Vector_d<Kernel>` is a vector of Euclidean
|
|||
space in dimension \f$ d\f$. A vector \f$ r = (r_0,\ldots,r_{ d - 1})\f$ can be
|
||||
represented in homogeneous coordinates \f$ (h_0,\ldots,h_d)\f$ of number
|
||||
type `RT`, such that \f$ r_i = h_i/h_d\f$ which is of type `FT`. We
|
||||
call the \f$ r_i\f$'s the Cartesian coordinates of the vector. The
|
||||
call the \f$ r_i\f$'s the %Cartesian coordinates of the vector. The
|
||||
homogenizing coordinate \f$ h_d\f$ is positive.
|
||||
|
||||
This data type is meant for use in computational geometry. It realizes
|
||||
|
|
@ -45,7 +45,7 @@ typedef Hidden_type LA;
|
|||
|
||||
/*!
|
||||
a read-only iterator for the
|
||||
Cartesian coordinates.
|
||||
%Cartesian coordinates.
|
||||
*/
|
||||
typedef Hidden_type Cartesian_const_iterator;
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ Vector_d<Kernel>(int d, Null_vector);
|
|||
/*!
|
||||
introduces a variable
|
||||
`v` of type `Vector_d<Kernel>` in dimension `d`. If
|
||||
`size [first,last) == d` this creates a vector with Cartesian
|
||||
`size [first,last) == d` this creates a vector with %Cartesian
|
||||
coordinates `set [first,last)`. If `size [first,last) == p+1` the range specifies the homogeneous coordinates \f$ H = set
|
||||
[first,last) = (\pm h_0, \pm h_1, \ldots, \pm h_d)\f$ where the
|
||||
sign chosen is the sign of \f$ h_d\f$.
|
||||
|
|
@ -140,7 +140,7 @@ returns the dimension of `v`.
|
|||
int dimension() ;
|
||||
|
||||
/*!
|
||||
returns the \f$ i\f$-th Cartesian
|
||||
returns the \f$ i\f$-th %Cartesian
|
||||
coordinate of `v`.
|
||||
|
||||
\pre \f$ 0 \leq i < d\f$.
|
||||
|
|
@ -148,7 +148,7 @@ coordinate of `v`.
|
|||
FT cartesian(int i) ;
|
||||
|
||||
/*!
|
||||
returns the \f$ i\f$-th Cartesian
|
||||
returns the \f$ i\f$-th %Cartesian
|
||||
coordinate of `v`.
|
||||
|
||||
\pre \f$ 0 \leq i < d\f$.
|
||||
|
|
@ -171,13 +171,13 @@ FT squared_length() ;
|
|||
|
||||
/*!
|
||||
returns an
|
||||
iterator pointing to the zeroth Cartesian coordinate of `v`.
|
||||
iterator pointing to the zeroth %Cartesian coordinate of `v`.
|
||||
*/
|
||||
Cartesian_const_iterator cartesian_begin() ;
|
||||
|
||||
/*!
|
||||
returns an
|
||||
iterator pointing beyond the last Cartesian coordinate of `v`.
|
||||
iterator pointing beyond the last %Cartesian coordinate of `v`.
|
||||
|
||||
*/
|
||||
Cartesian_const_iterator cartesian_end() ;
|
||||
|
|
@ -215,50 +215,50 @@ Vector_d<Kernel> transform(const Aff_transformation_d<Kernel>& t)
|
|||
|
||||
/*!
|
||||
multiplies all
|
||||
Cartesian coordinates by `n`.
|
||||
%Cartesian coordinates by `n`.
|
||||
*/
|
||||
Vector_d<Kernel>& operator*=(const RT& n) ;
|
||||
|
||||
/*!
|
||||
multiplies all
|
||||
Cartesian coordinates by `r`.
|
||||
%Cartesian coordinates by `r`.
|
||||
*/
|
||||
Vector_d<Kernel>& operator*=(const FT& r) ;
|
||||
|
||||
/*!
|
||||
returns the vector
|
||||
with Cartesian coordinates \f$ v_i/n, 0 \leq i < d\f$.
|
||||
with %Cartesian coordinates \f$ v_i/n, 0 \leq i < d\f$.
|
||||
*/
|
||||
Vector_d<Kernel> operator/(const RT& n) ;
|
||||
|
||||
/*!
|
||||
returns the vector
|
||||
with Cartesian coordinates \f$ v_i/r, 0 \leq i < d\f$.
|
||||
with %Cartesian coordinates \f$ v_i/r, 0 \leq i < d\f$.
|
||||
*/
|
||||
Vector_d<Kernel> operator/(const FT& r) ;
|
||||
|
||||
/*!
|
||||
divides all
|
||||
Cartesian coordinates by `n`.
|
||||
%Cartesian coordinates by `n`.
|
||||
*/
|
||||
Vector_d<Kernel>& operator/=(const RT& n) ;
|
||||
|
||||
/*!
|
||||
divides all
|
||||
Cartesian coordinates by `r`.
|
||||
%Cartesian coordinates by `r`.
|
||||
*/
|
||||
Vector_d<Kernel>& operator/=(const FT& r) ;
|
||||
|
||||
/*!
|
||||
inner product, i.e.,
|
||||
\f$ \sum_{ 0 \le i < d } v_i w_i\f$, where \f$ v_i\f$ and \f$ w_i\f$ are the
|
||||
Cartesian coordinates of \f$ v\f$ and \f$ w\f$ respectively.
|
||||
%Cartesian coordinates of \f$ v\f$ and \f$ w\f$ respectively.
|
||||
*/
|
||||
FT operator* (const Vector_d<Kernel>& w) ;
|
||||
|
||||
/*!
|
||||
returns the
|
||||
vector with Cartesian coordinates \f$ v_i+w_i, 0 \leq i < d\f$.
|
||||
vector with %Cartesian coordinates \f$ v_i+w_i, 0 \leq i < d\f$.
|
||||
*/
|
||||
Vector_d<Kernel> operator+(const Vector_d<Kernel>& w) ;
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ Vector_d<Kernel>& operator+=(const Vector_d<Kernel>& w) ;
|
|||
|
||||
/*!
|
||||
returns the
|
||||
vector with Cartesian coordinates \f$ v_i-w_i, 0 \leq i < d\f$.
|
||||
vector with %Cartesian coordinates \f$ v_i-w_i, 0 \leq i < d\f$.
|
||||
*/
|
||||
Vector_d<Kernel> operator-(const Vector_d<Kernel>& w) ;
|
||||
|
||||
|
|
@ -293,12 +293,12 @@ vector.
|
|||
bool is_zero() ;
|
||||
|
||||
/*!
|
||||
returns the vector with Cartesian coordinates \f$ n v_i\f$.
|
||||
returns the vector with %Cartesian coordinates \f$ n v_i\f$.
|
||||
*/
|
||||
Vector_d<Kernel> operator*(const RT& n, const Vector_d<Kernel>& v);
|
||||
|
||||
/*!
|
||||
returns the vector with Cartesian coordinates \f$ r v_i, 0 \leq i <
|
||||
returns the vector with %Cartesian coordinates \f$ r v_i, 0 \leq i <
|
||||
d\f$.
|
||||
*/
|
||||
Vector_d<Kernel> operator*(const FT& r, const Vector_d<Kernel>& v);
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ affine_rank(ForwardIterator first, ForwardIterator last);
|
|||
/*!
|
||||
|
||||
|
||||
Compares the Cartesian
|
||||
Compares the %Cartesian
|
||||
coordinates of points `p` and `q` lexicographically
|
||||
in ascending order of its Cartesian components `p[i]` and
|
||||
in ascending order of its %Cartesian components `p[i]` and
|
||||
`q[i]` for \f$ i = 0,\ldots,d-1\f$.
|
||||
|
||||
\pre `p.dimension() == q.dimension()`.
|
||||
|
|
@ -89,7 +89,7 @@ const Point_d<R>& p);
|
|||
|
||||
|
||||
returns `true` iff `p` is
|
||||
lexicographically smaller than `q` with respect to Cartesian
|
||||
lexicographically smaller than `q` with respect to %Cartesian
|
||||
lexicographic order of points.
|
||||
|
||||
\pre `p.dimension() == q.dimension()`.
|
||||
|
|
@ -102,7 +102,7 @@ Point_d<R>& q);
|
|||
|
||||
|
||||
returns `true` iff \f$ p\f$ is
|
||||
lexicographically smaller than \f$ q\f$ with respect to Cartesian
|
||||
lexicographically smaller than \f$ q\f$ with respect to %Cartesian
|
||||
lexicographic order of points or equal to \f$ q\f$.
|
||||
|
||||
\pre `p.dimension() == q.dimension()`.
|
||||
|
|
@ -146,7 +146,7 @@ determines the orientation of the points of the tuple `A = tuple [first,last)` w
|
|||
1 & 1 & 1 & 1 \\
|
||||
A[0] & A[1] & \dots& A[d]
|
||||
\end{array} \right| \f]
|
||||
where `A[i]` denotes the Cartesian coordinate vector of
|
||||
where `A[i]` denotes the %Cartesian coordinate vector of
|
||||
the \f$ i\f$-th point in \f$ A\f$.
|
||||
\pre `size [first,last) == d+1` and `A[i].dimension() == d` \f$ \forall0 \leq i \leq d\f$.
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ public:
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
Compares the Cartesian coordinates of
|
||||
Compares the %Cartesian coordinates of
|
||||
points `p` and `q` lexicographically in ascending
|
||||
order of its Cartesian components `p[i]` and `q[i]` for \f$ i =
|
||||
order of its %Cartesian components `p[i]` and `q[i]` for \f$ i =
|
||||
0,\ldots,d-1\f$.
|
||||
|
||||
\pre The objects are of the same dimension.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Kernel_d::RT homogeneous(const Kernel_d::Point_d& p,
|
|||
int i);
|
||||
|
||||
/*!
|
||||
returns the ith Cartesian coordinate of \f$ p\f$.
|
||||
returns the ith %Cartesian coordinate of \f$ p\f$.
|
||||
|
||||
\pre `0 <= i < dimension(p)`.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ A model for this must provide:
|
|||
class Kernel_d::ConstructCartesianConstIterator_d {
|
||||
public:
|
||||
/*!
|
||||
returns an iterator on the 0'th Cartesian coordinate of `p`.
|
||||
returns an iterator on the 0'th %Cartesian coordinate of `p`.
|
||||
*/
|
||||
Kernel_d::Cartesian_const_iterator_d operator()(const Kernel_d::Point_d
|
||||
&p);
|
||||
|
||||
/*!
|
||||
returns the past the end iterator of the Cartesian coordinates of `p`.
|
||||
returns the past the end iterator of the %Cartesian coordinates of `p`.
|
||||
*/
|
||||
Kernel_d::Cartesian_const_iterator_d operator()(const Kernel_d::Point_d
|
||||
&p, int);
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ public:
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
returns `true` iff the \f$ i\f$th Cartesian coordinate
|
||||
returns `true` iff the \f$ i\f$th %Cartesian coordinate
|
||||
of `p` is
|
||||
smaller than the \f$ i\f$th Cartesian coordinate of `q`.
|
||||
smaller than the \f$ i\f$th %Cartesian coordinate of `q`.
|
||||
|
||||
\pre `p` and `q` have the same dimension.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public:
|
|||
|
||||
/*!
|
||||
returns `true` iff `p` is
|
||||
lexicographically smaller than `q` with respect to Cartesian
|
||||
lexicographically smaller than `q` with respect to %Cartesian
|
||||
lexicographic order of points.
|
||||
|
||||
\pre `p` and `q` have the same dimension.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public:
|
|||
|
||||
/*!
|
||||
returns `true` iff \f$ p\f$ is
|
||||
lexicographically smaller than \f$ q\f$ with respect to Cartesian
|
||||
lexicographically smaller than \f$ q\f$ with respect to %Cartesian
|
||||
lexicographic order of points or equal to \f$ q\f$.
|
||||
|
||||
\pre `p` and `q` have the same dimension.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ determines the orientation of the points of the tuple
|
|||
1 & 1 & 1 & 1 \\
|
||||
A[0] & A[1] & \dots& A[d]
|
||||
\end{array} \right| \f]
|
||||
where `A[i]` denotes the Cartesian coordinate vector of
|
||||
where `A[i]` denotes the %Cartesian coordinate vector of
|
||||
the \f$ i\f$-th point in \f$ A\f$.
|
||||
\pre `size [first,last) == d+1` and `A[i].dimension() == d` \f$ \forall0 \leq i \leq d\f$.
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ typedef Hidden_type RT;
|
|||
|
||||
/*!
|
||||
a type that allows to iterate over
|
||||
the Cartesian coordinates
|
||||
the %Cartesian coordinates
|
||||
*/
|
||||
typedef Hidden_type Cartesian_const_iterator_d;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,23 +74,23 @@ If we index the tuple as above then we require that
|
|||
Our object of study is the \f$ d\f$-dimensional affine Euclidean space,
|
||||
where \f$ d\f$ is a parameter of our geometry. Objects in that space are
|
||||
sets of points. A common way to represent the points is the use of
|
||||
Cartesian coordinates, which assumes a reference
|
||||
%Cartesian coordinates, which assumes a reference
|
||||
frame (an origin and \f$ d\f$ orthogonal axes). In that framework, a point
|
||||
is represented by a \f$ d\f$-tuple \f$ (c_0,c_1,\ldots,c_{d-1})\f$,
|
||||
and so are vectors in the underlying linear space. Each point is
|
||||
represented uniquely by such Cartesian
|
||||
represented uniquely by such %Cartesian
|
||||
coordinates.
|
||||
|
||||
Another way to represent points is by homogeneous coordinates. In that
|
||||
framework, a point is represented by a \f$ (d+1)\f$-tuple \f$ (h_0,h_1,\ldots,h_d)\f$.
|
||||
Via the formulae \f$ c_i = h_i/h_d\f$,
|
||||
the corresponding point with Cartesian coordinates
|
||||
the corresponding point with %Cartesian coordinates
|
||||
\f$ (c_0,c_1,\ldots,c_{d-1})\f$
|
||||
can be computed. Note that homogeneous coordinates are not unique.
|
||||
For \f$ \lambda\ne 0\f$, the tuples \f$ (h_0,h_1,\ldots,h_d)\f$ and
|
||||
\f$ (\lambda\cdot h_0,\lambda\cdot h_1,\ldots,\lambda\cdot h_d)\f$
|
||||
represent the same point.
|
||||
For a point with Cartesian coordinates
|
||||
For a point with %Cartesian coordinates
|
||||
\f$ (c_0,c_1,\ldots,c_{d-1})\f$ a
|
||||
possible homogeneous representation is
|
||||
\f$ (c_0,c_1,\ldots,c_{d-1},1)\f$.
|
||||
|
|
@ -114,11 +114,11 @@ all kernel objects `Kernel_object`, the types
|
|||
`CGAL::Kernel_object<R>` and `R::Kernel_object` are identical.
|
||||
|
||||
\cgal offers two families of concrete models for the concept
|
||||
representation class, one based on the Cartesian
|
||||
representation class, one based on the %Cartesian
|
||||
representation of points and one based on the homogeneous
|
||||
representation of points. The interface of the kernel objects is
|
||||
designed such that it works well with both
|
||||
Cartesian and homogeneous representation, for
|
||||
%Cartesian and homogeneous representation, for
|
||||
example, points have a constructor with a range of coordinates plus a
|
||||
common denominator (the \f$ d+1\f$ homogeneous coordinates of the point).
|
||||
The common interfaces parameterized with a representation class allow
|
||||
|
|
@ -153,21 +153,21 @@ should fulfill \cgal's requirements on a number type.
|
|||
## %Cartesian %Kernel ##
|
||||
|
||||
With `Cartesian_d<FieldNumberType,LinearAlgebra>` you can choose
|
||||
Cartesian representation of coordinates. The type
|
||||
%Cartesian representation of coordinates. The type
|
||||
`LinearAlgebra` must me a linear algebra module working on numbers
|
||||
of type `FieldNumberType`. The second parameter defaults to module
|
||||
delivered with the kernel so for short a user can just write
|
||||
`Cartesian_d<FieldNumberType>` when not providing her own linear
|
||||
algebra.
|
||||
|
||||
When you choose Cartesian representation you have
|
||||
When you choose %Cartesian representation you have
|
||||
to declare at least the type of the coordinates. A number type used
|
||||
with the `Cartesian_d` representation class should be a <I>field
|
||||
type</I> as described above. Both `Cartesian<FieldNumberType>::FT`
|
||||
and `Cartesian<FieldNumberType>::RT` are mapped to number type
|
||||
type</I> as described above. Both `Cartesian_d<FieldNumberType>::FT`
|
||||
and `Cartesian_d<FieldNumberType>::RT` are mapped to number type
|
||||
`FieldNumberType`.
|
||||
`Cartesian_d<FieldNumberType,LinearAlgebra>::LA` is mapped to the
|
||||
type `LinearAlgebra`. `Cartesian<FieldNumberType>` uses
|
||||
type `LinearAlgebra`. `Cartesian_d<FieldNumberType>` uses
|
||||
reference counting internally to save copying costs.
|
||||
|
||||
## %Homogeneous %Kernel ##
|
||||
|
|
@ -178,7 +178,7 @@ coordinate can serve as a common denominator. Avoiding divisions can
|
|||
be useful for exact geometric computation. With
|
||||
`Homogeneous_d<RingNumberType,LinearAlgebra>` you can choose
|
||||
homogeneous representation of coordinates with the kernel objects.
|
||||
As for Cartesian representation you have to declare
|
||||
As for %Cartesian representation you have to declare
|
||||
at the same time the type used to store the homogeneous coordinates.
|
||||
Since the homogeneous representation allows one to avoid the
|
||||
divisions, the number type associated with a homogeneous
|
||||
|
|
@ -193,7 +193,7 @@ is no issue.
|
|||
|
||||
However, some operations provided by this kernel involve division
|
||||
operations, for example computing squared distances or returning a
|
||||
Cartesian coordinate. To keep the requirements on
|
||||
%Cartesian coordinate. To keep the requirements on
|
||||
the number type parameter of `Homogeneous` low, the number type
|
||||
`Quotient<RingNumberType>` is used instead. This number type
|
||||
turns a ring type into a field type. It maintains numbers as
|
||||
|
|
@ -237,7 +237,7 @@ not be used as a traits class.
|
|||
|
||||
## Choosing a %Kernel ##
|
||||
|
||||
If you start with integral Cartesian coordinates,
|
||||
If you start with integral %Cartesian coordinates,
|
||||
many geometric computations will involve integral numerical values
|
||||
only. Especially, this is true for geometric computations that
|
||||
evaluate only predicates, which are tantamount to determinant
|
||||
|
|
@ -253,12 +253,12 @@ type, incorrect results might arise due to overflow.
|
|||
|
||||
If new points are to be constructed, for example the
|
||||
intersection point of two lines, computation of
|
||||
Cartesian coordinates usually involves divisions,
|
||||
so you need to use a field type with Cartesian
|
||||
%Cartesian coordinates usually involves divisions,
|
||||
so you need to use a field type with %Cartesian
|
||||
representation or have to switch to homogeneous representation.
|
||||
`double` is a possible, but imprecise field type. You can also
|
||||
put any ring type into `Quotient` to get a field type and put it
|
||||
into `Cartesian`, but you better put the ring type into
|
||||
into `Cartesian_d`, but you better put the ring type into
|
||||
`Homogeneous`. `leda_rational` and `leda_real` are valid
|
||||
field types, too.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue