/third_party/boost/boost/math/distributions/ |
D | rayleigh.hpp | 29 …inline bool verify_sigma(const char* function, RealType sigma, RealType* presult, const Policy& po… in verify_sigma() argument 31 if((sigma <= 0) || (!(boost::math::isfinite)(sigma))) in verify_sigma() 35 "The scale parameter \"sigma\" must be > 0 and finite, but was: %1%.", sigma, pol); in verify_sigma() 69 RealType sigma()const in sigma() function in boost::math::rayleigh_distribution 100 RealType sigma = dist.sigma(); in pdf() local 103 if(false == detail::verify_sigma(function, sigma, &result, Policy())) in pdf() 115 RealType sigmasqr = sigma * sigma; in pdf() 126 RealType sigma = dist.sigma(); in cdf() local 128 if(false == detail::verify_sigma(function, sigma, &result, Policy())) in cdf() 136 result = -boost::math::expm1(-x * x / ( 2 * sigma * sigma), Policy()); in cdf() [all …]
|
D | lognormal.hpp | 99 RealType sigma = dist.scale(); in pdf() local 104 if(0 == detail::check_scale(function, sigma, &result, Policy())) in pdf() 116 exponent /= 2 * sigma * sigma; in pdf() 119 result /= sigma * sqrt(2 * constants::pi<RealType>()) * x; in pdf() 222 RealType sigma = dist.scale(); in mean() local 225 …if(0 == detail::check_scale("boost::math::mean(const lognormal_distribution<%1%>&)", sigma, &resul… in mean() 230 return exp(mu + sigma * sigma / 2); in mean() 239 RealType sigma = dist.scale(); in variance() local 242 …if(0 == detail::check_scale("boost::math::variance(const lognormal_distribution<%1%>&)", sigma, &r… in variance() 247 return boost::math::expm1(sigma * sigma, Policy()) * exp(2 * mu + sigma * sigma); in variance() [all …]
|
/third_party/boost/libs/math/example/ |
D | autodiff_black_scholes.cpp | 35 Sigma const& sigma, in black_scholes_option_price() argument 39 auto const d1 = (log(S / K) + (r + sigma * sigma / 2) * tau) / (sigma * sqrt(tau)); in black_scholes_option_price() 40 auto const d2 = (log(S / K) + (r - sigma * sigma / 2) * tau) / (sigma * sqrt(tau)); in black_scholes_option_price() 55 auto const& sigma = std::get<1>(variables); // Volatility. in main() local 58 auto const call_price = black_scholes_option_price(CP::call, K, S, sigma, tau, r); in main() 59 auto const put_price = black_scholes_option_price(CP::put, K, S, sigma, tau, r); in main() 61 …double const d1 = static_cast<double>((log(S / K) + (r + sigma * sigma / 2) * tau) / (sigma * sqrt… in main() 62 …double const d2 = static_cast<double>((log(S / K) + (r - sigma * sigma / 2) * tau) / (sigma * sqrt… in main() 67 … static_cast<double>(-S * phi(d1) * sigma / (2 * sqrt(tau)) - r * K * exp(-r * tau) * Phi(+d2)); in main() 69 … static_cast<double>(-S * phi(d1) * sigma / (2 * sqrt(tau)) + r * K * exp(-r * tau) * Phi(-d2)); in main() [all …]
|
D | autodiff_black_scholes_brief.cpp | 29 Sigma const& sigma, in black_scholes_option_price() argument 33 auto const d1 = (log(S / K) + (r + sigma * sigma / 2) * tau) / (sigma * sqrt(tau)); in black_scholes_option_price() 34 auto const d2 = (log(S / K) + (r - sigma * sigma / 2) * tau) / (sigma * sqrt(tau)); in black_scholes_option_price() 48 double const sigma = 5; // Volatility. in main() local 51 auto const call_price = black_scholes_option_price(CP::call, K, S, sigma, tau, r); in main() 52 auto const put_price = black_scholes_option_price(CP::put, K, S, sigma, tau, r); in main()
|
/third_party/boost/libs/math/doc/distributions/ |
D | rayleigh.qbk | 21 rayleigh_distribution(RealType sigma = 1) 23 RealType sigma()const; 32 [expression f(x; sigma) = x * exp(-x[super 2]/2 [sigma][super 2]) / [sigma][super 2]] 34 For sigma parameter ['[sigma]] > 0, and /x/ > 0. 41 …raph illustrates how the Probability density Function(pdf) varies with the shape parameter [sigma]: 61 rayleigh_distribution(RealType sigma = 1); 64 Rayleigh distribution] with [sigma] /sigma/. 66 Requires that the [sigma] parameter is greater than zero, 69 RealType sigma()const; 71 Returns the /sigma/ parameter of this distribution. [all …]
|
D | laplace.qbk | 35 For location parameter ['[mu]] and scale parameter ['[sigma]], it is defined by the 44 parameters [mu] and [sigma] on the PDF. 87 [sigma] is its scale parameter, /x/ is the random variate, /p/ is the probability 92 [[pdf][Using the relation: pdf = e[super -abs(x-[mu]) \/ [sigma]] \/ (2 * [sigma]) ]] 95 x < [mu] : p = e[super (x-[mu])/[sigma] ] \/ [sigma] 97 x >= [mu] : p = 1 - e[super ([mu]-x)/[sigma] ] \/ [sigma] 101 -x < [mu] : q = e[super (-x-[mu])/[sigma] ] \/ [sigma] 103 -x >= [mu] : q = 1 - e[super ([mu]+x)/[sigma] ] \/ [sigma] 107 p < 0.5 : x = [mu] + [sigma] * log(2*p) 109 p >= 0.5 : x = [mu] - [sigma] * log(2-2*p) [all …]
|
/third_party/openssl/crypto/sha/asm/ |
D | sha256-mb-x86_64.pl | 96 ($t1,$t2,$t3,$axb,$bxc,$Xi,$Xn,$sigma)=map("%xmm$_",(0..7)); 133 movdqa $e,$sigma 137 psrld \$6,$sigma 144 pxor $t3,$sigma 147 pxor $t2,$sigma 152 pxor $t3,$sigma 157 pxor $t2,$sigma 161 pxor $t3,$sigma # Sigma1(e) 164 paddd $sigma,$Xi # Xi+=Sigma1(e) 167 movdqa $a,$sigma [all …]
|
/third_party/flutter/skia/src/gpu/effects/generated/ |
D | GrRectBlurEffect.h | 26 float sigma) { in Make() argument 27 float doubleProfileSize = (12 * sigma); in Make() 38 SkASSERT(sigma > 0); in Make() 39 if (sigma > 16000.f) { in Make() 49 return std::unique_ptr<GrFragmentProcessor>(new GrRectBlurEffect(rect, sigma)); in Make() 55 float sigma; variable 58 GrRectBlurEffect(SkRect rect, float sigma) in GrRectBlurEffect() argument 62 , sigma(sigma) {} in GrRectBlurEffect()
|
D | GrRRectBlurEffect.cpp | 14 float sigma, in Make() argument 36 srcRRect, devRRect, SkRect::MakeEmpty(), sigma, xformedSigma, &rrectToDraw, &size, in Make() 65 auto sigma = _outer.sigma; in emitCode() local 66 (void)sigma; in emitCode() 105 auto sigma = _outer.sigma; in onSetData() local 106 (void)sigma; in onSetData() 119 float blurRadiusValue = 3.f * SkScalarCeilToScalar(sigma - 1 / 6.0f); in onSetData() 138 if (sigma != that.sigma) return false; in onIsEqual() 146 , sigma(src.sigma) in GrRRectBlurEffect() 164 SkScalar sigma = d->fRandom->nextRangeF(1.f, 10.f); in TestCreate() local [all …]
|
D | GrCircleBlurFragmentProcessor.cpp | 17 static float make_unnormalized_half_kernel(float* halfKernel, int halfKernelSize, float sigma) { in make_unnormalized_half_kernel() argument 18 const float invSigma = 1.f / sigma; in make_unnormalized_half_kernel() 35 int halfKernelSize, float sigma) { in make_half_kernel_and_summed_table() argument 37 const float tot = 2.f * make_unnormalized_half_kernel(halfKernel, halfKernelSize, sigma); in make_half_kernel_and_summed_table() 109 static void create_circle_profile(uint8_t* weights, float sigma, float circleR, in create_circle_profile() argument 114 int halfKernelSize = SkScalarCeilToInt(6.0f * sigma); in create_circle_profile() 125 make_half_kernel_and_summed_table(halfKernel, summedKernel, halfKernelSize, sigma); in create_circle_profile() 141 float sigma = profileWidth / 6.f; in create_half_plane_profile() local 147 const float tot = 2.f * make_unnormalized_half_kernel(halfKernel.get(), halfKernelSize, sigma); in create_half_plane_profile() 166 const SkRect& circle, float sigma, in create_profile_texture() argument [all …]
|
D | GrRectBlurEffect.cpp | 28 auto sigma = _outer.sigma; in emitCode() local 29 (void)sigma; in emitCode() 84 { pdman.set1f(sigmaVar, (_outer.sigma)); } in onSetData() 91 UniformHandle& sigma = sigmaVar; in onSetData() local 92 (void)sigma; in onSetData() 116 if (sigma != that.sigma) return false; in onIsEqual() 122 , sigma(src.sigma) {} in GrRectBlurEffect() 129 float sigma = data->fRandom->nextRangeF(3, 8); in TestCreate() local 133 SkRect::MakeWH(width, height), sigma); in TestCreate()
|
/third_party/flutter/skia/tests/ |
D | BlurTest.cpp | 132 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)); in DEF_TEST() local 137 paint.setMaskFilter(SkMaskFilter::MakeBlur(blurStyle, sigma, respectCTM)); in DEF_TEST() 181 SkScalar sigma, in ground_truth_2d() argument 192 if (!SkBlurMask::BlurGroundTruth(sigma, &dst, src, kNormal_SkBlurStyle)) { in ground_truth_2d() 222 static float gaussian(int x, SkScalar sigma) { in gaussian() argument 223 float k = SK_Scalar1/(sigma * sqrtf(2.0f*SK_ScalarPI)); in gaussian() 224 float exponent = -(x * x) / (2 * sigma * sigma); in gaussian() 336 SkScalar sigma = 10.0f; in DEF_TEST() local 338 for (int i = 0; i < 4; ++i, sigma /= 10) { in DEF_TEST() 340 cpu_blur_path(rectPath, sigma, rectSpecialCaseResult, kSize); in DEF_TEST() [all …]
|
D | SkGaussFilterTest.cpp | 32 double sigma; std::vector<double> golden; in DEF_TEST() local 33 std::tie(sigma, golden) = test; in DEF_TEST() 34 SkGaussFilter filter{sigma}; in DEF_TEST() 66 auto check = [&](double sigma) { in DEF_TEST() argument 67 SkGaussFilter filter{sigma}; in DEF_TEST() 78 for (double sigma = 0.0; sigma < 2.0; sigma += 0.1) { in DEF_TEST() local 79 check(sigma); in DEF_TEST()
|
/third_party/skia/tests/ |
D | SkGaussFilterTest.cpp | 32 double sigma; std::vector<double> golden; in DEF_TEST() local 33 std::tie(sigma, golden) = test; in DEF_TEST() 34 SkGaussFilter filter{sigma}; in DEF_TEST() 66 auto check = [&](double sigma) { in DEF_TEST() argument 67 SkGaussFilter filter{sigma}; in DEF_TEST() 78 for (double sigma = 0.0; sigma < 2.0; sigma += 0.1) { in DEF_TEST() local 79 check(sigma); in DEF_TEST()
|
D | BlurTest.cpp | 129 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(5)); in DEF_TEST() local 134 paint.setMaskFilter(SkMaskFilter::MakeBlur(blurStyle, sigma, respectCTM)); in DEF_TEST() 178 SkScalar sigma, in ground_truth_2d() argument 189 if (!SkBlurMask::BlurGroundTruth(sigma, &dst, src, kNormal_SkBlurStyle)) { in ground_truth_2d() 219 static float gaussian(int x, SkScalar sigma) { in gaussian() argument 220 float k = SK_Scalar1/(sigma * sqrtf(2.0f*SK_ScalarPI)); in gaussian() 221 float exponent = -(x * x) / (2 * sigma * sigma); in gaussian() 333 SkScalar sigma = 10.0f; in DEF_TEST() local 335 for (int i = 0; i < 4; ++i, sigma /= 10) { in DEF_TEST() 337 cpu_blur_path(rectPath, sigma, rectSpecialCaseResult, kSize); in DEF_TEST() [all …]
|
/third_party/skia/src/core/ |
D | SkGpuBlurUtils.h | 76 SkScalar sigma, 87 void Compute1DGaussianKernel(float* kernel, float sigma, int radius); 89 void Compute1DLinearGaussianKernel(float* kernel, float* offset, float sigma, int radius); 94 inline bool IsEffectivelyZeroSigma(float sigma) { return sigma <= 0.03f; } in IsEffectivelyZeroSigma() argument 96 inline int SigmaRadius(float sigma) { in SigmaRadius() argument 97 return IsEffectivelyZeroSigma(sigma) ? 0 : static_cast<int>(ceilf(sigma * 3.0f)); in SigmaRadius()
|
D | SkBlurMask.h | 18 static bool SK_WARN_UNUSED_RESULT BlurRect(SkScalar sigma, SkMask *dst, const SkRect &src, 22 static bool SK_WARN_UNUSED_RESULT BlurRRect(SkScalar sigma, SkMask *dst, const SkRRect &src, 39 SkScalar sigma, SkBlurStyle style, 44 static bool SK_WARN_UNUSED_RESULT BlurGroundTruth(SkScalar sigma, SkMask* dst, 51 static SkScalar SK_SPI ConvertSigmaToRadius(SkScalar sigma); 69 static void ComputeBlurProfile(uint8_t* profile, int size, SkScalar sigma); 81 unsigned int width, SkScalar sigma);
|
D | SkMaskCache.cpp | 23 RRectBlurKey(SkScalar sigma, const SkRRect& rrect, SkBlurStyle style) in RRectBlurKey() 24 : fSigma(sigma) in RRectBlurKey() 75 SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, in FindAndRef() argument 78 RRectBlurKey key(sigma, rrect, style); in FindAndRef() 88 void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, in Add() argument 91 RRectBlurKey key(sigma, rrect, style); in Add() 102 RectsBlurKey(SkScalar sigma, SkBlurStyle style, const SkRect rects[], int count) in RectsBlurKey() 103 : fSigma(sigma) in RectsBlurKey() 166 SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, in FindAndRef() argument 170 RectsBlurKey key(sigma, style, rects, count); in FindAndRef() [all …]
|
D | SkGaussFilter.cpp | 43 static int calculate_bessel_factors(double sigma, double *gauss) { in calculate_bessel_factors() argument 44 auto var = sigma * sigma; in calculate_bessel_factors() 105 SkGaussFilter::SkGaussFilter(double sigma) { in SkGaussFilter() argument 106 SkASSERT(0 <= sigma && sigma < 2); in SkGaussFilter() 108 fN = calculate_bessel_factors(sigma, fBasis); in SkGaussFilter()
|
/third_party/boost/libs/python/example/numpy/ |
D | demo_gaussian.py | 10 sigma = numpy.identity(2, dtype=float) variable 11 sigma[0, 1] = 0.15 12 sigma[1, 0] = 0.15 14 g = gaussian.bivariate_gaussian(mu, sigma) 31 print "xx moment (should be ~ %f): %f" % (sigma[0,0], xx) 34 print "yy moment (should be ~ %f): %f" % (sigma[1,1], yy) 37 print "xy moment (should be ~ %f): %f" % (sigma[0,1], xy)
|
/third_party/flutter/skia/src/effects/imagefilters/ |
D | SkBlurImageFilter.cpp | 56 const Context& ctx, SkVector sigma, 153 static int calculate_window(double sigma) { in calculate_window() argument 166 sigma = SkTPin(sigma, 0.0, 136.0); in calculate_window() 167 auto possibleWindow = static_cast<int>(floor(sigma * 3 * sqrt(2 * SK_DoublePI) / 4 + 0.5)); in calculate_window() 459 SkVector sigma, const sk_sp<SkSpecialImage> &input, in cpu_blur() argument 461 auto windowW = calculate_window(sigma.x()), in cpu_blur() 462 windowH = calculate_window(sigma.y()); in cpu_blur() 573 SkVector sigma = SkVector::Make(localSigma.width(), localSigma.height()); in map_sigma() local 574 ctm.mapVectors(&sigma, 1); in map_sigma() 575 sigma.fX = SkMinScalar(SkScalarAbs(sigma.fX), MAX_SIGMA); in map_sigma() [all …]
|
/third_party/flutter/skia/src/core/ |
D | SkBlurMask.h | 18 static bool SK_WARN_UNUSED_RESULT BlurRect(SkScalar sigma, SkMask *dst, const SkRect &src, 22 static bool SK_WARN_UNUSED_RESULT BlurRRect(SkScalar sigma, SkMask *dst, const SkRRect &src, 39 SkScalar sigma, SkBlurStyle style, 44 static bool SK_WARN_UNUSED_RESULT BlurGroundTruth(SkScalar sigma, SkMask* dst, 51 static SkScalar SK_API ConvertSigmaToRadius(SkScalar sigma); 69 static void ComputeBlurProfile(uint8_t* profile, int size, SkScalar sigma); 81 unsigned int width, SkScalar sigma);
|
D | SkMaskCache.cpp | 23 RRectBlurKey(SkScalar sigma, const SkRRect& rrect, SkBlurStyle style) in RRectBlurKey() 24 : fSigma(sigma) in RRectBlurKey() 75 SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, in FindAndRef() argument 78 RRectBlurKey key(sigma, rrect, style); in FindAndRef() 88 void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, in Add() argument 91 RRectBlurKey key(sigma, rrect, style); in Add() 102 RectsBlurKey(SkScalar sigma, SkBlurStyle style, const SkRect rects[], int count) in RectsBlurKey() 103 : fSigma(sigma) in RectsBlurKey() 166 SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, in FindAndRef() argument 170 RectsBlurKey key(sigma, style, rects, count); in FindAndRef() [all …]
|
/third_party/skia/src/effects/imagefilters/ |
D | SkBlurImageFilter.cpp | 58 const Context& ctx, SkVector sigma, 109 int calculate_window(double sigma) { in calculate_window() argument 110 auto possibleWindow = static_cast<int>(floor(sigma * 3 * sqrt(2 * SK_DoublePI) / 4 + 0.5)); in calculate_window() 217 static PassMaker* MakeMaker(double sigma, SkArenaAlloc* alloc) { in MakeMaker() argument 218 SkASSERT(0 <= sigma); in MakeMaker() 219 int window = calculate_window(sigma); in MakeMaker() 473 static PassMaker* MakeMaker(double sigma, SkArenaAlloc* alloc) { in MakeMaker() argument 474 SkASSERT(0 <= sigma); in MakeMaker() 475 int gaussianWindow = calculate_window(sigma); in MakeMaker() 758 SkVector sigma, const sk_sp<SkSpecialImage> &input, in cpu_blur() argument [all …]
|
/third_party/cmsis/CMSIS/DSP/Source/BayesFunctions/ |
D | arm_gaussian_naive_bayes_predict_f32.c | 66 const float32_t *pSigma = S->sigma; in arm_gaussian_naive_bayes_predict_f32() 80 pSigma = S->sigma; in arm_gaussian_naive_bayes_predict_f32() 159 const float32_t *pSigma = S->sigma; in arm_gaussian_naive_bayes_predict_f32() 162 const float32_t *pSigma1 = S->sigma + S->vectorDimension; in arm_gaussian_naive_bayes_predict_f32() 168 float32_t sigma,sigma1; in arm_gaussian_naive_bayes_predict_f32() local 244 sigma = *pSigma + S->epsilon; in arm_gaussian_naive_bayes_predict_f32() 247 tmp -= 0.5f*logf(2.0f * PI_F * sigma); in arm_gaussian_naive_bayes_predict_f32() 248 tmp -= 0.5f*(*pIn - *pTheta) * (*pIn - *pTheta) / sigma; in arm_gaussian_naive_bayes_predict_f32() 313 sigma = *pSigma + S->epsilon; in arm_gaussian_naive_bayes_predict_f32() 314 tmp -= 0.5f*logf(2.0f * PI_F * sigma); in arm_gaussian_naive_bayes_predict_f32() [all …]
|