public abstract class KernelReplace<T> extends KernelPosNeg<T,UpdatableMarksList>
Constructor and Description |
---|
KernelReplace() |
Modifier and Type | Method and Description |
---|---|
double |
calculateAcceptanceProbability(int existingSize,
int proposalSize,
double poissonIntens,
Dimensions dimensions,
double densityRatio) |
int[] |
changedMarkIDArray()
The mark ids that were changed in the last energy calculation for the kernel
|
String |
describeLast() |
int |
getBirthRepeats() |
boolean |
hasBeenInit() |
protected void |
initialize(KernelBirth<T> kernelBirth,
KernelDeath<T> kernelDeath)
Must be called before makeProposal
|
Optional<T> |
makeProposal(Optional<T> existing,
KernelCalculationContext context)
Calculates the Energy for a proposal
|
void |
setBirthRepeats(int birthRepeats) |
void |
updateAfterAcceptance(UpdatableMarksList updatableState,
T energyExisting,
T energyNew)
If the kernel is accepted, makes the necessary changes to a ListUpdatableMarkSetCollection
|
assignTo, getProbNeg, getProbPos, setProbNeg, setProbPos
informLatestState, initBeforeCalc
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
protected void initialize(KernelBirth<T> kernelBirth, KernelDeath<T> kernelDeath)
public Optional<T> makeProposal(Optional<T> existing, KernelCalculationContext context) throws KernelCalculateEnergyException
Kernel
makeProposal
in class Kernel<T,UpdatableMarksList>
existing
- the existing EnergyKernelCalculateEnergyException
public double calculateAcceptanceProbability(int existingSize, int proposalSize, double poissonIntens, Dimensions dimensions, double densityRatio)
calculateAcceptanceProbability
in class Kernel<T,UpdatableMarksList>
public String describeLast()
describeLast
in class Kernel<T,UpdatableMarksList>
public void updateAfterAcceptance(UpdatableMarksList updatableState, T energyExisting, T energyNew) throws UpdateMarkSetException
Kernel
updateAfterAcceptance
in class Kernel<T,UpdatableMarksList>
updatableState
- where to make the changesenergyExisting
- existing energyenergyNew
- accepted energyUpdateMarkSetException
public int[] changedMarkIDArray()
Kernel
Guaranteed only to be called, if energy calculation did not return null
changedMarkIDArray
in class Kernel<T,UpdatableMarksList>
public boolean hasBeenInit()
public int getBirthRepeats()
public void setBirthRepeats(int birthRepeats)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.