Exemple #1
0
        Integrate(Func <double, double> f,
                  double a,
                  OscillatoryTerm oscTerm,
                  double omega,
                  double epsabs, int limit,
                  bool debug,
                  out double result, out double abserr)
        {
            if (null == _workSpace || limit > _workSpace.limit)
            {
                _workSpace = new gsl_integration_workspace(limit);
            }

            if (null == _cycleWorkspace || limit > _cycleWorkspace.limit)
            {
                _cycleWorkspace = new gsl_integration_workspace(limit);
            }

            if (null == _qawoTable)
            {
                _qawoTable = new gsl_integration_qawo_table(omega, 1, oscTerm == OscillatoryTerm.Cosine ? gsl_integration_qawo_enum.GSL_INTEG_COSINE : gsl_integration_qawo_enum.GSL_INTEG_SINE, _defaultOscTableLength);
            }
            else
            {
                _qawoTable.set(omega, 1, oscTerm == OscillatoryTerm.Cosine ? gsl_integration_qawo_enum.GSL_INTEG_COSINE : gsl_integration_qawo_enum.GSL_INTEG_SINE);
            }
            return(gsl_integration_qawf(f, a, epsabs, limit, _workSpace, _cycleWorkspace, _qawoTable, out result, out abserr, debug));
        }
Exemple #2
0
		 Integrate(Func<double, double> f,
		 double a,
		 OscillatoryTerm oscTerm,
		 double omega,
		 double epsabs, int limit,
		 out double result, out double abserr)
		{
			return Integrate(f, a, oscTerm, omega, epsabs, limit, _debug, out result, out abserr);
		}
Exemple #3
0
 Integrate(Func <double, double> f,
           double a,
           OscillatoryTerm oscTerm,
           double omega,
           double epsabs, int limit,
           out double result, out double abserr)
 {
     return(Integrate(f, a, oscTerm, omega, epsabs, limit, _debug, out result, out abserr));
 }
Exemple #4
0
        Integration(Func <double, double> f,
                    double a,
                    OscillatoryTerm oscTerm,
                    double omega,
                    double epsabs,
                    int limit,
                    out double result, out double abserr,
                    ref object tempStorage
                    )
        {
            var algo = tempStorage as QawfIntegration;

            if (null == algo)
            {
                tempStorage = algo = new QawfIntegration();
            }
            return(algo.Integrate(f, a, oscTerm, omega, epsabs, limit, out result, out abserr));
        }
Exemple #5
0
			Integrate(Func<double, double> f,
			double a, double b,
			OscillatoryTerm oscTerm,
			double omega,
			double epsabs, double epsrel, int limit,
			bool debug,
			out double result, out double abserr)
		{
			if (null == _workSpace || limit > _workSpace.limit)
				_workSpace = new gsl_integration_workspace(limit);
			if (null == _qawoTable)
			{
				_qawoTable = new gsl_integration_qawo_table(omega, b - a, oscTerm == OscillatoryTerm.Cosine ? gsl_integration_qawo_enum.GSL_INTEG_COSINE : gsl_integration_qawo_enum.GSL_INTEG_SINE, _defaultOscTableLength);
			}
			else
			{
				_qawoTable.set(omega, b - a, oscTerm == OscillatoryTerm.Cosine ? gsl_integration_qawo_enum.GSL_INTEG_COSINE : gsl_integration_qawo_enum.GSL_INTEG_SINE);
			}

			return gsl_integration_qawo(f, a, epsabs, epsrel, limit, _workSpace, _qawoTable, out result, out abserr, debug);
		}
Exemple #6
0
		Integration(Func<double, double> f,
					double a, double b,
			OscillatoryTerm oscTerm,
		 double omega,
					double epsabs, double epsrel,
					int limit,
					out double result, out double abserr,
					ref object tempStorage
					)
		{
			QawoIntegration algo = tempStorage as QawoIntegration;
			if (null == algo)
				tempStorage = algo = new QawoIntegration();
			return algo.Integrate(f, a, b, oscTerm, omega, epsabs, epsrel, limit, out result, out abserr);
		}