Examples of InPlaceMergeSorter


Examples of org.apache.lucene.util.InPlaceMergeSorter

    protected long[] values;
    private final Sorter sorter;

    protected SortingNumericDocValues() {
        values = new long[1];
        sorter = new InPlaceMergeSorter() {

            @Override
            protected void swap(int i, int j) {
                final long tmp = values[i];
                values[i] = values[j];
View Full Code Here

Examples of org.apache.lucene.util.InPlaceMergeSorter

    protected double[] values;
    private final Sorter sorter;

    protected SortingNumericDoubleValues() {
        values = new double[1];
        sorter = new InPlaceMergeSorter() {

            @Override
            protected void swap(int i, int j) {
                final double tmp = values[i];
                values[i] = values[j];
View Full Code Here

Examples of org.apache.lucene.util.InPlaceMergeSorter

            return new IteratorBasedIterator(iterators);
        }

        private IteratorBasedIterator(Collection<DocIdSetIterator> iterators) throws IOException {
            final DocIdSetIterator[] sortedIterators = iterators.toArray(new DocIdSetIterator[iterators.size()]);
            new InPlaceMergeSorter() {

                @Override
                protected int compare(int i, int j) {
                    return Long.compare(sortedIterators[i].cost(), sortedIterators[j].cost());
                }
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.