adding lastvalueprovider interface and relevant methods.
This commit is contained in:
parent
c14ab6a4b2
commit
2603c67e10
5 changed files with 27 additions and 5 deletions
|
|
@ -52,7 +52,7 @@ func (ema EMASeries) GetSigma() float64 {
|
|||
}
|
||||
|
||||
// GetValue gets a value at a given index.
|
||||
func (ema EMASeries) GetValue(index int) (x float64, y float64) {
|
||||
func (ema EMASeries) GetValue(index int) (x, y float64) {
|
||||
if ema.InnerSeries == nil {
|
||||
return
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ func (ema EMASeries) GetValue(index int) (x float64, y float64) {
|
|||
|
||||
// GetLastValue computes the last moving average value but walking back window size samples,
|
||||
// and recomputing the last moving average chunk.
|
||||
func (ema EMASeries) GetLastValue() (x float64, y float64) {
|
||||
func (ema EMASeries) GetLastValue() (x, y float64) {
|
||||
if ema.InnerSeries == nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue