Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ported to netstandard 2.0 #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 8 additions & 3 deletions Skills.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Skills", "Skills\Skills.csproj", "{15AD1345-984C-48ED-AF9A-2EAB44E5AA2B}"
# Visual Studio Version 16
VisualStudioVersion = 16.0.30523.141
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Skills", "Skills\Skills.csproj", "{15AD1345-984C-48ED-AF9A-2EAB44E5AA2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{6F80946D-AC8B-4063-8588-96841C18BF0A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "UnitTests\UnitTests.csproj", "{6F80946D-AC8B-4063-8588-96841C18BF0A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{DEBCEDDA-EC9A-4C09-BCA4-673706531416}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -30,4 +32,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4FA901BA-6ED7-4907-B31B-AF61FE177420}
EndGlobalSection
EndGlobal
10 changes: 5 additions & 5 deletions Skills/Numerics/Matrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Moserware.Numerics
/// <summary>
/// Represents an MxN matrix with double precision values.
/// </summary>
internal class Matrix
public class Matrix
{
// Anything smaller than this will be assumed to be rounding error in terms of equality matching
private const int FractionalDigitsToRoundTo = 10;
Expand Down Expand Up @@ -460,7 +460,7 @@ public override bool Equals(object obj)
}
}

internal class DiagonalMatrix : Matrix
public class DiagonalMatrix : Matrix
{
public DiagonalMatrix(IList<double> diagonalValues)
: base(diagonalValues.Count, diagonalValues.Count)
Expand All @@ -472,15 +472,15 @@ public DiagonalMatrix(IList<double> diagonalValues)
}
}

internal class Vector : Matrix
public class Vector : Matrix
{
public Vector(IList<double> vectorValues)
: base(vectorValues.Count, 1, new IEnumerable<double>[] {vectorValues})
{
}
}

internal class SquareMatrix : Matrix
public class SquareMatrix : Matrix
{
public SquareMatrix(params double[] allValues)
{
Expand All @@ -503,7 +503,7 @@ public SquareMatrix(params double[] allValues)
}
}

internal class IdentityMatrix : DiagonalMatrix
public class IdentityMatrix : DiagonalMatrix
{
public IdentityMatrix(int rows)
: base(CreateDiagonal(rows))
Expand Down
41 changes: 0 additions & 41 deletions Skills/Properties/AssemblyInfo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Skills/RankSorter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Moserware.Skills
/// <summary>
/// Helper class to sort ranks in non-decreasing order.
/// </summary>
internal static class RankSorter
public static class RankSorter
{
/// <summary>
/// Performs an in-place sort of the <paramref name="items"/> in according to the <paramref name="ranks"/> in non-decreasing order.
Expand Down
128 changes: 8 additions & 120 deletions Skills/Skills.csproj
Original file line number Diff line number Diff line change
@@ -1,122 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{15AD1345-984C-48ED-AF9A-2EAB44E5AA2B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Moserware.Skills</RootNamespace>
<AssemblyName>Moserware.Skills</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<Product>Moserware.Skills</Product>
<Authors>Jeff Moser</Authors>
<PackageId>Moserware.Skills</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Elo\DuellingEloCalculator.cs" />
<Compile Include="Elo\GaussianKFactor.cs" />
<Compile Include="Elo\TwoPlayerEloCalculator.cs" />
<Compile Include="Elo\EloRating.cs" />
<Compile Include="Elo\FideKFactor.cs" />
<Compile Include="Elo\GaussianEloCalculator.cs" />
<Compile Include="Elo\KFactor.cs" />
<Compile Include="Numerics\Range.cs" />
<Compile Include="PlayersRange.cs" />
<Compile Include="TeamsRange.cs" />
<Compile Include="TrueSkill\DrawMargin.cs" />
<Compile Include="FactorGraphs\FactorGraph.cs" />
<Compile Include="FactorGraphs\FactorGraphLayer.cs" />
<Compile Include="FactorGraphs\FactorList.cs" />
<Compile Include="FactorGraphs\Message.cs" />
<Compile Include="FactorGraphs\Schedule.cs" />
<Compile Include="FactorGraphs\VariableFactory.cs" />
<Compile Include="TrueSkill\Factors\GaussianFactor.cs" />
<Compile Include="TrueSkill\Factors\GaussianGreaterThanFactor.cs" />
<Compile Include="TrueSkill\Factors\GaussianLikelihoodFactor.cs" />
<Compile Include="TrueSkill\Factors\GaussianPriorFactor.cs" />
<Compile Include="TrueSkill\Factors\GaussianWeightedSumFactor.cs" />
<Compile Include="TrueSkill\Factors\GaussianWithinFactor.cs" />
<Compile Include="Elo\FideEloCalculator.cs" />
<Compile Include="FactorGraphs\Factor.cs" />
<Compile Include="FactorGraphs\Variable.cs" />
<Compile Include="TrueSkill\FactorGraphTrueSkillCalculator.cs" />
<Compile Include="GameInfo.cs" />
<Compile Include="Numerics\GaussianDistribution.cs" />
<Compile Include="Guard.cs" />
<Compile Include="PartialPlay.cs" />
<Compile Include="SkillCalculator.cs" />
<Compile Include="ISupportPartialPlay.cs" />
<Compile Include="ISupportPartialUpdate.cs" />
<Compile Include="Numerics\Matrix.cs" />
<Compile Include="TrueSkillCalculator.cs" />
<Compile Include="TrueSkill\Layers\IteratedTeamDifferencesInnerLayer.cs" />
<Compile Include="TrueSkill\Layers\PlayerPerformancesToTeamPerformancesLayer.cs" />
<Compile Include="TrueSkill\Layers\PlayerPriorValuesToSkillsLayer.cs" />
<Compile Include="TrueSkill\Layers\PlayerSkillsToPerformancesLayer.cs" />
<Compile Include="TrueSkill\Layers\TeamDifferencesComparisonLayer.cs" />
<Compile Include="TrueSkill\Layers\TeamPerformancesToTeamPerformanceDifferencesLayer.cs" />
<Compile Include="TrueSkill\Layers\TrueSkillFactorGraphLayer.cs" />
<Compile Include="TrueSkill\TrueSkillFactorGraph.cs" />
<Compile Include="TrueSkill\TruncatedGaussianCorrectionFunctions.cs" />
<Compile Include="PairwiseComparison.cs" />
<Compile Include="Player.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Rating.cs" />
<Compile Include="Team.cs" />
<Compile Include="RankSorter.cs" />
<Compile Include="TrueSkill\TwoPlayerTrueSkillCalculator.cs" />
<Compile Include="TrueSkill\TwoTeamTrueSkillCalculator.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="License.txt" />
<Content Include="README.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Binary file removed Skills/Skills.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion Skills/TrueSkill/DrawMargin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Moserware.Skills.TrueSkill
{
internal static class DrawMargin
public static class DrawMargin
{
public static double GetDrawMarginFromDrawProbability(double drawProbability, double beta)
{
Expand Down
2 changes: 1 addition & 1 deletion Skills/TrueSkill/FactorGraphTrueSkillCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Moserware.Skills.TrueSkill
/// <summary>
/// Calculates TrueSkill using a full factor graph.
/// </summary>
internal class FactorGraphTrueSkillCalculator : SkillCalculator
public class FactorGraphTrueSkillCalculator : SkillCalculator
{
public FactorGraphTrueSkillCalculator()
: base(SupportedOptions.PartialPlay | SupportedOptions.PartialUpdate, TeamsRange.AtLeast(2), PlayersRange.AtLeast(1))
Expand Down
35 changes: 0 additions & 35 deletions UnitTests/Properties/AssemblyInfo.cs

This file was deleted.

Loading