资源简介
Normal (aka Gaussian) distribution
代码片段和文件信息
//*******************************************************************************
// Repast .NET was made possible in part by the Defense Program Office for Mission
// Assurance Naval Surface Warfare Center Dahlgren Virginia.
// For all questions please send e-mail to repast-interest@sourceforge.net.
//http://www.koders.com/csharp/fidA7F93CFAD1F8E5346FD77A83C36E8F103322793E.aspx
//********************************************************************************
/*
based on code under the following license:
Copyright 1999 CERN - European Organization for Nuclear Research.
Permission to use copy modify distribute and sell this software and its documentation for any purpose
is hereby granted without fee provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear in supporting documentation.
CERN makes no representations about the suitability of this software for any purpose.
It is provided “as is“ without expressed or implied warranty.*/
using System;
using Probability = cern.jet.stat.Probability;
using RandomStartingValueSource = cern.jet.random.engine.RandomStartingValueSource;
namespace cern.jet.random
{
/// Normal (aka Gaussian) distribution; See the math definition
/// and animated definition.
///
/// 1 2
/// pdf(x) = --------- exp( - (x-mean) / 2v )
/// sqrt(2pi*v)
/// x
/// -
/// 1 | | 2
/// cdf(x) = --------- | exp( - (t-mean) / 2v ) dt
/// sqrt(2pi*v)| |
/// -
/// -inf.
///
/// where v = variance = standardDeviation^2.
///
/// Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
///
/// Static methods operate on a default uniform random number generator; they are synchronized.
///
/// Implementation: Polar Box-Muller transformation. See
/// G.E.P. Box M.E. Muller (1958): A note on the generation of random normal deviates Annals Math. Statist. 29 610-611.
///
///
/// wolfgang.hoschek@cern.ch
///
/// 1.0 09/24/99
///
public class Normal:AbstractContinousDistribution
{
protected internal double mean;
protected internal double variance;
protected internal double standardDeviation;
protected internal double cache; // cache for Box-Mueller algorithm
protected internal bool cacheFilled; // Box-Mueller
protected internal double SQRT_INV; // performance cache
// The uniform random number generated shared by all static methods.
protected internal static Normal shared;
/// Constructs a normal (gauss) distribution.
/// Example:
相关资源
- C#模拟实现正态分布,计算及绘画源码
- 常用的7种 C# 遗传算法源码集
- 基于C#的朴素贝叶斯算法
- C#实现4种经典迷宫生成算法和迷宫寻
- c#银行家算法 有界面
- C#基于径向灰度算法的表盘指针识别
- C#实现 CRC16 MODBUS算法
- 邮局选址问题
- Delaunay三角剖分源码C#版本和算法的具
- 遗传算法最短路径c#实现
- 等值线C#算法
- 加权平均算法C#实现
- C#实现的计算机图形学基本绘图算法
- 操作系统实验-模拟进程管理时间片轮
- C# 多边形拓扑结构生成算法
- 基于三角网的等值线追踪及填充算法
- C# GIS算法演示:道格拉斯压缩、线性
- 六种加密算法的C#实现源码
- C#遗传算法求解VRP问题
- C#实现数字签名算法
- C#实现磁盘调度算法
- kmeans算法-采用c#实现
- Apriori算法——c#版
- AES加密解密算法程序和源代码 C#实现
- KNN算法C#例程
- 曲线生成算法的C#gdi+实现贝塞尔曲线
- A*算法WinForm实现
- C#的滤波算法,用于实现数据滤波
- C#膨胀腐蚀算法实现vs2017可用
- AlgorithmMan by IoriBinary Tree Sort
评论
共有 条评论