From 363793d9cb933b1d5ece15e03153ccfceb1ff41b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 21 Nov 2012 15:51:54 +0200 Subject: [PATCH] Add new interface: IStorageIndexer Signed-off-by: Alexander Karatarakis --- .../Storage/Indexers/IStorageIndexer.cs | 28 +++++++++++++++++++ src/Numerics/Numerics.csproj | 4 +++ 2 files changed, 32 insertions(+) create mode 100644 src/Numerics/LinearAlgebra/Storage/Indexers/IStorageIndexer.cs diff --git a/src/Numerics/LinearAlgebra/Storage/Indexers/IStorageIndexer.cs b/src/Numerics/LinearAlgebra/Storage/Indexers/IStorageIndexer.cs new file mode 100644 index 00000000..7b86b5fc --- /dev/null +++ b/src/Numerics/LinearAlgebra/Storage/Indexers/IStorageIndexer.cs @@ -0,0 +1,28 @@ +namespace MathNet.Numerics.LinearAlgebra.Storage.Indexers +{ + /// + /// Abstract class that defines common features for all storage schemes. + /// + public interface IStorageIndexer + { + /// + /// Retrieves the index of the requested element without parameter checking. + /// + /// The row of the element. + /// + /// The column of the element. + /// + /// The requested index. + /// + int IndexOf(int row, int column); + + /// + /// Retrieves the index of the requested diagonal element without parameter checking. + /// + /// The row=column of the diagonal element. + /// + /// The requested index. + /// + int IndexOfDiagonal(int row); + } +} diff --git a/src/Numerics/Numerics.csproj b/src/Numerics/Numerics.csproj index 18d2fdbb..36973819 100644 --- a/src/Numerics/Numerics.csproj +++ b/src/Numerics/Numerics.csproj @@ -141,6 +141,7 @@ + @@ -480,6 +481,9 @@ + + +