Example #1
0
        public Matrix <PF> ComputeParametersJacobian(IFD input)
        {
            if (OuterFunction.ParametersCount > 0 && InnerFunction.ParametersCount > 0)
            {
                Matrix <PF> outerParamsJacobian = OuterFunction.ComputeParametersJacobian(InnerFunction.Compute(input));
                Matrix <PF> outerVarsJacobian   = OuterFunction.ComputeVariablesJacobian(InnerFunction.Compute(input));
                Matrix <PF> innerParamsJacobian = InnerFunction.ComputeParametersJacobian(input);

                return(Matrix <PF> .ConcatRows(outerParamsJacobian, outerVarsJacobian *innerParamsJacobian));
            }
            else if (OuterFunction.ParametersCount == 0)
            {
                Matrix <PF> outerVarsJacobian   = OuterFunction.ComputeVariablesJacobian(InnerFunction.Compute(input));
                Matrix <PF> innerParamsJacobian = InnerFunction.ComputeParametersJacobian(input);

                return(outerVarsJacobian * innerParamsJacobian);
            }
            else
            {
                return(OuterFunction.ComputeParametersJacobian(InnerFunction.Compute(input)));
            }
        }
Example #2
0
 public Matrix <PF> ComputeVariablesJacobian(IFD input)
 {
     return(OuterFunction.ComputeVariablesJacobian(InnerFunction.Compute(input)) * InnerFunction.ComputeVariablesJacobian(input));
 }
Example #3
0
 public OFR Compute(IFD input)
 {
     return(OuterFunction.Compute(InnerFunction.Compute(input)));
 }