Examples of Heap


Examples of abstrasy.Heap

        // position initilale du lecteur dans l'expression...
        int pos = 0;

        // préparer le heap local pour le traitement...
        Heap.push();
        Heap local = Heap.current();

        // résultat de l'expression sélectionnée...
        Node res = null;

        // condition d'arrêt d'analyse...
View Full Code Here

Examples of com.betfair.platform.virtualheap.Heap

        // returns true if a new heap was added
        public boolean addHeap(long heapId, String uri) {
            heapSubMutationLock.lock();
            try {
                if (!heapStates.containsKey(heapId)) {
                    Heap heap = new ImmutableHeap(uri, newListenerConflater);
                    initialLatches.put(heapId, new CountDownLatch(1));
                    heapStates.put(heapId, new HeapState(heap));
                    return true;
                }
                return false;
View Full Code Here

Examples of com.betfair.platform.virtualheap.Heap

        // returns true if a new heap was added
        public boolean addHeap(long heapId, String uri) {
            heapSubMutationLock.lock();
            try {
                if (!heapStates.containsKey(heapId)) {
                    Heap heap = new ImmutableHeap(uri, newListenerConflater);
                    initialLatches.put(heapId, new CountDownLatch(1));
                    heapStates.put(heapId, new HeapState(heap));
                    return true;
                }
                return false;
View Full Code Here

Examples of com.betfair.platform.virtualheap.Heap

    NodeProjector<FootballScores> scoresFactory = objectProjector(FootballScores.class);
 
  @Test
  public void simple() {
    Heap src = new MutableHeap("src");

    Heap target = new MutableHeap("target");

    src.addListener(target.asListener(), false);

    src.beginUpdate();

    FootballScores scores = scoresFactory.project(src.ensureRoot(NodeType.OBJECT));
    src.endUpdate();
   
    Assert.assertEquals(src.toString(), target.toString());
   
    src.beginUpdate();
    scores.setAway(0);
    scores.setHome(1);
    GoalDetail firstGoal = scores.goals().addLast();
    firstGoal.setScorer("Rooney");
    firstGoal.setMinutes(34);
    src.endUpdate();
   
    Assert.assertEquals(src.toString(), target.toString());
   
    src.beginUpdate();
    scores.goals().clear();
    src.endUpdate();
   
    Assert.assertEquals(src.toString(), target.toString());
   
    src.beginUpdate();
    scores.clear();
    src.endUpdate();
   
    Assert.assertEquals(src.toString(), target.toString());
   
   
  }
View Full Code Here

Examples of com.meapsoft.Heap

            targetChunk.addFeature(Integer.MIN_VALUE);
       
        dist.setTarget(targetChunk);
       
        // maintain a set of chunks sorted using dist from targetChunk
        Heap chunks = null;
        if(reverseSort)
            chunks = new MaxHeap(dist);
        else
            chunks = new MinHeap(dist);
        chunks.addAll(featFile.chunks);
       
        NumberFormat fmt = NumberFormat.getInstance();
        fmt.setMaximumFractionDigits(3);
       
        double currTime = 0;
        while(chunks.size() > 0)
        {
            FeatChunk match = (FeatChunk)chunks.remove(0);

            // turn match chunk into an EDL chunk
            EDLChunk nc = new EDLChunk(match, currTime);

            if(debug)
View Full Code Here

Examples of nexj.core.util.Heap

    * @param sNodeName the node for which to return a heap.
    * @return Heap the heap.
    */
   protected Heap getHeap(String sNodeName)
   {
      Heap heap = (Heap)m_deliverableHeapMap.get(sNodeName);

      if (heap == null)
      {
         if (isAvailable(sNodeName))
         {
View Full Code Here

Examples of nexj.core.util.Heap

            break;
         case ObjectDispatchListener.DISPATCHER:
         case ObjectDispatchListener.ONLY:
         {
            Heap nodeHeap = getHeap(sNodeName);

            if (nodeHeap == null)
            {
               throw new UncheckedException("err.queueing.unknownNode", new Object[]
               {
                  sNodeName
               });
            }
            else
            {
               nodeHeap.add(delivery);
            }

            break;
         }
         case ObjectDispatchListener.ALL:
View Full Code Here

Examples of org.sat4j.minisat.core.Heap

    public void init() {
        int nlength = lits.nVars() + 1;
        activity = new double[nlength];
        phaseStrategy.init(nlength);
        activity[0] = -1;
        heap = new Heap(activity);
        heap.setBounds(nlength);
        for (int i = 1; i < nlength; i++) {
            assert i > 0;
            assert i <= lits.nVars() : "" + lits.nVars() + "/" + i; //$NON-NLS-1$ //$NON-NLS-2$
            activity[i] = 0.0;
View Full Code Here
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.