public abstract class AbstractSingleFitWorker<I extends RealType<I>> extends AbstractFitWorker<I>
FitWorker.FitEventHandler<I extends RealType<I>>
Modifier and Type | Field and Description |
---|---|
protected float[] |
chisqBuffer
Data buffers, all except for
transBuffer are writable |
protected float[] |
fittedBuffer
Data buffers, all except for
transBuffer are writable |
protected float[] |
paramBuffer
Data buffers, all except for
transBuffer are writable |
protected float[] |
residualBuffer
Data buffers, all except for
transBuffer are writable |
protected float[] |
transBuffer
Data buffers, all except for
transBuffer are writable |
adjFitEnd, adjFitStart, nData, nDataTotal, nParam, ops, params, rawChisq_target, results
Constructor and Description |
---|
AbstractSingleFitWorker(FitParams<I> params,
FitResults results,
OpEnvironment ops) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterFit()
A routine called after
doFit() . |
protected void |
beforeFit()
A routine called before
doFit() . |
protected abstract void |
doFit()
Does the actual implementation-specific fitting routine.
|
protected abstract AbstractSingleFitWorker<I> |
duplicate(FitParams<I> params,
FitResults rslts)
Make a worker of the same kind but does not share any writable buffers (thread safe) if that
buffer is null.
|
void |
fitBatch(List<int[]> pos,
FitWorker.FitEventHandler<I> handler)
Fit all coordinates listed and handles fit events.
|
protected void |
fitSingle()
Fit the data in the buffer.
|
protected void |
onThreadInit()
Called on the worker thread after worker duplication.
|
nDataOut, nParamOut, populate
protected final float[] paramBuffer
transBuffer
are writableprotected final float[] transBuffer
transBuffer
are writableprotected final float[] chisqBuffer
transBuffer
are writableprotected final float[] fittedBuffer
transBuffer
are writableprotected final float[] residualBuffer
transBuffer
are writablepublic AbstractSingleFitWorker(FitParams<I> params, FitResults results, OpEnvironment ops)
protected void beforeFit()
doFit()
. Can be used to throw away the left-overs from the
previous run.protected abstract void doFit()
protected void afterFit()
doFit()
. Can be used to copy back results from buffers.protected void fitSingle()
protected abstract AbstractSingleFitWorker<I> duplicate(FitParams<I> params, FitResults rslts)
params
- the parametersrslts
- the resultsprotected void onThreadInit()
BayesFitWorker.onThreadInit()
public void fitBatch(List<int[]> pos, FitWorker.FitEventHandler<I> handler)
FitWorker
pos
- the coordinates of trans to fithandler
- the fit event handlerCopyright © 2015–2022 FLIMLib. All rights reserved.