Documentation ¶
Overview ¶
package filter represents intervals that are allowed, and denied so an interval can be checked for (a) falling completely within an allowed interval AND (b) also not even partially overlapping a denied interval Note that our avl trees best supports finding clashing intervals so turn our allow list into something we can search for clashes against i.e. invert it to make denied periods between allowed periods and take note of the left most and right most periods allowed to complete the check without using tree functions (to avoid setting arbitrary zero and infinite time) additional check but not finding intervals that fall completely within other intervals
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
Filter represents an allowed interval, with a list of denied sub-intervals
func New ¶
func New() *Filter
New creates a new filter with an empty deny list and no allowed interval
func (*Filter) Allowed ¶
Allowed returns true if the interval is allowed It must not conflict with notAllowed It must not conflict with denied This does not write to the filter so only needs a read lock
func (*Filter) SetAllowed ¶
SetAllowed adds the allowed intervals to the `allowed list`