This commit is contained in:
git 2024-10-08 13:42:11 +03:00
parent 379bd232a1
commit 12d34f5c88
152 changed files with 8284 additions and 0 deletions

Binary file not shown.

Binary file not shown.

BIN
.vs/MatrixSol/v17/.suo Normal file

Binary file not shown.

View File

@ -0,0 +1,71 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|c:\\users\\hackaton\\source\\repos\\matrixsolution\\matrixsol\\matrixproject.test\\matrixproject.test.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|",
"RelativeMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|solutionrelative:matrixproject.test\\matrixproject.test.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|"
},
{
"AbsoluteMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|c:\\users\\hackaton\\source\\repos\\matrixsolution\\matrixsol\\matrixproject.test\\matrixtest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|solutionrelative:matrixproject.test\\matrixtest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{E812BC68-6D94-4469-B05B-ADCA58D74C56}|MatrixProject\\MatrixProject.csproj|c:\\users\\hackaton\\source\\repos\\matrixsolution\\matrixsol\\matrixproject\\matrix.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E812BC68-6D94-4469-B05B-ADCA58D74C56}|MatrixProject\\MatrixProject.csproj|solutionrelative:matrixproject\\matrix.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MatrixProject.Test",
"DocumentMoniker": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixProject.Test.csproj",
"RelativeDocumentMoniker": "MatrixProject.Test\\MatrixProject.Test.csproj",
"ToolTip": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixProject.Test.csproj",
"RelativeToolTip": "MatrixProject.Test\\MatrixProject.Test.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2024-10-08T07:03:47.001Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "MatrixTest.cs",
"DocumentMoniker": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixTest.cs",
"RelativeDocumentMoniker": "MatrixProject.Test\\MatrixTest.cs",
"ToolTip": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixTest.cs*",
"RelativeToolTip": "MatrixProject.Test\\MatrixTest.cs*",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAZAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-08T06:41:24.991Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Matrix.cs",
"DocumentMoniker": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject\\Matrix.cs",
"RelativeDocumentMoniker": "MatrixProject\\Matrix.cs",
"ToolTip": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject\\Matrix.cs*",
"RelativeToolTip": "MatrixProject\\Matrix.cs*",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABgAAAAIAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-08T06:36:26.85Z",
"EditorCaption": ""
}
]
}
]
}
]
}

View File

@ -0,0 +1,71 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|c:\\users\\hackaton\\source\\repos\\matrixsolution\\matrixsol\\matrixproject.test\\matrixtest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|solutionrelative:matrixproject.test\\matrixtest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{E812BC68-6D94-4469-B05B-ADCA58D74C56}|MatrixProject\\MatrixProject.csproj|c:\\users\\hackaton\\source\\repos\\matrixsolution\\matrixsol\\matrixproject\\matrix.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{E812BC68-6D94-4469-B05B-ADCA58D74C56}|MatrixProject\\MatrixProject.csproj|solutionrelative:matrixproject\\matrix.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|c:\\users\\hackaton\\source\\repos\\matrixsolution\\matrixsol\\matrixproject.test\\matrixproject.test.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|",
"RelativeMoniker": "D:0:0:{67C8B376-25F3-481A-8684-66E651A0461B}|MatrixProject.Test\\MatrixProject.Test.csproj|solutionrelative:matrixproject.test\\matrixproject.test.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 1,
"Children": [
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MatrixProject.Test",
"DocumentMoniker": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixProject.Test.csproj",
"RelativeDocumentMoniker": "MatrixProject.Test\\MatrixProject.Test.csproj",
"ToolTip": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixProject.Test.csproj",
"RelativeToolTip": "MatrixProject.Test\\MatrixProject.Test.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2024-10-08T07:03:47.001Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MatrixTest.cs",
"DocumentMoniker": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixTest.cs",
"RelativeDocumentMoniker": "MatrixProject.Test\\MatrixTest.cs",
"ToolTip": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject.Test\\MatrixTest.cs",
"RelativeToolTip": "MatrixProject.Test\\MatrixTest.cs",
"ViewState": "AgIAABcAAAAAAAAAAAAAABsAAAA0AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-08T06:41:24.991Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "Matrix.cs",
"DocumentMoniker": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject\\Matrix.cs",
"RelativeDocumentMoniker": "MatrixProject\\Matrix.cs",
"ToolTip": "C:\\Users\\Hackaton\\source\\repos\\MatrixSolution\\MatrixSol\\MatrixProject\\Matrix.cs",
"RelativeToolTip": "MatrixProject\\Matrix.cs",
"ViewState": "AgIAABYAAAAAAAAAAAAqwAsAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-08T06:36:26.85Z",
"EditorCaption": ""
}
]
}
]
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MatrixProject\MatrixProject.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,56 @@
namespace MatrixProject.Test;
public class MatrixTest
{
[InlineData(10)]
[InlineData(5)]
[InlineData(2)]
[InlineData(3)]
[Theory]
public void CheckRowsBeforeInitMatrixWithRows(int size)
{
Matrix matrix = new Matrix(size);
Assert.Equal(size, matrix.Rows);
Assert.Equal(size, matrix.Columns);
}
[Fact]
public void CheckColumnsBeforeInitMatrix()
{
Matrix matrix = new Matrix();
Assert.Equal(5, matrix.Columns);
}
[Fact]
public void CheckFillMatrixInDefaultConstructor() {
Matrix matrix = new Matrix();
double[,] testMatrix = new double[,] {
{ 1, 1, 1, 1, 1},
{ 1, 1, 1, 1, 1},
{ 1, 1, 1, 1, 1},
{ 1, 1, 1, 1, 1},
{ 1, 1, 1, 1, 1}
};
Assert.True(EqualsTwoDimArray(testMatrix, matrix));
}
private bool EqualsTwoDimArray(double[,] testMatrix, Matrix matrix) {
if(testMatrix.GetLength(0) != matrix.Rows ||
testMatrix.GetLength(1) != matrix.Columns) return false;
for (int i = 0; i < matrix.Rows; i++)
{
for (int j = 0; j < matrix.Columns; j++)
{
if (testMatrix[i, j] != matrix[i, j]) return false;
}
}
return true;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More