Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
3a8ae9d
ADRNV Aug 3, 2021
3474214
ADRNV Aug 6, 2021
cd1da02
ADRNV Aug 7, 2021
06e0790
ADRNV Aug 7, 2021
5daba42
ADRNV Aug 7, 2021
d9a6c42
ADRNV Aug 7, 2021
ede6fa9
ADRNV Aug 7, 2021
053d96c
ADRNV Aug 7, 2021
46bed37
ADRNV Aug 7, 2021
82630c8
ADRNV Aug 7, 2021
0467e9d
ADRNV Aug 10, 2021
c32c45c
ADRNV Aug 10, 2021
9a5e6f6
ADRNV Aug 10, 2021
f5cfbeb
ADRNV Aug 11, 2021
4fe5f5c
ADRNV Aug 13, 2021
9f68e6d
ADRNV Aug 13, 2021
d989375
ADRNV Aug 14, 2021
d452f7f
ADRNV Aug 14, 2021
0402263
ADRNV Aug 14, 2021
4e9fbd3
ADRNV Aug 18, 2021
6c7d268
ADRNV Aug 19, 2021
9dbb712
ADRNV Aug 19, 2021
23a6733
Merge branch 'WithErarchy' of https://github.com/Lamer0/ExtendentMath…
ADRNV Aug 19, 2021
01f6611
ADRNV Aug 22, 2021
2a1c5d4
ADRNV Aug 22, 2021
2f734b2
ADRNV Aug 22, 2021
675ca77
ADRNV Aug 22, 2021
563ae48
ADRNV Aug 22, 2021
e1e15a0
ADRNV Aug 22, 2021
1bb5708
ADRNV Aug 27, 2021
58436b7
ADRNV Aug 28, 2021
01740c6
ADRNV Aug 28, 2021
99082cd
Merge branch 'WithErarchy' of https://github.com/Lamer0/ExtendentMath…
ADRNV Aug 28, 2021
b084cc1
ADRNV Aug 28, 2021
cc7137a
ADRNV Aug 29, 2021
8ed5bb3
ADRNV Aug 29, 2021
c67e9b7
ADRNV Aug 29, 2021
14967e6
ADRNV Aug 29, 2021
9bf9d3b
ADRNV Sep 18, 2021
75f97be
ADRNV Sep 24, 2021
7d6dde1
ADRNV Oct 16, 2021
ed36323
ADRNV Oct 16, 2021
876667b
ADRNV Oct 16, 2021
e2acd34
ADRNV Oct 16, 2021
13d4254
ADRNV Nov 6, 2021
0552fb8
ADRNV Nov 7, 2021
5f82f4c
Add Extension
ADRNV Nov 19, 2021
09050e9
ADRNV Nov 27, 2021
8824447
ADRNV Nov 27, 2021
3cf580b
ADRNV Nov 27, 2021
f458de6
ADRNV Dec 18, 2021
377e19b
ADRNV Dec 18, 2021
d3fff53
ADRNV Dec 18, 2021
80b4ed5
ADRNV Dec 18, 2021
97450bd
ADRNV Jan 2, 2022
f32675e
ADRNV Jan 2, 2022
3866a2f
ADRNV Jan 2, 2022
1b1779e
ADRNV Jan 5, 2022
3ce2acf
ADRNV Jan 6, 2022
3bc1017
ADRNV Jan 6, 2022
f46a3ef
ADRNV Jan 7, 2022
01d422e
ADRNV Jan 7, 2022
ed6c265
ADRNV Jan 7, 2022
9d56368
ADRNV Jan 8, 2022
347af28
ADRNV Jan 9, 2022
da18f82
Implements IEnumerable in BaseCellsCollection
ADRNV Jan 21, 2022
c610ab6
ADRNV Jan 29, 2022
933bfd9
Merge branch 'WithErarchy' of https://github.com/Lamer0/ExtendentMath…
ADRNV Jan 29, 2022
e6eb7e4
Добавлен метод-расширение нахождения минора
ADRNV Feb 5, 2022
4a177bc
Тесты и библиотека в одном репозитории
ADRNV Mar 18, 2022
f77a619
Теперь тесты работают нормально
ADRNV Mar 18, 2022
e5bdc3b
Transponate() сделан методом-расширением
ADRNV Mar 18, 2022
25212c9
Добавлен метод инициализаци значений матрицы, исправен метод ForEach
ADRNV Mar 18, 2022
7510ccc
Тестирование умножения, транспонирования, общий рефакторинг
ADRNV Mar 21, 2022
ee832d1
Тестирование умножения, транспонирования, общий рефакторинг
ADRNV Mar 21, 2022
5f4e87f
ADRNV Mar 22, 2022
ba76fef
Update .NET Framework version
ADRNV Oct 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Exceptions/ColumnZeroSizeException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;


namespace MathExtended.Exceptions
{
/// <summary>
/// Появляется при попытке создать
/// столбец с нулевыми размерами
/// </summary>
public class ColumnZeroSizeException : Exception
{
private string _message = "Columns can not be zero size";

/// <summary>
/// Сообщение исключения
/// </summary>
public override string Message => _message;

}
}
20 changes: 20 additions & 0 deletions Exceptions/ColumnsOfDifferentSizesException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

namespace MathExtended.Exceptions
{
/// <summary>
/// Появляется при попытке сложить/вычесть строки разных размеров
/// </summary>
public class ColumnsOfDifferentSizesException : Exception
{
private string _message = "Columns must be the same sizes.";

/// <summary>
/// Сообщение исключения
/// </summary>
public override string Message
{
get => _message;
}
}
}
11 changes: 3 additions & 8 deletions Exceptions/MatrixDifferentSizeException.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MathExtended.Exceptions
{
Expand All @@ -12,12 +8,11 @@ namespace MathExtended.Exceptions
public class MatrixDifferentSizeException : Exception
{
private string message = "Matrices must be the same size";

/// <summary>
/// Сообщение исключения
/// </summary>
public override string Message
{
get => message;
}
public override string Message => message;

}
}
19 changes: 19 additions & 0 deletions Exceptions/MatrixInvalidSizesException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace MathExtended.Exceptions
{
/// <summary>
/// Возникает при попытке создать матрицу
/// с нулевыми размерами
/// </summary>
public class MatrixInvalidSizesException : Exception
{
private string _message = "Matrices can not be zero or less zero size.";

/// <summary>
/// Сообщение исключения
/// </summary>
public override string Message => _message;

}
}
19 changes: 19 additions & 0 deletions Exceptions/RowZeroSizeException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;


namespace MathExtended.Exceptions
{
/// <summary>
/// Появляется при попытке создать строку с нулевой длиной
/// </summary>
public class RowZeroSizeException : Exception
{
private string _message = "Rows can not be zero size.";

/// <summary>
/// Сообщение исключения
/// </summary>
public override string Message => _message;

}
}
20 changes: 20 additions & 0 deletions Exceptions/RowsOfDifferentSizesException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

namespace MathExtended.Exceptions
{
/// <summary>
/// Появляется при попытке сложить/вычесть строки разных размеров
/// </summary>
public class RowsOfDifferentSizesException : Exception
{
private string _message = "Rows must be the same sizes.";

/// <summary>
/// Сообщение исключения
/// </summary>
public override string Message
{
get => _message;
}
}
}
5 changes: 1 addition & 4 deletions Exceptions/TheNumberOfRowsAndColumnsIsDifferentException.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace MathExtended.Exceptions
{
Expand Down
18 changes: 18 additions & 0 deletions Exceptions/VectorsDifferentSizeException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;

namespace MathExtended.Exceptions
{
/// <summary>
/// Возникает при попытке операции
/// над вектор строками/столбцами разных размеров
/// </summary>
public class VectorsDifferentSizeException : Exception
{
private string _message = "Vector row/column of different sizes";

/// <summary>
/// Сообщение исключения
/// </summary>
public override string Message => _message;
}
}
43 changes: 43 additions & 0 deletions ExtendentRandom.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using System;

namespace MathExtended
{
/// <summary>
/// Улучшенная версия Random
/// </summary>
public class ExtendentRandom : Random
{
/// <summary>
/// Генерирует случайное число типа <typeparamref name="T"/>
/// в заданных границах
/// </summary>
/// <typeparam name="T">Числовой тип</typeparam>
/// <param name="minValue">Нижняя граница</param>
/// <param name="maxValue">Верхняя граница</param>
/// <returns><typeparamref name="T"/> Число</returns>
public T Next<T>(in T minValue, in T maxValue) where T : IComparable, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
{
if ((dynamic)minValue < maxValue)
{
var minValueCasted = (double)(dynamic)minValue;
var maxValueCasted = (double)(dynamic)maxValue;
var random = base.NextDouble();
return (T)(dynamic)((random * minValueCasted) + (1 - random) * maxValueCasted);//System.EngineError (Ненормальное потребление памяти)
}
else
{
throw new ArgumentOutOfRangeException();
}
}

/// <summary>
/// Генерирует случайное число типа <typeparamref name="T"/>
/// </summary>
/// <typeparam name="T">Числовой тип</typeparam>
/// <returns><typeparamref name="T"/> Число</returns>
public T Next<T>() where T : IComparable, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
{
return (T)(dynamic)(base.Next() + base.NextDouble());
}
}
}
42 changes: 42 additions & 0 deletions Interfaces/IMatrix.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using MathExtended.Matrices.Structures.CellsCollections;
using System;
using System.Collections.Generic;

namespace MathExtended.Interfaces
{
/// <summary>
/// Определяет основную структуру матрицы
/// </summary>
/// <typeparam name="T">Числовой тип</typeparam>
public interface IMatrix<T> : IEnumerable<T>, IEnumerator<T> where T : IComparable, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
{
/// <summary>
/// Главная диагональ
/// </summary>
MainDiagonal<T> MainDiagonal { get; }

/// <summary>
/// Количество строк
/// </summary>
int RowsCount { get; }

/// <summary>
/// Количество столбцов
/// </summary>
int ColumnsCount { get; }

/// <summary>
/// Индесатор матрицы, получает ячейку в соответсвии с ее адресом в матрице
/// </summary>
/// <param name="row">Индекс строки</param>
/// <param name="column">Индекс столбца</param>
/// <returns><typeparamref name="T"/> число по индексу</returns>
T this[int row, int column]
{
get;
set;
}


}
}
Binary file added MathExtended.1.0.1.1.nupkg
Binary file not shown.
40 changes: 38 additions & 2 deletions MathExtended.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MathExtended</RootNamespace>
<AssemblyName>MathExtended</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -31,6 +32,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="JTForks.MiscUtil, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\JTForks.MiscUtil.1.285.0\lib\netstandard1.0\JTForks.MiscUtil.dll</HintPath>
Expand All @@ -46,6 +50,9 @@
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Console, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Console.4.0.0\lib\net46\System.Console.dll</HintPath>
Expand Down Expand Up @@ -102,6 +109,9 @@
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Net.Http.4.1.0\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
Expand All @@ -113,6 +123,9 @@
<Private>True</Private>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Reflection.4.1.0\lib\net462\System.Reflection.dll</HintPath>
<Private>True</Private>
Expand All @@ -126,6 +139,9 @@
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.Extensions.4.1.0\lib\net462\System.Runtime.Extensions.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -178,14 +194,34 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Exceptions\VectorsDifferentSizeException.cs" />
<Compile Include="Matrices\Extensions\MatrixExtensions.cs" />
<Compile Include="Matrices\Structures\CellsCollections\BaseCellsCollection.cs" />
<Compile Include="Matrices\BaseMatrix.cs" />
<Compile Include="Matrices\Structures\CellsCollections\BaseReadOnlyCellsCollection.cs" />
<Compile Include="Matrices\Structures\CellsCollections\MainDiagonal.cs" />
<Compile Include="Matrices\Structures\CellsCollections\VectorSelector.cs" />
<Compile Include="Matrices\Structures\Columns\Column.cs" />
<Compile Include="Exceptions\ColumnsOfDifferentSizesException.cs" />
<Compile Include="Exceptions\ColumnZeroSizeException.cs" />
<Compile Include="Exceptions\MatrixDifferentSizeException.cs" />
<Compile Include="Exceptions\MatrixInvalidSizesException.cs" />
<Compile Include="Exceptions\RowsOfDifferentSizesException.cs" />
<Compile Include="Exceptions\RowZeroSizeException.cs" />
<Compile Include="Exceptions\TheNumberOfRowsAndColumnsIsDifferentException.cs" />
<Compile Include="Matrix.cs" />
<Compile Include="ExtendentRandom.cs" />
<Compile Include="Interfaces\IMatrix.cs" />
<Compile Include="Matrices\Matrix.cs" />
<Compile Include="Matrices\Structures\Rows\ReadOnlyRow.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MathExtendent.cs" />
<Compile Include="Matrices\Structures\Columns\ReadOnlyColumn.cs" />
<Compile Include="Matrices\Structures\Rows\Row.cs" />
<Compile Include="TabulateResult.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
18 changes: 18 additions & 0 deletions MathExtended.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<id>$id$</id>
<version>1.0.1.1</version>
<title>MathExtendent</title>
<authors>Lamer0</authors>
<language>C#</language>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/Lamer0/ExtendentMath</projectUrl>
<summary>MathExtended</summary>
<description>A math library that will include work with matrices, some trigonometric functions of which are not in Math</description>
<releaseNotes></releaseNotes>
<copyright>https://github.com/Lamer0/ExtendentMath</copyright>
<tags>Release</tags>
</metadata>
</package>
10 changes: 8 additions & 2 deletions MathExtended.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
# Visual Studio Version 17
VisualStudioVersion = 17.1.32210.238
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MathExtended", "MathExtended.csproj", "{CCDF7FC9-1928-43E4-9DF2-874E5A2538E3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MathExtendentTests", "MathExtendentTests\MathExtendentTests.csproj", "{3F8BB5A8-CCE7-413B-A94B-EA13CF2BF305}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +17,10 @@ Global
{CCDF7FC9-1928-43E4-9DF2-874E5A2538E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CCDF7FC9-1928-43E4-9DF2-874E5A2538E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CCDF7FC9-1928-43E4-9DF2-874E5A2538E3}.Release|Any CPU.Build.0 = Release|Any CPU
{3F8BB5A8-CCE7-413B-A94B-EA13CF2BF305}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F8BB5A8-CCE7-413B-A94B-EA13CF2BF305}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F8BB5A8-CCE7-413B-A94B-EA13CF2BF305}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F8BB5A8-CCE7-413B-A94B-EA13CF2BF305}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading