Examples of Node


Examples of com.sun.tools.javac.comp.Infer.GraphSolver.InferenceGraph.Node

             */
            void initNodes(Map<Type, Set<Type>> stuckDeps) {
                //add nodes
                nodes = new ArrayList<Node>();
                for (Type t : inferenceContext.restvars()) {
                    nodes.add(new Node(t));
                }
                //add dependencies
                for (Node n_i : nodes) {
                    Type i = n_i.data.first();
                    Set<Type> optDepsByNode = stuckDeps.get(i);
                    for (Node n_j : nodes) {
                        Type j = n_j.data.first();
                        UndetVar uv_i = (UndetVar)inferenceContext.asFree(i);
                        if (Type.containsAny(uv_i.getBounds(InferenceBound.values()), List.of(j))) {
                            //update i's bound dependencies
                            n_i.addDependency(DependencyKind.BOUND, n_j);
                        }
                        if (optDepsByNode != null && optDepsByNode.contains(j)) {
                            //update i's stuck dependencies
                            n_i.addDependency(DependencyKind.STUCK, n_j);
                        }
                    }
                }
                //merge cyclic nodes
                ArrayList<Node> acyclicNodes = new ArrayList<Node>();
                for (List<? extends Node> conSubGraph : GraphUtils.tarjan(nodes)) {
                    if (conSubGraph.length() > 1) {
                        Node root = conSubGraph.head;
                        root.mergeWith(conSubGraph.tail);
                        for (Node n : conSubGraph) {
                            notifyUpdate(n, root);
                        }
                    }
                    acyclicNodes.add(conSubGraph.head);

Examples of com.touchgraph.graphlayout.Node

    buildPanel();
    buildLens();
    tgPanel.setLensSet(tgLensSet);
    addUIs();
    try {
      Node rootNode = buildTouchGraphTree(root, 0);
      tgPanel.setLocale(rootNode, 4);
      tgPanel.setSelect(rootNode);
      setLocalityRadius(4);
      // try {
      // Thread.currentThread().sleep(1000);

Examples of com.vaadin.client.debug.internal.ProfilerSection.Node

                    "Profiler is not enabled, no data has been collected.");
            return;
        }

        LinkedList<Node> stack = new LinkedList<Node>();
        Node rootNode = new Node(null);
        stack.add(rootNode);
        JsArray<GwtStatsEvent> gwtStatsEvents = getGwtStatsEvents();
        if (gwtStatsEvents.length() == 0) {
            getLogger()
                    .warning(
                            "No profiling events recorded, this might happen if another __gwtStatsEvent handler is installed.");
            return;
        }

        for (int i = 0; i < gwtStatsEvents.length(); i++) {
            GwtStatsEvent gwtStatsEvent = gwtStatsEvents.get(i);
            String eventName = gwtStatsEvent.getEventName();
            String type = gwtStatsEvent.getType();
            boolean isBeginEvent = "begin".equals(type);

            Node stackTop = stack.getLast();
            boolean inEvent = eventName.equals(stackTop.getName())
                    && !isBeginEvent;

            if (!inEvent && stack.size() >= 2
                    && eventName.equals(stack.get(stack.size() - 2).getName())
                    && !isBeginEvent) {
                // back out of sub event
                stackTop.leave(gwtStatsEvent.getMillis());
                stack.removeLast();
                stackTop = stack.getLast();

                inEvent = true;
            }

            if (type.equals("end")) {
                if (!inEvent) {
                    getLogger().severe(
                            "Got end event for " + eventName
                                    + " but is currently in "
                                    + stackTop.getName());
                    return;
                }
                Node previousStackTop = stack.removeLast();
                previousStackTop.leave(gwtStatsEvent.getMillis());
            } else {
                if (!inEvent) {
                    stackTop = stackTop.enterChild(eventName,
                            gwtStatsEvent.getMillis());
                    stack.add(stackTop);

Examples of com.vaadin.sass.internal.tree.Node

     *            node to traverse
     * @return true if the node was removed (and possibly replaced by others),
     *         false if not
     */
    public boolean traverse(Node node) {
        Node originalParent = node.getParentNode();

        node.traverse();

        Map<String, VariableNode> variableScope = openVariableScope();

        // the size of the child list may change on each iteration: current node
        // may get deleted and possibly other nodes have been inserted where it
        // was or after that position
        for (int i = 0; i < node.getChildren().size(); i++) {
            Node current = node.getChildren().get(i);
            if (traverse(current)) {
                // current has been removed
                --i;
            }
        }

Examples of com.vividsolutions.jts.geomgraph.Node

  /**
   * This method expects that a node has a coordinate value.
   */
  public Node addNode(Coordinate coord)
  {
    Node node = (Node) nodeMap.get(coord);
    if (node == null) {
      node = nodeFact.createNode(coord);
      nodeMap.put(coord, node);
    }
    return node;

Examples of com.vividsolutions.jts.planargraph.Node

    buildEdgeStringsForUnprocessedNodes();
 
 
  private void buildEdgeStringsForUnprocessedNodes() {
    for (Iterator i = graph.getNodes().iterator(); i.hasNext(); ) {
      Node node = (Node) i.next();
      if (!node.isMarked()) {
        Assert.isTrue(node.getDegree() == 2);
        buildEdgeStringsStartingAt(node);
        node.setMarked(true);
      }
    }
  } 

Examples of com.volantis.mcs.dom.Node

        privateSetUp();

        DOMOutputBuffer buffer = new DOMOutputBuffer();
        ShardLinkAttributes attributes = new ShardLinkAttributes();
        Element anchor;
        Node node;
        String styleClass;

        buffer.initialise();
        attributes.setHref("http://www.volantis.com/page");
        attributes.setLinkText("Next");

Examples of com.wesabe.api.accounts.analytics.TagHierarchy.Node

      );
    }
   
    @Test
    public void itUsesFoodAsATopTag() throws Exception {
      final Node food = hierarchy.getChildren().get(tag("food"));
      assertThat(food.getSum().getAmount()).isEqualTo(money("1000.00", USD));
      assertThat(food.getSum().getCount()).isEqualTo(4);
    }

Examples of com.whatevernot.flatlang.handler.Node

  }

  @SuppressWarnings("unchecked")
  private static INode introspect(String name, Object object)
  {
    INode node = new Node(name, object.getClass().getName());

    Method[] methods = object.getClass().getMethods();
   
    Arrays.sort(methods, new MethodNameComparator());
   
    for(Method method : methods)
    {
      String methodName = method.getName();
     
      if((methodName.startsWith(GETTER_PREFIX)) && (method.getParameterTypes().length == 0))
      {
        // Create the corresponding setter from the getter.
        String setterMethodName = "s" + methodName.substring(1);
       
        String propertyName = methodName.substring(3, 4).toLowerCase() + methodName.substring(4);
       
        Method setter = null;
        for(Method lookForSetter : methods)
        {
          if(lookForSetter.getName().equals(setterMethodName))
          {
            setter = lookForSetter;
            break;
          }
        }
       
        // If there is no setter, no use in saving the property, as the
        // deserializer (factory) will barf on exact sane the missing setter.
        if(setter == null)
        {
          continue;
        }
       
        // Get the return type and do the magic depending on the types.
        Class<?> propertyType = method.getReturnType();
 
        try
        {
          if(propertyType.isPrimitive())
          {
            Object propertyValue = method.invoke(object, VOID_PARAMETERS);
            node.addChild(new Node(propertyName, propertyValue.toString()));
          }
          else if(String[].class.isAssignableFrom(propertyType))
          {
            INode newNode = new Node(propertyName);
            node.addChild(newNode);
           
            String[] values = (String[]) method.invoke(object, VOID_PARAMETERS);
 
            if((values == null) || (values.length == 0)) continue;
           
            for(String value : values)
            {
              newNode.addChild(new Node(value));
            }
          }
          else if(Map.class.isAssignableFrom(propertyType))
          {
            INode newNode = new Node(propertyName);
            node.addChild(newNode);
           
            Map<String,String> map = (Map<String,String>) method.invoke(object, VOID_PARAMETERS);
           
            if((map == null) || (map.size() == 0)) continue;
           
            for(String key : map.keySet())
            {
              String value = (String) map.get(key);
             
              newNode.addChild(new Node(key, value));
            }
          }
          else if(String.class.isAssignableFrom(propertyType))
          {
            System.out.println("String : " + method.getName());

Examples of com.xith3d.scenegraph.Node

    lastMouseX = posX;
      lastMouseY = posY;
      PickRenderResult[] results = view.pick(canvas, posX, posY, 3, 3);
 
    if ((results!=null) && (results.length>0)) {
      Node nodes[] = results[0].getNodes();
      if (nodes!=null) {
            Object o = nodes[0].getUserData();
            if (o instanceof ActiveNode) {
                  ((ActiveNode)o).highlight(true,nodes[0]);
                  lastPickSelection.add(o);
TOP
Copyright © 2018 www.massapi.com. 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.