Example #1
0
 /// <summary>
 /// Creates an instance.
 /// </summary>
 /// <param name="n"> The number of sample points to be used in the integration, not negative or zero </param>
 /// <param name="generator"> The generator of weights and abscissas </param>
 public GaussianQuadratureIntegrator1D(int n, QuadratureWeightAndAbscissaFunction generator)
 {
     ArgChecker.isTrue(n > 0, "number of intervals must be > 0");
     ArgChecker.notNull(generator, "generating function");
     this.size       = n;
     this.generator  = generator;
     this.quadrature = generator.generate(size);
 }