Class AbstractSingleFitWorker<I extends RealType<I>>

    • Field Detail

      • paramBuffer

        protected final float[] paramBuffer
        Data buffers, all except for transBuffer are writable
      • transBuffer

        protected final float[] transBuffer
        Data buffers, all except for transBuffer are writable
      • chisqBuffer

        protected final float[] chisqBuffer
        Data buffers, all except for transBuffer are writable
      • fittedBuffer

        protected final float[] fittedBuffer
        Data buffers, all except for transBuffer are writable
      • residualBuffer

        protected final float[] residualBuffer
        Data buffers, all except for transBuffer are writable
    • Constructor Detail

      • AbstractSingleFitWorker

        public AbstractSingleFitWorker​(FitParams<I> params,
                                       FitResults results)
    • Method Detail

      • beforeFit

        protected void beforeFit()
        A routine called before doFit(). Can be used to throw away the left-overs from the previous run.
      • doFit

        protected abstract void doFit()
        Does the actual implementation-specific fitting routine.
      • afterFit

        protected void afterFit()
        A routine called after doFit(). Can be used to copy back results from buffers.
      • fitSingle

        public void fitSingle()
        Fit the data in the buffer.
      • duplicate

        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.
        Parameters:
        params - the parameters
        rslts - the results
        Returns:
        a worker of the same kind.
      • onThreadInit

        protected void onThreadInit()
        Called on the worker thread after worker duplication. Can be used to initialize thread-local globals such as Bayesian search grid parameters.
        See Also:
        BayesFit.BayesFitWorker.onThreadInit()
      • runMultiThreaded

        protected boolean runMultiThreaded()
      • fitBatch

        public void fitBatch​(List<int[]> pos,
                             FitWorker.FitEventHandler<I> handler)
        Description copied from interface: FitWorker
        Fit all coordinates listed and handles fit events.
        Parameters:
        pos - the coordinates of trans to fit
        handler - the fit event handler