laplace

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
	Scale float64 = 1

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

.      mu=0         mu=0         mu=0         mu=-5
.      scale=1      scale=2      scale=4      scale=4
-10.0  ▏            ▎            █▍           ████▎
-8.0   ▏            ▌            ██▎          ██████▉
-6.0   ▎            █▍           ███▊         ██████████▏
-4.0   █▍           ███▊         ██████▏      ██████▉
-2.0   ██████████▏  ██████████   ██████████   ████▍
0.0    ██████████   ██████████▏  ██████████▏  ██▋
2.0    █▍           ███▊         ██████▏      █▋
4.0    ▎            █▍           ███▊         █
6.0    ▏            ▌            ██▎          ▋
8.0    ▏            ▎            █▍           ▍

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

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