03708a90ef
* api cleaup * updates * wtf * updates * snapshot. * tweaks * snapshot * api tweaks. * updates * updates * updates * changes. * updates * updates * sequence => seq * dont need to use curl, just using wget * fixing examples
20 lines
412 B
Go
20 lines
412 B
Go
package seq
|
|
|
|
// NewArray creates a new array.
|
|
func NewArray(values ...float64) Array {
|
|
return Array(values)
|
|
}
|
|
|
|
// Array is a wrapper for an array of floats that implements `ValuesProvider`.
|
|
type Array []float64
|
|
|
|
// Len returns the value provider length.
|
|
func (a Array) Len() int {
|
|
return len(a)
|
|
}
|
|
|
|
// GetValue returns the value at a given index.
|
|
func (a Array) GetValue(index int) float64 {
|
|
return a[index]
|
|
}
|