public class LearnWeights
extends org.licas.Service
Modifier and Type | Field and Description |
---|---|
protected static float |
MAXWEIGHT
Range constants
|
protected static float |
MINWEIGHT |
protected float |
previousUpdateSumDec
Previous update sum for decrement
|
protected float |
previousUpdateSumInc
Previous update sum for increment
|
Constructor and Description |
---|
LearnWeights(java.lang.String thisPassword,
java.lang.String thisAdminKey)
Creates a new instance of LearnWeights.
|
Modifier and Type | Method and Description |
---|---|
protected void |
initialise()
Initialise some values.
|
float |
updateDecrementWeight(float decWeight,
int totalMovedUp,
int totalMovedDown)
Adjust the decrement weight value based on the previous number
of sources moved up or down.
|
protected float |
updateDecrementWeight1(float decWeight,
int totalMovedUp,
int totalMovedDown)
Adjust the decrement weight value based on the previous number
of sources moved up or down - version 1 considers only these update values.
|
protected float |
updateDecrementWeight2(float decWeight,
int totalMovedUp,
int totalMovedDown)
Adjust the decrement weight value based on the previous number
of sources moved up or down - version 2 also considers last update values.
|
float |
updateIncrementWeight(float incWeight,
int totalMovedUp,
int totalMovedDown)
Adjust the increment weight value based on the previous number
of sources moved up or down.
|
protected float |
updateIncrementWeight1(float incWeight,
int totalMovedUp,
int totalMovedDown)
Adjust the increment weight value based on the previous number
of sources moved up or down - version 1 considers only these update values.
|
protected float |
updateIncrementWeight2(float incWeight,
int totalMovedUp,
int totalMovedDown)
Adjust the increment weight value based on the previous number
of sources moved up or down - version 2 also considers last update values.
|
addCommunicationID, addDefaultService, addDefaultService, addDefaultService, addDefaultService, addLinkFromService, addLinkToService, addMessageMetrics, addService, addService, addService, addService, addServiceAssociation, addServicePassword, addTempPassword, allowAddService, canAccess, canAccess, canAccess, canAccess, canAccessMeta, canAccessNested, canAccessTemp, canRun, classNameOK, clearServiceLinks, clearServices, clearServices, close, createMetaForRepos, createMetaFull, createPermanentLinkTo, createServiceWrapper, defaultAdminToRemove, dynamicLinkQuery, dynamicLinksToPermanent, dynamicLinksToXml, dynamicLinksToXml, execute, finaliseInitialisation, finaliseInitialisation, finaliseModule, finaliseThisConfig, GET, getAllLinkToService, getAllowAddService, getAutonomicManagerConfig, getCommunicationClientURI, getData, getData, getDescription, getFullPath, getInstanceValue, getIsRemoteCall, getLinkFromService, getLinkToService, getLocalRemoteID, getParent, getParent, getPassword, getPassword, getPassword, getPasswordHandler, getPrivateMethods, getPublicMethods, getPublicServiceClassname, getServerPassword, getService, getService, getServiceAdmin, getServiceClasses, getServiceGrade, getServiceLinks, getServiceNames, getServiceNames, getServiceNames, getServiceOrWrapper, getServiceState, getServiceType, getServiceTypes, handshake, hasCommunicationID, hasLinkTo, hasServerPassword, hasService, hasServiceType, interrupt, isAdminKey, isCorrectPassword, isPrivateMethod, isPublicMethod, isStarted, linksToXml, passwordsStateToXml, permanentLinksToXml, removeAllLinksTo, removeAllServices, removeAllServices, removeCommunicationID, removeLinkFromService, removeLinkToService, removePermanentLinkTo, removeServiceAssociation, removeServiceID, removeServicePath, removeServicePath, removeTempPassword, serviceNegotiate, serviceToXml, serviceToXml, setAdminInfo, setCanAccessMeta, setCanAccessNested, setData, setDataModule, setDataModule, setDescription, setInstanceValues, setIsRemoteCall, setOtherMeta, setParent, setParent, setSerializeValues, setServerPassword, setServiceGrade, setServiceModule, setServiceState, startAllThreads, startThread, stopAllThreads, syncToAsync, syncToAsyncReply, syncToAsyncTransit, xmlToDynamicLinks, xmlToService
canAccess, getServicePassword, getServiceType, 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
protected static float MAXWEIGHT
protected static float MINWEIGHT
protected float previousUpdateSumInc
protected float previousUpdateSumDec
public LearnWeights(java.lang.String thisPassword, java.lang.String thisAdminKey) throws java.lang.Exception
thisPassword
- the password to protect.thisAdminKey
- a unique key to protect loading/removal.java.lang.Exception
- any error.protected void initialise()
public float updateIncrementWeight(float incWeight, int totalMovedUp, int totalMovedDown)
incWeight
- the current increment weight value.totalMovedUp
- number of sources currently moved up a level.totalMovedDown
- number of sources currently moved down a level.protected float updateIncrementWeight1(float incWeight, int totalMovedUp, int totalMovedDown)
incWeight
- the current increment weight value.totalMovedUp
- number of sources currently moved up a level.totalMovedDown
- number of sources currently moved down a level.protected float updateIncrementWeight2(float incWeight, int totalMovedUp, int totalMovedDown)
incWeight
- the current increment weight value.totalMovedUp
- number of sources currently moved up a level.totalMovedDown
- number of sources currently moved down a level.public float updateDecrementWeight(float decWeight, int totalMovedUp, int totalMovedDown)
decWeight
- the current decrement weight value.totalMovedUp
- number of sources currently moved up a level.totalMovedDown
- number of sources currently moved down a level.protected float updateDecrementWeight1(float decWeight, int totalMovedUp, int totalMovedDown)
decWeight
- the current decrement weight value.totalMovedUp
- number of sources currently moved up a level.totalMovedDown
- number of sources currently moved down a level.protected float updateDecrementWeight2(float decWeight, int totalMovedUp, int totalMovedDown)
decWeight
- the current decrement weight value.totalMovedUp
- number of sources currently moved up a level.totalMovedDown
- number of sources currently moved down a level.