added concepts ExplicitInteroperable, ImplicitInteroperable

and related class Coercion_traits.
This commit is contained in:
Michael Hemmer 2006-09-11 15:05:14 +00:00
parent 45f9194a2b
commit cf4204eb2f
6 changed files with 91 additions and 1 deletions

3
.gitattributes vendored
View File

@ -14,13 +14,16 @@ Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_Sqrt.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_Square.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_UnitPart.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Coercion_traits.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/EuclideanRing.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Euclidean_ring_tag.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/ExplicitInteroperable.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Field.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithSqrt.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Field_tag.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Field_with_sqrt_tag.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FromSmallIntConstructible.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/ImplicitInteroperable.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomain.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomainWithoutDiv.tex -text
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Integral_domain_tag.tex -text

View File

@ -0,0 +1,33 @@
\begin{ccRefClass}{Coercion_traits<A,B>}
\ccDefinition
An instance of \ccClassTemplateName\ refelcts the type coercion of the types
{\sc A} and {\sc B}, it is symmetric in the two template arguments.
\ccInclude{CGAL/Coercion_traits.h}
\ccTypes
%=======
%\ccThreeToTwo
\ccNestedType{Explicit_interoperable}
{ Tag indicating whether the two types A and B are a model of \ccc{ExplicitInteroperable} \\
This is either \ccc{CGAL::Tag_true} or \ccc{CGAL::Tag_false}. }
\ccNestedType{Implicit_interoperable}
{ Tag indicating whether the two types A and B are a model of \ccc{ImplicitInteroperable} \\
This is either \ccc{CGAL::Tag_true} or \ccc{CGAL::Tag_false}. }
\ccNestedType{RET}
{The coercion type of {\sc A} and {\sc B}. \\
In case A and B are not \ccc{ExplicitInteroperable} this is undefined. }
\ccNestedType{Cast}
{A model of the \ccc{AdaptableFunctor} concept, providing the conversion of {\sc A} or {\sc B} to {\sc RET}. \\
In case A and B are not \ccc{ExplicitInteroperable} this is undefined. }
\ccSeeAlso
\ccRefConceptPage{UFDomain} \\
\ccRefConceptPage{AlgebraicStructureTraits}\\
\end{ccRefClass}

View File

@ -0,0 +1,18 @@
\begin{ccRefConcept}{ExplicitInteroperable}
\ccDefinition
Two types A and B are a model of the \ccc{ExplicitInteroperable} concept,
if it is possible to derive a superior type for A and B, such that both
types are embeddable into this type.
This type is \ccc{Coercion_traits<A,B>::RET}.
In this case \ccc{Coercion_traits<A,B>::Explicit_interoperable}
is \ccc{Tag_true}.
\ccSeeAlso
\ccRefIdfierPage{Coercion_traits}\\
\ccRefIdfierPage{ImplicitInteroperable}\\
\end{ccRefConcept}

View File

@ -0,0 +1,23 @@
\begin{ccRefConcept}{ImplicitInteroperable}
\ccDefinition
Two types A and B are a model of the \ccc{ImplicitInteroperable} concept,
in case there is a superior type, such that binary arithmetic operations
involing A and B result in this type.
This type is \ccc{Coercion_traits<A,B>::RET}.
The supported binary operations are exactly the ones provided by
\ccc{Coercion_traits<A,B>::RET} itself.
In this case \ccc{Coercion_traits<A,B>::Implicit_interoperable}
is \ccc{Tag_true}.
\ccRefines
\ccc{ExplicitInteroperable}
\ccSeeAlso
\ccRefIdfierPage{Coercion_traits}\\
\ccRefIdfierPage{ExplicitInteroperable}\\
\end{ccRefConcept}

View File

@ -121,3 +121,10 @@ Question: moved it to a global place?
\ccRefIdfierPage{to_double}\\
\ccRefIdfierPage{to_interval}\\
\subsection*{Interoparbility of Types}
\subsubsection*{Concepts}
\ccRefConceptPage{ExplicitInteroperable}\\
\ccRefConceptPage{InplicitInteroperable}\\
\subsubsection*{Classes}
\ccRefIdfierPage{Coercion_traits}\\

View File

@ -74,4 +74,10 @@
\input{Algebraic_foundations_ref/is_negative.tex}
\input{Algebraic_foundations_ref/compare.tex}
\input{Algebraic_foundations_ref/to_double.tex}
\input{Algebraic_foundations_ref/to_interval.tex}
\input{Algebraic_foundations_ref/to_interval.tex}
%Coercion_traits
%concepts:
\input{Algebraic_foundations_ref/ExplicitInteroperable.tex}
\input{Algebraic_foundations_ref/ImplicitInteroperable.tex}
\input{Algebraic_foundations_ref/Coercion_traits.tex}