Unit testing for def/ module.
Added unit tests to test code in def/ module.
This commit is contained in:
parent
e24b8a08c9
commit
bac60e872a
396 changed files with 83991 additions and 13209 deletions
8
vendor/github.com/montanaflynn/stats/data.go
generated
vendored
8
vendor/github.com/montanaflynn/stats/data.go
generated
vendored
|
@ -24,6 +24,9 @@ func (f Float64Data) Max() (float64, error) { return Max(f) }
|
|||
// Sum returns the total of all the numbers in the data
|
||||
func (f Float64Data) Sum() (float64, error) { return Sum(f) }
|
||||
|
||||
// CumulativeSum returns the cumulative sum of the data
|
||||
func (f Float64Data) CumulativeSum() ([]float64, error) { return CumulativeSum(f) }
|
||||
|
||||
// Mean returns the mean of the data
|
||||
func (f Float64Data) Mean() (float64, error) { return Mean(f) }
|
||||
|
||||
|
@ -84,6 +87,11 @@ func (f Float64Data) Correlation(d Float64Data) (float64, error) {
|
|||
return Correlation(f, d)
|
||||
}
|
||||
|
||||
// Autocorrelation is the correlation of a signal with a delayed copy of itself as a function of delay
|
||||
func (f Float64Data) AutoCorrelation(lags int) (float64, error) {
|
||||
return AutoCorrelation(f, lags)
|
||||
}
|
||||
|
||||
// Pearson calculates the Pearson product-moment correlation coefficient between two variables.
|
||||
func (f Float64Data) Pearson(d Float64Data) (float64, error) {
|
||||
return Pearson(f, d)
|
||||
|
|
Reference in a new issue