boofcv.abst.geo.optimization
Class ModelCodecSwapData
- java.lang.Object
-
- boofcv.abst.geo.optimization.ModelCodecSwapData
-
- All Implemented Interfaces:
- ModelCodec<org.ejml.data.DenseMatrix64F>
public class ModelCodecSwapData extends java.lang.Object implements ModelCodec<org.ejml.data.DenseMatrix64F>
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 and Description ModelCodecSwapData(int paramLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddecode(double[] input, org.ejml.data.DenseMatrix64F outputModel)Converts the parameter array into a model.voidencode(org.ejml.data.DenseMatrix64F model, double[] param)Converts the provided model into the array format.intgetParamLength()Number of elements in array encoded parameters.
-
-
-
Method Detail
-
decode
public void decode(double[] input, org.ejml.data.DenseMatrix64F outputModel)Description copied from interface:ModelCodecConverts the parameter array into a model.- Specified by:
decodein interfaceModelCodec<org.ejml.data.DenseMatrix64F>- Parameters:
input- input model parameters.outputModel- Option (can be null) model.
-
encode
public void encode(org.ejml.data.DenseMatrix64F model, double[] param)Description copied from interface:ModelCodecConverts the provided model into the array format.- Specified by:
encodein interfaceModelCodec<org.ejml.data.DenseMatrix64F>- Parameters:
model- Input model.param- Output parameterized model. Can be null.
-
getParamLength
public int getParamLength()
Description copied from interface:ModelCodecNumber of elements in array encoded parameters.- Specified by:
getParamLengthin interfaceModelCodec<org.ejml.data.DenseMatrix64F>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG