Skip to content

Commit

Permalink
newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
Elazar Gershuni committed Mar 6, 2024
1 parent cedcc6e commit 2c597e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/intervals/intervalset.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func (c *CanonicalIntervalSet) IsSingleNumber() bool {
}
return false
}

func (c *CanonicalIntervalSet) Elements() []int {
res := []int{}
for _, interval := range c.IntervalSet {
Expand All @@ -262,6 +263,7 @@ func (c *CanonicalIntervalSet) Elements() []int {
}
return res
}

func CreateFromInterval(start, end int64) *CanonicalIntervalSet {
return &CanonicalIntervalSet{IntervalSet: []Interval{{Start: start, End: end}}}
}

0 comments on commit 2c597e5

Please sign in to comment.