@Override
  public HuffmanNode merge(HuffmanNode right) {
    HuffmanNode parent = new HuffmanNeuron(frequency + right.getFrequency(), vector.length);

    parentNeuron = parent;
    this.code = 0;
    right.setParent(parent);
    right.setCode(1);
    return parent;
  }
 @Override
 public int compareTo(HuffmanNode hn) {
   if (frequency > hn.getFrequency()) {
     return 1;
   } else {
     return -1;
   }
 }