Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
October 2008
- 14 participants
- 373 discussions
From: Maxime van Noppen <yabo(a)lrde.epita.fr>
To: transformers-patches(a)lrde.epita.fr, olena-patches(a)lrde.epita.fr
Subject: scool r121: Add the 'mutable' keyword
URL: https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-10-17 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add the 'mutable' keyword.
* pp-cxx/CxxFun.str: Pretty-print the 'const' keyword when it is
* present.
* cxx-syn/CxxFun.sdf: Add the 'const-method' production.
* scl-syn/Expression.sdf: Use the C++ semantic regarding '=' and
* '=='.
* scoolt/Class.str: Add a dynamic-rule system to scope translations
* of declarations so that it is possible to detect wether the
* translation takes place or not inside a class context.
* scoolt/Declaration.str: Handle function modifiers.
* scoolt/Expression.str: Handle the Assign constructor.
* scoolt/Function.str: Don't add the 'const' keywords when either
* the method is mutable or that it is a function and not a method.
* scoolt/Program.str: Initialize the dynamic rule system for scoped
* translation rules.
---
cxx-syn/CxxFun.sdf | 7 +++++++
pp-cxx/CxxFun.str | 14 ++++++++++----
scl-syn/Expression.sdf | 12 ++++++------
scoolt/Class.str | 15 ++++++++++++++-
scoolt/Declaration.str | 8 ++++++--
scoolt/Expression.str | 6 +++++-
scoolt/Function.str | 19 +++++++++++++++++++
scoolt/Program.str | 5 ++++-
8 files changed, 71 insertions(+), 15 deletions(-)
Index: branches/scool-ng/src/pp-cxx/CxxFun.str
===================================================================
--- branches/scool-ng/src/pp-cxx/CxxFun.str (revision 120)
+++ branches/scool-ng/src/pp-cxx/CxxFun.str (revision 121)
@@ -4,14 +4,20 @@
rules
+ IsConst:
+ Const() -> S(" const")
+
+ IsConst:
+ None() -> S("")
+
CxxTopLevelToAbox:
- CxxFun(params, t, idf, args) ->
+ CxxFun(params, t, idf, const, args) ->
V vs=0
[
~<CxxParamsToAbox> params
H hs=0
[
- H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf ] "(" H hs=1 [ ~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")" ";"
+ H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf ] "(" H hs=1 [ ~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")" ~<IsConst> const ";"
]
]
@@ -27,12 +33,12 @@
]
CxxTopLevelToAbox:
- CxxFun(params, t, idf, args, body) ->
+ CxxFun(params, t, idf, args, const, body) ->
V vs=0
[
~<CxxParamsToAbox> params
H hs=0 [
- H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf] "(" H hs=1 [ ~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")"
+ H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf] "(" H hs=1 [ ~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")" ~<IsConst> const
]
V vs=0 is=2
[
Index: branches/scool-ng/src/scoolt/Expression.str
===================================================================
--- branches/scool-ng/src/scoolt/Expression.str (revision 120)
+++ branches/scool-ng/src/scoolt/Expression.str (revision 121)
@@ -28,7 +28,6 @@
String(str) -> <un-double-quote> str
ExpressionToCxx:
-// |[ ~exp:e1 + ~exp:e2; ]| -> CxxSum(cxx_e1, cxx_e2)
Sum(e1, e2) -> CxxSum(cxx_e1, cxx_e2)
where
<ExpressionToCxx> e1 => cxx_e1
@@ -41,6 +40,11 @@
; <ParametersToCxx> params => cxx_params
; <ArgumentsToCxx> args => cxx_args
+ ExpressionToCxx:
+ Assign(lvalue, rvalue) -> CxxAssign(cxx_lvalue, cxx_rvalue)
+ where
+ <IdentifierToCxx> lvalue => cxx_lvalue // FIXME: lvalue might not be an identifier
+ ; <ExpressionToCxx> rvalue => cxx_rvalue
StaticExpressionToCxx:
Index: branches/scool-ng/src/scoolt/Class.str
===================================================================
--- branches/scool-ng/src/scoolt/Class.str (revision 120)
+++ branches/scool-ng/src/scoolt/Class.str (revision 121)
@@ -32,8 +32,14 @@
ClassStatementToCxx:
decl -> cxx_decl
where
- <map (DeclarationToCxx)> decl => cxx_decl
+ <map (ClassDeclarationToCxx)> decl => cxx_decl
+ ClassDeclarationToCxx:
+ decl -> cxx_decl
+ where
+ InClass
+ ; <DeclarationToCxx> decl => cxx_decl
+ ; OutClass
// Add the exact type parameter if the class is not final
AddExactType(|cqualif):
@@ -108,3 +114,10 @@
; <IdentifierToCxx> idf => cxx_idf
; <InheritanceToCxx(| cqualif, cxx_idf)> mother => cxx_mother
+strategies
+
+ ClassInit = rules(IsInClass: _ -> 0)
+
+ InClass = rules(IsInClass:- _) ; rules(IsInClass: _ -> 1)
+
+ OutClass = rules(IsInClass: _ -> 0) ; rules(IsInClass:- _)
Index: branches/scool-ng/src/scoolt/Declaration.str
===================================================================
--- branches/scool-ng/src/scoolt/Declaration.str (revision 120)
+++ branches/scool-ng/src/scoolt/Declaration.str (revision 121)
@@ -42,21 +42,25 @@
////////////////////////////////////////////////////////////////////////////////
DeclarationToCxx:
- |[ ~idf : ~ftype:fun_type; ]| -> CxxFun(cxx_params, cxx_ret_type, cxx_idf, cxx_args)
+// |[ ~idf : ~ftype:fun_type; ]| -> CxxFun(cxx_params, cxx_ret_type, cxx_idf, const, cxx_args)
+ FunctionDeclaration(modifier, idf, fun_type) -> CxxFun(cxx_params, cxx_ret_type, cxx_idf, const, cxx_args)
where
<IdentifierToCxx> idf => cxx_idf
; <TypeToCxx> <GetReturnType> fun_type => cxx_ret_type
; <ParametersToCxx> <GetParameters> fun_type => cxx_params
; <ArgumentsToCxx> <GetArguments> fun_type => cxx_args
+ ; <IsMethodConst> modifier => const
DeclarationToCxx:
- |[ ~idf : ~ftype:fun_type = { ~fbody:body } ]| -> CxxFun(cxx_params, cxx_ret_type, cxx_idf, cxx_args, cxx_body)
+// |[ ~idf : ~ftype:fun_type = { ~fbody:body } ]| -> CxxFun(cxx_params, cxx_ret_type, cxx_idf, cxx_args, Const, cxx_body)
+ FunctionDefinition(modifier, idf, fun_type, FunctionBlock(body)) -> CxxFun(cxx_params, cxx_ret_type, cxx_idf, cxx_args, const, cxx_body)
where
<IdentifierToCxx> idf => cxx_idf
; <TypeToCxx> <GetReturnType> fun_type => cxx_ret_type
; <ParametersToCxx> <GetParameters> fun_type => cxx_params
; <ArgumentsToCxx> <GetArguments> fun_type => cxx_args
; <FunctionBodyToCxx> body => cxx_body
+ ; <IsMethodConst> modifier => const
////////////////////////////////////////////////////////////////////////////////
Index: branches/scool-ng/src/scoolt/Function.str
===================================================================
--- branches/scool-ng/src/scoolt/Function.str (revision 120)
+++ branches/scool-ng/src/scoolt/Function.str (revision 121)
@@ -4,6 +4,25 @@
rules
+ // Detect the constness of the method regarding to the modifier
+
+ IsMethodConst:
+ Some("mutable") -> None()
+
+ IsMethodConst:
+ _ -> None()
+ where
+ <eq> (<IsInClass>, 0)
+
+ IsMethodConst:
+ x -> Const()
+ where
+ <not (?Some("mutable"))> x
+ ; <eq> (<IsInClass>, 1)
+
+
+
+
// Extract data from a FunctionType
GetParameters:
Index: branches/scool-ng/src/scoolt/Program.str
===================================================================
--- branches/scool-ng/src/scoolt/Program.str (revision 120)
+++ branches/scool-ng/src/scoolt/Program.str (revision 121)
@@ -6,6 +6,9 @@
rules
ProgramToCxx:
- Program(stm_list) -> CxxProgram(<map (StatementToCxx)> stm_list)
+ Program(stm_list) -> cxx_program
+ where
+ ClassInit
+ ; !CxxProgram(<map (StatementToCxx)> stm_list) => cxx_program
// Program(l) -> CxxProgram(<conc> (<map(DeclToCxx)> l, <map(ImplToCxx <+ CxxEmpty)> l))
Index: branches/scool-ng/src/scl-syn/Expression.sdf
===================================================================
--- branches/scool-ng/src/scl-syn/Expression.sdf (revision 120)
+++ branches/scool-ng/src/scl-syn/Expression.sdf (revision 121)
@@ -26,7 +26,7 @@
Expression "-" Expression -> Expression {cons("Substraction")}
Expression "*" Expression -> Expression {cons("Multiplication")}
Expression "/" Expression -> Expression {cons("Division")}
- Expression "=" Expression -> Expression {cons("Equal")}
+ Expression "==" Expression -> Expression {cons("Equal")}
Expression "!=" Expression -> Expression {cons("Different")}
Expression "<" Expression -> Expression {cons("StrictInferior")}
Expression ">" Expression -> Expression {cons("StrictSuperior")}
@@ -35,7 +35,7 @@
Expression "or" Expression -> Expression {cons("Or")}
Expression "and" Expression -> Expression {cons("And")}
- %%Identifier ":=" Expression -> Expression {cons("Assign")}
+ Identifier "=" Expression -> Expression {cons("Assign")}
%%Expression "." Identifier -> Expression {cons("Field")}
@@ -54,7 +54,7 @@
Expression "-" Expression -> Expression
}
> {left:
- Expression "=" Expression -> Expression
+ Expression "==" Expression -> Expression
}
> {left:
Expression "and" Expression -> Expression
@@ -62,6 +62,6 @@
> {left:
Expression "or" Expression -> Expression
}
-%%> {right:
-%% Identifier ":=" Expression -> Expression
-%% }
+> {right:
+ Identifier "=" Expression -> Expression
+ }
Index: branches/scool-ng/src/cxx-syn/CxxFun.sdf
===================================================================
--- branches/scool-ng/src/cxx-syn/CxxFun.sdf (revision 120)
+++ branches/scool-ng/src/cxx-syn/CxxFun.sdf (revision 121)
@@ -15,6 +15,13 @@
-> CxxTopLevel {cons("CxxFun")}
"template" "<" {(CxxType CxxId) ","}* ">"
+ CxxType CxxId "(" {(CxxType CxxId) ","}* ")" Const?
+ "{"
+ CxxStm*
+ "}"
+ -> CxxTopLevel {cons("CxxFun")}
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
CxxType CxxId "(" {(CxxType CxxId) ","}* ")" ";" -> CxxTopLevel {cons("CxxFun")}
"template" "<" {(CxxType CxxId) ","}* ">"
1
0
* mln/util/site_pair.hh (mln::site_pair): Move class...
(mln::util::site_pair): ...here, into namespace mln::util.
* mln/core/image/line_graph_psite.hh,
* mln/core/site_set/p_complex.hh,
* mln/core/site_set/p_line_graph.hh:
Adjust.
---
milena/ChangeLog | 11 +++
milena/mln/core/image/line_graph_psite.hh | 8 +-
milena/mln/core/site_set/p_complex.hh | 2 +-
milena/mln/core/site_set/p_line_graph.hh | 4 +-
milena/mln/util/site_pair.hh | 135 ++++++++++++++++-------------
5 files changed, 91 insertions(+), 69 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 28c9b28..8aeb1dc 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Move site_pair into namespace mln::util.
+
+ * mln/util/site_pair.hh (mln::site_pair): Move class...
+ (mln::util::site_pair): ...here, into namespace mln::util.
+ * mln/core/image/line_graph_psite.hh,
+ * mln/core/site_set/p_complex.hh,
+ * mln/core/site_set/p_line_graph.hh:
+ Adjust.
+
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Factor neighborhoods of complex images.
* mln/core/image/complex_neighborhoods.hh: New.
diff --git a/milena/mln/core/image/line_graph_psite.hh b/milena/mln/core/image/line_graph_psite.hh
index df79d88..4b2e0aa 100644
--- a/milena/mln/core/image/line_graph_psite.hh
+++ b/milena/mln/core/image/line_graph_psite.hh
@@ -56,7 +56,7 @@ namespace mln
/// \arg \p P The type of the site.
template <typename P>
class line_graph_psite
- : public internal::pseudo_site_base_< const site_pair<P>&,
+ : public internal::pseudo_site_base_< const util::site_pair<P>&,
line_graph_psite<P> >
{
typedef line_graph_psite<P> self_;
@@ -95,7 +95,7 @@ namespace mln
/// Proxy manipulators.
/// \{
/// Return the site corresponding to this psite.
- const site_pair<P>& subj_();
+ const util::site_pair<P>& subj_();
/// \}
/// Edge id manipulators.
@@ -131,7 +131,7 @@ namespace mln
/// Update the site corresponding to this psite.
void update_();
// The site corresponding to this psite.
- site_pair<P> p_;
+ util::site_pair<P> p_;
/// \}
private:
@@ -256,7 +256,7 @@ namespace mln
// FIXME: Write or extend a test to exercise this method.
template <typename P>
inline
- const site_pair<P>&
+ const util::site_pair<P>&
line_graph_psite<P>::subj_()
{
return p_;
diff --git a/milena/mln/core/site_set/p_complex.hh b/milena/mln/core/site_set/p_complex.hh
index 8f79961..7b5e815 100644
--- a/milena/mln/core/site_set/p_complex.hh
+++ b/milena/mln/core/site_set/p_complex.hh
@@ -94,7 +94,7 @@ namespace mln
dimensions, e.g.
mln_type_list(point2d,
- mln_type_list(site_pair<point2d>,
+ mln_type_list(util::site_pair<point2d>,
mln_type_list(site_set<point2d>, // or site_triplet<point2d>
mln_empty_list)))
diff --git a/milena/mln/core/site_set/p_line_graph.hh b/milena/mln/core/site_set/p_line_graph.hh
index d86cb9d..b9a3ed0 100644
--- a/milena/mln/core/site_set/p_line_graph.hh
+++ b/milena/mln/core/site_set/p_line_graph.hh
@@ -68,10 +68,10 @@ namespace mln
template<typename P>
struct p_line_graph
- : public internal::site_set_base_< site_pair<P>, p_line_graph<P> >
+ : public internal::site_set_base_< util::site_pair<P>, p_line_graph<P> >
{
typedef p_line_graph<P> self_;
- typedef internal::site_set_base_< site_pair<P>, self_ > super_;
+ typedef internal::site_set_base_< util::site_pair<P>, self_ > super_;
typedef util::graph<P> graph;
diff --git a/milena/mln/util/site_pair.hh b/milena/mln/util/site_pair.hh
index efde98d..b9a5611 100644
--- a/milena/mln/util/site_pair.hh
+++ b/milena/mln/util/site_pair.hh
@@ -35,83 +35,94 @@
namespace mln
{
- /* FIXME: The class mln::internal::image_base requires its site
- types to have a `coord' typedef, but util::ord_pair has none.
- Hence this small workaround. Use ord_pair directly as soon as
- image_base is refurbished. */
- template <typename P>
- struct site_pair : public mln::Object< site_pair<P> >
- {
- site_pair();
- site_pair(const P& first, const P& second);
- typedef mln_coord(P) coord;
- util::ord_pair<P> pair_;
- };
- /* FIXME: The proxy mechanism requires operator== and operator<= for
- line_graph_psite to compile (line_graph_psite aggregates a
- site_pair); why? It seems its static assertions do not check the
- right guy(s). IMHO (Roland's), it should look for
- line_graph_psite's operators, not site_pair's. */
- template <typename P>
- bool operator==(const site_pair<P>& lhs, const site_pair<P>& rhs);
+ namespace util
+ {
- template <typename P>
- bool operator< (const site_pair<P>& lhs, const site_pair<P>& rhs);
+ /* FIXME: The class mln::internal::image_base requires its site
+ types to have a `coord' typedef, but util::ord_pair has none.
+ Hence this small workaround. Use ord_pair directly as soon as
+ image_base is refurbished. */
+ template <typename P>
+ struct site_pair : public mln::Object< site_pair<P> >
+ {
+ /* FIXME: We should not need to define this typedef
+ (see. mln::internal::image_base's site `coord' typedef). */
+ typedef mln_coord(P) coord;
- template <typename P>
- bool operator< (const site_pair<P>& lhs, const site_pair<P>& rhs);
+ site_pair();
+ site_pair(const P& first, const P& second);
+ util::ord_pair<P> pair_;
+ };
-# ifndef MLN_INCLUDE_ONLY
+ /* FIXME: The proxy mechanism requires operator== and operator<= for
+ line_graph_psite to compile (note: line_graph_psite aggregates a
+ site_pair); why? It seems its static assertions do not check the
+ right guy(s). IMHO (Roland's), it should look for
+ line_graph_psite's operators, not site_pair's. */
+ template <typename P>
+ bool operator==(const site_pair<P>& lhs, const site_pair<P>& rhs);
- /*---------------.
- | Construction. |
- `---------------*/
+ template <typename P>
+ bool operator< (const site_pair<P>& lhs, const site_pair<P>& rhs);
- template <typename P>
- site_pair<P>::site_pair()
- : pair_(P(), P())
- {
- }
+ template <typename P>
+ bool operator< (const site_pair<P>& lhs, const site_pair<P>& rhs);
- template <typename P>
- site_pair<P>::site_pair(const P& first, const P& second)
- : pair_(first, second)
- {
- }
- /*-------------.
- | Comparison. |
- `-------------*/
- template <typename P>
- inline
- bool
- operator==(const site_pair<P>& lhs, const site_pair<P>& rhs)
- {
- return lhs.pair_ == rhs.pair_;
- }
+# ifndef MLN_INCLUDE_ONLY
- template <typename P>
- inline
- bool
- operator< (const site_pair<P>& lhs, const site_pair<P>& rhs)
- {
- return lhs.pair_ < rhs.pair_;
- }
-
- template <typename P>
- inline
- bool
- operator<=(const site_pair<P>& lhs, const site_pair<P>& rhs)
- {
- return lhs.pair_ <= rhs.pair_;
- }
+ /*---------------.
+ | Construction. |
+ `---------------*/
+
+ template <typename P>
+ site_pair<P>::site_pair()
+ : pair_(P(), P())
+ {
+ }
+
+ template <typename P>
+ site_pair<P>::site_pair(const P& first, const P& second)
+ : pair_(first, second)
+ {
+ }
+
+ /*-------------.
+ | Comparison. |
+ `-------------*/
+
+ template <typename P>
+ inline
+ bool
+ operator==(const site_pair<P>& lhs, const site_pair<P>& rhs)
+ {
+ return lhs.pair_ == rhs.pair_;
+ }
+
+ template <typename P>
+ inline
+ bool
+ operator< (const site_pair<P>& lhs, const site_pair<P>& rhs)
+ {
+ return lhs.pair_ < rhs.pair_;
+ }
+
+ template <typename P>
+ inline
+ bool
+ operator<=(const site_pair<P>& lhs, const site_pair<P>& rhs)
+ {
+ return lhs.pair_ <= rhs.pair_;
+ }
# endif // ! MLN_INCLUDE_ONLY
+ } // end of mln::util
+
} // end of mln
--
1.6.0.1
1
0
* mln/core/image/complex_neighborhoods.hh: New.
Replace...
* mln/core/image/complex_lower_neighborhood.hh,
* mln/core/image/complex_higher_neighborhood.hh,
* mln/core/image/complex_lower_higher_neighborhood.hh:
...these files.
Remove.
* tests/core/image/complex_image.cc: Adjust.
---
milena/ChangeLog | 13 +++++
.../mln/core/image/complex_higher_neighborhood.hh | 53 --------------------
.../mln/core/image/complex_lower_neighborhood.hh | 53 --------------------
...er_neighborhood.hh => complex_neighborhoods.hh} | 38 ++++++++++++--
milena/tests/core/image/complex_image.cc | 10 ++--
5 files changed, 49 insertions(+), 118 deletions(-)
delete mode 100644 milena/mln/core/image/complex_higher_neighborhood.hh
delete mode 100644 milena/mln/core/image/complex_lower_neighborhood.hh
rename milena/mln/core/image/{complex_lower_higher_neighborhood.hh => complex_neighborhoods.hh} (60%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index aa31232..28c9b28 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,18 @@
2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Factor neighborhoods of complex images.
+
+ * mln/core/image/complex_neighborhoods.hh: New.
+ Replace...
+ * mln/core/image/complex_lower_neighborhood.hh,
+ * mln/core/image/complex_higher_neighborhood.hh,
+ * mln/core/image/complex_lower_higher_neighborhood.hh:
+ ...these files.
+ Remove.
+ * tests/core/image/complex_image.cc: Adjust.
+
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix and factor windows of complex images.
* mln/core/image/complex_windows.hh: New.
diff --git a/milena/mln/core/image/complex_higher_neighborhood.hh b/milena/mln/core/image/complex_higher_neighborhood.hh
deleted file mode 100644
index d68051a..0000000
--- a/milena/mln/core/image/complex_higher_neighborhood.hh
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef MLN_CORE_IMAGE_COMPLEX_HIGHER_NEIGHBORHOOD_HH
-# define MLN_CORE_IMAGE_COMPLEX_HIGHER_NEIGHBORHOOD_HH
-
-/// \file mln/core/image/complex_higher_neighborhood.hh
-/// \brief A neighborhood centered on a n-face of complex returning its
-/// adjacent (n+1)-faces.
-
-# include <mln/core/internal/complex_neighborhood_base.hh>
-# include <mln/topo/adj_higher_face_iter.hh>
-
-
-namespace mln
-{
-
- template <unsigned D, typename G>
- struct complex_higher_neighborhood
- : internal::complex_neighborhood_base< D, G,
- topo::adj_higher_face_fwd_iter<D>,
- topo::adj_higher_face_bkd_iter<D>,
- complex_higher_neighborhood<D, G> >
- {
- };
-
-} // end of namespace mln
-
-#endif // ! MLN_CORE_IMAGE_COMPLEX_HIGHER_NEIGHBORHOOD_HH
diff --git a/milena/mln/core/image/complex_lower_neighborhood.hh b/milena/mln/core/image/complex_lower_neighborhood.hh
deleted file mode 100644
index c7fc882..0000000
--- a/milena/mln/core/image/complex_lower_neighborhood.hh
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef MLN_CORE_IMAGE_COMPLEX_LOWER_NEIGHBORHOOD_HH
-# define MLN_CORE_IMAGE_COMPLEX_LOWER_NEIGHBORHOOD_HH
-
-/// \file mln/core/image/complex_lower_neighborhood.hh
-/// \brief A neighborhood centered on a n-face of complex returning its
-/// adjacent (n-1)-faces.
-
-# include <mln/core/internal/complex_neighborhood_base.hh>
-# include <mln/topo/adj_lower_face_iter.hh>
-
-
-namespace mln
-{
-
- template <unsigned D, typename G>
- struct complex_lower_neighborhood
- : internal::complex_neighborhood_base< D, G,
- topo::adj_lower_face_fwd_iter<D>,
- topo::adj_lower_face_bkd_iter<D>,
- complex_lower_neighborhood<D, G> >
- {
- };
-
-} // end of namespace mln
-
-#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_NEIGHBORHOOD_HH
diff --git a/milena/mln/core/image/complex_lower_higher_neighborhood.hh b/milena/mln/core/image/complex_neighborhoods.hh
similarity index 60%
rename from milena/mln/core/image/complex_lower_higher_neighborhood.hh
rename to milena/mln/core/image/complex_neighborhoods.hh
index 593982d..174f263 100644
--- a/milena/mln/core/image/complex_lower_higher_neighborhood.hh
+++ b/milena/mln/core/image/complex_neighborhoods.hh
@@ -25,20 +25,46 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_NEIGHBORHOOD_HH
-# define MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_NEIGHBORHOOD_HH
+#ifndef MLN_CORE_IMAGE_COMPLEX_NEIGHBORHOODS_HH
+# define MLN_CORE_IMAGE_COMPLEX_NEIGHBORHOODS_HH
-/// \file mln/core/image/complex_lower_higher_neighborhood.hh
-/// \brief A neighborhood centered on a n-face of complex returning its
-/// adjacent (n-1)-faces and (n+1)-faces.
+/// \file mln/core/image/complex_neighborhoods.hh
+/// \brief Definitions of some neighborhoods of complex images.
# include <mln/core/internal/complex_neighborhood_base.hh>
+
+# include <mln/topo/adj_lower_face_iter.hh>
+# include <mln/topo/adj_higher_face_iter.hh>
# include <mln/topo/adj_lower_higher_face_iter.hh>
namespace mln
{
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// its adjacent (n-1)-faces.
+ template <unsigned D, typename G>
+ struct complex_lower_neighborhood
+ : internal::complex_neighborhood_base< D, G,
+ topo::adj_lower_face_fwd_iter<D>,
+ topo::adj_lower_face_bkd_iter<D>,
+ complex_lower_neighborhood<D, G> >
+ {
+ };
+
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// its adjacent (n+1)-faces.
+ template <unsigned D, typename G>
+ struct complex_higher_neighborhood
+ : internal::complex_neighborhood_base< D, G,
+ topo::adj_higher_face_fwd_iter<D>,
+ topo::adj_higher_face_bkd_iter<D>,
+ complex_higher_neighborhood<D, G> >
+ {
+ };
+
+ /// \brief Neighborhood centered on an n-face of complex returning
+ /// its adjacent (n-1)-faces and (n+1)-faces.
template <unsigned D, typename G>
struct complex_lower_higher_neighborhood
: internal::complex_neighborhood_base<
@@ -52,4 +78,4 @@ namespace mln
} // end of namespace mln
-#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_NEIGHBORHOOD_HH
+#endif // ! MLN_CORE_IMAGE_COMPLEX_NEIGHBORHOODS_HH
diff --git a/milena/tests/core/image/complex_image.cc b/milena/tests/core/image/complex_image.cc
index 4b81713..a2252ad 100644
--- a/milena/tests/core/image/complex_image.cc
+++ b/milena/tests/core/image/complex_image.cc
@@ -37,9 +37,7 @@
#include <mln/core/image/complex_image.hh>
// FIXME: Include these elsewhere? (In complex_image.hh?)
-#include <mln/core/image/complex_lower_neighborhood.hh>
-#include <mln/core/image/complex_higher_neighborhood.hh>
-#include <mln/core/image/complex_lower_higher_neighborhood.hh>
+#include <mln/core/image/complex_neighborhoods.hh>
#include <mln/core/image/complex_neighborhood_piter.hh>
/* FIXME: Split this test (and maybe factor common parts, like the
@@ -215,9 +213,9 @@ int main()
- iterators on N-faces with N in a subset of [0, D];
- etc. */
- // ---------------------------------------- //
- // Iterators on windows and neighborhoods. //
- // ---------------------------------------- //
+ // ---------------------------- //
+ // Iterators on neighborhoods. //
+ // ---------------------------- //
// FIXME: Factor: these three test cases only differ by their
// neighborhoods.
--
1.6.0.1
1
0
* mln/core/image/complex_windows.hh: New.
Replace...
* mln/core/image/complex_lower_window_p.hh,
* mln/core/image/complex_higher_window_p.hh,
* mln/core/image/complex_lower_higher_window_p.hh:
...these files.
Remove.
* mln/core/internal/complex_window_p_base.hh: Fix headers
inclusions.
* tests/morpho/complex_image_morpho.cc: Adjust.
---
milena/ChangeLog | 15 +++
milena/mln/core/image/complex_higher_window_p.hh | 53 ---------
.../core/image/complex_lower_higher_window_p.hh | 54 ---------
milena/mln/core/image/complex_lower_window_p.hh | 53 ---------
milena/mln/core/image/complex_windows.hh | 119 ++++++++++++++++++++
milena/mln/core/internal/complex_window_p_base.hh | 3 +-
milena/tests/morpho/complex_image_morpho.cc | 4 +-
7 files changed, 137 insertions(+), 164 deletions(-)
delete mode 100644 milena/mln/core/image/complex_higher_window_p.hh
delete mode 100644 milena/mln/core/image/complex_lower_higher_window_p.hh
delete mode 100644 milena/mln/core/image/complex_lower_window_p.hh
create mode 100644 milena/mln/core/image/complex_windows.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 09d633d..aa31232 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,20 @@
2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Fix and factor windows of complex images.
+
+ * mln/core/image/complex_windows.hh: New.
+ Replace...
+ * mln/core/image/complex_lower_window_p.hh,
+ * mln/core/image/complex_higher_window_p.hh,
+ * mln/core/image/complex_lower_higher_window_p.hh:
+ ...these files.
+ Remove.
+ * mln/core/internal/complex_window_p_base.hh: Fix headers
+ inclusions.
+ * tests/morpho/complex_image_morpho.cc: Adjust.
+
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Factor concrete windows of complex image.
* mln/core/image/complex_lower_window_p.hh,
diff --git a/milena/mln/core/image/complex_higher_window_p.hh b/milena/mln/core/image/complex_higher_window_p.hh
deleted file mode 100644
index cca6871..0000000
--- a/milena/mln/core/image/complex_higher_window_p.hh
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef MLN_CORE_IMAGE_COMPLEX_HIGHER_WINDOW_P_HH
-# define MLN_CORE_IMAGE_COMPLEX_HIGHER_WINDOW_P_HH
-
-/// \file mln/core/image/complex_higher_window_p.hh
-/// \brief Definition of a window centered on a n-face of complex
-/// returning its adjacent (n+1)-faces as well as the center n-face.
-
-# include <mln/core/internal/complex_window_p_base.hh>
-# include <mln/topo/adj_higher_face_iter.hh>
-
-
-namespace mln
-{
-
- template <unsigned D, typename G>
- struct complex_higher_window_p
- : internal::complex_window_p_base< D, G,
- topo::adj_higher_face_fwd_iter<D>,
- topo::adj_higher_face_bkd_iter<D>,
- complex_higher_window_p<D, G> >
- {
- };
-
-} // end of namespace mln
-
-#endif // ! MLN_CORE_IMAGE_COMPLEX_HIGHER_WINDOW_P_HH
diff --git a/milena/mln/core/image/complex_lower_higher_window_p.hh b/milena/mln/core/image/complex_lower_higher_window_p.hh
deleted file mode 100644
index 7ad62fa..0000000
--- a/milena/mln/core/image/complex_lower_higher_window_p.hh
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_WINDOW_P_HH
-# define MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_WINDOW_P_HH
-
-/// \file mln/core/image/complex_lower_higher_window_p.hh
-/// \brief Definition of a window centered on a n-face of complex
-/// returning its adjacent (n-1)-faces and (n+1)-faces as well as the
-/// center n-face.
-
-# include <mln/core/internal/complex_window_p_base.hh>
-# include <mln/topo/adj_lower_higher_face_iter.hh>
-
-
-namespace mln
-{
-
- template <unsigned D, typename G>
- struct complex_lower_higher_window_p
- : internal::complex_window_p_base< D, G,
- topo::adj_lower_higher_face_fwd_iter<D>,
- topo::adj_lower_higher_face_bkd_iter<D>,
- complex_lower_higher_window_p<D, G> >
- {
- };
-
-} // end of namespace mln
-
-#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_WINDOW_P_HH
diff --git a/milena/mln/core/image/complex_lower_window_p.hh b/milena/mln/core/image/complex_lower_window_p.hh
deleted file mode 100644
index 7bd3cd1..0000000
--- a/milena/mln/core/image/complex_lower_window_p.hh
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
-//
-// This file is part of the Olena Library. This library is free
-// software; you can redistribute it and/or modify it under the terms
-// of the GNU General Public License version 2 as published by the
-// Free Software Foundation.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this library; see the file COPYING. If not, write to
-// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-// Boston, MA 02111-1307, USA.
-//
-// As a special exception, you may use this file as part of a free
-// software library without restriction. Specifically, if other files
-// instantiate templates or use macros or inline functions from this
-// file, or you compile this file and link it with other files to
-// produce an executable, this file does not by itself cause the
-// resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
-
-#ifndef MLN_CORE_IMAGE_COMPLEX_LOWER_WINDOW_P_HH
-# define MLN_CORE_IMAGE_COMPLEX_LOWER_WINDOW_P_HH
-
-/// \file mln/core/image/complex_lower_window_p.hh
-/// \brief Definition of a window centered on a n-face of complex
-/// returning its adjacent (n-1)-faces as well as the center n-face.
-
-# include <mln/core/internal/complex_window_p_base.hh>
-# include <mln/topo/adj_lower_face_iter.hh>
-
-
-namespace mln
-{
-
- template <unsigned D, typename G>
- struct complex_lower_window_p
- : internal::complex_window_p_base< D, G,
- topo::adj_lower_face_fwd_iter<D>,
- topo::adj_lower_face_bkd_iter<D>,
- complex_lower_window_p<D, G> >
- {
- };
-
-} // end of namespace mln
-
-#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_WINDOW_P_HH
diff --git a/milena/mln/core/image/complex_windows.hh b/milena/mln/core/image/complex_windows.hh
new file mode 100644
index 0000000..662b528
--- /dev/null
+++ b/milena/mln/core/image/complex_windows.hh
@@ -0,0 +1,119 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_CORE_IMAGE_COMPLEX_WINDOWS_P_HH
+# define MLN_CORE_IMAGE_COMPLEX_WINDOWS_P_HH
+
+/// \file mln/core/image/complex_windows.hh
+/// \brief Definitions of some windows of complex images.
+
+# include <mln/core/internal/complex_window_p_base.hh>
+
+# include <mln/topo/adj_lower_face_iter.hh>
+# include <mln/topo/adj_higher_face_iter.hh>
+# include <mln/topo/adj_lower_higher_face_iter.hh>
+
+
+namespace mln
+{
+
+ /// \brief Window centered on an n-face of complex returning its
+ /// adjacent (n-1)-faces as well as the center n-face.
+ template <unsigned D, typename G>
+ struct complex_lower_window_p
+ : internal::complex_window_p_base< D, G,
+ topo::adj_lower_face_fwd_iter<D>,
+ topo::adj_lower_face_bkd_iter<D>,
+ complex_lower_window_p<D, G> >
+ {
+ };
+
+ /// \brief Window centered on an n-face of complex returning its
+ /// adjacent (n+1)-faces as well as the center n-face.
+ template <unsigned D, typename G>
+ struct complex_higher_window_p
+ : internal::complex_window_p_base< D, G,
+ topo::adj_higher_face_fwd_iter<D>,
+ topo::adj_higher_face_bkd_iter<D>,
+ complex_higher_window_p<D, G> >
+ {
+ };
+
+ /// \brief Window centered on an n-face of complex returning its
+ /// adjacent (n-1)-faces and (n+1)-faces as well as the center
+ /// n-face.
+ template <unsigned D, typename G>
+ struct complex_lower_higher_window_p
+ : internal::complex_window_p_base< D, G,
+ topo::adj_lower_higher_face_fwd_iter<D>,
+ topo::adj_lower_higher_face_bkd_iter<D>,
+ complex_lower_higher_window_p<D, G> >
+ {
+ };
+
+
+ namespace trait
+ {
+
+ template <unsigned D, typename G>
+ struct window_< mln::complex_lower_window_p<D, G> >
+ : window_< mln::internal::complex_window_p_base<
+ D, G,
+ mln::topo::adj_lower_face_fwd_iter<D>,
+ mln::topo::adj_lower_face_bkd_iter<D>,
+ mln::complex_lower_window_p<D, G> >
+ >
+ {
+ };
+
+ template <unsigned D, typename G>
+ struct window_< mln::complex_higher_window_p<D, G> >
+ : window_< mln::internal::complex_window_p_base<
+ D, G,
+ mln::topo::adj_higher_face_fwd_iter<D>,
+ mln::topo::adj_higher_face_bkd_iter<D>,
+ mln::complex_higher_window_p<D, G> >
+ >
+ {
+ };
+
+ template <unsigned D, typename G>
+ struct window_< mln::complex_lower_higher_window_p<D, G> >
+ : window_< mln::internal::complex_window_p_base<
+ D, G,
+ mln::topo::adj_lower_higher_face_fwd_iter<D>,
+ mln::topo::adj_lower_higher_face_bkd_iter<D>,
+ mln::complex_lower_higher_window_p<D, G> >
+ >
+ {
+ };
+
+ } // end of namespace mln::trait
+
+} // end of namespace mln
+
+#endif // ! MLN_CORE_IMAGE_COMPLEX_WINDOWS_P_HH
diff --git a/milena/mln/core/internal/complex_window_p_base.hh b/milena/mln/core/internal/complex_window_p_base.hh
index a50d594..3494552 100644
--- a/milena/mln/core/internal/complex_window_p_base.hh
+++ b/milena/mln/core/internal/complex_window_p_base.hh
@@ -36,7 +36,8 @@
# include <mln/core/concept/window.hh>
# include <mln/core/site_set/complex_psite.hh>
-# include <mln/topo/adj_lower_face_iter.hh>
+# include <mln/topo/centered_iter_adapter.hh>
+
// FIXME: Factor with mln::internal::complex_neighborhood_base.
diff --git a/milena/tests/morpho/complex_image_morpho.cc b/milena/tests/morpho/complex_image_morpho.cc
index baf0f68..e3823c7 100644
--- a/milena/tests/morpho/complex_image_morpho.cc
+++ b/milena/tests/morpho/complex_image_morpho.cc
@@ -37,9 +37,7 @@
#include <mln/core/image/complex_image.hh>
// FIXME: Include these elsewhere? (In complex_image.hh?)
-#include <mln/core/image/complex_lower_window_p.hh>
-#include <mln/core/image/complex_higher_window_p.hh>
-#include <mln/core/image/complex_lower_higher_window_p.hh>
+#include <mln/core/image/complex_windows.hh>
#include <mln/core/image/complex_window_piter.hh>
#include <mln/debug/iota.hh>
--
1.6.0.1
1
0
scool r120: Fix tests to reflect the constification of class methods by default
by Maxime van Noppen 17 Oct '08
by Maxime van Noppen 17 Oct '08
17 Oct '08
From: Maxime van Noppen <yabo(a)lrde.epita.fr>
To: transformers-patches(a)lrde.epita.fr, olena-patches(a)lrde.epita.fr
Subject: scool r120: Fix tests to reflect the constification of class methods by default
URL: https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-10-17 Maxime van Noppen <yabo(a)lrde.epita.fr>
Fix tests to reflect the constification of class methods by default
* class/c++_ast/method_001.aterm,
* class/c++_ast/method_002.aterm,
* class/c++_ast/method_003.aterm,
* class/c++_ast/method_004.aterm,
* class/c++_ast/method_005.aterm,
* class/c++_src/method_001.cc,
* class/c++_src/method_002.cc,
* class/c++_src/method_003.cc,
* class/c++_src/method_004.cc,
* class/c++_src/method_005.cc,
* function/c++_ast/call_001.aterm,
* function/c++_ast/call_002.aterm,
* function/c++_ast/call_003.aterm,
* function/c++_ast/call_004.aterm,
* function/c++_ast/call_005.aterm,
* function/c++_ast/call_006.aterm,
* function/c++_ast/declaration_001.aterm,
* function/c++_ast/declaration_002.aterm,
* function/c++_ast/declaration_003.aterm,
* function/c++_ast/declaration_004.aterm,
* function/c++_ast/declaration_005.aterm,
* function/c++_ast/declaration_006.aterm,
* function/c++_ast/declaration_007.aterm,
* function/c++_ast/declaration_008.aterm,
* function/c++_ast/definition_001.aterm,
* function/c++_ast/definition_002.aterm,
* function/c++_ast/definition_003.aterm,
* function/c++_ast/definition_004.aterm,
* function/c++_ast/definition_005.aterm,
* function/c++_ast/definition_006.aterm,
* function/c++_ast/definition_007.aterm,
* variable/c++_src/declaration_005.cc,
* misc/c++_src/empty.cc,
* function/c++_ast/parameters_arguments_001.aterm,
* function/c++_ast/parameters_arguments_002.aterm,
* function/c++_ast/parameters_arguments_003.aterm,
* function/c++_ast/parameters_arguments_005.aterm: Here.
* class/c++_src/mutable_1.cc: New.
* class/scool_ast/mutable_1.aterm: New.
* function/c++_build/declaration_001.g++: New.
* function/c++_build/declaration_002.g++: New.
* function/c++_build/declaration_005.g++: New.
* function/c++_build/declaration_006.g++: New.
* function/c++_build/declaration_007.g++: New.
* function/c++_build/declaration_008.g++: New.
* function/c++_build/definition_001.g++: New.
* function/c++_build/definition_003.g++: New.
* function/c++_build/definition_004.g++: New.
* function/c++_build/definition_005.g++: New.
* function/c++_build/definition_006.g++: New.
* function/c++_build/definition_007.g++: New.
* function/c++_build/parameters_arguments_001.g++: New.
* function/c++_build/parameters_arguments_002.g++: New.
* function/c++_build/parameters_arguments_003.g++: New.
* function/c++_build/parameters_arguments_005.g++: New.
* misc/c++_build/empty.g++: New.
* variable/c++_build/declaration_002.g++: New.
* variable/c++_build/declaration_003.g++: New.
* variable/c++_build/declaration_004.g++: New.
* variable/c++_build/mixed_declarations_001.g++: New.
* class/c++_ast/mutable_1.aterm: New.
* class/c++_build/mutable_1.g++: New.
class/c++_ast/method_001.aterm | 2 +-
class/c++_ast/method_002.aterm | 2 +-
class/c++_ast/method_003.aterm | 2 +-
class/c++_ast/method_004.aterm | 2 +-
class/c++_ast/method_005.aterm | 2 +-
class/c++_ast/mutable_1.aterm | 1 +
class/c++_src/method_001.cc | 2 +-
class/c++_src/method_002.cc | 2 +-
class/c++_src/method_003.cc | 4 ++--
class/c++_src/method_004.cc | 4 ++--
class/c++_src/method_005.cc | 4 ++--
class/c++_src/mutable_1.cc | 10 ++++++++++
class/scool_ast/mutable_1.aterm | 1 +
function/c++_ast/call_001.aterm | 2 +-
function/c++_ast/call_002.aterm | 2 +-
function/c++_ast/call_003.aterm | 2 +-
function/c++_ast/call_004.aterm | 2 +-
function/c++_ast/call_005.aterm | 2 +-
function/c++_ast/call_006.aterm | 2 +-
function/c++_ast/declaration_001.aterm | 2 +-
function/c++_ast/declaration_002.aterm | 2 +-
function/c++_ast/declaration_003.aterm | 2 +-
function/c++_ast/declaration_004.aterm | 2 +-
function/c++_ast/declaration_005.aterm | 2 +-
function/c++_ast/declaration_006.aterm | 2 +-
function/c++_ast/declaration_007.aterm | 2 +-
function/c++_ast/declaration_008.aterm | 2 +-
function/c++_ast/definition_001.aterm | 2 +-
function/c++_ast/definition_002.aterm | 2 +-
function/c++_ast/definition_003.aterm | 2 +-
function/c++_ast/definition_004.aterm | 2 +-
function/c++_ast/definition_005.aterm | 2 +-
function/c++_ast/definition_006.aterm | 2 +-
function/c++_ast/definition_007.aterm | 2 +-
function/c++_ast/parameters_arguments_001.aterm | 2 +-
function/c++_ast/parameters_arguments_002.aterm | 2 +-
function/c++_ast/parameters_arguments_003.aterm | 2 +-
function/c++_ast/parameters_arguments_005.aterm | 2 +-
misc/c++_src/empty.cc | 1 +
39 files changed, 51 insertions(+), 38 deletions(-)
Index: branches/scool-ng/tests/class/c++_ast/mutable_1.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/mutable_1.aterm (revision 0)
+++ branches/scool-ng/tests/class/c++_ast/mutable_1.aterm (revision 120)
@@ -0,0 +1 @@
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("foo"),[],[CxxPublic([CxxFun([],CxxType("void"),CxxId("f"),[],None,[CxxExpStm(CxxAssign(CxxId("x"),CxxInt("42")))]),CxxDecl(CxxType("int"),CxxId("x"))])])])
Index: branches/scool-ng/tests/class/c++_ast/method_001.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_001.aterm (revision 119)
+++ branches/scool-ng/tests/class/c++_ast/method_001.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_002.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_002.aterm (revision 119)
+++ branches/scool-ng/tests/class/c++_ast/method_002.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_003.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_003.aterm (revision 119)
+++ branches/scool-ng/tests/class/c++_ast/method_003.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_004.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_004.aterm (revision 119)
+++ branches/scool-ng/tests/class/c++_ast/method_004.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_005.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_005.aterm (revision 119)
+++ branches/scool-ng/tests/class/c++_ast/method_005.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])]),CxxPrivate([CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"Exact")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("42")))])]),CxxPrivate([CxxFun([],CxxType("int"),CxxId("another_test"),[],Const,[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
Index: branches/scool-ng/tests/class/c++_src/method_001.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_001.cc (revision 119)
+++ branches/scool-ng/tests/class/c++_src/method_001.cc (revision 120)
@@ -2,7 +2,7 @@
class Foo
{
public:
- int test()
+ int test() const
{
return 42;
}
Index: branches/scool-ng/tests/class/c++_src/method_002.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_002.cc (revision 119)
+++ branches/scool-ng/tests/class/c++_src/method_002.cc (revision 120)
@@ -2,7 +2,7 @@
class Foo
{
public:
- int test()
+ int test() const
{
return 42;
}
Index: branches/scool-ng/tests/class/c++_src/method_003.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_003.cc (revision 119)
+++ branches/scool-ng/tests/class/c++_src/method_003.cc (revision 120)
@@ -2,11 +2,11 @@
class Foo
{
public:
- int test()
+ int test() const
{
return 42;
}
- int another_test()
+ int another_test() const
{
return 51;
}
Index: branches/scool-ng/tests/class/c++_src/method_004.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_004.cc (revision 119)
+++ branches/scool-ng/tests/class/c++_src/method_004.cc (revision 120)
@@ -2,11 +2,11 @@
class Foo
{
public:
- int test()
+ int test() const
{
return 42;
}
- int another_test()
+ int another_test() const
{
return 51;
}
Index: branches/scool-ng/tests/class/c++_src/method_005.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_005.cc (revision 119)
+++ branches/scool-ng/tests/class/c++_src/method_005.cc (revision 120)
@@ -2,12 +2,12 @@
class Foo
{
public:
- int test()
+ int test() const
{
return 42;
}
private:
- int another_test()
+ int another_test() const
{
return 51;
}
Index: branches/scool-ng/tests/class/c++_src/mutable_1.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/mutable_1.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/mutable_1.cc (revision 120)
@@ -0,0 +1,10 @@
+template < typename Exact >
+class foo
+{
+ public:
+ void f()
+ {
+ x = 42;
+ }
+ int x;
+};
Index: branches/scool-ng/tests/class/scool_ast/mutable_1.aterm
===================================================================
--- branches/scool-ng/tests/class/scool_ast/mutable_1.aterm (revision 0)
+++ branches/scool-ng/tests/class/scool_ast/mutable_1.aterm (revision 120)
@@ -0,0 +1 @@
+Program([ClassDefinition(None,Identifier("foo"),None,ClassBlock([AccessBlock(Public,[FunctionDefinition(Some("mutable"),Identifier("f"),FunctionType(None,ArgumentsDeclaration([]),SimpleType("void")),FunctionBlock([ExpressionStatement(Assign(Identifier("x"),Integer("42")))])),SimpleDeclaration(Some("var"),Identifier("x"),SimpleType("int"),None)])]))])
Index: branches/scool-ng/tests/class/c++_build/mutable_1.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_ast/definition_001.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/definition_001.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/definition_001.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("answer"),[],[])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("answer"),[],None,[])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_004.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_004.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_004.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),[]),CxxFun([],CxxType("float"),CxxId("foo"),[(CxxType("int"),CxxId("arg1"))]),CxxFun([],CxxType("char"),CxxId("foo"),[(CxxConstType(CxxRefType(CxxType("toto"))),CxxId("arg1")),(CxxRefType(CxxType("double")),CxxId("arg2"))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),None,[]),CxxFun([],CxxType("float"),CxxId("foo"),None,[(CxxType("int"),CxxId("arg1"))]),CxxFun([],CxxType("char"),CxxId("foo"),None,[(CxxConstType(CxxRefType(CxxType("toto"))),CxxId("arg1")),(CxxRefType(CxxType("double")),CxxId("arg2"))])])
Index: branches/scool-ng/tests/function/c++_ast/parameters_arguments_001.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/parameters_arguments_001.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/parameters_arguments_001.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("T"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))],[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
+CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("T"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))],None,[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
Index: branches/scool-ng/tests/function/c++_ast/definition_002.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/definition_002.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/definition_002.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("answer"),[],[CxxDecl(CxxConstType(CxxType("int")),CxxId("i"))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("answer"),[],None,[CxxDecl(CxxConstType(CxxType("int")),CxxId("i"))])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_005.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_005.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_005.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("foo"),[])])
+CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("foo"),None,[])])
Index: branches/scool-ng/tests/function/c++_ast/parameters_arguments_002.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/parameters_arguments_002.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/parameters_arguments_002.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))],[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
+CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))],None,[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_006.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_006.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_006.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("foo"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))])])
+CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("foo"),None,[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))])])
Index: branches/scool-ng/tests/function/c++_ast/definition_003.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/definition_003.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/definition_003.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("int"),CxxId("answer"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])
+CxxProgram([CxxFun([],CxxType("int"),CxxId("answer"),[],None,[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])
Index: branches/scool-ng/tests/function/c++_ast/parameters_arguments_003.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/parameters_arguments_003.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/parameters_arguments_003.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))],[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
+CxxProgram([CxxFun([(CxxType("typename"),CxxId("T"))],CxxType("void"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a"))],None,[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_007.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_007.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_007.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("typename"),CxxId("T")),(CxxType("typename"),CxxId("S"))],CxxType("void"),CxxId("foo"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a")),(CxxConstType(CxxRefType(CxxType("S"))),CxxId("b"))])])
+CxxProgram([CxxFun([(CxxType("typename"),CxxId("T")),(CxxType("typename"),CxxId("S"))],CxxType("void"),CxxId("foo"),None,[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a")),(CxxConstType(CxxRefType(CxxType("S"))),CxxId("b"))])])
Index: branches/scool-ng/tests/function/c++_ast/definition_004.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/definition_004.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/definition_004.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("int"),CxxId("answer"),[],[CxxDecl(CxxConstType(CxxType("int")),CxxId("i"),CxxInt("42")),CxxExpStm(CxxKeyword("return",CxxId("i")))])])
+CxxProgram([CxxFun([],CxxType("int"),CxxId("answer"),[],None,[CxxDecl(CxxConstType(CxxType("int")),CxxId("i"),CxxInt("42")),CxxExpStm(CxxKeyword("return",CxxId("i")))])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_008.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_008.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_008.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("bool"),CxxId("B"))],CxxType("void"),CxxId("foo"),[])])
+CxxProgram([CxxFun([(CxxType("bool"),CxxId("B"))],CxxType("void"),CxxId("foo"),None,[])])
Index: branches/scool-ng/tests/function/c++_ast/definition_005.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/definition_005.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/definition_005.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("int"),CxxId("answer"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])
+CxxProgram([CxxFun([],CxxType("int"),CxxId("answer"),[],None,[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])
Index: branches/scool-ng/tests/function/c++_ast/parameters_arguments_005.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/parameters_arguments_005.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/parameters_arguments_005.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([(CxxType("typename"),CxxId("T")),(CxxType("typename"),CxxId("U"))],CxxType("T"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a")),(CxxConstType(CxxRefType(CxxType("U"))),CxxId("b"))],[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
+CxxProgram([CxxFun([(CxxType("typename"),CxxId("T")),(CxxType("typename"),CxxId("U"))],CxxType("T"),CxxId("f"),[(CxxConstType(CxxRefType(CxxType("T"))),CxxId("a")),(CxxConstType(CxxRefType(CxxType("U"))),CxxId("b"))],None,[CxxExpStm(CxxKeyword("return",CxxId("a")))])])
Index: branches/scool-ng/tests/function/c++_ast/definition_006.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/definition_006.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/definition_006.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("int"),CxxId("sum"),[(CxxType("int"),CxxId("a")),(CxxType("int"),CxxId("b"))],[CxxExpStm(CxxKeyword("return",CxxSum(CxxId("a"),CxxId("b"))))])])
+CxxProgram([CxxFun([],CxxType("int"),CxxId("sum"),[(CxxType("int"),CxxId("a")),(CxxType("int"),CxxId("b"))],None,[CxxExpStm(CxxKeyword("return",CxxSum(CxxId("a"),CxxId("b"))))])])
Index: branches/scool-ng/tests/function/c++_ast/definition_007.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/definition_007.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/definition_007.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("int"),CxxId("sum"),[(CxxType("int"),CxxId("a")),(CxxType("int"),CxxId("b"))],[CxxExpStm(CxxKeyword("return",CxxSum(CxxId("a"),CxxId("b"))))])])
+CxxProgram([CxxFun([],CxxType("int"),CxxId("sum"),[(CxxType("int"),CxxId("a")),(CxxType("int"),CxxId("b"))],None,[CxxExpStm(CxxKeyword("return",CxxSum(CxxId("a"),CxxId("b"))))])])
Index: branches/scool-ng/tests/function/c++_ast/call_001.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/call_001.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/call_001.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],[CxxExpStm(CxxFunCall([],CxxId("foo"),[]))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([],CxxId("foo"),[]))])])
Index: branches/scool-ng/tests/function/c++_ast/call_002.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/call_002.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/call_002.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],[CxxExpStm(CxxFunCall([],CxxId("foo"),[CxxInt("42")]))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([],CxxId("foo"),[CxxInt("42")]))])])
Index: branches/scool-ng/tests/function/c++_ast/call_003.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/call_003.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/call_003.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],[CxxExpStm(CxxFunCall([],CxxId("foo"),["bar",CxxInt("42")]))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([],CxxId("foo"),["bar",CxxInt("42")]))])])
Index: branches/scool-ng/tests/function/c++_ast/call_004.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/call_004.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/call_004.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],[CxxExpStm(CxxFunCall([CxxType("int")],CxxId("foo"),[]))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxType("int")],CxxId("foo"),[]))])])
Index: branches/scool-ng/tests/function/c++_ast/call_005.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/call_005.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/call_005.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],[CxxExpStm(CxxFunCall([CxxInt("42")],CxxId("foo"),[]))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxInt("42")],CxxId("foo"),[]))])])
Index: branches/scool-ng/tests/function/c++_ast/call_006.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/call_006.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/call_006.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],[CxxExpStm(CxxFunCall([CxxType("int"),CxxInt("42")],CxxId("foo"),[CxxInt("42")]))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("doit"),[],None,[CxxExpStm(CxxFunCall([CxxType("int"),CxxInt("42")],CxxId("foo"),[CxxInt("42")]))])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_001.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_001.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_001.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),[])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),None,[])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_002.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_002.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_002.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),[(CxxType("int"),CxxId("a"))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),None,[(CxxType("int"),CxxId("a"))])])
Index: branches/scool-ng/tests/function/c++_ast/declaration_003.aterm
===================================================================
--- branches/scool-ng/tests/function/c++_ast/declaration_003.aterm (revision 119)
+++ branches/scool-ng/tests/function/c++_ast/declaration_003.aterm (revision 120)
@@ -1 +1 @@
-CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),[(CxxType("int"),CxxId("a")),(CxxConstType(CxxRefType(CxxType("bar"))),CxxId("b"))])])
+CxxProgram([CxxFun([],CxxType("void"),CxxId("foo"),None,[(CxxType("int"),CxxId("a")),(CxxConstType(CxxRefType(CxxType("bar"))),CxxId("b"))])])
Index: branches/scool-ng/tests/function/c++_build/declaration_001.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/declaration_002.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/parameters_arguments_001.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/definition_001.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/parameters_arguments_002.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/declaration_005.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/parameters_arguments_003.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/definition_003.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/declaration_006.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/definition_004.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/declaration_007.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/parameters_arguments_005.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/definition_005.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/declaration_008.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/definition_006.g++
===================================================================
Index: branches/scool-ng/tests/function/c++_build/definition_007.g++
===================================================================
Index: branches/scool-ng/tests/variable/c++_src/declaration_005.cc
===================================================================
Index: branches/scool-ng/tests/variable/c++_build/declaration_002.g++
===================================================================
Index: branches/scool-ng/tests/variable/c++_build/declaration_003.g++
===================================================================
Index: branches/scool-ng/tests/variable/c++_build/declaration_004.g++
===================================================================
Index: branches/scool-ng/tests/variable/c++_build/mixed_declarations_001.g++
===================================================================
Index: branches/scool-ng/tests/misc/c++_src/empty.cc
===================================================================
--- branches/scool-ng/tests/misc/c++_src/empty.cc (revision 119)
+++ branches/scool-ng/tests/misc/c++_src/empty.cc (revision 120)
@@ -0,0 +1 @@
+
Index: branches/scool-ng/tests/misc/c++_build/empty.g++
===================================================================
--
yabo
1
0
---
ChangeLog | 249 -----------------------------------
milena/ChangeLog | 322 +++++++++++++++++++++++++++++++++++++++-------
milena/sandbox/ChangeLog | 14 ++
3 files changed, 291 insertions(+), 294 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7faee30..a94185c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,3 @@
-2008-10-16 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Fix some morpho operators.
-
- * milena/tests/morpho/erosion.cc: Fix typo.
- * milena/mln/core/routine/ops.hh (todo): New.
- * milena/mln/morpho/erosion.spe.hh (octagon2d): Fix.
- (hline2d, vline2d): Fix dispatch.
-
2008-10-15 Roland Levillain <roland(a)lrde.epita.fr>
* configure.ac: Configure milena/tests/io/off/Makefile.
@@ -19,246 +10,6 @@
Fix compilation error. It could not resolve the correct namespace
path.
-2008-16-07 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- Update tutorial.
- * milena/doc/tutorial/samples/ima2d-1.tex,
- * milena/doc/tutorial/samples/ima2d-3.tex,
- * milena/doc/tutorial/samples/paste-call-1.tex,
- * milena/doc/tutorial/samples/point-1.tex:
- Add new sample code.
-
- * milena/doc/tutorial/tutorial.tex:
- Mainly update image chapter.
- Cleanup source.
-
-2008-15-07 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- * milena/mln/doc/tutorial/samples/box2d-1.tex,
- * milena/mln/doc/tutorial/samples/box2d-2.tex,
- * milena/mln/doc/tutorial/samples/domain-display-1.tex,
- * milena/mln/doc/tutorial/samples/domain-display-out-1.tex,
- * milena/mln/doc/tutorial/samples/fill-call-1.tex,
- * milena/mln/doc/tutorial/samples/fill-part-1.tex,
- * milena/mln/doc/tutorial/samples/fill-part-2.tex,
- * milena/mln/doc/tutorial/samples/fill-part-3.tex,
- * milena/mln/doc/tutorial/samples/fill.tex,
- * milena/mln/doc/tutorial/samples/forall-piter-1.tex,
- * milena/mln/doc/tutorial/samples/fun-p2b-1.tex,
- * milena/mln/doc/tutorial/samples/fun-p2v-1.tex,
- * milena/mln/doc/tutorial/samples/graph-output-1.tex,
- * milena/mln/doc/tutorial/samples/ima2d-1.tex,
- * milena/mln/doc/tutorial/samples/ima2d-2.tex,
- * milena/mln/doc/tutorial/samples/ima2d-3.tex,
- * milena/mln/doc/tutorial/samples/ima2d-4.tex,
- * milena/mln/doc/tutorial/samples/ima2d-5.tex,
- * milena/mln/doc/tutorial/samples/ima2d-6-clone.tex,
- * milena/mln/doc/tutorial/samples/ima2d-decl-1.tex,
- * milena/mln/doc/tutorial/samples/ima2d-decl-2.tex,
- * milena/mln/doc/tutorial/samples/ima2d-display-1.tex,
- * milena/mln/doc/tutorial/samples/ima2d-display-2.tex,
- * milena/mln/doc/tutorial/samples/ima2d-display-output-1.tex,
- * milena/mln/doc/tutorial/samples/ima2d-display-output-2.tex,
- * milena/mln/doc/tutorial/samples/ima2d-restricted-1.tex,
- * milena/mln/doc/tutorial/samples/ima2d-restricted-2.tex,
- * milena/mln/doc/tutorial/samples/ima2d-restricted-3.tex,
- * milena/mln/doc/tutorial/samples/ima2d-restricted-display-1.tex,
- * milena/mln/doc/tutorial/samples/mln_var-1.tex,
- * milena/mln/doc/tutorial/samples/mln_var-2.tex,
- * milena/mln/doc/tutorial/samples/mln_var-3.tex,
- * milena/mln/doc/tutorial/samples/parray-append.tex,
- * milena/mln/doc/tutorial/samples/parray-display-1.tex,
- * milena/mln/doc/tutorial/samples/paste-call-1.tex,
- * milena/mln/doc/tutorial/samples/paste.tex,
- * milena/mln/doc/tutorial/samples/point-1.tex,
- * milena/mln/doc/tutorial/samples/predicate-1.tex:
- Move sample code from the tutorial to these files.
-
- * milena/mln/doc/tutorial/tutorial.tex: various update.
-
-
-2008-15-07 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- Update the prototype of labeling::compute().
- * milena/mln/labeling/compute.hh: change the return type to an
- util::array.
-
- * milena/sandbox/scribo/demat.hh,
- * milena/tests/labeling/compute.cc: update according the new
- prototype.
-
-2008-15-07 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- Remove the useless '_' postfix in all the accumulators.
- * milena/doc/examples/tuto_bis.cc,
- * milena/doc/tutorial/examples/accu.cc,
- * milena/mln/accu/bbox.hh,
- * milena/mln/accu/count.hh,
- * milena/mln/accu/count_adjacent_vertices.hh,
- * milena/mln/accu/height.hh,
- * milena/mln/accu/histo.hh,
- * milena/mln/accu/max_h.hh,
- * milena/mln/accu/mean.hh,
- * milena/mln/accu/median_alt.hh,
- * milena/mln/accu/median_h.hh,
- * milena/mln/accu/nil.hh,
- * milena/mln/accu/p.hh,
- * milena/mln/accu/rank.hh,
- * milena/mln/accu/rank_bool.hh,
- * milena/mln/accu/rank_high_quant.hh,
- * milena/mln/accu/sum.hh,
- * milena/mln/accu/tuple.hh,
- * milena/mln/accu/v.hh,
- * milena/mln/accu/volume.hh,
- * milena/mln/canvas/morpho/algebraic_union_find.hh,
- * milena/mln/estim/mean.hh,
- * milena/mln/estim/sum.hh,
- * milena/mln/make/voronoi.hh,
- * milena/mln/morpho/closing_area.hh,
- * milena/mln/morpho/closing_area_on_vertices.hh,
- * milena/mln/morpho/closing_height.hh,
- * milena/mln/morpho/closing_volume.hh,
- * milena/mln/morpho/erosion.spe.hh,
- * milena/mln/morpho/opening_area.hh,
- * milena/mln/morpho/opening_area_on_vertices.hh,
- * milena/mln/morpho/opening_height.hh,
- * milena/mln/morpho/opening_volume.hh,
- * milena/mln/morpho/rank_filter.hh,
- * milena/tests/accu/all_accus.cc,
- * milena/tests/accu/count.cc,
- * milena/tests/accu/nil.cc,
- * milena/tests/accu/pair.cc,
- * milena/tests/accu/rank.cc,
- * milena/tests/accu/tuple.cc,
- * milena/tests/labeling/compute.cc:
- Update.
-
-
-2008-15-07 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- Update accus to make them work with the new q_result typedef.
- * milena/mln/accu/bbox.hh,
- * milena/mln/accu/histo.hh,
- * milena/mln/accu/max.hh,
- * milena/mln/accu/max_h.hh,
- * milena/mln/accu/mean.hh,
- * milena/mln/accu/median_alt.hh,
- * milena/mln/accu/median_h.hh,
- * milena/mln/accu/min_h.hh,
- * milena/mln/accu/nil.hh,
- * milena/mln/accu/p.hh,
- * milena/mln/accu/rank.hh,
- * milena/mln/accu/rank_bool.hh,
- * milena/mln/accu/rank_high_quant.hh,
- * milena/mln/accu/sum.hh,
- * milena/mln/accu/tuple.hh,
- * milena/mln/accu/v.hh:
- Remove "result" typedef.
- Pass the qualified type as parameter to internal::base<>.
-
-2008-13-07 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- * milena/sandbox/scribo/remove_tables.cc:
- New small example to remove table borders in a document such as a
- bill.
-
-2008-10-07 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- Fix most of the doxygen warnings.
- * milena/mln/arith/min.hh,
- * milena/mln/arith/plus.hh,
- * milena/mln/core/concept/doc/point_iterator.hh,
- * milena/mln/core/concept/point_site.hh,
- * milena/mln/core/dpsites_piter.hh,
- * milena/mln/core/faces_psite.hh,
- * milena/mln/core/image/bgraph_image.hh,
- * milena/mln/core/image/bgraph_psite.hh,
- * milena/mln/core/image/complex_higher_neighborhood.hh,
- * milena/mln/core/image/complex_higher_window_p.hh,
- * milena/mln/core/image/complex_image.hh,
- * milena/mln/core/image/complex_lower_higher_neighborhood.hh,
- * milena/mln/core/image/complex_lower_higher_window_p.hh,
- * milena/mln/core/image/complex_lower_neighborhood.hh,
- * milena/mln/core/image/complex_lower_window_p.hh,
- * milena/mln/core/image/decorated_image.hh,
- * milena/mln/core/image/graph_image.hh,
- * milena/mln/core/image/graph_psite.hh,
- * milena/mln/core/image/line_graph_image.hh,
- * milena/mln/core/image/line_graph_psite.hh,
- * milena/mln/core/image/obased_rle_image.hh,
- * milena/mln/core/image/value_enc_image.hh,
- * milena/mln/core/routine/clone.hh,
- * milena/mln/core/site_set/attic/p_complex_faces_piter.hh,
- * milena/mln/core/site_set/attic/p_faces_piter.hh,
- * milena/mln/core/site_set/complex_psite.hh,
- * milena/mln/core/site_set/p_bgraph.hh,
- * milena/mln/core/site_set/p_bgraph_piter.hh,
- * milena/mln/core/site_set/p_complex.hh,
- * milena/mln/core/site_set/p_faces.hh,
- * milena/mln/core/site_set/p_graph.hh,
- * milena/mln/core/site_set/p_line_graph.hh,
- * milena/mln/core/window.hh,
- * milena/mln/display/color_pretty.hh,
- * milena/mln/fun/c.hh,
- * milena/mln/fun/x2x/geom/composed.hh,
- * milena/mln/fun/x2x/geom/rotation.hh,
- * milena/mln/fun/x2x/geom/translation.hh,
- * milena/mln/geom/resize.hh,
- * milena/mln/geom/seeds2tiling.hh,
- * milena/mln/geom/seeds2tiling_roundness.hh,
- * milena/mln/level/fill_with_image.hh,
- * milena/mln/level/fill_with_value.hh,
- * milena/mln/level/paste.hh,
- * milena/mln/linear/sobel.hh,
- * milena/mln/neighb/image.hh,
- * milena/mln/pw/image.hh,
- * milena/mln/topo/attic/faces_iter.hh,
- * milena/mln/topo/complex.hh,
- * milena/mln/topo/complex_iterators.hh,
- * milena/mln/topo/internal/complex_relative_iterator_base.hh,
- * milena/mln/topo/internal/complex_relative_iterator_sequence.hh,
- * milena/mln/topo/internal/complex_set_iterator_base.hh,
- * milena/mln/topo/n_faces_set.hh,
- * milena/mln/util/branch_iter.hh,
- * milena/mln/util/branch_iter_ind.hh,
- * milena/mln/util/greater_point.hh,
- * milena/mln/util/greater_psite.hh,
- * milena/mln/util/internal/boost_graph.hh,
- * milena/mln/util/internal/graph_edge.hh,
- * milena/mln/util/internal/graph_edge_impl.hh,
- * milena/mln/util/internal/graph_edge_psite.hh,
- * milena/mln/util/internal/graph_vertex_impl.hh,
- * milena/mln/win/cuboid3d.hh,
- * milena/mln/win/multiple.hh,
- * milena/tests/core/site_set/p_vertices.cc,
- * milena/tests/extension/fill.cc,
- * milena/tests/morpho/complex_image_morpho.cc:
- Cleanup up doxygen comments.
-
- * milena/doc/Doxyfile.in:
- Add new predefined macros.
-
-
-2008-10-03 Guillaume Lazzara <z(a)lrde.epita.fr>
-
- Various small fixes.
- * milena/mln/algebra/vec.hh: add missing header.
-
- * milena/mln/core/image/obased_rle_image.hh,
- * milena/mln/core/image/rle_image.hh: Use pruns.
-
- * milena/mln/core/image/obased_rle_image.hh,
- * milena/mln/core/image/t_image.hh: add missing init_ function.
-
- * milena/mln/core/image/tr_image.hh,
- * milena/tests/core/alias/point1d.cc,
- * milena/tests/core/alias/point2d.cc: cleanup.
-
- * milena/tests/core/image/Makefile.am: Disable known broken test
- such as graph related tests.
-
- * milena/tests/core/image/tr_image.cc: make it compile.
-
2008-09-24 Roland Levillain <roland(a)lrde.epita.fr>
* configure.ac: Configure milena/tests/topo/Makefile.
diff --git a/milena/ChangeLog b/milena/ChangeLog
index cc3b10a..09d633d 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -28,6 +28,15 @@
* mln/core/internal/complex_neighborhood_base.hh: New.
+2008-10-16 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Fix some morpho operators.
+
+ * tests/morpho/erosion.cc: Fix typo.
+ * mln/core/routine/ops.hh (todo): New.
+ * mln/morpho/erosion.spe.hh (octagon2d): Fix.
+ (hline2d, vline2d): Fix dispatch.
+
2008-10-16 Roland Levillain <roland(a)lrde.epita.fr>
Exercise mln::io::load on OFF file (with no color data).
@@ -207,6 +216,73 @@
* mln/core/def/coordf.hh: New.
+2008-16-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Update tutorial.
+ * doc/tutorial/samples/ima2d-1.tex,
+ * doc/tutorial/samples/ima2d-3.tex,
+ * doc/tutorial/samples/paste-call-1.tex,
+ * doc/tutorial/samples/point-1.tex:
+ Add new sample code.
+
+ * doc/tutorial/tutorial.tex:
+ Mainly update image chapter.
+ Cleanup source.
+
+2008-15-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/doc/tutorial/samples/box2d-1.tex,
+ * mln/doc/tutorial/samples/box2d-2.tex,
+ * mln/doc/tutorial/samples/domain-display-1.tex,
+ * mln/doc/tutorial/samples/domain-display-out-1.tex,
+ * mln/doc/tutorial/samples/fill-call-1.tex,
+ * mln/doc/tutorial/samples/fill-part-1.tex,
+ * mln/doc/tutorial/samples/fill-part-2.tex,
+ * mln/doc/tutorial/samples/fill-part-3.tex,
+ * mln/doc/tutorial/samples/fill.tex,
+ * mln/doc/tutorial/samples/forall-piter-1.tex,
+ * mln/doc/tutorial/samples/fun-p2b-1.tex,
+ * mln/doc/tutorial/samples/fun-p2v-1.tex,
+ * mln/doc/tutorial/samples/graph-output-1.tex,
+ * mln/doc/tutorial/samples/ima2d-1.tex,
+ * mln/doc/tutorial/samples/ima2d-2.tex,
+ * mln/doc/tutorial/samples/ima2d-3.tex,
+ * mln/doc/tutorial/samples/ima2d-4.tex,
+ * mln/doc/tutorial/samples/ima2d-5.tex,
+ * mln/doc/tutorial/samples/ima2d-6-clone.tex,
+ * mln/doc/tutorial/samples/ima2d-decl-1.tex,
+ * mln/doc/tutorial/samples/ima2d-decl-2.tex,
+ * mln/doc/tutorial/samples/ima2d-display-1.tex,
+ * mln/doc/tutorial/samples/ima2d-display-2.tex,
+ * mln/doc/tutorial/samples/ima2d-display-output-1.tex,
+ * mln/doc/tutorial/samples/ima2d-display-output-2.tex,
+ * mln/doc/tutorial/samples/ima2d-restricted-1.tex,
+ * mln/doc/tutorial/samples/ima2d-restricted-2.tex,
+ * mln/doc/tutorial/samples/ima2d-restricted-3.tex,
+ * mln/doc/tutorial/samples/ima2d-restricted-display-1.tex,
+ * mln/doc/tutorial/samples/mln_var-1.tex,
+ * mln/doc/tutorial/samples/mln_var-2.tex,
+ * mln/doc/tutorial/samples/mln_var-3.tex,
+ * mln/doc/tutorial/samples/parray-append.tex,
+ * mln/doc/tutorial/samples/parray-display-1.tex,
+ * mln/doc/tutorial/samples/paste-call-1.tex,
+ * mln/doc/tutorial/samples/paste.tex,
+ * mln/doc/tutorial/samples/point-1.tex,
+ * mln/doc/tutorial/samples/predicate-1.tex:
+ Move sample code from the tutorial to these files.
+
+ * mln/doc/tutorial/tutorial.tex: various update.
+
+2008-10-15 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Update the prototype of labeling::compute().
+ * mln/labeling/compute.hh: change the return type to an
+ util::array.
+
+ * sandbox/scribo/demat.hh,
+ * tests/labeling/compute.cc: update according the new
+ prototype.
+
2008-10-15 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Make morpho meyer_wst practicable.
@@ -227,6 +303,52 @@
* mln/convert/to_image.hh: Replace suspicous use of size_t by T.
Now return an image1d<T> instead of image1d<std::size_t>
+2008-10-15 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Remove the useless '_' postfix in all the accumulators.
+ * doc/examples/tuto_bis.cc,
+ * doc/tutorial/examples/accu.cc,
+ * mln/accu/bbox.hh,
+ * mln/accu/count.hh,
+ * mln/accu/count_adjacent_vertices.hh,
+ * mln/accu/height.hh,
+ * mln/accu/histo.hh,
+ * mln/accu/max_h.hh,
+ * mln/accu/mean.hh,
+ * mln/accu/median_alt.hh,
+ * mln/accu/median_h.hh,
+ * mln/accu/nil.hh,
+ * mln/accu/p.hh,
+ * mln/accu/rank.hh,
+ * mln/accu/rank_bool.hh,
+ * mln/accu/rank_high_quant.hh,
+ * mln/accu/sum.hh,
+ * mln/accu/tuple.hh,
+ * mln/accu/v.hh,
+ * mln/accu/volume.hh,
+ * mln/canvas/morpho/algebraic_union_find.hh,
+ * mln/estim/mean.hh,
+ * mln/estim/sum.hh,
+ * mln/make/voronoi.hh,
+ * mln/morpho/closing_area.hh,
+ * mln/morpho/closing_area_on_vertices.hh,
+ * mln/morpho/closing_height.hh,
+ * mln/morpho/closing_volume.hh,
+ * mln/morpho/erosion.spe.hh,
+ * mln/morpho/opening_area.hh,
+ * mln/morpho/opening_area_on_vertices.hh,
+ * mln/morpho/opening_height.hh,
+ * mln/morpho/opening_volume.hh,
+ * mln/morpho/rank_filter.hh,
+ * tests/accu/all_accus.cc,
+ * tests/accu/count.cc,
+ * tests/accu/nil.cc,
+ * tests/accu/pair.cc,
+ * tests/accu/rank.cc,
+ * tests/accu/tuple.cc,
+ * tests/labeling/compute.cc:
+ Update.
+
2008-10-15 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Remove the useless '_' postfix in some accumulators.
@@ -258,6 +380,28 @@
* doc/examples/tuto_bis.cc,
* mln/debug/println.spe.hh: Update.
+2008-10-15 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Update accus to make them work with the new q_result typedef.
+ * mln/accu/bbox.hh,
+ * mln/accu/histo.hh,
+ * mln/accu/max.hh,
+ * mln/accu/max_h.hh,
+ * mln/accu/mean.hh,
+ * mln/accu/median_alt.hh,
+ * mln/accu/median_h.hh,
+ * mln/accu/min_h.hh,
+ * mln/accu/nil.hh,
+ * mln/accu/p.hh,
+ * mln/accu/rank.hh,
+ * mln/accu/rank_bool.hh,
+ * mln/accu/rank_high_quant.hh,
+ * mln/accu/sum.hh,
+ * mln/accu/tuple.hh,
+ * mln/accu/v.hh:
+ Remove "result" typedef.
+ Pass the qualified type as parameter to internal::base<>.
+
2008-10-15 Nicolas Ballas <ballas(a)lrde.epita.fr>
Fix a bug in the fill_with_value dispatch.
@@ -294,16 +438,8 @@
2008-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
- Use labeling::compute for Scribo.
- * milena/sandbox/scribo/remove_tables.hh: split in...
- * milena/sandbox/scribo/demat.hh,
- * milena/sandbox/scribo/main.cc: ...these two files.
- Update the code in order to use labeling::compute.
-
-2008-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
-
Fix labeling::compute return type.
- * milena/mln/labeling/compute.hh: Fix many compilation errors
+ * mln/labeling/compute.hh: Fix many compilation errors
while taking directly the result type of an accumulator as a template
parameter for p_array<>.
Use mlc_unqualif.
@@ -311,60 +447,60 @@
2008-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Add meta-accumulator for accu::bbox.
- * milena/mln/accu/bbox.hh: add missing meta-accumulator.
+ * mln/accu/bbox.hh: add missing meta-accumulator.
2008-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Add is_valid() in the accumulator concept and move meta-accumulators
in meta namespace.
- * milena/mln/accu/count.hh,
- * milena/mln/accu/height.hh,
- * milena/mln/accu/histo.hh,
- * milena/mln/accu/max.hh,
- * milena/mln/accu/max_h.hh,
- * milena/mln/accu/mean.hh,
- * milena/mln/accu/median_alt.hh,
- * milena/mln/accu/min.hh,
- * milena/mln/accu/min_h.hh,
- * milena/mln/accu/nil.hh,
- * milena/mln/accu/p.hh,
- * milena/mln/accu/pair.hh,
- * milena/mln/accu/rank.hh,
- * milena/mln/accu/rank_bool.hh,
- * milena/mln/accu/rank_high_quant.hh,
- * milena/mln/accu/sum.hh,
- * milena/mln/accu/tuple.hh,
- * milena/mln/accu/v.hh,
- * milena/mln/accu/volume.hh:
+ * mln/accu/count.hh,
+ * mln/accu/height.hh,
+ * mln/accu/histo.hh,
+ * mln/accu/max.hh,
+ * mln/accu/max_h.hh,
+ * mln/accu/mean.hh,
+ * mln/accu/median_alt.hh,
+ * mln/accu/min.hh,
+ * mln/accu/min_h.hh,
+ * mln/accu/nil.hh,
+ * mln/accu/p.hh,
+ * mln/accu/pair.hh,
+ * mln/accu/rank.hh,
+ * mln/accu/rank_bool.hh,
+ * mln/accu/rank_high_quant.hh,
+ * mln/accu/sum.hh,
+ * mln/accu/tuple.hh,
+ * mln/accu/v.hh,
+ * mln/accu/volume.hh:
Add is_valid() and move meta-accumulators in meta namespace if needed.
- * milena/mln/core/concept/accumulator.hh:
+ * mln/core/concept/accumulator.hh:
Add is_valid() static test.
- * milena/tests/accu/all_accus.cc,
- * milena/tests/accu/max.cc,
- * milena/tests/accu/mean.cc,
- * milena/tests/accu/min.cc,
- * milena/tests/accu/min_max.cc,
- * milena/tests/accu/nil.cc:
+ * tests/accu/all_accus.cc,
+ * tests/accu/max.cc,
+ * tests/accu/mean.cc,
+ * tests/accu/min.cc,
+ * tests/accu/min_max.cc,
+ * tests/accu/nil.cc:
Fix tests.
- * milena/mln/morpho/gradient_elementary.hh: Fix compilation.
+ * mln/morpho/gradient_elementary.hh: Fix compilation.
2008-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Add labeling::compute.
- * milena/mln/labeling/compute.hh: do it.
- * milena/tests/labeling/Makefile.am,
- * milena/tests/labeling/compute.cc: Add the proper test.
+ * mln/labeling/compute.hh: do it.
+ * tests/labeling/Makefile.am,
+ * tests/labeling/compute.cc: Add the proper test.
2008-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Use geom::bbox instead of bbox().
- * milena/mln/geom/max_col.hh,
- * milena/mln/geom/max_row.hh,
- * milena/mln/geom/min_col.hh,
- * milena/mln/geom/min_col.hh: Use geom::bbox().
+ * mln/geom/max_col.hh,
+ * mln/geom/max_row.hh,
+ * mln/geom/min_col.hh,
+ * mln/geom/min_col.hh: Use geom::bbox().
2008-10-14 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
@@ -544,6 +680,82 @@
* tests/timer.hh: New. Tool to bench tests.
+2008-10-07 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix most of the doxygen warnings.
+ * mln/arith/min.hh,
+ * mln/arith/plus.hh,
+ * mln/core/concept/doc/point_iterator.hh,
+ * mln/core/concept/point_site.hh,
+ * mln/core/dpsites_piter.hh,
+ * mln/core/faces_psite.hh,
+ * mln/core/image/bgraph_image.hh,
+ * mln/core/image/bgraph_psite.hh,
+ * mln/core/image/complex_higher_neighborhood.hh,
+ * mln/core/image/complex_higher_window_p.hh,
+ * mln/core/image/complex_image.hh,
+ * mln/core/image/complex_lower_higher_neighborhood.hh,
+ * mln/core/image/complex_lower_higher_window_p.hh,
+ * mln/core/image/complex_lower_neighborhood.hh,
+ * mln/core/image/complex_lower_window_p.hh,
+ * mln/core/image/decorated_image.hh,
+ * mln/core/image/graph_image.hh,
+ * mln/core/image/graph_psite.hh,
+ * mln/core/image/line_graph_image.hh,
+ * mln/core/image/line_graph_psite.hh,
+ * mln/core/image/obased_rle_image.hh,
+ * mln/core/image/value_enc_image.hh,
+ * mln/core/routine/clone.hh,
+ * mln/core/site_set/attic/p_complex_faces_piter.hh,
+ * mln/core/site_set/attic/p_faces_piter.hh,
+ * mln/core/site_set/complex_psite.hh,
+ * mln/core/site_set/p_bgraph.hh,
+ * mln/core/site_set/p_bgraph_piter.hh,
+ * mln/core/site_set/p_complex.hh,
+ * mln/core/site_set/p_faces.hh,
+ * mln/core/site_set/p_graph.hh,
+ * mln/core/site_set/p_line_graph.hh,
+ * mln/core/window.hh,
+ * mln/display/color_pretty.hh,
+ * mln/fun/c.hh,
+ * mln/fun/x2x/geom/composed.hh,
+ * mln/fun/x2x/geom/rotation.hh,
+ * mln/fun/x2x/geom/translation.hh,
+ * mln/geom/resize.hh,
+ * mln/geom/seeds2tiling.hh,
+ * mln/geom/seeds2tiling_roundness.hh,
+ * mln/level/fill_with_image.hh,
+ * mln/level/fill_with_value.hh,
+ * mln/level/paste.hh,
+ * mln/linear/sobel.hh,
+ * mln/neighb/image.hh,
+ * mln/pw/image.hh,
+ * mln/topo/attic/faces_iter.hh,
+ * mln/topo/complex.hh,
+ * mln/topo/complex_iterators.hh,
+ * mln/topo/internal/complex_relative_iterator_base.hh,
+ * mln/topo/internal/complex_relative_iterator_sequence.hh,
+ * mln/topo/internal/complex_set_iterator_base.hh,
+ * mln/topo/n_faces_set.hh,
+ * mln/util/branch_iter.hh,
+ * mln/util/branch_iter_ind.hh,
+ * mln/util/greater_point.hh,
+ * mln/util/greater_psite.hh,
+ * mln/util/internal/boost_graph.hh,
+ * mln/util/internal/graph_edge.hh,
+ * mln/util/internal/graph_edge_impl.hh,
+ * mln/util/internal/graph_edge_psite.hh,
+ * mln/util/internal/graph_vertex_impl.hh,
+ * mln/win/cuboid3d.hh,
+ * mln/win/multiple.hh,
+ * tests/core/site_set/p_vertices.cc,
+ * tests/extension/fill.cc,
+ * tests/morpho/complex_image_morpho.cc:
+ Cleanup up doxygen comments.
+
+ * doc/Doxyfile.in:
+ Add new predefined macros.
+
2008-10-07 Nicolas Ballas <ballas(a)lrde.epita.fr>
Add documentation about the image properties.
@@ -840,8 +1052,28 @@
2008-10-03 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Various small fixes.
+ * mln/algebra/vec.hh: add missing header.
+
+ * mln/core/image/obased_rle_image.hh,
+ * mln/core/image/rle_image.hh: Use pruns.
+
+ * mln/core/image/obased_rle_image.hh,
+ * mln/core/image/t_image.hh: add missing init_ function.
+
+ * mln/core/image/tr_image.hh,
+ * tests/core/alias/point1d.cc,
+ * tests/core/alias/point2d.cc: cleanup.
+
+ * tests/core/image/Makefile.am: Disable known broken test
+ such as graph related tests.
+
+ * tests/core/image/tr_image.cc: make it compile.
+
+2008-10-03 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Update tutorial..
- * milena/doc/tutorial/tutorial.tex:
+ * doc/tutorial/tutorial.tex:
- Add a new section about sites
- Add new subsections about image domain and values.
- Talk about operator '/' used to create sub images.
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index 6dc40af..00cf46e 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -6,6 +6,14 @@
* classif/plotscript: Basic plotting script.
* classif/chiche.pgm: Revamp chiche.
+2008-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Use labeling::compute for Scribo.
+ * scribo/remove_tables.hh: split in...
+ * scribo/demat.hh,
+ * scribo/main.cc: ...these two files.
+ Update the code in order to use labeling::compute.
+
2008-10-14 Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
INIM Bootstrap Classification.
@@ -28,6 +36,12 @@
* classif/lena.ppm: New.
* classif/scoolNBR.ppm: New.
+2008-10-13 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * scribo/remove_tables.cc:
+ New small example to remove table borders in a document such as a
+ bill.
+
2008-10-13 Alexandre Abraham <abraham(a)lrde.epita.fr>
Add different types of function and tests.
--
1.6.0.1
1
0
* mln/core/image/complex_lower_window_p.hh,
* mln/core/image/complex_higher_window_p.hh,
* mln/core/image/complex_lower_higher_window_p.hh:
Factor using mln::internal::complex_window_p_base.
---
milena/ChangeLog | 9 ++
milena/mln/core/image/complex_higher_window_p.hh | 105 +------------------
.../core/image/complex_lower_higher_window_p.hh | 105 +------------------
milena/mln/core/image/complex_lower_window_p.hh | 105 +------------------
4 files changed, 27 insertions(+), 297 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index ae50733..cc3b10a 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,14 @@
2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Factor concrete windows of complex image.
+
+ * mln/core/image/complex_lower_window_p.hh,
+ * mln/core/image/complex_higher_window_p.hh,
+ * mln/core/image/complex_lower_higher_window_p.hh:
+ Factor using mln::internal::complex_window_p_base.
+
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Add a factored implementation of window of complex image.
* mln/core/internal/complex_window_p_base.hh: New.
diff --git a/milena/mln/core/image/complex_higher_window_p.hh b/milena/mln/core/image/complex_higher_window_p.hh
index b043ce9..cca6871 100644
--- a/milena/mln/core/image/complex_higher_window_p.hh
+++ b/milena/mln/core/image/complex_higher_window_p.hh
@@ -32,115 +32,22 @@
/// \brief Definition of a window centered on a n-face of complex
/// returning its adjacent (n+1)-faces as well as the center n-face.
-# include <mln/core/concept/window.hh>
-
-# include <mln/core/site_set/complex_psite.hh>
-
-# include <mln/topo/centered_iter_adapter.hh>
+# include <mln/core/internal/complex_window_p_base.hh>
# include <mln/topo/adj_higher_face_iter.hh>
namespace mln
{
- // Forward declarations.
- template <unsigned D, typename G> class complex_higher_window_p;
- template <typename I, typename G, typename W> class complex_window_fwd_piter;
- template <typename I, typename G, typename W> class complex_window_bkd_piter;
-
-
- namespace trait
- {
-
- template <unsigned D, typename G>
- struct window_< mln::complex_higher_window_p<D,G> >
- {
- typedef trait::window::size::unknown size;
- typedef trait::window::support::irregular support;
- typedef trait::window::definition::varying definition;
- };
-
- } // end of namespace mln::trait
-
- /// \brief Window centered on a n-face of complex returning its
- /// adjacent (n+1)-faces as well as the center n-face.
template <unsigned D, typename G>
- class complex_higher_window_p
- : public Window< complex_higher_window_p<D, G> >
+ struct complex_higher_window_p
+ : internal::complex_window_p_base< D, G,
+ topo::adj_higher_face_fwd_iter<D>,
+ topo::adj_higher_face_bkd_iter<D>,
+ complex_higher_window_p<D, G> >
{
- typedef complex_higher_window_p<D, G> self_;
- /// The complex iterators on the <em>adjacent</em> faces only
- /// (without the center point).
- /// \{
- typedef topo::adj_higher_face_fwd_iter<D> adj_fwd_iter_;
- typedef topo::adj_higher_face_bkd_iter<D> adj_bkd_iter_;
- /// \}
-
- public:
- /// The associated complex iterators.
- /// \{
- typedef topo::centered_fwd_iter_adapter<D, adj_fwd_iter_> complex_fwd_iter;
- typedef topo::centered_bkd_iter_adapter<D, adj_bkd_iter_> complex_bkd_iter;
- /// \}
-
- public:
- /// Associated types.
- /// \{
- /// The type of psite corresponding to the window.
- typedef complex_psite<D, G> psite;
- /// The type of site corresponding to the window.
- typedef mln_site(psite) site;
-
- // FIXME: This is a dummy value.
- typedef void dpsite;
-
- /// \brief Site_Iterator type to browse the psites of the window
- /// w.r.t. the ordering of vertices.
- typedef
- complex_window_fwd_piter<complex_fwd_iter, G, self_> fwd_qiter;
-
- /// \brief Site_Iterator type to browse the psites of the window
- /// w.r.t. the reverse ordering of vertices.
- typedef
- complex_window_bkd_piter<complex_bkd_iter, G, self_> bkd_qiter;
-
- /// The default qiter type.
- typedef fwd_qiter qiter;
- /// \}
-
- public:
- /// Services.
- /// \{
- /* FIXME: mln::morpho::dilation requires these method from models
- of concept Window, but Window does not list them in its
- requirements. Who's guilty: morpho::dilation or Window? */
- /// Is this window empty? (Always returns \c false).
- bool is_empty() const;
- /// Is this window centered? (Always returns \c true).
- bool is_centered() const;
- /// \}
};
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <unsigned D, typename G>
- bool
- complex_higher_window_p<D, G>::is_empty() const
- {
- return false;
- }
-
- template <unsigned D, typename G>
- bool
- complex_higher_window_p<D, G>::is_centered() const
- {
- return true;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
} // end of namespace mln
#endif // ! MLN_CORE_IMAGE_COMPLEX_HIGHER_WINDOW_P_HH
diff --git a/milena/mln/core/image/complex_lower_higher_window_p.hh b/milena/mln/core/image/complex_lower_higher_window_p.hh
index f44a7c7..7ad62fa 100644
--- a/milena/mln/core/image/complex_lower_higher_window_p.hh
+++ b/milena/mln/core/image/complex_lower_higher_window_p.hh
@@ -33,115 +33,22 @@
/// returning its adjacent (n-1)-faces and (n+1)-faces as well as the
/// center n-face.
-# include <mln/core/concept/window.hh>
-
-# include <mln/core/site_set/complex_psite.hh>
-
-# include <mln/topo/centered_iter_adapter.hh>
+# include <mln/core/internal/complex_window_p_base.hh>
# include <mln/topo/adj_lower_higher_face_iter.hh>
namespace mln
{
- // Forward declarations.
- template <unsigned D, typename G> class complex_lower_higher_window_p;
- template <typename I, typename G, typename W> class complex_window_fwd_piter;
- template <typename I, typename G, typename W> class complex_window_bkd_piter;
-
-
- namespace trait
- {
-
- template <unsigned D, typename G>
- struct window_< mln::complex_lower_higher_window_p<D,G> >
- {
- typedef trait::window::size::unknown size;
- typedef trait::window::support::irregular support;
- typedef trait::window::definition::varying definition;
- };
-
- } // end of namespace mln::trait
-
- /// \brief Window centered on a n-face of complex returning its
- /// adjacent (n-1)-faces as well as the center n-face.
template <unsigned D, typename G>
- class complex_lower_higher_window_p
- : public Window< complex_lower_higher_window_p<D, G> >
+ struct complex_lower_higher_window_p
+ : internal::complex_window_p_base< D, G,
+ topo::adj_lower_higher_face_fwd_iter<D>,
+ topo::adj_lower_higher_face_bkd_iter<D>,
+ complex_lower_higher_window_p<D, G> >
{
- typedef complex_lower_higher_window_p<D, G> self_;
- /// The complex iterators on the <em>adjacent</em> faces only
- /// (without the center point).
- /// \{
- typedef topo::adj_lower_higher_face_fwd_iter<D> adj_fwd_iter_;
- typedef topo::adj_lower_higher_face_bkd_iter<D> adj_bkd_iter_;
- /// \}
-
- public:
- /// The associated complex iterators.
- /// \{
- typedef topo::centered_fwd_iter_adapter<D, adj_fwd_iter_> complex_fwd_iter;
- typedef topo::centered_bkd_iter_adapter<D, adj_bkd_iter_> complex_bkd_iter;
- /// \}
-
- public:
- /// Associated types.
- /// \{
- /// The type of psite corresponding to the window.
- typedef complex_psite<D, G> psite;
- /// The type of site corresponding to the window.
- typedef mln_site(psite) site;
-
- // FIXME: This is a dummy value.
- typedef void dpsite;
-
- /// \brief Site_Iterator type to browse the psites of the window
- /// w.r.t. the ordering of vertices.
- typedef
- complex_window_fwd_piter<complex_fwd_iter, G, self_> fwd_qiter;
-
- /// \brief Site_Iterator type to browse the psites of the window
- /// w.r.t. the reverse ordering of vertices.
- typedef
- complex_window_bkd_piter<complex_bkd_iter, G, self_> bkd_qiter;
-
- /// The default qiter type.
- typedef fwd_qiter qiter;
- /// \}
-
- public:
- /// Services.
- /// \{
- /* FIXME: mln::morpho::dilation requires these method from models
- of concept Window, but Window does not list them in its
- requirements. Who's guilty: morpho::dilation or Window? */
- /// Is this window empty? (Always returns \c false).
- bool is_empty() const;
- /// Is this window centered? (Always returns \c true).
- bool is_centered() const;
- /// \}
};
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <unsigned D, typename G>
- bool
- complex_lower_higher_window_p<D, G>::is_empty() const
- {
- return false;
- }
-
- template <unsigned D, typename G>
- bool
- complex_lower_higher_window_p<D, G>::is_centered() const
- {
- return true;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
} // end of namespace mln
#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_WINDOW_P_HH
diff --git a/milena/mln/core/image/complex_lower_window_p.hh b/milena/mln/core/image/complex_lower_window_p.hh
index 1a50d8f..7bd3cd1 100644
--- a/milena/mln/core/image/complex_lower_window_p.hh
+++ b/milena/mln/core/image/complex_lower_window_p.hh
@@ -32,115 +32,22 @@
/// \brief Definition of a window centered on a n-face of complex
/// returning its adjacent (n-1)-faces as well as the center n-face.
-# include <mln/core/concept/window.hh>
-
-# include <mln/core/site_set/complex_psite.hh>
-
-# include <mln/topo/centered_iter_adapter.hh>
+# include <mln/core/internal/complex_window_p_base.hh>
# include <mln/topo/adj_lower_face_iter.hh>
namespace mln
{
- // Forward declarations.
- template <unsigned D, typename G> class complex_lower_window_p;
- template <typename I, typename G, typename W> class complex_window_fwd_piter;
- template <typename I, typename G, typename W> class complex_window_bkd_piter;
-
-
- namespace trait
- {
-
- template <unsigned D, typename G>
- struct window_< mln::complex_lower_window_p<D,G> >
- {
- typedef trait::window::size::unknown size;
- typedef trait::window::support::irregular support;
- typedef trait::window::definition::varying definition;
- };
-
- } // end of namespace mln::trait
-
- /// \brief Window centered on a n-face of complex returning its
- /// adjacent (n-1)-faces as well as the center n-face.
template <unsigned D, typename G>
- class complex_lower_window_p
- : public Window< complex_lower_window_p<D, G> >
+ struct complex_lower_window_p
+ : internal::complex_window_p_base< D, G,
+ topo::adj_lower_face_fwd_iter<D>,
+ topo::adj_lower_face_bkd_iter<D>,
+ complex_lower_window_p<D, G> >
{
- typedef complex_lower_window_p<D, G> self_;
- /// The complex iterators on the <em>adjacent</em> faces only
- /// (without the center point).
- /// \{
- typedef topo::adj_lower_face_fwd_iter<D> adj_fwd_iter_;
- typedef topo::adj_lower_face_bkd_iter<D> adj_bkd_iter_;
- /// \}
-
- public:
- /// The associated complex iterators.
- /// \{
- typedef topo::centered_fwd_iter_adapter<D, adj_fwd_iter_> complex_fwd_iter;
- typedef topo::centered_bkd_iter_adapter<D, adj_bkd_iter_> complex_bkd_iter;
- /// \}
-
- public:
- /// Associated types.
- /// \{
- /// The type of psite corresponding to the window.
- typedef complex_psite<D, G> psite;
- /// The type of site corresponding to the window.
- typedef mln_site(psite) site;
-
- // FIXME: This is a dummy value.
- typedef void dpsite;
-
- /// \brief Site_Iterator type to browse the psites of the window
- /// w.r.t. the ordering of vertices.
- typedef
- complex_window_fwd_piter<complex_fwd_iter, G, self_> fwd_qiter;
-
- /// \brief Site_Iterator type to browse the psites of the window
- /// w.r.t. the reverse ordering of vertices.
- typedef
- complex_window_bkd_piter<complex_bkd_iter, G, self_> bkd_qiter;
-
- /// The default qiter type.
- typedef fwd_qiter qiter;
- /// \}
-
- public:
- /// Services.
- /// \{
- /* FIXME: mln::morpho::dilation requires these method from models
- of concept Window, but Window does not list them in its
- requirements. Who's guilty: morpho::dilation or Window? */
- /// Is this window empty? (Always returns \c false).
- bool is_empty() const;
- /// Is this window centered? (Always returns \c true).
- bool is_centered() const;
- /// \}
};
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <unsigned D, typename G>
- bool
- complex_lower_window_p<D, G>::is_empty() const
- {
- return false;
- }
-
- template <unsigned D, typename G>
- bool
- complex_lower_window_p<D, G>::is_centered() const
- {
- return true;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
} // end of namespace mln
#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_WINDOW_P_HH
--
1.6.0.1
1
0
17 Oct '08
* mln/core/internal/complex_window_p_base.hh: New.
---
milena/ChangeLog | 6 +
milena/mln/core/internal/complex_window_p_base.hh | 166 +++++++++++++++++++++
2 files changed, 172 insertions(+), 0 deletions(-)
create mode 100644 milena/mln/core/internal/complex_window_p_base.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1a4fe48..ae50733 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Add a factored implementation of window of complex image.
+
+ * mln/core/internal/complex_window_p_base.hh: New.
+
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Factor concrete neighborhoods of complex image.
* mln/core/image/complex_lower_neighborhood.hh,
diff --git a/milena/mln/core/internal/complex_window_p_base.hh b/milena/mln/core/internal/complex_window_p_base.hh
new file mode 100644
index 0000000..a50d594
--- /dev/null
+++ b/milena/mln/core/internal/complex_window_p_base.hh
@@ -0,0 +1,166 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_CORE_IMAGE_COMPLEX_WINDOW_P_BASE_HH
+# define MLN_CORE_IMAGE_COMPLEX_WINDOW_P_BASE_HH
+
+/// \file mln/core/image/complex_window_p_base.hh
+/// \brief Definition of a generic window centered on the face
+/// of a complex, based on a pair of (forward and backward) complex
+/// iterators. The center (site) is part of the window.
+
+# include <mln/core/concept/window.hh>
+# include <mln/core/site_set/complex_psite.hh>
+
+# include <mln/topo/adj_lower_face_iter.hh>
+
+// FIXME: Factor with mln::internal::complex_neighborhood_base.
+
+
+namespace mln
+{
+ // Forward declarations.
+ template <typename I, typename G, typename W>
+ class complex_window_fwd_piter;
+ template <typename I, typename G, typename W>
+ class complex_window_bkd_piter;
+
+ namespace internal
+ {
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ class complex_window_p_base;
+ }
+
+
+ namespace trait
+ {
+
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ struct window_< mln::internal::complex_window_p_base<D, G, F, B, E> >
+ {
+ typedef trait::window::size::unknown size;
+ typedef trait::window::support::irregular support;
+ typedef trait::window::definition::varying definition;
+ };
+
+ } // end of namespace mln::trait
+
+
+ namespace internal
+ {
+ /** \brief Generic window centered on the face of a complex, based
+ on an pair of (forward and backward) complex iterators. The
+ center (site) is part of the window.
+
+ \tparam D The dimension of the complex.
+ \tparam G The geometry functor of the complex.
+ \tparam F The underlying forward iterator.
+ \tparam B The underlying backward iterator.
+ \tparam E The exact type. */
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ class complex_window_p_base : public Window<E>
+ {
+ /// The complex iterators <em>on the adjacent faces only</em>
+ /// (without the center point).
+ /// \{
+ typedef F adj_only_fwd_iter_;
+ typedef B adj_only_bkd_iter_;
+ /// \}
+
+ public:
+ /// The associated complex iterators.
+ /// \{
+ typedef topo::centered_fwd_iter_adapter<D, adj_only_fwd_iter_>
+ complex_fwd_iter;
+
+ typedef topo::centered_bkd_iter_adapter<D, adj_only_bkd_iter_>
+ complex_bkd_iter;
+ /// \}
+
+ public:
+ /// Associated types.
+ /// \{
+ /// The type of psite corresponding to the window.
+ typedef complex_psite<D, G> psite;
+ /// The type of site corresponding to the window.
+ typedef mln_site(psite) site;
+
+ // FIXME: This is a dummy value.
+ typedef void dpsite;
+
+ /// \brief Site_Iterator type to browse the psites of the window
+ /// w.r.t. the ordering of vertices.
+ typedef
+ complex_window_fwd_piter<complex_fwd_iter, G, E> fwd_qiter;
+
+ /// \brief Site_Iterator type to browse the psites of the window
+ /// w.r.t. the reverse ordering of vertices.
+ typedef
+ complex_window_bkd_piter<complex_bkd_iter, G, E> bkd_qiter;
+
+ /// The default qiter type.
+ typedef fwd_qiter qiter;
+ /// \}
+
+ public:
+ /// Services.
+ /// \{
+ /* FIXME: mln::morpho::dilation requires these method from models
+ of concept Window, but Window does not list them in its
+ requirements. Who's guilty: morpho::dilation or Window? */
+ /// Is this window empty? (Always returns \c false).
+ bool is_empty() const;
+ /// Is this window centered? (Always returns \c true).
+ bool is_centered() const;
+ /// \}
+ };
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ bool
+ complex_window_p_base<D, G, F, B, E>::is_empty() const
+ {
+ return false;
+ }
+
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ bool
+ complex_window_p_base<D, G, F, B, E>::is_centered() const
+ {
+ return true;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::internal
+
+} // end of namespace mln
+
+#endif // ! MLN_CORE_IMAGE_COMPLEX_WINDOW_P_BASE_HH
--
1.6.0.1
1
0
* mln/core/image/complex_lower_neighborhood.hh,
* mln/core/image/complex_higher_neighborhood.hh,
* mln/core/image/complex_lower_higher_neighborhood.hh:
Factor using mln::internal::complex_neighborhood_base.
---
milena/ChangeLog | 9 ++
.../mln/core/image/complex_higher_neighborhood.hh | 78 ++-----------------
.../image/complex_lower_higher_neighborhood.hh | 82 ++------------------
.../mln/core/image/complex_lower_neighborhood.hh | 78 ++-----------------
4 files changed, 29 insertions(+), 218 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 774c861..1a4fe48 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,14 @@
2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Factor concrete neighborhoods of complex image.
+
+ * mln/core/image/complex_lower_neighborhood.hh,
+ * mln/core/image/complex_higher_neighborhood.hh,
+ * mln/core/image/complex_lower_higher_neighborhood.hh:
+ Factor using mln::internal::complex_neighborhood_base.
+
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Add a factored implementation of neighborhood of complex image.
* mln/core/internal/complex_neighborhood_base.hh: New.
diff --git a/milena/mln/core/image/complex_higher_neighborhood.hh b/milena/mln/core/image/complex_higher_neighborhood.hh
index 4dce482..d68051a 100644
--- a/milena/mln/core/image/complex_higher_neighborhood.hh
+++ b/milena/mln/core/image/complex_higher_neighborhood.hh
@@ -32,88 +32,22 @@
/// \brief A neighborhood centered on a n-face of complex returning its
/// adjacent (n+1)-faces.
-# include <mln/core/concept/neighborhood.hh>
-
-# include <mln/core/site_set/complex_psite.hh>
-
+# include <mln/core/internal/complex_neighborhood_base.hh>
# include <mln/topo/adj_higher_face_iter.hh>
-// FIXME: Factor with complex_lower_neighborhood.
-
namespace mln
{
- // Forward declarations.
- template <typename I, typename G, typename N>
- class complex_neighborhood_fwd_piter;
- template <typename I, typename G, typename N>
- class complex_neighborhood_bkd_piter;
-
- /// \brief Neighborhood centered on a n-face of complex returning its
- /// adjacent (n-1)-faces.
template <unsigned D, typename G>
- class complex_higher_neighborhood
- : public Neighborhood< complex_higher_neighborhood<D, G> >
+ struct complex_higher_neighborhood
+ : internal::complex_neighborhood_base< D, G,
+ topo::adj_higher_face_fwd_iter<D>,
+ topo::adj_higher_face_bkd_iter<D>,
+ complex_higher_neighborhood<D, G> >
{
- typedef complex_higher_neighborhood<D, G> self_;
-
- public:
- /// The associated complex iterators.
- /// \{
- typedef topo::adj_higher_face_fwd_iter<D> complex_fwd_iter;
- typedef topo::adj_higher_face_bkd_iter<D> complex_bkd_iter;
- /// \}
-
- public:
- /// Associated types.
- /// \{
- /// The type of psite corresponding to the neighborhood.
- typedef complex_psite<D, G> psite;
- /// The type of site corresponding to the neighborhood.
- typedef mln_site(psite) site;
-
- /// \brief Site_Iterator type to browse the psites of the neighborhood
- /// w.r.t. the ordering of vertices.
- typedef
- complex_neighborhood_fwd_piter<complex_fwd_iter, G, self_> fwd_niter;
-
- /// \brief Site_Iterator type to browse the psites of the neighborhood
- /// w.r.t. the reverse ordering of vertices.
- typedef
- complex_neighborhood_bkd_piter<complex_bkd_iter, G, self_> bkd_niter;
-
- /// The default niter type.
- typedef fwd_niter niter;
- /// \}
-
- /// Conversions.
- /// \{
- /// The window type corresponding to this neighborhood.
- // FIXME: Dummy.
- typedef self_ window;
- /// Create a window corresponding to this neighborhood.
- const window& win() const;
- /// \}
};
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- // FIXME: Dummy.
- template <unsigned D, typename G>
- inline
- // FIXME: Change (dummy) type.
- const typename complex_higher_neighborhood<D, G>::window&
- complex_higher_neighborhood<D, G>::win() const
- {
- // FIXME: Dummy.
- return *this;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
} // end of namespace mln
#endif // ! MLN_CORE_IMAGE_COMPLEX_HIGHER_NEIGHBORHOOD_HH
diff --git a/milena/mln/core/image/complex_lower_higher_neighborhood.hh b/milena/mln/core/image/complex_lower_higher_neighborhood.hh
index 459913a..593982d 100644
--- a/milena/mln/core/image/complex_lower_higher_neighborhood.hh
+++ b/milena/mln/core/image/complex_lower_higher_neighborhood.hh
@@ -32,90 +32,24 @@
/// \brief A neighborhood centered on a n-face of complex returning its
/// adjacent (n-1)-faces and (n+1)-faces.
-# include <mln/core/concept/neighborhood.hh>
-
-# include <mln/core/site_set/complex_psite.hh>
-
+# include <mln/core/internal/complex_neighborhood_base.hh>
# include <mln/topo/adj_lower_higher_face_iter.hh>
-/* FIXME: Factor with complex_lower_neighborhood and
- complex_higher_neighborhood (e.g., using an
- internal::complex_neighborhood_base common base class). */
-
namespace mln
{
- // Forward declarations.
- template <typename I, typename G, typename N>
- class complex_neighborhood_fwd_piter;
- template <typename I, typename G, typename N>
- class complex_neighborhood_bkd_piter;
-
- /// \brief Neighborhood centered on a n-face of complex returning its
- /// adjacent (n-1)-faces.
template <unsigned D, typename G>
- class complex_lower_higher_neighborhood
- : public Neighborhood< complex_lower_higher_neighborhood<D, G> >
+ struct complex_lower_higher_neighborhood
+ : internal::complex_neighborhood_base<
+ D, G,
+ topo::adj_lower_higher_face_fwd_iter<D>,
+ topo::adj_lower_higher_face_bkd_iter<D>,
+ complex_lower_higher_neighborhood<D, G>
+ >
{
- typedef complex_lower_higher_neighborhood<D, G> self_;
-
- public:
- /// The associated complex iterators.
- /// \{
- typedef topo::adj_lower_higher_face_fwd_iter<D> complex_fwd_iter;
- typedef topo::adj_lower_higher_face_bkd_iter<D> complex_bkd_iter;
- /// \}
-
- public:
- /// Associated types.
- /// \{
- /// The type of psite corresponding to the neighborhood.
- typedef complex_psite<D, G> psite;
- /// The type of site corresponding to the neighborhood.
- typedef mln_site(psite) site;
-
- /// \brief Site_Iterator type to browse the psites of the neighborhood
- /// w.r.t. the ordering of vertices.
- typedef
- complex_neighborhood_fwd_piter<complex_fwd_iter, G, self_> fwd_niter;
-
- /// \brief Site_Iterator type to browse the psites of the neighborhood
- /// w.r.t. the reverse ordering of vertices.
- typedef
- complex_neighborhood_bkd_piter<complex_bkd_iter, G, self_> bkd_niter;
-
- /// The default niter type.
- typedef fwd_niter niter;
- /// \}
-
- /// Conversions.
- /// \{
- /// The window type corresponding to this neighborhood.
- // FIXME: Dummy.
- typedef self_ window;
- /// Create a window corresponding to this neighborhood.
- const window& win() const;
- /// \}
};
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- // FIXME: Dummy.
- template <unsigned D, typename G>
- inline
- // FIXME: Change (dummy) type.
- const typename complex_lower_higher_neighborhood<D, G>::window&
- complex_lower_higher_neighborhood<D, G>::win() const
- {
- // FIXME: Dummy.
- return *this;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
} // end of namespace mln
#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_HIGHER_NEIGHBORHOOD_HH
diff --git a/milena/mln/core/image/complex_lower_neighborhood.hh b/milena/mln/core/image/complex_lower_neighborhood.hh
index a93298b..c7fc882 100644
--- a/milena/mln/core/image/complex_lower_neighborhood.hh
+++ b/milena/mln/core/image/complex_lower_neighborhood.hh
@@ -32,88 +32,22 @@
/// \brief A neighborhood centered on a n-face of complex returning its
/// adjacent (n-1)-faces.
-# include <mln/core/concept/neighborhood.hh>
-
-# include <mln/core/site_set/complex_psite.hh>
-
+# include <mln/core/internal/complex_neighborhood_base.hh>
# include <mln/topo/adj_lower_face_iter.hh>
-// FIXME: Factor with complex_higher_neighborhood.
-
namespace mln
{
- // Forward declarations.
- template <typename I, typename G, typename N>
- class complex_neighborhood_fwd_piter;
- template <typename I, typename G, typename N>
- class complex_neighborhood_bkd_piter;
-
- /// \brief Neighborhood centered on a n-face of complex returning its
- /// adjacent (n-1)-faces.
template <unsigned D, typename G>
- class complex_lower_neighborhood
- : public Neighborhood< complex_lower_neighborhood<D, G> >
+ struct complex_lower_neighborhood
+ : internal::complex_neighborhood_base< D, G,
+ topo::adj_lower_face_fwd_iter<D>,
+ topo::adj_lower_face_bkd_iter<D>,
+ complex_lower_neighborhood<D, G> >
{
- typedef complex_lower_neighborhood<D, G> self_;
-
- public:
- /// The associated complex iterators.
- /// \{
- typedef topo::adj_lower_face_fwd_iter<D> complex_fwd_iter;
- typedef topo::adj_lower_face_bkd_iter<D> complex_bkd_iter;
- /// \}
-
- public:
- /// Associated types.
- /// \{
- /// The type of psite corresponding to the neighborhood.
- typedef complex_psite<D, G> psite;
- /// The type of site corresponding to the neighborhood.
- typedef mln_site(psite) site;
-
- /// \brief Site_Iterator type to browse the psites of the neighborhood
- /// w.r.t. the ordering of vertices.
- typedef
- complex_neighborhood_fwd_piter<complex_fwd_iter, G, self_> fwd_niter;
-
- /// \brief Site_Iterator type to browse the psites of the neighborhood
- /// w.r.t. the reverse ordering of vertices.
- typedef
- complex_neighborhood_bkd_piter<complex_bkd_iter, G, self_> bkd_niter;
-
- /// The default niter type.
- typedef fwd_niter niter;
- /// \}
-
- /// Conversions.
- /// \{
- /// The window type corresponding to this neighborhood.
- // FIXME: Dummy.
- typedef self_ window;
- /// Create a window corresponding to this neighborhood.
- const window& win() const;
- /// \}
};
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- // FIXME: Dummy.
- template <unsigned D, typename G>
- inline
- // FIXME: Change (dummy) type.
- const typename complex_lower_neighborhood<D, G>::window&
- complex_lower_neighborhood<D, G>::win() const
- {
- // FIXME: Dummy.
- return *this;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
} // end of namespace mln
#endif // ! MLN_CORE_IMAGE_COMPLEX_LOWER_NEIGHBORHOOD_HH
--
1.6.0.1
1
0
2589: Add a factored implementation of neighborhood of complex image.
by Roland Levillain 17 Oct '08
by Roland Levillain 17 Oct '08
17 Oct '08
* mln/core/internal/complex_neighborhood_base.hh: New.
---
milena/ChangeLog | 6 +
.../mln/core/internal/complex_neighborhood_base.hh | 130 ++++++++++++++++++++
2 files changed, 136 insertions(+), 0 deletions(-)
create mode 100644 milena/mln/core/internal/complex_neighborhood_base.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index d8b0307..774c861 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-17 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Add a factored implementation of neighborhood of complex image.
+
+ * mln/core/internal/complex_neighborhood_base.hh: New.
+
2008-10-16 Roland Levillain <roland(a)lrde.epita.fr>
Exercise mln::io::load on OFF file (with no color data).
diff --git a/milena/mln/core/internal/complex_neighborhood_base.hh b/milena/mln/core/internal/complex_neighborhood_base.hh
new file mode 100644
index 0000000..9ecf09f
--- /dev/null
+++ b/milena/mln/core/internal/complex_neighborhood_base.hh
@@ -0,0 +1,130 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_CORE_IMAGE_INTERNAL_COMPLEX_NEIGHBORHOOD_BASE_HH
+# define MLN_CORE_IMAGE_INTERNAL_COMPLEX_NEIGHBORHOOD_BASE_HH
+
+/// \file mln/core/internal/complex_neighborhood_base.hh
+/// \brief Definition of a generic neighborhood centered on the face
+/// of a complex, based on a pair of (forward and backward) complex
+/// iterators.
+
+# include <mln/core/concept/neighborhood.hh>
+# include <mln/core/site_set/complex_psite.hh>
+
+// FIXME: Factor with mln::internal::complex_window_base.
+
+
+namespace mln
+{
+ // Forward declarations.
+ template <typename I, typename G, typename N>
+ class complex_neighborhood_fwd_piter;
+ template <typename I, typename G, typename N>
+ class complex_neighborhood_bkd_piter;
+
+ namespace internal
+ {
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ class complex_neighborhood_base;
+ }
+
+
+ namespace internal
+ {
+ /** \brief Generic neighborhood centered on the face of a complex,
+ based on an pair of (forward and backward) complex iterators.
+
+ \tparam D The dimension of the complex.
+ \tparam G The geometry functor of the complex.
+ \tparam F The underlying forward iterator.
+ \tparam B The underlying backward iterator.
+ \tparam E The exact type. */
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ class complex_neighborhood_base : public Neighborhood<E>
+ {
+ public:
+ /// The associated complex iterators.
+ /// \{
+ typedef F complex_fwd_iter;
+ typedef B complex_bkd_iter;
+ /// \}
+
+ public:
+ /// Associated types.
+ /// \{
+ /// The type of psite corresponding to the neighborhood.
+ typedef complex_psite<D, G> psite;
+ /// The type of site corresponding to the neighborhood.
+ typedef mln_site(psite) site;
+
+ /// \brief Site_Iterator type to browse the psites of the neighborhood
+ /// w.r.t. the ordering of vertices.
+ typedef
+ complex_neighborhood_fwd_piter<complex_fwd_iter, G, E> fwd_niter;
+
+ /// \brief Site_Iterator type to browse the psites of the neighborhood
+ /// w.r.t. the reverse ordering of vertices.
+ typedef
+ complex_neighborhood_bkd_piter<complex_bkd_iter, G, E> bkd_niter;
+
+ /// The default niter type.
+ typedef fwd_niter niter;
+ /// \}
+
+ /// Conversions.
+ /// \{
+ /// The window type corresponding to this neighborhood.
+ // FIXME: Dummy.
+ typedef E window;
+ /// Create a window corresponding to this neighborhood.
+ const window& win() const;
+ /// \}
+ };
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ // FIXME: Dummy.
+ template <unsigned D, typename G, typename F, typename B, typename E>
+ inline
+ // FIXME: Change (dummy) type.
+ const typename complex_neighborhood_base<D, G, F, B, E>::window&
+ complex_neighborhood_base<D, G, F, B, E>::win() const
+ {
+ // FIXME: Dummy.
+ return exact(*this);
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::internal
+
+} // end of namespace mln
+
+#endif // ! MLN_CORE_IMAGE_INTERNAL_COMPLEX_NEIGHBORHOOD_BASE_HH
--
1.6.0.1
1
0