Interval data type for C# .NET?

前端 未结 8 2026
一个人的身影
一个人的身影 2021-01-30 23:07

I\'m looking an interval data type for .NET 4.0. For example the interval (a,b], all point x such that a

What i would like to be able to do are create interv

8条回答
  •  半阙折子戏
    2021-01-30 23:39

    I've found a implementation for DateTimeOffSet only (No numerical) that works fine and have all those methods below. Since this question is top hanked in Google, I'm contributing here:

    Covers(t: DateTime) : bool
    Join(s: IDisjointIntevalSet) : IDisjointIntevalSet
    Join(i: IInterval) : IDisjointIntevalSet
    Intersect(i : IInterval) : IDisjointIntevalSet
    Consolidate() : IDisjointIntevalSet
    

    Avaliable at GitHub and nuget

提交回复
热议问题