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
230d2c53
Commit
230d2c53
authored
7 years ago
by
Peter Wagenhuber
Browse files
Options
Downloads
Patches
Plain Diff
erster test fuer getallpaths -> ging schief
parent
5f0b02dc
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/Nloc.java
+1
-1
1 addition, 1 deletion
src/Nloc.java
src/TestNloc.java
+10
-3
10 additions, 3 deletions
src/TestNloc.java
with
11 additions
and
4 deletions
src/Nloc.java
+
1
−
1
View file @
230d2c53
...
@@ -108,7 +108,7 @@ public class Nloc {
...
@@ -108,7 +108,7 @@ public class Nloc {
return
found
;
return
found
;
}
}
p
rivate
List
<
Channel
>
getModulesByName
(
List
<
String
>
names
)
{
p
ublic
List
<
Channel
>
getModulesByName
(
List
<
String
>
names
)
{
List
<
Channel
>
ret
=
new
ArrayList
<
Channel
>();
List
<
Channel
>
ret
=
new
ArrayList
<
Channel
>();
for
(
String
name
:
names
)
{
for
(
String
name
:
names
)
{
for
(
Channel
ch
:
chanlist
)
{
for
(
Channel
ch
:
chanlist
)
{
...
...
This diff is collapsed.
Click to expand it.
src/TestNloc.java
+
10
−
3
View file @
230d2c53
...
@@ -13,11 +13,18 @@ public class TestNloc {
...
@@ -13,11 +13,18 @@ public class TestNloc {
Nloc
nlS1
=
new
Nloc
(
getNlocS1
());
Nloc
nlS1
=
new
Nloc
(
getNlocS1
());
Nloc
nlS6
=
new
Nloc
(
getNlocS6
());
Nloc
nlS6
=
new
Nloc
(
getNlocS6
());
//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);
//printPath(desiredPath);
printPaths
(
pathlist
);
}
}
public
static
void
printPath
(
List
<
Channel
>
path
)
{
public
static
void
printPath
(
List
<
Channel
>
path
)
{
for
(
Channel
ch
:
path
)
{
for
(
Channel
ch
:
path
)
{
System
.
out
.
print
(
"ID: "
+
ch
.
get
ID
()
+
" "
);
System
.
out
.
print
(
ch
.
get
Name
()
+
"
->
"
);
}
}
System
.
out
.
println
(
""
);
System
.
out
.
println
(
""
);
}
}
...
@@ -100,7 +107,7 @@ public class TestNloc {
...
@@ -100,7 +107,7 @@ public class TestNloc {
d1
.
addChild
(
ch15
);
d1
.
addChild
(
ch15
);
ch15
.
addChild
(
s0
);
ch15
.
addChild
(
s0
);
return
ch
an
list
;
return
chlist
;
}
}
public
static
List
<
Channel
>
getNlocS6
()
{
public
static
List
<
Channel
>
getNlocS6
()
{
...
@@ -190,6 +197,6 @@ public class TestNloc {
...
@@ -190,6 +197,6 @@ public class TestNloc {
m5
.
addChild
(
ch20
);
m5
.
addChild
(
ch20
);
ch20
.
addChild
(
s0
);
ch20
.
addChild
(
s0
);
return
ch
an
list
;
return
chlist
;
}
}
}
}
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