Package bgu.bio.algorithms.graphs.hsa.matchers

Examples of bgu.bio.algorithms.graphs.hsa.matchers.UnorderedMatcherFactory


      }
    };

    TIntArrayList[] alignment = new TIntArrayList[3];

    UnorderedMatcherFactory matcherFactory = new UnorderedMatcherFactory();
    HSA hsa = new HSA(w, matcherFactory,false);

    System.out.println("Cost t-s: " + hsa.computeHSA(t, s, alignment));
    for (int i = 0; i < alignment[0].size(); ++i) {
      System.out.print("(" + alignment[0].get(i) + ","
View Full Code Here


   
   
    double ans1 = 0,ans2 = 0;
   
    //reuse
    HSA hsaEngine2 = new HSA(1, 1, cost, new UnorderedMatcherFactory(),
        true);
    double temp = hsaEngine2.computeHSA(t, s);
    ans1 = hsaEngine2.computeHSA(t, sR);
   
    //no reuse
    hsaEngine2 = new HSA(1, 1, cost, new UnorderedMatcherFactory(),
        true);
   
    temp = hsaEngine2.computeHSA(t, s);
    hsaEngine2.setFactory(new UnorderedMatcherFactory());
    ans2 = hsaEngine2.computeHSA(t, sR);
    if (!MathOperations.equals(ans1, ans2)){
      System.out.println("Got problem with matchers");
    }
  }
View Full Code Here

      }
    };

    TIntArrayList[] alignment = new TIntArrayList[3];

    UnorderedMatcherFactory matcherFactory = new UnorderedMatcherFactory();
    HSA hsa = new HSA(w, matcherFactory);

    System.out.println("Cost t-s: " + hsa.computeHSA(t, s, alignment));
    for (int i = 0; i < alignment[0].size(); ++i) {
      System.out.print("(" + alignment[0].get(i) + ","
View Full Code Here

  }

  private static void checkTrees(Tree t, CostFunction w, Tree s) {
    TIntArrayList[] alignment = new TIntArrayList[3];
    MatcherFactory matcherFactory = new UnorderedMatcherFactory();
    HSA hsa = new HSA(w, matcherFactory);

    double cost = hsa.computeHSA(t, s, alignment);
    System.out.println("Cost: " + cost);
    for (int i = 0; i < alignment[0].size(); ++i) {
View Full Code Here

    prune.calculateCost(s);
    smooth.calculateCost(s);

    TIntArrayList[] alignment = new TIntArrayList[3];
    MatcherFactory matcherFactory = new UnorderedMatcherFactory();
    // MatcherFactory matcherFactory = new OrderedMatcherFactory();
    HSA hsa = new HSA(cost, matcherFactory);

    System.out.println("Cost: " + hsa.computeHSA(s, t, alignment));
    for (int i = 0; i < alignment[0].size(); ++i) {
View Full Code Here

    smooth.calculateCost(sR);

    double ans1 = 0, ans2 = 0;

    // reuse
    HSA hsaEngine2 = new HSA(1, 1, cost, new UnorderedMatcherFactory(),
        true);
    hsaEngine2.computeHSA(t, s);
    ans1 = hsaEngine2.computeHSA(t, sR);

    // no reuse
    hsaEngine2 = new HSA(1, 1, cost, new UnorderedMatcherFactory(), true);

    hsaEngine2.computeHSA(t, s);
    hsaEngine2.setFactory(new UnorderedMatcherFactory());
    ans2 = hsaEngine2.computeHSA(t, sR);
    Assert.assertEquals("Got a problem with the matchers", true,
        MathOperations.equals(ans1, ans2));
  }
View Full Code Here

      }
    };

    TIntArrayList[] alignment = new TIntArrayList[3];

    UnorderedMatcherFactory matcherFactory = new UnorderedMatcherFactory();
    HSA hsa = new HSA(w, matcherFactory);

    System.out.println("Cost t-s: " + hsa.computeHSA(t, s, alignment));
    for (int i = 0; i < alignment[0].size(); ++i) {
      System.out.print("(" + alignment[0].get(i) + ","
View Full Code Here

  }

  private static void checkTrees(Tree t, CostFunction w, Tree s) {
    TIntArrayList[] alignment = new TIntArrayList[3];
    MatcherFactory matcherFactory = new UnorderedMatcherFactory();
    HSA hsa = new HSA(w, matcherFactory);

    double cost = hsa.computeHSA(t, s, alignment);
    System.out.println("Cost: " + cost);
    for (int i = 0; i < alignment[0].size(); ++i) {
View Full Code Here

    prune.calculateCost(s);
    smooth.calculateCost(s);

    TIntArrayList[] alignment = new TIntArrayList[3];
    MatcherFactory matcherFactory = new UnorderedMatcherFactory();
    // MatcherFactory matcherFactory = new OrderedMatcherFactory();
    HSA hsa = new HSA(cost, matcherFactory);

    System.out.println("Cost: " + hsa.computeHSA(s, t, alignment));
    for (int i = 0; i < alignment[0].size(); ++i) {
View Full Code Here

TOP

Related Classes of bgu.bio.algorithms.graphs.hsa.matchers.UnorderedMatcherFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.