Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
droplet-sequence-generator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Wagenhuber
droplet-sequence-generator
Commits
d5cfad4a
Commit
d5cfad4a
authored
8 years ago
by
Peter Wagenhuber
Browse files
Options
Downloads
Patches
Plain Diff
Jetzt geht das mit get all paths wieder
parent
230d2c53
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Channel.java
+1
-9
1 addition, 9 deletions
src/Channel.java
src/TestNloc.java
+11
-1
11 additions, 1 deletion
src/TestNloc.java
with
12 additions
and
10 deletions
src/Channel.java
+
1
−
9
View file @
d5cfad4a
...
...
@@ -114,19 +114,11 @@ public class Channel extends NlocEntity implements Comparable<Channel> {
return
parents
;
}
public
boolean
isBifurcation
()
{
return
children
.
size
()
>
1
;
}
public
boolean
isTeeIntersect
()
{
return
parents
.
size
()
>
1
;
}
public
int
compareTo
(
Channel
other
)
{
if
(
this
.
getPSteps
()
<
other
.
getPSteps
())
{
return
-
1
;
}
else
if
(
this
.
getPSteps
()
==
other
.
getPSteps
())
{
return
0
;
return
this
.
getName
().
compareTo
(
other
.
getName
())
;
}
else
{
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
src/TestNloc.java
+
11
−
1
View file @
d5cfad4a
...
...
@@ -13,6 +13,12 @@ public class TestNloc {
Nloc
nlS1
=
new
Nloc
(
getNlocS1
());
Nloc
nlS6
=
new
Nloc
(
getNlocS6
());
//Pump pum = nlS1.getPump();
//for (Channel ch: pum.getChildrenList()) {
// System.out.println("Child: " + ch.getName());
//}
//List<Channel> modPath = nlS1.getModulesByName(Arrays.asList("m2","d2","m1","f2","h1","m0","d1"));
List
<
List
<
Channel
>>
pathlist
=
nlS1
.
getAllPaths
();
//List<Channel> desiredPath = nlS1.getDesiredPath(modPath, pathlist);
...
...
@@ -24,7 +30,11 @@ public class TestNloc {
public
static
void
printPath
(
List
<
Channel
>
path
)
{
for
(
Channel
ch
:
path
)
{
System
.
out
.
print
(
ch
.
getName
()
+
" -> "
);
if
(
ch
instanceof
Sink
)
{
System
.
out
.
print
(
ch
.
getName
());
}
else
{
System
.
out
.
print
(
ch
.
getName
()
+
" -> "
);
}
}
System
.
out
.
println
(
""
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment