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))); } }
public Matrix <PF> ComputeVariablesJacobian(IFD input) { return(OuterFunction.ComputeVariablesJacobian(InnerFunction.Compute(input)) * InnerFunction.ComputeVariablesJacobian(input)); }
public OFR Compute(IFD input) { return(OuterFunction.Compute(InnerFunction.Compute(input))); }