public class AbstractCoOccurrences<T extends SequenceElement> extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
AbstractCoOccurrences.Builder<T extends SequenceElement> |
Modifier and Type | Field and Description |
---|---|
protected ReentrantReadWriteLock |
lock |
protected static org.slf4j.Logger |
logger |
protected long |
memory_threshold |
protected SequenceIterator<T> |
sequenceIterator |
protected boolean |
symmetric |
protected File |
targetFile |
protected VocabCache<T> |
vocabCache |
protected int |
windowSize |
protected int |
workers |
Modifier and Type | Method and Description |
---|---|
void |
fit() |
double |
getCoOccurrenceCount(T element1,
T element2)
This method returns cooccurrence distance weights for two SequenceElements
|
protected long |
getMemoryFootprint()
This method returns estimated memory footrpint, based on current CountMap content
|
protected long |
getMemoryThreshold()
This memory returns memory threshold, defined as 1/2 of memory allowed for allocation
|
Iterator<Pair<Pair<T,T>,Double>> |
iterator()
This method returns iterator with elements pairs and their weights.
|
protected boolean symmetric
protected int windowSize
protected VocabCache<T extends SequenceElement> vocabCache
protected SequenceIterator<T extends SequenceElement> sequenceIterator
protected int workers
protected File targetFile
protected ReentrantReadWriteLock lock
protected long memory_threshold
protected static final org.slf4j.Logger logger
public double getCoOccurrenceCount(@NonNull T element1, @NonNull T element2)
element1
- element2
- protected long getMemoryFootprint()
protected long getMemoryThreshold()
public void fit()
Copyright © 2016. All Rights Reserved.