/// <summary>
 /// Creates an instance.
 /// </summary>
 /// <param name="integrator"> The base integrator. </param>
 /// <param name="gain"> The gain ratio </param>
 /// <param name="tol"> The tolerance </param>
 public AdaptiveCompositeIntegrator1D(Integrator1D <double, double> integrator, double gain, double tol)
 {
     ArgChecker.notNull(integrator, "integrator");
     this.integrator = integrator;
     this.gain       = gain;
     this.tol        = tol;
 }
 /// <summary>
 /// Creates an instance.
 /// </summary>
 /// <param name="integrator"> The base integrator  </param>
 public AdaptiveCompositeIntegrator1D(Integrator1D <double, double> integrator)
 {
     ArgChecker.notNull(integrator, "integrator");
     this.integrator = integrator;
     this.gain       = 15.0;
     this.tol        = 1.e-13;
 }
Example #3
0
 /// <summary>
 /// Given an integrator, returns its name.
 /// </summary>
 /// <param name="integrator">  the integrator </param>
 /// <returns> the name of that integrator (null if not found) </returns>
 public static string getIntegratorName(Integrator1D <double, double> integrator)
 {
     if (integrator == null)
     {
         return(null);
     }
     return(INSTANCE_NAMES[integrator.GetType()]);
 }
Example #4
0
        /// <summary>
        /// Given a name, returns an instance of that integrator.
        /// </summary>
        /// <param name="integratorName">  the name of the integrator </param>
        /// <returns> the integrator </returns>
        /// <exception cref="IllegalArgumentException"> if the integrator name is null or there is no integrator for that name </exception>
        public static Integrator1D <double, double> getIntegrator(string integratorName)
        {
            Integrator1D <double, double> integrator = STATIC_INSTANCES[integratorName];

            if (integrator != null)
            {
                return(integrator);
            }
            throw new System.ArgumentException("Integrator " + integratorName + " not handled");
        }