File size: 1,580 Bytes
b1b3bae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#region Copyright © 2009, De Santiago-Castillo JA. All rights reserved.

//Copyright © 2009 Jose Antonio De Santiago-Castillo 
//E-mail:JAntonioDeSantiago@gmail.com
//Web: www.DotNumerics.com
//
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace DotNumerics.LinearAlgebra
{
    /// <summary>
    /// Interface for a Matrix
    /// </summary>
    public interface IMatrix<T>
    {

        /// <summary>
        /// Returns the number of rows.
        /// </summary>
        int RowCount
        {
            get;
        }

        /// <summary>
        /// Returns the number of columns.
        /// </summary>
        int ColumnCount
        {
            get;
        }

        /// <summary>
        /// Gets or set the value of a element of this Matrix.
        /// </summary>
        /// <param name="row">The row value (zero-based).</param>
        /// <param name="column">The column value (zero-based).</param>
        /// <returns>The Matrix element at (row, column).</returns>
        T this[int row, int column]
        {
            get;
            set;
        }

        /// <summary>
        ///  Copy the elements of this matrix to a rectangular array.
        /// </summary>
        /// <returns>A rectangular array.</returns>
        T[,] CopyToArray();

        /// <summary>
        ///  Copy the elements of this matrix to a jagged array.
        /// </summary>
        /// <returns>A jagged array</returns>
        T[][] CopyToJaggedArray();
    }
}