Sha256: 70f3abf747c241258744804f5418b4073f32bfc452ba42ad588dec1e3d14dca1
Contents?: true
Size: 562 Bytes
Versions: 1
Compression:
Stored size: 562 Bytes
Contents
require_relative 'interval_set' require_relative 'basic_intervals' require_relative 'sweep_line' module IntervalNotation module Operations # Union of multiple intervals. def union(intervals) SweepLine.make_interval_set(intervals, SweepLine::TraceState::Union.initial_state(intervals.size)) end # Intersection of multiple intervals def intersection(intervals) SweepLine.make_interval_set(intervals, SweepLine::TraceState::Intersection.initial_state(intervals.size)) end module_function :union, :intersection end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
interval_notation-0.2.0 | lib/interval_notation/operations.rb |