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
- 9625 discussions
URL: https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2008-04-12 Maxime van Noppen <yabo(a)lrde.epita.fr>
Fix bug in previous commit
* src/scoolt/Concept.str: Use the actual identifier name rather than "c"
* tests/transformer/concept_use_1.ref,
* tests/transformer/concept_use_2.ref: Update output regarding to the bug.
src/scoolt/Concept.str | 2 +-
tests/transformer/concept_use_1.ref | 2 +-
tests/transformer/concept_use_2.ref | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Index: trunk/tests/transformer/concept_use_1.ref
===================================================================
--- trunk/tests/transformer/concept_use_1.ref (revision 60)
+++ trunk/tests/transformer/concept_use_1.ref (revision 61)
@@ -9,7 +9,7 @@
box();
};
template < class T >
-void foo(const box<T>& c)
+void foo(const box<T>& pbox)
{
}
template < typename E >
Index: trunk/tests/transformer/concept_use_2.ref
===================================================================
--- trunk/tests/transformer/concept_use_2.ref (revision 60)
+++ trunk/tests/transformer/concept_use_2.ref (revision 61)
@@ -9,7 +9,7 @@
box();
};
template < class T >
-void foo(const box<T>& c)
+void foo(const box<T>& pbox)
{
}
template < typename E >
Index: trunk/src/scoolt/Concept.str
===================================================================
--- trunk/src/scoolt/Concept.str (revision 60)
+++ trunk/src/scoolt/Concept.str (revision 61)
@@ -68,7 +68,7 @@
// FIXME: check that what we declared in the where-clause is consistent with the argument (e.g. : [T : type where (E models my-concept)] is not consistent)
WhereClauseToCxx:
- (wclause, arg) -> (CxxConstType(CxxRefType(<ModelToCxx> (<GetWhereClause> wclause, arg))), "c")
+ (wclause, (arg_idf, arg_type)) -> (CxxConstType(CxxRefType(<ModelToCxx> (<GetWhereClause> wclause, (arg_type, arg_idf)))), arg_idf)
ModelToCxx:
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
1
0
URL: https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2008-04-12 Maxime van Noppen <yabo(a)lrde.epita.fr>
Handle concepts in where clauses
* scoolt/Concept.str: Handle the where clause node.
* scoolt/Type.str: Little fix.
* scoolt/Decl.str: Add strategies to compute the actual
* type regarding to the given where-clause.
* scl-syn/Concept.sdf: Add the 'models' keyword
* scl-syn/Decl.sdf: Clean indentation.
* scl-syn/Lexical.sdf: Add the 'model' keyword.
scl-syn/Concept.sdf | 1 +
scl-syn/Decl.sdf | 15 ++++++---------
scl-syn/Lexical.sdf | 2 ++
scoolt/Concept.str | 22 ++++++++++++++++++++++
scoolt/Decl.str | 25 +++++++++++++++++--------
scoolt/Type.str | 8 ++++----
6 files changed, 52 insertions(+), 21 deletions(-)
Index: trunk/src/scoolt/Concept.str
===================================================================
--- trunk/src/scoolt/Concept.str (revision 59)
+++ trunk/src/scoolt/Concept.str (revision 60)
@@ -52,3 +52,25 @@
]
where <concat-strings> [ "m", <int-to-string> <Count> ] => new_idf
+ GetWhereClause_:
+ Some(wclause) -> <GetWhereClause> wclause
+
+ GetWhereClause_:
+ _#([Parenthesis(wclause)]) -> <GetWhereClause> wclause
+
+ GetWhereClause_:
+ _#([wclause]) -> <GetWhereClause> wclause
+ where
+ <not (?Parenthesis(x))> wclause
+
+ GetWhereClause:
+ wclause -> <GetWhereClause_ <+ id> wclause
+
+ // FIXME: check that what we declared in the where-clause is consistent with the argument (e.g. : [T : type where (E models my-concept)] is not consistent)
+ WhereClauseToCxx:
+ (wclause, arg) -> (CxxConstType(CxxRefType(<ModelToCxx> (<GetWhereClause> wclause, arg))), "c")
+
+
+ ModelToCxx:
+ (Model(t, concept), arg) -> CxxType(concept, [t])
+
Index: trunk/src/scoolt/Type.str
===================================================================
--- trunk/src/scoolt/Type.str (revision 59)
+++ trunk/src/scoolt/Type.str (revision 60)
@@ -5,7 +5,7 @@
rules
IsScalar:
- t -> t
+ Var(t) -> t
where
(
<eq> (t, "char")
@@ -24,9 +24,9 @@
// Constify + Referencify a type
TypeToConstRefCxx:
- Var(t) -> CxxConstType(CxxRefType(CxxType(t)))
+ t -> CxxConstType(CxxRefType(<TypeToCxx> t))
where
(
- <is-string> t
- ; <not (IsScalar)> t
+ <not (IsScalar)> t
+ ; <not (?RefType(x))> t
)
Index: trunk/src/scoolt/Decl.str
===================================================================
--- trunk/src/scoolt/Decl.str (revision 59)
+++ trunk/src/scoolt/Decl.str (revision 60)
@@ -198,7 +198,7 @@
Concept(idf, body) -> CxxClassDecl([(Typename, "E")], idf, [],
<conc>
(
- [ CxxComment("To be provided by classes that models this concept\n") ],
+ [ CxxComment("To be provided by classes that model this concept.\n") ],
<map (ConceptBodyToStr)> body,
[ <ConceptAddCxxConstructor> idf ]
))
@@ -211,16 +211,25 @@
ParamToCxx:
- (idf, Var(t), wclause) ->
- <if <eq> (t, "type") then
- ! (CxxType("class"), idf)
- else
- ! (CxxType(t), idf)
- end>
+ (idf1, Var("type"), wclause) -> (CxxType("class"), idf1)
+ where
+ rules(
+ RealTypeToCxx:
+ arg -> <WhereClauseToCxx> (wclause, arg)
+ )
+
+ ParamToCxx:
+ (idf, Var(t), wclause) -> (CxxType(t), idf)
+ where
+ <not(?"test")> t
+ ArgDefToCxx:
+ arg -> <RealTypeToCxx> arg
ArgDefToCxx:
- (idf, t) -> (<TypeToConstRefCxx <+ TypeToCxx> t, idf)
+ (idf, t) -> ((<TypeToConstRefCxx <+ TypeToCxx> t), idf)
+ where
+ <not (RealTypeToCxx)> (idf, t)
//(idf, t) -> (<TypeToCxx; try(CxxTypeToStc(|CxxType(p-idf)))> t, idf)
//where <concat-strings; SclNewIdf> ["T", <Count; int-to-string> 0] => p-idf
Index: trunk/src/scl-syn/Decl.sdf
===================================================================
--- trunk/src/scl-syn/Decl.sdf (revision 59)
+++ trunk/src/scl-syn/Decl.sdf (revision 60)
@@ -23,20 +23,17 @@
Qualifier* Id ":" Constifier? Type ";" -> Decl
{cons("ConstDec")}
- Qualifier* Id ":" "(" {(Id ":" Type) ","}* ")" "->" Type "=>" Stm -> Decl { cons("FunDec") }
+ Qualifier* Id ":" "(" {(Id ":" Type) ","}* ")" "->" Type "=>" Stm
+ -> Decl { cons("FunDec") }
Qualifier* Id ":" "(" {(Id ":" Type) ","}* ")" "->" Type
- "=" "{" Stm* "}" -> Decl
- {cons("FunDec")}
+ "=" "{" Stm* "}" -> Decl {cons("FunDec")}
Qualifier* Id ":" "[" {(Id ":" Type ("where" Exp)?) ","}* "]" "->" Type
- "=" "{" Stm* "}" -> Decl
- {cons("StaticFunDec")}
+ "=" "{" Stm* "}" -> Decl {cons("StaticFunDec")}
Qualifier* Id ":" "[" {(Id ":" Type ("where" Exp)?) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type
- "=" "{" Stm* "}" -> Decl
- {cons("BiFunDec")}
+ "=" "{" Stm* "}" -> Decl {cons("BiFunDec")}
Qualifier* Id ":" "[" {(Id ":" Type ("where" Exp)?) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type
- "=>" Stm -> Decl
- {cons("BiFunDec")}
+ "=>" Stm -> Decl {cons("BiFunDec")}
Index: trunk/src/scl-syn/Concept.sdf
===================================================================
--- trunk/src/scl-syn/Concept.sdf (revision 59)
+++ trunk/src/scl-syn/Concept.sdf (revision 60)
@@ -7,3 +7,4 @@
sorts Concept
context-free syntax
Id ":" "concept" "=" "{" Decl* "}" -> Concept {cons("Concept")}
+ Id "models" Id -> Exp {cons("Model")}
Index: trunk/src/scl-syn/Lexical.sdf
===================================================================
--- trunk/src/scl-syn/Lexical.sdf (revision 59)
+++ trunk/src/scl-syn/Lexical.sdf (revision 60)
@@ -33,6 +33,8 @@
"decl" -> Qualifier
"abstract" -> Qualifier
+ "models" -> TypeQualifier
+
"const" -> Constifier
lexical restrictions
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
1
0
URL: https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2008-04-12 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add tests on concept usages
* input/concept_use_1.scl: New.
* input/concept_use_2.scl: New.
* parser/concept_use_1.ref: New.
* parser/concept_use_2.ref: New.
* transformer/concept_1.ref,
* transformer/concept_2.ref,
* transformer/concept_3.ref,
* transformer/concept_4.ref: Minor changes in layout.
* transformer/concept_use_1.ref: New.
* transformer/concept_use_2.ref: New.
input/concept_use_1.scl | 10 ++++++++++
input/concept_use_2.scl | 10 ++++++++++
parser/concept_use_1.ref | 1 +
parser/concept_use_2.ref | 1 +
transformer/concept_1.ref | 2 +-
transformer/concept_2.ref | 2 +-
transformer/concept_3.ref | 2 +-
transformer/concept_4.ref | 2 +-
transformer/concept_use_1.ref | 21 +++++++++++++++++++++
transformer/concept_use_2.ref | 21 +++++++++++++++++++++
10 files changed, 68 insertions(+), 4 deletions(-)
Index: trunk/tests/input/concept_use_1.scl
===================================================================
--- trunk/tests/input/concept_use_1.scl (revision 0)
+++ trunk/tests/input/concept_use_1.scl (revision 59)
@@ -0,0 +1,10 @@
+box : concept =
+{
+ value : type;
+
+ decl get_value : () -> value;
+}
+
+foo : [ T : type where (T models box) ] (pbox : T) -> void =
+{
+}
Index: trunk/tests/input/concept_use_2.scl
===================================================================
--- trunk/tests/input/concept_use_2.scl (revision 0)
+++ trunk/tests/input/concept_use_2.scl (revision 59)
@@ -0,0 +1,10 @@
+box : concept =
+{
+ value : type;
+
+ decl get_value : () -> value;
+}
+
+foo : [ T : type where T models box ] (pbox : T) -> void =
+{
+}
Index: trunk/tests/transformer/concept_use_1.ref
===================================================================
--- trunk/tests/transformer/concept_use_1.ref (revision 0)
+++ trunk/tests/transformer/concept_use_1.ref (revision 59)
@@ -0,0 +1,21 @@
+template < typename E >
+class box
+{
+ // To be provided by classes that model this concept.
+
+ // typedef value;
+ // value get_value();
+ protected:
+ box();
+};
+template < class T >
+void foo(const box<T>& c)
+{
+}
+template < typename E >
+ box<E>::box()
+{
+ typedef typename E::value value;
+ value (E::*m1)() = &E::get_value;
+ m1 = 0;
+}
Index: trunk/tests/transformer/concept_use_2.ref
===================================================================
--- trunk/tests/transformer/concept_use_2.ref (revision 0)
+++ trunk/tests/transformer/concept_use_2.ref (revision 59)
@@ -0,0 +1,21 @@
+template < typename E >
+class box
+{
+ // To be provided by classes that model this concept.
+
+ // typedef value;
+ // value get_value();
+ protected:
+ box();
+};
+template < class T >
+void foo(const box<T>& c)
+{
+}
+template < typename E >
+ box<E>::box()
+{
+ typedef typename E::value value;
+ value (E::*m1)() = &E::get_value;
+ m1 = 0;
+}
Index: trunk/tests/transformer/concept_1.ref
===================================================================
--- trunk/tests/transformer/concept_1.ref (revision 58)
+++ trunk/tests/transformer/concept_1.ref (revision 59)
@@ -1,7 +1,7 @@
template < typename E >
class box
{
- // To be provided by classes that models this concept
+ // To be provided by classes that model this concept.
// typedef value;
// value get_value();
Index: trunk/tests/transformer/concept_2.ref
===================================================================
--- trunk/tests/transformer/concept_2.ref (revision 58)
+++ trunk/tests/transformer/concept_2.ref (revision 59)
@@ -1,7 +1,7 @@
template < typename E >
class box
{
- // To be provided by classes that models this concept
+ // To be provided by classes that model this concept.
// typedef value;
// value set_value(value val);
Index: trunk/tests/transformer/concept_3.ref
===================================================================
--- trunk/tests/transformer/concept_3.ref (revision 58)
+++ trunk/tests/transformer/concept_3.ref (revision 59)
@@ -1,7 +1,7 @@
template < typename E >
class box
{
- // To be provided by classes that models this concept
+ // To be provided by classes that model this concept.
// typedef value;
// value set_value(value val);
Index: trunk/tests/transformer/concept_4.ref
===================================================================
--- trunk/tests/transformer/concept_4.ref (revision 58)
+++ trunk/tests/transformer/concept_4.ref (revision 59)
@@ -1,7 +1,7 @@
template < typename E >
class box
{
- // To be provided by classes that models this concept
+ // To be provided by classes that model this concept.
// typedef value;
// value set_value(value val);
Index: trunk/tests/parser/concept_use_1.ref
===================================================================
--- trunk/tests/parser/concept_use_1.ref (revision 0)
+++ trunk/tests/parser/concept_use_1.ref (revision 59)
@@ -0,0 +1 @@
+Program([Concept("box",[ConstDec([],"value",None,Var("type")),ConstDec(["decl"],"get_value",None,FunType([],Var("value")))]),BiFunDec([],"foo",[("T",Var("type"),Some((Parenthesis(Model("T","box")))))],[("pbox",Var("T"))],Var("void"),[])])
Index: trunk/tests/parser/concept_use_2.ref
===================================================================
--- trunk/tests/parser/concept_use_2.ref (revision 0)
+++ trunk/tests/parser/concept_use_2.ref (revision 59)
@@ -0,0 +1 @@
+Program([Concept("box",[ConstDec([],"value",None,Var("type")),ConstDec(["decl"],"get_value",None,FunType([],Var("value")))]),BiFunDec([],"foo",[("T",Var("type"),Some((Model("T","box"))))],[("pbox",Var("T"))],Var("void"),[])])
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
Sandbox: ICP: Add bench script and clean testes up.
* sandbox/jardonnet/test/bench.rb: New ruby bench script.
* sandbox/jardonnet/test/plotscript: Usefull generated file.
* sandbox/jardonnet/test/Makefile: Clean rules up.
Remove useless files, now supported by icp.hh
* sandbox/jardonnet/test/icp_subsampled.cc: Remove.
* sandbox/jardonnet/test/icp_check.sh: Remove.
* sandbox/jardonnet/test/icp_lazy.cc: Remove.
Makefile | 53 +++++++++++++----------------------------------------
bench.rb | 33 +++++++++++++++++++++++++++++++++
icp.cc | 6 +++++-
plotscript | 5 -----
4 files changed, 51 insertions(+), 46 deletions(-)
Index: sandbox/jardonnet/test/bench.rb
--- sandbox/jardonnet/test/bench.rb (revision 0)
+++ sandbox/jardonnet/test/bench.rb (revision 0)
@@ -0,0 +1,33 @@
+#!/usr/bin/ruby
+
+system("make icp")
+
+plot_qe = File.new("log.dat", "w+")
+
+for q in 1..10 do
+ for e in 1..10 do
+
+ t1 = Time.new
+ system("./icp 01.pbm 02.pbm #{q} #{e}")
+ t2 = Time.new
+
+ print "#{q} #{e} #{t2-t1}\n"
+ plot_qe.puts "#{q} #{e} #{t2-t1}\n"
+
+ end
+end
+
+plot_qe.close
+
+
+plotscipt = File.new("plotscript", "w+")
+plotscipt.puts "set xlabel \"q\""
+plotscipt.puts "set ylabel \"e\""
+plotscipt.puts "set zlabel \"time\""
+plotscipt.puts "splot \"log.dat\""
+plotscipt.puts "pause -1"
+plotscipt.close
+
+exec("gnuplot plotscript")
+
+
Property changes on: sandbox/jardonnet/test/bench.rb
___________________________________________________________________
Name: svn:executable
+ *
Index: sandbox/jardonnet/test/icp.cc
--- sandbox/jardonnet/test/icp.cc (revision 1858)
+++ sandbox/jardonnet/test/icp.cc (working copy)
@@ -9,7 +9,8 @@
void usage(char *argv[])
{
std::cout << "usage : " << argv[0]
- << " cloud.pbm surface.pbm q e" << std::endl;
+ << " cloud.pbm surface.pbm q e" << std::endl
+ << " q >= 1 and e >= 1" << std::endl;
exit(1);
}
@@ -22,6 +23,9 @@
float q = std::atof(argv[3]);
int e = std::atoi(argv[4]);
+ if (q < 1 or e < 1)
+ usage(argv);
+
using namespace mln;
typedef image3d< bool > I3d;
Index: sandbox/jardonnet/test/plotscript
--- sandbox/jardonnet/test/plotscript (revision 1858)
+++ sandbox/jardonnet/test/plotscript (working copy)
@@ -1,5 +1,5 @@
-set xlabel "k"
-set ylabel "err"
-set zlabel "dQk"
-splot "log"
-pause -1
\ No newline at end of file
+set xlabel "q"
+set ylabel "e"
+set zlabel "time"
+splot "log.dat"
+pause 10
Index: sandbox/jardonnet/test/Makefile
--- sandbox/jardonnet/test/Makefile (revision 1858)
+++ sandbox/jardonnet/test/Makefile (working copy)
@@ -1,56 +1,29 @@
SOURCE=test.cc subsampling.cc
FLAG=-Wall -W -pedantic -I../../.. -g
-all: sub gsub gau icp
-
+all:
+ echo "sub gsub gau icpD icp check bench"
sub:
- g++ subsampling.cc $(FLAG) -o '+sub.exe'
+ g++ subsampling.cc $(FLAG) -o 'sub'
gsub:
- g++ gaussian_subsampling.cc $(FLAG) -o '+gsub.exe'
+ g++ gaussian_subsampling.cc $(FLAG) -o 'gsub'
gau:
- g++ gaussian.cc $(FLAG) -o '+gau.exe'
-
-run:
- time ./+sub.exe . . ; time ./+gsub.exe . .
-
-
-icp:
- g++ icp.cc -I../../.. -g -o '+icp.exe'
-icp++:
- g++ icp.cc -I../../.. -O3 -DNDEBUG -o '+icp.exe'
-
-icp_max++:
- g++ icp_max.cc -I../../.. -O3 -DNDEBUG -pg -o '+icp_map.exe'
-
-icp_lazy++:
- g++ icp_lazy.cc -I../../.. -O3 -DNDEBUG -pg -o '+icp_lazy.exe'
-
-
-icp_sub:
- g++ icp_subsampled.cc -I../../.. -O3 -DNDEBUG -g -o '+icp_sub.exe'
-
-icpsafe:
- g++ icp.cc -fsignaling-nans -ffloat-store -I../../.. -O1 -o '+icp.exe'
+ g++ gaussian.cc $(FLAG) -o 'gau'
-plot: icp
- ./+icp.exe 01.pbm 02.pbm > log
- gnuplot plotscript
+icpD: icp.cc
+ g++ icp.cc -I../../.. -g -o 'icpD'
+icp: icp.cc
+ g++ icp.cc -I../../.. -O3 -DNDEBUG -o 'icp'
-check: clean
- g++ icp.cc -I../../.. -O0 -o './bin/+icp_0'
- g++ icp.cc -I../../.. -O0 -ffloat-store -o './bin/+icp_0f'
- g++ icp.cc -I../../.. -O0 -DNDEBUG -o './bin/+icp_0D'
- g++ icp.cc -I../../.. -O0 -DNDEBUG -ffloat-store -o './bin/+icp_0Df'
- g++ icp.cc -I../../.. -O3 -o './bin/+icp_3'
- g++ icp.cc -I../../.. -O3 -ffloat-store -o './bin/+icp_3f'
- g++ icp.cc -I../../.. -O3 -DNDEBUG -o './bin/+icp_3D'
- g++ icp.cc -I../../.. -O3 -DNDEBUG -ffloat-store -o './bin/+icp_3Df'
- ./icp_check.sh
+bench:
+ ./check.rb
clean:
rm -f -- ./bin/*
+ rm -f sub gsub gau icpD icp
+ rm -f log.dat registred.pbm
.PHONY: check
\ No newline at end of file
1
0
11 Apr '08
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Nicolas Ballas <ballas(a)lrde.epita.fr>
Continue documentation about image types and properties.
* sandbox/ballas/doc/image_tours.txt,
* sandbox/ballas/doc/draft.txt: update documentation.
draft.txt | 177 +++++++++++++++++++++++++++++++++++++++++++-------------
image_tours.txt | 13 +++-
2 files changed, 148 insertions(+), 42 deletions(-)
Index: sandbox/ballas/doc/image_tours.txt
--- sandbox/ballas/doc/image_tours.txt (revision 1857)
+++ sandbox/ballas/doc/image_tours.txt (working copy)
@@ -46,8 +46,8 @@
*** Static Checking
- Some operators are only define in special cases. Properties provide a way to
-check that the operator input type respect the operator requirement.
+ Some operators are only defined in special cases. Properties provide a way to
+check that the operator's input types respect the operator requirements.
*** Specialization of an Algorithm
(ex: dilatation/erosion).
@@ -60,6 +60,8 @@
depends on the property define in the property associated for the image
type. So, it is possible to recover some piece of interface depending on the
image type properties.
+
+//FIXME Bad example
For instance an Image2d has the bi-dimensional, and random value access.
properties. Hence, Image2d automatically provides a row/column access:
V at(Point2d<T>::coord x, Point2d<T>::coord y).
@@ -159,7 +161,7 @@
** Primitive Image
-Primitive image are image which are not based on another image type.
+Primitive image are images which are not based on another image type.
A primitive image type property can be either declared or automatically get
back with the help of associated types.
@@ -341,6 +343,7 @@
+
*** RLE Image
A RLE image can be defined as the following:
@@ -413,6 +416,8 @@
**** Connectivity based on a graph.
+** Image based on Lut
+
** Morpher (Derived Image)
Mopher are Image types which transform an Image type into a new type. So, they
@@ -425,6 +430,8 @@
*** Identity morpher
+ No change in the property.
+
*** Domain morpher
*** Value morpher
Index: sandbox/ballas/doc/draft.txt
--- sandbox/ballas/doc/draft.txt (revision 1857)
+++ sandbox/ballas/doc/draft.txt (working copy)
@@ -4,12 +4,20 @@
- nD image
-- Runs image (RLE/ Sparse/ value encoded...
+- Runs image (RLE/ Sparse/ value encoded...)
- Image based on a Lut (to define)
- graph image (see with Roland)
+- morpher
+
+- domain morpher
+
+- value morpher
+
+- identity morpher
+
* New redefinition of the image property
@@ -28,26 +36,22 @@
**** Definition
The size property give us an indication about the size (in memory) taken by
-the image. Indeed, an image can either huge or regular.
+the image. Indeed, an image can be either huge or regular.
"huge" means that the image cannot be fully store in the ram.
"regular" means that the image can be fully store in the ram.
**** Why does this property exist?
-As we can imagine, access to a "huge" image is way slower than accessing
-to "regular" image. Indeed, to access to "huge" image, we first need to load in
-the ram the interesting part of the image from the hard drive.
-
+As we can imagine, access to a "huge" image is slower than accessing
+to a "regular" image. Indeed, to access to "huge" image, we first need to
+load in the ram a part of the image, from the hard drive.
So, with this property, we can handle huge image in a different way in
the algorithms. (do inplace modification instead of create a new image for
instance, forbid the launch algorithm which create temporary image with huge
image...).
-
FIXME define large?
-
-
*** Border/Extended domain:
border: none,
@@ -55,9 +59,9 @@
FIXME: detail the problem, find example...
- The border property will probably change, because more information on
-the border.
-Actually a "border" is more extended domain of the image definition domain,
+ The border property will probably change, because we need more information
+about the image the borders.
+Actually a "border" is more an extended domain of the image definition domain,
than a simple border.
The idea is an algorithm should have the same behavior for the same image with
or without an extended domain.
@@ -65,7 +69,7 @@
problems:
If the image has stored data, but a computed border, we can do
(&ima(p)) if p is include in the image definition domain.
-But we cannot do that if p is include int the image extended domain.
+But we cannot do that if p is include in the image extended domain.
@@ -78,10 +82,10 @@
**** Definition
- The data property indicates how the image handle the value.
+ The data property indicates how an image get its value.
The value can be either computed (on the fly) or stored.
We say that a value is stored when we can takes a reference of it (&ima(p))
-Value stored can linear:
+Value can be stored in linear buffers:
| | |
v v v
@@ -99,7 +103,8 @@
**** Note
-computed data property implies that the image type has to be read_only.
+
+ Computed data property implies that the image type has to be read_only.
*** io
@@ -121,26 +126,19 @@
*** Speed
-
speed: slow,
fast,
fastest
**** Definition
- Give us information the time needed to access to a value from a site.
+ Give us some information about the time needed to access to a value from a
+site.
slow: ima(p) is greater than O(1)
fast: ima(p) is in O(1)
fastest: ima(p) is in O(1)
- Do we have an extended domain?
- Can we access to the image value, directly with pointer in this
-case?
-
-
-
-
-
+ pixter + extended domain
** Properties related to I::value
@@ -178,7 +176,23 @@
access: random,
browsing
-Does this property resume psite != site?
+We also need to rename these properties.
+
+If site != psite the site can be localized (see the rle image).
+
+However, we can't access to the image directly with a site.
+We need an implementation detail which is contained into the psites.
+So a site contains less information than a psite. This implies that the
+conversion from a site to a psite is not easy. We must add to the site an
+implementation detail which we can find with the image. Cast a site to a psite
+can take (a lot of) time. We can't built a psite directly from a "location".
+So the access is automatically browsing.
+
+So this property resume site != psite
+
+
+//FIXME:If site isn't localized, does psite has any sens?
+
@@ -190,11 +204,24 @@
Do we really need this property
If we look at the slice morpher, it must know that the input image is in 2d.
-So, the answer tends to be yes.
+So, the answer seems to be yes.
+
+But in this case, how do we deal with site in a no localized space?
+
+Specify the space value in localization property
+=> No, localization represents the grid, it doesn't represent the space.
+An image can be in 2 dimension and have a regular grid.
+So we need a new property.
+Perhaps, we just need to add the none value:
+
+
+ dimension: none,
+ one_d,
+ two_d,
+ three_d
+
+The dimension none is useful for image which are not localized.
-But in this case, how do we deal with no localized site? Specify the space
-value in localization property.
-Add a new value/property?
*** support
@@ -205,7 +232,7 @@
This property will certainly change.
Support property represent the underlying support of an Image type.
-It can be a grid, (regular, orthogonal, linear, isotrope, anysotrope).
+It can be a grid, (regular, orthogonal, linear, isotrope, anisotropy).
It can be different from a grid (a mesh?). We also want to know the value of a
grid "stride (pas)", if this value is different from 1. Mask and convolution
directly depends on these properties. Most of the filter mask are developed to
@@ -231,6 +258,8 @@
** localization
+
+
localization: none,
space,
grid < space,
@@ -243,7 +272,7 @@
this property set to space.
An image on a grid (which is not regular) has its property set to grid.
Does an image on a grid has always points as site?
-An image based on the base grid (aligned, isotrope/anysotrop, othogonal) has
+An image based on the base grid (aligned, isotropy/anisotropy, orthogonal) has
this property set to grid.
When this property are set, you can access to new information from the image.
@@ -251,10 +280,80 @@
regular_grid -> deltaX, deltaY of the grid + other grid property??
-Note: that a site can be localised without being point wise (site are localized
-by vector). Do we need a property to say that the image is composed by point?
-Furthermore, an image can be localized and have its type psite != site.
-Ex: graph image<Point2d, T> We need a new property in order to define if the
-image is localized. Is this property gives us the same information than the
-support property?
+** nsites property:
+
+ Some pset are not able to provide the number of sites in a O(1) complexity.
+For instance we can look at pset | P. This pset has all its sites restricts
+ to all its sites that satisfy a predicate P.
+So, if we want to know the number of sites inside pset | P,
+the complexity is in O(n) (we have to look at all the sites of pset).
+
+Do we want to provides this method in all the pset?.
+We can write an external function geom::nsites(ima : Image) : int.
+This function will basically count all the sites of the pset:
+ for_all(p)
+ if (ima.has(p))
+ ++count;
+ return count
+
+This function can be specialize for image/pset types that provide an access
+time in O(1).
+In this case a method nsite will be present in the pset inteface:
+ return ima.pset().nsites();
+
+So we need a pset property to define the complexity of accessing to the number
+of site.
+
+idea:
+ nsites: maintained,
+ computed
+
+** value_access
+
+Do we need a property to specify the access permission and access type from
+the value.
+We can access directly to the value of an image image.value
+
+
+
+
+** Pset interface: ?box methods
+
+//FIXME: Do we want to provides the xbox, gbox, ibox functions,
+or just provide one function to get box which is the more precise?
+If, just an unique function is provided, we can determine its return
+type (if the box returned is an ibox, gbox, xbox) with the localized property.
+
+An image pset has several possible localization (see localization property).
+
+
+So, depends on this property, an pset is able to return a box
+which contains all the sites of the image.
+
+If the image is based on a regular grid, it can return a gbox (box based on a
+regular grid). An gbox is composed by point2d.
+If the image is based on a grid, it can return a ibox. We can access to the
+image values through a couple (i, j). But each couple (i, j) doesn't represent
+necessary a point2d (anystrope, unaligned grid...).
+If the image localization is space, we can return a xbox (box which is not
+based on a grid).
+
+However, all the box can't be compute in a O(1) time.
+For instance, morphers which apply a transformation to an input image pset.
+We need to apply the transformation to all the image sites, in order to
+deduce the new box.
+Furthermore, the grid of the transformed image is not regular any more. (It
+depends on the property of the transformation).
+That's why we do not want to provide the ?box method directly in the pset
+interface for some pset type.
+But we can provide a external function which recalculate the box from an image
+geom::gbox(ima : Image) : gbox
+And this method is specialize for the image which maintain a box directly
+inside the pset type.
+
+So we need a property to get these information.
+
+idea:
+ boxed : true,
+ false
1
0
URL: https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2008-04-10 Maxime van Noppen <yabo(a)lrde.epita.fr>
Handle concept declarations
* pp-cxx/CxxExp.str: Handle the constructor 'CxxAdressOf'.
* pp-cxx/CxxId.str: Handle more complicated C++ identifiers as scoped
or parametered ones.
* pp-cxx/CxxDecl.str: Handle the pointer on methods constructor.
* pp-cxx/CxxExp.meta: New.
* pp-cxx/CxxType.str: Handle parametered types (e.g. E<T>), namespaces
and the use of the 'typename' keyword when
approriate.
* scoolt/Concept.str: Generate the C++ code for concepts.
* scoolt/Tools.str: Fix bug in strategy name.
* scoolt/Decl.str: Handle concept declarations.
* scoolt/Program.str: Separate the generation of the C++ declarations
and implementations.
* cxx-syn/CxxDecl.sdf: Add pointer to methods and the use of the
'typename' keyword.
* cxx-syn/CxxExp.sdf: Add the operator '&' as 'adress of'.
* cxx-syn/Lexical.sdf: Fix a bug in grammar that forbade 'E<T>::'
expressions.
cxx-syn/CxxDecl.sdf | 7 +++++--
cxx-syn/CxxExp.sdf | 2 +-
cxx-syn/Lexical.sdf | 2 +-
pp-cxx/CxxDecl.str | 14 +++++++++++++-
pp-cxx/CxxExp.meta | 1 +
pp-cxx/CxxExp.str | 3 +++
pp-cxx/CxxId.str | 6 +++---
pp-cxx/CxxType.str | 9 +++++++++
scoolt/Concept.str | 38 +++++++++++++++++++++++++++++---------
scoolt/Decl.str | 8 +++++++-
scoolt/Program.str | 5 ++++-
scoolt/Tools.str | 2 +-
12 files changed, 77 insertions(+), 20 deletions(-)
Index: trunk/src/pp-cxx/CxxFun.str
===================================================================
Index: trunk/src/pp-cxx/CxxId.str
===================================================================
--- trunk/src/pp-cxx/CxxId.str (revision 57)
+++ trunk/src/pp-cxx/CxxId.str (revision 58)
@@ -1,12 +1,12 @@
module CxxId
-imports Cxx Box libstratego-lib
+imports Cxx Box CxxType libstratego-lib
rules
CxxIdToAbox:
x -> S(x)
- where not(<?CxxScope(_, _)> x)
+ where <is-string> x
CxxIdToAbox:
- CxxScope(idf1, idf2) -> H hs=0 [ ~<CxxIdToAbox>idf1 "::" ~<CxxIdToAbox>idf2 ]
+ x -> <CxxTypeToAbox> x
Index: trunk/src/pp-cxx/CxxExp.str
===================================================================
--- trunk/src/pp-cxx/CxxExp.str (revision 57)
+++ trunk/src/pp-cxx/CxxExp.str (revision 58)
@@ -31,6 +31,9 @@
CxxExpToStr:
CxxProgram(exp) -> exp
+ CxxExpToAbox:
+ CxxAdressOf(idf) -> H hs=0 [ "&" ~<CxxIdToAbox> idf ]
+
CxxExpToStr:
x -> x
where <is-string> x
Index: trunk/src/pp-cxx/CxxDecl.str
===================================================================
--- trunk/src/pp-cxx/CxxDecl.str (revision 57)
+++ trunk/src/pp-cxx/CxxDecl.str (revision 58)
@@ -1,6 +1,6 @@
module CxxDecl
-imports Cxx Box libstratego-lib CxxType CxxExp CxxId
+imports Cxx Box libstratego-lib CxxType CxxExp CxxId CxxFun
rules
@@ -16,6 +16,18 @@
CxxTopLevelToAbox:
CxxDecl(t, idf, v) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox>t ~<CxxIdToAbox>idf "=" ~<CxxExpToAbox> v] ";"]
+ // Declare a pointer on method : base_type (class::*idf)();
+ CxxTopLevelToAbox:
+ CxxAffect(CxxDecl(base_type, class, idf, args), exp) ->
+ H hs=0 [
+ H hs=1 [
+ ~<CxxTypeToAbox> base_type
+ H hs=0 [
+ "(" ~<CxxTypeToAbox> class "::*" ~<CxxTypeToAbox> idf ")(" ~<map (CxxArgDefToAbox)> args")"
+ ] "=" ~<CxxExpToAbox> exp
+ ] ";"
+ ]
+
CxxTopLevelToAbox:
CxxArrayDecl(t, idf, n) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf] "[" ~<CxxExpToAbox> n "]" ";" ]
Index: trunk/src/pp-cxx/CxxExp.meta
===================================================================
--- trunk/src/pp-cxx/CxxExp.meta (revision 0)
+++ trunk/src/pp-cxx/CxxExp.meta (revision 58)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxType.str
===================================================================
--- trunk/src/pp-cxx/CxxType.str (revision 57)
+++ trunk/src/pp-cxx/CxxType.str (revision 58)
@@ -8,6 +8,9 @@
CxxType(idf) -> <CxxIdToAbox> idf
CxxTypeToAbox:
+ CxxType(idf, l) -> S(<concat-strings> [ idf, "<", <foldr(!"", conc-strings)> l, ">" ])
+
+ CxxTypeToAbox:
CxxRefType(t) -> H hs=0 [ ~<CxxTypeToAbox> t "&" ]
CxxTypeToAbox:
@@ -21,3 +24,9 @@
CxxTypeToAbox:
CxxFunCall(idf, args) -> H hs=0 [ ~<CxxIdToAbox>idf "(" H hs=1 [ ~*<CxxListToAbox(CxxTypeToAbox <+ CxxExpToAbox|",")>args ] ")"]
+
+ CxxTypeToAbox:
+ CxxScope(idf1, idf2) -> H hs=0 [ ~<CxxTypeToAbox> idf1 "::" ~<CxxIdToAbox> idf2 ]
+
+ CxxTypeToAbox:
+ CxxTypename(t) -> H hs=1 [ "typename" ~<CxxTypeToAbox> t ]
Index: trunk/src/scoolt/Concept.str
===================================================================
--- trunk/src/scoolt/Concept.str (revision 57)
+++ trunk/src/scoolt/Concept.str (revision 58)
@@ -1,9 +1,14 @@
module Concept
-imports libstratego-lib Cxx AsFix Scool
+imports libstratego-lib Cxx AsFix Scool Decl
rules
+ // FIXME: This is rather the role of the pretty-printer. However, currently
+ // a CxxComment() node only accepts a text parameter, so we have to
+ // build it. An idea would be to extend the CxxComment() node to accept
+ // an AST as parameter and let the pretty printer do the printing stuff.
+
TypeToStr:
Var(t) -> "typedef"
where <eq> (t, "type")
@@ -15,20 +20,35 @@
FunType([], _) -> ""
ArgsToStr:
- FunType([ e | []], _) -> ""
+ FunType([ e | []], _) -> <ArgToStr> e
ArgsToStr:
- FunType([e | l], _) -> <concat-strings> [ e, ", ", <ArgsToStr> l ]
+ FunType([e | l], _) -> <concat-strings> [ <ArgToStr> e, "," ]
+
+ ArgToStr:
+ FunArg(idf, Var(type)) -> <concat-strings> [ type, " ", idf ]
- ConceptBodyToCxx:
- ConstDec([], idf, None(), t) -> CxxComment(<concat-strings>[ <TypeToStr> t, " ", idf, ";" ])
+ ConceptBodyToStr:
+ ConstDec([], idf, None(), t) ->
+ CxxComment(<concat-strings>[ <TypeToStr> t, " ", idf, ";" ])
- ConceptBodyToCxx:
+ ConceptBodyToStr:
ConstDec(["decl"], idf, None(), t) ->
- CxxComment(<concat-strings>[ <TypeToStr> t, " ", idf, "(", <ArgsToStr> t, ")", ";"])
+ CxxComment(<concat-strings>[
+ <TypeToStr> t, " ", idf, "(", <ArgsToStr> t, ")", ";"
+ ])
ConceptAddCxxConstructor:
idf -> CxxProtected([CxxFun([], None(), idf, [])])
-// ConceptAddCxxConstructor(| idf):
-// _ -> CxxProtected([CxxFun([(Typename, "E")], "", <concat-strings>[ idf, "<E>::", idf], [], [])])
+ ConceptToCxxImpl:
+ ConstDec([], idf, None(), Var("type")) -> CxxTypedef(CxxScope(CxxTypename(CxxType("E")), idf), idf)
+
+ ConceptToCxxImpl:
+ ConstDec(["decl"], idf, None(), FunType(args, Var(return_type))) ->
+ [
+ CxxAffect(CxxDecl(CxxType(return_type), CxxType("E"), CxxType(new_idf), <map (ArgDefToCxx)> args), CxxAdressOf(CxxScope(CxxType("E"), idf))),
+ CxxExpStm(CxxAffect(new_idf, CxxInt("0")))
+ ]
+ where <concat-strings> [ "m", <int-to-string> <Count> ] => new_idf
+
Index: trunk/src/scoolt/Tools.str
===================================================================
--- trunk/src/scoolt/Tools.str (revision 57)
+++ trunk/src/scoolt/Tools.str (revision 58)
@@ -19,7 +19,7 @@
Count =
if count_ => res then
rules(count_:- _)
- ; rules(count_: _ -> <sum> (res, 1))
+ ; rules(count_: _ -> <add> (res, 1))
else
rules(count_: _ -> 1)
end
Index: trunk/src/scoolt/Decl.str
===================================================================
--- trunk/src/scoolt/Decl.str (revision 57)
+++ trunk/src/scoolt/Decl.str (revision 58)
@@ -199,9 +199,15 @@
<conc>
(
[ CxxComment("To be provided by classes that models this concept\n") ],
- <map (ConceptBodyToCxx)> body,
+ <map (ConceptBodyToStr)> body,
[ <ConceptAddCxxConstructor> idf ]
))
+ where
+ rules(
+ ImplToCxx:
+ Concept(idf, body) ->
+ CxxFun([(Typename, "E")], CxxType(""), <concat-strings>[ idf, "<E>::", idf], [], <flatten-list> <map (ConceptToCxxImpl)> body)
+ )
ParamToCxx:
Index: trunk/src/scoolt/Program.str
===================================================================
--- trunk/src/scoolt/Program.str (revision 57)
+++ trunk/src/scoolt/Program.str (revision 58)
@@ -4,5 +4,8 @@
rules
+ CxxEmpty:
+ _ -> []
+
ProgramToCxx:
- Program(l) -> CxxProgram(<map(DeclToCxx)> l)
+ Program(l) -> CxxProgram(<conc> (<map(DeclToCxx)> l, <map(ImplToCxx <+ CxxEmpty)> l))
Index: trunk/src/cxx-syn/CxxDecl.sdf
===================================================================
--- trunk/src/cxx-syn/CxxDecl.sdf (revision 57)
+++ trunk/src/cxx-syn/CxxDecl.sdf (revision 58)
@@ -11,6 +11,10 @@
CxxType CxxId ("[" CxxExp "]")? ";" -> CxxDecl {cons("CxxArrayDecl")}
CxxType CxxId "=" CxxExp ";" -> CxxDecl {cons("CxxDecl")}
+ CxxDecl "=" CxxExp ";" -> CxxExp {cons("CxxAffect")}
+
+ CxxType "(" CxxType "::*" CxxType ")" ("(" {(CxxType CxxId) ","}* ")")?
+ -> CxxDecl {cons("CxxDecl")}
"typedef" CxxType CxxId ";" -> CxxDecl {cons("CxxTypedef")}
@@ -26,9 +30,8 @@
-> CxxDecl {cons("CxxClassDecl")}
"typename" -> CxxType {cons("Typename")}
-
+ "typename" CxxType -> CxxType {cons("CxxTypename")}
"//" CxxText -> CxxTopLevel {cons("CxxComment")}
-
"public" ":" CxxTopLevel* -> CxxTopLevel {cons("CxxPublic")}
"protected" ":" CxxTopLevel* -> CxxTopLevel {cons("CxxProtected")}
"private" ":" CxxTopLevel* -> CxxTopLevel {cons("CxxPrivate")}
Index: trunk/src/cxx-syn/CxxExp.sdf
===================================================================
--- trunk/src/cxx-syn/CxxExp.sdf (revision 57)
+++ trunk/src/cxx-syn/CxxExp.sdf (revision 58)
@@ -9,7 +9,7 @@
CxxInt -> CxxExp {cons("CxxInt")}
CxxId "(" {CxxExp ","}* ")" -> CxxExp {cons("CxxFunCall")}
-
CxxId CxxExp ";" -> CxxExp {cons("CxxKeyword")}
CxxId "=" CxxExp ";" -> CxxExp {cons("CxxAffect")}
CxxExp "+" CxxExp -> CxxExp {cons("CxxSum")}
+ "&" CxxExp -> CxxExp {cons("CxxAdressOf")}
Index: trunk/src/cxx-syn/Lexical.sdf
===================================================================
--- trunk/src/cxx-syn/Lexical.sdf (revision 57)
+++ trunk/src/cxx-syn/Lexical.sdf (revision 58)
@@ -12,4 +12,4 @@
"protected" -> CxxAccessModifier
context-free syntax
- CxxId "::" CxxId -> CxxId {cons("CxxScope")}
+ CxxType "::" CxxId -> CxxId {cons("CxxScope")}
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
1
0
URL: https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2008-04-10 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add tests on concepts
* transformer/class_dec.ref,
* transformer/class_decl_2.ref,
* transformer/class_decl_3.ref: Minor layout change.
* input/concept_2.scl: New.
* input/concept_3.scl: New.
* input/concept_4.scl: New.
* parser/concept_1.ref: New.
* parser/concept_2.ref: New.
* parser/concept_3.ref: New.
* parser/concept_4.ref: New.
* transformer/concept_1.ref: New.
* transformer/concept_2.ref: New.
* transformer/concept_3.ref: New.
* transformer/concept_4.ref: New.
input/concept_2.scl | 6 ++++++
input/concept_3.scl | 7 +++++++
input/concept_4.scl | 8 ++++++++
parser/concept_1.ref | 1 +
parser/concept_2.ref | 1 +
parser/concept_3.ref | 1 +
parser/concept_4.ref | 1 +
transformer/class_dec.ref | 1 -
transformer/class_decl_2.ref | 1 -
transformer/class_decl_3.ref | 1 -
transformer/concept_1.ref | 18 ++++++++++++++++++
transformer/concept_2.ref | 18 ++++++++++++++++++
transformer/concept_3.ref | 21 +++++++++++++++++++++
transformer/concept_4.ref | 24 ++++++++++++++++++++++++
14 files changed, 106 insertions(+), 3 deletions(-)
Index: trunk/tests/input/concept_2.scl
===================================================================
--- trunk/tests/input/concept_2.scl (revision 0)
+++ trunk/tests/input/concept_2.scl (revision 57)
@@ -0,0 +1,6 @@
+box : concept =
+{
+ value : type;
+
+ decl set_value : (val : value) -> value;
+}
Index: trunk/tests/input/concept_3.scl
===================================================================
--- trunk/tests/input/concept_3.scl (revision 0)
+++ trunk/tests/input/concept_3.scl (revision 57)
@@ -0,0 +1,7 @@
+box : concept =
+{
+ value : type;
+
+ decl set_value : (val : value) -> value;
+ decl get_value : () -> value;
+}
Index: trunk/tests/input/concept_4.scl
===================================================================
--- trunk/tests/input/concept_4.scl (revision 0)
+++ trunk/tests/input/concept_4.scl (revision 57)
@@ -0,0 +1,8 @@
+box : concept =
+{
+ value : type;
+
+ decl set_value : (val : value) -> value;
+ decl get_value : () -> value;
+ decl print_value : () -> void;
+}
Index: trunk/tests/transformer/class_decl_2.ref
===================================================================
--- trunk/tests/transformer/class_decl_2.ref (revision 56)
+++ trunk/tests/transformer/class_decl_2.ref (revision 57)
@@ -8,7 +8,6 @@
{
return x;
}
-
private:
int x;
int y;
Index: trunk/tests/transformer/class_decl_3.ref
===================================================================
--- trunk/tests/transformer/class_decl_3.ref (revision 56)
+++ trunk/tests/transformer/class_decl_3.ref (revision 57)
@@ -8,7 +8,6 @@
{
return x;
}
-
private:
int x;
int y;
Index: trunk/tests/transformer/class_dec.ref
===================================================================
--- trunk/tests/transformer/class_dec.ref (revision 56)
+++ trunk/tests/transformer/class_dec.ref (revision 57)
@@ -8,7 +8,6 @@
{
return x;
}
-
private:
int x;
int y;
Index: trunk/tests/transformer/concept_1.ref
===================================================================
--- trunk/tests/transformer/concept_1.ref (revision 0)
+++ trunk/tests/transformer/concept_1.ref (revision 57)
@@ -0,0 +1,18 @@
+template < typename E >
+class box
+{
+ // To be provided by classes that models this concept
+
+ // typedef value;
+ // value get_value();
+ protected:
+ box();
+};
+
+template < typename E >
+box<E>::box()
+{
+ typedef typename E::value value;
+ value (E::*m1)() = &E::get_value;
+ m1 = 0;
+}
Index: trunk/tests/transformer/concept_2.ref
===================================================================
--- trunk/tests/transformer/concept_2.ref (revision 0)
+++ trunk/tests/transformer/concept_2.ref (revision 57)
@@ -0,0 +1,18 @@
+template < typename E >
+class box
+{
+ // To be provided by classes that models this concept
+
+ // typedef value;
+ // value set_value(value val);
+ protected:
+ box();
+};
+
+template < typename E >
+box<E>::box()
+{
+ typedef typename E::value value;
+ value (E::*m1)(const value& val) = &E::set_value;
+ m1 = 0;
+}
Index: trunk/tests/transformer/concept_3.ref
===================================================================
--- trunk/tests/transformer/concept_3.ref (revision 0)
+++ trunk/tests/transformer/concept_3.ref (revision 57)
@@ -0,0 +1,21 @@
+template < typename E >
+class box
+{
+ // To be provided by classes that models this concept
+
+ // typedef value;
+ // value set_value(value val);
+ // value get_value();
+ protected:
+ box();
+};
+
+template < typename E >
+box<E>::box()
+{
+ typedef typename E::value value;
+ value (E::*m1)(const value& val) = &E::set_value;
+ m1 = 0;
+ value (E::*m2)() = &E::get_value;
+ m2 = 0;
+}
Index: trunk/tests/transformer/concept_4.ref
===================================================================
--- trunk/tests/transformer/concept_4.ref (revision 0)
+++ trunk/tests/transformer/concept_4.ref (revision 57)
@@ -0,0 +1,24 @@
+template < typename E >
+class box
+{
+ // To be provided by classes that models this concept
+
+ // typedef value;
+ // value set_value(value val);
+ // value get_value();
+ // void print_value();
+ protected:
+ box();
+};
+
+template < typename E >
+box<E>::box()
+{
+ typedef typename E::value value;
+ value (E::*m1)(const value& val) = &E::set_value;
+ m1 = 0;
+ value (E::*m2)() = &E::get_value;
+ m2 = 0;
+ void (E::*m3)() = &E::print_value;
+ m3 = 0;
+}
Index: trunk/tests/parser/concept_1.ref
===================================================================
--- trunk/tests/parser/concept_1.ref (revision 0)
+++ trunk/tests/parser/concept_1.ref (revision 57)
@@ -0,0 +1 @@
+Program([Concept("box",[ConstDec([],"value",None,Var("type")),ConstDec(["decl"],"get_value",None,FunType([],Var("value")))])])
Index: trunk/tests/parser/concept_2.ref
===================================================================
--- trunk/tests/parser/concept_2.ref (revision 0)
+++ trunk/tests/parser/concept_2.ref (revision 57)
@@ -0,0 +1 @@
+Program([Concept("box",[ConstDec([],"value",None,Var("type")),ConstDec(["decl"],"set_value",None,FunType([FunArg("val",Var("value"))],Var("value")))])])
Index: trunk/tests/parser/concept_3.ref
===================================================================
--- trunk/tests/parser/concept_3.ref (revision 0)
+++ trunk/tests/parser/concept_3.ref (revision 57)
@@ -0,0 +1 @@
+Program([Concept("box",[ConstDec([],"value",None,Var("type")),ConstDec(["decl"],"set_value",None,FunType([FunArg("val",Var("value"))],Var("value"))),ConstDec(["decl"],"get_value",None,FunType([],Var("value")))])])
Index: trunk/tests/parser/concept_4.ref
===================================================================
--- trunk/tests/parser/concept_4.ref (revision 0)
+++ trunk/tests/parser/concept_4.ref (revision 57)
@@ -0,0 +1 @@
+Program([Concept("box",[ConstDec([],"value",None,Var("type")),ConstDec(["decl"],"set_value",None,FunType([FunArg("val",Var("value"))],Var("value"))),ConstDec(["decl"],"get_value",None,FunType([],Var("value"))),ConstDec(["decl"],"print_value",None,FunType([],Var("void")))])])
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
Sandbox: ICP: Add commandline parameters q and e.
* sandbox/jardonnet/test/icp.cc: Read q and e on the command line.
* sandbox/jardonnet/registration/icp.hh: Add Fixme for Ck printing.
registration/icp.hh | 10 +++++++---
test/icp.cc | 13 ++++++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
Index: sandbox/jardonnet/test/icp.cc
--- sandbox/jardonnet/test/icp.cc (revision 1856)
+++ sandbox/jardonnet/test/icp.cc (working copy)
@@ -9,16 +9,19 @@
void usage(char *argv[])
{
std::cout << "usage : " << argv[0]
- << " cloud.pbm surface.pbm" << std::endl;
+ << " cloud.pbm surface.pbm q e" << std::endl;
exit(1);
}
int main(int argc, char* argv[])
{
- if (argc != 3)
+ if (argc != 5)
usage(argv);
+ float q = std::atof(argv[3]);
+ int e = std::atoi(argv[4]);
+
using namespace mln;
typedef image3d< bool > I3d;
@@ -41,7 +44,7 @@
closest_point<mln_point_(I3d)> fun(x, box_<point3d>(1000,1000,1));
lazy_image< closest_point<mln_point_(I3d)> > map(fun);
- quat7<3> q = registration::icp(c, map, 2);
+ quat7<3> qk = registration::icp(c, map, q, e);
#ifndef NDEBUG
std::cout << "closest_point(Ck[i]) = " << fun.i << std::endl;
@@ -54,9 +57,9 @@
//FIXME: Should be
//mln_concrete(I) output(res.bbox()) = convert::to_image<I>(res)?
- q.apply_on(c, c, c.npoints());
+ qk.apply_on(c, c, c.npoints());
- const box_<point2d> box2d(1000,1000);
+ const box_<point2d> box2d(600,600);
image2d<bool> output(box2d, 1);
//to 2d : projection (FIXME:if 3d)
Index: sandbox/jardonnet/registration/icp.hh
--- sandbox/jardonnet/registration/icp.hh (revision 1856)
+++ sandbox/jardonnet/registration/icp.hh (working copy)
@@ -117,6 +117,7 @@
{
using namespace std;
+ //FIXME: Should use Ck box but Ck.bbox() is not correct for c_length
image2d<bool> img(box2d(500,800), 0);
for (size_t i = 0; i < c_length; i++)
{
@@ -125,6 +126,7 @@
img(p) = true;
}
+ //FIXME: Good but put point qfter c_length
//image2d<bool> img = convert::to_image2d(Ck);
stringstream oss;
static int pimp = 0;
@@ -156,6 +158,7 @@
quat7<P::dim>
icp(p_array<P> cloud,
M& map,
+ const float q,
const unsigned nb_it)
{
trace::entering("registration::icp");
@@ -177,10 +180,11 @@
quat7<P::dim> qk;
//run icp
- for (int i = nb_it; i >= 0; i--)
+ for (int e = nb_it-1; e >= 0; e--)
{
- size_t l = cloud.npoints() / std::pow(2., i); // 3 is arbitrary fixed
- impl::icp_(cloud, map, qk, l, i + 1e-3);
+ size_t l = cloud.npoints() / std::pow(q, e); // 3 is arbitrary fixed
+ l = (l<1) ? 1 : l;
+ impl::icp_(cloud, map, qk, l, e + 1e-1);
}
trace::exiting("registration::icp");
1
0
Please, document changes concerning only Milena in milena/ChangeLog.
ChangeLog (from the top-level directory) shall only contains changes
applied elsewhere. Thanks in advance!
https://svn.lrde.epita.fr/svn/oln/trunk
ChangeLog | 82 ----
milena/ChangeLog | 988 +++++++++++++++++++++++++++++--------------------------
2 files changed, 535 insertions(+), 535 deletions(-)
Index: milena/ChangeLog
===================================================================
--- milena/ChangeLog (revision 1855)
+++ milena/ChangeLog (revision 1856)
@@ -81,6 +81,13 @@
* sandbox/jardonnet/registration/projection.hh: Use virtual length.
+2008-04-09 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Add a log version of front-based distance computation.
+
+ * sandbox/folio/psn_log.cc: New. Derived from psn.cc to
+ trace the behavior of the algorithm in the non-convex case.
+
2008-04-09 Roland Levillain <roland(a)lrde.epita.fr>
* img/quite-small.pgm: New image.
@@ -99,6 +106,14 @@
* mln/util/graph.hh (mln::util::graph<void, void>::add_edge): Add
missing preconditions.
+2008-04-09 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Delay construction of pw::value.
+
+ * mln/pw/value.hh (value): New overload. Such function
+ shall have a delayed construction mechanism so that 'initialize'
+ can work.
+
2008-04-09 Etienne FOLIO <folio(a)lrde.epita.fr>
Some stuff for tests.
@@ -516,6 +531,12 @@
* tests/core/line_graph_elt_window.cc: Update test.
* tests/core/line_graph_elt_neighborhood.cc: New test.
+2008-03-27 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Fix naive DT in Etienne's sandbox.
+
+ * sandbox/folio/naive.cc: Fix.
+
2008-03-27 Ugo Jardonnet <jardonnet(a)lrde.epita.fr>
Sandbox: ICP: use of projection maps.
@@ -527,6 +548,12 @@
* sandbox/jardonnet/registration/icp.hh: .
* sandbox/jardonnet/registration/projection.hh: .
+2008-03-27 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Augment doc about image types.
+
+ * doc/tutorial/image_types.txt: Augment.
+
2008-03-26 Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
Sandbox: ICP: draft improvment.
@@ -628,6 +655,21 @@
* tests/core/graph_elt_window.cc: Exercise more features of the
elementary window, and piters.
+2008-03-25 Caroline Vigouroux <vigour_c(a)epita.fr>
+
+ gradation for image valued by integers.
+ * mln/fun/v2v/rgb_to_hsi.hh: Added in milena.
+ * mln/value/hsi.hh: Added in milena.
+ * sandbox/vigouroux/color.cc: New test.
+ * sandbox/vigouroux/color/my_hsi.hh: changed.
+ * sandbox/vigouroux/color/rgb_to_hsi.hh: changed.
+ * sandbox/vigouroux/gradation.hh: New gradation.
+ * sandbox/vigouroux/lap.cc: New gradation test.
+ * sandbox/vigouroux/lap.hh: New lap filter.
+ * sandbox/vigouroux/moyenne.cc: .
+ * tests/fun/v2v/Makefile.am: .
+ * tests/fun/v2v/rgb_hsi_conversion.cc: New test.
+
2008-03-25 Roland Levillain <roland(a)lrde.epita.fr>
Have Meyer's WST depend less on the old code base.
@@ -870,6 +912,14 @@
* sandbox/jardonnet/registration/quat/interpol.hh: Remove.
Provided by qut.hh
+2008-03-19 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Update test on rgb/hsi conversion.
+
+ * doc/tutorial/image_types.txt: Augment.
+ * mln/value/rgb.hh (red_t, green_t, blue_t): New.
+ * sandbox/vigouroux/moyenne.cc: Update.
+
2008-03-19 Michel Pellegrin <pellegrin(a)lrde.epita.fr>
Fix some mistakes, Add.
@@ -1188,31 +1238,31 @@
Add to sanbox an image type maped on the hard disk.
- * milena/sandbox/garrigues/tiled_image2d: New.
- * milena/sandbox/garrigues/tiled_image2d/tiled_image2d.cc: New.
- * milena/sandbox/garrigues/tiled_image2d/tiled_image2d.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/backend/file.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/backend/ios.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/backend/mmap.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/backend: New.
- * milena/sandbox/garrigues/tiled_image2d/block.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/context.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/all.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/image2d/all.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/image2d/lrtb.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/image2d/tblr.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/image2d: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/layout2d.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/page2d/all.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/page2d/lrtb.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/page2d/tblr.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/layout/page2d: New.
- * milena/sandbox/garrigues/tiled_image2d/layout: New.
- * milena/sandbox/garrigues/tiled_image2d/page.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/paged_image.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/support/lru.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/support/simple.hh: New.
- * milena/sandbox/garrigues/tiled_image2d/support: New.
+ * sandbox/garrigues/tiled_image2d: New.
+ * sandbox/garrigues/tiled_image2d/tiled_image2d.cc: New.
+ * sandbox/garrigues/tiled_image2d/tiled_image2d.hh: New.
+ * sandbox/garrigues/tiled_image2d/backend/file.hh: New.
+ * sandbox/garrigues/tiled_image2d/backend/ios.hh: New.
+ * sandbox/garrigues/tiled_image2d/backend/mmap.hh: New.
+ * sandbox/garrigues/tiled_image2d/backend: New.
+ * sandbox/garrigues/tiled_image2d/block.hh: New.
+ * sandbox/garrigues/tiled_image2d/context.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/all.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/image2d/all.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/image2d/lrtb.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/image2d/tblr.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/image2d: New.
+ * sandbox/garrigues/tiled_image2d/layout/layout2d.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/page2d/all.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/page2d/lrtb.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/page2d/tblr.hh: New.
+ * sandbox/garrigues/tiled_image2d/layout/page2d: New.
+ * sandbox/garrigues/tiled_image2d/layout: New.
+ * sandbox/garrigues/tiled_image2d/page.hh: New.
+ * sandbox/garrigues/tiled_image2d/paged_image.hh: New.
+ * sandbox/garrigues/tiled_image2d/support/lru.hh: New.
+ * sandbox/garrigues/tiled_image2d/support/simple.hh: New.
+ * sandbox/garrigues/tiled_image2d/support: New.
2008-03-12 Roland Levillain <roland(a)lrde.epita.fr>
@@ -1557,6 +1607,12 @@
* mln/core/p_bgraph.hh,
* mln/core/bgraph_psite.hh: fix the bug (thanks to Theo).
+2008-03-05 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Augment tutorial on image types.
+
+ * doc/tutorial/image_types.txt: Augment.
+
2008-03-04 Caroline Vigouroux <vigour_c(a)epita.fr>
Root Mean Square of error.
@@ -1593,6 +1649,12 @@
* load.cc: New loader.
* tests.cc: New tests.
+2008-02-29 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Start a description of image types.
+
+ * doc/tutorial/image_types.txt: New.
+
2008-02-29 Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
sandbox:Subsampling function.
@@ -1607,6 +1669,15 @@
* tests/subsampling: New.
* tests/subsampling/type.cc: New.
+2008-02-27 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ New sample code for Caroline (hsi and conversion).
+
+ * sandbox/vigouroux/color/my_hsi.hh: .
+ * sandbox/vigouroux/color/is_HSI.cc: New.
+ * sandbox/vigouroux/color/rgb_to_hsi.hh
+ (fun::v2v::f_rgb_to_hsi_): New.
+
2008-02-27 Nicolas Ballas <ballas(a)lrde.epita.fr>
Add base decorator for boost graph.
@@ -1623,6 +1694,17 @@
* sandbox/geraud/irm.cc: New.
+2008-02-27 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Fix the pretty-printer of util::internal::graph_base.
+
+ * mln/util/internal/graph_base.hh (node<void>::edges):
+ Use a std::vector (as in node<T>), not a std::list.
+ (util::internal::graph_base<N, E>::print_debug): Fix the iteration
+ on the edges adjacent to a vertex.
+ * tests/core/graph_image.cc: Exercise
+ util::internal::graph_base<N, E>::print_debug
+
2008-02-26 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Split fllt.hh in my sanbox.
@@ -3469,7 +3551,7 @@
2007-12-17 Benoit Sigoure <tsuna(a)lrde.epita.fr>
Add a missing include.
- * milena/mln/accu/max.hh: Here.
+ * mln/accu/max.hh: Here.
2007-12-17 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
@@ -3574,7 +3656,7 @@
documentation.
Update source for distinction between the user and developper
documentation.
-
+
* mln/accu/all.hh,
* mln/accu/internal/base.hh,
* mln/arith/all.hh,
@@ -4123,435 +4205,435 @@
Replace exported global variables with static ones.
This allows for separate compilation.
- * milena/mln/border/thickness.hh,
- * milena/mln/literal/black.hh,
- * milena/mln/literal/colors.hh,
- * milena/mln/literal/grays.hh,
- * milena/mln/literal/one.hh,
- * milena/mln/literal/origin.hh,
- * milena/mln/literal/white.hh,
- * milena/mln/literal/zero.hh,
- * milena/mln/tag/init.hh: Here.
- * milena/mln/trace/entering.hh: Add a missing `inline'.
- * milena/mln/trace/exiting.hh: Kill trailing whitespaces.
+ * mln/border/thickness.hh,
+ * mln/literal/black.hh,
+ * mln/literal/colors.hh,
+ * mln/literal/grays.hh,
+ * mln/literal/one.hh,
+ * mln/literal/origin.hh,
+ * mln/literal/white.hh,
+ * mln/literal/zero.hh,
+ * mln/tag/init.hh: Here.
+ * mln/trace/entering.hh: Add a missing `inline'.
+ * mln/trace/exiting.hh: Kill trailing whitespaces.
2007-11-28 Benoit Sigoure <tsuna(a)lrde.epita.fr>
Add the missing inline keywords.
- * milena/mln/accu/bbox.hh,
- * milena/mln/accu/compute.hh,
- * milena/mln/accu/count.hh,
- * milena/mln/accu/histo.hh,
- * milena/mln/accu/internal/base.hh,
- * milena/mln/accu/max.hh,
- * milena/mln/accu/max_h.hh,
- * milena/mln/accu/mean.hh,
- * milena/mln/accu/median.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/sum.hh,
- * milena/mln/accu/take.hh,
- * milena/mln/accu/v.hh,
- * milena/mln/arith/min.hh,
- * milena/mln/arith/min.spe.hh,
- * milena/mln/arith/minus.hh,
- * milena/mln/arith/plus.hh,
- * milena/mln/arith/revert.hh,
- * milena/mln/arith/revert.spe.hh,
- * milena/mln/arith/times.hh,
- * milena/mln/arith/times.spe.hh,
- * milena/mln/border/adjust.hh,
- * milena/mln/border/duplicate.hh,
- * milena/mln/border/equalize.hh,
- * milena/mln/border/fill.hh,
- * milena/mln/border/find.hh,
- * milena/mln/border/get.hh,
- * milena/mln/border/mirror.hh,
- * milena/mln/border/resize.hh,
- * milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh,
- * milena/mln/canvas/browsing/directional.hh,
- * milena/mln/canvas/browsing/fwd.hh,
- * milena/mln/canvas/browsing/snake_fwd.hh,
- * milena/mln/convert/to_dpoint.hh,
- * milena/mln/convert/to_fun.hh,
- * milena/mln/convert/to_image.hh,
- * milena/mln/convert/to_p_array.hh,
- * milena/mln/convert/to_p_set.hh,
- * milena/mln/convert/to_rgb.hh,
- * milena/mln/convert/to_std_set.hh,
- * milena/mln/convert/to_tiles.hh,
- * milena/mln/convert/to_w_window.hh,
- * milena/mln/convert/to_window.hh,
- * milena/mln/core/a_point_of.hh,
- * milena/mln/core/box.hh,
- * milena/mln/core/box_piter.hh,
- * milena/mln/core/cast_image.hh,
- * milena/mln/core/clock_neighb.hh,
- * milena/mln/core/clock_neighb2d.hh,
- * milena/mln/core/clone.hh,
- * milena/mln/core/concept/accumulator.hh,
- * milena/mln/core/concept/box.hh,
- * milena/mln/core/concept/browsing.hh,
- * milena/mln/core/concept/delta_point_site.hh,
- * milena/mln/core/concept/dpoint.hh,
- * milena/mln/core/concept/function.hh,
- * milena/mln/core/concept/generalized_pixel.hh,
- * milena/mln/core/concept/image.hh,
- * milena/mln/core/concept/iterator.hh,
- * milena/mln/core/concept/literal.hh,
- * milena/mln/core/concept/mesh.hh,
- * milena/mln/core/concept/meta_accumulator.hh,
- * milena/mln/core/concept/neighborhood.hh,
- * milena/mln/core/concept/object.hh,
- * milena/mln/core/concept/pixel_iterator.hh,
- * milena/mln/core/concept/point.hh,
- * milena/mln/core/concept/point_iterator.hh,
- * milena/mln/core/concept/point_set.hh,
- * milena/mln/core/concept/point_site.hh,
- * milena/mln/core/concept/regular_grid.hh,
- * milena/mln/core/concept/value.hh,
- * milena/mln/core/concept/value_iterator.hh,
- * milena/mln/core/concept/value_set.hh,
- * milena/mln/core/concept/weighted_window.hh,
- * milena/mln/core/concept/window.hh,
- * milena/mln/core/decorated_image.hh,
- * milena/mln/core/dpoint.hh,
- * milena/mln/core/dpoints_piter.hh,
- * milena/mln/core/dpoints_pixter.hh,
- * milena/mln/core/exact.hh,
- * milena/mln/core/h_mat.hh,
- * milena/mln/core/h_vec.hh,
- * milena/mln/core/hexa.hh,
- * milena/mln/core/hexa_piter.hh,
- * milena/mln/core/image1d.hh,
- * milena/mln/core/image2d.hh,
- * milena/mln/core/image2d_h.hh,
- * milena/mln/core/image3d.hh,
- * milena/mln/core/image_if.hh,
- * milena/mln/core/image_if_interval.hh,
- * milena/mln/core/image_if_value.hh,
- * milena/mln/core/init.hh,
- * milena/mln/core/inplace.hh,
- * milena/mln/core/internal/box_impl.hh,
- * milena/mln/core/internal/check/image_fastest.hh,
- * milena/mln/core/internal/coord_impl.hh,
- * milena/mln/core/internal/dpoints_base.hh,
- * milena/mln/core/internal/exact.hh,
- * milena/mln/core/internal/image_base.hh,
- * milena/mln/core/internal/image_domain_morpher.hh,
- * milena/mln/core/internal/image_identity.hh,
- * milena/mln/core/internal/image_if_base.hh,
- * milena/mln/core/internal/image_morpher.hh,
- * milena/mln/core/internal/image_primary.hh,
- * milena/mln/core/internal/image_value_morpher.hh,
- * milena/mln/core/internal/piter_adaptor.hh,
- * milena/mln/core/internal/pixel_impl.hh,
- * milena/mln/core/internal/pixel_iterator_base.hh,
- * milena/mln/core/internal/point_iterator_base.hh,
- * milena/mln/core/internal/point_set_base.hh,
- * milena/mln/core/internal/run_image.hh,
- * milena/mln/core/internal/run_psite.hh,
- * milena/mln/core/internal/set_of.hh,
- * milena/mln/core/interpolated.hh,
- * milena/mln/core/line2d.hh,
- * milena/mln/core/line_piter.hh,
- * milena/mln/core/mesh_image.hh,
- * milena/mln/core/mesh_p.hh,
- * milena/mln/core/mesh_p_piter.hh,
- * milena/mln/core/mesh_psite.hh,
- * milena/mln/core/neighb.hh,
- * milena/mln/core/neighb1d.hh,
- * milena/mln/core/neighb2d.hh,
- * milena/mln/core/neighb3d.hh,
- * milena/mln/core/ops.hh,
- * milena/mln/core/p_array.hh,
- * milena/mln/core/p_array_piter.hh,
- * milena/mln/core/p_priority_queue.hh,
- * milena/mln/core/p_priority_queue_fast.hh,
- * milena/mln/core/p_priority_queue_fast_with_array.hh,
- * milena/mln/core/p_queue.hh,
- * milena/mln/core/p_queue_fast.hh,
- * milena/mln/core/p_run.hh,
- * milena/mln/core/p_run_piter.hh,
- * milena/mln/core/p_runs.hh,
- * milena/mln/core/p_set.hh,
- * milena/mln/core/pixel.hh,
- * milena/mln/core/pixter1d.hh,
- * milena/mln/core/pixter2d.hh,
- * milena/mln/core/pixter3d.hh,
- * milena/mln/core/plain.hh,
- * milena/mln/core/point.hh,
- * milena/mln/core/pset_if.hh,
- * milena/mln/core/pset_if_piter.hh,
- * milena/mln/core/rle_encode.hh,
- * milena/mln/core/rle_image.hh,
- * milena/mln/core/safe.hh,
- * milena/mln/core/sparse_encode.hh,
- * milena/mln/core/sparse_image.hh,
- * milena/mln/core/sub_image.hh,
- * milena/mln/core/t_image.hh,
- * milena/mln/core/tr_image.hh,
- * milena/mln/core/translate_image.hh,
- * milena/mln/core/w_window.hh,
- * milena/mln/core/window.hh,
- * milena/mln/debug/format.hh,
- * milena/mln/debug/iota.hh,
- * milena/mln/debug/iota.spe.hh,
- * milena/mln/debug/println.hh,
- * milena/mln/debug/println.spe.hh,
- * milena/mln/debug/println_with_border.hh,
- * milena/mln/debug/println_with_border.spe.hh,
- * milena/mln/display/color_pretty.hh,
- * milena/mln/display/remove.hh,
- * milena/mln/display/save.hh,
- * milena/mln/display/save_and_show.hh,
- * milena/mln/display/show.hh,
- * milena/mln/draw/line.hh,
- * milena/mln/draw/mesh.hh,
- * milena/mln/estim/mean.hh,
- * milena/mln/estim/min_max.hh,
- * milena/mln/estim/sum.hh,
- * milena/mln/fun/c.hh,
- * milena/mln/fun/cast.hh,
- * milena/mln/fun/i2v/all_to.hh,
- * milena/mln/fun/internal/x2x_linear_impl.hh,
- * milena/mln/fun/p2b/chess.hh,
- * milena/mln/fun/p2v/elifs.hh,
- * milena/mln/fun/p2v/iota.hh,
- * milena/mln/fun/p2v/ternary.hh,
- * milena/mln/fun/v2v/abs.hh,
- * milena/mln/fun/v2v/cast.hh,
- * milena/mln/fun/v2v/enc.hh,
- * milena/mln/fun/v2v/id.hh,
- * milena/mln/fun/v2v/linear.hh,
- * milena/mln/fun/v2v/norm.hh,
- * milena/mln/fun/v2v/saturate.hh,
- * milena/mln/fun/x2x/composed.hh,
- * milena/mln/fun/x2x/rotation.hh,
- * milena/mln/fun/x2x/translation.hh,
- * milena/mln/geom/bbox.hh,
- * milena/mln/geom/chamfer.hh,
- * milena/mln/geom/max_col.hh,
- * milena/mln/geom/max_ind.hh,
- * milena/mln/geom/max_row.hh,
- * milena/mln/geom/max_sli.hh,
- * milena/mln/geom/min_col.hh,
- * milena/mln/geom/min_ind.hh,
- * milena/mln/geom/min_row.hh,
- * milena/mln/geom/min_sli.hh,
- * milena/mln/geom/ncols.hh,
- * milena/mln/geom/ninds.hh,
- * milena/mln/geom/nrows.hh,
- * milena/mln/geom/nslis.hh,
- * milena/mln/geom/pmin_pmax.hh,
- * milena/mln/geom/seeds2tiling.hh,
- * milena/mln/geom/seeds2tiling_roundness.hh,
- * milena/mln/geom/shift.hh,
- * milena/mln/geom/sym.hh,
- * milena/mln/histo/compute.hh,
- * milena/mln/histo/compute.spe.hh,
- * milena/mln/histo/data.hh,
- * milena/mln/io/abort.hh,
- * milena/mln/io/fits/load.hh,
- * milena/mln/io/pbm/load.hh,
- * milena/mln/io/pbm/save.hh,
- * milena/mln/io/pfm/load.hh,
- * milena/mln/io/pfm/save.hh,
- * milena/mln/io/pgm/load.hh,
- * milena/mln/io/pgm/save.hh,
- * milena/mln/io/pnm/load.hh,
- * milena/mln/io/pnm/load_header.hh,
- * milena/mln/io/pnm/max_component.hh,
- * milena/mln/io/pnm/save.hh,
- * milena/mln/io/pnm/save_header.hh,
- * milena/mln/io/ppm/load.hh,
- * milena/mln/io/ppm/save.hh,
- * milena/mln/labeling/background.hh,
- * milena/mln/labeling/base.hh,
- * milena/mln/labeling/blobs.hh,
- * milena/mln/labeling/estimate.hh,
- * milena/mln/labeling/flat_zones.hh,
- * milena/mln/labeling/foreground.hh,
- * milena/mln/labeling/level.hh,
- * milena/mln/labeling/regional_maxima.hh,
- * milena/mln/labeling/regional_minima.hh,
- * milena/mln/level/abs.hh,
- * milena/mln/level/apply.hh,
- * milena/mln/level/apply.spe.hh,
- * milena/mln/level/approx/median.hh,
- * milena/mln/level/assign.hh,
- * milena/mln/level/assign.spe.hh,
- * milena/mln/level/compare.hh,
- * milena/mln/level/compute.hh,
- * milena/mln/level/fast_median.hh,
- * milena/mln/level/fill.hh,
- * milena/mln/level/fill.spe.hh,
- * milena/mln/level/median.hh,
- * milena/mln/level/memcpy_.hh,
- * milena/mln/level/memset_.hh,
- * milena/mln/level/naive/median.hh,
- * milena/mln/level/paste.hh,
- * milena/mln/level/paste.spe.hh,
- * milena/mln/level/saturate.hh,
- * milena/mln/level/sort_points.hh,
- * milena/mln/level/stretch.hh,
- * milena/mln/level/take.hh,
- * milena/mln/level/take.spe.hh,
- * milena/mln/level/to_enc.hh,
- * milena/mln/level/transform.hh,
- * milena/mln/level/transform.spe.hh,
- * milena/mln/linear/convolve.hh,
- * milena/mln/linear/gaussian.hh,
- * milena/mln/linear/lap.hh,
- * milena/mln/linear/line_convolve.hh,
- * milena/mln/linear/line_x2_convolve.hh,
- * milena/mln/linear/local/convolve.hh,
- * milena/mln/linear/log.hh,
- * milena/mln/linear/sobel.hh,
- * milena/mln/literal/one.hh,
- * milena/mln/literal/ops.hh,
- * milena/mln/literal/zero.hh,
- * milena/mln/logical/and.hh,
- * milena/mln/logical/and.spe.hh,
- * milena/mln/logical/and_not.hh,
- * milena/mln/logical/and_not.spe.hh,
- * milena/mln/logical/not.hh,
- * milena/mln/logical/not.spe.hh,
- * milena/mln/logical/or.hh,
- * milena/mln/logical/or.spe.hh,
- * milena/mln/make/box1d.hh,
- * milena/mln/make/box2d.hh,
- * milena/mln/make/box2d_h.hh,
- * milena/mln/make/box3d.hh,
- * milena/mln/make/dpoint1d.hh,
- * milena/mln/make/dpoint2d.hh,
- * milena/mln/make/dpoint2d_h.hh,
- * milena/mln/make/dpoint3d.hh,
- * milena/mln/make/image2d.hh,
- * milena/mln/make/mat.hh,
- * milena/mln/make/pix.hh,
- * milena/mln/make/pixel.hh,
- * milena/mln/make/point1d.hh,
- * milena/mln/make/point2d.hh,
- * milena/mln/make/point2d_h.hh,
- * milena/mln/make/point3d.hh,
- * milena/mln/make/vec.hh,
- * milena/mln/make/voronoi.hh,
- * milena/mln/make/w_window.hh,
- * milena/mln/make/w_window1d.hh,
- * milena/mln/make/w_window1d_int.hh,
- * milena/mln/make/w_window2d.hh,
- * milena/mln/make/w_window2d_int.hh,
- * milena/mln/make/w_window3d.hh,
- * milena/mln/make/w_window3d_int.hh,
- * milena/mln/make/w_window_line.hh,
- * milena/mln/make/window1d.hh,
- * milena/mln/make/window2d.hh,
- * milena/mln/make/window3d.hh,
- * milena/mln/math/abs.hh,
- * milena/mln/math/max.hh,
- * milena/mln/math/min.hh,
- * milena/mln/math/round.hh,
- * milena/mln/math/round_sat.hh,
- * milena/mln/math/sign.hh,
- * milena/mln/math/sqr.hh,
- * milena/mln/math/sqrt.hh,
- * milena/mln/metal/bool.hh,
- * milena/mln/metal/int.hh,
- * milena/mln/metal/mat.hh,
- * milena/mln/metal/vec.hh,
- * milena/mln/morpho/Rd.hh,
- * milena/mln/morpho/closing.hh,
- * milena/mln/morpho/complementation.hh,
- * milena/mln/morpho/contrast.hh,
- * milena/mln/morpho/dilation.hh,
- * milena/mln/morpho/dilation_fast.hh,
- * milena/mln/morpho/erosion.hh,
- * milena/mln/morpho/erosion.spe.hh,
- * milena/mln/morpho/erosion_fast.hh,
- * milena/mln/morpho/gradient.hh,
- * milena/mln/morpho/hit_or_miss.hh,
- * milena/mln/morpho/laplacian.hh,
- * milena/mln/morpho/min.hh,
- * milena/mln/morpho/minus.hh,
- * milena/mln/morpho/opening.hh,
- * milena/mln/morpho/opening_area.hh,
- * milena/mln/morpho/opening_attribute.hh,
- * milena/mln/morpho/plus.hh,
- * milena/mln/morpho/thick_miss.hh,
- * milena/mln/morpho/thickening.hh,
- * milena/mln/morpho/thin_fit.hh,
- * milena/mln/morpho/thinning.hh,
- * milena/mln/morpho/top_hat.hh,
- * milena/mln/norm/l1.hh,
- * milena/mln/norm/l2.hh,
- * milena/mln/norm/linfty.hh,
- * milena/mln/pw/cst.hh,
- * milena/mln/pw/image.hh,
- * milena/mln/pw/value.hh,
- * milena/mln/pw/var.hh,
- * milena/mln/set/diff.hh,
- * milena/mln/set/inter.hh,
- * milena/mln/set/sym_diff.hh,
- * milena/mln/set/uni.hh,
- * milena/mln/test/positive.hh,
- * milena/mln/test/predicate.hh,
- * milena/mln/trace/exiting.hh,
- * milena/mln/trait/image/print.hh,
- * milena/mln/trait/value/print.hh,
- * milena/mln/util/branch_iter.hh,
- * milena/mln/util/branch_iter_ind.hh,
- * milena/mln/util/eat.hh,
- * milena/mln/util/graph.hh,
- * milena/mln/util/ignore.hh,
- * milena/mln/util/lazy_set.hh,
- * milena/mln/util/nil.hh,
- * milena/mln/util/ordpair.hh,
- * milena/mln/util/pix.hh,
- * milena/mln/util/tracked_ptr.hh,
- * milena/mln/util/tree.hh,
- * milena/mln/util/tree_fast.hh,
- * milena/mln/util/tree_fast_to_image.hh,
- * milena/mln/util/tree_to_fast.hh,
- * milena/mln/util/tree_to_image.hh,
- * milena/mln/value/cast.hh,
- * milena/mln/value/concept/scalar.hh,
- * milena/mln/value/equiv.hh,
- * milena/mln/value/float01.hh,
- * milena/mln/value/float01_.hh,
- * milena/mln/value/float01_f.hh,
- * milena/mln/value/gray.hh,
- * milena/mln/value/graylevel.hh,
- * milena/mln/value/int_s.hh,
- * milena/mln/value/int_u.hh,
- * milena/mln/value/int_u_sat.hh,
- * milena/mln/value/internal/convert.hh,
- * milena/mln/value/internal/iterable_set.hh,
- * milena/mln/value/internal/value_like.hh,
- * milena/mln/value/interval.hh,
- * milena/mln/value/label.hh,
- * milena/mln/value/lut_vec.hh,
- * milena/mln/value/ops.hh,
- * milena/mln/value/other.hh,
- * milena/mln/value/proxy.hh,
- * milena/mln/value/quat.hh,
- * milena/mln/value/rgb.hh,
- * milena/mln/value/rgb8_non_templated.hh,
- * milena/mln/value/scalar.hh,
- * milena/mln/value/set.hh,
- * milena/mln/value/stack.hh,
- * milena/mln/value/viter.hh,
- * milena/mln/win/backdiag2d.hh,
- * milena/mln/win/cube3d.hh,
- * milena/mln/win/diag2d.hh,
- * milena/mln/win/disk2d.hh,
- * milena/mln/win/line.hh,
- * milena/mln/win/octagon2d.hh,
- * milena/mln/win/rectangle2d.hh: Here.
+ * mln/accu/bbox.hh,
+ * mln/accu/compute.hh,
+ * mln/accu/count.hh,
+ * mln/accu/histo.hh,
+ * mln/accu/internal/base.hh,
+ * mln/accu/max.hh,
+ * mln/accu/max_h.hh,
+ * mln/accu/mean.hh,
+ * mln/accu/median.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/sum.hh,
+ * mln/accu/take.hh,
+ * mln/accu/v.hh,
+ * mln/arith/min.hh,
+ * mln/arith/min.spe.hh,
+ * mln/arith/minus.hh,
+ * mln/arith/plus.hh,
+ * mln/arith/revert.hh,
+ * mln/arith/revert.spe.hh,
+ * mln/arith/times.hh,
+ * mln/arith/times.spe.hh,
+ * mln/border/adjust.hh,
+ * mln/border/duplicate.hh,
+ * mln/border/equalize.hh,
+ * mln/border/fill.hh,
+ * mln/border/find.hh,
+ * mln/border/get.hh,
+ * mln/border/mirror.hh,
+ * mln/border/resize.hh,
+ * mln/canvas/browsing/dir_struct_elt_incr_update.hh,
+ * mln/canvas/browsing/directional.hh,
+ * mln/canvas/browsing/fwd.hh,
+ * mln/canvas/browsing/snake_fwd.hh,
+ * mln/convert/to_dpoint.hh,
+ * mln/convert/to_fun.hh,
+ * mln/convert/to_image.hh,
+ * mln/convert/to_p_array.hh,
+ * mln/convert/to_p_set.hh,
+ * mln/convert/to_rgb.hh,
+ * mln/convert/to_std_set.hh,
+ * mln/convert/to_tiles.hh,
+ * mln/convert/to_w_window.hh,
+ * mln/convert/to_window.hh,
+ * mln/core/a_point_of.hh,
+ * mln/core/box.hh,
+ * mln/core/box_piter.hh,
+ * mln/core/cast_image.hh,
+ * mln/core/clock_neighb.hh,
+ * mln/core/clock_neighb2d.hh,
+ * mln/core/clone.hh,
+ * mln/core/concept/accumulator.hh,
+ * mln/core/concept/box.hh,
+ * mln/core/concept/browsing.hh,
+ * mln/core/concept/delta_point_site.hh,
+ * mln/core/concept/dpoint.hh,
+ * mln/core/concept/function.hh,
+ * mln/core/concept/generalized_pixel.hh,
+ * mln/core/concept/image.hh,
+ * mln/core/concept/iterator.hh,
+ * mln/core/concept/literal.hh,
+ * mln/core/concept/mesh.hh,
+ * mln/core/concept/meta_accumulator.hh,
+ * mln/core/concept/neighborhood.hh,
+ * mln/core/concept/object.hh,
+ * mln/core/concept/pixel_iterator.hh,
+ * mln/core/concept/point.hh,
+ * mln/core/concept/point_iterator.hh,
+ * mln/core/concept/point_set.hh,
+ * mln/core/concept/point_site.hh,
+ * mln/core/concept/regular_grid.hh,
+ * mln/core/concept/value.hh,
+ * mln/core/concept/value_iterator.hh,
+ * mln/core/concept/value_set.hh,
+ * mln/core/concept/weighted_window.hh,
+ * mln/core/concept/window.hh,
+ * mln/core/decorated_image.hh,
+ * mln/core/dpoint.hh,
+ * mln/core/dpoints_piter.hh,
+ * mln/core/dpoints_pixter.hh,
+ * mln/core/exact.hh,
+ * mln/core/h_mat.hh,
+ * mln/core/h_vec.hh,
+ * mln/core/hexa.hh,
+ * mln/core/hexa_piter.hh,
+ * mln/core/image1d.hh,
+ * mln/core/image2d.hh,
+ * mln/core/image2d_h.hh,
+ * mln/core/image3d.hh,
+ * mln/core/image_if.hh,
+ * mln/core/image_if_interval.hh,
+ * mln/core/image_if_value.hh,
+ * mln/core/init.hh,
+ * mln/core/inplace.hh,
+ * mln/core/internal/box_impl.hh,
+ * mln/core/internal/check/image_fastest.hh,
+ * mln/core/internal/coord_impl.hh,
+ * mln/core/internal/dpoints_base.hh,
+ * mln/core/internal/exact.hh,
+ * mln/core/internal/image_base.hh,
+ * mln/core/internal/image_domain_morpher.hh,
+ * mln/core/internal/image_identity.hh,
+ * mln/core/internal/image_if_base.hh,
+ * mln/core/internal/image_morpher.hh,
+ * mln/core/internal/image_primary.hh,
+ * mln/core/internal/image_value_morpher.hh,
+ * mln/core/internal/piter_adaptor.hh,
+ * mln/core/internal/pixel_impl.hh,
+ * mln/core/internal/pixel_iterator_base.hh,
+ * mln/core/internal/point_iterator_base.hh,
+ * mln/core/internal/point_set_base.hh,
+ * mln/core/internal/run_image.hh,
+ * mln/core/internal/run_psite.hh,
+ * mln/core/internal/set_of.hh,
+ * mln/core/interpolated.hh,
+ * mln/core/line2d.hh,
+ * mln/core/line_piter.hh,
+ * mln/core/mesh_image.hh,
+ * mln/core/mesh_p.hh,
+ * mln/core/mesh_p_piter.hh,
+ * mln/core/mesh_psite.hh,
+ * mln/core/neighb.hh,
+ * mln/core/neighb1d.hh,
+ * mln/core/neighb2d.hh,
+ * mln/core/neighb3d.hh,
+ * mln/core/ops.hh,
+ * mln/core/p_array.hh,
+ * mln/core/p_array_piter.hh,
+ * mln/core/p_priority_queue.hh,
+ * mln/core/p_priority_queue_fast.hh,
+ * mln/core/p_priority_queue_fast_with_array.hh,
+ * mln/core/p_queue.hh,
+ * mln/core/p_queue_fast.hh,
+ * mln/core/p_run.hh,
+ * mln/core/p_run_piter.hh,
+ * mln/core/p_runs.hh,
+ * mln/core/p_set.hh,
+ * mln/core/pixel.hh,
+ * mln/core/pixter1d.hh,
+ * mln/core/pixter2d.hh,
+ * mln/core/pixter3d.hh,
+ * mln/core/plain.hh,
+ * mln/core/point.hh,
+ * mln/core/pset_if.hh,
+ * mln/core/pset_if_piter.hh,
+ * mln/core/rle_encode.hh,
+ * mln/core/rle_image.hh,
+ * mln/core/safe.hh,
+ * mln/core/sparse_encode.hh,
+ * mln/core/sparse_image.hh,
+ * mln/core/sub_image.hh,
+ * mln/core/t_image.hh,
+ * mln/core/tr_image.hh,
+ * mln/core/translate_image.hh,
+ * mln/core/w_window.hh,
+ * mln/core/window.hh,
+ * mln/debug/format.hh,
+ * mln/debug/iota.hh,
+ * mln/debug/iota.spe.hh,
+ * mln/debug/println.hh,
+ * mln/debug/println.spe.hh,
+ * mln/debug/println_with_border.hh,
+ * mln/debug/println_with_border.spe.hh,
+ * mln/display/color_pretty.hh,
+ * mln/display/remove.hh,
+ * mln/display/save.hh,
+ * mln/display/save_and_show.hh,
+ * mln/display/show.hh,
+ * mln/draw/line.hh,
+ * mln/draw/mesh.hh,
+ * mln/estim/mean.hh,
+ * mln/estim/min_max.hh,
+ * mln/estim/sum.hh,
+ * mln/fun/c.hh,
+ * mln/fun/cast.hh,
+ * mln/fun/i2v/all_to.hh,
+ * mln/fun/internal/x2x_linear_impl.hh,
+ * mln/fun/p2b/chess.hh,
+ * mln/fun/p2v/elifs.hh,
+ * mln/fun/p2v/iota.hh,
+ * mln/fun/p2v/ternary.hh,
+ * mln/fun/v2v/abs.hh,
+ * mln/fun/v2v/cast.hh,
+ * mln/fun/v2v/enc.hh,
+ * mln/fun/v2v/id.hh,
+ * mln/fun/v2v/linear.hh,
+ * mln/fun/v2v/norm.hh,
+ * mln/fun/v2v/saturate.hh,
+ * mln/fun/x2x/composed.hh,
+ * mln/fun/x2x/rotation.hh,
+ * mln/fun/x2x/translation.hh,
+ * mln/geom/bbox.hh,
+ * mln/geom/chamfer.hh,
+ * mln/geom/max_col.hh,
+ * mln/geom/max_ind.hh,
+ * mln/geom/max_row.hh,
+ * mln/geom/max_sli.hh,
+ * mln/geom/min_col.hh,
+ * mln/geom/min_ind.hh,
+ * mln/geom/min_row.hh,
+ * mln/geom/min_sli.hh,
+ * mln/geom/ncols.hh,
+ * mln/geom/ninds.hh,
+ * mln/geom/nrows.hh,
+ * mln/geom/nslis.hh,
+ * mln/geom/pmin_pmax.hh,
+ * mln/geom/seeds2tiling.hh,
+ * mln/geom/seeds2tiling_roundness.hh,
+ * mln/geom/shift.hh,
+ * mln/geom/sym.hh,
+ * mln/histo/compute.hh,
+ * mln/histo/compute.spe.hh,
+ * mln/histo/data.hh,
+ * mln/io/abort.hh,
+ * mln/io/fits/load.hh,
+ * mln/io/pbm/load.hh,
+ * mln/io/pbm/save.hh,
+ * mln/io/pfm/load.hh,
+ * mln/io/pfm/save.hh,
+ * mln/io/pgm/load.hh,
+ * mln/io/pgm/save.hh,
+ * mln/io/pnm/load.hh,
+ * mln/io/pnm/load_header.hh,
+ * mln/io/pnm/max_component.hh,
+ * mln/io/pnm/save.hh,
+ * mln/io/pnm/save_header.hh,
+ * mln/io/ppm/load.hh,
+ * mln/io/ppm/save.hh,
+ * mln/labeling/background.hh,
+ * mln/labeling/base.hh,
+ * mln/labeling/blobs.hh,
+ * mln/labeling/estimate.hh,
+ * mln/labeling/flat_zones.hh,
+ * mln/labeling/foreground.hh,
+ * mln/labeling/level.hh,
+ * mln/labeling/regional_maxima.hh,
+ * mln/labeling/regional_minima.hh,
+ * mln/level/abs.hh,
+ * mln/level/apply.hh,
+ * mln/level/apply.spe.hh,
+ * mln/level/approx/median.hh,
+ * mln/level/assign.hh,
+ * mln/level/assign.spe.hh,
+ * mln/level/compare.hh,
+ * mln/level/compute.hh,
+ * mln/level/fast_median.hh,
+ * mln/level/fill.hh,
+ * mln/level/fill.spe.hh,
+ * mln/level/median.hh,
+ * mln/level/memcpy_.hh,
+ * mln/level/memset_.hh,
+ * mln/level/naive/median.hh,
+ * mln/level/paste.hh,
+ * mln/level/paste.spe.hh,
+ * mln/level/saturate.hh,
+ * mln/level/sort_points.hh,
+ * mln/level/stretch.hh,
+ * mln/level/take.hh,
+ * mln/level/take.spe.hh,
+ * mln/level/to_enc.hh,
+ * mln/level/transform.hh,
+ * mln/level/transform.spe.hh,
+ * mln/linear/convolve.hh,
+ * mln/linear/gaussian.hh,
+ * mln/linear/lap.hh,
+ * mln/linear/line_convolve.hh,
+ * mln/linear/line_x2_convolve.hh,
+ * mln/linear/local/convolve.hh,
+ * mln/linear/log.hh,
+ * mln/linear/sobel.hh,
+ * mln/literal/one.hh,
+ * mln/literal/ops.hh,
+ * mln/literal/zero.hh,
+ * mln/logical/and.hh,
+ * mln/logical/and.spe.hh,
+ * mln/logical/and_not.hh,
+ * mln/logical/and_not.spe.hh,
+ * mln/logical/not.hh,
+ * mln/logical/not.spe.hh,
+ * mln/logical/or.hh,
+ * mln/logical/or.spe.hh,
+ * mln/make/box1d.hh,
+ * mln/make/box2d.hh,
+ * mln/make/box2d_h.hh,
+ * mln/make/box3d.hh,
+ * mln/make/dpoint1d.hh,
+ * mln/make/dpoint2d.hh,
+ * mln/make/dpoint2d_h.hh,
+ * mln/make/dpoint3d.hh,
+ * mln/make/image2d.hh,
+ * mln/make/mat.hh,
+ * mln/make/pix.hh,
+ * mln/make/pixel.hh,
+ * mln/make/point1d.hh,
+ * mln/make/point2d.hh,
+ * mln/make/point2d_h.hh,
+ * mln/make/point3d.hh,
+ * mln/make/vec.hh,
+ * mln/make/voronoi.hh,
+ * mln/make/w_window.hh,
+ * mln/make/w_window1d.hh,
+ * mln/make/w_window1d_int.hh,
+ * mln/make/w_window2d.hh,
+ * mln/make/w_window2d_int.hh,
+ * mln/make/w_window3d.hh,
+ * mln/make/w_window3d_int.hh,
+ * mln/make/w_window_line.hh,
+ * mln/make/window1d.hh,
+ * mln/make/window2d.hh,
+ * mln/make/window3d.hh,
+ * mln/math/abs.hh,
+ * mln/math/max.hh,
+ * mln/math/min.hh,
+ * mln/math/round.hh,
+ * mln/math/round_sat.hh,
+ * mln/math/sign.hh,
+ * mln/math/sqr.hh,
+ * mln/math/sqrt.hh,
+ * mln/metal/bool.hh,
+ * mln/metal/int.hh,
+ * mln/metal/mat.hh,
+ * mln/metal/vec.hh,
+ * mln/morpho/Rd.hh,
+ * mln/morpho/closing.hh,
+ * mln/morpho/complementation.hh,
+ * mln/morpho/contrast.hh,
+ * mln/morpho/dilation.hh,
+ * mln/morpho/dilation_fast.hh,
+ * mln/morpho/erosion.hh,
+ * mln/morpho/erosion.spe.hh,
+ * mln/morpho/erosion_fast.hh,
+ * mln/morpho/gradient.hh,
+ * mln/morpho/hit_or_miss.hh,
+ * mln/morpho/laplacian.hh,
+ * mln/morpho/min.hh,
+ * mln/morpho/minus.hh,
+ * mln/morpho/opening.hh,
+ * mln/morpho/opening_area.hh,
+ * mln/morpho/opening_attribute.hh,
+ * mln/morpho/plus.hh,
+ * mln/morpho/thick_miss.hh,
+ * mln/morpho/thickening.hh,
+ * mln/morpho/thin_fit.hh,
+ * mln/morpho/thinning.hh,
+ * mln/morpho/top_hat.hh,
+ * mln/norm/l1.hh,
+ * mln/norm/l2.hh,
+ * mln/norm/linfty.hh,
+ * mln/pw/cst.hh,
+ * mln/pw/image.hh,
+ * mln/pw/value.hh,
+ * mln/pw/var.hh,
+ * mln/set/diff.hh,
+ * mln/set/inter.hh,
+ * mln/set/sym_diff.hh,
+ * mln/set/uni.hh,
+ * mln/test/positive.hh,
+ * mln/test/predicate.hh,
+ * mln/trace/exiting.hh,
+ * mln/trait/image/print.hh,
+ * mln/trait/value/print.hh,
+ * mln/util/branch_iter.hh,
+ * mln/util/branch_iter_ind.hh,
+ * mln/util/eat.hh,
+ * mln/util/graph.hh,
+ * mln/util/ignore.hh,
+ * mln/util/lazy_set.hh,
+ * mln/util/nil.hh,
+ * mln/util/ordpair.hh,
+ * mln/util/pix.hh,
+ * mln/util/tracked_ptr.hh,
+ * mln/util/tree.hh,
+ * mln/util/tree_fast.hh,
+ * mln/util/tree_fast_to_image.hh,
+ * mln/util/tree_to_fast.hh,
+ * mln/util/tree_to_image.hh,
+ * mln/value/cast.hh,
+ * mln/value/concept/scalar.hh,
+ * mln/value/equiv.hh,
+ * mln/value/float01.hh,
+ * mln/value/float01_.hh,
+ * mln/value/float01_f.hh,
+ * mln/value/gray.hh,
+ * mln/value/graylevel.hh,
+ * mln/value/int_s.hh,
+ * mln/value/int_u.hh,
+ * mln/value/int_u_sat.hh,
+ * mln/value/internal/convert.hh,
+ * mln/value/internal/iterable_set.hh,
+ * mln/value/internal/value_like.hh,
+ * mln/value/interval.hh,
+ * mln/value/label.hh,
+ * mln/value/lut_vec.hh,
+ * mln/value/ops.hh,
+ * mln/value/other.hh,
+ * mln/value/proxy.hh,
+ * mln/value/quat.hh,
+ * mln/value/rgb.hh,
+ * mln/value/rgb8_non_templated.hh,
+ * mln/value/scalar.hh,
+ * mln/value/set.hh,
+ * mln/value/stack.hh,
+ * mln/value/viter.hh,
+ * mln/win/backdiag2d.hh,
+ * mln/win/cube3d.hh,
+ * mln/win/diag2d.hh,
+ * mln/win/disk2d.hh,
+ * mln/win/line.hh,
+ * mln/win/octagon2d.hh,
+ * mln/win/rectangle2d.hh: Here.
2007-11-28 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
@@ -4607,7 +4689,7 @@
2007-11-28 Benoit Sigoure <tsuna(a)lrde.epita.fr>
Fix various typos.
- * milena/doc/tutorial/slides.tex: Here.
+ * doc/tutorial/slides.tex: Here.
2007-11-28 Simon Nivault <simon.nivault(a)lrde.epita.fr>
Index: ChangeLog
===================================================================
--- ChangeLog (revision 1855)
+++ ChangeLog (revision 1856)
@@ -1,18 +1,3 @@
-2008-04-09 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Add a log version of front-based distance computation.
-
- * milena/sandbox/folio/psn_log.cc: New. Derived from psn.cc to
- trace the behavior of the algorithm in the non-convex case.
-
-2008-04-09 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Delay construction of pw::value.
-
- * milena/mln/pw/value.hh (value): New overload. Such function
- shall have a delayed construction mechanism so that 'initialize'
- can work.
-
2008-04-02 Roland Levillain <roland(a)lrde.epita.fr>
Take milena/tools/ into account in configure.ac.
@@ -21,73 +6,6 @@
(TESTS_CXXFLAGS): Adjust these flags.
(TOOLS_CXXFLAGS): New.
-2008-03-27 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Fix naive DT in Etienne's sandbox.
-
- * milena/sandbox/folio/naive.cc: Fix.
-
-2008-03-27 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Augment doc about image types.
-
- * milena/doc/tutorial/image_types.txt: Augment.
-
-2008-03-25 Caroline Vigouroux <vigour_c(a)epita.fr>
-
- gradation for image valued by integers.
- * milena/mln/fun/v2v/rgb_to_hsi.hh: Added in milena.
- * milena/mln/value/hsi.hh: Added in milena.
- * milena/sandbox/vigouroux/color.cc: New test.
- * milena/sandbox/vigouroux/color/my_hsi.hh: changed.
- * milena/sandbox/vigouroux/color/rgb_to_hsi.hh: changed.
- * milena/sandbox/vigouroux/gradation.hh: New gradation.
- * milena/sandbox/vigouroux/lap.cc: New gradation test.
- * milena/sandbox/vigouroux/lap.hh: New lap filter.
- * milena/sandbox/vigouroux/moyenne.cc: .
- * milena/tests/fun/v2v/Makefile.am: .
- * milena/tests/fun/v2v/rgb_hsi_conversion.cc: New test.
-
-2008-03-19 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Update test on rgb/hsi conversion.
-
- * milena/doc/tutorial/image_types.txt: Augment.
- * milena/mln/value/rgb.hh (red_t, green_t, blue_t): New.
- * milena/sandbox/vigouroux/moyenne.cc: Update.
-
-2008-03-05 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Augment tutorial on image types.
-
- * milena/doc/tutorial/image_types.txt: Augment.
-
-2008-02-29 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- Start a description of image types.
-
- * milena/doc/tutorial/image_types.txt: New.
-
-2008-02-27 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
-
- New sample code for Caroline (hsi and conversion).
-
- * milena/sandbox/vigouroux/color/my_hsi.hh: .
- * milena/sandbox/vigouroux/color/is_HSI.cc: New.
- * milena/sandbox/vigouroux/color/rgb_to_hsi.hh
- (fun::v2v::f_rgb_to_hsi_): New.
-
-2008-02-27 Roland Levillain <roland(a)lrde.epita.fr>
-
- Fix the pretty-printer of util::internal::graph_base.
-
- * milena/mln/util/internal/graph_base.hh (node<void>::edges):
- Use a std::vector (as in node<T>), not a std::list.
- (util::internal::graph_base<N, E>::print_debug): Fix the iteration
- on the edges adjacent to a vertex.
- * milena/tests/core/graph_image.cc: Exercise
- util::internal::graph_base<N, E>::print_debug
-
2008-02-20 Roland Levillain <roland(a)lrde.epita.fr>
Update the list of Makefiles to be configured.
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Speed up iterations on line graph neighborhoods.
* mln/core/line_graph_neighborhood_piter.hh
(mln::line_graph_neighborhood_fwd_piter::neighbors_t)
(mln::line_graph_neighborhood_bkd_piter::neighbors_t):
New typedefs.
(mln::line_graph_neighborhood_fwd_piter::first_)
(mln::line_graph_neighborhood_fwd_piter::step_)
(mln::line_graph_neighborhood_fwd_piter::adjacent_or_equal_to_p_ref_)
(mln::line_graph_neighborhood_bkd_piter::first_)
(mln::line_graph_neighborhood_bkd_piter::step_)
(mln::line_graph_neighborhood_bkd_piter::adjacent_or_equal_to_p_ref_):
Remove methods.
(mln::line_graph_neighborhood_fwd_piter::id_)
(mln::line_graph_neighborhood_bkd_piter::id_):
Remove attributes.
(mln::line_graph_neighborhood_fwd_piter::saved_p_ref_)
(mln::line_graph_neighborhood_fwd_piter::neighbors_)
(mln::line_graph_neighborhood_fwd_piter::i_)
(mln::line_graph_neighborhood_bkd_piter::saved_p_ref_)
(mln::line_graph_neighborhood_bkd_piter::neighbors_)
(mln::line_graph_neighborhood_bkd_piter::i_):
New attributes.
(line_graph_neighborhood_fwd_piter)
(line_graph_neighborhood_bkd_piter):
Adjust ctors.
(mln::line_graph_neighborhood_fwd_piter::p_ref)
(mln::line_graph_neighborhood_fwd_piter::plg)
(mln::line_graph_neighborhood_fwd_piter::neighbors)
(mln::line_graph_neighborhood_bkd_piter::p_ref)
(mln::line_graph_neighborhood_bkd_piter::plg)
(mln::line_graph_neighborhood_bkd_piter::neighbors):
New accessors.
(mln::line_graph_neighborhood_fwd_piter::is_valid)
(mln::line_graph_neighborhood_fwd_piter::invalidate)
(mln::line_graph_neighborhood_fwd_piter::start)
(mln::line_graph_neighborhood_fwd_piter::next_)
(mln::line_graph_neighborhood_bkd_piter::is_valid)
(mln::line_graph_neighborhood_bkd_piter::invalidate)
(mln::line_graph_neighborhood_bkd_piter::start)
(mln::line_graph_neighborhood_bkd_piter::next_):
Change the algorithms used in these routines, so that they use a
list of computed neighbors (new member neighbors_) instead of
iterating over the whole set of edges.
(mln::line_graph_neighborhood_fwd_piter::update_)
(mln::line_graph_neighborhood_bkd_piter::update_):
Adjust.
* mln/core/line_graph_elt_neighborhood.hh: Catch up with the new
interface of piters on line graph neighborhoods.
(mln::line_graph_elt_neighborhood::neighbors_t):
New typedef.
(mln::line_graph_elt_neighborhood::start)
(mln::line_graph_elt_neighborhood::next_):
Remove methods.
(mln::line_graph_elt_neighborhood::compute_neighbors_):
New method.
line_graph_elt_neighborhood.hh | 58 ++++----
line_graph_neighborhood_piter.hh | 262 ++++++++++++++++++---------------------
2 files changed, 158 insertions(+), 162 deletions(-)
Index: mln/core/line_graph_neighborhood_piter.hh
--- mln/core/line_graph_neighborhood_piter.hh (revision 1854)
+++ mln/core/line_graph_neighborhood_piter.hh (working copy)
@@ -42,6 +42,8 @@
- mln::line_graph_window_bkd_piter
- mln::line_graph_neighborhood_bkd_piter. */
+# include <set>
+
# include <mln/core/concept/point_iterator.hh>
# include <mln/core/p_line_graph.hh>
# include <mln/core/line_graph_psite.hh>
@@ -80,6 +82,9 @@
// FIXME: Dummy typedef.
typedef void mesh;
+ // The type of the set of neighbors (adjacent edge ids).
+ typedef std::set<util::edge_id> neighbors_t;
+
public:
/// Construction.
/// \{
@@ -114,28 +119,31 @@
/// Convert the iterator into a line graph psite.
operator psite() const;
+ /// Return the reference psite.
+ const psite& p_ref() const;
+ /// Return the mln::p_line_graph corresponding to this piter.
+ const p_line_graph<P>& plg() const;
+ /// Return the set of neighbors (adjacent edge ids).
+ neighbors_t& neighbors();
+
/// Read-only access to the \a i-th coordinate.
// FIXME: Dummy.
coord operator[](unsigned i) const;
/// \}
- /// Internals, used by the neighborhood.
- /// \{
- public:
- /// Set the iterator to the first site of the graph.
- void first_();
- /// Advance the position of the iterator by one step.
- void step_();
-
- /// An internal iterator on the set of edges of the underlying graph.
- util::edge_id id_;
- /// \}
-
private:
/// The neighborhood.
const N& nbh_;
/// The ``central'' psite of the neighborhood.
const psite& p_ref_;
+
+ /// The last reference psite whose ajacent psites have been computed.
+ psite saved_p_ref_;
+ /// The set of edge ids adjacent to the reference psite.
+ neighbors_t neighbors_;
+ /// An iterator on the set of adjacent edges.
+ neighbors_t::const_iterator i_;
+
/// The psite corresponding to this iterator.
psite psite_;
/// The point corresponding to this iterator.
@@ -178,6 +186,9 @@
// FIXME: Dummy typedef.
typedef void mesh;
+ // The type of the set of neighbors (adjacent edge ids).
+ typedef std::set<util::edge_id> neighbors_t;
+
public:
/// Construction.
/// \{
@@ -212,28 +223,31 @@
/// Convert the iterator into a line graph psite.
operator psite() const;
+ /// Return the reference psite.
+ const psite& p_ref() const;
+ /// Return the mln::p_line_graph corresponding to this piter.
+ const p_line_graph<P>& plg() const;
+ /// Return the set of neighbors (adjacent edge ids).
+ neighbors_t& neighbors();
+
/// Read-only access to the \a i-th coordinate.
// FIXME: Dummy.
coord operator[](unsigned i) const;
/// \}
- /// Internals, used by the neighborhood.
- /// \{
- public:
- /// Set the iterator to the first site of the graph.
- void first_();
- /// Advance the position of the iterator by one step.
- void step_();
-
- /// An internal iterator on the set of edges of the underlying graph.
- util::edge_id id_;
- /// \}
-
private:
/// The neighborhood.
const N& nbh_;
/// The ``central'' psite of the neighborhood.
const psite& p_ref_;
+
+ /// The last reference psite whose ajacent psites have been computed.
+ psite saved_p_ref_;
+ /// The set of edge ids adjacent to the reference psite.
+ neighbors_t neighbors_;
+ /// An iterator on the set of adjacent edges.
+ neighbors_t::const_reverse_iterator i_;
+
/// The psite corresponding to this iterator.
psite psite_;
/// The point corresponding to this iterator.
@@ -260,7 +274,6 @@
| line_graph_neighborhood_fwd_piter<P, N>. |
`------------------------------------------*/
- // FIXME: Currently, argument nbh is ignored.
template <typename P, typename N>
template <typename Pref>
inline
@@ -271,7 +284,7 @@
// Initialize psite_ to a dummy value.
psite_()
{
- // Invalidate id_.
+ // Invalidate i_.
invalidate();
}
@@ -280,10 +293,14 @@
bool
line_graph_neighborhood_fwd_piter<P, N>::is_valid() const
{
- // FIXME: We depend too much on the implementation of util::graph
- // here. The util::graph should provide the service to abstract
- // these manipulations.
- return p_ref_.is_valid() && id_ < p_ref_.plg().gr_->nedges();
+ return
+ // The reference point must be valid...
+ p_ref_.is_valid()
+ // ...and must not have changed since the neighborhood has been
+ // computed...
+ && p_ref_ == saved_p_ref_
+ // ...and the iterator i_ must point a valid value.
+ && i_ != neighbors_.end();
}
template <typename P, typename N>
@@ -291,7 +308,7 @@
void
line_graph_neighborhood_fwd_piter<P, N>::invalidate()
{
- id_ = -1;
+ i_ = neighbors_.end();
}
template <typename P, typename N>
@@ -299,7 +316,15 @@
void
line_graph_neighborhood_fwd_piter<P, N>::start()
{
- nbh_.start(*this);
+ mln_precondition(p_ref_.is_valid());
+ // Update the neighbors, if needed.
+ if (!saved_p_ref_.is_valid() || p_ref_ != saved_p_ref_)
+ {
+ saved_p_ref_ = p_ref_;
+ nbh_.compute_neighbors_(*this);
+ }
+ i_ = neighbors_.begin();
+ // FIXME: We might move the is_valid condition within update_.
if (is_valid())
update_();
}
@@ -309,7 +334,10 @@
void
line_graph_neighborhood_fwd_piter<P, N>::next_()
{
- nbh_.next_(*this);
+ // Ensure the p_ref_ has not changed.
+ mln_precondition(p_ref_ == saved_p_ref_);
+ ++i_;
+ // FIXME: We might move the is_valid condition within update_.
if (is_valid())
update_();
}
@@ -317,84 +345,58 @@
template <typename P, typename N>
inline
void
- line_graph_neighborhood_fwd_piter<P, N>::first_()
+ line_graph_neighborhood_fwd_piter<P, N>::update_()
{
- id_ = 0;
+ // Update psite_.
+ psite_ = line_graph_psite<P>(plg(), *i_);
}
template <typename P, typename N>
inline
- void
- line_graph_neighborhood_fwd_piter<P, N>::step_()
+ const P&
+ line_graph_neighborhood_fwd_piter<P, N>::to_point() const
{
- ++id_;
+ return p_;
}
-
template <typename P, typename N>
inline
- bool
- line_graph_neighborhood_fwd_piter<P, N>::adjacent_or_equal_to_p_ref_() const
+ const line_graph_psite<P>&
+ line_graph_neighborhood_fwd_piter<P, N>::to_psite() const
{
- // Check wether the iterator points to P_REF_.
- if (id_ == p_ref_.id())
- return true;
-
- // Check whether the iterator is among the neighbors of P_REF_.
- {
- // Paranoid assertion.
- assert (p_ref_.id() < p_ref_.plg().gr_->nedges());
- /* FIXME: We should have a convenient shortcut for these
- repetitive accesses to p_ref_.plg().gr_ (e.g., a method gr()
- or g() in this class. */
- const util::tracked_ptr<typename p_line_graph<P>::graph>& gr =
- p_ref_.plg().gr_;
- // Check whether the edge this iterator points to is adjacent to
- // the one p_ref points to, by comparing their ajacent nodes.
- /* FIXME: This is too low-level. Yet another service the graph
- // should provide. */
- if (gr->edge(id_).n1() == gr->edge(p_ref_.id()).n1() ||
- gr->edge(id_).n1() == gr->edge(p_ref_.id()).n2() ||
- gr->edge(id_).n2() == gr->edge(p_ref_.id()).n1() ||
- gr->edge(id_).n2() == gr->edge(p_ref_.id()).n2())
- return true;
- }
-
- // Otherwise, the iterator is not adjacent to P_REF_.
- return false;
+ return psite_;
}
template <typename P, typename N>
inline
- void
- line_graph_neighborhood_fwd_piter<P, N>::update_()
+ line_graph_neighborhood_fwd_piter<P, N>::operator line_graph_psite<P> () const
{
- // Update psite_.
- psite_ = line_graph_psite<P>(p_ref_.plg(), id_);
+ mln_precondition(is_valid());
+ return psite_;
}
template <typename P, typename N>
inline
- const P&
- line_graph_neighborhood_fwd_piter<P, N>::to_point() const
+ const line_graph_psite<P>&
+ line_graph_neighborhood_fwd_piter<P, N>::p_ref() const
{
- return p_;
+ return p_ref_;
}
template <typename P, typename N>
inline
- const line_graph_psite<P>&
- line_graph_neighborhood_fwd_piter<P, N>::to_psite() const
+ const p_line_graph<P>&
+ line_graph_neighborhood_fwd_piter<P, N>::plg() const
{
- return psite_;
+ return p_ref_.plg();
}
template <typename P, typename N>
inline
- line_graph_neighborhood_fwd_piter<P, N>::operator line_graph_psite<P> () const
+ std::set<util::edge_id>&
+ line_graph_neighborhood_fwd_piter<P, N>::neighbors()
{
- mln_precondition(is_valid());
- return psite_;
+ return neighbors_;
}
template <typename P, typename N>
@@ -420,7 +422,6 @@
| line_graph_neighborhood_bkd_piter<P, N>. |
`------------------------------------------*/
- // FIXME: Currently, argument nbh is ignored.
template <typename P, typename N>
template <typename Pref>
inline
@@ -431,7 +432,7 @@
// Initialize psite_ to a dummy value.
psite_()
{
- // Invalidate id_.
+ // Invalidate i_.
invalidate();
}
@@ -440,10 +441,14 @@
bool
line_graph_neighborhood_bkd_piter<P, N>::is_valid() const
{
- // FIXME: We depend too much on the implementation of util::graph
- // here. The util::graph should provide the service to abstract
- // these manipulations.
- return p_ref_.is_valid() && id_ < p_ref_.plg().gr_->nedges();
+ return
+ // The reference point must be valid...
+ p_ref_.is_valid()
+ // ...and must not have changed since the neighborhood has been
+ // computed...
+ && p_ref_ == saved_p_ref_
+ // ...and the iterator i_ must point a valid value.
+ && i_ != neighbors_.rend();
}
template <typename P, typename N>
@@ -451,7 +456,7 @@
void
line_graph_neighborhood_bkd_piter<P, N>::invalidate()
{
- id_ = -1;
+ i_ = neighbors_.rend();
}
template <typename P, typename N>
@@ -459,7 +464,15 @@
void
line_graph_neighborhood_bkd_piter<P, N>::start()
{
- nbh_.start(*this);
+ mln_precondition(p_ref_.is_valid());
+ // Update the neighbors, if needed.
+ if (!saved_p_ref_.is_valid() || p_ref_ != saved_p_ref_)
+ {
+ saved_p_ref_ = p_ref_;
+ nbh_.compute_neighbors_(*this);
+ }
+ i_ = neighbors_.rbegin();
+ // FIXME: We might move the is_valid condition within update_.
if (is_valid())
update_();
}
@@ -469,7 +482,10 @@
void
line_graph_neighborhood_bkd_piter<P, N>::next_()
{
- nbh_.next_(*this);
+ // Ensure the p_ref_ has not changed.
+ mln_precondition(p_ref_ == saved_p_ref_);
+ ++i_;
+ // FIXME: We might move the is_valid condition within update_.
if (is_valid())
update_();
}
@@ -477,84 +493,58 @@
template <typename P, typename N>
inline
void
- line_graph_neighborhood_bkd_piter<P, N>::first_()
+ line_graph_neighborhood_bkd_piter<P, N>::update_()
{
- id_ = p_ref_.plg().gr_->nedges() - 1;
+ // Update psite_.
+ psite_ = line_graph_psite<P>(plg(), *i_);
}
template <typename P, typename N>
inline
- void
- line_graph_neighborhood_bkd_piter<P, N>::step_()
+ const P&
+ line_graph_neighborhood_bkd_piter<P, N>::to_point() const
{
- --id_;
+ return p_;
}
-
template <typename P, typename N>
inline
- bool
- line_graph_neighborhood_bkd_piter<P, N>::adjacent_or_equal_to_p_ref_() const
+ const line_graph_psite<P>&
+ line_graph_neighborhood_bkd_piter<P, N>::to_psite() const
{
- // Check wether the iterator points to P_REF_.
- if (id_ == p_ref_.id())
- return true;
-
- // Check whether the iterator is among the neighbors of P_REF_.
- {
- // Paranoid assertion.
- assert (p_ref_.id() < p_ref_.plg().gr_->nedges());
- /* FIXME: We should have a convenient shortcut for these
- repetitive accesses to p_ref_.plg().gr_ (e.g., a method gr()
- or g() in this class. */
- const util::tracked_ptr<typename p_line_graph<P>::graph>& gr =
- p_ref_.plg().gr_;
- // Check whether the edge this iterator points to is adjacent to
- // the one p_ref points to, by comparing their ajacent nodes.
- /* FIXME: This is too low-level. Yet another service the graph
- // should provide. */
- if (gr->edge(id_).n1() == gr->edge(p_ref_.id()).n1() ||
- gr->edge(id_).n1() == gr->edge(p_ref_.id()).n2() ||
- gr->edge(id_).n2() == gr->edge(p_ref_.id()).n1() ||
- gr->edge(id_).n2() == gr->edge(p_ref_.id()).n2())
- return true;
- }
-
- // Otherwise, the iterator is not adjacent to P_REF_.
- return false;
+ return psite_;
}
template <typename P, typename N>
inline
- void
- line_graph_neighborhood_bkd_piter<P, N>::update_()
+ line_graph_neighborhood_bkd_piter<P, N>::operator line_graph_psite<P> () const
{
- // Update psite_.
- psite_ = line_graph_psite<P>(p_ref_.plg(), id_);
+ mln_precondition(is_valid());
+ return psite_;
}
template <typename P, typename N>
inline
- const P&
- line_graph_neighborhood_bkd_piter<P, N>::to_point() const
+ const line_graph_psite<P>&
+ line_graph_neighborhood_bkd_piter<P, N>::p_ref() const
{
- return p_;
+ return p_ref_;
}
template <typename P, typename N>
inline
- const line_graph_psite<P>&
- line_graph_neighborhood_bkd_piter<P, N>::to_psite() const
+ const p_line_graph<P>&
+ line_graph_neighborhood_bkd_piter<P, N>::plg() const
{
- return psite_;
+ return p_ref_.plg();
}
template <typename P, typename N>
inline
- line_graph_neighborhood_bkd_piter<P, N>::operator line_graph_psite<P> () const
+ std::set<util::edge_id>&
+ line_graph_neighborhood_bkd_piter<P, N>::neighbors()
{
- mln_precondition(is_valid());
- return psite_;
+ return neighbors_;
}
template <typename P, typename N>
Index: mln/core/line_graph_elt_neighborhood.hh
--- mln/core/line_graph_elt_neighborhood.hh (revision 1854)
+++ mln/core/line_graph_elt_neighborhood.hh (working copy)
@@ -29,7 +29,7 @@
# define MLN_CORE_LINE_GRAPH_ELT_NEIGHBORHOOD_HH
/// \file mln/core/line_graph_elt_neighborhood.hh
-/// \brief Definition of the elementary ``window'' on a line graph.
+/// \brief Definition of the elementary ``neighborhood'' on a line graph.
/* FIXME: Have a consistent naming: we have window (without '_') but
point_, neighb_, etc. */
@@ -40,6 +40,8 @@
- mln::line_graph_elt_window
- mln::line_graph_elt_neighborhood. */
+# include <set>
+
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/line_graph_psite.hh>
# include <mln/core/line_graph_neighborhood_piter.hh>
@@ -66,6 +68,9 @@
typedef P point;
/// The type of psite corresponding to the neighborhood.
typedef line_graph_psite<P> psite;
+ // The type of the set of neighbors (edge ids adjacent to the
+ // reference psite).
+ typedef std::set<util::edge_id> neighbors_t;
// FIXME: This is a dummy value.
typedef void dpoint;
@@ -84,43 +89,44 @@
/// Services for iterators.
/// \{
- /// Move \a piter to the beginning of the iteration on this neighborhood.
- template <typename Piter>
- void start(Point_Iterator<Piter>& piter) const;
- /// Move \a piter to the next site on this neighborhood.
template <typename Piter>
- void next_(Point_Iterator<Piter>& piter) const;
+ void compute_neighbors_(Point_Iterator<Piter>& piter) const;
/// \}
};
-# ifndef MLN_INCLUDE_ONLY
- template <typename P>
- template <typename Piter>
- inline
- void
- line_graph_elt_neighborhood<P>::start(Point_Iterator<Piter>& piter_) const
- {
- Piter& piter = exact(piter_);
- piter.first_();
- if (!piter.adjacent_or_equal_to_p_ref_())
- next_(piter);
- }
+
+# ifndef MLN_INCLUDE_ONLY
template <typename P>
template <typename Piter>
inline
void
- line_graph_elt_neighborhood<P>::next_(Point_Iterator<Piter>& piter_) const
+ line_graph_elt_neighborhood<P>::compute_neighbors_(Point_Iterator<Piter>& piter_) const
{
Piter& piter = exact(piter_);
- /* FIXME: This is inefficient. The graph structure should be able
- to produce the set of adjacent nodes fast. Boost Graphs
- probably provides adequates structures to fetch these
- neighbors in constant time. */
- do
- piter.step_();
- while (piter.is_valid() && !piter.adjacent_or_equal_to_p_ref_());
+ neighbors_t& neighbors = piter.neighbors();
+ neighbors.clear();
+ // Add the reference piter itself. We might reconsider this, or
+ // create an elementary neighbors without the reference point.
+ neighbors.insert(piter.p_ref().id());
+ /* FIXME: Move this computation out of the window. In fact,
+ this should be a service of the graph, also proposed by the
+ p_line_graph. */
+ // Ajacent edges connected through node 1.
+ // FIXME: Far too low-level.
+ util::node_id id1 = piter.p_ref().first_id();
+ const util::node<P>& node1 = piter.plg().gr_->node(id1);
+ for (std::vector<util::edge_id>::const_iterator e =
+ node1.edges.begin(); e != node1.edges.end(); ++e)
+ neighbors.insert(*e);
+ // Ajacent edges connected through node 2.
+ // FIXME: Likewise.
+ util::node_id id2 = piter.p_ref().second_id();
+ const util::node<P>& node2 = piter.plg().gr_->node(id2);
+ for (std::vector<util::edge_id>::const_iterator e =
+ node2.edges.begin(); e != node2.edges.end(); ++e)
+ neighbors.insert(*e);
}
# endif // ! MLN_INCLUDE_ONLY
1
0