Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
pylene
Commits
56175832
Commit
56175832
authored
Oct 11, 2021
by
Baptiste Esteban
Browse files
Starting solving compile error on windows
parent
8d7a72d5
Pipeline
#30539
canceled with stages
in 14 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pylene/src/morpho/trees_fusion.cpp
View file @
56175832
...
@@ -7,7 +7,8 @@ namespace mln::morpho::details
...
@@ -7,7 +7,8 @@ namespace mln::morpho::details
{
{
namespace
namespace
{
{
std
::
vector
<
int
>
smallest_enclosing_shape
(
const
auto
&
ti
,
auto
ni
,
const
auto
&
tj
,
auto
nj
,
const
auto
&
depth
)
std
::
vector
<
int
>
smallest_enclosing_shape
(
const
component_tree
<>&
ti
,
image2d
<
int
>
ni
,
const
component_tree
<>&
tj
,
image2d
<
int
>
nj
,
const
std
::
vector
<
int
>&
depth
)
{
{
const
auto
lca
=
[
&
depth
,
&
tj
](
int
a
,
int
b
)
{
const
auto
lca
=
[
&
depth
,
&
tj
](
int
a
,
int
b
)
{
if
(
a
<
0
)
if
(
a
<
0
)
...
@@ -43,7 +44,7 @@ namespace mln::morpho::details
...
@@ -43,7 +44,7 @@ namespace mln::morpho::details
static
constexpr
int
PERMANENT
=
2
;
static
constexpr
int
PERMANENT
=
2
;
std
::
vector
<
int
>
res
(
g
.
size
());
std
::
vector
<
int
>
res
(
g
.
size
());
int
cur
=
g
.
size
()
-
1
;
int
cur
=
static_cast
<
int
>
(
g
.
size
()
)
-
1
;
std
::
vector
<
int
>
visited
(
g
.
size
(),
UNMARKED
);
std
::
vector
<
int
>
visited
(
g
.
size
(),
UNMARKED
);
std
::
stack
<
int
>
st
;
std
::
stack
<
int
>
st
;
...
@@ -81,8 +82,8 @@ namespace mln::morpho::details
...
@@ -81,8 +82,8 @@ namespace mln::morpho::details
compute_inclusion_graph
(
component_tree
<>*
trees
,
image2d
<
int
>*
nodemaps
,
std
::
vector
<
int
>*
depths
,
int
ntrees
)
compute_inclusion_graph
(
component_tree
<>*
trees
,
image2d
<
int
>*
nodemaps
,
std
::
vector
<
int
>*
depths
,
int
ntrees
)
{
{
std
::
vector
<
std
::
vector
<
int
>>
tree_to_graph
(
ntrees
);
// Link tree node -> graph node
std
::
vector
<
std
::
vector
<
int
>>
tree_to_graph
(
ntrees
);
// Link tree node -> graph node
std
::
vector
<
std
::
set
<
int
>>
graph
(
1
);
// The graph (the container of out vertices is a set since there can only be
one
std
::
vector
<
std
::
set
<
int
>>
graph
(
1
);
// The graph (the container of out vertices is a set since there can only be
//
edge between two nodes, with ensure faster result for removing)
// one
edge between two nodes, with ensure faster result for removing)
// FIXME: to replace
// FIXME: to replace
// Graph routine, to make the code readable
// Graph routine, to make the code readable
const
auto
num_vertices
=
[
&
graph
]()
->
int
{
return
graph
.
size
();
};
const
auto
num_vertices
=
[
&
graph
]()
->
int
{
return
graph
.
size
();
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment