<commit_before>﻿//  *************************************************************
// <copyright file="Matrix.cs" company="${Company}">
//     Copyright (c)  2014 andy. All rights reserved.
// </copyright>
// <author> andy</author>
// <email><EMAIL></email>
// *************************************************************
//   1.0.0  15 / 7 / 2014 Created the Class
// *************************************************************

namespace Math.LinearAlgebra
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    using Math.Base;

    /// <summary>
    /// Creates a matrix. 
    /// The elements of the matrix are of the struct T.
    /// </summary>
    /// <typeparam name="T">The first type parameter.</typeparam>
    /// <typeparam name="TStruct">The underlying structure.</typeparam>
    public class Matrix<T, TStruct> : IMatrix<T, TStruct>, IEquatable<Matrix<T, TStruct>> 
        where TStruct : IStructure<T>, new()
    {
        #region FIELDS

        readonly List<List<T>> _entries;

        #endregion

        #region ctor

        /// <summary>
        /// Initialises a new instance of the <see cref="Matrix{T, TStruct}"/> class.
        /// The matrix is squared.
        /// </summary>
        /// <param name="dimension">The Dimension of the matrix.</param>
        public Matrix(UInt32 dimension)
        {
            _entries = new List<List<T>>();
            for (var i = 0; i < dimension; i++)
            {
                _entries.Add(new List<T>(new T[dimension]));
            }
                
            RowDimension = dimension;
            ColumnDimension = dimension;
        }

        /// <summary>
        /// Initialises a new instance of the <see cref="Matrix{T, TStruct}"/> class.
        /// </summary>
        /// <param name="rowDimension">Row dimension.</param>
        /// <param name="columnDimension">Column dimension.</param>
        public Matrix(UInt32 rowDimension, UInt32 columnDimension)
        {
            _entries = new List<List<T>>();
            for (var i = 0; i < columnDimension; i++)
            {
                _entries.Add(new List<T>(new T[rowDimension]));
            }
                
            RowDimension = rowDimension;
            ColumnDimension = columnDimension;<commit_msg>changed initialising for squared matrices<commit_after>﻿//  *************************************************************
// <copyright file="Matrix.cs" company="${Company}">
//     Copyright (c)  2014 andy. All rights reserved.
// </copyright>
// <author> andy</author>
// <email><EMAIL></email>
// *************************************************************
//   1.0.0  15 / 7 / 2014 Created the Class
// *************************************************************

namespace Math.LinearAlgebra
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    using Math.Base;

    /// <summary>
    /// Creates a matrix. 
    /// The elements of the matrix are of the struct T.
    /// </summary>
    /// <typeparam name="T">The first type parameter.</typeparam>
    /// <typeparam name="TStruct">The underlying structure.</typeparam>
    public class Matrix<T, TStruct> : IMatrix<T, TStruct>, IEquatable<Matrix<T, TStruct>> 
        where TStruct : IStructure<T>, new()
    {
        #region FIELDS

        readonly List<List<T>> _entries;

        #endregion

        #region ctor

        /// <summary>
        /// Initialises a new instance of the <see cref="Matrix{T, TStruct}"/> class.
        /// The matrix is squared.
        /// </summary>
        /// <param name="dimension">The Dimension of the matrix.</param>
        public Matrix(UInt32 dimension)
            : this(dimension, dimension)
        {

        }

        /// <summary>
        /// Initialises a new instance of the <see cref="Matrix{T, TStruct}"/> class.
        /// </summary>
        /// <param name="rowDimension">Row dimension.</param>
        /// <param name="columnDimension">Column dimension.</param>
        public Matrix(UInt32 rowDimension, UInt32 columnDimension)
        {
            _entries = new List<List<T>>();
            for (var i = 0; i < columnDimension; i++)
            {
                _entries.Add(new List<T>(new T[rowDimension]));
            }
                
            RowDimension = rowDimension;
            ColumnDimension = columnDimension;
{'fraction_non_alphanumeric': 0.21319333485505593, 'fraction_numerical': 0.00981511070531842, 'mean_word_length': 2.163898916967509, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 76, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '528316', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1134, 'n_words': 304}