Add IndexedSeries

This commit is contained in:
Luke I. Wilson
2023-05-20 19:09:41 -05:00
parent b0ab9543a4
commit 892d3d6965
3 changed files with 372 additions and 8 deletions

View File

@@ -100,6 +100,13 @@ func (s *FloatSeries) Push(val float64) *FloatSeries {
return s
}
func (s *FloatSeries) Pop() float64 {
if v := s.Series.Pop(); v != nil {
return v.(float64)
}
return 0
}
// Remove deletes the value at the given index and returns it. If the index is out of bounds, it returns 0.
func (s *FloatSeries) Remove(i int) float64 {
if v := s.Series.Remove(i); v != nil {