Skip to content
Merged

Beta #21

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
16 changes: 9 additions & 7 deletions .build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ $PSake.use_exit_on_error = $true

$Here = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$SolutionRoot = (Split-Path -parent $Here)
$RepoRoot = $(Split-Path -parent $Here)
$SolutionRoot = "$RepoRoot\src"

$ProjectName = "Advanced.Algorithms"
$GitHubProjectName = "Advanced-Algorithms"
Expand All @@ -26,7 +27,7 @@ if(!$Branch) { $Branch = "local" }

if($Branch -eq "beta" ) { $Version = "$Version-beta" }

$NuGet = Join-Path $SolutionRoot ".nuget\nuget.exe"
$NuGet = Join-Path $RepoRoot ".nuget\nuget.exe"

$MSBuild = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"
$MSBuild -replace ' ', '` '
Expand Down Expand Up @@ -65,12 +66,13 @@ Task Document -depends Build {

if($Branch -eq "master")
{

#use docfx to generate API documentation from source metadata
docfx docfx.json

#patch index.json so that it is always sorted
#otherwise git will think file was changed
$IndexJsonFile = "$SolutionRoot\docs\index.json"
$IndexJsonFile = "$RepoRoot\docs\index.json"
$unsorted = Get-Content $IndexJsonFile | Out-String
[Reflection.Assembly]::LoadFile("$Here\lib\Newtonsoft.Json.dll")
[System.Reflection.Assembly]::LoadWithPartialName("System")
Expand All @@ -79,7 +81,7 @@ Task Document -depends Build {
Set-Content -Path $IndexJsonFile -Value $obj

#setup clone directory
$TEMP_REPO_DIR =(Split-Path -parent $SolutionRoot) + "\temp-repo-clone"
$TEMP_REPO_DIR =(Split-Path -parent $RepoRoot) + "\temp-repo-clone"

If(test-path $TEMP_REPO_DIR)
{
Expand All @@ -101,7 +103,7 @@ Task Document -depends Build {
cd "$TEMP_REPO_DIR\docs"

#copy docs to clone directory\docs
Copy-Item -Path "$SolutionRoot\docs\*" -Destination "$TEMP_REPO_DIR\docs" -Recurse -Force
Copy-Item -Path "$RepoRoot\docs\*" -Destination "$TEMP_REPO_DIR\docs" -Recurse -Force

#push changes to master
git config --global credential.helper store
Expand All @@ -119,5 +121,5 @@ Task Document -depends Build {

#package nuget files
Task Package -depends Document {
exec { . $NuGet pack "$SolutionRoot\$ProjectName\$ProjectName.nuspec" -Properties Configuration=$Configuration -OutputDirectory "$SolutionRoot" -Version "$Version" }
}
exec { . $NuGet pack "$SolutionRoot\$ProjectName\$ProjectName.nuspec" -Properties Configuration=$Configuration -OutputDirectory "$RepoRoot" -Version "$Version" }
}
2 changes: 1 addition & 1 deletion .build/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ param (

function Install-Chocolatey()
{
if(-not $env:ChocolateyInstall -or -not (Test-Path "$env:ChocolateyInstall"))
if(-not $env:ChocolateyInstall -or -not (Test-Path "$env:ChocolateyInstall\*"))
{
Write-Output "Chocolatey Not Found, Installing..."
iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))
Expand Down
33 changes: 33 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// The following will hide the js and map files in the editor
"files.exclude": {
"**/.build": true,
"**/.nuget": true,
"**/.vs": true,
"**/docs": true,
"**/packages": true,
"**/bin": true,
"**/obj": true,
"**/*.DotSettings": true,
"**/*.sln": true,
"**/*.Mono.csproj": true,
"**/*.Docs.csproj": true,
"**/*.Algorithms.csproj": true,
"**/*.Tests.csproj": true
},
"search.exclude": {
"**/.build": true,
"**/.nuget": true,
"**/.vs": true,
"**/docs": true,
"**/packages": true,
"**/bin": true,
"**/obj": true,
"**/*.DotSettings": true,
"**/*.sln": true,
"**/*.Mono.csproj": true,
"**/*.Docs.csproj": true,
"**/*.Algorithms.csproj": true,
"**/*.Tests.csproj": true
}
}
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "process",
"command": "dotnet",
"args": ["build","${workspaceFolder}/src/Advanced.Algorithms.NetCore.sln"],
"problemMatcher": "$msCompile",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
305 changes: 162 additions & 143 deletions README.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ skip_tags: true

skip_commits:
author: buildbot121

files:
- docs/*
- README.md
- LICENSE

#---------------------------------#
# artifacts configuration #
#---------------------------------#
Expand Down
13 changes: 13 additions & 0 deletions omnisharp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"fileOptions": {
"excludeSearchPatterns": [
"**/*.Docs.csproj",
"**/*.DotSettings",
"**/*.sln",
"**/*.Mono.csproj",
"**/*.Docs.csproj",
"**/*.Algorithms.csproj",
"**/*.Tests.csproj"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ VisualStudioVersion = 15.0.27428.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6FD3B84B-9283-4E9C-8C43-A234E9AA3EAA}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
..\.nuget\NuGet.Config = ..\.nuget\NuGet.Config
..\.nuget\NuGet.exe = ..\.nuget\NuGet.exe
..\.nuget\NuGet.targets = ..\.nuget\NuGet.targets
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Advanced.Algorithms.Docs", "Advanced.Algorithms\Advanced.Algorithms.Docs.csproj", "{EBF2EA46-EA00-4350-BE1D-D86AFD699DB3}"
Expand Down
52 changes: 52 additions & 0 deletions src/Advanced.Algorithms.Mono.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6FD3B84B-9283-4E9C-8C43-A234E9AA3EAA}"
ProjectSection(SolutionItems) = preProject
..\.nuget\NuGet.Config = ..\.nuget\NuGet.Config
..\.nuget\NuGet.exe = ..\.nuget\NuGet.exe
..\.nuget\NuGet.targets = ..\.nuget\NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentation", "{38EA62D0-D2CB-465D-AF4F-407C5B4D4A1E}"
ProjectSection(SolutionItems) = preProject
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{AC9AE37A-3059-4FDB-9A5C-363AD86F2EEF}"
ProjectSection(SolutionItems) = preProject
..\.build\build.ps1 = ..\.build\build.ps1
..\.build\docfx.json = ..\.build\docfx.json
..\.build\setup.ps1 = ..\.build\setup.ps1
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Advanced.Algorithms.Mono", "Advanced.Algorithms\Advanced.Algorithms.Mono.csproj", "{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Advanced.Algorithms.Tests.Mono", "..\tests\Advanced.Algorithms.Tests\Advanced.Algorithms.Tests.Mono.csproj", "{556705BD-1E64-426D-A9CA-08390156FB85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Release|Any CPU.Build.0 = Release|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = .1.505.2\lib\NET35
SolutionGuid = {625C1EB5-44CF-47DE-A85A-B4C8C40ED90A}
EndGlobalSection
EndGlobal
52 changes: 52 additions & 0 deletions src/Advanced.Algorithms.NetCore.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6FD3B84B-9283-4E9C-8C43-A234E9AA3EAA}"
ProjectSection(SolutionItems) = preProject
..\.nuget\NuGet.Config = ..\.nuget\NuGet.Config
..\.nuget\NuGet.exe = ..\.nuget\NuGet.exe
..\.nuget\NuGet.targets = ..\.nuget\NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentation", "{38EA62D0-D2CB-465D-AF4F-407C5B4D4A1E}"
ProjectSection(SolutionItems) = preProject
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{AC9AE37A-3059-4FDB-9A5C-363AD86F2EEF}"
ProjectSection(SolutionItems) = preProject
..\.build\build.ps1 = ..\.build\build.ps1
..\.build\docfx.json = ..\.build\docfx.json
..\.build\setup.ps1 = ..\.build\setup.ps1
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Advanced.Algorithms", "Advanced.Algorithms\Advanced.Algorithms.NetCore.csproj", "{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Advanced.Algorithms.Tests", "..\tests\Advanced.Algorithms.Tests\Advanced.Algorithms.Tests.NetCore.csproj", "{556705BD-1E64-426D-A9CA-08390156FB85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}.Release|Any CPU.Build.0 = Release|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{556705BD-1E64-426D-A9CA-08390156FB85}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = .1.505.2\lib\NET35
SolutionGuid = {625C1EB5-44CF-47DE-A85A-B4C8C40ED90A}
EndGlobalSection
EndGlobal
18 changes: 9 additions & 9 deletions Advanced.Algorithms.sln → src/Advanced.Algorithms.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{6FD3B84B-9283-4E9C-8C43-A234E9AA3EAA}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
..\.nuget\NuGet.Config = ..\.nuget\NuGet.Config
..\.nuget\NuGet.exe = ..\.nuget\NuGet.exe
..\.nuget\NuGet.targets = ..\.nuget\NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentation", "{38EA62D0-D2CB-465D-AF4F-407C5B4D4A1E}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{AC9AE37A-3059-4FDB-9A5C-363AD86F2EEF}"
ProjectSection(SolutionItems) = preProject
.build\Bootstrap.ps1 = .build\Bootstrap.ps1
.build\Common.psm1 = .build\Common.psm1
.build\default.ps1 = .build\default.ps1
..\.build\build.ps1 = ..\.build\build.ps1
..\.build\docfx.json = ..\.build\docfx.json
..\.build\setup.ps1 = ..\.build\setup.ps1
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Advanced.Algorithms", "Advanced.Algorithms\Advanced.Algorithms.csproj", "{32E22D53-CECD-4E2D-ADAD-85DD79A8549F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Advanced.Algorithms.Tests", "Advanced.Algorithms.Tests\Advanced.Algorithms.Tests.csproj", "{556705BD-1E64-426D-A9CA-08390156FB85}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Advanced.Algorithms.Tests", "..\tests\Advanced.Algorithms.Tests\Advanced.Algorithms.Tests.csproj", "{556705BD-1E64-426D-A9CA-08390156FB85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers.2.9.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.2.9.0\build\Microsoft.Net.Compilers.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -23,7 +26,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\Debug\Advanced.Algorithms.xml</DocumentationFile>
<LangVersion>latest</LangVersion>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down Expand Up @@ -119,6 +122,7 @@
<Compile Include="DataStructures\Tree\RedBlackTree.cs" />
<Compile Include="DataStructures\Tree\RTree.cs" />
<Compile Include="DataStructures\Tree\SegmentTree.cs" />
<Compile Include="DataStructures\Tree\Shared\ArrayComparer.cs" />
<Compile Include="DataStructures\Tree\Shared\BSTEnumerator.cs" />
<Compile Include="DataStructures\Tree\Shared\BSTExtensions.cs" />
<Compile Include="DataStructures\Tree\Shared\BSTNodeBase.cs" />
Expand Down Expand Up @@ -165,6 +169,7 @@
<Compile Include="Graph\Search\BiDirectional.cs" />
<Compile Include="Graph\Search\BreadthFirst.cs" />
<Compile Include="Graph\Search\DepthFirst.cs" />
<Compile Include="Graph\ShortestPath\AStar.cs" />
<Compile Include="Graph\ShortestPath\Bellman-Ford.cs" />
<Compile Include="Graph\ShortestPath\Dijikstra.cs" />
<Compile Include="Graph\ShortestPath\Floyd-Warshall.cs" />
Expand Down Expand Up @@ -195,7 +200,16 @@
<Compile Include="String\Search\RabinKarp.cs" />
<Compile Include="String\Search\ZAlgorithm.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.2.9.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.2.9.0\build\Microsoft.Net.Compilers.props'))" />
</Target>
<!-- 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">
Expand Down
13 changes: 13 additions & 0 deletions src/Advanced.Algorithms/Advanced.Algorithms.Mono.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<RootNamespace>Advanced.Algorithms</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>StrongNameKey.snk</AssemblyOriginatorKeyFile>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyName>Advanced.Algorithms</AssemblyName>
</PropertyGroup>

</Project>
14 changes: 14 additions & 0 deletions src/Advanced.Algorithms/Advanced.Algorithms.NetCore.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Advanced.Algorithms</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>StrongNameKey.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyName>Advanced.Algorithms</AssemblyName>
</PropertyGroup>

</Project>
File renamed without changes.
Loading