Anonymous Anonymous - 17 days ago
130 0

No description

Java

brenner

public static ArrayList<String> BrennerHammingSet(ArrayList<String> M, int d){
      int i = 0;
      ArrayList<String> MI = M;
      ArrayList<String> MO = M;
      String s;
      while (MO!=MI||i<M.size()){
         MO = MI;
         s = MI.get(i);
         //System.out.println("S is: "+s);
         ArrayList<String> temp = new ArrayList<String>(M.subList(i+1,MI.size()));
         for (String a: temp){
            if (hammingDistance(a,s) < d){
               MI.remove(a);
            }
            /*for (String b:MI){
               System.out.println("In MI: "+b);
            }
            System.out.println("========");*/
         }
         i++;
      }
      return MI;
   }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download