Show / Hide Table of Contents

Struct DiscontinuousRange<T>

An immutable structure representing a discontinuous, possibly empty, range of objects.

Implements
IEquatable<DiscontinuousRange<T>>
IEquatable<Range<T>>
IReadOnlyList<Range<T>>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: AssetRipper.Numerics
Assembly: AssetRipper.Numerics.dll
Syntax
public readonly struct DiscontinuousRange<T>
    where T : IComparable<T>, IEquatable<T>
Type Parameters
Name Description
T

Constructors

| Improve this Doc View Source

DiscontinuousRange()

Declaration
public DiscontinuousRange()
| Improve this Doc View Source

DiscontinuousRange(DiscontinuousRange<T>, DiscontinuousRange<T>)

Constructor for the union of two ranges.

Declaration
public DiscontinuousRange(DiscontinuousRange<T> range1, DiscontinuousRange<T> range2)
Parameters
Type Name Description
DiscontinuousRange<T> range1
DiscontinuousRange<T> range2
| Improve this Doc View Source

DiscontinuousRange(Range<T>)

Declaration
public DiscontinuousRange(Range<T> range)
Parameters
Type Name Description
Range<T> range
| Improve this Doc View Source

DiscontinuousRange(Range<T>[])

Declaration
public DiscontinuousRange(params Range<T>[] ranges)
Parameters
Type Name Description
Range<T>[] ranges
| Improve this Doc View Source

DiscontinuousRange(IReadOnlyList<Range<T>>)

Declaration
public DiscontinuousRange(IReadOnlyList<Range<T>> ranges)
Parameters
Type Name Description
IReadOnlyList<Range<T>> ranges
| Improve this Doc View Source

DiscontinuousRange(IEnumerable<Range<T>>)

Declaration
public DiscontinuousRange(IEnumerable<Range<T>> ranges)
Parameters
Type Name Description
System.Collections.IEnumerable<Range<T>> ranges

Properties

| Improve this Doc View Source

Count

Declaration
public readonly int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Empty

Declaration
public static readonly DiscontinuousRange<T> Empty { get; }
Property Value
Type Description
DiscontinuousRange<T>
| Improve this Doc View Source

Item[Int32]

Declaration
public readonly Range<T> this[int index] { get; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
Range<T>

Methods

| Improve this Doc View Source

Contains(T)

Declaration
public readonly bool Contains(T point)
Parameters
Type Name Description
T point
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Contains(DiscontinuousRange<T>)

Declaration
public readonly bool Contains(DiscontinuousRange<T> other)
Parameters
Type Name Description
DiscontinuousRange<T> other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Contains(Range<T>)

Declaration
public readonly bool Contains(Range<T> range)
Parameters
Type Name Description
Range<T> range
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(DiscontinuousRange<T>)

Declaration
public readonly bool Equals(DiscontinuousRange<T> other)
Parameters
Type Name Description
DiscontinuousRange<T> other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Range<T>)

Declaration
public readonly bool Equals(Range<T> other)
Parameters
Type Name Description
Range<T> other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Equals(Object)

Declaration
public override readonly bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

GetEnumerator()

Declaration
public readonly IEnumerator<Range<T>> GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator<Range<T>>
| Improve this Doc View Source

GetHashCode()

Declaration
public override readonly int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

Intersect(DiscontinuousRange<T>)

Declaration
public readonly DiscontinuousRange<T> Intersect(DiscontinuousRange<T> other)
Parameters
Type Name Description
DiscontinuousRange<T> other
Returns
Type Description
DiscontinuousRange<T>
| Improve this Doc View Source

Intersect(DiscontinuousRange<T>, DiscontinuousRange<T>)

Declaration
public static DiscontinuousRange<T> Intersect(DiscontinuousRange<T> range1, DiscontinuousRange<T> range2)
Parameters
Type Name Description
DiscontinuousRange<T> range1
DiscontinuousRange<T> range2
Returns
Type Description
DiscontinuousRange<T>
| Improve this Doc View Source

Intersects(DiscontinuousRange<T>)

Declaration
public readonly bool Intersects(DiscontinuousRange<T> other)
Parameters
Type Name Description
DiscontinuousRange<T> other
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Intersects(Range<T>)

Declaration
public readonly bool Intersects(Range<T> range)
Parameters
Type Name Description
Range<T> range
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsContinuous()

This range is continuous.

Declaration
public readonly bool IsContinuous()
Returns
Type Description
System.Boolean
Remarks

The Empty range is treated as not continuous.

| Improve this Doc View Source

IsContinuous(out Range<T>)

This range is continuous.

Declaration
public readonly bool IsContinuous(out Range<T> range)
Parameters
Type Name Description
Range<T> range
Returns
Type Description
System.Boolean
Remarks

The Empty range is treated as not continuous.

| Improve this Doc View Source

IsEmpty()

This range contains no points and is equal to the Empty range.

Declaration
public readonly bool IsEmpty()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Negate(T, T)

Declaration
public readonly DiscontinuousRange<T> Negate(T minimum, T maximum)
Parameters
Type Name Description
T minimum
T maximum
Returns
Type Description
DiscontinuousRange<T>
| Improve this Doc View Source

Subtract(DiscontinuousRange<T>)

Declaration
public readonly DiscontinuousRange<T> Subtract(DiscontinuousRange<T> other)
Parameters
Type Name Description
DiscontinuousRange<T> other
Returns
Type Description
DiscontinuousRange<T>
| Improve this Doc View Source

ToString()

Declaration
public override readonly string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()
| Improve this Doc View Source

Union(DiscontinuousRange<T>)

Declaration
public readonly DiscontinuousRange<T> Union(DiscontinuousRange<T> other)
Parameters
Type Name Description
DiscontinuousRange<T> other
Returns
Type Description
DiscontinuousRange<T>
| Improve this Doc View Source

Union(DiscontinuousRange<T>, DiscontinuousRange<T>)

Declaration
public static DiscontinuousRange<T> Union(DiscontinuousRange<T> range1, DiscontinuousRange<T> range2)
Parameters
Type Name Description
DiscontinuousRange<T> range1
DiscontinuousRange<T> range2
Returns
Type Description
DiscontinuousRange<T>

Operators

| Improve this Doc View Source

Equality(DiscontinuousRange<T>, DiscontinuousRange<T>)

Declaration
public static bool operator ==(DiscontinuousRange<T> left, DiscontinuousRange<T> right)
Parameters
Type Name Description
DiscontinuousRange<T> left
DiscontinuousRange<T> right
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Explicit(DiscontinuousRange<T> to Range<T>)

Declaration
public static explicit operator Range<T>(DiscontinuousRange<T> range)
Parameters
Type Name Description
DiscontinuousRange<T> range
Returns
Type Description
Range<T>
| Improve this Doc View Source

Implicit(Range<T> to DiscontinuousRange<T>)

Declaration
public static implicit operator DiscontinuousRange<T>(Range<T> range)
Parameters
Type Name Description
Range<T> range
Returns
Type Description
DiscontinuousRange<T>
| Improve this Doc View Source

Inequality(DiscontinuousRange<T>, DiscontinuousRange<T>)

Declaration
public static bool operator !=(DiscontinuousRange<T> left, DiscontinuousRange<T> right)
Parameters
Type Name Description
DiscontinuousRange<T> left
DiscontinuousRange<T> right
Returns
Type Description
System.Boolean

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
readonly IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

IEquatable<>
IEquatable<>
IReadOnlyList<>
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾