Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference

Skip Navigation LinksHome»Documentation»Reference»Extreme.Collections»Array2D(T) Structure

Array2DT Structure

Extreme Optimization Numerical Libraries for .NET Professional
Represents a 2-dimensional array stored in a linear array.

Namespace:  Extreme.Collections
Assembly:  Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
Syntax

C#
VB
C++
F#
Copy
public struct Array2D<T>
Public Structure Array2D(Of T)
generic<typename T>
public value class Array2D
[<SealedAttribute>]
type Array2D<'T> =  struct end

Type Parameters

T
The element type of the array.

The Array2DT type exposes the following members.

Constructors

  NameDescription
Public methodArray2DT(Int32, Int32)
Constructs a new array.
Public methodArray2DT(T, Int32, Int32)
Constructs a new array.
Public methodArray2DT(Int32, Int32, Boolean)
Constructs a new array.
Top
Properties

  NameDescription
Public propertyItem
Gets or sets the element at the specified position.
Public propertyLeadingDimension
Gets the number of elements between the start of successive columns.
Public propertyOffset
Gets the offset of the first element in the storage array.
Public propertyValues
Gets the storage array.
Top
Methods

  NameDescription
Public methodAsArray1D
Returns the array as an array with offset.
Public methodAsArraySlice
Returns the array as an array slice with unit leadingDimension.
Public methodClear
Sets the specified number of elements to their default value.
Public methodClone
Creates a shallow copy of the array.
Public methodColumn
Returns an array with offset that corresponds to a column in the array.
Public methodColumnFrom
Returns an array with offset that corresponds to a column in the array that starts at the specified position.
Public methodStatic memberCreateEmpty
Creates an empty 2D array with the specified leading dimension.
Public methodDiagonal
Returns an array slice that corresponds to a column in the array.
Public methodEquals
Checks if an object is equal to this instance.
(Overrides ValueTypeEquals(Object).)
Public methodFrom(Int32)
Returns the array starting at the specified position on the main diagonal.
Public methodFrom(Int32, Int32)
Returns the array starting at the specified position.
Public methodFrom(Int32, Int32, Int32)
Returns the array starting at the specified position with the specified leading dimension.
Public methodGetHashCode
Gets a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetIndex
Gets the index in the storage array of the element at the specified position.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRow
Returns the array slice that corresponds to a row in the array.
Public methodRowFrom
Returns the array slice that corresponds to a row in the array that starts at the specified position.
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Public methodTranspose
Transposes the elements of the 2D array and returns the result.
Public methodTransposeTo
Transposes the elements of the 2D array and returns the result in the specified array.
Public methodVectorFrom
Returns an array slice with a specified stride that starts at the specified position.
Public methodWithLeadingDimension
Returns the array at the current position with the specified leading dimension.
Top
Operators

  NameDescription
Public operatorStatic memberEquality
Checks whether two 2D arrays are equal.
Public operatorStatic memberInequality
Checks whether two 2D arrays are not equal.
Top
Fields

  NameDescription
Public fieldStatic memberEmpty
Returns an empty 2D array.
Top
Remarks

Use the Array2DT structure to represent two-dimensional arrays in a format suitable for calling external libraries like BLAS and LAPACK. The two-dimensional array is stored in a linear array. Columns are stored in contuguous blocks with a fixed number of elements between them.

Array2DT objects do not have a size. The actual dimensions must be supplied separately.

Caution note Caution
The Array2DT type is meant for performance-critical code. No bounds checks or other validation is performed.
See Also

Reference

Extreme.Collections Namespace

Copyright (c) 2004-2023 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2023, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.