p3: change return values

This commit is contained in:
leo 2023-03-06 18:51:15 +01:00
parent ae69b3e306
commit ea406f5b56
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ
3 changed files with 6 additions and 6 deletions

@ -13,9 +13,9 @@ const (
// Estimate runs the selected method to estimate parameters of ARX model,
// returns them and the error of the estimate. valid estimation method values
// are 0 for explicit and 1 for recursive.
// the function returns [][]float64 of parameter estimates, ([][]float64 of
// error values, nil for error) on happy path, (nil, nil, err) otherwise.
func Estimate(eMethod int, u, y [][]float64) ([][]float64, [][]float64, error) {
// the function returns [][]float64 of parameter estimates, ([]float64 of error
// values, nil for error) on happy path, (nil, nil, err) otherwise.
func Estimate(eMethod int, u, y []float64) ([][]float64, []float64, error) {
if eMethod < 0 || eMethod > 1 {
log.Printf("error: estimation method needs to be from the set {0, 1}, got: %d", eMethod)
@ -24,7 +24,7 @@ func Estimate(eMethod int, u, y [][]float64) ([][]float64, [][]float64, error) {
method := eMethod
estimates := make([][]float64, 0)
errs := make([][]float64, 0)
errs := make([]float64, 0)
var err error

@ -1,5 +1,5 @@
package lrls
func explicit(u, y [][]float64) ([][]float64, [][]float64, error) {
func explicit(u, y []float64) ([][]float64, []float64, error) {
return nil, nil, nil
}

@ -1,5 +1,5 @@
package lrls
func recursive(u, y [][]float64) ([][]float64, [][]float64, error) {
func recursive(u, y []float64) ([][]float64, []float64, error) {
return nil, nil, nil
}