From ca3dd4848b03cd82159948aae1a39e08d86d972e Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Tue, 28 Aug 2012 07:15:15 +0000 Subject: [PATCH] Add preconditions --- .../CombinatorialMap.tex | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/Combinatorial_map/doc_tex/Combinatorial_map_ref/CombinatorialMap.tex b/Combinatorial_map/doc_tex/Combinatorial_map_ref/CombinatorialMap.tex index 791e54a1bec..794d561bfdb 100644 --- a/Combinatorial_map/doc_tex/Combinatorial_map_ref/CombinatorialMap.tex +++ b/Combinatorial_map/doc_tex/Combinatorial_map_ref/CombinatorialMap.tex @@ -189,21 +189,27 @@ if for all dart handle \emph{dh} such that \ccPrecond{0\myleq{}\emph{i}\myleq{}\emph{dimension}, and \emph{i}-attributes are non void.}} \ccMethod{Dart_handle dart_handle(Dart& adart);} - {Returns the dart handle of \ccc{adart}.} + {Returns the dart handle of \ccc{adart}. +\ccPrecond{\ccc{adart}\myin{}\ccc{cm.darts()}.}} \ccGlue \ccMethod{Dart_const_handle dart_handle(const Dart& adart) const;} - {Returns the dart const handle of \ccc{adart}.} + {Returns the dart const handle of \ccc{adart}. +\ccPrecond{\ccc{adart}\myin{}\ccc{cm.darts()}.}} -\ccMethod{Dart_handle beta(Dart_handle adart, int i, int j) const;} -{Returns \betaj{}(\betai{}(\ccc{adart})). +\ccMethod{Dart_handle beta(Dart_handle dh, int i, int j) const;} +{Returns \betaj{}(\betai{}(\ccc{dh})). Overloads of this member function are defined that take from one to nine integer as arguments. For each function, betas are applied in the same order as their indices are given as parameters. - For example \ccc{beta(d,1)}=\betaun{}(\ccc{d}), - and \ccc{beta(d,1,2,3,0)}=\betazero{}(\betatrois{}(\betadeux{}(\betaun{}(\ccc{d})))).} + For example \ccc{beta(dh,1)}=\betaun{}(\ccc{dh}), + and \ccc{beta(dh,1,2,3,0)}=\betazero{}(\betatrois{}(\betadeux{}(\betaun{}(\ccc{dh})))). +\ccPrecond{0\myleq{}\emph{i}\myleq{}\emph{dimension}, 0\myleq{}\emph{j}\myleq{}\emph{dimension} and \ccc{*dh}\myin{}\ccc{cm.darts()}.} +} \ccGlue -\ccMethod{Dart_const_handle beta(Dart_const_handle adart, int i, int j) const;} -{Returns \betaj{}(\betai{}(\ccc{adart})). - Overloads of this member function are defined that take from one to nine integer as arguments.} +\ccMethod{Dart_const_handle beta(Dart_const_handle dh, int i, int j) const;} +{Returns \betaj{}(\betai{}(\ccc{dh})). + Overloads of this member function are defined that take from one to nine integer as arguments. +\ccPrecond{0\myleq{}\emph{i}\myleq{}\emph{dimension}, 0\myleq{}\emph{j}\myleq{}\emph{dimension} and \ccc{*dh}\myin{}\ccc{cm.darts()}.} +} \ccMethod{template bool is_sewable(Dart_const_handle dh1, Dart_const_handle dh2) const;} {Returns true iff \ccc{dh1} can be \emph{i}-sewn with \ccc{dh2} by @@ -303,7 +309,7 @@ combinatorial tetrahedra:\\ \ccHeading{Modifiers} \ccMethod{template Dart_handle create_dart(T1 t1);} {Creates a new dart in \ccc{cm}, and returns the corresponding handle. - Calls the constructor of dart having T1 as parameter. + Calls the constructor of dart having \ccc{T1} as parameter. A new dart is initialized to be \emph{i}-free, \myforall{}\emph{i}: 0\myleq{}\emph{i}\myleq{}\emph{dimension}, and to have no associated attribute for each non void attribute. @@ -312,14 +318,16 @@ combinatorial tetrahedra:\\ } \ccMethod{void erase_dart(Dart_handle dh);} - {Removes \ccc{*dh} from \ccc{cm}.} + {Removes \ccc{*dh} from \ccc{cm}. + \ccPrecond{\ccc{*dh}\myin{}\ccc{cm.darts()}.} +} -\ccMethod{template Attribute_handle::type create_attribute(T1 t1);} +\ccMethod{template Attribute_handle::type create_attribute(T1 t1);} {Creates a new \emph{i}-attribute in \ccc{cm}, and returns the corresponding handle. - Calls the constructor of attribute having \ccc{T1} as parameter. + Calls the constructor of \emph{i}-attribute having \ccc{T1} as parameter. Overloads of this member function are defined that take from zero to nine arguments. - With zero argument, \ccc{create_attribute()} creates a new \emph{i}-attribute by using the default constructor. - } + With zero argument, \ccc{create_attribute()} creates a new \emph{i}-attribute by using the default constructor. + \ccPrecond{0\myleq{}\emph{i}\myleq{}\emph{dimension}, and \emph{i}-attributes are non void.}} % \ccMethod{template Attribute_handle::type create_attribute();} % {Creates a new \emph{i}-attribute in \ccc{cm}, and returns the corresponding handle.