BRDFLafortuneFitting.LevenbergMarquardt.Init C# (CSharp) Method

Init() public method

Initializes the solver
public Init ( int _Dimension, int _ParametersCount, int _MaxIterations ) : void
_Dimension int Size of the dataset to solve against (i.e. amount of data points to fit against)
_ParametersCount int Size of the vector to solve for (i.e. amount of unknowns to fit)
_MaxIterations int Maximum amount of iterations to perform (20 iters significantly increases error vs. 100, a standard value is 45)
return void
        public void Init( int _Dimension, int _ParametersCount, int _MaxIterations )
        {
            m_Dimension = _Dimension;
            m_ParametersCount = _ParametersCount;
            m_MaxIterations = _MaxIterations;

            m_Constraints = new Constraints( m_ParametersCount );

            m_Delta = new Vector( m_Dimension );
             			m_Diagonal = new Vector( m_Dimension );
            m_Jacobian = new Matrix( m_ParametersCount, m_Dimension );
            m_JacobianEx = new Matrix( m_Dimension+m_ParametersCount, m_Dimension );

            m_TempPoint = new Vector( m_Dimension );
        }