mirror of https://github.com/CGAL/cgal
merge after discussion during 26th CGAL Dev Meeting
This commit is contained in:
parent
351e57621a
commit
ff2af3c58a
|
|
@ -43,6 +43,25 @@ that takes as input a range of coefficients of type \ccc{Coefficient}, and an it
|
||||||
\ccNestedType{Compare_1}{A model of the concept
|
\ccNestedType{Compare_1}{A model of the concept
|
||||||
\ccc{AlgebraicKernel_d_1::Compare_1}.}
|
\ccc{AlgebraicKernel_d_1::Compare_1}.}
|
||||||
|
|
||||||
|
TODO: The following might be redundant due to the signatures of \ccc{Solve_1}.
|
||||||
|
Should be checked. They are introduced here to to symmetry
|
||||||
|
\ccc{AlgebraicKernel_d_2}.
|
||||||
|
|
||||||
|
\ccNestedType{IsCoprime_1}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::IsCoprime_1}.}
|
||||||
|
\ccGlue
|
||||||
|
\ccNestedType{IsSquareFree_1}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::IsSquareFree_1}.}
|
||||||
|
|
||||||
|
\ccNestedType{MakeSquareFree_1}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::MakeSquareFree_1}.}
|
||||||
|
\ccGlue
|
||||||
|
\ccNestedType{MakeCoprime_1}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::MakeCoprime_1}.}
|
||||||
|
\ccGlue
|
||||||
|
\ccNestedType{SquareFreeFactorization_1}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::SquareFreeFactorization_1}.}
|
||||||
|
|
||||||
\ccHasModels
|
\ccHasModels
|
||||||
|
|
||||||
\ccSeeAlso
|
\ccSeeAlso
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ kernel with all the algebraic functionalities on bivariate polynomials
|
||||||
required for the manipulation of arcs of algebraic curves of general degree
|
required for the manipulation of arcs of algebraic curves of general degree
|
||||||
$d$ in $\R^2$.
|
$d$ in $\R^2$.
|
||||||
|
|
||||||
\texttt{Question: what is the righ interface with AK for \ccc{compare_y_at_x_right}?}
|
|
||||||
|
|
||||||
\ccTypes
|
\ccTypes
|
||||||
|
|
||||||
A model of \ccc{AlgebraicKernel_d_2} is supposed to provide
|
A model of \ccc{AlgebraicKernel_d_2} is supposed to provide
|
||||||
|
|
@ -58,9 +56,38 @@ that constructs a polynomial from a range of coefficients of type
|
||||||
\ccNestedType{Compare_xy_2}{A model of the concept
|
\ccNestedType{Compare_xy_2}{A model of the concept
|
||||||
\ccc{AlgebraicKernel_d_2::CompareXY_2}.}
|
\ccc{AlgebraicKernel_d_2::CompareXY_2}.}
|
||||||
|
|
||||||
|
\ccNestedType{IsCoprime_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::IsCoprime_2}.}
|
||||||
|
\ccGlue
|
||||||
|
\ccNestedType{IsSquareFree_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::IsSquareFree_2}.}
|
||||||
|
|
||||||
|
\ccNestedType{MakeSquareFree_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::MakeSquareFree_2}.}
|
||||||
|
\ccGlue
|
||||||
|
\ccNestedType{MakeCoprime_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::MakeCoprime_2}.}
|
||||||
|
\ccGlue
|
||||||
|
\ccNestedType{SquareFreeFactorization_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::SquareFreeFactorization_2}.}
|
||||||
|
|
||||||
|
\begin{ccAdvanced}
|
||||||
|
|
||||||
|
A bivariate polynomial can be seen an algebraic curve.
|
||||||
|
Additional functors might be provided to implement the analysis of a single
|
||||||
|
curve or a pair of curves using an $y$-per-$x$-view.
|
||||||
|
In case a functor is not provided, it is set to \ccc{CGAL::Null_functor}.
|
||||||
|
|
||||||
|
\ccNestedType{CurveAnalysis_2}{A model of concept
|
||||||
|
\ccc{CurvePairAnalyis_2::CurveAnalysis_2}.}
|
||||||
|
\ccGlue
|
||||||
|
\ccNestedType{CurvePairAnalysis_2}{A model of concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::CurvePairAnalysis_2}.}
|
||||||
|
|
||||||
|
\end{ccAdvanced}
|
||||||
|
|
||||||
\ccHasModels
|
\ccHasModels
|
||||||
|
|
||||||
\ccSeeAlso
|
\ccSeeAlso
|
||||||
|
|
||||||
|
|
||||||
\end{ccRefConcept}
|
\end{ccRefConcept}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_1::AlgebraicReal_1}
|
||||||
|
|
||||||
|
\footnote{
|
||||||
|
Note that this concept only deals with the interface to upper
|
||||||
|
layers. There might be additional requirements for number types to
|
||||||
|
implement a model of this concept.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccDefinition
|
||||||
|
|
||||||
|
Concept to represent the root of a univariate polynomial
|
||||||
|
that are models of \ccc{AlgebraicKernel_d_1::Polynomial_1}.
|
||||||
|
|
||||||
|
\begin{ccAdvanced}
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
\ccTypes
|
||||||
|
|
||||||
|
\ccTypedef{typedef typename AlgebraicReal_1::Boundary Boundary;}{A number type
|
||||||
|
that is able to represent values between two AlgebraicReal\_1}
|
||||||
|
|
||||||
|
\ccCreationVariable{ar}
|
||||||
|
|
||||||
|
\ccAccessFunctions
|
||||||
|
|
||||||
|
AlgebraicReal\_1 is required to have some functionality. The final question
|
||||||
|
where to put such methods is undecided. Possibilities are
|
||||||
|
member functions of AK, or traits like Algebraic\_structure\_traits that
|
||||||
|
either exists in the AK, or outside of it.
|
||||||
|
|
||||||
|
\ccMethod{Boundary between(AlgebraicReal_1 ar2);}{
|
||||||
|
returns a rational between \ccc{ar} and \ccc{ar2}
|
||||||
|
\ccPrecond{ar != ar2}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Boundary lower_bound();}{
|
||||||
|
Gives the lower bound of the number.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Boundary upper_bound();}{
|
||||||
|
Gives the upper bound of the number.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{void refine();}{
|
||||||
|
Refines the representation.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{void refine(int prec);}{
|
||||||
|
Refines the representation to the given precision (binary digits
|
||||||
|
after point). Internally the precision can already be higher.
|
||||||
|
}
|
||||||
|
|
||||||
|
\end{ccAdvanced}
|
||||||
|
|
||||||
|
\ccOperations
|
||||||
|
|
||||||
|
The comparison operator \ccc{==} must be provided.
|
||||||
|
|
||||||
|
\ccFunction{bool operator ==(
|
||||||
|
const AlgebraicKernel_d_1::Algebraic_real_1 & ar1,
|
||||||
|
const AlgebraicKernel_d_1::Algebraic_real_1 & ar2);}{}
|
||||||
|
|
||||||
|
|
||||||
|
\ccHasModels
|
||||||
|
%\ccc{double, NiX::Algebraic_real}
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,190 @@
|
||||||
|
\begin{ccRefConcept}{CurveAnalysis_2::CurveVerticalLine_1}
|
||||||
|
|
||||||
|
\ccDefinition
|
||||||
|
|
||||||
|
The \ccc{CurveVerticalLine_1} concept is meant to provide information
|
||||||
|
about the intersections of a curve with a vertical line at a given
|
||||||
|
finite $x$-coordinate. Note that a curve can have a vertical line component
|
||||||
|
at this coordinate and non-vertical components may intersect
|
||||||
|
the vertical line respectively.
|
||||||
|
With the help of the concept's methods one is able
|
||||||
|
to compute the local topology of the curve at the given vertical line.
|
||||||
|
Note that vertical lines at $x = \pm\infty$ are not allowed, since different
|
||||||
|
events (curve ends going to infinity with different non-horizontal asympotes)
|
||||||
|
would have equal $y$-coordinate ($\pm\infty$), which confuses more than it
|
||||||
|
helps. Note in addition that curve ends approaching the vertical asymptote
|
||||||
|
introduce an event (depending on whether approaching $+\infty$ or $-\infty$ -
|
||||||
|
but the event with coordinates $(x,-\infty)$, resp. $(x,+\infty)$, occur
|
||||||
|
only once, if they occur, and they imply not to be associated with
|
||||||
|
a instance of \ccc{Algebraic_real_2}.
|
||||||
|
|
||||||
|
\ccTypes
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_1}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::AlgebraicReal_1}.}
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::Algebraic_real_2}.}
|
||||||
|
|
||||||
|
\ccCreationVariable{cvl}
|
||||||
|
\ccAccessFunctions
|
||||||
|
|
||||||
|
\ccMethod{Algebraic_real_1 x();}{
|
||||||
|
returns the $x$-coordinate of the vertical line (always a finite value).
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{bool covers_line();}{
|
||||||
|
returns \ccc{true} in case the given curve contains the vertical line as
|
||||||
|
a component
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{unsigned int number_of_events();}{
|
||||||
|
returns number of distinct and finite intersections of a curve with a
|
||||||
|
(intended) vertical line ignoring a real vertical line component
|
||||||
|
of the curve at the given $x$-coordinate.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Algebraic_real_2 get_algebraic_real_2(int j);}{
|
||||||
|
returns an object of type \ccc{Algebraic_real_2} for the $j$-th event
|
||||||
|
\ccPrecond{$0 \leq j < \mbox{num\_events()}$}.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{std::pair< unsigned int, unsigned int >
|
||||||
|
get_number_of_incident_branches(int j);}{
|
||||||
|
returns the number of branches of the curve connected to $j$-th event
|
||||||
|
immediately to the left,
|
||||||
|
to the right, respectively, as a pair of \ccc{unsigned int} ignoring
|
||||||
|
vertical curve components at the given $x$-coordinate.
|
||||||
|
\ccPrecond{$0 \leq j < \mbox{num\_events()}$}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{std::pair< unsigned int, unsigned int >
|
||||||
|
get_number_of_branches_approaching_minus_infinity();}{
|
||||||
|
returns the number of vertical asymptotes at $x$
|
||||||
|
of the curve approaching $y=-\infty$
|
||||||
|
from left and right. A vertical line being component of the curve is ignored.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{std::pair< unsigned int, unsigned int >
|
||||||
|
get_number_of_branches_approaching_plus_infinity();}{
|
||||||
|
returns the number of vertical asymptotes at $x$
|
||||||
|
of the curve approaching $y=+\infty$
|
||||||
|
from left and right. A vertical line being component of the curve is ignored.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{bool is_event();}{
|
||||||
|
returns \ccc{true} if curve has vertical line component or
|
||||||
|
curve $f$ has intersection with $f_y$ at $x$
|
||||||
|
}
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_2::CurveAnalysis_2}
|
||||||
|
\footnote{There is no need
|
||||||
|
for curves to be algebraic, hence the generic name. Only the number
|
||||||
|
of events must be finite.}
|
||||||
|
|
||||||
|
\ccDefinition
|
||||||
|
|
||||||
|
The \ccc{AlgebraicKernel_d_2::CurveAnalysis_2}
|
||||||
|
concept is meant to provide tools to analyse a single
|
||||||
|
curve. An analysis is meant to describe the curve's interesting points and how
|
||||||
|
they are connected. The analysis searches for {\it events}. Events only
|
||||||
|
occur at a finite number of $x$-coordinates. Each such coordinate defines
|
||||||
|
a \ccc{CurveVerticalLine_1} of an event. These coordinates also define open
|
||||||
|
{\it intervals} on the $x$-axis. Different
|
||||||
|
\ccc{CurveVerticalLine_1} at values within one
|
||||||
|
such interval only differ in the values of the \ccc{Algebraic_real_2} entries.
|
||||||
|
Topological information are equal for all $x$-coordinate inside such an
|
||||||
|
open interval.
|
||||||
|
|
||||||
|
\ccRefines{
|
||||||
|
\ccc{DefaultConstructible, CopyConstructible, Assignable}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccTypes
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_1}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::AlgebraicReal_1}.}
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::Algebraic_real_2}.}
|
||||||
|
|
||||||
|
\ccNestedType{Polynomial_2}{A model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::Polynomial_2}.}
|
||||||
|
|
||||||
|
\ccNestedType{Curve_vertical_line_1}{A model of the concept
|
||||||
|
\ccc{CurveAnalysis_2::CurveVerticalLine_1}.}
|
||||||
|
|
||||||
|
\ccCreation
|
||||||
|
\ccCreationVariable{ca}
|
||||||
|
|
||||||
|
\ccConstructor{CurveAnalysis_2(Polynomial_2 p);}
|
||||||
|
{constructs an analysis for the curve defined by p. The polynomial must
|
||||||
|
be squarefree.}
|
||||||
|
|
||||||
|
\begin{ccAdvanced}
|
||||||
|
\ccConstructor{template < class InputIterator >
|
||||||
|
CurveAnalysis_2(Polynomial_2 p, InputIterator begin, InputIterator end);}{
|
||||||
|
constructs an analysis for the curve defined by p. The polynomial must
|
||||||
|
be squarefree. The iterator range [begin,end) contains factors of
|
||||||
|
$\mbox{resultant}(p,p_y,y)$
|
||||||
|
i.e., their roots define $x$-coordinates of events,
|
||||||
|
which allows to simplify the real root isolation within this layer.
|
||||||
|
The \ccc{value_type} of InputIterator is \ccc{Polynomial_1}.
|
||||||
|
This constructor has been introduced to enable an upper layer (CK) to
|
||||||
|
propagate additional knowledge on the problem.
|
||||||
|
}
|
||||||
|
\end{ccAdvanced}
|
||||||
|
|
||||||
|
\ccAccessFunctions
|
||||||
|
|
||||||
|
\ccMethod{Polynomial_2 get_polynomial_2();}{
|
||||||
|
returns the defining polynomial of the anyalsis
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{unsigned int number_of_vertical_lines_with_event();}{
|
||||||
|
returns number of vertical lines that encode an event
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_vertical_line_1 vertical_line_at_event(int i);}{
|
||||||
|
returns an instance of \ccc{CurveVerticalLine_1} at the $i$-th event
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_vertical_line_1 vertical_line_of_interval(int i);}{
|
||||||
|
returns an instance of \ccc{CurveVerticalLine_1} of the $i$-th interval
|
||||||
|
between $x$-events.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_vertical_line_1 vertical_line_for_x(Algebraic_real_1 x,
|
||||||
|
CGAL::Sign perturb = CGAL::ZERO);}{
|
||||||
|
returns vertical\_line\_at\_event(i), if $x$ hits $i$-th event, otherwise
|
||||||
|
returns vertical\_line\_of\_interval(i), where $i$ is the id of the interval
|
||||||
|
$x$ lies in. If $pertub$ is CGAL::NEGATIVE (CGAL::POSITIVE) and $x$ states
|
||||||
|
an event, then vertical\_line\_of\_interval(i)
|
||||||
|
(vertical\_line\_of\_interval(i+1)) is returned.
|
||||||
|
\ccPrecond{$x$ is finite}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_vertical_line_1 vertical_line_at_exact_x(Algebraic_real_1 x);}{
|
||||||
|
returns an instance of \ccc{CurveVerticalLine_1} at the given $x$.
|
||||||
|
\ccPrecond{$x$ is finite}
|
||||||
|
}
|
||||||
|
|
||||||
|
Note that the access methods to vertical lines are not redundant! The ones
|
||||||
|
using an id-value are efficient for speed-ups (caching, avoids to search for
|
||||||
|
some $x$, or the unique representative vertical line for an interval).
|
||||||
|
The others enable a user to compute vertical lines for given $x$,
|
||||||
|
i.e., also to access $y$-coordinates at given $x$.
|
||||||
|
|
||||||
|
%\begin{ccAdvanced}
|
||||||
|
%
|
||||||
|
%\ccMethod{int find(Algebraic_real_2 s);}{
|
||||||
|
% returns the index of the event at the vertical line defined by
|
||||||
|
% $s$'s $x$-coordinate, or -1 if $s$ is does not lie on the curve.
|
||||||
|
%}
|
||||||
|
%
|
||||||
|
%\end{ccAdvanced}
|
||||||
|
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,222 @@
|
||||||
|
\begin{ccRefConcept}{CurvePairAnalysis_2::CurvePairVerticalLine_1}
|
||||||
|
|
||||||
|
\ccDefinition
|
||||||
|
|
||||||
|
The \ccc{CurvePairVerticalLine_1} concept is meant to provide information
|
||||||
|
about the intersections of a pair of curves with a (intended) vertical line
|
||||||
|
(ignoring vertical lines of the curves themselves). Each intersection of a
|
||||||
|
curve with the vertical line defined by some given $x$ induces an event.
|
||||||
|
An event can be asked for its coordinates (\ccc{Algebraic_real_2})
|
||||||
|
and the involved curve(s).
|
||||||
|
Note that the involvment also holds for curve ends approaching the
|
||||||
|
vertical asymptote. Again \ccc{CurvePairVerticalLine_1} at $x = \pm\infty$ are
|
||||||
|
not allowed.
|
||||||
|
|
||||||
|
\ccTypes
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_1}{Model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::AlgebraicReal_1}.}
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_2}{Model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::AlgebraicReal_2}.}
|
||||||
|
|
||||||
|
|
||||||
|
\ccCreationVariable{cpvl}
|
||||||
|
\ccAccessFunctions
|
||||||
|
|
||||||
|
\ccMethod{Algebraic_real_1 x();}{
|
||||||
|
returns the $x$-coordinate of the vertical line (always a finite value).
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{unsigned int number_of_events();}{
|
||||||
|
returns number of distinct and finite intersections of a pair of
|
||||||
|
curves with a
|
||||||
|
(intended) vertical line ignoring a real vertical line component
|
||||||
|
of the curves at the given $x$-coordinate.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{unsigned int get_event_of_curve(int k, bool c);}{
|
||||||
|
returns the $y$-position of the $k$-th event of the $c$-th
|
||||||
|
(0 or 1) curve in the sequence of events. Note that each event
|
||||||
|
is formed by the first, the second, or both curves.
|
||||||
|
\ccPrecond{$0 \leq k < \mbox{number of arcs defined for the curve at x()}$}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{unsigned int get_multiplicity_of_intersection(int j);}{
|
||||||
|
returns the multiplicity of intersection defined at event with position $j$.
|
||||||
|
May return $0$ in case multiplicity is unknown.
|
||||||
|
\ccPrecond{There is an intersection of both curves at $j$-th event.}
|
||||||
|
\ccPrecond{$0 \leq j < \mbox{num\_events()}$}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{std::pair< int, int > get_curves_at_event(int j);}{
|
||||||
|
returns a pair of int indicating whether event $j$ is formed by
|
||||||
|
which arc numbers of the first and the second curve, or $-1$, if the
|
||||||
|
corresponding curve is not involved.
|
||||||
|
\ccPrecond{$0 \leq j < \mbox{num\_events()}$}
|
||||||
|
}
|
||||||
|
|
||||||
|
Note that this interface mainly rewrites $\{f,g,x\}^n$ in a different way -
|
||||||
|
using ints. Actually the CPVL has to compute this sequence, but for
|
||||||
|
the interface it is nicer to have it already here to avoid conversion objects
|
||||||
|
(introducing additional constructor calls, cache-misses, lookup and so on) in
|
||||||
|
the next layer on top (CK). Obviously, the ints can be computed in a generic
|
||||||
|
way from a sequence, so that it makes sense to offer a default implementation
|
||||||
|
providing such conversion. There is no need to document this fact on the
|
||||||
|
conceptual view.
|
||||||
|
|
||||||
|
\ccMethod{bool is_event();}{
|
||||||
|
returns \ccc{true} if a curve has an event or in case there is an
|
||||||
|
intersection of both curves.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{bool is_intersection();}{
|
||||||
|
returns \ccc{true} if there is an intersection of both curves.
|
||||||
|
}
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_2::CurvePairAnalysis_2}
|
||||||
|
|
||||||
|
\ccDefinition
|
||||||
|
|
||||||
|
The \ccc{CurvePairAnalysis_2} concept is meant to provide tools to analyse
|
||||||
|
a pair of curves. An analysis is meant to describe the curve pair's
|
||||||
|
interesting points and how they are connected.
|
||||||
|
The analysis searches for {\it events}. Events only
|
||||||
|
occur at a finite number of $x$-coordinate. Each such coordinate is
|
||||||
|
covered by a \ccc{CurvePairVerticalLine_1},
|
||||||
|
originated by the events of a single curve
|
||||||
|
and also the intersections of two curves.
|
||||||
|
These coordinates also define open {\it intervals}
|
||||||
|
on the $x$-axis. \ccc{CurvePairVerticalLine_1}
|
||||||
|
at values in between one such interval
|
||||||
|
differ only in the values of the \ccc{Algebraic_real_2} entries. Topological
|
||||||
|
information are equal.
|
||||||
|
|
||||||
|
\ccRefines{
|
||||||
|
\ccc{DefaultConstructible, CopyConstructible, Assignable}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccTypes
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_1}{Model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_1::AlgebraicReal_1}.}
|
||||||
|
|
||||||
|
\ccNestedType{Algebraic_real_2}{Model of the concept
|
||||||
|
\ccc{AlgebraicKernel_d_2::AlgebraicReal_2}.}
|
||||||
|
|
||||||
|
\ccNestedType{Curve_pair_vertical_line_1}{Model of the concept
|
||||||
|
\ccc{CurvePairAnalysis_2::CurvePairVerticalLine_1}.}
|
||||||
|
|
||||||
|
\ccNestedType{Curve_analysis_2}{Model of the concept
|
||||||
|
\ccc{CurvePairAnalysis::CurveAnalysis_2}.}
|
||||||
|
|
||||||
|
\ccCreation
|
||||||
|
\ccCreationVariable{cp}
|
||||||
|
|
||||||
|
\ccConstructor{CurvePairAnalysis_2(Curve_analysis_2 ca1, Curve_analysis_2 ca2);}
|
||||||
|
{constructs an analysis for the curve-pair defined by analyses given by
|
||||||
|
ca1 and ca2. The polynomials defining the analyses must be squarefree and
|
||||||
|
coprime.
|
||||||
|
}
|
||||||
|
|
||||||
|
\begin{ccAdvanced}
|
||||||
|
|
||||||
|
\ccConstructor{template < class InputIterator >
|
||||||
|
CurvePairAnalysis_2(Curve_analysis_2 ca1, Curve_analysis_2 ca2,
|
||||||
|
InputIterator begin, InputIterator end);}{
|
||||||
|
constructs an analysis for the pair of curves defined by $ca1$ and $ca2$.
|
||||||
|
The polynomials definining the analyses must be squarefree and coprime.
|
||||||
|
The iterator range [begin,end) contains factors of $\mbox{resultant}(p,q,y)$,
|
||||||
|
i.e., define $x$-coordinates,
|
||||||
|
which allows to simplify the real root isolation within this layer.
|
||||||
|
The \ccc{value_type} of InputIterator is \ccc{Polynomial_1}.
|
||||||
|
This constructor has been introduced to enable an upper layer (CK) to use
|
||||||
|
additional knowledge on the problem.
|
||||||
|
}
|
||||||
|
|
||||||
|
\end{ccAdvanced}
|
||||||
|
|
||||||
|
\ccAccessFunctions
|
||||||
|
|
||||||
|
\ccMethod{Curve_analysis_2 get_curve_analysis(bool c);}{
|
||||||
|
returns curve analyis for $c$-''th'' curve (0 or 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{unsigned int number_of_vertical_lines_with_event();}{
|
||||||
|
returns number of vertical lines that encode an event
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
\ccMethod{int event_of_curve_analysis(unsigned int i, bool c);}{
|
||||||
|
Given the $i$-th event of the curve pair
|
||||||
|
this method returns the id of the event of the corresponding curve
|
||||||
|
analysis $c$ (0 or 1), or $-1$, if the curve has no event at this coordinate.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_pair_vertical_line vertical_line_at_event(int i);}{
|
||||||
|
returns an instance of \ccc{CurvePairVerticalLine_1} at the $i$-th event
|
||||||
|
\ccPrecond{$0 \leq i < \mbox{num\_vertical\_lines\_with\_event()}$}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_pair_vertical_line vertical_line_of_interval(int i);}{
|
||||||
|
returns an instance of \ccc{CurvePairVerticalLine_1} of the $i$-th interval
|
||||||
|
between $x$-events.
|
||||||
|
\ccPrecond{$0 \leq i leq \mbox{num\_vertical\_lines\_with\_event()}$}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_pair_vertical_line vertical_line_for_x(Algebraic_real_1 x,
|
||||||
|
CGAL::Sign perturb = CGAL::ZERO);}{
|
||||||
|
returns vertical\_line\_at\_event(i), if $x$ hits $i$-th event, otherwise
|
||||||
|
returns vertical\_line\_of\_interval(i), where $i$ is the id of the interval
|
||||||
|
$x$ lies in.
|
||||||
|
If $pertub$ is CGAL::NEGATIVE (CGAL::POSITIVE) and $x$ states
|
||||||
|
an event, then vertical\_line\_of\_interval(i)
|
||||||
|
(vertical\_line\_of\_interval(i+1)) is returned.
|
||||||
|
\ccPrecond{$x$ is finite}
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Curve_pair_vertical_line vertical_line_at_exact_x(Algebraic_real_1 x);}{
|
||||||
|
returns an instance of \ccc{CurvePairVerticalLine_1} at the given $x$
|
||||||
|
\ccPrecond{$x$ is finite}
|
||||||
|
}
|
||||||
|
|
||||||
|
Note that the access methods to vertical lines are not redundant! The ones
|
||||||
|
using an id-value are efficient for speed-ups (caching, avoids to search some
|
||||||
|
$x$, or the unique representative vertical line for an interval). The others
|
||||||
|
enable a user to compute vertical lines for given $x$.
|
||||||
|
|
||||||
|
\begin{ccAdvanced}
|
||||||
|
|
||||||
|
\ccMethod{Algebraic_real_2_const_iterator solve_begin();}{
|
||||||
|
returns iterator running over all finite intersection of the two curves.
|
||||||
|
}
|
||||||
|
|
||||||
|
\ccMethod{Algebraic_real_2_const_iterator solve_end();}{
|
||||||
|
returns past-end-value for all finite intersections of the two curves.
|
||||||
|
}
|
||||||
|
|
||||||
|
%\ccMethod{int find(Algebraic_real_2 s);}{
|
||||||
|
% returns the index of the event at the vertical line defined by
|
||||||
|
% $s$'s $x$-coordinate, or -1 if $s$ is does not lie on any curve.
|
||||||
|
%}
|
||||||
|
|
||||||
|
\end{ccAdvanced}
|
||||||
|
|
||||||
|
|
||||||
|
%Additionally note that we talk about 4 sequences of $x$-critical lines here.
|
||||||
|
%
|
||||||
|
%\begin{itemize}
|
||||||
|
%\item The sequence of CurveVerticalLine\_1 of $p$ where each CVL has been
|
||||||
|
%converted and merged with $q$ to a CVPL.
|
||||||
|
%\item The sequence of CurveVerticalLine\_1 of $q$ where each CVL has been
|
||||||
|
%converted and merged with $p$ to a CPVL.
|
||||||
|
%\item The sequence of CurvePairVerticalLine\_1 of the intersections of
|
||||||
|
%$p$ and $q$
|
||||||
|
%\item The merged sequence of CurvePairVerticalLine_1 of the former three
|
||||||
|
%sequences. The method event\_id\_of\_x helps to find indeces in the first
|
||||||
|
%three sequences starting from an index in this sequence!
|
||||||
|
%\end{itemize}
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_1::IsCoprime_1}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{
|
||||||
|
bool
|
||||||
|
operator()(const AlgebraicKernel_d_1::Polynomial_1 & p);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_2::IsCoprime_2}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{
|
||||||
|
bool
|
||||||
|
operator()(const AlgebraicKernel_d_2::Polynomial_2 & p);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_1::IsSquareFree_1}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{
|
||||||
|
bool
|
||||||
|
operator()(const AlgebraicKernel_d_1::Polynomial_1 & p);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_2::IsSquareFree_2}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{
|
||||||
|
bool
|
||||||
|
operator()(const AlgebraicKernel_d_2::Polynomial_2 & p);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_1::MakeCoprime_1}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{template < class OutputIterator >
|
||||||
|
void
|
||||||
|
operator()(const AlgebraicKernel_d_1::Polynomial_1 & p1,
|
||||||
|
const AlgebraicKernel_d_1::Polynomial_1 & p2,
|
||||||
|
AlgebraicKernel_d_1::Polynomial_1 & common,
|
||||||
|
OutputIterator oi1
|
||||||
|
OutputIterator oi2);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_2::MakeCoprime_2}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{template < class OutputIterator >
|
||||||
|
void
|
||||||
|
operator()(const AlgebraicKernel_d_2::Polynomial_2 & p1,
|
||||||
|
const AlgebraicKernel_d_2::Polynomial_2 & p2,
|
||||||
|
AlgebraicKernel_d_2::Polynomial_2 & common,
|
||||||
|
OutputIterator oi1
|
||||||
|
OutputIterator oi2);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_1::MakeSquareFree_1}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{template < class OutputIterator >
|
||||||
|
void
|
||||||
|
operator()(const AlgebraicKernel_d_1::Polynomial_1 & p,
|
||||||
|
OutputIterator oi);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_2::MakeSquareFree_2}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{template < class OutputIterator >
|
||||||
|
void
|
||||||
|
operator()(const AlgebraicKernel_d_2::Polynomial_2 & p,
|
||||||
|
OutputIterator oi);}
|
||||||
|
{}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_1::SquareFreeFactorization_1}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{template < class OutputIterator1, class OutputIterator2 >
|
||||||
|
void
|
||||||
|
operator()(const AlgebraicKernel_d_1::Polynomial_1 & p1,
|
||||||
|
OutputIterator oi1
|
||||||
|
OutputIterator oi2);}
|
||||||
|
{oi1 returns factors, oi2 returns multiplicities}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
\begin{ccRefConcept}{AlgebraicKernel_d_2::SquareFreeFactorization_2}
|
||||||
|
|
||||||
|
\ccCreationVariable{fo}
|
||||||
|
|
||||||
|
A model \ccVar\ of this type must provide:
|
||||||
|
|
||||||
|
\ccMethod{template < class OutputIterator1, class OutputIterator2 >
|
||||||
|
void
|
||||||
|
operator()(const AlgebraicKernel_d_2::Polynomial_2 & p1,
|
||||||
|
OutputIterator oi1
|
||||||
|
OutputIterator oi2);}
|
||||||
|
{oi1 returns factors, oi2 returns multiplicities}
|
||||||
|
|
||||||
|
\ccSeeAlso
|
||||||
|
|
||||||
|
\end{ccRefConcept}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
|
||||||
|
- IsCoprime, IsSquareFree, MakeCoprime, MakeSquareFree,
|
||||||
|
SquareFreeFactorization - documentation needed as discussed in Inria
|
||||||
|
|
||||||
|
- Solve_2 - similar to Solve_1
|
||||||
|
|
||||||
|
- Polynomial - there are things to coordinate with PolynomialTraits
|
||||||
|
and/or PolynomialToolBox, what about Construct_polynomial?
|
||||||
|
What about Derivative?
|
||||||
|
|
||||||
|
- Is Derivative and XCriticalPoints/YCriticalPoints redundant?
|
||||||
|
|
||||||
|
|
||||||
|
- AlgebraicReal_1 - what about the functions upper_bound, lower_bound
|
||||||
|
etc. See .tex file!
|
||||||
|
|
||||||
|
- AlgebraicReal_2 - Do we provide .x() and .y() method??
|
||||||
|
|
||||||
|
- Names of CurveAnalysis_2, CurveVerticalLine_1 and
|
||||||
|
CurvePairAnalysis_2, CurvePairVerticalLine_1?
|
||||||
|
- Improvements of Interface
|
||||||
|
- Improvements on Documentation
|
||||||
|
- Use "int" at all places, or stick to distinction of unsigned int + int?
|
||||||
|
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
- CA_2 and CPA_2 require squarefree and coprime input!
|
||||||
|
- Events at infinity are only important for a single curve. Since
|
||||||
|
inf doesn't play a role in CPA_2 we discuss it as a special case in CA_2.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
\ccRefChapter{Algebraic Kernel}
|
\ccRefChapter{Algebraic Kernel}
|
||||||
|
|
||||||
\input{Algebraic_kernel_d_ref/AlgebraicKernel_d_1}
|
\input{Algebraic_kernel_d_ref/AlgebraicKernel_d_1}
|
||||||
|
\input{Algebraic_kernel_d_ref/AlgebraicReal_1}
|
||||||
\input{Algebraic_kernel_d_ref/SolveC_1}
|
\input{Algebraic_kernel_d_ref/SolveC_1}
|
||||||
\input{Algebraic_kernel_d_ref/SignAt_1}
|
\input{Algebraic_kernel_d_ref/SignAt_1}
|
||||||
\input{Algebraic_kernel_d_ref/DerivativeC_1}
|
\input{Algebraic_kernel_d_ref/DerivativeC_1}
|
||||||
\input{Algebraic_kernel_d_ref/CompareC_1}
|
\input{Algebraic_kernel_d_ref/CompareC_1}
|
||||||
|
\input{Algebraic_kernel_d_ref/IsSquareFree_1}
|
||||||
|
\input{Algebraic_kernel_d_ref/IsCoprime_1}
|
||||||
|
\input{Algebraic_kernel_d_ref/MakeSquareFree_1}
|
||||||
|
\input{Algebraic_kernel_d_ref/MakeCoprime_1}
|
||||||
|
\input{Algebraic_kernel_d_ref/SquareFreeFactorization_1}
|
||||||
|
|
||||||
\input{Algebraic_kernel_d_ref/AlgebraicKernel_d_2}
|
\input{Algebraic_kernel_d_ref/AlgebraicKernel_d_2}
|
||||||
\input{Algebraic_kernel_d_ref/AlgebraicReal_2}
|
\input{Algebraic_kernel_d_ref/AlgebraicReal_2}
|
||||||
|
|
@ -13,4 +19,10 @@
|
||||||
\input{Algebraic_kernel_d_ref/SolveC_2}
|
\input{Algebraic_kernel_d_ref/SolveC_2}
|
||||||
\input{Algebraic_kernel_d_ref/SignAt_2}
|
\input{Algebraic_kernel_d_ref/SignAt_2}
|
||||||
\input{Algebraic_kernel_d_ref/DerivativeC_2}
|
\input{Algebraic_kernel_d_ref/DerivativeC_2}
|
||||||
|
\input{Algebraic_kernel_d_ref/IsSquareFree_2}
|
||||||
|
\input{Algebraic_kernel_d_ref/IsCoprime_2}
|
||||||
|
\input{Algebraic_kernel_d_ref/MakeSquareFree_2}
|
||||||
|
\input{Algebraic_kernel_d_ref/MakeCoprime_2}
|
||||||
|
\input{Algebraic_kernel_d_ref/SquareFreeFactorization_2}
|
||||||
|
\input{Algebraic_kernel_d_ref/CurveAnalysis_2}
|
||||||
|
\input{Algebraic_kernel_d_ref/CurvePairAnalysis_2}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue