@@ -0,0 +1,1310 @@
+package com.k13n.lt_codes;%0A%0Aimport java.util.Random;%0Aimport java.util.List;%0Aimport java.util.ArrayList;%0A%0Apublic final class Decoder %7B%0A  %0A  private final Random uniformRNG;%0A  private final int nPackets;%0A  private final List%3CPacket%3E receivedPackets;%0A%0A  private final class Packet %7B%0A    private final byte%5B%5D data;%0A    private final int%5B%5D neighbours;%0A%0A    public Packet(byte%5B%5D data, int%5B%5D neighbours) %7B%0A      this.data = data;%0A      this.neighbours = neighbours;%0A    %7D%0A%0A    public byte%5B%5D getData() %7B%0A      return this.data;%0A    %7D%0A%0A    public int%5B%5D getNeighbours() %7B%0A      return this.neighbours;%0A    %7D%0A    %0A  %7D%0A%0A  %0A  public Decoder(long seed, int nPackets)%0A  %7B%0A    this.uniformRNG = new Random(seed);%0A    this.nPackets = nPackets;%0A    this.receivedPackets = new ArrayList%3CPacket%3E();%0A  %7D%0A%0A  public byte%5B%5D receive(byte%5B%5D data, int%5B%5D neighbours)%0A  %7B%0A    this.receivedPackets.add(new Packet(data, neighbours));%0A%0A    /* No way we could encode anything */%0A    if(this.receivedPackets.size() %3C this.nPackets) %7B%0A%0A      return null;%0A    %7D else %7B%0A      /* we need a great deal more than k = this.nPackets,%0A       * but for anything %3E k, we give it a try.%0A       * Yes, this means that work is done for nothing%0A       * FIXME: use exact lower bounds here%0A       *%0A       */%0A%0A      /* ... */%0A%0A      return null;%0A    %7D%0A%0A  %7D%0A%0A%7D%0A

Add decoder stub