Skip to content

Commit

Permalink
Renamed Overround -> Overrounds, and minor stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Koutanov committed Jan 29, 2024
1 parent 1c7f516 commit 9f08441
Show file tree
Hide file tree
Showing 23 changed files with 32 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,5 @@ FakesAssemblies/

# Visual Studio 6 workspace options file
*.opt

.idea
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cSpell.words": [
"booksum",
"overround"
"overround",
"Overrounds"
]
}
2 changes: 1 addition & 1 deletion App/App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Overround\Overround.csproj" />
<ProjectReference Include="..\Overrounds\Overrounds.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion App/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Overround;
using Overrounds;

double[] fairPrices = [1 / 0.01, 1 / 0.29, 1 / 0.3, 1 / 0.4];
double fairBooksum = Booksum.FromPrices(fairPrices);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Overround.Tests;
namespace Overrounds.Tests;

[TestClass]
public class AdditiveTest
{
private const double Delta = 1e-3;

private IOverroundMethod method = new Additive();
private readonly IOverroundMethod method = new Additive();

[TestMethod]
public void TestApplyNoOverround()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Overround.Tests;
namespace Overrounds.Tests;

class ArrayAssert
static class ArrayAssert
{
internal static void AreEqual(double[] expected, double[] actual, double delta)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Overround.Tests;
namespace Overrounds.Tests;

[TestClass]
public class BooksumTest
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Overround.Tests;
namespace Overrounds.Tests;

[TestClass]
public class MultiplicativeTest
{
private const double Delta = 1e-3;

private IOverroundMethod method = new Multiplicative();
private readonly IOverroundMethod method = new Multiplicative();

[TestMethod]
public void TestApplyNoOverround()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Overround.Tests;
namespace Overrounds.Tests;

[TestClass]
public class OddsRatioTest
{
private const double Delta = 1e-3;

private IOverroundMethod method = new OddsRatio();
private readonly IOverroundMethod method = new OddsRatio();

[TestMethod]
public void TestApplyNoOverround()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<IsTestProject>true</IsTestProject>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<RootNamespace>Overround.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -19,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Overround\Overround.csproj" />
<ProjectReference Include="..\Overrounds\Overrounds.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Overround.Tests;
namespace Overrounds.Tests;

[TestClass]
public class PowerTest
{
private const double Delta = 1e-3;

private IOverroundMethod method = new Power();
private readonly IOverroundMethod method = new Power();

[TestMethod]
public void TestApplyNoOverround()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Overround.Tests;
namespace Overrounds.Tests;

[TestClass]
public class SolverTest
Expand Down
2 changes: 1 addition & 1 deletion Overround/Additive.cs → Overrounds/Additive.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Net.NetworkInformation;

namespace Overround;
namespace Overrounds;

public class Additive : IOverroundMethod
{
Expand Down
2 changes: 1 addition & 1 deletion Overround/Booksum.cs → Overrounds/Booksum.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Overround;
namespace Overrounds;

public class Booksum
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Overround;
namespace Overrounds;

public interface IOverroundMethod
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Net.NetworkInformation;

namespace Overround;
namespace Overrounds;

public class Multiplicative : IOverroundMethod
{
Expand Down
2 changes: 1 addition & 1 deletion Overround/OddsRatio.cs → Overrounds/OddsRatio.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Overround;
namespace Overrounds;

public class OddsRatio : IOverroundMethod
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<RootNamespace>Overround</RootNamespace>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion Overround/Power.cs → Overrounds/Power.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Overround;
namespace Overrounds;

public class Power : IOverroundMethod
{
Expand Down
4 changes: 2 additions & 2 deletions Overround/Solver.cs → Overrounds/Solver.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Overround;
namespace Overrounds;

public class Solution(double value, double error, int iterations)
{
Expand All @@ -14,7 +14,7 @@ public override string ToString()
}
}

public class Solver
public static class Solver
{
public static Solution Solve(double initEstimate, double initStep, double errorThreshold, int maxIterations, Func<double, double> lossFunc)
{
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A collection of overround application methods: _Multiplicative_, _Additive_, _Po

# Examples
```csharp
using Overround;
using Overrounds;

double[] fairPrices = [1 / 0.1, 1 / 0.2, 1 / 0.3, 1 / 0.4];
double fairBooksum = Booksum.FromPrices(fairPrices);
Expand Down
4 changes: 2 additions & 2 deletions overround-methods.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Overround", "Overround\Overround.csproj", "{DEF254B1-9AB7-40EF-97E3-1181C6965539}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Overrounds", "Overrounds\Overrounds.csproj", "{DEF254B1-9AB7-40EF-97E3-1181C6965539}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "App\App.csproj", "{5CC997ED-8A82-4551-8774-B595037D217F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Overround.Tests", "Overround.Tests\Overround.Tests.csproj", "{7AF1A5D1-9FB0-4398-AFA8-3C0139D9BA5E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Overrounds.Tests", "Overrounds.Tests\Overrounds.Tests.csproj", "{7AF1A5D1-9FB0-4398-AFA8-3C0139D9BA5E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit 9f08441

Please sign in to comment.