Browse Source

Add new interface: IStorageIndexer

Signed-off-by: Alexander Karatarakis <alex@karatarakis.com>
pull/59/head
Alexander Karatarakis 14 years ago
parent
commit
363793d9cb
  1. 28
      src/Numerics/LinearAlgebra/Storage/Indexers/IStorageIndexer.cs
  2. 4
      src/Numerics/Numerics.csproj

28
src/Numerics/LinearAlgebra/Storage/Indexers/IStorageIndexer.cs

@ -0,0 +1,28 @@
namespace MathNet.Numerics.LinearAlgebra.Storage.Indexers
{
/// <summary>
/// Abstract class that defines common features for all storage schemes.
/// </summary>
public interface IStorageIndexer
{
/// <summary>
/// Retrieves the index of the requested element without parameter checking.
/// </summary><param name="row">
/// The row of the element.
/// </param><param name="column">
/// The column of the element.
/// </param><returns>
/// The requested index.
/// </returns>
int IndexOf(int row, int column);
/// <summary>
/// Retrieves the index of the requested diagonal element without parameter checking.
/// </summary><param name="row">
/// The row=column of the diagonal element.
/// </param><returns>
/// The requested index.
/// </returns>
int IndexOfDiagonal(int row);
}
}

4
src/Numerics/Numerics.csproj

@ -141,6 +141,7 @@
<Compile Include="Distributions\Multivariate\MatrixNormal.cs" />
<Compile Include="Distributions\Multivariate\Wishart.cs" />
<Compile Include="LinearAlgebra\Storage\DenseVectorStorage.cs" />
<Compile Include="LinearAlgebra\Storage\Indexers\IStorageIndexer.cs" />
<Compile Include="LinearAlgebra\Storage\MatrixStorage.Validation.cs" />
<Compile Include="LinearAlgebra\Complex32\ExtensionMethods.cs" />
<Compile Include="LinearAlgebra\Complex32\Factorization\Cholesky.cs" />
@ -480,6 +481,9 @@
<ItemGroup>
<None Include="MathNet.Numerics.snk" />
</ItemGroup>
<ItemGroup>
<Folder Include="LinearAlgebra\Storage\Indexers\Static\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>

Loading…
Cancel
Save