T
- the type of entity that is modifiedS
- updatable-statepublic abstract class Kernel<T,S> extends MarksBean<Kernel<T,S>> implements CompatibleWithMark
Constructor and Description |
---|
Kernel() |
Modifier and Type | Method and Description |
---|---|
abstract double |
calculateAcceptanceProbability(int existingSize,
int proposalSize,
double poissonIntens,
Dimensions dimensions,
double densityRatio) |
abstract int[] |
changedMarkIDArray()
The mark ids that were changed in the last energy calculation for the kernel
|
abstract String |
describeLast() |
String |
getName() |
abstract void |
informLatestState(T state)
Called every time a proposal is accepted, so a kernel can potentially keep track of the state
of the current image
|
abstract void |
initBeforeCalc(KernelCalculationContext context) |
abstract Optional<T> |
makeProposal(Optional<T> existing,
KernelCalculationContext context)
Calculates the Energy for a proposal
|
void |
setName(String name) |
abstract void |
updateAfterAcceptance(S updatableState,
T energyExisting,
T energyNew)
If the kernel is accepted, makes the necessary changes to a ListUpdatableMarkSetCollection
|
initializerForMarksBeans
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isCompatibleWith
public abstract void initBeforeCalc(KernelCalculationContext context) throws InitializeException
InitializeException
public abstract Optional<T> makeProposal(Optional<T> existing, KernelCalculationContext context) throws KernelCalculateEnergyException
existing
- the existing Energycontext
- KernelCalculateEnergyException
public abstract double calculateAcceptanceProbability(int existingSize, int proposalSize, double poissonIntens, Dimensions dimensions, double densityRatio)
public abstract String describeLast()
public abstract void updateAfterAcceptance(S updatableState, T energyExisting, T energyNew) throws UpdateMarkSetException
updatableState
- where to make the changesenergyExisting
- existing energyenergyNew
- accepted energyUpdateMarkSetException
public abstract int[] changedMarkIDArray()
Guaranteed only to be called, if energy calculation did not return null
public abstract void informLatestState(T state)
state
- current-state (after being accepted)public String getName()
public void setName(String name)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.