C# 클래스 Sharith.MathUtils.PositiveRange

a PositiveRange is an interval of integers, given by a lower bound Min and an upper bound Max, such that 0 <= Min and Min <= Max. a PositiveRange is immutable.
상속: ICloneable
파일 보기 프로젝트 열기: PeterLuschny/Fast-Factorial-Functions 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Max int
Min int

공개 메소드들

메소드 설명
Clone ( ) : object

Overrides System.Object.Clone()

Contains ( PositiveRange range ) : bool

Checks if the given range is a subrange, bo.exp. this.Min <= range.Min and range.Max <= this.Max.

Contains ( int value ) : bool

Checks if the given value lies within the range, i.e. Min <= value and value <= Max.

ContainsOrFail ( PositiveRange range ) : bool

Checks if the given range is a subrange, bo.exp. this.Min <= range.Min and range.Max <= this.Max. If the range ist not contained an ArgumentOutOfRangeException will be raised.

ContainsOrFail ( int value ) : bool

Checks if the given value lies within the range, bo.exp. Min <= value and value <= Max. If the value ist not contained an ArgumentOutOfRangeException will be raised.

Equals ( PositiveRange that ) : bool

Compares this range to the specified range. The results is true if and only if the argument has the same values as this object.

Equals ( object obj ) : bool

Compares this range to the specified object. The results is true if and only if the argument is not null and is a PositiveRange object that has the same values as this object.

GetHashCode ( ) : int

a hash code value for this range.

PositiveRange ( int low, int high ) : System

Initializes a new instance of the PositiveRange class, i.e. a range of integers, such that 0 <= low <= high.

Size ( ) : int

The Size of the range.

ToString ( ) : string

Represents the range as a string, formatted as "[Min,Max]".

operator ( ) : bool

Compares this range to the specified range. The results is true if and only if the arguments do not have the same value.

메소드 상세

Clone() 공개 메소드

Overrides System.Object.Clone()
public Clone ( ) : object
리턴 object

Contains() 공개 메소드

Checks if the given range is a subrange, bo.exp. this.Min <= range.Min and range.Max <= this.Max.
public Contains ( PositiveRange range ) : bool
range PositiveRange The range to be checked.
리턴 bool

Contains() 공개 메소드

Checks if the given value lies within the range, i.e. Min <= value and value <= Max.
public Contains ( int value ) : bool
value int The value to checked.
리턴 bool

ContainsOrFail() 공개 메소드

Checks if the given range is a subrange, bo.exp. this.Min <= range.Min and range.Max <= this.Max. If the range ist not contained an ArgumentOutOfRangeException will be raised.
public ContainsOrFail ( PositiveRange range ) : bool
range PositiveRange The range to be checked.
리턴 bool

ContainsOrFail() 공개 메소드

Checks if the given value lies within the range, bo.exp. Min <= value and value <= Max. If the value ist not contained an ArgumentOutOfRangeException will be raised.
public ContainsOrFail ( int value ) : bool
value int The value to checked.
리턴 bool

Equals() 공개 메소드

Compares this range to the specified range. The results is true if and only if the argument has the same values as this object.
public Equals ( PositiveRange that ) : bool
that PositiveRange a positive range to compare with.
리턴 bool

Equals() 공개 메소드

Compares this range to the specified object. The results is true if and only if the argument is not null and is a PositiveRange object that has the same values as this object.
public Equals ( object obj ) : bool
obj object The object to compare with.
리턴 bool

GetHashCode() 공개 메소드

a hash code value for this range.
public GetHashCode ( ) : int
리턴 int

PositiveRange() 공개 메소드

Initializes a new instance of the PositiveRange class, i.e. a range of integers, such that 0 <= low <= high.
public PositiveRange ( int low, int high ) : System
low int The lower bound (Min) of the range.
high int The upper bound (Max) of the range.
리턴 System

Size() 공개 메소드

The Size of the range.
public Size ( ) : int
리턴 int

ToString() 공개 메소드

Represents the range as a string, formatted as "[Min,Max]".
public ToString ( ) : string
리턴 string

operator() 공개 정적인 메소드

Compares this range to the specified range. The results is true if and only if the arguments do not have the same value.
public static operator ( ) : bool
리턴 bool

프로퍼티 상세

Max 공개적으로 프로퍼티

Gets upper bound (Max) of the interval.
public int Max
리턴 int

Min 공개적으로 프로퍼티

Gets the lower bound (Min) of the interval.
public int Min
리턴 int