Package org.patika.mada.graph

Examples of org.patika.mada.graph.Node


    // Run BFS till queue is not empty

    while (!queue.isEmpty())
    {
      Node node = queue.poll();
      BFS_undirected(node, queue);
    }
  }
View Full Code Here


    if (d < limit)
    {
      for (Edge edge : upstr? node.getUpstream() : node.getDownstream())
      {
        Node n = upstr ? edge.getSourceNode() : edge.getTargetNode();

        edge.putLabel(label, !upstr && label.equals(DIST_FORWARD) ? d + 1 : d);

        if (n.hasLabel(label))
        {
          int d_n = (Integer) n.getLabel(label);

          if (d_n > d + 1)
          {
            n.putLabel(label, d + 1);
            if (d + 1 < limit && !queue.contains(n)) queue.add(n);
          }
        }
      }
    }
View Full Code Here

  public void removeLabels(Collection labels)
  {
    for (Object o : getNodes())
    {
      Node node = (Node) o;

      for (Object label : labels)
      {
        node.removeLabel(label);
      }
    }
  }
View Full Code Here

  {
    interactionMap = new HashMap<interaction, Collection<GraphObject>>();

    for (Object o : getNodes())
    {
      Node node = (Node) o;

      interaction inter = null;

      if (node instanceof Conversion)
      {
View Full Code Here

  {
    entityToNodeMap = new HashMap<physicalEntity, List<Node>>();

    for (Object o : getNodes())
    {
      Node node = (Node) o;

       if (node instanceof Actor)
      {
        getRelatedNodeList(((Actor) node).getEntity()).add(node);
      }
View Full Code Here

  {
    interactionMap = new HashMap<Interaction, Collection<GraphObject>>();

    for (Object o : getNodes())
    {
      Node node = (Node) o;

      Interaction inter = null;

      if (node instanceof ChbConversion)
      {
View Full Code Here

  {
    entityToNodeMap = new HashMap<EntityHolder, List<Node>>();

    for (Object o : getNodes())
    {
      Node node = (Node) o;

       if (node instanceof Actor)
      {
        getRelatedNodeList(((Actor) node).getEntity()).add(node);
      }
View Full Code Here

  {
    interactionMap = new HashMap<interaction, Collection<GraphObject>>();

    for (Object o : getNodes())
    {
      Node node = (Node) o;

      interaction inter = null;

      if (node instanceof Conversion)
      {
View Full Code Here

  {
    entityToNodeMap = new HashMap<EntityHolder, List<Node>>();

    for (Object o : getNodes())
    {
      Node node = (Node) o;

       if (node instanceof Actor)
      {
        getRelatedNodeList(((Actor) node).getEntity()).add(node);
      }
View Full Code Here

    {
      Object model = ((EditPart)selectedObjectsIterator.next()).getModel();

      if (model instanceof Node)
      {
        Node node = (Node) model;

        //if node is CompexMember, then get its parent
        if (node instanceof ComplexMember)
        {
          node = node.getParents().iterator().next();
        }

        selectedObjects.add(node);
      }
    }
View Full Code Here

TOP

Related Classes of org.patika.mada.graph.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.