Package edu.gmu.seor.prognos.unbbayesplugin.jt.prs

Examples of edu.gmu.seor.prognos.unbbayesplugin.jt.prs.Node


     * @param index index of element to replace.
     * @param element element to be stored at the specified position.
     * @return the element previously at the specified position.
     */
    public final Node set(int index, Node element) {
        Node oldValue = data[index];
        data[index] = element;
        return oldValue;
    }
View Full Code Here


     *
     * @param index the index of the element to removed.
     * @return the element that was removed from the list.
     */
    public final Node remove(int index) {
        Node oldValue = data[index];
        int numMoved = size - index - 1;
        if (numMoved > 0)
            System.arraycopy(data, index+1, data, index,
                     numMoved);
        data[--size] = null;
View Full Code Here

  public static void sortNodeListByDescription(List<Node> nodeList) {
    boolean haTroca = true;
    while (haTroca) {
      haTroca = false;
      for (int i = 0; i < nodeList.size() - 1; i++) {
        Node node1 = nodeList.get(i);
        Node node2 = nodeList.get(i + 1);
        if (node1.getDescription().compareToIgnoreCase(
            node2.getDescription()) > 0) {
          nodeList.set(i + 1, node1);
          nodeList.set(i, node2);
          haTroca = true;
        }
      }
View Full Code Here

  public static void sortNodeListByName(List<Node> nodeList) {
    boolean haTroca = true;
    while (haTroca) {
      haTroca = false;
      for (int i = 0; i < nodeList.size() - 1; i++) {
        Node node1 = nodeList.get(i);
        Node node2 = nodeList.get(i + 1);
        if (node1.getName().compareToIgnoreCase(
            node2.getName()) > 0) {
          nodeList.set(i + 1, node1);
          nodeList.set(i, node2);
          haTroca = true;
        }
      }
View Full Code Here

    System.out.println("Variable list size in computeFactors "+sizeVariaveis);
    if (factorsPT == null || factorsPT.length < sizeVariaveis) {
       factorsPT = new int[sizeVariaveis];
    }
    factorsPT[0] = 1;
    Node auxNo;
    for (int i = 1; i < sizeVariaveis; i++) {
      auxNo = variableList.get(i-1);
      factorsPT[i] = factorsPT[i-1] * auxNo.getStatesSize();
    }
  }
 
View Full Code Here

      marked[coord] = true;
      System.out.println("gvalue at "+linearCoordDestination+" is "+value);
      return;
    }
   
    Node node = variableList.get(control);
    if (control == index) {
      // if the current iterated variable is the one we want to delete, then iterate only until 1,
      // because the position 0 will hold the sum.
      for (int i = node.getStatesSize()-1; i >= 1; i--) {
        sumAux(control-1, index, coord + i*factorsPT[control], i*factorsPT[index], marked);
     
    } else {
      for (int i = node.getStatesSize()-1; i >= 0; i--) {
        sumAux(control-1, index, coord + i*factorsPT[control], base, marked);
      }
    }
  }
View Full Code Here

      gComponents.remove(linearCoordToKill);
      return;
    }

    int fim = (index == control) ? 1 : 0;
    Node node = variableList.get(control);
    for (int i = node.getStatesSize()-1; i >= fim; i--) {
      coord[control] = i;
      finding(control-1, index, coord, state);
    }
  }
View Full Code Here

   * @param initialPosition
   * @param destinationPosition
   */
  public void moveVariableWithoutMoveData(int initialPosition, int destinationPosition){
   
    Node nodeToMove = variableList.remove(initialPosition);
    variableList.add(destinationPosition, nodeToMove);
   
  }
View Full Code Here

      dataPT.data[linearCoordDestination] = value;
      marked[coord] = true;
      return;
    }
   
    Node node = variableList.get(control);
    if (control == index) {
      // if the current iterated variable is the one we want to delete, then iterate only until 1,
      // because the position 0 will hold the sum.
      for (int i = node.getStatesSize()-1; i >= 1; i--) {
        sumAux(control-1, index, coord + i*factorsPT[control], i*factorsPT[index], marked);
     
    } else {
      for (int i = node.getStatesSize()-1; i >= 0; i--) {
        sumAux(control-1, index, coord + i*factorsPT[control], base, marked);
      }
    }
  }
View Full Code Here

      dataPT.remove(linearCoordToKill);
      return;
    }

    int fim = (index == control) ? 1 : 0;
    Node node = variableList.get(control);
    for (int i = node.getStatesSize()-1; i >= fim; i--) {
      coord[control] = i;
      finding(control-1, index, coord, state);
    }
  }
View Full Code Here

TOP

Related Classes of edu.gmu.seor.prognos.unbbayesplugin.jt.prs.Node

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.