Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
406 changes: 397 additions & 9 deletions .gitignore

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Benchmarks/Benchmarks.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<Compile Include="Program.fs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\Library\Library.fsproj" />
<ItemGroup>
<ProjectReference Include="..\src\Sortings\Sortings.fsproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
</ItemGroup>

</Project>
File renamed without changes.
Binary file added GraphicsAndStatistics/presentation.pdf
Binary file not shown.
95 changes: 84 additions & 11 deletions HomeWork.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,34 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{00DFC406-0A95-4C11-8BF2-4FD28C28061D}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Library", "src\Library\Library.fsproj", "{B853FD9B-45DA-4524-8E5D-9BDC24C29F63}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B4AC50D2-34AD-46DF-B39E-FBCC5D0653C6}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tests", "Tests\Tests.fsproj", "{8FFAF33E-03C8-4A55-84E1-C42E0C602625}"
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Functions", "src\Functions\Functions.fsproj", "{F793D6BB-E68A-473E-B11F-1D7888DF4D4A}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FunctionsT", "Tests\FunctionsT\FunctionsT.fsproj", "{66214A3F-2D3A-4A98-8A9E-25412278BABD}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Sortings", "src\Sortings\Sortings.fsproj", "{55D388AF-E9D9-4EC0-923A-0735BFD93CB8}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SortingsT", "Tests\SortingsT\SortingsT.fsproj", "{1D6CFA13-FD9D-4586-A463-1C023123E2CA}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Benchmarks", "Benchmarks\Benchmarks.fsproj", "{66023F5A-8456-4F66-9318-A0BFB68ED14A}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ImageProcessing", "src\ImageProcessing\ImageProcessing.fsproj", "{7B9D1692-F56C-43C7-92BA-2CDDE21A7D57}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "ImageProcessingT", "Tests\ImageProcessingT\ImageProcessingT.fsproj", "{EB2F699B-DE06-42EC-974A-A2C39E5C8D2A}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Trees", "src\Trees\Trees.fsproj", "{CAC5303C-D4CF-493E-94B4-4409BE7F2865}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TreesT", "Tests\TreesT\TreesT.fsproj", "{7E4032B2-27F7-4691-8474-5C57A97F5721}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "LineralAlgebra", "src\LineralAlgebra\LineralAlgebra.fsproj", "{C05FDC93-8EE3-442C-868A-031CE2A5F4E4}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "LineralAlgebraT", "Tests\LineralAlgebraT\LineralAlgebraT.fsproj", "{C42A6017-8A61-4469-8FCD-EEBF49198D80}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Graphs", "src\Graphs\Graphs.fsproj", "{CF32EADA-1A26-456B-AA5D-075444540057}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GraphsT", "Tests\GraphsT\GraphsT.fsproj", "{E39D15F4-AE96-42ED-957D-D335208D8BF9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -20,20 +42,71 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B853FD9B-45DA-4524-8E5D-9BDC24C29F63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B853FD9B-45DA-4524-8E5D-9BDC24C29F63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B853FD9B-45DA-4524-8E5D-9BDC24C29F63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B853FD9B-45DA-4524-8E5D-9BDC24C29F63}.Release|Any CPU.Build.0 = Release|Any CPU
{8FFAF33E-03C8-4A55-84E1-C42E0C602625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FFAF33E-03C8-4A55-84E1-C42E0C602625}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FFAF33E-03C8-4A55-84E1-C42E0C602625}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FFAF33E-03C8-4A55-84E1-C42E0C602625}.Release|Any CPU.Build.0 = Release|Any CPU
{F793D6BB-E68A-473E-B11F-1D7888DF4D4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F793D6BB-E68A-473E-B11F-1D7888DF4D4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F793D6BB-E68A-473E-B11F-1D7888DF4D4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F793D6BB-E68A-473E-B11F-1D7888DF4D4A}.Release|Any CPU.Build.0 = Release|Any CPU
{66214A3F-2D3A-4A98-8A9E-25412278BABD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66214A3F-2D3A-4A98-8A9E-25412278BABD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66214A3F-2D3A-4A98-8A9E-25412278BABD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66214A3F-2D3A-4A98-8A9E-25412278BABD}.Release|Any CPU.Build.0 = Release|Any CPU
{55D388AF-E9D9-4EC0-923A-0735BFD93CB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55D388AF-E9D9-4EC0-923A-0735BFD93CB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55D388AF-E9D9-4EC0-923A-0735BFD93CB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55D388AF-E9D9-4EC0-923A-0735BFD93CB8}.Release|Any CPU.Build.0 = Release|Any CPU
{1D6CFA13-FD9D-4586-A463-1C023123E2CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D6CFA13-FD9D-4586-A463-1C023123E2CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D6CFA13-FD9D-4586-A463-1C023123E2CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D6CFA13-FD9D-4586-A463-1C023123E2CA}.Release|Any CPU.Build.0 = Release|Any CPU
{66023F5A-8456-4F66-9318-A0BFB68ED14A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66023F5A-8456-4F66-9318-A0BFB68ED14A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66023F5A-8456-4F66-9318-A0BFB68ED14A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66023F5A-8456-4F66-9318-A0BFB68ED14A}.Release|Any CPU.Build.0 = Release|Any CPU
{7B9D1692-F56C-43C7-92BA-2CDDE21A7D57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B9D1692-F56C-43C7-92BA-2CDDE21A7D57}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B9D1692-F56C-43C7-92BA-2CDDE21A7D57}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B9D1692-F56C-43C7-92BA-2CDDE21A7D57}.Release|Any CPU.Build.0 = Release|Any CPU
{EB2F699B-DE06-42EC-974A-A2C39E5C8D2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB2F699B-DE06-42EC-974A-A2C39E5C8D2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB2F699B-DE06-42EC-974A-A2C39E5C8D2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB2F699B-DE06-42EC-974A-A2C39E5C8D2A}.Release|Any CPU.Build.0 = Release|Any CPU
{CAC5303C-D4CF-493E-94B4-4409BE7F2865}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAC5303C-D4CF-493E-94B4-4409BE7F2865}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAC5303C-D4CF-493E-94B4-4409BE7F2865}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CAC5303C-D4CF-493E-94B4-4409BE7F2865}.Release|Any CPU.Build.0 = Release|Any CPU
{7E4032B2-27F7-4691-8474-5C57A97F5721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7E4032B2-27F7-4691-8474-5C57A97F5721}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7E4032B2-27F7-4691-8474-5C57A97F5721}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7E4032B2-27F7-4691-8474-5C57A97F5721}.Release|Any CPU.Build.0 = Release|Any CPU
{C05FDC93-8EE3-442C-868A-031CE2A5F4E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C05FDC93-8EE3-442C-868A-031CE2A5F4E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C05FDC93-8EE3-442C-868A-031CE2A5F4E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C05FDC93-8EE3-442C-868A-031CE2A5F4E4}.Release|Any CPU.Build.0 = Release|Any CPU
{C42A6017-8A61-4469-8FCD-EEBF49198D80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C42A6017-8A61-4469-8FCD-EEBF49198D80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C42A6017-8A61-4469-8FCD-EEBF49198D80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C42A6017-8A61-4469-8FCD-EEBF49198D80}.Release|Any CPU.Build.0 = Release|Any CPU
{CF32EADA-1A26-456B-AA5D-075444540057}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF32EADA-1A26-456B-AA5D-075444540057}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF32EADA-1A26-456B-AA5D-075444540057}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF32EADA-1A26-456B-AA5D-075444540057}.Release|Any CPU.Build.0 = Release|Any CPU
{E39D15F4-AE96-42ED-957D-D335208D8BF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E39D15F4-AE96-42ED-957D-D335208D8BF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E39D15F4-AE96-42ED-957D-D335208D8BF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E39D15F4-AE96-42ED-957D-D335208D8BF9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B853FD9B-45DA-4524-8E5D-9BDC24C29F63} = {00DFC406-0A95-4C11-8BF2-4FD28C28061D}
{F793D6BB-E68A-473E-B11F-1D7888DF4D4A} = {00DFC406-0A95-4C11-8BF2-4FD28C28061D}
{66214A3F-2D3A-4A98-8A9E-25412278BABD} = {B4AC50D2-34AD-46DF-B39E-FBCC5D0653C6}
{55D388AF-E9D9-4EC0-923A-0735BFD93CB8} = {00DFC406-0A95-4C11-8BF2-4FD28C28061D}
{1D6CFA13-FD9D-4586-A463-1C023123E2CA} = {B4AC50D2-34AD-46DF-B39E-FBCC5D0653C6}
{7B9D1692-F56C-43C7-92BA-2CDDE21A7D57} = {00DFC406-0A95-4C11-8BF2-4FD28C28061D}
{EB2F699B-DE06-42EC-974A-A2C39E5C8D2A} = {B4AC50D2-34AD-46DF-B39E-FBCC5D0653C6}
{CAC5303C-D4CF-493E-94B4-4409BE7F2865} = {00DFC406-0A95-4C11-8BF2-4FD28C28061D}
{7E4032B2-27F7-4691-8474-5C57A97F5721} = {B4AC50D2-34AD-46DF-B39E-FBCC5D0653C6}
{C05FDC93-8EE3-442C-868A-031CE2A5F4E4} = {00DFC406-0A95-4C11-8BF2-4FD28C28061D}
{C42A6017-8A61-4469-8FCD-EEBF49198D80} = {B4AC50D2-34AD-46DF-B39E-FBCC5D0653C6}
{CF32EADA-1A26-456B-AA5D-075444540057} = {00DFC406-0A95-4C11-8BF2-4FD28C28061D}
{E39D15F4-AE96-42ED-957D-D335208D8BF9} = {B4AC50D2-34AD-46DF-B39E-FBCC5D0653C6}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Kate Titova
Copyright (c) 2025 Kate Titova

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
27 changes: 27 additions & 0 deletions Tests/FunctionsT/FunctionsT.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<Compile Include="UnitFunctions.fs" />
<Compile Include="Program.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Functions\Functions.fsproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions Tests/FunctionsT/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module Program = let [<EntryPoint>] main _ = 0
104 changes: 52 additions & 52 deletions Tests/UnitTestsFunctions.fs → Tests/FunctionsT/UnitFunctions.fs
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
namespace UnitTestsFunctions

open System
open Microsoft.VisualStudio.TestTools.UnitTesting

open Functions.Factorial
open Functions.Fibinacci


[<TestClass>]

type FactorialTests() =

[<TestMethod>] // 0!
member this.testFactorialZero() = Assert.AreEqual(1, factorial (0))

[<TestMethod>] // 1!
member this.testFactorialOne() = Assert.AreEqual(1, factorial (1))

[<TestMethod>] // 5!
member this.testFactorialFive() = Assert.AreEqual(120, factorial (5))

[<TestMethod>] // (-1)!
member this.testFactorialNegative() =
let ex = Assert.ThrowsException<System.Exception>(fun () -> factorial -1 :> obj)
Assert.AreEqual("The factorial of negative numbers is not calculated by this program\n", ex.Message)


[<TestClass>]

type FibinacciMatrixTests() =

[<TestMethod>] // F0
member this.fibZero() = Assert.AreEqual(0L, fibonacci (0))

[<TestMethod>] // F1
member this.fibOne() = Assert.AreEqual(1L, fibonacci (1))

[<TestMethod>] // F2
member this.fibTwo() = Assert.AreEqual(1L, fibonacci (2))

[<TestMethod>] // F3
member this.fibThree() = Assert.AreEqual(2L, fibonacci (3))

[<TestMethod>] // F30
member this.fibThreety() =
Assert.AreEqual(832040L, fibonacci (30))

[<TestMethod>] // F(-1)
member this.fibNegative() =
let ex = Assert.ThrowsException<System.Exception>(fun () -> fibonacci -1 :> obj)
Assert.AreEqual("Fibonacci numbers for negative n are not defined\n", ex.Message)
namespace UnitTestsFunctions
open System
open Microsoft.VisualStudio.TestTools.UnitTesting
open Functions.Factorial
open Functions.Fibinacci
[<TestClass>]
type FactorialTests() =
[<TestMethod>]
member this.testFactorialZero() = Assert.AreEqual(1, factorial (0))
[<TestMethod>]
member this.testFactorialOne() = Assert.AreEqual(1, factorial (1))
[<TestMethod>]
member this.testFactorialFive() = Assert.AreEqual(120, factorial (5))
[<TestMethod>]
member this.testFactorialNegative() =
let ex = Assert.ThrowsException<System.Exception>(fun () -> factorial -1 :> obj)
Assert.AreEqual("The factorial of negative numbers is not calculated by this program\n", ex.Message)
[<TestClass>]
type FibinacciMatrixTests() =
[<TestMethod>]
member this.fibZero() = Assert.AreEqual(0L, fibonacci (0))
[<TestMethod>]
member this.fibOne() = Assert.AreEqual(1L, fibonacci (1))
[<TestMethod>]
member this.fibTwo() = Assert.AreEqual(1L, fibonacci (2))
[<TestMethod>]
member this.fibThree() = Assert.AreEqual(2L, fibonacci (3))
[<TestMethod>]
member this.fibThreety() =
Assert.AreEqual(832040L, fibonacci (30))
[<TestMethod>]
member this.fibNegative() =
let ex = Assert.ThrowsException<System.Exception>(fun () -> fibonacci -1 :> obj)
Assert.AreEqual("Fibonacci numbers for negative n are not defined\n", ex.Message)
Loading