Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
droplet-sequence-generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
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
pedatestcontrib
droplet-sequence-generator
Commits
13b5c101
Commit
13b5c101
authored
7 years ago
by
Peter Wagenhuber
Browse files
Options
Downloads
Patches
Plain Diff
added function to initialize the bifurcation table with all bifurcs on desired path
parent
23b098f7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/BFTableEntry.java
+57
-0
57 additions, 0 deletions
src/BFTableEntry.java
src/Channel.java
+4
-0
4 additions, 0 deletions
src/Channel.java
src/Nloc.java
+17
-0
17 additions, 0 deletions
src/Nloc.java
with
78 additions
and
0 deletions
src/BFTableEntry.java
0 → 100644
+
57
−
0
View file @
13b5c101
package
nloc
;
public
class
BFTableEntry
{
private
int
minTimediff
,
maxTimediff
;
private
int
noOfDroplets
;
private
int
bfPathPriority
;
private
int
bfMinSteps
;
public
BFTableEntry
(
int
bfPathPriority
,
int
bfMinSteps
)
{
this
.
minTimediff
=
Nloc
.
MIN_TIMEDIFF
;
this
.
maxTimediff
=
Nloc
.
MIN_TIMEDIFF
+
2
;
this
.
noOfDroplets
=
1
;
this
.
bfMinSteps
=
bfMinSteps
;
this
.
bfPathPriority
=
bfPathPriority
;
}
public
int
getMinTimediff
()
{
return
minTimediff
;
}
public
int
getMaxTimediff
()
{
return
maxTimediff
;
}
public
int
getNoOfDroplets
()
{
return
noOfDroplets
;
}
public
int
getBfPathPriority
()
{
return
bfPathPriority
;
}
public
int
getBfMinSteps
()
{
return
bfMinSteps
;
}
public
void
setMinTimediff
(
int
minTimediff
)
{
this
.
minTimediff
=
minTimediff
;
}
public
void
setMaxTimediff
(
int
maxTimediff
)
{
this
.
maxTimediff
=
maxTimediff
;
}
public
void
setNoOfDroplets
(
int
noOfDroplets
)
{
this
.
noOfDroplets
=
noOfDroplets
;
}
public
void
setBfPathPriority
(
int
bfPathPriority
)
{
this
.
bfPathPriority
=
bfPathPriority
;
}
public
void
setBfMinSteps
(
int
bfMinSteps
)
{
this
.
bfMinSteps
=
bfMinSteps
;
}
}
This diff is collapsed.
Click to expand it.
src/Channel.java
+
4
−
0
View file @
13b5c101
...
...
@@ -114,6 +114,10 @@ public class Channel extends NlocEntity implements Comparable<Channel> {
return
parents
;
}
public
boolean
isBifurcation
()
{
return
(!(
this
instanceof
Pump
)
&&
children
.
size
()
>
1
);
}
public
int
compareTo
(
Channel
other
)
{
if
(
this
.
getPSteps
()
<
other
.
getPSteps
())
{
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
src/Nloc.java
+
17
−
0
View file @
13b5c101
...
...
@@ -67,6 +67,23 @@ public class Nloc {
}
}
public
List
<
BFTableEntry
>
initializeBifTable
(
List
<
Channel
>
desiredPath
)
{
List
<
BFTableEntry
>
bftable
=
new
ArrayList
<
BFTableEntry
>();
ListIterator
<
Channel
>
iter
=
path
.
listIterator
();
while
(
iter
.
hasNext
())
{
Channel
current
=
iter
.
next
();
if
(
current
.
isBifurcation
())
{
Channel
following
=
iter
.
next
();
int
prio
=
current
.
getChildrenList
().
indexOf
(
following
)
+
1
;
int
bfMinSteps
=
current
.
getChildrenList
().
get
(
0
).
getHSteps
();
bftable
.
add
(
new
BFTableEntry
(
prio
,
bfMinSteps
));
iter
.
previous
();
}
}
return
bftable
;
}
//public Pump generateDropletSequence(List<String> modules)
// throws NlocStructureException {
...
...
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