Region1

References
[IoId("00000000-E7EB-4FFD-99EC-2EA9F2368B2C")] public struct Region1 : IStorable, IEquatable<Region1>, IComparable<Region1>
A one-dimensional region, or set of intervals on the real number line.

Constructors

Region1

#
Create a region from a single interval.
public Region1(
lower,
Lower boundary.
upper
Upper boundary.
)

Region1

#
Deserialisation constructor.
public Region1(
reader
)

Properties

Empty

#
Gets the empty region.
public static Region1 Empty { get; }

Full

#
Gets the full region covering the entire numberline.
public static Region1 Full { get; }

IntervalCount

#
Gets the number of defined intervals.
public int IntervalCount { get; }

IsEmpty

#
Gets whether this region1 is entirely empty.
public bool IsEmpty { get; }

IsFull

#
Gets whether this region1 is entirely full.
public bool IsFull { get; }

Length

#
Gets the length of the valid intervals.
public double Length { get; }

Methods

CompareTo

#
public int CompareTo(
other
)

Contains

#
Gets whether a specific value is inside the region intervals.
public bool Contains(
value,
Value to test.
includeBoundaries = true
If true, values on interval boundaries are considered part of the interior.
)
True if the value is inside or on the boundary of the region intervals.

Equals

#
public bool Equals(
other
)

FindInterval

#
Gets the interval index which contains the given value.
public int FindInterval(
value
)

IntervalBoundaries

#
Gets the lower and upper boundaries of the interval with the given index.
public void IntervalBoundaries(
index,
out double
lower,
out double
upper
)

Store

#
Serialise this Region1.
public void Store(
writer
)
Store

ToString

#
public override string ToString()

ValueAtLength

#
Gets the value as measured from the start of the specified region interval. The length is only measured inside intervals.
public double ValueAtLength(
length,
Length to measure.
intervalIndex
Index of interval for measuring start.
)

ValueAtLength

#
Gets the value as measured from the start of the first region interval. The length is only measured inside intervals.
public double ValueAtLength(
length
Length to measure.
)

Operators

OperationResultDescription
Region1+Region1Region1Create a union of two regions.
Region1+doubleRegion1Shift all region intervals right by some distance.
Region1/doubleRegion1Divide all region boundaries by some factor.
Region1*doubleRegion1Multiply all region boundaries by some factor.
Region1-Region1Region1Create a difference of two regions.
Region1-doubleRegion1Shift all region intervals left by some distance.
-Region1Region1Negate a Region1.

Convertors

OperationResultDescription
implicit(double, double)Region1
implicit(int, int)Region1
implicitIntervalRegion1