Skip to content
Snippets Groups Projects
Commit a8422a02 authored by Peter Wagenhuber's avatar Peter Wagenhuber
Browse files

just to push to server

parent eba56a3e
No related branches found
No related tags found
No related merge requests found
......@@ -94,6 +94,12 @@ public class Nloc {
// return tmpSeqs;
// }
public Pump getShortestSequence(String[] modulesToVisit) {
List<List<SequenceTuple>> possibleSequences =
getPossibleSequences(modulesToVisit);
}
public List<List<SequenceTuple>> getPossibleSequences(
String[] modulesToVisit) throws NoSuchModuleException {
......
......@@ -22,22 +22,6 @@ public class SequenceTuple {
this.path = path;
}
public static SequenceTuple merge(SequenceTuple first, SequenceTuple second) {
int min, max;
if (first.getMinPos() < second.getMinPos()) {
min = second.getMinPos();
} else {
min = first.getMinPos();
}
if (first.getMaxPos() > second.getMaxPos()) {
max = second.getMaxPos();
} else {
max = first.getMaxPos();
}
return new SequenceTuple(new Droplet(DropletType.HEADER), first.getPath(),
min, max);
}
public int getMinPos() {
return minPos;
}
......@@ -69,27 +53,4 @@ public class SequenceTuple {
public void setPath(List<Channel> path) {
this.path = path;
}
public boolean overlaps(SequenceTuple other) {
int max, min;
int otherMin = other.getMinPos();
int otherMax = other.getMaxPos();
if (maxPos > otherMax) {
max = maxPos;
} else {
max = otherMax;
}
if (minPos < otherMin) {
min = minPos;
} else {
min = otherMin;
}
int thisIntervalLen = maxPos - minPos;
int otherIntervalLen = otherMax - otherMin;
int overallIntervalLen = max - min;
return (thisIntervalLen + otherIntervalLen) <= overallIntervalLen;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment