• MARS Website
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Show / Hide Table of Contents
  • Mars.Common
    • GeoHash
    • GeoHashDecoder
    • GeohashDecodeResult
    • GeoHashEncoder
    • GeoHashPrecision
    • Hyperrectangle
    • InputHashHelper
    • PositionHelper
  • Mars.Common.Collections
    • BinaryArrayHeap<T>
    • DoubleBits
    • FibonacciHeap<T, TKey>
    • FibonacciHeapDoubleKey<T>
    • FibonacciHeapNode<T, TKey>
    • FibonacciHeapNodeDoubleKey<T>
    • HeapNode
    • IntervalSize
    • K2DTree<T>
    • K2dTreeNode<T>
    • KdTree
    • KdTree<T>
    • KdTreeBase<TNode>
    • KdTreeNode
    • KdTreeNode<T>
    • KdTreeNodeBase<TNode>
    • KdTreeNodeCollection<TNode>
    • KdTreeNodeList<T>
    • Key
    • Node<T>
    • NodeBase<T>
    • NodeDataContainer<T>
    • NodeDistance<TNode>
    • QuadTree<T>
    • Root<T>
    • TreeDataContainer<T>
  • Mars.Common.Collections.CritBit
    • ICritBitTree<TValue>
  • Mars.Common.Collections.Graph
    • EdgeData
    • GraphData
    • GraphSerializer
    • ISpatialGraph
    • KeyContainer
    • NodeData
    • SpatialGraph
    • SpatialGraphHelper
  • Mars.Common.Collections.Graph.Algorithms
    • AStar
    • CompressedPathDatabase
    • ContractionSearch
    • DepthLimitedTraversal
  • Mars.Common.Collections.Graph.Helper
    • INodeFinder
    • KdTreeNodeFinder
    • RunLengthEncoder
  • Mars.Common.Collections.KNNGraph
    • DefaultRandomGenerator
    • DistanceUtils
    • EventSources
    • EventSources.GraphBuildEventSource
    • EventSources.GraphSearchEventSource
    • IProgressReporter
    • IProvideRandomValues
    • KnnGraph<TItem, TDistance>
    • KnnGraph<TItem, TDistance>.KnnSearchResult
    • KnnGraph<TItem, TDistance>.Parameters
    • Node
    • ReverseComparer<T>
    • ReverseComparerExtensions
    • SelectionKind
    • TravelingCosts<TItem, TDistance>
  • Mars.Common.Compat
    • FormatDecoderAttribute
    • FormatEncoderAttribute
    • FormatHandlerAttribute
    • IntegerAttribute
    • NegativeIntegerAttribute
    • NonnegativeIntegerAttribute
    • NonpositiveIntegerAttribute
    • PositiveIntegerAttribute
  • Mars.Common.Data
    • DomainDataImporter
  • Mars.Common.Data.Providers
    • AscDataProvider
    • GeoJsonFeatureCollectionConverter
    • GeoJsonFeatureConverter
    • GeoJsonHelper
    • GeometryDataProvider
    • GraphMlProvider
    • HttpDataProvider
    • IDataProvider<TInput>
    • JsonFileDataProvider
    • JsonTextDataProvider
    • XmlFileDataProvider
    • XmlTextDataProvider
  • Mars.Common.Exceptions
    • DimensionMismatchException
    • ParseException
  • Mars.Common.IO
    • ExtensionMethods
    • FileClientUtils
    • FileKeys
    • HttpClientUtils
    • ObjectSerialize
    • Serializer
    • SerializerCompression
    • SparseFormat
    • SparseReader
    • SparseWriter
  • Mars.Common.IO.Attributes
    • SerializationBinderAttribute
    • SurrogateSelectorAttribute
  • Mars.Common.IO.Console
    • ChildProgressBar
    • IProgressBar
    • ProgressBar
    • ProgressBarBase
    • ProgressBarHeight
    • ProgressBarOptions
    • ProgressBarSimple
  • Mars.Common.IO.Csv
    • CsvAnalyzer
    • CsvReader
    • CsvReader.RecordEnumerator
    • CsvWriter
    • MissingFieldAction
    • ParseErrorAction
    • ValueTrimmingOptions
  • Mars.Common.IO.Events
    • ParseErrorEventArgs
  • Mars.Common.IO.Exceptions
    • MalformedCsvException
    • MissingFieldCsvException
  • Mars.Common.IO.Mapped
    • Context
    • DefaultArrayFactory
    • Extensions
    • IArrayFactory
    • ISerializableToStream
    • MappedAccessor<T>
    • MemoryMap
    • MemoryMap.CreateAccessorFunc<T>
    • MemoryMap.ReadFromDelegate<T>
    • MemoryMap.WriteToDelegate<T>
    • MemoryMapDelegates
    • MemoryMapDelegates.CreateAccessorFunc<T>
    • MemoryMapStream
  • Mars.Common.IO.Mapped.Accessors
    • MappedAccessorByte
    • MappedAccessorDouble
    • MappedAccessorInt16
    • MappedAccessorInt32
    • MappedAccessorInt64
    • MappedAccessorSingle
    • MappedAccessorUInt16
    • MappedAccessorUInt32
    • MappedAccessorUInt64
    • MappedAccessorVariable<T>
  • Mars.Common.IO.Mapped.Arrays
    • Array<T>
    • ArrayBase<T>
    • ArrayProfile
    • MappedArray<TMapped, T>
    • MappedArray<TMapped, T>.MapFrom
    • MappedArray<TMapped, T>.MapTo
    • MemoryArray<T>
    • VariableArray<T>
  • Mars.Common.IO.Mapped.Collections
    • MemoryBackedDictionary<TKey, TValue>
    • MemoryBackedList<T>
  • Mars.Common.IO.Mapped.Indexes
    • Index<T>
  • Mars.Common.IO.Mapped.Streams
    • CappedStream
  • Mars.Common.Socket
    • ByteOrder
    • CloseEventArgs
    • CloseStatusCode
    • CompressionMethod
    • ErrorEventArgs
    • Ext
    • MessageEventArgs
    • WebSocket
    • WebSocketException
    • WebSocketState
  • Mars.Common.Socket.Server
    • IWebSocketSession
    • WebHeaderCollection
    • WebSocketBehavior
    • WebSocketContext
    • WebSocketServer
    • WebSocketServiceHost
    • WebSocketServiceManager
    • WebSocketSessionManager
  • Mars.Numerics
    • Classes
    • Combinatorics
    • Constants
    • Distance
    • Elementwise
    • Jagged
    • MathematicsException
    • MathHelper
    • Matrix
    • MatrixOrder
    • MatrixType
    • Norm
    • Sort
    • Sorting
    • Sparse
    • Sparse<T>
    • Tools
    • Vector
    • VectorHelper
    • VectorType
  • Mars.Numerics.Comparers
    • ArrayComparer<T>
    • ComparerDirection
    • CustomComparer<T>
    • ElementComparer
    • ElementComparer<T>
    • GeneralComparer
    • StableComparer<T>
  • Mars.Numerics.Distances
    • Angular
    • Chebyshev
    • Cosine
    • Dirac<T>
    • Euclidean
    • Hamming
    • Hamming<T>
    • Haversine
    • Jaccard
    • Jaccard<T>
    • Kulczynski
    • Levenshtein
    • Levenshtein<T>
    • Manhattan
    • Matching
    • Minkowski
    • SquareEuclidean
    • Vincenty
    • Vincenty.Ellipsoid
  • Mars.Numerics.Distances.Base
    • IDistance<T>
    • IDistance<TFirst, TSecond>
    • IMetric<T>
    • ISimilarity<T, TU>
    • ISimilarity<T>
  • Mars.Numerics.Exceptions
    • DimensionMismatchException
    • NonPositiveDefiniteMatrixException
    • SingularMatrixException
  • Mars.Numerics.Formats
    • DefaultMatrixFormatProvider
    • IMatrixFormatProvider
    • MatrixFormatProviderBase
    • MatrixFormatter
    • OctaveMatrixFormatProvider
  • Mars.Numerics.Ranges
    • ByteRange
    • DoubleRange
    • FloatRange
    • IntRange
    • IRange<T>
  • Mars.Numerics.Statistics
    • ConstValueDistribution<T>
    • Distribution<T>
    • FastGaussianDistributionD
    • FastGaussianDistributionF
    • IDistribution
    • UniformDiscreteDistribution
    • UniformDistributionD
    • UniformDistributionF
  • Mars.Numerics.Statistics.Base
    • BinarySearch
    • DistributionBase
    • ISampleableDistribution<TObservations>
    • IUnivariateDistribution
    • IUnivariateDistribution<TObservation>
    • UnivariateDiscreteDistribution

Class FastGaussianDistributionF

Creates random values using an approximate Gaussian distribution (single-precision).
Inheritance
System.Object
Distribution<System.Single>
FastGaussianDistributionF
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Numerics.Statistics
Assembly: Mars.Numerics.dll
Syntax
public class FastGaussianDistributionF : Distribution<float>
Remarks

Gaussian distribution is also known as Normal distribution.

The random values generated by this class follow only an approximate Gaussian distribution. The distribution curve can be imagined as a typical Gaussian bell curve within +/- 3 standard deviations. All random values lie in the interval [ExpectedValue - 3 * StandardDeviation, ExpectedValue + 3 * StandardDeviation]. No random values outside the +/- 3 standard deviation interval are returned.

This approximation is faster and makes the random values more controllable for game applications. For example, if in a game tree heights are determined using a real Gaussian distribution with an expected value of 10m and a standard deviation of 1m, then most trees will have a height near 10m. But it would also be possible - unlikely but possible - that a tree with height 30m is generated. This would look very odd. Therefore, it is desirable that the created random values do not exceed 3 standard deviations.

Constructors

| Improve this Doc View Source

FastGaussianDistributionF()

Initializes a new instance of the FastGaussianDistributionF class.
Declaration
public FastGaussianDistributionF()
Remarks

Gaussian distribution is also known as Normal distribution.

The random values generated by this class follow only an approximate Gaussian distribution. The distribution curve can be imagined as a typical Gaussian bell curve within +/- 3 standard deviations. All random values lie in the interval [ExpectedValue - 3 * StandardDeviation, ExpectedValue + 3 * StandardDeviation]. No random values outside the +/- 3 standard deviation interval are returned.

This approximation is faster and makes the random values more controllable for game applications. For example, if in a game tree heights are determined using a real Gaussian distribution with an expected value of 10m and a standard deviation of 1m, then most trees will have a height near 10m. But it would also be possible - unlikely but possible - that a tree with height 30m is generated. This would look very odd. Therefore, it is desirable that the created random values do not exceed 3 standard deviations.

| Improve this Doc View Source

FastGaussianDistributionF(Single, Single)

Initializes a new instance of the FastGaussianDistributionF class.
Declaration
public FastGaussianDistributionF(float expectedValue, float standardDeviation)
Parameters
Type Name Description
System.Single expectedValue The expected value.
System.Single standardDeviation The standard deviation.
Remarks

Gaussian distribution is also known as Normal distribution.

The random values generated by this class follow only an approximate Gaussian distribution. The distribution curve can be imagined as a typical Gaussian bell curve within +/- 3 standard deviations. All random values lie in the interval [ExpectedValue - 3 * StandardDeviation, ExpectedValue + 3 * StandardDeviation]. No random values outside the +/- 3 standard deviation interval are returned.

This approximation is faster and makes the random values more controllable for game applications. For example, if in a game tree heights are determined using a real Gaussian distribution with an expected value of 10m and a standard deviation of 1m, then most trees will have a height near 10m. But it would also be possible - unlikely but possible - that a tree with height 30m is generated. This would look very odd. Therefore, it is desirable that the created random values do not exceed 3 standard deviations.

Properties

| Improve this Doc View Source

ExpectedValue

Gets or sets the expected value.
Declaration
public float ExpectedValue { get; set; }
Property Value
Type Description
System.Single The expected value. The default is 0.
Remarks

Gaussian distribution is also known as Normal distribution.

The random values generated by this class follow only an approximate Gaussian distribution. The distribution curve can be imagined as a typical Gaussian bell curve within +/- 3 standard deviations. All random values lie in the interval [ExpectedValue - 3 * StandardDeviation, ExpectedValue + 3 * StandardDeviation]. No random values outside the +/- 3 standard deviation interval are returned.

This approximation is faster and makes the random values more controllable for game applications. For example, if in a game tree heights are determined using a real Gaussian distribution with an expected value of 10m and a standard deviation of 1m, then most trees will have a height near 10m. But it would also be possible - unlikely but possible - that a tree with height 30m is generated. This would look very odd. Therefore, it is desirable that the created random values do not exceed 3 standard deviations.

| Improve this Doc View Source

StandardDeviation

Gets or sets the standard deviation.
Declaration
public float StandardDeviation { get; set; }
Property Value
Type Description
System.Single The standard deviation. The default is 1.
Remarks

Gaussian distribution is also known as Normal distribution.

The random values generated by this class follow only an approximate Gaussian distribution. The distribution curve can be imagined as a typical Gaussian bell curve within +/- 3 standard deviations. All random values lie in the interval [ExpectedValue - 3 * StandardDeviation, ExpectedValue + 3 * StandardDeviation]. No random values outside the +/- 3 standard deviation interval are returned.

This approximation is faster and makes the random values more controllable for game applications. For example, if in a game tree heights are determined using a real Gaussian distribution with an expected value of 10m and a standard deviation of 1m, then most trees will have a height near 10m. But it would also be possible - unlikely but possible - that a tree with height 30m is generated. This would look very odd. Therefore, it is desirable that the created random values do not exceed 3 standard deviations.

Methods

| Improve this Doc View Source

Next(FastRandom)

Creates random values using an approximate Gaussian distribution (single-precision).
Declaration
public override float Next(FastRandom random)
Parameters
Type Name Description
Mars.Common.Core.Random.FastRandom random
Returns
Type Description
System.Single
Overrides
Mars.Numerics.Statistics.Distribution<System.Single>.Next(Mars.Common.Core.Random.FastRandom)
Remarks

Gaussian distribution is also known as Normal distribution.

The random values generated by this class follow only an approximate Gaussian distribution. The distribution curve can be imagined as a typical Gaussian bell curve within +/- 3 standard deviations. All random values lie in the interval [ExpectedValue - 3 * StandardDeviation, ExpectedValue + 3 * StandardDeviation]. No random values outside the +/- 3 standard deviation interval are returned.

This approximation is faster and makes the random values more controllable for game applications. For example, if in a game tree heights are determined using a real Gaussian distribution with an expected value of 10m and a standard deviation of 1m, then most trees will have a height near 10m. But it would also be possible - unlikely but possible - that a tree with height 30m is generated. This would look very odd. Therefore, it is desirable that the created random values do not exceed 3 standard deviations.

Extension Methods

Serializer.Save<T>(T, out Byte[], SerializerCompression)
Serializer.Save<T>(T, Stream, SerializerCompression)
Serializer.Save<T>(T, BinaryFormatter, Stream, SerializerCompression)
Serializer.Save<T>(T, String, SerializerCompression)
Serializer.Save<T>(T, String)
Matrix.Concatenate<T>(T, T[])
Matrix.Replace<T>(T, Object, Object)
DomainDataImporter.Import(Object, InputConfiguration)
ObjectSerialize.Serialize(Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © MARS GROUP. HAW Hamburg