using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Science.Mathematics.VectorCalculus { public class Laplacian { private Function.ToLastType func; private double res; private double[] at1; private int n; public Laplacian(Function.ToLastType f, double[] x) { n = x.Length; func = f; at1 = x; } public double[] At { set { at1 = value; } } public void Compute() { Function.ToLastType grad = new Function.ToLastType(delf); Divergence obj = new Divergence(grad,at1); obj.Compute(); res = obj.Result; } private double[] delf(double[] x) { Gradient gr = new Gradient(func, x); gr.Compute(); return gr.Result; } public double Result { get { return res; } } } }