aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gonum.org/v1/gonum/stat/distuv/interfaces.go
blob: a3cc94bb272c728c1916f70b4ede3df5d4a16c2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright ©2015 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package distuv

// LogProber wraps the LogProb method.
type LogProber interface {
	// LogProb returns the natural logarithm of the
	// value of the probability density or probability
	// mass function at x.
	LogProb(x float64) float64
}

// Rander wraps the Rand method.
type Rander interface {
	// Rand returns a random sample drawn from the distribution.
	Rand() float64
}

// RandLogProber is the interface that groups the Rander and LogProber methods.
type RandLogProber interface {
	Rander
	LogProber
}

// Quantiler wraps the Quantile method.
type Quantiler interface {
	// Quantile returns the minimum value of x from amongst
	// all those values whose CDF value exceeds or equals p.
	Quantile(p float64) float64
}