Skip to content
Snippets Groups Projects
Commit 3ec14e00 authored by Simon Könnecke's avatar Simon Könnecke
Browse files

add q-digest data structure

parent c9ca1bb8
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,10 @@
<artifactId>jgraphx</artifactId>
<version>1.10.1.3</version>
</dependency>
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil</artifactId>
<version>7.0.12</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -21,6 +21,9 @@ import java.util.concurrent.ConcurrentLinkedQueue;
public class WalletImpl extends AbstractWallet {
private static final double sCompression = 0.7;
private QDigest qDigest = new QDigest(sCompression);
private ActorRef preKnownNeighbour;
private ActorRef remoteSuperVisorActor;
private transient WalletGuiControl gui;
......@@ -51,6 +54,7 @@ public class WalletImpl extends AbstractWallet {
*/
public void addAmount(int amount) {
setAmount(this.getAmount() + amount);
qDigest.offer(amount);
addLogMsg(" My amount is now " + this.getAmount());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment