Class ModelCodecSwapData

  • All Implemented Interfaces:
    org.ddogleg.fitting.modelset.ModelCodec<org.ejml.data.DMatrixRMaj>

    public class ModelCodecSwapData
    extends java.lang.Object
    implements org.ddogleg.fitting.modelset.ModelCodec<org.ejml.data.DMatrixRMaj>
    For use in cases where the model is a matrix and there is a 1-to-1 relationship with model parameters. Instead of copying the data over it simple puts parameter array reference into the matrix.
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelCodecSwapData​(int paramLength)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decode​(double[] input, org.ejml.data.DMatrixRMaj outputModel)  
      void encode​(org.ejml.data.DMatrixRMaj model, double[] param)  
      int getParamLength()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModelCodecSwapData

        public ModelCodecSwapData​(int paramLength)
    • Method Detail

      • decode

        public void decode​(double[] input,
                           org.ejml.data.DMatrixRMaj outputModel)
        Specified by:
        decode in interface org.ddogleg.fitting.modelset.ModelCodec<org.ejml.data.DMatrixRMaj>
      • encode

        public void encode​(org.ejml.data.DMatrixRMaj model,
                           double[] param)
        Specified by:
        encode in interface org.ddogleg.fitting.modelset.ModelCodec<org.ejml.data.DMatrixRMaj>
      • getParamLength

        public int getParamLength()
        Specified by:
        getParamLength in interface org.ddogleg.fitting.modelset.ModelCodec<org.ejml.data.DMatrixRMaj>