Examples of Node


Examples of ptolemy.graph.Node

            Object entity = actors.next();

            if (entity instanceof AtomicActor
                    || entity instanceof CompositeActor) {
                Actor actor = (Actor) entity;
                Node newNode = graph.addNodeWeight(_computeNodeWeight(actor));
                _actorMap.put(actor, newNode);
                _processNewNode(graph, newNode, actor);
            } else {
                throw new RuntimeException("Unsupported deep entity type: "
                        + entity.getClass().getName() + " (value = " + entity

Examples of quickml.supervised.classifier.decisionTree.tree.Node

  public void simpleBmiTest() throws Exception {
        final List<Instance<AttributesMap>> instances = TreeBuilderTestUtils.getInstances(10000);
    final TreeBuilder tb = new TreeBuilder(new SplitDiffScorer());
    final long startTime = System.currentTimeMillis();
        final Tree tree = tb.buildPredictiveModel(instances);
    final Node node = tree.node;

        TreeBuilderTestUtils.serializeDeserialize(node);

        final int nodeSize = node.size();
    Assert.assertTrue(nodeSize < 400, "Tree size should be less than 400 nodes");
    Assert.assertTrue((System.currentTimeMillis() - startTime) < 20000,"Building this node should take far less than 20 seconds");
  }

Examples of ro.fortsoft.wicket.pivot.tree.Node

  }
   
  @Override
  public Tree getColumnsHeaderTree() {
    if (columnsHeaderTree == null) {
      Node root = new Node();
      insertChildren(root, getFields(PivotField.Area.COLUMN));
      columnsHeaderTree = new Tree(root);
    }

    return columnsHeaderTree;

Examples of ru.org.linux.util.bbcode.nodes.Node

    }

    TextNode textChild = null;

    if(node.lengthChildren() == 1){
      Node child = node.getChildren().iterator().next();
      if(TextNode.class.isInstance(child)){
        textChild = (TextNode)child;
      }
    }

Examples of ru.yandex.strictweb.scriptjava.base.Node

  }
 
  public void eventTargetDisable(Node[] eventTargetNodes) {
    DOMEvent ev = StrictWeb.globalEvent;

    Node el = StrictWeb.swTarget;
    if(el==null) {
        if(null==ev) return;
        el = ev.target;
    }
    try {

Examples of scala.xml.Node

        }
    }

    public String asXML(Text text, int nHits, List<OntologyType> ontologyTypes) {
        //PrettyPrinter printer = new scala.xml.PrettyPrinter(80, 2);
        Node node = OutputSerializer.tagsAsXml(text, ExtractTags.extractor().extract(text, nHits, ontologyTypes));
        //StringBuilder builder = new StringBuilder();
        //printer.format(node, builder);
        String response = node.toString();
        LOG.info(String.format("Response: %s",response));
        return response;
    }

Examples of se.rupy.sprout.Node

        File file = new File();
        Item item = new Item();
        item.path = "file";
        item = save(event, item);

        Node article = article(event, file, item);
        Sprout.redirect(event, "/");
        //Sprout.redirect(event, "/edit?id=" + article.getId());
      }
    }

Examples of se.sics.contiki.collect.Node

      if (update && isVisible()) {
        updateGlobalRange();
      }
    }
    if (isVisible() && selectedNodes != null && selectedNodes.length == timeSeries.getSeriesCount()) {
      Node node = data.getNode();
      for (int i = 0, n = selectedNodes.length; i < n; i++) {
        if (node == selectedNodes[i]) {
          TimeSeries series = timeSeries.getSeries(i);
          int groupSize = getGroupSize(node);
          if (groupSize > 1) {

Examples of solver.constraints.nary.automata.structure.Node

        //backward pass, removing arcs that does not lead to an accepting state
        int nbNodes = pi.getNbStates();
        BitSet mark = new BitSet(nbNodes);

        Node[] in = new Node[pi.getNbStates() * (n + 1)];
        Node tink = new Node(pi.getNbStates() + 1, n + 1, nid++);
        graph.addVertex(tink);

        for (i = n - 1; i >= 0; i--) {
            mark.clear(0, nbNodes);
            int UB = vs[i].getUB();
            for (j = vs[i].getLB(); j <= UB; j = vs[i].nextValue(j)) {
                int idx = starts[i] + j - offsets[i];
                TIntHashSet l = tmpQ[idx];
                if (l != null) {
                    qijIter = l.iterator();
                    while (qijIter.hasNext()) {
                        k = qijIter.next();
                        nexts.clear();
                        pi.delta(k, j, nexts);
                        if (nexts.size() > 1)
                            System.err.println("STOP");
                        boolean added = false;
                        for (TIntIterator it = nexts.iterator(); it.hasNext(); ) {
                            int qn = it.next();

                            if (layer.get(i + 1).contains(qn)) {
                                added = true;
                                Node a = in[i * pi.getNbStates() + k];
                                if (a == null) {
                                    a = new Node(k, i, nid++);
                                    in[i * pi.getNbStates() + k] = a;
                                    graph.addVertex(a);
                                }

                                Node b = in[(i + 1) * pi.getNbStates() + qn];
                                if (b == null) {
                                    b = new Node(qn, i + 1, nid++);
                                    in[(i + 1) * pi.getNbStates() + qn] = b;
                                    graph.addVertex(b);
                                }


                                Arc arc = new Arc(a, b, j, aid++);
                                graph.addEdge(a, b, arc);
                                tmp.get(idx).add(arc);

                                mark.set(k);
                            }
                        }
                        if (!added)
                            qijIter.remove();
                    }
                }
            }
            layerIter = layer.get(i).iterator();

            // If no more arcs go out of a given state in the layer, then we remove the state from that layer
            while (layerIter.hasNext())
                if (!mark.get(layerIter.next()))
                    layerIter.remove();
        }

        TIntHashSet th = new TIntHashSet();
        int[][] intLayer = new int[n + 2][];
        for (k = 0; k < pi.getNbStates(); k++) {
            Node o = in[n * pi.getNbStates() + k];
            {
                if (o != null) {
                    Arc a = new Arc(o, tink, 0, aid++);
                    graph.addEdge(o, tink, a);
                }
            }
        }


        for (i = 0; i <= n; i++) {
            th.clear();
            for (k = 0; k < pi.getNbStates(); k++) {
                Node o = in[i * pi.getNbStates() + k];
                if (o != null) {
                    th.add(o.id);
                }
            }
            intLayer[i] = th.toArray();

Examples of srma.Node

    public Node addSAMRecord(SAMRecord record, ReferenceSequence sequence) throws Exception
    {
        Alignment alignment;
        PriorityQueue<Node> nodeQueue = null;
        int i, ref_i, offset, node_type, alignment_start, alignment_reference_index;
        Node prev=null, cur=null, ret=null;
        boolean strand = false;
       
        // DEBUG
        //String readName = record.getReadName();

        alignment_start = record.getAlignmentStart();
        alignment_reference_index = record.getReferenceIndex();

        if(alignment_reference_index != sequence.getContigIndex()) {
            throw new Exception("SAMRecord contig does not match the current reference sequence contig");
        }

        // Get the alignment
        alignment = new Alignment(record, sequence);
        strand = record.getReadNegativeStrandFlag();

        synchronized (this) {
            /*
            System.err.println("HERE alignment_start=" + alignment_start
                    + " this.position_start=" + this.position_start
                    + " this.position_end=" + this.position_end);
                    */
            //alignment.print(System.err);
            //System.err.println("Cigar=" + record.getCigar().toString());
            if(alignment_start < this.position_start) {
                for(i=alignment_start;i<this.position_start;i++) {
                    this.nodes.add(0, new PriorityQueue<Node>(1, this.nodeComparator));
                    this.coverage.add(0, new Integer(0));
                }
                this.position_start = alignment_start;
            }

            // Reset if there are no nodes
            if(this.isEmpty) {
                this.position_start = alignment_start;
                if(Alignment.GAP == alignment.reference[0]) { // insertion
                    this.position_start--;
                }
                // TODO: could be insertions then deletions at the start, which will cause errors, not implemented yet
                this.position_end = this.position_start;
                this.contig = alignment_reference_index + 1;
                this.nodes.clear();
                this.coverage.clear();
                this.nodes.add(new PriorityQueue<Node>(1, this.nodeComparator));
                this.coverage.add(new Integer(0));
                this.isEmpty = false;
            }
        }

        /* Reminders:
           i - index from 0 to 'alignment.length'
           ref_i - index within 'alignment.reference'
           */

        for(i=0,ref_i=-1;i<alignment.length;i++,prev=cur)
        { // go through the alignment

            // Skip over a deletion
            while(i<alignment.length && Alignment.GAP == alignment.read[i]) {
                i++;
                ref_i++;
            }
            if(alignment.length <= i) {
                break;
            }

            // Get the node type
            if(alignment.read[i] == alignment.reference[i]) { // match
                node_type = Node.MATCH;
            }
            else if(alignment.reference[i] == Alignment.GAP) { // insertion
                node_type = Node.INSERTION;
            }
            else { // mismatch
                node_type = Node.MISMATCH;
            }
            if(null == prev || Node.INSERTION != prev.type) { // previous was an insertion, already on the position
                ref_i++;
            }

            // Create the node
            cur = this.addNode(new Node((char)alignment.read[i],
                        node_type,
                        alignment_reference_index + 1,
                        alignment_start + ref_i,
                        prev,
                        this.nodeRecordComparator),
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.