Package com.meapsoft

Examples of com.meapsoft.MinHeap


        FeatChunk currChunk = (FeatChunk)featFile.chunks.get(0);
       
        dist.setTarget(currChunk);
       
        // maintain a set of chunks sorted using dist from targetChunk
        MinHeap chunks = new MinHeap(dist);
        chunks.addAll(featFile.chunks);
       
        MaxHeap chunks2 = new MaxHeap(500);
       
        NumberFormat fmt = NumberFormat.getInstance();
        fmt.setMaximumFractionDigits(3);
       
        double currTime = 0;
        while(chunks.size() > 0)
        {
            dist.setTarget(currChunk);
            chunks.rebuildHeap();
           
            currChunk = (FeatChunk)chunks.deleteMin();
           
            // turn currChunk into an EDL chunk
            EDLChunk nc = new EDLChunk(currChunk, currTime);

            chunks2.add(nc);
View Full Code Here


        FeatChunk currChunk = (FeatChunk)featFile.chunks.get(0);
       
        dist.setTarget(currChunk);
       
        // maintain a set of chunks sorted using dist from targetChunk
        MinHeap chunks = new MinHeap(dist);
        chunks.addAll(featFile.chunks);
       
        NumberFormat fmt = NumberFormat.getInstance();
        fmt.setMaximumFractionDigits(3);
       
        double currTime = 0;
        while(chunks.size() > 0)
        {
            dist.setTarget(currChunk);
            chunks.rebuildHeap();
           
            currChunk = (FeatChunk)chunks.deleteMin();
           
            // turn currChunk into an EDL chunk
            EDLChunk nc = new EDLChunk(currChunk, currTime);

            if(debug)
View Full Code Here

            Arrays.fill(transitionMatrix[x], 0);

        // sort the chunks in order of increasing startTime, while
        // keeping all chunks from the same srcFile together
        trainFile = (FeatFile)trainFile.clone();
        trainFile.chunks = new MinHeap(trainFile.chunks);
        ((MinHeap)trainFile.chunks).sort();

        int ndat = trainFile.chunks.size();
        int prevState = -1;
        String lastSrcFile = "";
View Full Code Here

        // 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);
       
View Full Code Here

TOP

Related Classes of com.meapsoft.MinHeap

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.