Module org.apache.lucene.misc
Package org.apache.lucene.misc.index
Class BPIndexReorderer.ComputeGainsTask
- java.lang.Object
-
- java.util.concurrent.ForkJoinTask<java.lang.Void>
-
- java.util.concurrent.RecursiveAction
-
- org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
-
- org.apache.lucene.misc.index.BPIndexReorderer.ComputeGainsTask
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.concurrent.Future<java.lang.Void>
- Enclosing class:
- BPIndexReorderer
private class BPIndexReorderer.ComputeGainsTask extends BPIndexReorderer.BaseRecursiveAction
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
docs
private int
from
private int[]
fromDocFreqs
private float[]
gains
private CloseableThreadLocal<BPIndexReorderer.PerThreadState>
threadLocal
private int
to
private int[]
toDocFreqs
-
Fields inherited from class org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
depth
-
-
Constructor Summary
Constructors Constructor Description ComputeGainsTask(int[] docs, float[] gains, int from, int to, int[] fromDocFreqs, int[] toDocFreqs, CloseableThreadLocal<BPIndexReorderer.PerThreadState> threadLocal, int depth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compute()
private float
computeGain(int docID, BPIndexReorderer.ForwardIndex forwardIndex, int[] fromDocFreqs, int[] toDocFreqs)
Compute a float that is negative when a document is attracted to the left and positive otherwise.-
Methods inherited from class org.apache.lucene.misc.index.BPIndexReorderer.BaseRecursiveAction
shouldFork
-
Methods inherited from class java.util.concurrent.ForkJoinTask
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollSubmission, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
-
-
-
-
Field Detail
-
docs
private final int[] docs
-
gains
private final float[] gains
-
from
private final int from
-
to
private final int to
-
fromDocFreqs
private final int[] fromDocFreqs
-
toDocFreqs
private final int[] toDocFreqs
-
threadLocal
private final CloseableThreadLocal<BPIndexReorderer.PerThreadState> threadLocal
-
-
Constructor Detail
-
ComputeGainsTask
ComputeGainsTask(int[] docs, float[] gains, int from, int to, int[] fromDocFreqs, int[] toDocFreqs, CloseableThreadLocal<BPIndexReorderer.PerThreadState> threadLocal, int depth)
-
-
Method Detail
-
compute
protected void compute()
- Specified by:
compute
in classjava.util.concurrent.RecursiveAction
-
computeGain
private float computeGain(int docID, BPIndexReorderer.ForwardIndex forwardIndex, int[] fromDocFreqs, int[] toDocFreqs) throws java.io.IOException
Compute a float that is negative when a document is attracted to the left and positive otherwise.- Throws:
java.io.IOException
-
-