⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sf_graphs.cpp

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 CPP
📖 第 1 页 / 共 2 页
字号:
   plot.add(f, -4 + find_end_point(f, 0.1, -max_val, true, -4), -3 + find_end_point(f, -0.1, max_val, true, -3), "");   plot.plot("digamma", "digamma.svg", "z", "digamma(z)");   f = boost::math::erf;   plot.clear();   plot.add(f, -3, 3, "");   plot.plot("erf", "erf.svg", "z", "erf(z)");   f = boost::math::erfc;   plot.clear();   plot.add(f, -3, 3, "");   plot.plot("erfc", "erfc.svg", "z", "erfc(z)");   f = boost::math::erf_inv;   plot.clear();   plot.add(f, -1 + find_end_point(f, 0.1, -3, true, -1), 1 + find_end_point(f, -0.1, 3, true, 1), "");   plot.plot("erf_inv", "erf_inv.svg", "z", "erf_inv(z)");   f = boost::math::erfc_inv;   plot.clear();   plot.add(f, find_end_point(f, 0.1, 3, false), 2 + find_end_point(f, -0.1, -3, false, 2), "");   plot.plot("erfc_inv", "erfc_inv.svg", "z", "erfc_inv(z)");   f = boost::math::log1p;   plot.clear();   plot.add(f, -1 + find_end_point(f, 0.1, -10, true, -1), 10, "");   plot.plot("log1p", "log1p.svg", "z", "log1p(z)");   f = boost::math::expm1;   plot.clear();   plot.add(f, -4, 2, "");   plot.plot("expm1", "expm1.svg", "z", "expm1(z)");   f = boost::math::cbrt;   plot.clear();   plot.add(f, -10, 10, "");   plot.plot("cbrt", "cbrt.svg", "z", "cbrt(z)");   f = sqrt1pm1;   plot.clear();   plot.add(f, -1 + find_end_point(f, 0.1, -10, true, -1), 5, "");   plot.plot("sqrt1pm1", "sqrt1pm1.svg", "z", "sqrt1pm1(z)");   f2 = boost::math::powm1;   plot.clear();   plot.add(boost::bind(f2, 0.0001, _1), find_end_point(boost::bind(f2, 0.0001, _1), -1, 10, false), 5, "a=0.0001");   plot.add(boost::bind(f2, 0.001, _1), find_end_point(boost::bind(f2, 0.001, _1), -1, 10, false), 5, "a=0.001");   plot.add(boost::bind(f2, 0.01, _1), find_end_point(boost::bind(f2, 0.01, _1), -1, 10, false), 5, "a=0.01");   plot.add(boost::bind(f2, 0.1, _1), find_end_point(boost::bind(f2, 0.1, _1), -1, 10, false), 5, "a=0.1");   plot.add(boost::bind(f2, 0.75, _1), -5, 5, "a=0.75");   plot.add(boost::bind(f2, 1.25, _1), -5, 5, "a=1.25");   plot.plot("powm1", "powm1.svg", "z", "powm1(a, z)");   f = boost::math::sinc_pi;   plot.clear();   plot.add(f, -10, 10, "");   plot.plot("sinc_pi", "sinc_pi.svg", "z", "sinc_pi(z)");   f = boost::math::sinhc_pi;   plot.clear();   plot.add(f, -5, 5, "");   plot.plot("sinhc_pi", "sinhc_pi.svg", "z", "sinhc_pi(z)");   f = boost::math::acosh;   plot.clear();   plot.add(f, 1, 10, "");   plot.plot("acosh", "acosh.svg", "z", "acosh(z)");   f = boost::math::asinh;   plot.clear();   plot.add(f, -10, 10, "");   plot.plot("asinh", "asinh.svg", "z", "asinh(z)");   f = boost::math::atanh;   plot.clear();   plot.add(f, -1 + find_end_point(f, 0.1, -5, true, -1), 1 + find_end_point(f, -0.1, 5, true, 1), "");   plot.plot("atanh", "atanh.svg", "z", "atanh(z)");   f2 = boost::math::tgamma_delta_ratio;   plot.clear();   plot.add(boost::bind(f2, _1, -0.5), 1, 40, "delta = -0.5");   plot.add(boost::bind(f2, _1, -0.2), 1, 40, "delta = -0.2");   plot.add(boost::bind(f2, _1, -0.1), 1, 40, "delta = -0.1");   plot.add(boost::bind(f2, _1, 0.1), 1, 40, "delta = 0.1");   plot.add(boost::bind(f2, _1, 0.2), 1, 40, "delta = 0.2");   plot.add(boost::bind(f2, _1, 0.5), 1, 40, "delta = 0.5");   plot.add(boost::bind(f2, _1, 1.0), 1, 40, "delta = 1.0");   plot.plot("tgamma_delta_ratio", "tgamma_delta_ratio.svg", "z", "tgamma_delta_ratio(delta, z)");   f2 = boost::math::gamma_p;   plot.clear();   plot.add(boost::bind(f2, 0.5, _1), 0, 20, "a = 0.5");   plot.add(boost::bind(f2, 1.0, _1), 0, 20, "a = 1.0");   plot.add(boost::bind(f2, 5.0, _1), 0, 20, "a = 5.0");   plot.add(boost::bind(f2, 10.0, _1), 0, 20, "a = 10.0");   plot.plot("gamma_p", "gamma_p.svg", "z", "gamma_p(a, z)");   f2 = boost::math::gamma_q;   plot.clear();   plot.add(boost::bind(f2, 0.5, _1), 0, 20, "a = 0.5");   plot.add(boost::bind(f2, 1.0, _1), 0, 20, "a = 1.0");   plot.add(boost::bind(f2, 5.0, _1), 0, 20, "a = 5.0");   plot.add(boost::bind(f2, 10.0, _1), 0, 20, "a = 10.0");   plot.plot("gamma_q", "gamma_q.svg", "z", "gamma_q(a, z)");   f2 = lbeta;   plot.clear();   plot.add(boost::bind(f2, 0.5, _1), 0.00001, 5, "a = 0.5");   plot.add(boost::bind(f2, 1.0, _1), 0.00001, 5, "a = 1.0");   plot.add(boost::bind(f2, 5.0, _1), 0.00001, 5, "a = 5.0");   plot.add(boost::bind(f2, 10.0, _1), 0.00001, 5, "a = 10.0");   plot.plot("beta", "beta.svg", "z", "log(beta(a, z))");   f = boost::math::expint;   max_val = f(4);   plot.clear();   plot.add(f, find_end_point(f, 0.1, -max_val, true), 4, "");   plot.add(f, -3, find_end_point(f, -0.1, -max_val, false), "");   plot.plot("Exponential Integral Ei", "expint_i.svg", "z", "expint(z)");   f2u = boost::math::expint;   max_val = 1;   plot.clear();   plot.add(boost::bind(f2u, 1, _1), find_end_point(boost::bind(f2u, 1, _1), 0.1, max_val, false), 2, "n = 1 ");   plot.add(boost::bind(f2u, 2, _1), find_end_point(boost::bind(f2u, 2, _1), 0.1, max_val, false), 2, "n = 2 ");   plot.add(boost::bind(f2u, 3, _1), 0, 2, "n = 3 ");   plot.add(boost::bind(f2u, 4, _1), 0, 2, "n = 4 ");   plot.plot("Exponential Integral En", "expint2.svg", "z", "expint(n, z)");   f3 = boost::math::ibeta;   plot.clear();   plot.add(boost::bind(f3, 9, 1, _1), 0, 1, "a = 9, b = 1");   plot.add(boost::bind(f3, 7, 2, _1), 0, 1, "a = 7, b = 2");   plot.add(boost::bind(f3, 5, 5, _1), 0, 1, "a = 1, b = 1");   plot.add(boost::bind(f3, 2, 7, _1), 0, 1, "a = 2, b = 7");   plot.add(boost::bind(f3, 1, 9, _1), 0, 1, "a = 1, b = 9");   plot.plot("ibeta", "ibeta.svg", "z", "ibeta(a, b, z)");   f2i = boost::math::legendre_p;   plot.clear();   plot.add(boost::bind(f2i, 1, _1), -1, 1, "l = 1");   plot.add(boost::bind(f2i, 2, _1), -1, 1, "l = 2");   plot.add(boost::bind(f2i, 3, _1), -1, 1, "l = 3");   plot.add(boost::bind(f2i, 4, _1), -1, 1, "l = 4");   plot.add(boost::bind(f2i, 5, _1), -1, 1, "l = 5");   plot.plot("Legendre Polynomials", "legendre_p.svg", "x", "legendre_p(l, x)");   f2u = boost::math::legendre_q;   plot.clear();   plot.add(boost::bind(f2u, 1, _1), -0.95, 0.95, "l = 1");   plot.add(boost::bind(f2u, 2, _1), -0.95, 0.95, "l = 2");   plot.add(boost::bind(f2u, 3, _1), -0.95, 0.95, "l = 3");   plot.add(boost::bind(f2u, 4, _1), -0.95, 0.95, "l = 4");   plot.add(boost::bind(f2u, 5, _1), -0.95, 0.95, "l = 5");   plot.plot("Legendre Polynomials of the Second Kind", "legendre_q.svg", "x", "legendre_q(l, x)");   f2u = boost::math::laguerre;   plot.clear();   plot.add(boost::bind(f2u, 0, _1), -5, 10, "n = 0");   plot.add(boost::bind(f2u, 1, _1), -5, 10, "n = 1");   plot.add(boost::bind(f2u, 2, _1),       find_end_point(boost::bind(f2u, 2, _1), -2, 20, false),       find_end_point(boost::bind(f2u, 2, _1), 4, 20, true),       "n = 2");   plot.add(boost::bind(f2u, 3, _1),       find_end_point(boost::bind(f2u, 3, _1), -2, 20, false),       8 + find_end_point(boost::bind(f2u, 3, _1), 1, 20, false, 8),       "n = 3");   plot.add(boost::bind(f2u, 4, _1),       find_end_point(boost::bind(f2u, 4, _1), -2, 20, false),       8 + find_end_point(boost::bind(f2u, 4, _1), 1, 20, true, 8),       "n = 4");   plot.add(boost::bind(f2u, 5, _1),       find_end_point(boost::bind(f2u, 5, _1), -2, 20, false),       8 + find_end_point(boost::bind(f2u, 5, _1), 1, 20, true, 8),       "n = 5");   plot.plot("Laguerre Polynomials", "laguerre.svg", "x", "laguerre(n, x)");   f2u = boost::math::hermite;   plot.clear();   plot.add(boost::bind(f2u, 0, _1), -1.8, 1.8, "n = 0");   plot.add(boost::bind(f2u, 1, _1), -1.8, 1.8, "n = 1");   plot.add(boost::bind(f2u, 2, _1), -1.8, 1.8, "n = 2");   plot.add(boost::bind(f2u, 3, _1), -1.8, 1.8, "n = 3");   plot.add(boost::bind(f2u, 4, _1), -1.8, 1.8, "n = 4");   plot.plot("Hermite Polynomials", "hermite.svg", "x", "hermite(n, x)");   f2 = boost::math::cyl_bessel_j;   plot.clear();   plot.add(boost::bind(f2, 0, _1), -20, 20, "v = 0");   plot.add(boost::bind(f2, 1, _1), -20, 20, "v = 1");   plot.add(boost::bind(f2, 2, _1), -20, 20, "v = 2");   plot.add(boost::bind(f2, 3, _1), -20, 20, "v = 3");   plot.add(boost::bind(f2, 4, _1), -20, 20, "v = 4");   plot.plot("Bessel J", "cyl_bessel_j.svg", "x", "cyl_bessel_j(v, x)");   f2 = boost::math::cyl_neumann;   plot.clear();   plot.add(boost::bind(f2, 0, _1), find_end_point(boost::bind(f2, 0, _1), 0.1, -5, true), 20, "v = 0");   plot.add(boost::bind(f2, 1, _1), find_end_point(boost::bind(f2, 1, _1), 0.1, -5, true), 20, "v = 1");   plot.add(boost::bind(f2, 2, _1), find_end_point(boost::bind(f2, 2, _1), 0.1, -5, true), 20, "v = 2");   plot.add(boost::bind(f2, 3, _1), find_end_point(boost::bind(f2, 3, _1), 0.1, -5, true), 20, "v = 3");   plot.add(boost::bind(f2, 4, _1), find_end_point(boost::bind(f2, 4, _1), 0.1, -5, true), 20, "v = 4");   plot.plot("Bessel Y", "cyl_neumann.svg", "x", "cyl_neumann(v, x)");   f2 = boost::math::cyl_bessel_i;   plot.clear();   plot.add(boost::bind(f2, 0, _1), find_end_point(boost::bind(f2, 0, _1), -0.1, 20, false), find_end_point(boost::bind(f2, 0, _1), 0.1, 20, true), "v = 0");   plot.add(boost::bind(f2, 2, _1), find_end_point(boost::bind(f2, 2, _1), -0.1, 20, false), find_end_point(boost::bind(f2, 2, _1), 0.1, 20, true), "v = 2");   plot.add(boost::bind(f2, 5, _1), find_end_point(boost::bind(f2, 5, _1), -0.1, -20, true), find_end_point(boost::bind(f2, 5, _1), 0.1, 20, true), "v = 5");   plot.add(boost::bind(f2, 7, _1), find_end_point(boost::bind(f2, 7, _1), -0.1, -20, true), find_end_point(boost::bind(f2, 7, _1), 0.1, 20, true), "v = 7");   plot.add(boost::bind(f2, 10, _1), find_end_point(boost::bind(f2, 10, _1), -0.1, 20, false), find_end_point(boost::bind(f2, 10, _1), 0.1, 20, true), "v = 10");   plot.plot("Bessel I", "cyl_bessel_i.svg", "x", "cyl_bessel_i(v, x)");   f2 = boost::math::cyl_bessel_k;   plot.clear();   plot.add(boost::bind(f2, 0, _1), find_end_point(boost::bind(f2, 0, _1), 0.1, 10, false), 10, "v = 0");   plot.add(boost::bind(f2, 2, _1), find_end_point(boost::bind(f2, 2, _1), 0.1, 10, false), 10, "v = 2");   plot.add(boost::bind(f2, 5, _1), find_end_point(boost::bind(f2, 5, _1), 0.1, 10, false), 10, "v = 5");   plot.add(boost::bind(f2, 7, _1), find_end_point(boost::bind(f2, 7, _1), 0.1, 10, false), 10, "v = 7");   plot.add(boost::bind(f2, 10, _1), find_end_point(boost::bind(f2, 10, _1), 0.1, 10, false), 10, "v = 10");   plot.plot("Bessel K", "cyl_bessel_k.svg", "x", "cyl_bessel_k(v, x)");   f2u = boost::math::sph_bessel;   plot.clear();   plot.add(boost::bind(f2u, 0, _1), 0, 20, "v = 0");   plot.add(boost::bind(f2u, 2, _1), 0, 20, "v = 2");   plot.add(boost::bind(f2u, 5, _1), 0, 20, "v = 5");   plot.add(boost::bind(f2u, 7, _1), 0, 20, "v = 7");   plot.add(boost::bind(f2u, 10, _1), 0, 20, "v = 10");   plot.plot("Bessel j", "sph_bessel.svg", "x", "sph_bessel(v, x)");   f2u = boost::math::sph_neumann;   plot.clear();   plot.add(boost::bind(f2u, 0, _1), find_end_point(boost::bind(f2u, 0, _1), 0.1, -5, true), 20, "v = 0");   plot.add(boost::bind(f2u, 2, _1), find_end_point(boost::bind(f2u, 2, _1), 0.1, -5, true), 20, "v = 2");   plot.add(boost::bind(f2u, 5, _1), find_end_point(boost::bind(f2u, 5, _1), 0.1, -5, true), 20, "v = 5");   plot.add(boost::bind(f2u, 7, _1), find_end_point(boost::bind(f2u, 7, _1), 0.1, -5, true), 20, "v = 7");   plot.add(boost::bind(f2u, 10, _1), find_end_point(boost::bind(f2u, 10, _1), 0.1, -5, true), 20, "v = 10");   plot.plot("Bessel y", "sph_neumann.svg", "x", "sph_neumann(v, x)");   f4 = boost::math::ellint_rj;   plot.clear();   plot.add(boost::bind(f4, _1, _1, _1, _1), find_end_point(boost::bind(f4, _1, _1, _1, _1), 0.1, 10, false), 4, "RJ");   f3 = boost::math::ellint_rf;   plot.add(boost::bind(f3, _1, _1, _1), find_end_point(boost::bind(f3, _1, _1, _1), 0.1, 10, false), 4, "RF");   plot.plot("Elliptic Integrals", "ellint_carlson.svg", "x", "");   f2 = boost::math::ellint_1;   plot.clear();   plot.add(boost::bind(f2, _1, 0.5), -0.9, 0.9, "&#x3C6;=0.5");   plot.add(boost::bind(f2, _1, 0.75), -0.9, 0.9, "&#x3C6;=0.75");   plot.add(boost::bind(f2, _1, 1.25), -0.9, 0.9, "&#x3C6;=1.25");   plot.add(boost::bind(f2, _1, boost::math::constants::pi<double>() / 2), -0.9, 0.9, "&#x3C6;=&#x3C0;/2");   plot.plot("Elliptic Of the First Kind", "ellint_1.svg", "k", "ellint_1(k, phi)");   f2 = boost::math::ellint_2;   plot.clear();   plot.add(boost::bind(f2, _1, 0.5), -1, 1, "&#x3C6;=0.5");   plot.add(boost::bind(f2, _1, 0.75), -1, 1, "&#x3C6;=0.75");   plot.add(boost::bind(f2, _1, 1.25), -1, 1, "&#x3C6;=1.25");   plot.add(boost::bind(f2, _1, boost::math::constants::pi<double>() / 2), -1, 1, "&#x3C6;=&#x3C0;/2");   plot.plot("Elliptic Of the Second Kind", "ellint_2.svg", "k", "ellint_2(k, phi)");   f3 = boost::math::ellint_3;   plot.clear();   plot.add(boost::bind(f3, _1, 0, 1.25), -1, 1, "n=0 &#x3C6;=1.25");   plot.add(boost::bind(f3, _1, 0.5, 1.25), -1, 1, "n=0.5 &#x3C6;=1.25");   plot.add(boost::bind(f3, _1, 0.25, boost::math::constants::pi<double>() / 2),       find_end_point(         boost::bind(f3, _1, 0.25, boost::math::constants::pi<double>() / 2),          0.5, 4, false, -1) - 1,       find_end_point(         boost::bind(f3, _1, 0.25, boost::math::constants::pi<double>() / 2),          -0.5, 4, true, 1) + 1, "n=0.25 &#x3C6;=&#x3C0;/2");   plot.add(boost::bind(f3, _1, 0.75, boost::math::constants::pi<double>() / 2),       find_end_point(         boost::bind(f3, _1, 0.75, boost::math::constants::pi<double>() / 2),          0.5, 4, false, -1) - 1,       find_end_point(         boost::bind(f3, _1, 0.75, boost::math::constants::pi<double>() / 2),          -0.5, 4, true, 1) + 1, "n=0.75 &#x3C6;=&#x3C0;/2");   plot.plot("Elliptic Of the Third Kind", "ellint_3.svg", "k", "ellint_3(k, n, phi)");   return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -