From 78f0a338472a8ee7e8f68e9bb80838cfe73bf73b Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 24 Oct 2007 08:27:44 +0000 Subject: [PATCH] applied Ron's suggestions, in particular VLine-> StatusLine get_ -> "" --- .../CurveAnalysis_2.tex | 103 ++++++++------ .../CurvePairAnalysis_2.tex | 127 ++++++++++-------- 2 files changed, 127 insertions(+), 103 deletions(-) diff --git a/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurveAnalysis_2.tex b/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurveAnalysis_2.tex index 1ad663c5211..46ea0b37b8c 100644 --- a/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurveAnalysis_2.tex +++ b/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurveAnalysis_2.tex @@ -1,25 +1,34 @@ -\begin{ccRefConcept}{CurveAnalysis_2::CurveVerticalLine_1} +\begin{ccRefConcept}{CurveAnalysis_2::StatusLine_1} \ccDefinition -The \ccc{CurveVerticalLine_1} concept is meant to provide information +The \ccc{StatusLine_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. +the status 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 asymptotes) -would have equal $y$-coordinate ($\pm\infty$), which confuses more than it -helps. Note in addition that curve ends approaching the vertical asymptote +to compute the local topology of the curve +at the given vertical line $x = x_0$ for some finite $x_0$. +A status line an $x_0$ smaller than any $x$-coordinate of a curve's +status lines captures the topology of the curve when approaching $x = -\infty$. +An analogue arguments holds for $x_0$ larger than any $x$-coordinate +of a curve's status lines and $x = +\infty$. +%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 asymptotes) +%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}. +an instance of \ccc{Algebraic_real_2}. \ccTypes +\ccNestedType{size_type}{A instance of a size type, e.g., \ccc{int}} + \ccNestedType{Algebraic_real_1}{A model of the concept \ccc{AlgebraicKernel_d_1::AlgebraicReal_1}.} @@ -38,48 +47,52 @@ a instance of \ccc{Algebraic_real_2}. a component } -\ccMethod{unsigned int number_of_events();}{ +\ccMethod{size_type 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. + the vertical line $x = x_0$ ignoring a real vertical line component + of the curve at $x_0$. } -\ccMethod{Algebraic_real_2 get_algebraic_real_2(int j);}{ +\ccMethod{Algebraic_real_2 algebraic_real_2(size_type 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);}{ +\ccMethod{std::pair< size_type, size_type > + number_of_incident_branches(size_type 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 + to the right, respectively, as a pair of \ccc{size_type} 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();}{ +\ccMethod{std::pair< size_type, size_type > + 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();}{ +\ccMethod{std::pair< size_type, size_type > + 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 has_f_fy_intersection();}{ + returns \ccc{true} if the curve $f$ has an intersection with $f_y$ at $x$ +} + \ccMethod{bool is_event();}{ - returns \ccc{true} if curve has vertical line component or - curve $f$ has intersection with $f_y$ at $x$ + returns \ccc{true} if one of \ccc{has_f_fy_intersection()} or + \ccc{covers_line()} evaluates to \ccc{true}. } \end{ccRefConcept} -\begin{ccRefConcept}{AlgebraicKernel_d_2::CurveAnalysis_2} +\begin{ccRefConcept}{AlgebraicKernelWithAnalysis_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.} @@ -91,9 +104,9 @@ 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 +a \ccc{StatusLine_1} of an event. These coordinates also define open {\it intervals} on the $x$-axis. Different -\ccc{CurveVerticalLine_1} at values within one +\ccc{StatusLine_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. @@ -104,6 +117,8 @@ open interval. \ccTypes +\ccNestedType{size_type}{A instance of a size type, e.g., \ccc{int}} + \ccNestedType{Algebraic_real_1}{A model of the concept \ccc{AlgebraicKernel_d_1::AlgebraicReal_1}.} @@ -114,7 +129,7 @@ open interval. \ccc{AlgebraicKernel_d_2::Polynomial_2}.} \ccNestedType{Curve_vertical_line_1}{A model of the concept -\ccc{CurveAnalysis_2::CurveVerticalLine_1}.} +\ccc{CurveAnalysis_2::StatusLine_1}.} \ccCreation \ccCreationVariable{fo} @@ -139,48 +154,48 @@ open interval. \ccAccessFunctions -\ccMethod{Polynomial_2 get_polynomial_2();}{ +\ccMethod{Polynomial_2 polynomial_2();}{ returns the defining polynomial of the analysis } -\ccMethod{unsigned int number_of_vertical_lines_with_event();}{ +\ccMethod{size_type number_of_status_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{Status_line_1 status_line_at_event(size_type i);}{ + returns an instance of \ccc{StatusLine_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 +\ccMethod{Status_line_1 status_line_of_interval(size_type i);}{ + returns an instance of \ccc{StatusLine_1} of the $i$-th interval between $x$-events. } -\ccMethod{Curve_vertical_line_1 vertical_line_for_x(Algebraic_real_1 x, +\ccMethod{Status_line_1 status_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 + returns status\_line\_at\_event(i), if $x$ hits $i$-th event, otherwise + returns status\_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. + an event, then status\_line\_of\_interval(i) + (status\_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$. +\ccMethod{Status_line_1 status_line_at_exact_x(Algebraic_real_1 x);}{ + returns an instance of \ccc{StatusLine_1} at the given $x$. \ccPrecond{$x$ is finite} } -Note that the access methods to vertical lines are not redundant! The ones +Note that the access methods to status 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$, +some $x$, or the unique representative status line for an interval). +The others enable a user to compute status 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 +%\ccMethod{size_type find(Algebraic_real_2 s);}{ +% returns the index of the event at the status line defined by % $s$'s $x$-coordinate, or -1 if $s$ is does not lie on the curve. %} % diff --git a/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurvePairAnalysis_2.tex b/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurvePairAnalysis_2.tex index 80642a9e868..5e6a5cf1da9 100644 --- a/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurvePairAnalysis_2.tex +++ b/Algebraic_kernel_d/doc_tex/Algebraic_kernel_d_ref/CurvePairAnalysis_2.tex @@ -1,19 +1,23 @@ -\begin{ccRefConcept}{CurvePairAnalysis_2::CurvePairVerticalLine_1} +\begin{ccRefConcept}{CurvePairAnalysis_2::StatusLine_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}) +The \ccc{StatusLine_1} concept is meant to provide information +about the intersections of a pair of curves with a vertical line $x = x_0$ +for some finite $x_0$, +ignoring covered vertical lines of the curves themselves. +Each intersection of a +curve with the status line defined by some given $x$ induces an event. +An event can be queried for its coordinates (\ccc{Algebraic_real_2}) and the involved curve(s). Note that the involvement also holds for curve ends approaching the -vertical asymptote. Again \ccc{CurvePairVerticalLine_1} at $x = \pm\infty$ are +vertical asymptote. Again \ccc{StatusLine_1} at $x = \pm\infty$ are not allowed. \ccTypes +\ccNestedType{size_type}{A instance of a size type, e.g., \ccc{int}} + \ccNestedType{Algebraic_real_1}{Model of the concept \ccc{AlgebraicKernel_d_1::AlgebraicReal_1}.} @@ -25,42 +29,44 @@ not allowed. \ccAccessFunctions \ccMethod{Algebraic_real_1 x();}{ - returns the $x$-coordinate of the vertical line (always a finite value). + returns the $x$-coordinate of the status line (always a finite value). } -\ccMethod{unsigned int number_of_events();}{ +\ccMethod{size_type 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 + curves with a status 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);}{ +\ccMethod{size_type event_of_curve(size_type 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. + is formed by the first, the second, or both curves. \ccPrecond{$0 \leq k < \mbox{number of arcs defined for the curve at x()}$} + The precondition can be checked by queried first the corresponding status + line of the curve's analysis. } -\ccMethod{unsigned int get_multiplicity_of_intersection(int j);}{ +\ccMethod{Multiplicity multiplicity_of_intersection(size_type 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 +\ccMethod{std::pair< size_type, size_type > curves_at_event(size_type j);}{ + returns a pair of \ccc{size_type} 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 +using \ccc{size_type}. 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 +the next layer on top (CK). Obviously, the \ccc{size_type}s +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. @@ -76,7 +82,7 @@ conceptual view. \end{ccRefConcept} -\begin{ccRefConcept}{AlgebraicKernel_d_2::CurvePairAnalysis_2} +\begin{ccRefConcept}{AlgebraicKernelWithAnalysis_d_2::CurvePairAnalysis_2} \ccDefinition @@ -85,11 +91,11 @@ 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}, +covered by a \ccc{StatusLine_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} +on the $x$-axis. \ccc{StatusLine_1} at values in between one such interval differ only in the values of the \ccc{Algebraic_real_2} entries. Topological information are equal. @@ -100,14 +106,16 @@ information are equal. \ccTypes +\ccNestedType{size_type}{A instance of a size type, e.g., \ccc{int}} + \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{Status_line_1}{Model of the concept +\ccc{CurvePairAnalysis_2::StatusLine_1}.} \ccNestedType{Curve_analysis_2}{Model of the concept \ccc{CurvePairAnalysis::CurveAnalysis_2}.} @@ -140,81 +148,82 @@ coprime. \ccAccessFunctions -\ccMethod{Curve_analysis_2 get_curve_analysis(bool c);}{ +\ccMethod{Curve_analysis_2 curve_analysis(bool c);}{ returns curve analysis 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{size_type number_of_status_lines_with_event();}{ + returns number of status lines that encode an event } -\ccMethod{int event_of_curve_analysis(unsigned int i, bool c);}{ +\ccMethod{size_type event_of_curve_analysis(size_type 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{Status_line status_line_at_event(size_type i);}{ + returns an instance of \ccc{StatusLine_1} at the $i$-th event + \ccPrecond{$0 \leq i < \mbox{num\_status\_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 +\ccMethod{Status_line status_line_of_interval(size_type i);}{ + returns an instance of \ccc{StatusLine_1} of the $i$-th interval between $x$-events. - \ccPrecond{$0 \leq i leq \mbox{num\_vertical\_lines\_with\_event()}$} + \ccPrecond{$0 \leq i leq \mbox{num\_status\_lines\_with\_event()}$} } -\ccMethod{Curve_pair_vertical_line vertical_line_for_x(Algebraic_real_1 x, +\ccMethod{Status_line status_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 + returns status\_line\_at\_event(i), if $x$ hits $i$-th event, otherwise + returns status\_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. + an event, then status\_line\_of\_interval(i) + (status\_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$ +\ccMethod{Status_line status_line_at_exact_x(Algebraic_real_1 x);}{ + returns an instance of \ccc{StatusLine_1} at the given $x$ \ccPrecond{$x$ is finite} } -Note that the access methods to vertical lines are not redundant! The ones +Note that the access methods to status 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$. +$x$, or the unique representative status line for an interval). The others +enable a user to compute status lines for given $x$. -\begin{ccAdvanced} +% +%\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{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 +%\ccMethod{size_type find(Algebraic_real_2 s);}{ +% returns the index of the event at the status line defined by % $s$'s $x$-coordinate, or -1 if $s$ is does not lie on any curve. %} -\end{ccAdvanced} +%\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 +%\item The sequence of StatusLine\_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 +%\item The sequence of StatusLine\_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 +%\item The sequence of StatusLine\_1 of the intersections of %$p$ and $q$ -%\item The merged sequence of CurvePairVerticalLine_1 of the former three +%\item The merged sequence of StatusLine_1 of the former three %sequences. The method event\_id\_of\_x helps to find indexes in the first %three sequences starting from an index in this sequence! %\end{itemize}