public abstract class HM_Cluster extends HeuristicModule
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> |
allData
Datasets from all available services.
|
protected java.util.ArrayList<java.lang.String> |
clusterURIs
List of service IDs/URIs that are clustered with this service.
|
protected org.ai_heuristic.functs.Function |
evalMetric
The evaluation metric
|
protected int |
numberOfIterations
Number of test run iterations, if specified
|
protected java.util.Random |
rnd
Random number generator
|
configXml
shutDown
passwordHandler, service, serviceType
jarFile, syncOn, uuid
Constructor and Description |
---|
HM_Cluster()
Create a new instance of HM_Cluster.
|
HM_Cluster(org.licas_xml.abs.Element adminXml)
Create a new instance of HM_Cluster.
|
Modifier and Type | Method and Description |
---|---|
protected int |
alreadyLinkedTo(java.lang.String linkTo)
Check for existing links to the selected service, as part of a cluster.
|
protected java.lang.String |
getMetricType()
Get the evaluation metric type, if initialised with the info in the admin
Meta element. |
protected boolean |
iterationsOK(int maxIterations)
Return true if the current iterations value is OK with respect to a maximum value.
|
void |
resetValues()
Reset variables for another test run.
|
evaluate
getShutDown, interrupt, setShutDown, setShutDown
canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServerPassword, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType
getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUUID, setJarFile, setUUID
protected int numberOfIterations
protected java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> allData
protected java.util.ArrayList<java.lang.String> clusterURIs
protected org.ai_heuristic.functs.Function evalMetric
protected java.util.Random rnd
public HM_Cluster() throws java.lang.Exception
java.lang.Exception
- any error.public HM_Cluster(org.licas_xml.abs.Element adminXml) throws java.lang.Exception
adminXml
- configuration parameters, including metric type and setup.java.lang.Exception
- any error.public void resetValues()
resetValues
in class HeuristicModule
protected boolean iterationsOK(int maxIterations)
maxIterations
- the maximum value to compare with.protected int alreadyLinkedTo(java.lang.String linkTo) throws java.lang.Exception
linkTo
- the uuid of the service to check for.java.lang.Exception
- any error.protected java.lang.String getMetricType() throws java.lang.Exception
Meta
element.
This check can be performed automatically, but the metric info might not be added,
when a default metric (Euclidean
) can be used instead.java.lang.Exception
- any error.