github.com/gopherd/gonum@v0.0.4/stat/distuv/interfaces.go (about)

     1  // Copyright ©2015 The Gonum Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package distuv
     6  
     7  // LogProber wraps the LogProb method.
     8  type LogProber interface {
     9  	// LogProb returns the natural logarithm of the
    10  	// value of the probability density or probability
    11  	// mass function at x.
    12  	LogProb(x float64) float64
    13  }
    14  
    15  // Rander wraps the Rand method.
    16  type Rander interface {
    17  	// Rand returns a random sample drawn from the distribution.
    18  	Rand() float64
    19  }
    20  
    21  // RandLogProber is the interface that groups the Rander and LogProber methods.
    22  type RandLogProber interface {
    23  	Rander
    24  	LogProber
    25  }
    26  
    27  // Quantiler wraps the Quantile method.
    28  type Quantiler interface {
    29  	// Quantile returns the minimum value of x from amongst
    30  	// all those values whose CDF value exceeds or equals p.
    31  	Quantile(p float64) float64
    32  }