Table of Contents

Struct DomainRange

Namespace
xFunc.Maths.Expressions.Domains
Assembly
xFunc.Maths.dll

Represents a range of allowed values for the domain of function.

public readonly struct DomainRange : IEquatable<DomainRange>
Implements
Inherited Members

Constructors

DomainRange(NumberValue, bool, NumberValue, bool)

Initializes a new instance of the DomainRange struct.

public DomainRange(NumberValue start, bool isStartInclusive, NumberValue end, bool isEndInclusive)

Parameters

start NumberValue

The start of the range.

isStartInclusive bool

Determines whether the start parameter is inclusive.

end NumberValue

The end of the range.

isEndInclusive bool

Determines whether the end parameter is inclusive.

Properties

End

Gets the end of the range.

public NumberValue End { get; }

Property Value

NumberValue

IsEndInclusive

Gets a value indicating whether the end is inclusive.

public bool IsEndInclusive { get; }

Property Value

bool

IsStartInclusive

Gets a value indicating whether the start is inclusive.

public bool IsStartInclusive { get; }

Property Value

bool

Start

Gets the start of the range.

public NumberValue Start { get; }

Property Value

NumberValue

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Equals(DomainRange)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(DomainRange other)

Parameters

other DomainRange

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

IsInRange(NumberValue)

Determines whether the value number is in the range of domain.

public bool IsInRange(NumberValue value)

Parameters

value NumberValue

The number.

Returns

bool

true, if the value number is in the range of domain, otherwise, false.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(DomainRange, DomainRange)

Indicates whether left range is equal to the right range.

public static bool operator ==(DomainRange left, DomainRange right)

Parameters

left DomainRange

The left range.

right DomainRange

The right range.

Returns

bool

true if the left range is equal to the right range; otherwise, false.

operator !=(DomainRange, DomainRange)

Indicates whether left range is not equal to the right range.

public static bool operator !=(DomainRange left, DomainRange right)

Parameters

left DomainRange

The left range.

right DomainRange

The right range.

Returns

bool

true if the left range is not equal to the right range; otherwise, false.