public abstract class KernelCache extends Object
Constructor and Description |
---|
KernelCache() |
Modifier and Type | Method and Description |
---|---|
abstract void |
flushCache()
Empties the cache
|
long |
getCacheHits() |
long |
getCacheMisses() |
Float |
getKernelValue(Example exA,
Example exB)
Retrieves in the cache the kernel operation between two examples
|
protected abstract Float |
getStoredKernelValue(Example exA,
Example exB)
Retrieves in the cache the kernel operation between two examples
|
void |
resetCacheStats()
Sets cache hits and misses to 0
|
abstract void |
setKernelValue(Example exA,
Example exB,
float value)
Stores a kernel computation in cache
|
public Float getKernelValue(Example exA, Example exB)
exA
- the first exampleexB
- the second examplenull<\code> if a cache miss occurs
protected abstract Float getStoredKernelValue(Example exA, Example exB)
exA
- the first exampleexB
- the second examplenull<\code> if a cache miss occurs
public long getCacheHits()
public long getCacheMisses()
public void resetCacheStats()
public abstract void setKernelValue(Example exA, Example exB, float value)
exA
- the first exampleexB
- the second examplevalue
- the kernel value to be stored in cachepublic abstract void flushCache()
Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.