• MARS Website
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Show / Hide Table of Contents
  • Mars.Common
    • GeoHash
    • GeoHashDecoder
    • GeohashDecodeResult
    • GeoHashEncoder
    • GeoHashPrecision
    • Hyperrectangle
    • InputHashHelper
    • PositionHelper
  • Mars.Common.Collections
    • BinaryArrayHeap<T>
    • DoubleBits
    • FibonacciHeap<T, TKey>
    • FibonacciHeapDoubleKey<T>
    • FibonacciHeapNode<T, TKey>
    • FibonacciHeapNodeDoubleKey<T>
    • HeapNode
    • IntervalSize
    • K2DTree<T>
    • K2dTreeNode<T>
    • KdTree
    • KdTree<T>
    • KdTreeBase<TNode>
    • KdTreeNode
    • KdTreeNode<T>
    • KdTreeNodeBase<TNode>
    • KdTreeNodeCollection<TNode>
    • KdTreeNodeList<T>
    • Key
    • Node<T>
    • NodeBase<T>
    • NodeDataContainer<T>
    • NodeDistance<TNode>
    • QuadTree<T>
    • Root<T>
    • TreeDataContainer<T>
  • Mars.Common.Collections.CritBit
    • ICritBitTree<TValue>
  • Mars.Common.Collections.Graph
    • EdgeData
    • GraphData
    • GraphSerializer
    • ISpatialGraph
    • KeyContainer
    • NodeData
    • SpatialGraph
    • SpatialGraphHelper
  • Mars.Common.Collections.Graph.Algorithms
    • AStar
    • CompressedPathDatabase
    • ContractionSearch
    • DepthLimitedTraversal
  • Mars.Common.Collections.Graph.Helper
    • INodeFinder
    • KdTreeNodeFinder
    • RunLengthEncoder
  • Mars.Common.Collections.KNNGraph
    • DefaultRandomGenerator
    • DistanceUtils
    • EventSources
    • EventSources.GraphBuildEventSource
    • EventSources.GraphSearchEventSource
    • IProgressReporter
    • IProvideRandomValues
    • KnnGraph<TItem, TDistance>
    • KnnGraph<TItem, TDistance>.KnnSearchResult
    • KnnGraph<TItem, TDistance>.Parameters
    • Node
    • ReverseComparer<T>
    • ReverseComparerExtensions
    • SelectionKind
    • TravelingCosts<TItem, TDistance>
  • Mars.Common.Compat
    • FormatDecoderAttribute
    • FormatEncoderAttribute
    • FormatHandlerAttribute
    • IntegerAttribute
    • NegativeIntegerAttribute
    • NonnegativeIntegerAttribute
    • NonpositiveIntegerAttribute
    • PositiveIntegerAttribute
  • Mars.Common.Data
    • DomainDataImporter
  • Mars.Common.Data.Providers
    • AscDataProvider
    • GeoJsonFeatureCollectionConverter
    • GeoJsonFeatureConverter
    • GeoJsonHelper
    • GeometryDataProvider
    • GraphMlProvider
    • HttpDataProvider
    • IDataProvider<TInput>
    • JsonFileDataProvider
    • JsonTextDataProvider
    • XmlFileDataProvider
    • XmlTextDataProvider
  • Mars.Common.Exceptions
    • DimensionMismatchException
    • ParseException
  • Mars.Common.IO
    • ExtensionMethods
    • FileClientUtils
    • FileKeys
    • HttpClientUtils
    • ObjectSerialize
    • Serializer
    • SerializerCompression
    • SparseFormat
    • SparseReader
    • SparseWriter
  • Mars.Common.IO.Attributes
    • SerializationBinderAttribute
    • SurrogateSelectorAttribute
  • Mars.Common.IO.Console
    • ChildProgressBar
    • IProgressBar
    • ProgressBar
    • ProgressBarBase
    • ProgressBarHeight
    • ProgressBarOptions
    • ProgressBarSimple
  • Mars.Common.IO.Csv
    • CsvAnalyzer
    • CsvReader
    • CsvReader.RecordEnumerator
    • CsvWriter
    • MissingFieldAction
    • ParseErrorAction
    • ValueTrimmingOptions
  • Mars.Common.IO.Events
    • ParseErrorEventArgs
  • Mars.Common.IO.Exceptions
    • MalformedCsvException
    • MissingFieldCsvException
  • Mars.Common.IO.Mapped
    • Context
    • DefaultArrayFactory
    • Extensions
    • IArrayFactory
    • ISerializableToStream
    • MappedAccessor<T>
    • MemoryMap
    • MemoryMap.CreateAccessorFunc<T>
    • MemoryMap.ReadFromDelegate<T>
    • MemoryMap.WriteToDelegate<T>
    • MemoryMapDelegates
    • MemoryMapDelegates.CreateAccessorFunc<T>
    • MemoryMapStream
  • Mars.Common.IO.Mapped.Accessors
    • MappedAccessorByte
    • MappedAccessorDouble
    • MappedAccessorInt16
    • MappedAccessorInt32
    • MappedAccessorInt64
    • MappedAccessorSingle
    • MappedAccessorUInt16
    • MappedAccessorUInt32
    • MappedAccessorUInt64
    • MappedAccessorVariable<T>
  • Mars.Common.IO.Mapped.Arrays
    • Array<T>
    • ArrayBase<T>
    • ArrayProfile
    • MappedArray<TMapped, T>
    • MappedArray<TMapped, T>.MapFrom
    • MappedArray<TMapped, T>.MapTo
    • MemoryArray<T>
    • VariableArray<T>
  • Mars.Common.IO.Mapped.Collections
    • MemoryBackedDictionary<TKey, TValue>
    • MemoryBackedList<T>
  • Mars.Common.IO.Mapped.Indexes
    • Index<T>
  • Mars.Common.IO.Mapped.Streams
    • CappedStream
  • Mars.Common.Socket
    • ByteOrder
    • CloseEventArgs
    • CloseStatusCode
    • CompressionMethod
    • ErrorEventArgs
    • Ext
    • MessageEventArgs
    • WebSocket
    • WebSocketException
    • WebSocketState
  • Mars.Common.Socket.Server
    • IWebSocketSession
    • WebHeaderCollection
    • WebSocketBehavior
    • WebSocketContext
    • WebSocketServer
    • WebSocketServiceHost
    • WebSocketServiceManager
    • WebSocketSessionManager
  • Mars.Numerics
    • Classes
    • Combinatorics
    • Constants
    • Distance
    • Elementwise
    • Jagged
    • MathematicsException
    • MathHelper
    • Matrix
    • MatrixOrder
    • MatrixType
    • Norm
    • Sort
    • Sorting
    • Sparse
    • Sparse<T>
    • Tools
    • Vector
    • VectorHelper
    • VectorType
  • Mars.Numerics.Comparers
    • ArrayComparer<T>
    • ComparerDirection
    • CustomComparer<T>
    • ElementComparer
    • ElementComparer<T>
    • GeneralComparer
    • StableComparer<T>
  • Mars.Numerics.Distances
    • Angular
    • Chebyshev
    • Cosine
    • Dirac<T>
    • Euclidean
    • Hamming
    • Hamming<T>
    • Haversine
    • Jaccard
    • Jaccard<T>
    • Kulczynski
    • Levenshtein
    • Levenshtein<T>
    • Manhattan
    • Matching
    • Minkowski
    • SquareEuclidean
    • Vincenty
    • Vincenty.Ellipsoid
  • Mars.Numerics.Distances.Base
    • IDistance<T>
    • IDistance<TFirst, TSecond>
    • IMetric<T>
    • ISimilarity<T, TU>
    • ISimilarity<T>
  • Mars.Numerics.Exceptions
    • DimensionMismatchException
    • NonPositiveDefiniteMatrixException
    • SingularMatrixException
  • Mars.Numerics.Formats
    • DefaultMatrixFormatProvider
    • IMatrixFormatProvider
    • MatrixFormatProviderBase
    • MatrixFormatter
    • OctaveMatrixFormatProvider
  • Mars.Numerics.Ranges
    • ByteRange
    • DoubleRange
    • FloatRange
    • IntRange
    • IRange<T>
  • Mars.Numerics.Statistics
    • ConstValueDistribution<T>
    • Distribution<T>
    • FastGaussianDistributionD
    • FastGaussianDistributionF
    • IDistribution
    • UniformDiscreteDistribution
    • UniformDistributionD
    • UniformDistributionF
  • Mars.Numerics.Statistics.Base
    • BinarySearch
    • DistributionBase
    • ISampleableDistribution<TObservations>
    • IUnivariateDistribution
    • IUnivariateDistribution<TObservation>
    • UnivariateDiscreteDistribution

Struct ByteRange

Represents a byte range with minimum and maximum values.
Implements
IRange<System.Byte>
System.IFormattable
System.IEquatable<ByteRange>
System.Collections.Generic.IEnumerable<System.Byte>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Mars.Numerics.Ranges
Assembly: Mars.Numerics.dll
Syntax
[Serializable]
public struct ByteRange : IRange<byte>, IFormattable, IEquatable<ByteRange>, IEnumerable<byte>, IEnumerable
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
Examples
// create [0, 255] range
var range1 = new ByteRange(0, 255);

// create [64, 128] range
var range2 = new ByteRange(64, 128);

// check if values is inside of the first range
if (range1.IsInside(5))
{
// ...
}

// check if the second range is inside of the first range
if (range1.IsInside(range2))
{
// ...
}

// check if two ranges overlap
if (range1.IsOverlapping(range2))
{
// ...
}

Constructors

| Improve this Doc View Source

ByteRange(Byte, Byte)

Initializes a new instance of the IntRange class.
Declaration
public ByteRange(byte min, byte max)
Parameters
Type Name Description
System.Byte min Minimum value of the range.
System.Byte max Maximum value of the range.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange

Properties

| Improve this Doc View Source

Length

Gets the length of the range, defined as (max - min).
Declaration
public readonly int Length { get; }
Property Value
Type Description
System.Int32
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Max

Maximum value of the range.
Declaration
public byte Max { get; set; }
Property Value
Type Description
System.Byte
Remarks
Represents maximum value (right side limit) of the range [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Min

Minimum value of the range.
Declaration
public byte Min { get; set; }
Property Value
Type Description
System.Byte
Remarks
Represents minimum value (left side limit) of the range [min, max].
See Also
IntRange
DoubleRange
FloatRange

Methods

| Improve this Doc View Source

Equals(ByteRange)

Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ByteRange other)
Parameters
Type Name Description
ByteRange other An object to compare with this object.
Returns
Type Description
System.Boolean true if the current object is equal to the other parameter; otherwise, false.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Equals(Object)

Determines whether the specified System.Object, is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj The System.Object to compare with this instance.
Returns
Type Description
System.Boolean true if the specified System.Object is equal to this instance; otherwise, false.
Overrides
System.ValueType.Equals(System.Object)
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through a collection.
Declaration
public IEnumerator<byte> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<System.Byte> An System.Collections.IEnumerator object that can be used to iterate through the collection.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

GetHashCode()

Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32 A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
System.ValueType.GetHashCode()
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Intersection(ByteRange)

Computes the intersection between two ranges.
Declaration
public ByteRange Intersection(ByteRange range)
Parameters
Type Name Description
ByteRange range The second range for which the intersection should be calculated.
Returns
Type Description
ByteRange An new ByteRange structure containing the intersection between this range and the range given as argument.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

IsInside(ByteRange)

Check if the specified range is inside of the range.
Declaration
public bool IsInside(ByteRange range)
Parameters
Type Name Description
ByteRange range Range to check.
Returns
Type Description
System.Boolean True if the specified range is inside of the range or false otherwise.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

IsInside(Byte)

Check if the specified value is inside of the range.
Declaration
public bool IsInside(byte x)
Parameters
Type Name Description
System.Byte x Value to check.
Returns
Type Description
System.Boolean True if the specified value is inside of the range or false otherwise.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

IsOverlapping(ByteRange)

Check if the specified range overlaps with the range.
Declaration
public bool IsOverlapping(ByteRange range)
Parameters
Type Name Description
ByteRange range Range to check for overlapping.
Returns
Type Description
System.Boolean True if the specified range overlaps with the range or false otherwise.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

ToString()

Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type Description
System.String A System.String that represents this instance.
Overrides
System.ValueType.ToString()
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

ToString(String, IFormatProvider)

Returns a System.String that represents this instance.
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Type Name Description
System.String format The format.
System.IFormatProvider formatProvider The format provider.
Returns
Type Description
System.String A System.String that represents this instance.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange

Operators

| Improve this Doc View Source

Equality(ByteRange, ByteRange)

Determines whether two instances are equal.
Declaration
public static bool operator ==(ByteRange range1, ByteRange range2)
Parameters
Type Name Description
ByteRange range1
ByteRange range2
Returns
Type Description
System.Boolean
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Implicit(ByteRange to DoubleRange)

Performs an implicit conversion from IntRange to DoubleRange.
Declaration
public static implicit operator DoubleRange(ByteRange range)
Parameters
Type Name Description
ByteRange range The range.
Returns
Type Description
DoubleRange The result of the conversion.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Implicit(ByteRange to FloatRange)

Performs an implicit conversion from IntRange to FloatRange.
Declaration
public static implicit operator FloatRange(ByteRange range)
Parameters
Type Name Description
ByteRange range The range.
Returns
Type Description
FloatRange The result of the conversion.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Implicit(ByteRange to IntRange)

Performs an implicit conversion from ByteRange to IntRange.
Declaration
public static implicit operator IntRange(ByteRange range)
Parameters
Type Name Description
ByteRange range The range.
Returns
Type Description
IntRange The result of the conversion.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange
| Improve this Doc View Source

Inequality(ByteRange, ByteRange)

Determines whether two instances are not equal.
Declaration
public static bool operator !=(ByteRange range1, ByteRange range2)
Parameters
Type Name Description
ByteRange range1
ByteRange range2
Returns
Type Description
System.Boolean
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator An System.Collections.IEnumerator object that can be used to iterate through the collection.
Remarks
This class represents a byt range with inclusive limits, where both minimum and maximum values of the range are included into it. Mathematical notation of such range is [min, max].
See Also
IntRange
DoubleRange
FloatRange

Implements

IRange<T>
System.IFormattable
System.IEquatable<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

Serializer.Save<T>(T, out Byte[], SerializerCompression)
Serializer.Save<T>(T, Stream, SerializerCompression)
Serializer.Save<T>(T, BinaryFormatter, Stream, SerializerCompression)
Serializer.Save<T>(T, String, SerializerCompression)
Serializer.Save<T>(T, String)
Ext.ToByteArray<T>(T, ByteOrder)
Matrix.Concatenate<T>(T, T[])
Combinatorics.Subsets<T>(IEnumerable<T>, Boolean)
Combinatorics.Subsets<T>(IEnumerable<T>, Int32, Boolean)
Matrix.SetEquals<T>(IEnumerable<T>, IEnumerable<T>)
DomainDataImporter.Import(Object, InputConfiguration)
ObjectSerialize.Serialize(Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)

See Also

IntRange
DoubleRange
FloatRange
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © MARS GROUP. HAW Hamburg