Package bgu.bio.adt.rna

Examples of bgu.bio.adt.rna.NodeLabel


    double[] tSmoothing = new double[nodes.size()];
    NodeLabel[] tLabels = new NodeLabel[nodes.size()];

    for (int i = 0; i < tEdges.length; i++) {
      tLabels[i] = new NodeLabel(id2Label.get(i));
    }

    Tree t = new Tree(tEdges, tWeights, tSmoothing, tLabels);
    return t;
  }
View Full Code Here


    double[][] tWeights = { { 10, 10, 10, 10, 10, 10, 10, 10, 10 }, { 10 },
        { 20 }, { 30 }, { 40 }, { 50 }, { 60 }, { 70 }, { 80 }, { 90 }, };

    double[] tSmooth = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
    NodeLabel[] tLabels = { new NodeLabel("0"), new NodeLabel("1"),
        new NodeLabel("2"), new NodeLabel("3"), new NodeLabel("4"),
        new NodeLabel("5"), new NodeLabel("6"), new NodeLabel("7"),
        new NodeLabel("8"), new NodeLabel("9"), };

    Tree t = new Tree(tEdges, tWeights, tSmooth, tLabels);

    // TODO Auto-generated method stub
    int[][] sEdges = { { 1, 2, 3, 4, 5 }, { 0 }, { 0 }, { 0 }, { 0 },
        { 0 }, };

    double[][] sWeights = { { 10, 20, 30, 40, 50 }, { 10 }, { 20 }, { 30 },
        { 40 }, { 50 }, };

    double[] sSmooth = { 2, 2, 2, 2, 2, 2 };
    NodeLabel[] sLabels = { new NodeLabel("0"), new NodeLabel("1"),
        new NodeLabel("2"), new NodeLabel("3"), new NodeLabel("4"),
        new NodeLabel("5"), };

    Tree s = new Tree(sEdges, sWeights, sSmooth, sLabels);

    CostFunction w = new CostFunction() {
View Full Code Here

    double[][] tWeights = { { 40, 10, 1 }, { 10, 70, 60 }, { 40 }, { 40 },
        { 50, 1, 10, 20 }, { 40 }, { 10 }, { 10 }, { 10 } };

    double[] tSmooth = { 1.1, 2, 2, 2, 2, 2, 2, 2, 2 };
    NodeLabel[] tLabels = { new NodeLabel("h"), new NodeLabel("d"),
        new NodeLabel("c"), new NodeLabel("g"), new NodeLabel("b"),
        new NodeLabel("a"), new NodeLabel("e"), new NodeLabel("f"),
        new NodeLabel("i"), };

    Tree t = new Tree(tEdges, tWeights, tSmooth, tLabels);

    int[][] sEdges = { { 3 }, { 2, 8 }, { 3, 1 }, { 0, 4, 2 },
        { 3, 6, 5, 7 }, { 4 }, { 4 }, { 4 }, { 1 } };

    double[][] sWeights = { { 30 }, { 20, 1 }, { 30, 10 }, { 10, 40, 20 },
        { 30, 60, 1, 70 }, { 40 }, { 40 }, { 40 }, { 10 } };

    double[] sSmooth = { 2, 2, 1.2, 2, 2, 2, 2, 2, 2 };
    NodeLabel[] sLabels = { new NodeLabel("a"), new NodeLabel("c"),
        new NodeLabel("j"), new NodeLabel("b"), new NodeLabel("d"),
        new NodeLabel("i"), new NodeLabel("e"), new NodeLabel("f"),
        new NodeLabel("k"), };

    CostFunction w = new CostFunction() {

      @Override
      public double cost(NodeLabel l1, NodeLabel l2) {
View Full Code Here

    double[][] tWeights = { { 10, 10, 10, 10, 10, 10, 10, 10, 10 }, { 10 },
        { 20 }, { 30 }, { 40 }, { 50 }, { 60 }, { 70 }, { 80 }, { 90 }, };

    double[] tSmooth = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
    NodeLabel[] tLabels = { new NodeLabel("0"), new NodeLabel("1"),
        new NodeLabel("2"), new NodeLabel("3"), new NodeLabel("4"),
        new NodeLabel("5"), new NodeLabel("6"), new NodeLabel("7"),
        new NodeLabel("8"), new NodeLabel("9"), };

    Tree t = new Tree(tEdges, tWeights, tSmooth, tLabels);

    int[][] sEdges = { { 1, 2, 3, 4, 5 }, { 0 }, { 0 }, { 0 }, { 0 },
        { 0 }, };

    double[][] sWeights = { { 10, 20, 30, 40, 50 }, { 10 }, { 20 }, { 30 },
        { 40 }, { 50 }, };

    double[] sSmooth = { 2, 2, 2, 2, 2, 2 };
    NodeLabel[] sLabels = { new NodeLabel("0"), new NodeLabel("1"),
        new NodeLabel("2"), new NodeLabel("3"), new NodeLabel("4"),
        new NodeLabel("5"), };

    Tree s = new Tree(sEdges, sWeights, sSmooth, sLabels);

    CostFunction w = new CostFunction() {
View Full Code Here

    double[][] tWeights = { { 40, 10, 1 }, { 10, 70, 60 }, { 40 }, { 40 },
        { 50, 1, 10, 20 }, { 40 }, { 10 }, { 10 }, { 10 } };

    double[] tSmooth = { 1.1, 2, 2, 2, 2, 2, 2, 2, 2 };
    NodeLabel[] tLabels = { new NodeLabel("h"), new NodeLabel("d"),
        new NodeLabel("c"), new NodeLabel("g"), new NodeLabel("b"),
        new NodeLabel("a"), new NodeLabel("e"), new NodeLabel("f"),
        new NodeLabel("i"), };

    Tree t = new Tree(tEdges, tWeights, tSmooth, tLabels);

    int[][] sEdges = { { 3 }, { 2, 8 }, { 3, 1 }, { 0, 4, 2 },
        { 3, 6, 5, 7 }, { 4 }, { 4 }, { 4 }, { 1 } };

    double[][] sWeights = { { 30 }, { 20, 1 }, { 30, 10 }, { 10, 40, 20 },
        { 30, 60, 1, 70 }, { 40 }, { 40 }, { 40 }, { 10 } };

    double[] sSmooth = { 2, 2, 1.2, 2, 2, 2, 2, 2, 2 };
    NodeLabel[] sLabels = { new NodeLabel("a"), new NodeLabel("c"),
        new NodeLabel("j"), new NodeLabel("b"), new NodeLabel("d"),
        new NodeLabel("i"), new NodeLabel("e"), new NodeLabel("f"),
        new NodeLabel("k"), };

    CostFunction w = new CostFunction() {

      @Override
      public double cost(NodeLabel l1, NodeLabel l2) {
View Full Code Here

          }
        }
      }

      // add to's data
      NodeLabel label = tree.getLabel(to);
      switch (label.getType()) {
      case RNANodeLabel.BASE_INTERVAL:
        elementCounters[from][toIdx][UNPAIRED_BASES] += label.getLabelValue().size();
        elementCounters[from][toIdx][INTERVAL_BASES]++;
        break;
      case RNANodeLabel.BASE_PAIR:
        elementCounters[from][toIdx][BASE_PAIRS]++;
        break;
View Full Code Here

       smoothCosts = new double[tree.getNodeNum()];
    }else{
      Arrays.fill(smoothCosts,0.0);
    }
    for (int i=0;i<smoothCosts.length;i++){
      NodeLabel label = tree.getLabel(i);
      switch (label.getType()){
      case RNANodeLabel.BASE_INTERVAL:
        smoothCosts[i] = MathOperations.INFINITY;
        break;
      case RNANodeLabel.BASE_PAIR:
        smoothCosts[i] = 3d;
View Full Code Here

  }

  @Override
  public double cost(NodeLabel l1, NodeLabel l2) {
    if (l1.getType() > l2.getType()) {
      NodeLabel tmp = l1;
      l1 = l2;
      l2 = tmp;
    }

    switch (l1.getType()) {
View Full Code Here

TOP

Related Classes of bgu.bio.adt.rna.NodeLabel

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.