diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Quotient.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Quotient.tex deleted file mode 100644 index d436ce4b37c..00000000000 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Quotient.tex +++ /dev/null @@ -1,101 +0,0 @@ - -\begin{ccRefClass} {Quotient} -\label{Quotient} -%\subsection{Quotient} - -\ccDefinition -An object of the class \ccStyle{Quotient} is an element of the -field of quotients of the integral domain type \ccStyle{NT}. -If \ccStyle{NT} behaves like an integer, \ccStyle{Quotient} -behaves like a rational number. -{\leda}'s class \ccStyle{rational} (see Section~\ref{leda-nt}) -has been the basis for \ccStyle{Quotient}. -A \ccStyle{Quotient} \ccStyle{q} is represented as a pair of -\ccStyle{NT}s, representing numerator and denominator. - -\ccc{NT} must be at least model of concept \ccc{IntegralDomainWithoutDivision}.\\ -\ccc{NT} must be a model of concept \ccc{RealEmbeddable}. \\ - - -\ccInclude{CGAL/Quotient.h} - -\ccIsModel - -\ccc{Field}\\ -\\ -\ccc{RealEmbeddable} - -\ccCreation -\ccCreationVariable{q} - -\ccConstructor{Quotient();} - {introduces an uninitialized variable \ccVar.} - -\ccHidden \ccConstructor{Quotient(const Quotient &q);} - {copy constructor.} -\ccGlue -\ccConstructor{template Quotient(const T& t);} -{introduces the quotient \ccStyle{t/1}. NT needs to have a constructor from T.} -\ccGlue -\ccConstructor{template Quotient(const Quotient& t);} -{introduces the quotient \ccStyle{NT(t.numerator())/NT(t.denominator())}. -NT needs to have a constructor from T.} -\ccGlue -\ccConstructor{Quotient(const NT& n, const NT& d)} - {introduces the quotient \ccStyle{n/d}.} - - -\ccOperations - -%\ccSetTwoOfThreeColumns{5cm}{4cm} -%SetThreeColumns{std::ostream& }{}{\hspace*{8cm}} - -There are two access functions, namely to the -numerator and the denominator of a quotient. -Note that these values are not uniquely defined. -It is guaranteed that \ccStyle{q.numerator()} and -\ccStyle{q.denominator()} return values \ccStyle{nt_num} and -\ccStyle{nt_den} such that \ccStyle{q = nt_num/nt_den}, only -if \ccStyle{q.numerator()} and \ccStyle{q.denominator()} are called -consecutively wrt \ccStyle{q}, i.e.~\ccStyle{q} is not involved in -any other operation between these calls. - -\ccMethod{NT numerator() const;} - {returns a numerator of \ccStyle{q}.} -\ccGlue -\ccMethod{NT denominator() const;} - {returns a denominator of \ccStyle{q}.} - -\ccHidden \ccMethod{Quotient& normalize();} -{} - -The stream operations are available as well. -They assume that corresponding stream operators for type \ccc{NT} exist. - -\ccFunction{std::ostream& operator<<(std::ostream& out, const Quotient& q);} - {writes \ccc{q} to ostream \ccc{out} in format ``{\tt n/d}'', where - {\tt n}$==$\ccc{q.numerator()} and {\tt d}$==$\ccc{q.denominator()}.} - -\ccFunction{std::istream& operator>>(std::istream& in, Quotient& q);} - {reads \ccc{q} from istream \ccc{in}. Expected format is - ``{\tt n/d}'', where {\tt n} and {\tt d} are of type \ccc{NT}. - A single {\tt n} which is not followed by a {\tt /}\ is also - accepted and interpreted as {\tt n/1}.} - -The following functions are added to fulfill the \cgal\ requirements -on number types. - -\ccFunction{double to_double(const Quotient& q);} - {returns some double approximation to \ccStyle{q}.} -\ccGlue -\ccFunction{bool is_valid(const Quotient& q);} - {returns true, if numerator and denominator are valid.} -\ccGlue -\ccFunction{bool is_finite(const Quotient& q);} - {returns true, if numerator and denominator are finite.} -\ccGlue -\ccFunction{Quotient sqrt(const Quotient& q);} - {returns the square root of \ccc{q}. This is supported if and only if - \ccc{NT} supports the square root as well.} - -\end{ccRefClass}