Package unbbayes.prs

Examples of unbbayes.prs.Edge


    setPaneMode(PANEMODE_COMPILE);

    this.removeAll();

    Node n;
    Edge e;
    UShape shape = null;
    // Load all nodes.
    for (int i = 0; i < nodeList.size(); i++) {
      n = nodeList.get(i);

      createNode(n);

      if (reset == true && n instanceof ProbabilisticNode) {
        shape = getNodeUShape(n);
      }

      if (n instanceof ContinuousNode || n instanceof ProbabilisticNode) {

        shape = getNodeUShape(n);
        shape.shapeTypeChange(UShapeProbabilisticNode.STYPE_BAR);
        shape.setState(UShape.STATE_RESIZED, null);
      }

    }

    // Load all Edges
    for (int i = 0; i < edgeList.size(); i++) {
      e = edgeList.get(i);

      if (getNodeUShape(e.getOriginNode()) != null
          && getNodeUShape(e.getDestinationNode()) != null) {
        UShapeLine line = new UShapeLine(this, getNodeUShape(e
            .getOriginNode()),
            getNodeUShape(e.getDestinationNode()));
        line.setEdge(e);
        // by young 1/23/2010
        line.setLearningLineSelection(false);
        addShape(line);
      }
View Full Code Here


    setPaneMode(PANEMODE_NONE);

    this.removeAll();

    Node n;
    Edge e;
    UShape shape = null;

    // Load all nodes.
    for (int i = 0; i < nodeList.size(); i++) {
      n = nodeList.get(i);
      n.updateLabel();

      // create node
      createNode(n);

      if (n instanceof ContinuousNode || n instanceof ProbabilisticNode
          || n instanceof IPluginNode) {

        shape = getNodeUShape(n);

        if (shape != null) {
          shape.shapeTypeChange(UShapeProbabilisticNode.STYPE_NONE);
          shape.setState(UShape.STATE_RESIZED, null);
        }
      }
    }

    // Load all Edges
    for (int i = 0; i < edgeList.size(); i++) {
      e = edgeList.get(i);

      // createLine
      if (getNodeUShape(e.getOriginNode()) != null
          && getNodeUShape(e.getDestinationNode()) != null) {
        UShapeLine line = new UShapeLine(this, getNodeUShape(e
            .getOriginNode()),
            getNodeUShape(e.getDestinationNode()));
        line.setEdge(e);
        // line.setUseSelection();
        // by young 1/23/2010
        line.setLearningLineSelection(this.isToUseSelectionForLines());
        addShape(line);
View Full Code Here

  public UShapeLine onDrawConnectLineReleased(UShape shapeParent, int x, int y) {
    UShapeLine line = super.onDrawConnectLineReleased(shapeParent, x, y);

    if (line != null) {
      Edge e = new Edge(line.getSource().getNode(), line.getTarget()
          .getNode());
      if (e != null) {
        if (insertEdge(e) == true) {
          line.setEdge(e);
          line.setLearningLineSelection(this.isToUseSelectionForLines());
View Full Code Here

          if (getMapDomainResidentNode().containsKey(individualTwo
              .getBrowserText())) {
            ResidentNode aux = getMapDomainResidentNode().get(individualTwo
                .getBrowserText());

            Edge auxEdge = new Edge(aux, domainResidentNode);
            try {
              mFragOfNode.addEdge(auxEdge);
            } catch (Exception e) {
              Debug.println("Erro: arco invalido!!!");
            }
          } else {
            if (getMapGenerativeInputNode().containsKey(individualTwo
                .getBrowserText())) {
              InputNode aux = getMapGenerativeInputNode()
                  .get(individualTwo.getBrowserText());

              Edge auxEdge = new Edge(aux, domainResidentNode);
              try {
                mFragOfNode.addEdge(auxEdge);
              } catch (Exception e) {
                Debug.println("Erro: arco invalido!!!");
              }
View Full Code Here

   * @param rede the rede
   * @param uNodeSrs the u node srs
   * @param uNodeDes the u node des
   */
  public void createEdge( ProbabilisticNetwork rede, Node uNodeSrs, Node uNodeDes ){
    Edge edge = new Edge(uNodeSrs, uNodeDes);
    try {
      rede.addEdge(edge);
    } catch (InvalidParentException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of unbbayes.prs.Edge

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.