diff --git a/src/Mathematics.NET/LinearAlgebra/Abstractions/IThreeDimensionalArrayRepresentable.cs b/src/Mathematics.NET/LinearAlgebra/Abstractions/IThreeDimensionalArrayRepresentable.cs new file mode 100644 index 00000000..dbaaae9a --- /dev/null +++ b/src/Mathematics.NET/LinearAlgebra/Abstractions/IThreeDimensionalArrayRepresentable.cs @@ -0,0 +1,58 @@ +// +// Mathematics.NET +// https://github.com/HamletTanyavong/Mathematics.NET +// +// MIT License +// +// Copyright (c) 2023 Hamlet Tanyavong +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +namespace Mathematics.NET.LinearAlgebra.Abstractions; + +/// Defines support for mathematical objects that can be represented by three-dimensional arrays +/// The type that implements the interface +/// A type that implements +public interface IThreeDimensionalArrayRepresentable + : IArrayRepresentable, + IFormattable + where T : IThreeDimensionalArrayRepresentable + where U : IComplex +{ + /// The number of elements in the first dimension of the array + static abstract int E1Components { get; } + + /// The number of elements in the second dimension of the array + static abstract int E2Components { get; } + + /// The number of elements in the third dimension of the array + static abstract int E3Components { get; } + + /// Convert the matrix into a 3D array. + /// A 3D array + U[,,] ToArray3D(); + + /// Get the element at the specified indices. + /// The first index + /// The second index + /// The third index + /// The element at the specified indices + U this[int i, int j, int k] { get; set; } +}