/// <summary> /// Linear combination constructor. /// The derivative structure built will be a1 * ds1 + a2 * ds2 /// </summary> /// <param name="a1">first scale factor</param> /// <param name="ds1">first base (unscaled) derivative structure</param> /// <param name="a2">second scale factor</param> /// <param name="ds2">second base (unscaled) derivative structure</param> /// <exception cref="DimensionMismatchException"> if number of free parameters /// or orders are inconsistent</exception> public DerivativeStructure(double a1, DerivativeStructure ds1, double a2, DerivativeStructure ds2) : this(ds1.compiler) { compiler.checkCompatibility(ds2.compiler); compiler.linearCombination(a1, ds1.data, 0, a2, ds2.data, 0, data, 0); }