// Path: src/main/java/sssj/index/L2APPostingEntry.java
// public class L2APPostingEntry {
//   protected long id;
//   protected double weight;
//   protected double magnitude;
// 
//   public L2APPostingEntry() {
//     this(0, 0, 0);
//   }
// 
//   public L2APPostingEntry(long id, double weight, double magnitude) {
//     this.id = id;
//     this.weight = weight;
//     this.magnitude = magnitude;
//   }
// 
//   public void setID(long id) {
//     this.id = id;
//   }
// 
//   public void setWeight(double weight) {
//     this.weight = weight;
//   }
// 
//   public void setMagnitude(double magnitude) {
//     this.magnitude = magnitude;
//   }
// 
//   public long id() {
//     return id;
//   }
// 
//   public double weight() {
//     return weight;
//   }
// 
//   public double magnitude() {
//     return magnitude;
//   }
// 
//   @Override
//   public String toString() {
//     return "[" + id + " -> " + weight + " (" + magnitude + ")]";
//   }
// }


import it.unimi.dsi.fastutil.doubles.DoubleArrayList;
import it.unimi.dsi.fastutil.longs.LongArrayList;
import java.util.Iterator;
import sssj.index.L2APPostingEntry;
package sssj.index.minibatch.component;




public class L2APPostingList implements Iterable<L2APPostingEntry> {
  private final LongArrayList ids = new LongArrayList();
  private final DoubleArrayList weights = new DoubleArrayList();
  private final DoubleArrayList magnitudes = new DoubleArrayList();

  public void add(long vectorID, double weight, double magnitude) {
    ids.add(vectorID);
    weights.add(weight);
    magnitudes.add(magnitude);
  }

  public int size() {
    return ids.size();
  }

  @Override
  public String toString() {
    return "[ids=" + ids + ", weights=" + weights + ", magnitudes=" + magnitudes + "]";
  }

  @Override
  public Iterator<L2APPostingEntry> iterator() {
    return new Iterator<L2APPostingEntry>() {
      private final L2APPostingEntry entry = new L2APPostingEntry();
      private int i = 0;

      @Override
      public boolean hasNext() {
        return i < ids.size();
      }

      @Override
// Path: src/main/java/sssj/index/L2APPostingEntry.java
// public class L2APPostingEntry {
//   protected long id;
//   protected double weight;
//   protected double magnitude;
// 
//   public L2APPostingEntry() {
//     this(0, 0, 0);
//   }
// 
//   public L2APPostingEntry(long id, double weight, double magnitude) {
//     this.id = id;
//     this.weight = weight;
//     this.magnitude = magnitude;
//   }
// 
//   public void setID(long id) {
//     this.id = id;
//   }
// 
//   public void setWeight(double weight) {
//     this.weight = weight;
//   }
// 
//   public void setMagnitude(double magnitude) {
//     this.magnitude = magnitude;
//   }
// 
//   public long id() {
//     return id;
//   }
// 
//   public double weight() {
//     return weight;
//   }
// 
//   public double magnitude() {
//     return magnitude;
//   }
// 
//   @Override
//   public String toString() {
//     return "[" + id + " -> " + weight + " (" + magnitude + ")]";
//   }
// }


// Path: src/main/java/sssj/index/minibatch/component/L2APPostingList.java
import it.unimi.dsi.fastutil.doubles.DoubleArrayList;
import it.unimi.dsi.fastutil.longs.LongArrayList;
import java.util.Iterator;
import sssj.index.L2APPostingEntry;

package sssj.index.minibatch.component;




public class L2APPostingList implements Iterable<L2APPostingEntry> {
  private final LongArrayList ids = new LongArrayList();
  private final DoubleArrayList weights = new DoubleArrayList();
  private final DoubleArrayList magnitudes = new DoubleArrayList();

  public void add(long vectorID, double weight, double magnitude) {
    ids.add(vectorID);
    weights.add(weight);
    magnitudes.add(magnitude);
  }

  public int size() {
    return ids.size();
  }

  @Override
  public String toString() {
    return "[ids=" + ids + ", weights=" + weights + ", magnitudes=" + magnitudes + "]";
  }

  @Override
  public Iterator<L2APPostingEntry> iterator() {
    return new Iterator<L2APPostingEntry>() {
      private final L2APPostingEntry entry = new L2APPostingEntry();
      private int i = 0;

      @Override
      public boolean hasNext() {
        return i < ids.size();
      }

      @Override
      public L2APPostingEntry next() {