From 7420f038eafa72eebe73af6867536d38807d0a0d Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Wed, 19 Jul 2006 09:06:22 +0000 Subject: [PATCH] first layout for Algebraic Concepts --- .gitattributes | 15 ++ .../AlgebraicStructureTraits.tex | 172 ++++++++++++++++++ .../Algebraic_concepts_ref/EuclideanRing.tex | 57 ++++++ .../Euclidean_ring_tag.tex | 17 ++ .../doc_tex/Algebraic_concepts_ref/Field.tex | 30 +++ .../Algebraic_concepts_ref/FieldWithSqrt.tex | 24 +++ .../Algebraic_concepts_ref/Field_tag.tex | 17 ++ .../Field_with_sqrt_tag.tex | 18 ++ .../FromSmallIntConstructible.tex | 23 +++ .../Algebraic_concepts_ref/IntegralDomain.tex | 31 ++++ .../IntegralDomainWithoutDiv.tex | 106 +++++++++++ .../Integral_domain_tag.tex | 16 ++ .../Integral_domain_without_div_tag.tex | 13 ++ .../Algebraic_concepts_ref/UFDomain.tex | 38 ++++ .../Algebraic_concepts_ref/UFDomain_tag.tex | 17 ++ .../doc_tex/Algebraic_concepts_ref/intro.tex | 24 ++- .../doc_tex/Algebraic_concepts_ref/macros.tex | 90 +++++++++ .../doc_tex/Algebraic_concepts_ref/main.tex | 20 +- 18 files changed, 724 insertions(+), 4 deletions(-) create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/AlgebraicStructureTraits.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/EuclideanRing.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Euclidean_ring_tag.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FieldWithSqrt.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_tag.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_with_sqrt_tag.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FromSmallIntConstructible.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomain.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomainWithoutDiv.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_tag.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_without_div_tag.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain_tag.tex create mode 100644 Algebraic_concepts/doc_tex/Algebraic_concepts_ref/macros.tex diff --git a/.gitattributes b/.gitattributes index f0b47c3413a..f90469424d0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,19 @@ * text=auto !eol +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/AlgebraicStructureTraits.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/EuclideanRing.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Euclidean_ring_tag.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FieldWithSqrt.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_tag.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_with_sqrt_tag.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FromSmallIntConstructible.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomain.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomainWithoutDiv.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_tag.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_without_div_tag.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain_tag.tex -text +Algebraic_concepts/doc_tex/Algebraic_concepts_ref/macros.tex -text Alpha_shapes_2/demo/Alpha_shapes_2/data/m30f.jpg -text svneol=unset#image/jpeg Alpha_shapes_2/demo/Alpha_shapes_2/help/index.html svneol=native#text/html Alpha_shapes_2/doc_tex/Alpha_shapes_2/alphashape.eps -text svneol=unset#application/postscript diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/AlgebraicStructureTraits.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/AlgebraicStructureTraits.tex new file mode 100644 index 00000000000..5860983ee36 --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/AlgebraicStructureTraits.tex @@ -0,0 +1,172 @@ +\begin{ccRefConcept}{AlgebraicStructureTraits} + + +\ccDefinition + +A model of \ccc{AlgebraicStructureTraits} refelcts the algebraic structure +of an assosiated type AS. + + +Depending on the concepts that AS fulfills, it contains various functors and +descriptive tags. See the list of members above. +Moreover it gives access to the several possible +algebraic operations within that structure. + + +\ccTypes + +A model of \ccc{AlgebraicStructureTraits} is supposed to provide:\\ + +\ccNestedType{AS} + {The assosiated algebraic structure.} + +\ccNestedType{Algebraic_structure_tag} + { Tag indicating the algebraic structure of the assoziated type. \\ + This is one of: + \begin{tabular}{ll} + - \ccc{Null_type}& AS fullfills no algebraic concept\\ + - \ccc{Integral_domain_without_div_tag}& AS is model of \ccc{IntegralDomainWithoutDiv}\\ + - \ccc{Integral_domain_tag}& AS is model of \ccc{IntegralDomain}\\ + - \ccc{UFDomain_tag}& AS is model of \ccc{UFDomain}\\ + - \ccc{Euclidean_ring_tag}& AS is model of \ccc{EuclideanRing}\\ + - \ccc{Field_tag}& AS is model of \ccc{Field}\\ + - \ccc{Field_with_sqrt_tag}& AS is model of \ccc{FieldWithSqrt}\\ + \end{tabular} + } + +\ccNestedType{Is_exact_tag} + { Tag indicating whether AS is an exact type. \\ + This is either \ccc{CGAL::Tag_true} or \ccc{CGAL::Tag_false}. } + +\ccTypes + +\ccNestedType{Simplify}{ +Required in case AS is at least an \ccc{IntegralDomainWithoutDiv} +,\\this is an \ccAdaptableUnaryFunction +{void} +{AS\&} +{may simplify the representation of the object.} +} + + +\ccNestedType{Unit_part}{ +Required in case AS is at least an \ccc{IntegralDomainWithoutDiv}, +\\this is an \ccAdaptableUnaryFunction +{AS} +{const AS\&} +{ extracts the unit part the unit part of x + +The mathematical definition of unit part is as follows: Two ring elements $a$ +and $b$ are said to be associate if there exists an invertible ring element +(i.e. a unit) $u$ such that $a = ub$. This defines an equivalence relation. +We can distinguish exactly one element of every equivalence class as being +unit normal. Then each element of a ring possesses a factorization into a unit +(called its unit part) and a unit-normal ring element +(called its unit normal associate). + +For the integers, the non-negative numbers are by convention unit normal, +hence the unit-part of a non-zero integer is its sign. For a \ccc{Field}, every +non-zero element is a unit and is its own unit part, its unit normal +associate being one. The unit part of zero is, by convention, one. + +%In a polynomial ring $R[x]$, the unit part of a polynomial is the unit +%part of its leading coefficient, whose definition depends on $R$. +}} + +\ccNestedType{Integral_div}{ +Required in case AS is at least an \ccc{IntegralDomain}, +\\this is an \ccAdaptableBinaryFunction +{AS} +{const AS\&} +{const AS\&} +{returns $z = x/y$ , ,\\this is an integral division. + +Integral division (a.k.a. exact division or division without remainder) maps +ring elements $(x,y)$ to ring element $z$ such that $x = yz$ if such a $z$ +exists (i.e. if $x$ is divisible by $y$). Otherwise the effect of invoking +this operation is undefined. Since the ring represented is an integral domain, +$z$ is uniquely defined if it exists. +} +} + +\ccNestedType{Gcd}{ +Required in case AS is at least an \ccc{UFDomain}, +\\this is an \ccAdaptableBinaryFunction +{AS} +{const AS\&} +{const AS\&} +{returns $z = gcd(x,y)$. + +The greatest common divisor ($gcd$) of ring elements $x$ and $y$ is the unique +ring element $d$ (up to a unit) with the property that any common divisor of +$x$ and $y$ also divides $d$. (In other words: $d$ is the greatest lower bound +of $x$ and $y$ in the partial order of divisibility.) We demand the $gcd$ to be +unit-normal (i.e. have unit part 1). $gcd(0,0)$ is defined as $1$. +} +} + +\ccNestedType{Mod}{ +Required in case AS is at least an \ccc{EuclideanRing}, +\\this is an \ccAdaptableBinaryFunction +{AS} +{const AS\&} +{const AS\&} +{returns remainder of x modulo y.} +} + +\ccNestedType{Div}{ +Required in case AS is at least an \ccc{EuclideanRing}, +\\this is an \ccAdaptableBinaryFunction +{AS} +{const AS\&} +{const AS\&} +{returns quotient from division with remainder. +} +} +\ccNestedType{Div_mod}{ +Required in case AS is at least an \ccc{EuclideanRing}, +\\this is an \ccAdaptableQuadFunction +{void} +{const AS\&} +{const AS\&} +{AS\&} +{AS\&} +{ +divide $a$ by $b$ with quotient $c$ and remainder $d$. +} +} + +\ccNestedType{Sqrt}{ +Required in case AS is at least an \ccc{FieldWithSqrt}, +\\this is an \ccAdaptableUnaryFunction +{AS} +{const AS\&} +{functor to compute the square root, required for FieldWithSqrt. + +{ \tt OLD EXACUS: \\ +A number type NT may provide this functor even if the set of numbers it models + does not contain real square roots in general. The most important example are +number types modeling the integers. For them, Sqrt()(x) has to return the +largest integer not exceeding the square root of x. \\ +COMMENT: I suggest to put this as an extra functor into ComparableTraits, e.g. Sqrt\_approx. +} +} +} + + + + +{\small TODO: ?\\ +\ccNestedType{KthRoot}{ defined in EXACUS, but not needed } +\ccNestedType{Root_of}{ +is this an functor for algebraic structure ? +since it is defined as the kth real root of an polynomial.. } +} + + + + +\ccHasModels + + +\end{ccRefConcept} diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/EuclideanRing.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/EuclideanRing.tex new file mode 100644 index 00000000000..ea6a493cd7a --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/EuclideanRing.tex @@ -0,0 +1,57 @@ +\begin{ccRefConcept}{EuclideanRing} + + +\ccDefinition + +A model of \ccc{EuclideanRing} represents an euclidean ring (or Euclidean domain). +It is an \ccc{UFDomain} that affords a suitable notion of minimality of remainders +such that given $x$ and $y != 0$ we obtain an (almost) unique solution to +$x = qy + r by$ demanding that a solution $(q,r)$ is chosen to minimize $r$. +In particular, $r$ is chosen to be $0$ if possible. + +Moreover, \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >} is a model of +\ccc{AlgebraicStructureTraits} providing:\\ + +- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Algebraic_type} derived from \ccc{UFDomain_tag} \\ +- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Mod} an \ccc{AdaptableBinaryFunction}\\ +- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div} an \ccc{AdaptableBinaryFunction}\\ +- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div_mod}\\ + + + + +\ccHeading{Remarks} + +The most prominent example of a Euclidean ring are the integers. +Whenever both $x$ and $y$ are positive, then it is conventional to choose +the smallest positive remainder $r$. + + +{\em \small +In other cases, there seems to be no universally observed convention on how to choose +the sign. (In particular, the ISO C++ Standard fixes none for the modulo operation +on the builtin integral types.) + +Todo: Decide what to do about the sign ambiguity for the Mod operation of Euclidean rings. +Proposal: choose the unit normal remainder. +} + +%Another important example of a Euclidean ring are univariate polynomials over a field. +%Here the degree of $r$ is to be minimized. There is no remaining ambiguity. + +%Any Euclidean ring is necessarily a \ccc{UFDomain}, and the ability to take remainders allows +%to use the Euclidean Algorithm to compute gcds. + +\ccRefines + \ccc{UFDomain}\\ + +\ccSeeAlso + \ccc{IntegralDomainWithoutDiv} + $ \leftarrow $ \ccc{IntegralDomain} + $ \leftarrow $ \ccc{UFDomain} + $ \leftarrow $ \ccc{EuclideanRing} + +\ccHasModels + + +\end{ccRefConcept} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Euclidean_ring_tag.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Euclidean_ring_tag.tex new file mode 100644 index 00000000000..19675a17501 --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Euclidean_ring_tag.tex @@ -0,0 +1,17 @@ +\begin{ccRefClass}{Euclidean_ring_tag} +\label{Euclidean_ring_tag} + +\ccDefinition +Tag indicating that a type is a model of the +\ccc{EuclideanRing} concept. + +\ccInheritsFrom +\ccc{Euclidea_ring_tag} + +\ccIsModel +\ccc{DefaultConstructible} + +\ccSeeAlso +\ccRefConceptPage{EuclideanRing} \\ +\ccRefConceptPage{AlgebraicStructureTraits}\\ +\end{ccRefClass} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field.tex new file mode 100644 index 00000000000..87328db677a --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field.tex @@ -0,0 +1,30 @@ +\begin{ccRefConcept}{Field} + + +\ccDefinition + +A model of \ccc{Field} is an IntegralDomain in which every non-zero element has a multiplicative inverse. +Thus, one can divide by any non-zero element. Hence division is defined for any divisor != 0. +For a Field, we require this division operation to be available through operators / and /=. + +Moreover, \ccc{CGAL::Algebraic_structure_traits< Field >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ +- \ccc{CGAL::Algebraic_structure_traits< Field >::Algebraic_type} derived from \ccc{Field_tag} \\ + +\ccHeading{Remarks:} +Most ring-theoretic notions like greatest common divisors become trivial for fields. +Hence we see Field as a refinement of IntegralDomain and not as a refinement of one of the more advanced +types of ring. If an algorithm wants to rely on gcd or remainder computation, it is trying to do things +it shouldn't do with a field in the first place. + +\ccRefines + \ccc{IntegralDomain}\\ + +\ccSeeAlso + \ccc{IntegralDomainWithoutDiv} + $ \leftarrow $ \ccc{IntegralDomain} + $ \leftarrow $ \ccc{Field} + +\ccHasModels + + +\end{ccRefConcept} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FieldWithSqrt.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FieldWithSqrt.tex new file mode 100644 index 00000000000..dbebe2be449 --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FieldWithSqrt.tex @@ -0,0 +1,24 @@ +\begin{ccRefConcept}{FieldWithSqrt} + +\ccDefinition + +A model of \ccc{FieldWithSqrt} is a \ccc{Field} that has operations to take square roots. + +Moreover, \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ +- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Algebraic_type} derived from \ccc{Field_with_sqrt_tag} \\ +- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Sqrt} an \ccc{AdaptableUnaryFunction}\\ + +\ccRefines + \ccc{Field}\\ + +\ccSeeAlso + \ccc{IntegralDomainWithoutDiv} + $ \leftarrow $ \ccc{IntegralDomain} + $ \leftarrow $ \ccc{Field} + $ \leftarrow $ \ccc{FieldWithSqrt} + + +\ccHasModels + + +\end{ccRefConcept} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_tag.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_tag.tex new file mode 100644 index 00000000000..30ce151dafe --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_tag.tex @@ -0,0 +1,17 @@ +\begin{ccRefClass}{Field_tag} +\label{Field_tag} + +\ccDefinition +Tag indicating that a type is a model of the \ccc{Field} concept. + +\ccInheritsFrom +\ccc{Integral_domain_tag} + +\ccIsModel +\ccc{DefaultConstructible} + + +\ccSeeAlso +\ccRefConceptPage{Field} \\ +\ccRefConceptPage{AlgebraicStructureTraits}\\ +\end{ccRefClass} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_with_sqrt_tag.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_with_sqrt_tag.tex new file mode 100644 index 00000000000..0b2442cc7cc --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Field_with_sqrt_tag.tex @@ -0,0 +1,18 @@ +\begin{ccRefClass}{Field_with_sqrt_tag} +\label{Field_with_sqrt_tag} + +\ccDefinition +Tag indicating that a type is a model of the \ccc{FieldWithSqrt} concept. + + +\ccInheritsFrom +\ccc{Field_tag} + +\ccIsModel +\ccc{DefaultConstructible} + + +\ccSeeAlso +\ccRefConceptPage{FieldWithSqrt} \\ +\ccRefConceptPage{AlgebraicStructureTraits}\\ +\end{ccRefClass} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FromSmallIntConstructible.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FromSmallIntConstructible.tex new file mode 100644 index 00000000000..9ef968689a6 --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/FromSmallIntConstructible.tex @@ -0,0 +1,23 @@ +\begin{ccRefConcept}{FromSmallIntConstructible} + + +\ccDefinition + +A model of the concept FromSmallIntConstructible is required +to be constructible from int, +for any int in the range from -128 to 127. + +\ccCreation +\ccCreationVariable{type} %% choose variable name + +\ccConstructor{FromSmallIntConstructible(int& i);}{ +conversion constructor from int for -128 <= n <= 127. +} + +\ccHasModels +\ccc{int}\\ +\ccc{long}\\ +\ccc{double}\\ + + +\end{ccRefConcept} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomain.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomain.tex new file mode 100644 index 00000000000..9c9777c11de --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomain.tex @@ -0,0 +1,31 @@ +\begin{ccRefConcept}{IntegralDomain} + + +\ccDefinition + +\ccc{IntegralDomain} refines \ccc{IntegralDomainWithoutDiv} by +providing an integral division.\\ +{\bf Note:} The concept does not require the operator / for this operation. +We intend to reserve the operator syntax for use with a \ccc{Field}. +%Nevertheless, some non-field models of IntegralDomain have one. + + + +Moreover, \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >} is a model of +\ccc{AlgebraicStructureTraits} providing:\\ + +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Algebraic_type} derived from \ccc{Integral_domain_tag} \\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Integral_div} an \ccc{AdaptableBinaryFunction}\\ + +\ccRefines + \ccc{IntegralDomainWithoutDiv}\\ + + +\ccSeeAlso + \ccc{IntegralDomainWithoutDiv} + $ \leftarrow $ \ccc{IntegralDomain} + +\ccHasModels + + +\end{ccRefConcept} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomainWithoutDiv.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomainWithoutDiv.tex new file mode 100644 index 00000000000..d61250cc1d5 --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/IntegralDomainWithoutDiv.tex @@ -0,0 +1,106 @@ +\begin{ccRefConcept}{IntegralDomainWithoutDiv} + + +\ccDefinition + +This is the most basic concept for algebraic structures considered within CGAL. + +A model \ccc{IntegralDomainWithoutDiv} represents an integral domain, +i.e. commutative ring with 0, 1, +, * and unity free of zero divisors.\\ +{\bf Note:} A model is not required to offer the always well defined integral division. + +It refines \ccc{Assignable}, \ccc{CopyConstructible}, \ccc{DefaultConstructible} +and \ccc{FromSmallIntConstructible}. \\ +It refines \ccc{EqualityComparable}, where equality is defined w.r.t. +the ring element being represented. \\ +The operators unary and binary plus +, unary and binary minus -, +multiplication * and their compound forms +=, -=, *= are required and +implement the respective ring operations. + +Moreover, \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDiv >} is a model of +\ccc{AlgebraicStructureTraits} providing:\\ + +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDiv >::Algebraic_type} derived from \ccc{Integral_domain_without_div_tag} \\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDiv >::Simplify} an \ccc{AdaptableUnaryFunction}\\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDiv >::Unit_part} an \ccc{AdaptableUnaryFunction}\\ + + + + +{ \em \small FROM EXACUS: \\ +It is permissible for the constructor +to convert from another built-in type than int, provided ints are +automatically converted to this type. It is not permissible to +rely in a similar fashion on a chain of user-defined conversions. +} + + + +\ccRefines +\ccc{Assignable}\\ +\ccc{CopyConstructible}\\ +\ccc{DefaultConstructible}\\ +\ccc{FromSmallIntConstructible}\\ +\ccc{EqualityComparable}\\ + +\ccOperations + +Ring Operations:\\ +\ccFunction{IntegralDomainWithoutDiv + operator+(const IntegralDomainWithoutDiv &a, + const IntegralDomainWithoutDiv &b);}{} +\ccGlue + +\ccFunction{IntegralDomainWithoutDiv + operator-(const IntegralDomainWithoutDiv &a, + const IntegralDomainWithoutDiv &b);}{} +\ccGlue + +\ccFunction{IntegralDomainWithoutDiv + operator*(const IntegralDomainWithoutDiv &a, + const IntegralDomainWithoutDiv &b);}{} +\ccGlue +\ccFunction{IntegralDomainWithoutDiv + operator+(const IntegralDomainWithoutDiv &a);}{} +\ccGlue +\ccFunction{IntegralDomainWithoutDiv + operator-(const IntegralDomainWithoutDiv &a);}{} +\ccGlue +\ccMethod{IntegralDomainWithoutDiv + operator+=(const IntegralDomainWithoutDiv &a);}{} +\ccGlue +\ccMethod{IntegralDomainWithoutDiv + operator-=(const IntegralDomainWithoutDiv &a);}{} +\ccGlue +\ccMethod{IntegralDomainWithoutDiv + operator*=(const IntegralDomainWithoutDiv &a);}{} + +Equality comparable: + +\ccFunction{bool + operator==(const IntegralDomainWithoutDiv &a, + const IntegralDomainWithoutDiv &b);}{} +\ccGlue +\ccFunction{bool + operator!=(const IntegralDomainWithoutDiv &a, + const IntegralDomainWithoutDiv &b);}{} +\ccGlue + +\ccRefines + \ccc{DefaultConstructible} \\ + \ccc{EqualityComparable}\\ + \ccc{Assignable}\\ + \ccc{FromSmallIntConstructible}\\ + +\ccSeeAlso + \ccc{IntegralDomainWithoutDiv}\\ + \ccc{IntegralDomain}\\ + \ccc{UFDomain}\\ + \ccc{EuclideanRing}\\ + \ccc{Field}\\ + \ccc{FieldWithSqrt}\\ + +\ccHasModels + + +\end{ccRefConcept} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_tag.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_tag.tex new file mode 100644 index 00000000000..057ab3588cb --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_tag.tex @@ -0,0 +1,16 @@ +\begin{ccRefClass}{Integral_domain_tag} +\label{Integral_domain_tag} + +\ccDefinition +Tag indicating that a type is a model of the \ccc{IntegralDomain} concept. + +\ccInheritsFrom +\ccc{Integral_domain_without_div_tag} + +\ccIsModel +\ccc{DefaultConstructible} + +\ccSeeAlso +\ccRefConceptPage{IntegralDomain} \\ +\ccRefConceptPage{AlgebraicStructureTraits}\\ +\end{ccRefClass} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_without_div_tag.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_without_div_tag.tex new file mode 100644 index 00000000000..b7bdd742ebf --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/Integral_domain_without_div_tag.tex @@ -0,0 +1,13 @@ +\begin{ccRefClass}{Integral_domain_without_div_tag} +\label{Integral_domain_without_div_tag} + +\ccDefinition +Tag indicating that a type is a model of the \ccc{IntegralDomainWithoutDiv} concept. + +\ccIsModel +\ccc{DefaultConstructible} + +\ccSeeAlso +\ccRefConceptPage{IntegralDomainWithoutDiv} \\ +\end{ccRefClass} + diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain.tex new file mode 100644 index 00000000000..b79d7646c56 --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain.tex @@ -0,0 +1,38 @@ +\begin{ccRefConcept}{UFDomain} + + +\ccDefinition + + +A model of \ccc{UFDomain} is an \ccc{IntegralDomain} with the additional property +that the ring it represents is a unique factorization domain +(a.k.a. UFD or factorial ring), meaning that every non-zero non-unit +element has a factorization into irreducible elements that is unique +up to order and up to multiplication by invertible elements (units). +(An irreducible element is a non-unit ring element that cannot be factored +further into two non-unit elements. In a UFD, the irreducible elements +are precisely the prime elements.) + +In a UFD, any two elements, not both zero, possess a greatest common +divisor (gcd). + +Moreover, \ccc{CGAL::Algebraic_structure_traits< UFDomain >} is a model of +\ccc{AlgebraicStructureTraits} providing:\\ + +- \ccc{CGAL::Algebraic_structure_traits< UFDomain >::Algebraic_type} derived from \ccc{UFDomain_tag} \\ +- \ccc{CGAL::Algebraic_structure_traits< UFDomain >::Gcd} an \ccc{AdaptableBinaryFunction}\\ + + + +\ccRefines + \ccc{IntegralDomain} + +\ccSeeAlso + \ccc{IntegralDomainWithoutDiv} + $ \leftarrow $ \ccc{IntegralDomain} + $ \leftarrow $ \ccc{UFDomain} + +\ccHasModels + + +\end{ccRefConcept} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain_tag.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain_tag.tex new file mode 100644 index 00000000000..a9fa1a2438b --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/UFDomain_tag.tex @@ -0,0 +1,17 @@ +\begin{ccRefClass}{UFDomain_tag} +\label{UFDomain_tag} + +\ccDefinition +Tag indicating that a type is a model of the \ccc{UFDomain} concept. + + +\ccInheritsFrom +\ccc{Euclidean_ring_tag} + +\ccIsModel +\ccc{DefaultConstructible} + +\ccSeeAlso +\ccRefConceptPage{UFDomain} \\ +\ccRefConceptPage{AlgebraicStructureTraits}\\ +\end{ccRefClass} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/intro.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/intro.tex index 6ab3a946f9f..8dc26a32d50 100755 --- a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/intro.tex +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/intro.tex @@ -7,6 +7,24 @@ \section{Classified Reference Pages} -\subsection*{Concepts} -\ccRefConceptPage{AlgebraicConcept} \\ -%\ccRefConceptPage{AnotherAlgebraicConcept} \ No newline at end of file +\subsection*{Basic Concepts} +\ccRefConceptPage{FromSmallIntConstructible}\\ + +\subsection*{Concepts for Algebraic Structures} +\ccRefConceptPage{AlgebraicStructureTraits}\\ +\\ +\ccRefConceptPage{IntegralDomainWithoutDiv}\\ +\ccRefConceptPage{IntegralDomain}\\ +\ccRefConceptPage{UFDomain}\\ +\ccRefConceptPage{EuclideanRing}\\ +\ccRefConceptPage{Field}\\ +\ccRefConceptPage{FieldWithSqrt}\\ + +\subsection*{Classes} + +\ccRefIdfierPage{Integral_domain_without_div_tag}\\ +\ccRefIdfierPage{Integral_domain_tag}\\ +\ccRefIdfierPage{Field_tag}\\ +\ccRefIdfierPage{Field_with_sqrt_tag}\\ +\ccRefIdfierPage{UFDomain_tag}\\ +\ccRefIdfierPage{Euclidean_ring_tag}\\ \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/macros.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/macros.tex new file mode 100644 index 00000000000..e651aa23167 --- /dev/null +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/macros.tex @@ -0,0 +1,90 @@ +%result type +%first_argument type +%documentation of operator +\newcommand{\ccAdaptableUnaryFunction}[3]{% +\ccc{AdaptableUnaryFunction}\\ % +\\ +{\bf Public Types:} \\ +\begin{tabular}{ll} +{result\_type:} & #1 \\ +{first\_argument\_type:} & #2 \\ +\end{tabular} +\\ +{\bf Public Member Functions:}\\ +\begin{tabular}{ll} +#1 &operator()(#2 x) \\ +\end{tabular}\\ +#3 + +} + +%result type +%first argument type +%second argument type +%documentation of operator +\newcommand{\ccAdaptableBinaryFunction}[4]{% +\ccc{AdaptableBinaryFunction}\\ % +\\ +{\bf Public Types:} \\ +\begin{tabular}{ll} +{result\_type:} & #1 \\ +{first\_argument\_type:} & #2 \\ +{second\_argument\_type:} & #3 \\ +\end{tabular} +\\ +{\bf Public Member Functions:}\\ +\begin{tabular}{ll} +#1 &operator()(#2 x, #3 y) \\ +\end{tabular}\\ +#4 + +} + +%result type +%first argument type +%second argument type +%third argument type +%documentation of operator +\newcommand{\ccAdaptableTernaryFunction}[5]{% +\ccc{AdaptableTernaryFunction}\\ % +\\ +{\bf Public Types:} \\ +\begin{tabular}{ll} +{result\_type:} & #1 \\ +{first\_argument\_type:} & #2 \\ +{second\_argument\_type:} & #3 \\ +{third\_argument\_type:} & #3 \\ +\end{tabular} +\\ +{\bf Public Member Functions:}\\ +\begin{tabular}{ll} +#1 &operator()(#2 x, #3 y, #4z) \\ +\end{tabular}\\ +#5 + +} + + +%result type +%first argument type +%second argument type +%third argument type +%documentation of operator +\newcommand{\ccAdaptableQuadFunction}[6]{% +\ccc{AdaptableQuadFunction}\\ % +\\ +{\bf Public Types:} \\ +\begin{tabular}{ll} +{result\_type:} & #1 \\ +{first\_argument\_type:} & #2 \\ +{second\_argument\_type:} & #3 \\ +{third\_argument\_type:} & #4 \\ +{fourth\_argument\_type:} & #5 \\ +\end{tabular} +\\ +{\bf Public Member Functions:}\\ +\begin{tabular}{ll} +#1 &operator()(#2 a, #3 b, #4 c, #5 d)\\ +\end{tabular}\\ +#6 +} \ No newline at end of file diff --git a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/main.tex b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/main.tex index 38e6a54a112..64f849b89ca 100755 --- a/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/main.tex +++ b/Algebraic_concepts/doc_tex/Algebraic_concepts_ref/main.tex @@ -1,3 +1,21 @@ +\input{Algebraic_concepts_ref/macros.tex} \input{Algebraic_concepts_ref/intro.tex} -\input{Algebraic_concepts_ref/AlgebraicConcept.tex} \ No newline at end of file +%include concepts +\input{Algebraic_concepts_ref/FromSmallIntConstructible.tex} +\input{Algebraic_concepts_ref/IntegralDomainWithoutDiv.tex} +\input{Algebraic_concepts_ref/IntegralDomain.tex} +\input{Algebraic_concepts_ref/UFDomain.tex} +\input{Algebraic_concepts_ref/EuclideanRing.tex} +\input{Algebraic_concepts_ref/Field.tex} +\input{Algebraic_concepts_ref/FieldWithSqrt.tex} +\input{Algebraic_concepts_ref/AlgebraicStructureTraits.tex} + +%include classes +\input{Algebraic_concepts_ref/Integral_domain_without_div_tag.tex} +\input{Algebraic_concepts_ref/Integral_domain_tag.tex} +\input{Algebraic_concepts_ref/Field_tag.tex} +\input{Algebraic_concepts_ref/Field_with_sqrt_tag.tex} +\input{Algebraic_concepts_ref/UFDomain_tag.tex} +\input{Algebraic_concepts_ref/Euclidean_ring_tag.tex} +