• Documentation
  • 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 Hyperrectangle

    Hyperrectangle structure.
    Implements
    ICloneable
    IEquatable<Hyperrectangle>
    IFormattable
    Namespace: Mars.Common
    Assembly: Mars.Common.dll
    Syntax
    public struct Hyperrectangle : ICloneable, IEquatable<Hyperrectangle>, IFormattable
    Remarks

    In geometry, an n-orthotope (also called a hyperrectangle or a box) is the generalization of a rectangle for higher dimensions, formally defined as the Cartesian product of intervals.

    References:

    • Wikipedia contributors, "Hyperrectangle," Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=Hyperrectangle

    Constructors

    Hyperrectangle(Double, Double, Double, Double)

    Initializes a new instance of the Hyperrectangle struct.
    Declaration
    public Hyperrectangle(double x, double y, double width, double height)
    Parameters
    Type Name Description
    System.Double x The x-coordinate of the lower-left corner of the rectangle..
    System.Double y The y-coordinate of the lower-left corner of the rectangle.
    System.Double width The width of the rectangle.
    System.Double height The height of the rectangle.

    Hyperrectangle(Double[], Double[], Boolean)

    Initializes a new instance of the Hyperrectangle struct.
    Declaration
    public Hyperrectangle(double[] min, double[] max, bool copy = true)
    Parameters
    Type Name Description
    System.Double[] min The minimum point in the hyperrectangle (the lower bound).
    System.Double[] max The maximum point in the hyperrectangle (the upper bound).
    System.Boolean copy Whether the passed vectors should be copied into this instance or used as-is. Default is true (elements from the given vectors will be copied into new array instances).

    Properties

    Max

    Gets the maximum point defining the upper bound of the hyperrectangle.
    Declaration
    public double[] Max { get; }
    Property Value
    Type Description
    System.Double[]

    Min

    Gets the minimum point defining the lower bound of the hyperrectangle.
    Declaration
    public double[] Min { get; }
    Property Value
    Type Description
    System.Double[]

    NumberOfDimensions

    Gets the number of dimensions of the hyperrectangle.
    Declaration
    public int NumberOfDimensions { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    Clone()

    Creates a new object that is a copy of the current instance.
    Declaration
    public object Clone()
    Returns
    Type Description
    System.Object A new object that is a copy of this instance.

    Contains(Double[])

    Determines if the specified point is contained within this Hyperrectangle structure.
    Declaration
    public bool Contains(params double[] point)
    Parameters
    Type Name Description
    System.Double[] point
    Returns
    Type Description
    System.Boolean

    Equals(Hyperrectangle)

    Indicates whether the current object is equal to another object of the same type.
    Declaration
    public bool Equals(Hyperrectangle other)
    Parameters
    Type Name Description
    Hyperrectangle 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.

    FromMinAndLength(Double[], Double[], Boolean)

    Initializes a new instance of the Hyperrectangle struct from a minimum value and a size.
    Declaration
    public static Hyperrectangle FromMinAndLength(double[] min, double[] size, bool copy = true)
    Parameters
    Type Name Description
    System.Double[] min The minimum point in the hyperrectangle (the lower bound).
    System.Double[] size The size of each dimension (i.e. width, height, and so on).
    System.Boolean copy Whether the passed vectors should be copied into this instance or used as-is. Default is true (elements from the given vectors will be copied into new array instances).
    Returns
    Type Description
    Hyperrectangle

    FromMinAndMax(Double[], Double[], Boolean)

    Initializes a new instance of the Hyperrectangle struct from minimum and maximum values.
    Declaration
    public static Hyperrectangle FromMinAndMax(double[] min, double[] max, bool copy = true)
    Parameters
    Type Name Description
    System.Double[] min The minimum point in the hyperrectangle (the lower bound).
    System.Double[] max The maximum point in the hyperrectangle (the upper bound).
    System.Boolean copy Whether the passed vectors should be copied into this instance or used as-is. Default is true (elements from the given vectors will be copied into new array instances).
    Returns
    Type Description
    Hyperrectangle

    GetLength()

    Gets the length of each dimension. The length of the first dimension can be referred as the width, the second as the height, and so on.
    Declaration
    public double[] GetLength()
    Returns
    Type Description
    System.Double[]

    IntersectsWith(Hyperrectangle)

    Determines if this rectangle intersects with rect.
    Declaration
    public bool IntersectsWith(Hyperrectangle rect)
    Parameters
    Type Name Description
    Hyperrectangle rect
    Returns
    Type Description
    System.Boolean

    ToString()

    Returns a that represents this instance.
    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String A that represents this instance.

    ToString(String, IFormatProvider)

    Returns a that represents this instance.
    Declaration
    public string ToString(string format, IFormatProvider formatProvider = null)
    Parameters
    Type Name Description
    System.String format The format to use.-or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the System.IFormattable implementation.
    IFormatProvider formatProvider The provider to use to format the value.-or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.
    Returns
    Type Description
    System.String A that represents this instance.

    Implements

    ICloneable
    IEquatable<>
    IFormattable

    Extension Methods

    Ext.ToByteArray<T>(T, ByteOrder)
    Serializer.Save<T>(T, Stream, SerializerCompression)
    Serializer.Save<T>(T, BinaryFormatter, Stream, SerializerCompression)
    Serializer.Save<T>(T, String)
    Serializer.Save<T>(T, String, SerializerCompression)
    Serializer.Save<T>(T, out Byte[], SerializerCompression)
    Matrix.Concatenate<T>(T, T[])
    Back to top Copyright © MARS GROUP.
    HAW Hamburg