public class StripeKernelCache extends KernelCache implements Serializable
n stripes.
 When the number of stripes is exceeded, they are removed according to a FIFO
 policy.| Constructor and Description | 
|---|
StripeKernelCache()  | 
StripeKernelCache(Dataset dataset)  | 
StripeKernelCache(Dataset dataset,
                 int maxNumberOfRows)  | 
StripeKernelCache(int maxNumberOfRows,
                 int numberOfColumns)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
flushCache()
Empties the cache 
 | 
int | 
getMaxNumberOfRows()  | 
int | 
getNumberOfColumns()  | 
protected Float | 
getStoredKernelValue(Example exA,
                    Example exB)
Retrieves in the cache the kernel operation between two examples 
 | 
void | 
setKernelValue(Example exA,
              Example exB,
              float value)
Stores a kernel computation in cache 
 | 
void | 
setMaxNumberOfRows(int maxNumberOfRows)  | 
void | 
setNumberOfColumns(int numberOfColumns)  | 
getCacheHits, getCacheMisses, getKernelValue, resetCacheStatspublic StripeKernelCache(Dataset dataset)
dataset - The cache is initialized with a number of rows (and columns)
            that is equal to the size of the datasetpublic StripeKernelCache(Dataset dataset, int maxNumberOfRows)
dataset - The cache is initialized with a number of columns that is
            equal to the size of the datasetmaxNumberOfItems - The maximum number of stripes in the datasetpublic StripeKernelCache(int maxNumberOfRows,
                 int numberOfColumns)
maxNumberOfRows - The maximum number of stripes in the matrixnumberOfColumns - The maximum number of columns in the matrixpublic StripeKernelCache()
public int getMaxNumberOfRows()
public void setMaxNumberOfRows(int maxNumberOfRows)
maxNumberOfRows - the maxNumberOfRows to setpublic int getNumberOfColumns()
public void setNumberOfColumns(int numberOfColumns)
numberOfColumns - the numberOfColumns to setpublic void setKernelValue(Example exA, Example exB, float value)
KernelCachesetKernelValue in class KernelCacheexA - the first exampleexB - the second examplevalue - the kernel value to be stored in cachepublic void flushCache()
KernelCacheflushCache in class KernelCacheprotected Float getStoredKernelValue(Example exA, Example exB)
KernelCachegetStoredKernelValue in class KernelCacheexA - the first exampleexB - the second examplenull<\code> if a cache miss occursCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.