public abstract class CachedKernel extends Kernel
| Constructor and Description |
|---|
CachedKernel()
default constructor - does nothing.
|
| Modifier and Type | Method and Description |
|---|---|
void |
buildKernel(Instances data)
builds the kernel with the given data.
|
String |
cacheSizeTipText()
Returns the tip text for this property
|
void |
clean()
Frees the cache used by the kernel.
|
double |
eval(int id1,
int id2,
Instance inst1)
Implements the abstract function of Kernel using the cache.
|
int |
getCacheSize()
Gets the size of the cache
|
String[] |
getOptions()
Gets the current settings of the Kernel.
|
Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
int |
numCacheHits()
Returns the number of cache hits on dot products.
|
int |
numEvals()
Returns the number of time Eval has been called.
|
void |
setCacheSize(int value)
Sets the size of the cache to use (a prime number)
|
void |
setOptions(String[] options)
Parses a given list of options.
|
checksTurnedOffTipText, debugTipText, doNotCheckCapabilitiesTipText, forName, getCapabilities, getChecksTurnedOff, getDebug, getDoNotCheckCapabilities, getRevision, globalInfo, makeCopies, makeCopy, setChecksTurnedOff, setDebug, setDoNotCheckCapabilitiespublic Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class Kernelpublic void setOptions(String[] options) throws Exception
setOptions in interface OptionHandlersetOptions in class Kerneloptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Kernelpublic double eval(int id1,
int id2,
Instance inst1)
throws Exception
public int numEvals()
public int numCacheHits()
numCacheHits in class Kernelpublic void setCacheSize(int value)
value - the size of the cachepublic int getCacheSize()
public String cacheSizeTipText()
public void buildKernel(Instances data) throws Exception
buildKernel in class Kerneldata - the data to base the kernel onException - if something goes wrongCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.