Search Results for

    Show / Hide Table of Contents

    Class IntInterval

    Represents an integer interval with bounded/unbounded and inclusive/exclusive end points.

    Inheritance
    System.Object
    Interval<System.Int32, System.Int32, IntervalEndpoint<System.Int32>, IntInterval>
    IntInterval
    Implements
    IInterval<System.Int32, System.Int32, IntervalEndpoint<System.Int32>, IntInterval>
    Inherited Members
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.LeftEndpoint
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Left
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.RightEndpoint
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Right
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Span
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsFinite
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsOpen
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsClosed
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsDegenerate
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsEmpty
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsHalfBounded
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsNegative
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Center
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.PointMinValue
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.PointMaxValue
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.SpanZeroValue
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.SpanMinValue
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.SpanMaxValue
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.PointIsWithin(Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Translate(Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Scale(Int32, Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Scale(Single, Single)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ScaleLeft(Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ScaleLeft(Single)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ScaleCenter(Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ScaleCenter(Single)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ScaleRight(Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ScaleRight(Single)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IntersectsWith(IInterval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsDisjointFrom(IInterval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsSubsetOf(IInterval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.IsProperSubsetOf(IInterval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Merge(IEnumerable<Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>>, Func<IntervalEndpoint<Int32>, IntervalEndpoint<Int32>, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Coverage(IEnumerable<Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>>, Func<IntervalEndpoint<Int32>, IntervalEndpoint<Int32>, IntInterval>, Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Intersection(IEnumerable<Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>>, Func<IntervalEndpoint<Int32>, IntervalEndpoint<Int32>, IntInterval>, Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ComparePoints(Int32, Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.ScaleSpan(Int32, Double)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.NegateSpan(Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.TranslatePoint(Int32, Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Difference(Int32, Int32)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Translate(Int32, Func<Int32, Boolean, Boolean, Int32, Boolean, Boolean, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Scale(Int32, Int32, Func<Int32, Boolean, Boolean, Int32, Boolean, Boolean, IntInterval>)
    Interval<Int32, Int32, IntervalEndpoint<Int32>, IntInterval>.Scale(Double, Double, Func<Int32, Boolean, Boolean, Int32, Boolean, Boolean, IntInterval>)
    Namespace: Microsoft.Psi
    Assembly: Microsoft.Psi.dll
    Syntax
    public class IntInterval : Interval<int, int, IntervalEndpoint<int>, IntInterval>, IInterval<int, int, IntervalEndpoint<int>, IntInterval>

    Constructors

    View Source

    IntInterval(IntervalEndpoint<Int32>, IntervalEndpoint<Int32>)

    Initializes a new instance of the IntInterval class.

    Declaration
    public IntInterval(IntervalEndpoint<int> leftEndpoint, IntervalEndpoint<int> rightEndpoint)
    Parameters
    Type Name Description
    IntervalEndpoint<System.Int32> leftEndpoint

    Left endpoint.

    IntervalEndpoint<System.Int32> rightEndpoint

    Right endpoint.

    View Source

    IntInterval(Int32, Boolean, Boolean, Int32, Boolean, Boolean)

    Initializes a new instance of the IntInterval class.

    Declaration
    public IntInterval(int leftPoint, bool leftInclusive, bool leftBounded, int rightPoint, bool rightInclusive, bool rightBounded)
    Parameters
    Type Name Description
    System.Int32 leftPoint

    Left bound point (or min value if unbound).

    System.Boolean leftInclusive

    Whether left point is inclusive (always false if unbound).

    System.Boolean leftBounded

    Whether left point is bounded.

    System.Int32 rightPoint

    Right bound point (or min value if unbound).

    System.Boolean rightInclusive

    Whether right point is inclusive (always false if unbound).

    System.Boolean rightBounded

    Whether right point is bounded.

    View Source

    IntInterval(Int32, Boolean, Int32, Boolean)

    Initializes a new instance of the IntInterval class.

    Declaration
    public IntInterval(int leftPoint, bool leftInclusive, int rightPoint, bool rightInclusive)
    Parameters
    Type Name Description
    System.Int32 leftPoint

    Left bound point.

    System.Boolean leftInclusive

    Whether left point is inclusive.

    System.Int32 rightPoint

    Right bound point.

    System.Boolean rightInclusive

    Whether right point is inclusive.

    View Source

    IntInterval(Int32, Int32)

    Initializes a new instance of the IntInterval class.

    Declaration
    public IntInterval(int leftPoint, int rightPoint)
    Parameters
    Type Name Description
    System.Int32 leftPoint

    Left bound point.

    System.Int32 rightPoint

    Right bound point.

    Remarks

    Defaults to inclusive.

    Fields

    View Source

    Empty

    Canonical empty instance (bounded, non-inclusive, single point).

    Declaration
    public static readonly IntInterval Empty
    Field Value
    Type Description
    IntInterval
    View Source

    Infinite

    Canonical infinite interval (unbounded on both ends).

    Declaration
    public static readonly IntInterval Infinite
    Field Value
    Type Description
    IntInterval
    View Source

    Zero

    Zero interval (unbounded but inclusive, zero value).

    Declaration
    public static readonly IntInterval Zero
    Field Value
    Type Description
    IntInterval

    Properties

    View Source

    PointMaxValue

    Gets the point maximum value.

    Declaration
    protected override int PointMaxValue { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.PointMaxValue
    View Source

    PointMinValue

    Gets the point minimum value.

    Declaration
    protected override int PointMinValue { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.PointMinValue
    View Source

    SpanMaxValue

    Gets the span maximum value.

    Declaration
    protected override int SpanMaxValue { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.SpanMaxValue
    View Source

    SpanMinValue

    Gets the span minimum value.

    Declaration
    protected override int SpanMinValue { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.SpanMinValue
    View Source

    SpanZeroValue

    Gets the span zero value.

    Declaration
    protected override int SpanZeroValue { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.SpanZeroValue

    Methods

    View Source

    ComparePoints(Int32, Int32)

    Compare points.

    Declaration
    protected override int ComparePoints(int a, int b)
    Parameters
    Type Name Description
    System.Int32 a

    First point.

    System.Int32 b

    Second point.

    Returns
    Type Description
    System.Int32

    Less (-1), greater (+1) or equal (0).

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.ComparePoints(System.Int32, System.Int32)
    View Source

    Coverage(IEnumerable<IntInterval>)

    Determine coverage from minimum left to maximum right for a set of given intervals.

    Declaration
    public static IntInterval Coverage(IEnumerable<IntInterval> intervals)
    Parameters
    Type Name Description
    IEnumerable<IntInterval> intervals

    The set of intervals.

    Returns
    Type Description
    IntInterval

    Interval from minimum left to maximum right value.

    Remarks

    Returns empty interval when sequence is empty or contains only empty intervals.

    View Source

    Difference(Int32, Int32)

    Determine span between two given points.

    Declaration
    protected override int Difference(int x, int y)
    Parameters
    Type Name Description
    System.Int32 x

    First point.

    System.Int32 y

    Second point.

    Returns
    Type Description
    System.Int32

    Span between points.

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.Difference(System.Int32, System.Int32)
    View Source

    LeftBounded(Int32)

    Constructor helper for left-bound instances.

    Declaration
    public static IntInterval LeftBounded(int left)
    Parameters
    Type Name Description
    System.Int32 left

    Left bound point.

    Returns
    Type Description
    IntInterval

    A left-bound instance of the IntInterval class.

    Remarks

    Defaults to inclusive.

    View Source

    LeftBounded(Int32, Boolean)

    Constructor helper for left-bound instances.

    Declaration
    public static IntInterval LeftBounded(int left, bool inclusive)
    Parameters
    Type Name Description
    System.Int32 left

    Left bound point.

    System.Boolean inclusive

    Whether left point is inclusive.

    Returns
    Type Description
    IntInterval

    A left-bound instance of the IntInterval class.

    View Source

    Merge(IEnumerable<IntInterval>)

    Merges a specified set of int intervals into a set of non-overlapping int intervals that cover the specified intervals.

    Declaration
    public static IEnumerable<IntInterval> Merge(IEnumerable<IntInterval> intervals)
    Parameters
    Type Name Description
    IEnumerable<IntInterval> intervals

    A set of intervals to cover.

    Returns
    Type Description
    IEnumerable<IntInterval>

    Set of non-overlapping intervals that cover the given intervals.

    View Source

    NegateSpan(Int32)

    Negate span.

    Declaration
    protected override int NegateSpan(int span)
    Parameters
    Type Name Description
    System.Int32 span

    Span to be negated.

    Returns
    Type Description
    System.Int32

    Negated span..

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.NegateSpan(System.Int32)
    View Source

    RightBounded(Int32)

    Constructor helper for right-bound instances.

    Declaration
    public static IntInterval RightBounded(int right)
    Parameters
    Type Name Description
    System.Int32 right

    Right bound point.

    Returns
    Type Description
    IntInterval

    A right-bound instance of the IntInterval class.

    Remarks

    Defaults to inclusive.

    View Source

    RightBounded(Int32, Boolean)

    Constructor helper for right-bound instances.

    Declaration
    public static IntInterval RightBounded(int right, bool inclusive)
    Parameters
    Type Name Description
    System.Int32 right

    Right bound point.

    System.Boolean inclusive

    Whether right point is inclusive.

    Returns
    Type Description
    IntInterval

    A right-bound instance of the IntInterval class.

    View Source

    Scale(Int32, Int32)

    Scale endpoints by span distances.

    Declaration
    public override IntInterval Scale(int left, int right)
    Parameters
    Type Name Description
    System.Int32 left

    Span by which to scale left.

    System.Int32 right

    Span by which to scale right.

    Returns
    Type Description
    IntInterval

    Scaled interval.

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.Scale(System.Int32, System.Int32)
    View Source

    Scale(Single, Single)

    Scale endpoints by factors.

    Declaration
    public override IntInterval Scale(float left, float right)
    Parameters
    Type Name Description
    System.Single left

    Factor by which to scale left.

    System.Single right

    Factor by which to scale right.

    Returns
    Type Description
    IntInterval

    Scaled interval.

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.Scale(System.Single, System.Single)
    View Source

    ScaleSpan(Int32, Double)

    Scale a span by a given factor.

    Declaration
    protected override int ScaleSpan(int span, double factor)
    Parameters
    Type Name Description
    System.Int32 span

    Span value.

    System.Double factor

    Factor by which to scale.

    Returns
    Type Description
    System.Int32

    Scaled span.

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.ScaleSpan(System.Int32, System.Double)
    View Source

    Translate(Int32)

    Translate by a span distance.

    Declaration
    public override IntInterval Translate(int span)
    Parameters
    Type Name Description
    System.Int32 span

    Span by which to translate.

    Returns
    Type Description
    IntInterval

    Translated interval.

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.Translate(System.Int32)
    Remarks

    Unbound points do not change.

    View Source

    TranslatePoint(Int32, Int32)

    Translate point by given span.

    Declaration
    protected override int TranslatePoint(int point, int span)
    Parameters
    Type Name Description
    System.Int32 point

    Point value.

    System.Int32 span

    Span by which to translate.

    Returns
    Type Description
    System.Int32

    Translated point.

    Overrides
    Microsoft.Psi.Interval<System.Int32, System.Int32, Microsoft.Psi.IntervalEndpoint<System.Int32>, Microsoft.Psi.IntInterval>.TranslatePoint(System.Int32, System.Int32)

    Implements

    IInterval<TPoint, TSpan, TEndpoint, T>

    Extension Methods

    Serializer.DeepClone<T>(T, ref T)
    Serializer.DeepClone<T>(T, IRecyclingPool<T>)
    Serializer.DeepClone<T>(T)
    • View Source
    In This Article
    • Constructors
      • IntInterval(IntervalEndpoint<Int32>, IntervalEndpoint<Int32>)
      • IntInterval(Int32, Boolean, Boolean, Int32, Boolean, Boolean)
      • IntInterval(Int32, Boolean, Int32, Boolean)
      • IntInterval(Int32, Int32)
    • Fields
      • Empty
      • Infinite
      • Zero
    • Properties
      • PointMaxValue
      • PointMinValue
      • SpanMaxValue
      • SpanMinValue
      • SpanZeroValue
    • Methods
      • ComparePoints(Int32, Int32)
      • Coverage(IEnumerable<IntInterval>)
      • Difference(Int32, Int32)
      • LeftBounded(Int32)
      • LeftBounded(Int32, Boolean)
      • Merge(IEnumerable<IntInterval>)
      • NegateSpan(Int32)
      • RightBounded(Int32)
      • RightBounded(Int32, Boolean)
      • Scale(Int32, Int32)
      • Scale(Single, Single)
      • ScaleSpan(Int32, Double)
      • Translate(Int32)
      • TranslatePoint(Int32, Int32)
    • Implements
    • Extension Methods
    Back to top Privacy & Cookies | Terms Of Use | Trademarks | © Microsoft
    Generated by DocFX