public static Calc ( |
||
v | A variable-length parameters list containing v. | |
f | double>.Func | The Func<int,double,double> to process. |
리턴 |
/// <summary>A Vector extension method that calcs.</summary> /// <param name="v">The v to act on.</param> /// <param name="f">The Func<T,double> to process.</param> /// <returns>A Vector.</returns> public static Vector Calc(this Vector v, Func <double, double> f) { return(Vector.Calc(v, f)); }
/// <summary>Computes the given x coordinate.</summary> /// <param name="x">The Vector to process.</param> /// <returns>A Vector.</returns> public Vector Compute(Vector x) { return x.Calc(d => Compute(d)); }
/// <summary>Derivatives the given x coordinate.</summary> /// <param name="x">The Vector to process.</param> /// <returns>A Vector.</returns> public Vector Derivative(Vector x) { return x.Calc(d => Derivative(d)); }
/// <summary> /// Sums the given x coordinate. /// </summary> /// <param name="x">The Vector to process.</param> /// <returns>Double.</returns> public virtual double Minimize(Vector x) { return x.Calc(d => Compute(d)).Sum(); }