2727// OTHER DEALINGS IN THE SOFTWARE.
2828// </copyright>
2929
30+ using MathNet . Numerics . LinearAlgebra . Storage ;
31+ using MathNet . Numerics . Threading ;
3032using System ;
3133using System . Collections . Generic ;
34+ using System . Diagnostics ;
3235using System . Linq ;
3336using System . Runtime ;
3437using System . Runtime . CompilerServices ;
35- using MathNet . Numerics . LinearAlgebra . Storage ;
36- using MathNet . Numerics . Threading ;
3738
3839namespace MathNet . Numerics . LinearAlgebra
3940{
@@ -42,6 +43,7 @@ namespace MathNet.Numerics.LinearAlgebra
4243 /// </summary>
4344 /// <typeparam name="T">Supported data types are <c>double</c>, <c>single</c>, <see cref="Complex"/>, and <see cref="Complex32"/>.</typeparam>
4445 [ Serializable ]
46+ [ DebuggerTypeProxy ( typeof ( MatrixDebuggingView < > ) ) ]
4547 public abstract partial class Matrix < T > : IFormattable , IEquatable < Matrix < T > > , ICloneable
4648 where T : struct , IEquatable < T > , IFormattable
4749 {
@@ -1879,4 +1881,18 @@ public bool ForAll2<TOther>(Func<T, TOther, bool> predicate, Matrix<TOther> othe
18791881 return Storage . Find2 ( other . Storage , ( x , y ) => ! predicate ( x , y ) , zeros ) == null ;
18801882 }
18811883 }
1884+
1885+ internal class MatrixDebuggingView < T >
1886+ where T : struct , IEquatable < T > , IFormattable
1887+ {
1888+ private readonly Matrix < T > _matrix ;
1889+
1890+ public MatrixDebuggingView ( Matrix < T > matrix )
1891+ {
1892+ _matrix = matrix ;
1893+ }
1894+
1895+ [ DebuggerBrowsable ( DebuggerBrowsableState . RootHidden ) ]
1896+ public T [ , ] Items => _matrix . ToArray ( ) ;
1897+ }
18821898}
0 commit comments