normal

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Mu    float64
	Sigma float64 = 1

	Cmd = &cobra.Command{
		Use:   "normal",
		Short: "generate samples from the normal distribution",
		Long: `Generate samples from the normal distribution.

.     mu=0          mu=0         mu=0          mu=-2
.     sigma=0.4472  sigma=1      sigma=2.2361  sigma=0.7071
-4.0  ▏             ▏            ██▉           █
-3.2  ▏             ▍            ████▊         █████▊
-2.4  ▏             █▋           ██████▊       ██████████▏
-1.6  ▉             █████▌       ████████▉     █████▋
-0.8  ██████████▏   ██████████   ██████████▏   █
0.0   ██████████    ██████████▏  ██████████    ▏
0.8   ▉             █████▍       ████████▉     ▏
1.6   ▏             █▋           ██████▊       ▏
2.4   ▏             ▎            ████▋         ▏
3.2   ▏             ▏            ██▉           ▏

https://en.wikipedia.org/wiki/Normal_distribution`,
		RunE: func(command *cobra.Command, args []string) (err error) {
			return generate.Sample(distuv.Normal{
				Mu:    Mu,
				Sigma: Sigma,
			})
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL