Browse Source

Paul: Überarbeitung getElement

master
paul-anton.engel@informatik.hs-fulda.de 1 year ago
parent
commit
2e8d4efb96
  1. 9
      SparseVector.java

9
SparseVector.java

@ -69,16 +69,13 @@ public class SparseVector {
Node now = this.head;
while (now != null && now.index < index) {
if (now != null && now.index == index) {
return now.value;
}
now = now.next;
}
if (now != null && now.index == index) {
double result = now.value;
return result;
}
return 0.0;
}

Loading…
Cancel
Save