Browse Source

Merge branch 'mathnet:master' into rca22_weightedStats

pull/865/head^2
rca22 5 years ago
committed by GitHub
parent
commit
fbb33639f9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .config/dotnet-tools.json
  2. 20
      .gitignore
  3. 9
      Directory.Build.props
  4. 32
      MathNet.Numerics.sln
  5. 2
      build.cmd
  6. 751
      build.fsx
  7. 31
      build.sh
  8. 0
      build/MathNet.Numerics.snk
  9. 536
      build/build-framework.fsx
  10. 0
      build/icon.png
  11. 0
      docs/Build.md
  12. 0
      docs/CSV.md
  13. 0
      docs/Compatibility.md
  14. 0
      docs/Constants.md
  15. 0
      docs/DescriptiveStatistics.md
  16. 22
      docs/Distance.md
  17. 0
      docs/DistanceCanberra.png
  18. 0
      docs/DistanceChebyshev.png
  19. 0
      docs/DistanceCosine.png
  20. 0
      docs/DistanceEuclidean.png
  21. 0
      docs/DistanceMAE.png
  22. 0
      docs/DistanceMSE.png
  23. 0
      docs/DistanceManhattan.png
  24. 0
      docs/DistanceMinkowski3.png
  25. 0
      docs/DistancePearson.png
  26. 0
      docs/DistanceSAD.png
  27. 0
      docs/DistanceSSD.png
  28. 0
      docs/Euclid.md
  29. 0
      docs/Functions.md
  30. 0
      docs/Generate.md
  31. 0
      docs/IFsharpNotebook.md
  32. 0
      docs/IfSharp-GenerateIS.png
  33. 0
      docs/IfSharp-MatrixVector.png
  34. 0
      docs/IntegralTransforms.md
  35. 0
      docs/Integration.md
  36. 0
      docs/Interpolation.md
  37. 0
      docs/LinearEquations.md
  38. 0
      docs/MKL.md
  39. 0
      docs/MatlabFiles.md
  40. 0
      docs/Matrix.md
  41. 0
      docs/MatrixMarket.md
  42. 0
      docs/Packages.md
  43. 0
      docs/Probability.md
  44. 0
      docs/Random.md
  45. 0
      docs/Regression.md
  46. 0
      docs/Users.md
  47. 133
      docs/_template.html
  48. 16
      docs/content/fsdocs-custom.css
  49. BIN
      docs/favicon.ico
  50. 0
      docs/index.md
  51. 0
      docs/logo.png
  52. 95
      docs/tools/build-docs.fsx
  53. 5
      docs/tools/paket.references
  54. 142
      docs/tools/templates/template.cshtml
  55. 3
      paket.dependencies
  56. 8
      paket.lock
  57. 3
      src/Benchmark/Benchmark.csproj
  58. 1
      src/Data.Matlab/Data.Matlab.csproj
  59. 3
      src/Data.Tests/Data.Tests.csproj
  60. 17
      src/Data.Tests/Properties/AssemblyInfo.cs
  61. 1
      src/Data.Text/Data.Text.csproj
  62. 12
      src/FSharp.Tests/AssemblyInfo.fs
  63. 3
      src/FSharp.Tests/FSharp.Tests.fsproj
  64. 17
      src/FSharp/AssemblyInfo.fs
  65. 1
      src/FSharp/FSharp.fsproj
  66. 2
      src/NativeProviders/Windows/MKL/MKLWrapper.vcxproj.filters
  67. 3
      src/Numerics.Tests/Numerics.Tests.CUDA.csproj
  68. 3
      src/Numerics.Tests/Numerics.Tests.MKL.csproj
  69. 3
      src/Numerics.Tests/Numerics.Tests.OpenBLAS.csproj
  70. 3
      src/Numerics.Tests/Numerics.Tests.csproj
  71. 11
      src/Numerics.Tests/Properties/AssemblyInfo.cs
  72. 1
      src/Numerics/Numerics.csproj
  73. 1
      src/Providers.CUDA/Providers.CUDA.csproj
  74. 1
      src/Providers.MKL/Providers.MKL.csproj
  75. 1
      src/Providers.OpenBLAS/Providers.OpenBLAS.csproj
  76. 16
      src/TestData/Properties/AssemblyInfo.cs
  77. 3
      src/TestData/TestData.csproj

6
.config/dotnet-tools.json

@ -13,6 +13,12 @@
"commands": [
"fake"
]
},
"fsharp.formatting.commandtool": {
"version": "11.4.1",
"commands": [
"fsdocs"
]
}
}
}

20
.gitignore

@ -2,6 +2,8 @@
bin/
obj/
out/
output/
tmp/
# User-specific Files
*.user
@ -59,22 +61,18 @@ Thumbs.db
ehthumbs.db
Desktop.ini
# NuGet Packages
# NOTE: we do NOT use package restore in the core projects, but do use it with FAKE builds.
packages/*
!packages/.gitattributes
!packages/TaskParallelLibrary
!packages/FSharp.Core
# FAKE & Paket
packages
paket-files
.fake
# Generated Doc Files
docs/content/License.md
docs/content/Contributing.md
docs/content/Contributors.md
docs/content/ReleaseNotes.md
docs/content/ReleaseNotes-*.md
.fsdocs
/build.fsx.lock
docs/License.md
docs/Contributing.md
docs/Contributors.md
docs/ReleaseNotes.md
docs/ReleaseNotes-*.md

9
src/Directory.Build.props → Directory.Build.props

@ -18,7 +18,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(StrongName)'=='True'">
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)MathNet.Numerics.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)build/MathNet.Numerics.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<CommonConstants>STRONGNAME</CommonConstants>
<PackageIdSuffix>.Signed</PackageIdSuffix>
@ -30,6 +30,11 @@
<DefineConstants>NATIVE;$(CommonConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" Visible="false" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)build/icon.png" Pack="true" Visible="false" PackagePath="\" />
</ItemGroup>
<PropertyGroup>
<FsDocsLogoSource>/logo.png</FsDocsLogoSource>
<FsDocsLogoLink>https://numerics.mathdotnet.com/</FsDocsLogoLink>
<FsDocsNavbarPosition>fixed-left</FsDocsNavbarPosition>
</PropertyGroup>
</Project>

32
MathNet.Numerics.sln

@ -27,48 +27,18 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{B54A0B40-DE22-49FB-B1C0-6E5BDA3B0B2F}"
ProjectSection(SolutionItems) = preProject
appveyor.yml = appveyor.yml
docs\tools\build-docs.fsx = docs\tools\build-docs.fsx
build\build-framework.fsx = build\build-framework.fsx
build.fsx = build.fsx
src\Directory.Build.props = src\Directory.Build.props
global.json = global.json
paket.dependencies = paket.dependencies
paket.lock = paket.lock
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestData", "src\TestData\TestData.csproj", "{AF3253C9-4DB5-45A0-98CF-C105FDA9DA47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmark", "src\Benchmark\Benchmark.csproj", "{82444930-9FD7-41B6-B476-CCE41A0C0A0B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{B890C1AF-E488-490F-B784-2C6F8C924693}"
ProjectSection(SolutionItems) = preProject
docs\content\Build.md = docs\content\Build.md
docs\content\Compatibility.md = docs\content\Compatibility.md
docs\content\Constants.md = docs\content\Constants.md
docs\content\CSV.md = docs\content\CSV.md
docs\content\DescriptiveStatistics.md = docs\content\DescriptiveStatistics.md
docs\content\Distance.md = docs\content\Distance.md
docs\content\Euclid.md = docs\content\Euclid.md
docs\content\Functions.md = docs\content\Functions.md
docs\content\Generate.md = docs\content\Generate.md
docs\content\IFsharpNotebook.md = docs\content\IFsharpNotebook.md
docs\content\index.md = docs\content\index.md
docs\content\IntegralTransforms.md = docs\content\IntegralTransforms.md
docs\content\Integration.md = docs\content\Integration.md
docs\content\Interpolation.md = docs\content\Interpolation.md
docs\content\LinearEquations.md = docs\content\LinearEquations.md
docs\content\MatlabFiles.md = docs\content\MatlabFiles.md
docs\content\Matrix.md = docs\content\Matrix.md
docs\content\MatrixMarket.md = docs\content\MatrixMarket.md
docs\content\MKL.md = docs\content\MKL.md
docs\content\Packages.md = docs\content\Packages.md
docs\content\Probability.md = docs\content\Probability.md
docs\content\Random.md = docs\content\Random.md
docs\content\Regression.md = docs\content\Regression.md
docs\content\Users.md = docs\content\Users.md
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Providers.MKL", "src\Providers.MKL\Providers.MKL.csproj", "{0B5FAFAA-4286-4D92-B5AB-CBA75ADDA0BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Providers.CUDA", "src\Providers.CUDA\Providers.CUDA.csproj", "{3C0D4A87-CC89-43B6-B028-4122099D692F}"

2
build.cmd

@ -8,4 +8,4 @@ if errorlevel 1 (
exit /b %errorlevel%
)
packages\build\FAKE\tools\FAKE.exe build.fsx %*
dotnet fake run build.fsx -t %*

751
build.fsx

@ -8,23 +8,502 @@
// Math.NET Numerics - https://numerics.mathdotnet.com
// Copyright (c) Math.NET - Open Source MIT/X11 License
//
// FAKE build script, see http://fsharp.github.io/FAKE
// FAKE build script, see https://fake.build/
//
#r "paket:
nuget Fake.Core.Context
nuget Fake.Core.Environment
nuget Fake.Core.ReleaseNotes
nuget Fake.Core.String
nuget Fake.Core.Target
nuget Fake.Core.Trace
nuget Fake.DotNet.Cli
nuget Fake.DotNet.NuGet
nuget Fake.IO.FileSystem
nuget Fake.IO.Zip
nuget Fake.Tools.Git"
#load "./.fake/build.fsx/intellisense.fsx"
open FSharp.Core
open Fake.Core
open Fake.Core.TargetOperators
open Fake.DotNet
open Fake.DotNet.NuGet
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.IO.Globbing.Operators
open Fake.Tools.Git
open System
open System.IO
let header = File.read (__SOURCE_DIRECTORY__ </> __SOURCE_FILE__) |> Seq.take 10 |> Seq.map (fun s -> s.Substring(2)) |> String.toLines
let rootDir = Path.getFullName __SOURCE_DIRECTORY__
Environment.CurrentDirectory <- rootDir
Trace.log rootDir
let args = Target.getArguments()
let isStrongname, isSign, isIncremental =
match args with
| Some args ->
args |> Seq.contains "--strongname",
args |> Seq.contains "--sign" && Environment.isWindows,
args |> Seq.contains "--incremental"
| None -> false, false, false
// --------------------------------------------------------------------------------------
// PRELUDE
// .Net SDK
// --------------------------------------------------------------------------------------
#I "packages/build/FAKE/tools"
#r "packages/build/FAKE/tools/FakeLib.dll"
open Fake
open Fake.DocuHelper
open System
open System.IO
let dotnet workingDir command =
DotNet.exec (fun c -> { c with WorkingDirectory = workingDir}) command "" |> ignore<ProcessResult>
let dotnetWeak workingDir command =
let properties = [ ("StrongName", "False") ]
let suffix = properties |> List.map (fun (name, value) -> sprintf """ /p:%s="%s" /nr:false """ name value) |> String.concat ""
DotNet.exec (fun c -> { c with WorkingDirectory = workingDir }) command suffix |> ignore<ProcessResult>
let dotnetStrong workingDir command =
let properties = [ ("StrongName", "True") ]
let suffix = properties |> List.map (fun (name, value) -> sprintf """ /p:%s="%s" /nr:false """ name value) |> String.concat ""
DotNet.exec (fun c -> { c with WorkingDirectory = workingDir}) command suffix |> ignore<ProcessResult>
// --------------------------------------------------------------------------------------
// Model
// --------------------------------------------------------------------------------------
type Release =
{ RepoKey: string
Title: string
AssemblyVersion: string
PackageVersion: string
ReleaseNotes: string
ReleaseNotesFile: string }
type ZipPackage =
{ Id: string
Release: Release
Title: string }
type NuGetPackage =
{ Id: string
Release: Release }
type VisualStudioProject =
{ AssemblyName: string
ProjectFile: string
OutputDir: string
Release: Release
NuGetPackages: NuGetPackage list }
type NativeVisualStudioProject =
{ BinaryName: string
ProjectFile: string
OutputDir: string
Release: Release
NuGetPackages: NuGetPackage list }
type NativeBashScriptProject =
{ BinaryName: string
BashScriptFile: string
OutputDir: string
Release: Release
NuGetPackages: NuGetPackage list }
type Project =
| VisualStudio of VisualStudioProject
| NativeVisualStudio of NativeVisualStudioProject
| NativeBashScript of NativeBashScriptProject
type Solution =
{ Key: string
SolutionFile: string
Projects: Project list
Release: Release
ZipPackages: ZipPackage list
OutputDir: string
OutputLibDir: string
OutputLibStrongNameDir: string
OutputZipDir: string
OutputNuGetDir: string }
type NuGetSpecification =
{ NuGet: NuGetPackage
NuSpecFile: string
Title: string }
let release repoKey title releaseNotesFile : Release =
let info = ReleaseNotes.load releaseNotesFile
let buildPart = "0"
let assemblyVersion = info.AssemblyVersion + "." + buildPart
let packageVersion = info.NugetVersion
let notes = info.Notes |> List.map (fun l -> l.Replace("*","").Replace("`","")) |> String.toLines
{ Release.RepoKey = repoKey
Title = title
AssemblyVersion = assemblyVersion
PackageVersion = packageVersion
ReleaseNotes = notes
ReleaseNotesFile = releaseNotesFile }
let zipPackage packageId title release =
{ ZipPackage.Id = packageId
Title = title
Release = release }
let nugetPackage packageId release =
{ NuGetPackage.Id = packageId
Release = release }
let project assemblyName projectFile nuGetPackages =
{ VisualStudioProject.AssemblyName = assemblyName
ProjectFile = projectFile
OutputDir = (Path.GetDirectoryName projectFile) </> "bin" </> "Release"
NuGetPackages = nuGetPackages
Release = nuGetPackages |> List.map (fun p -> p.Release) |> List.distinct |> List.exactlyOne }
|> Project.VisualStudio
let nativeProject binaryName projectFile nuGetPackages =
{ NativeVisualStudioProject.BinaryName = binaryName
ProjectFile = projectFile
OutputDir = (Path.GetDirectoryName projectFile) </> "bin" </> "Release"
NuGetPackages = nuGetPackages
Release = nuGetPackages |> List.map (fun p -> p.Release) |> List.distinct |> List.exactlyOne }
|> Project.NativeVisualStudio
let nativeBashScriptProject binaryName bashScriptFile nuGetPackages =
{ NativeBashScriptProject.BinaryName = binaryName
BashScriptFile = bashScriptFile
OutputDir = (Path.GetDirectoryName bashScriptFile) </> "bin" </> "Release"
NuGetPackages = nuGetPackages
Release = nuGetPackages |> List.map (fun p -> p.Release) |> List.distinct |> List.exactlyOne }
|> Project.NativeBashScript
let projectOutputDir = function
| VisualStudio p -> p.OutputDir
| NativeVisualStudio p -> p.OutputDir
| NativeBashScript p -> p.OutputDir
let projectRelease = function
| VisualStudio p -> p.Release
| NativeVisualStudio p -> p.Release
| NativeBashScript p -> p.Release
let projectNuGetPackages = function
| VisualStudio p -> p.NuGetPackages
| NativeVisualStudio p -> p.NuGetPackages
| NativeBashScript p -> p.NuGetPackages
let solution key solutionFile projects zipPackages =
{ Solution.Key = key
SolutionFile = solutionFile
Projects = projects
ZipPackages = zipPackages
Release = List.concat [ projects |> List.map projectRelease; zipPackages |> List.map (fun p -> p.Release) ] |> List.distinct |> List.exactlyOne
OutputDir = "out" </> key
OutputLibDir = "out" </> key </> "Lib"
OutputLibStrongNameDir = "out" </> key </> "Lib-StrongName"
OutputZipDir = "out" </> key </> "Zip"
OutputNuGetDir = "out" </> key </> "NuGet" }
let traceHeader (releases:Release list) =
Trace.log header
let titleLength = releases |> List.map (fun r -> r.Title.Length) |> List.max
for release in releases do
Trace.log ([ " "; release.Title.PadRight titleLength; " v"; release.PackageVersion ] |> String.concat "")
Trace.log ""
dotnet rootDir "--info"
Trace.log ""
// --------------------------------------------------------------------------------------
// PREPARE
// --------------------------------------------------------------------------------------
let private regexes_sl = new System.Collections.Generic.Dictionary<string, System.Text.RegularExpressions.Regex>()
let private getRegexSingleLine pattern =
match regexes_sl.TryGetValue pattern with
| true, regex -> regex
| _ -> (System.Text.RegularExpressions.Regex(pattern, System.Text.RegularExpressions.RegexOptions.Singleline))
let regex_replace_singleline pattern (replacement : string) text = (getRegexSingleLine pattern).Replace(text, replacement)
let patchVersionInResource path (release:Release) =
File.applyReplace
(String.regex_replace @"\d+\.\d+\.\d+\.\d+" release.AssemblyVersion
>> String.regex_replace @"\d+,\d+,\d+,\d+" (String.replace "." "," release.AssemblyVersion))
path
let patchVersionInProjectFile (project:Project) =
match project with
| VisualStudio p ->
let semverSplit = p.Release.PackageVersion.IndexOf('-')
let prefix = if semverSplit <= 0 then p.Release.PackageVersion else p.Release.PackageVersion.Substring(0, semverSplit)
let suffix = if semverSplit <= 0 then "" else p.Release.PackageVersion.Substring(semverSplit+1)
File.applyReplace
(String.regex_replace """\<PackageVersion\>.*\</PackageVersion\>""" (sprintf """<PackageVersion>%s</PackageVersion>""" p.Release.PackageVersion)
>> String.regex_replace """\<Version\>.*\</Version\>""" (sprintf """<Version>%s</Version>""" p.Release.PackageVersion)
>> String.regex_replace """\<AssemblyVersion\>.*\</AssemblyVersion\>""" (sprintf """<AssemblyVersion>%s</AssemblyVersion>""" p.Release.AssemblyVersion)
>> String.regex_replace """\<FileVersion\>.*\</FileVersion\>""" (sprintf """<FileVersion>%s</FileVersion>""" p.Release.AssemblyVersion)
>> String.regex_replace """\<VersionPrefix\>.*\</VersionPrefix\>""" (sprintf """<VersionPrefix>%s</VersionPrefix>""" prefix)
>> String.regex_replace """\<VersionSuffix\>.*\</VersionSuffix\>""" (sprintf """<VersionSuffix>%s</VersionSuffix>""" suffix)
>> regex_replace_singleline """\<PackageReleaseNotes\>.*\</PackageReleaseNotes\>""" (sprintf """<PackageReleaseNotes>%s</PackageReleaseNotes>""" (p.Release.ReleaseNotes.Replace("<","&lt;").Replace(">","&gt;"))))
p.ProjectFile
| NativeVisualStudio _ -> ()
| NativeBashScript _ -> ()
// --------------------------------------------------------------------------------------
// BUILD
// --------------------------------------------------------------------------------------
let clean (solution:Solution) = dotnet rootDir (sprintf "clean %s --configuration Release --verbosity minimal" solution.SolutionFile)
let restoreWeak (solution:Solution) = dotnetWeak rootDir (sprintf "restore %s --verbosity minimal" solution.SolutionFile)
let restoreStrong (solution:Solution) = dotnetStrong rootDir (sprintf "restore %s --verbosity minimal" solution.SolutionFile)
let buildWeak (solution:Solution) = dotnetWeak rootDir (sprintf "build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
let buildStrong (solution:Solution) = dotnetStrong rootDir (sprintf "build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
let packWeak (solution:Solution) = dotnetWeak rootDir (sprintf "pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
let packStrong (solution:Solution) = dotnetStrong rootDir (sprintf "pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
let packProjectWeak = function
| VisualStudio p -> dotnetWeak rootDir (sprintf "pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
| _ -> failwith "Project type not supported"
let packProjectStrong = function
| VisualStudio p -> dotnetStrong rootDir (sprintf "pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
| _ -> failwith "Project type not supported"
//let buildConfig config subject = MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [ "Configuration", config ] subject |> ignore
//let build subject = buildConfig "Release" subject
//let buildSigned subject = buildConfig "Release-Signed" subject
let buildConfig32 config subject = MSBuild.run id "" (if isIncremental then "Build" else "Rebuild") [("Configuration", config); ("Platform","Win32")] subject |> ignore<string list>
let buildConfig64 config subject = MSBuild.run id "" (if isIncremental then "Build" else "Rebuild") [("Configuration", config); ("Platform","x64")] subject |> ignore<string list>
// --------------------------------------------------------------------------------------
// COLLECT
// --------------------------------------------------------------------------------------
let collectBinaries (solution:Solution) =
solution.Projects |> List.iter (function
| VisualStudio project -> Shell.copyDir solution.OutputLibDir project.OutputDir (fun n -> n.Contains(project.AssemblyName + ".dll") || n.Contains(project.AssemblyName + ".pdb") || n.Contains(project.AssemblyName + ".xml"))
| _ -> failwith "Project type not supported")
let collectBinariesSN (solution:Solution) =
solution.Projects |> List.iter (function
| VisualStudio project -> Shell.copyDir solution.OutputLibStrongNameDir project.OutputDir (fun n -> n.Contains(project.AssemblyName + ".dll") || n.Contains(project.AssemblyName + ".pdb") || n.Contains(project.AssemblyName + ".xml"))
| _ -> failwith "Project type not supported")
let collectNuGetPackages (solution:Solution) =
solution.Projects |> List.iter (function
| VisualStudio project -> Shell.copyDir solution.OutputNuGetDir project.OutputDir (fun n -> n.EndsWith(".nupkg"))
| _ -> failwith "Project type not supported")
// --------------------------------------------------------------------------------------
// TEST
// --------------------------------------------------------------------------------------
let test testsDir testsProj framework =
dotnet testsDir (sprintf "run -p %s --configuration Release --framework %s --no-restore --no-build" testsProj framework)
// --------------------------------------------------------------------------------------
// PACKAGES
// --------------------------------------------------------------------------------------
let provideLicense path =
File.readAsString "LICENSE.md"
|> String.convertTextToWindowsLineBreaks
|> File.replaceContent (path </> "license.txt")
let provideReadme title (release:Release) path =
String.concat Environment.NewLine [header; " " + title; ""; File.readAsString release.ReleaseNotesFile]
|> String.convertTextToWindowsLineBreaks
|> File.replaceContent (path </> "readme.txt")
// SIGN
let sign fingerprint timeserver (solution: Solution) =
let files = solution.Projects |> Seq.collect (function
| VisualStudio project -> !! (project.OutputDir + "/**/" + project.AssemblyName + ".dll")
| _ -> failwith "Project type not supported")
let fileArgs = files |> Seq.map (sprintf "\"%s\"") |> String.concat " "
let optionsArgs = sprintf """/v /fd sha256 /sha1 "%s" /tr "%s" /td sha256""" fingerprint timeserver
let arguments = sprintf """sign %s %s""" optionsArgs fileArgs
let result =
CreateProcess.fromRawCommandLine (ProcessUtils.findLocalTool "SIGNTOOL" "signtool.exe" ["""C:\Program Files (x86)\Windows Kits\10\bin\x64"""]) arguments
|> CreateProcess.withTimeout (TimeSpan.FromMinutes 10.)
|> Proc.run
if result.ExitCode <> 0 then failwithf "Error during SignTool call "
let signNuGet fingerprint timeserver (solutions: Solution list) =
Shell.cleanDir "obj/NuGet"
solutions
|> Seq.collect (fun solution -> !! (solution.OutputNuGetDir </> "*.nupkg"))
|> Seq.distinct
|> Seq.iter (fun file ->
let args = sprintf """sign "%s" -HashAlgorithm SHA256 -TimestampHashAlgorithm SHA256 -CertificateFingerprint "%s" -Timestamper "%s""" (Path.getFullName file) fingerprint timeserver
let result =
CreateProcess.fromRawCommandLine "packages/build/NuGet.CommandLine/tools/NuGet.exe" args
|> CreateProcess.withWorkingDirectory (Path.getFullName "obj/NuGet")
|> CreateProcess.withTimeout (TimeSpan.FromMinutes 10.)
|> Proc.run
if result.ExitCode <> 0 then failwith "Error during NuGet sign.")
Directory.delete "obj/NuGet"
// ZIP
let zip (package:ZipPackage) zipDir filesDir filesFilter =
Shell.cleanDir "obj/Zip"
let workPath = "obj/Zip/" + package.Id
Shell.copyDir workPath filesDir filesFilter
provideLicense workPath
provideReadme (sprintf "%s v%s" package.Title package.Release.PackageVersion) package.Release workPath
Zip.zip "obj/Zip/" (zipDir </> sprintf "%s-%s.zip" package.Id package.Release.PackageVersion) !! (workPath + "/**/*.*")
Directory.delete "obj/Zip"
// NUGET
let updateNuspec (nuget:NuGetPackage) outPath (spec:NuGet.NuGet.NuGetParams) =
{ spec with ToolPath = "packages/build/NuGet.CommandLine/tools/NuGet.exe"
OutputPath = outPath
WorkingDir = "obj/NuGet"
Version = nuget.Release.PackageVersion
ReleaseNotes = nuget.Release.ReleaseNotes
Publish = false }
let nugetPackManually (solution:Solution) (packages:NuGetSpecification list) =
Shell.cleanDir "obj/NuGet"
for pack in packages do
provideLicense "obj/NuGet"
provideReadme (sprintf "%s v%s" pack.Title pack.NuGet.Release.PackageVersion) pack.NuGet.Release "obj/NuGet"
NuGet.NuGet (updateNuspec pack.NuGet solution.OutputNuGetDir) pack.NuSpecFile
Shell.cleanDir "obj/NuGet"
Directory.delete "obj/NuGet"
// --------------------------------------------------------------------------------------
// Documentation
// --------------------------------------------------------------------------------------
let provideDocExtraFiles extraDocs (releases:Release list) =
for (fileName, docName) in extraDocs do Shell.copyFile ("docs" </> docName) fileName
let menu = releases |> List.map (fun r -> sprintf "[%s](%s)" r.Title (r.ReleaseNotesFile |> String.replace "RELEASENOTES" "ReleaseNotes" |> String.replace ".md" ".html")) |> String.concat " | "
for release in releases do
String.concat Environment.NewLine
[ "# " + release.Title + " Release Notes"
menu
""
File.readAsString release.ReleaseNotesFile ]
|> File.replaceContent ("docs" </> (release.ReleaseNotesFile |> String.replace "RELEASENOTES" "ReleaseNotes"))
// --------------------------------------------------------------------------------------
// Publishing
// Requires permissions; intended only for maintainers
// --------------------------------------------------------------------------------------
let publishReleaseTag title prefix (release:Release) =
// inspired by Deedle/tpetricek
let tagName = prefix + "v" + release.PackageVersion
let tagMessage = String.concat Environment.NewLine [title + " v" + release.PackageVersion; ""; release.ReleaseNotes ]
let cmd = sprintf """tag -a %s -m "%s" """ tagName tagMessage
CommandHelper.runSimpleGitCommand "." cmd |> printfn "%s"
let _, remotes, _ = CommandHelper.runGitCommand "." "remote -v"
let main = remotes |> Seq.find (fun s -> s.Contains("(push)") && s.Contains("mathnet/mathnet-" + release.RepoKey))
let remoteName = main.Split('\t').[0]
Branches.pushTag "." remoteName tagName
let publishNuGet (solutions: Solution list) =
Shell.cleanDir "obj/NuGet"
let rec impl trials (file:string) =
Trace.log ("NuGet Push: " + System.IO.Path.GetFileName(file) + ".")
try
let result =
CreateProcess.fromRawCommandLine
"packages/build/NuGet.CommandLine/tools/NuGet.exe"
(sprintf """push "%s" -Source https://api.nuget.org/v3/index.json -T 900""" (Path.getFullName file))
|> CreateProcess.withWorkingDirectory (Path.getFullName "obj/NuGet")
|> CreateProcess.withTimeout (TimeSpan.FromMinutes 10.)
|> Proc.run
if result.ExitCode <> 0 then failwith "Error during NuGet push."
with exn ->
if trials > 0 then impl (trials-1) file
else ()
solutions
|> Seq.collect (fun solution -> !! (solution.OutputNuGetDir </> "*.nupkg"))
|> Seq.distinct
|> Seq.iter (impl 3)
Directory.delete "obj/NuGet"
let publishDocs (release:Release) =
let repo = "../web-mathnet-" + release.RepoKey
Branches.pull repo "origin" "gh-pages"
Shell.copyRecursive "out/docs" repo true |> printfn "%A"
Staging.stageAll repo
Commit.exec repo (sprintf "%s: %s docs update" release.Title release.PackageVersion)
Branches.pushBranch repo "origin" "gh-pages"
let publishApi (release:Release) =
let repo = "../web-mathnet-" + release.RepoKey
Branches.pull repo "origin" "gh-pages"
Shell.cleanDir (repo + "/api")
Shell.copyRecursive "out/api" (repo + "/api") true |> printfn "%A"
Staging.stageAll repo
Commit.exec repo (sprintf "%s: %s api update" release.Title release.PackageVersion)
Branches.pushBranch repo "origin" "gh-pages"
let publishNuGetToArchive (package:NuGetPackage) archivePath nupkgFile =
let tempDir = Path.GetTempPath() </> Path.GetRandomFileName()
let archiveDir = archivePath </> package.Id </> package.Release.PackageVersion
Shell.cleanDirs [tempDir; archiveDir]
nupkgFile |> Shell.copyFile archiveDir
use sha512 = System.Security.Cryptography.SHA512.Create()
let hash = File.ReadAllBytes nupkgFile |> sha512.ComputeHash |> Convert.ToBase64String
File.WriteAllText ((archiveDir </> (Path.GetFileName(nupkgFile) + ".sha512")), hash)
Zip.unzip tempDir nupkgFile
!! (tempDir </> "*.nuspec") |> Shell.copy archiveDir
Directory.delete tempDir
let publishArchiveManual title zipOutPath nugetOutPath (zipPackages:ZipPackage list) (nugetPackages:NuGetPackage list) =
let archivePath = (Environment.environVarOrFail "MathNetReleaseArchive") </> title
if Directory.Exists archivePath |> not then failwith "Release archive directory does not exists. Safety Check failed."
for zipPackage in zipPackages do
let zipFile = zipOutPath </> sprintf "%s-%s.zip" zipPackage.Id zipPackage.Release.PackageVersion
if File.exists zipFile then
zipFile |> Shell.copyFile (archivePath </> "Zip")
for nugetPackage in nugetPackages do
let nupkgFile = nugetOutPath </> sprintf "%s.%s.nupkg" nugetPackage.Id nugetPackage.Release.PackageVersion
if File.exists nupkgFile then
Trace.trace nupkgFile
publishNuGetToArchive nugetPackage (archivePath </> "NuGet") nupkgFile
let symbolsFile = nugetOutPath </> sprintf "%s.%s.symbols.nupkg" nugetPackage.Id nugetPackage.Release.PackageVersion
if File.exists symbolsFile then
symbolsFile |> Shell.copyFile (archivePath </> "Symbols")
let publishArchive (solution:Solution) =
let zipOutPath = solution.OutputZipDir
let nugetOutPath = solution.OutputNuGetDir
let zipPackages = solution.ZipPackages
let nugetPackages = solution.Projects |> List.collect projectNuGetPackages |> List.distinct
publishArchiveManual solution.Release.Title zipOutPath nugetOutPath zipPackages nugetPackages
let publishArchives (solutions: Solution list) = solutions |> List.iter publishArchive
#load "build/build-framework.fsx"
open BuildFramework
// --------------------------------------------------------------------------------------
@ -157,33 +636,28 @@ let allProjects = allSolutions |> List.collect (fun s -> s.Projects) |> List.dis
// PREPARE
// --------------------------------------------------------------------------------------
Target "Start" DoNothing
Target.create "Start" ignore
Target "Clean" (fun _ ->
DeleteDirs (!! "src/**/obj/" ++ "src/**/bin/" )
CleanDirs [ "out/api"; "out/docs" ]
CleanDirs [ "out/MKL"; "out/ATLAS"; "out/CUDA"; "out/OpenBLAS" ] // Native Providers
allSolutions |> List.iter (fun solution -> CleanDirs [ solution.OutputZipDir; solution.OutputNuGetDir; solution.OutputLibDir; solution.OutputLibStrongNameDir ]))
Target.create "Clean" (fun _ ->
Shell.deleteDirs (!! "src/**/obj/" ++ "src/**/bin/" )
Shell.cleanDirs [ "out/api"; "out/docs" ]
Shell.cleanDirs [ "out/MKL"; "out/ATLAS"; "out/CUDA"; "out/OpenBLAS" ] // Native Providers
allSolutions |> List.iter (fun solution -> Shell.cleanDirs [ solution.OutputZipDir; solution.OutputNuGetDir; solution.OutputLibDir; solution.OutputLibStrongNameDir ]))
Target "ApplyVersion" (fun _ ->
Target.create "ApplyVersion" (fun _ ->
allProjects |> List.iter patchVersionInProjectFile
patchVersionInAssemblyInfo "src/FSharp" numericsRelease
patchVersionInAssemblyInfo "src/TestData" numericsRelease
patchVersionInAssemblyInfo "src/Numerics.Tests" numericsRelease
patchVersionInAssemblyInfo "src/FSharp.Tests" numericsRelease
patchVersionInAssemblyInfo "src/Data.Tests" numericsRelease
patchVersionInResource "src/NativeProviders/MKL/resource.rc" mklRelease
patchVersionInResource "src/NativeProviders/CUDA/resource.rc" cudaRelease
patchVersionInResource "src/NativeProviders/OpenBLAS/resource.rc" openBlasRelease)
Target "Restore" (fun _ -> allSolutions |> List.iter restoreWeak)
Target.create "Restore" (fun _ -> allSolutions |> List.iter restoreWeak)
"Start"
=?> ("Clean", not (hasBuildParam "incremental"))
=?> ("Clean", not isIncremental)
==> "Restore"
Target "Prepare" DoNothing
Target.create "Prepare" ignore
"Start"
=?> ("Clean", not (hasBuildParam "incremental"))
=?> ("Clean", not isIncremental)
==> "ApplyVersion"
==> "Prepare"
@ -195,80 +669,78 @@ Target "Prepare" DoNothing
let fingerprint = "490408de3618bed0a28e68dc5face46e5a3a97dd"
let timeserver = "http://time.certum.pl/"
Target "Build" (fun _ ->
Target.create "Build" (fun _ ->
// Strong Name Build (with strong name, without certificate signature)
if hasBuildParam "strongname" then
CleanDirs (!! "src/**/obj/" ++ "src/**/bin/" )
if isStrongname then
Shell.cleanDirs (!! "src/**/obj/" ++ "src/**/bin/" )
restoreStrong numericsSolution
buildStrong numericsSolution
if isWindows && hasBuildParam "sign" then sign fingerprint timeserver numericsSolution
if isSign then sign fingerprint timeserver numericsSolution
collectBinariesSN numericsSolution
zip numericsStrongNameZipPackage numericsSolution.OutputZipDir numericsSolution.OutputLibStrongNameDir (fun f -> f.Contains("MathNet.Numerics.") || f.Contains("System.Threading.") || f.Contains("FSharp.Core."))
if isWindows then
packStrong numericsSolution
collectNuGetPackages numericsSolution
packStrong numericsSolution
collectNuGetPackages numericsSolution
// Normal Build (without strong name, with certificate signature)
CleanDirs (!! "src/**/obj/" ++ "src/**/bin/" )
Shell.cleanDirs (!! "src/**/obj/" ++ "src/**/bin/" )
restoreWeak numericsSolution
buildWeak numericsSolution
if isWindows && hasBuildParam "sign" then sign fingerprint timeserver numericsSolution
if isSign then sign fingerprint timeserver numericsSolution
collectBinaries numericsSolution
zip numericsZipPackage numericsSolution.OutputZipDir numericsSolution.OutputLibDir (fun f -> f.Contains("MathNet.Numerics.") || f.Contains("System.Threading.") || f.Contains("FSharp.Core."))
if isWindows then
packWeak numericsSolution
collectNuGetPackages numericsSolution
packWeak numericsSolution
collectNuGetPackages numericsSolution
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [numericsSolution]
if isSign then signNuGet fingerprint timeserver [numericsSolution]
)
"Prepare" ==> "Build"
Target "MklWinBuild" (fun _ ->
Target.create "MklWinBuild" (fun _ ->
restoreWeak mklSolution
buildConfig32 "Release-MKL" !! "MathNet.Numerics.MKL.sln"
buildConfig64 "Release-MKL" !! "MathNet.Numerics.MKL.sln"
CreateDir mklSolution.OutputZipDir
Directory.create mklSolution.OutputZipDir
zip mklWinZipPackage mklSolution.OutputZipDir "out/MKL/Windows" (fun f -> f.Contains("MathNet.Numerics.MKL.") || f.Contains("libiomp5md.dll"))
CreateDir mklSolution.OutputNuGetDir
Directory.create mklSolution.OutputNuGetDir
nugetPackManually mklSolution [ mklWinPack; mklWin32Pack; mklWin64Pack ]
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [mklSolution]
if isSign then signNuGet fingerprint timeserver [mklSolution]
)
"Prepare" ==> "MklWinBuild"
Target "CudaWinBuild" (fun _ ->
Target.create "CudaWinBuild" (fun _ ->
restoreWeak cudaSolution
buildConfig64 "Release-CUDA" !! "MathNet.Numerics.CUDA.sln"
CreateDir cudaSolution.OutputZipDir
Directory.create cudaSolution.OutputZipDir
zip cudaWinZipPackage cudaSolution.OutputZipDir "out/CUDA/Windows" (fun f -> f.Contains("MathNet.Numerics.CUDA.") || f.Contains("cublas") || f.Contains("cudart") || f.Contains("cusolver"))
CreateDir cudaSolution.OutputNuGetDir
Directory.create cudaSolution.OutputNuGetDir
nugetPackManually cudaSolution [ cudaWinPack ]
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [cudaSolution]
if isSign then signNuGet fingerprint timeserver [cudaSolution]
)
"Prepare" ==> "CudaWinBuild"
Target "OpenBlasWinBuild" (fun _ ->
Target.create "OpenBlasWinBuild" (fun _ ->
restoreWeak openBlasSolution
buildConfig32 "Release-OpenBLAS" !! "MathNet.Numerics.OpenBLAS.sln"
buildConfig64 "Release-OpenBLAS" !! "MathNet.Numerics.OpenBLAS.sln"
CreateDir openBlasSolution.OutputZipDir
Directory.create openBlasSolution.OutputZipDir
zip openBlasWinZipPackage openBlasSolution.OutputZipDir "out/OpenBLAS/Windows" (fun f -> f.Contains("MathNet.Numerics.OpenBLAS.") || f.Contains("libgcc") || f.Contains("libgfortran") || f.Contains("libopenblas") || f.Contains("libquadmath"))
CreateDir openBlasSolution.OutputNuGetDir
Directory.create openBlasSolution.OutputNuGetDir
nugetPackManually openBlasSolution [ openBlasWinPack ]
// NuGet Sign (all or nothing)
if isWindows && hasBuildParam "sign" then signNuGet fingerprint timeserver [openBlasSolution]
if isSign then signNuGet fingerprint timeserver [openBlasSolution]
)
"Prepare" ==> "OpenBlasWinBuild"
@ -279,63 +751,63 @@ Target "OpenBlasWinBuild" (fun _ ->
// --------------------------------------------------------------------------------------
let testNumerics framework = test "src/Numerics.Tests" "Numerics.Tests.csproj" framework
Target "TestNumerics" DoNothing
Target "TestNumericsNET50" (fun _ -> testNumerics "net5.0")
Target "TestNumericsNET48" (fun _ -> testNumerics "net48")
Target.create "TestNumerics" ignore
Target.create "TestNumericsNET50" (fun _ -> testNumerics "net5.0")
Target.create "TestNumericsNET48" (fun _ -> testNumerics "net48")
"Build" ==> "TestNumericsNET50" ==> "TestNumerics"
"Build" =?> ("TestNumericsNET48", isWindows) ==> "TestNumerics"
"Build" =?> ("TestNumericsNET48", Environment.isWindows) ==> "TestNumerics"
let testFsharp framework = test "src/FSharp.Tests" "FSharp.Tests.fsproj" framework
Target "TestFsharp" DoNothing
Target "TestFsharpNET50" (fun _ -> testFsharp "net5.0")
Target "TestFsharpNET48" (fun _ -> testFsharp "net48")
Target.create "TestFsharp" ignore
Target.create "TestFsharpNET50" (fun _ -> testFsharp "net5.0")
Target.create "TestFsharpNET48" (fun _ -> testFsharp "net48")
"Build" ==> "TestFsharpNET50" ==> "TestFsharp"
"Build" =?> ("TestFsharpNET48", isWindows) ==> "TestFsharp"
"Build" =?> ("TestFsharpNET48", Environment.isWindows) ==> "TestFsharp"
let testData framework = test "src/Data.Tests" "Data.Tests.csproj" framework
Target "TestData" DoNothing
Target "TestDataNET50" (fun _ -> testData "net5.0")
Target "TestDataNET48" (fun _ -> testData "net48")
Target.create "TestData" ignore
Target.create "TestDataNET50" (fun _ -> testData "net5.0")
Target.create "TestDataNET48" (fun _ -> testData "net48")
"Build" ==> "TestDataNET50" ==> "TestData"
"Build" =?> ("TestDataNET48", isWindows) ==> "TestData"
Target "Test" DoNothing
"Build" =?> ("TestDataNET48", Environment.isWindows) ==> "TestData"
Target.create "Test" ignore
"TestNumerics" ==> "Test"
"TestFsharp" ==> "Test"
"TestData" ==> "Test"
let testMKL framework = test "src/Numerics.Tests" "Numerics.Tests.MKL.csproj" framework
Target "MklTest" DoNothing
Target "MklTestNET50" (fun _ -> testMKL "net5.0")
Target "MklTestNET48" (fun _ -> testMKL "net48")
Target.create "MklTest" ignore
Target.create "MklTestNET50" (fun _ -> testMKL "net5.0")
Target.create "MklTestNET48" (fun _ -> testMKL "net48")
"MklWinBuild" ==> "MklTestNET50" ==> "MklTest"
"MklWinBuild" =?> ("MklTestNET48", isWindows) ==> "MklTest"
"MklWinBuild" =?> ("MklTestNET48", Environment.isWindows) ==> "MklTest"
let testOpenBLAS framework = test "src/Numerics.Tests" "Numerics.Tests.OpenBLAS.csproj" framework
Target "OpenBlasTest" DoNothing
Target "OpenBlasTestNET50" (fun _ -> testOpenBLAS "net5.0")
Target "OpenBlasTestNET48" (fun _ -> testOpenBLAS "net48")
Target.create "OpenBlasTest" ignore
Target.create "OpenBlasTestNET50" (fun _ -> testOpenBLAS "net5.0")
Target.create "OpenBlasTestNET48" (fun _ -> testOpenBLAS "net48")
"OpenBlasWinBuild" ==> "OpenBlasTestNET50" ==> "OpenBlasTest"
"OpenBlasWinBuild" =?> ("OpenBlasTestNET48", isWindows) ==> "OpenBlasTest"
"OpenBlasWinBuild" =?> ("OpenBlasTestNET48", Environment.isWindows) ==> "OpenBlasTest"
let testCUDA framework = test "src/Numerics.Tests" "Numerics.Tests.CUDA.csproj" framework
Target "CudaTest" DoNothing
Target "CudaTestNET50" (fun _ -> testCUDA "net5.0")
Target "CudaTestNET48" (fun _ -> testCUDA "net48")
Target.create "CudaTest" ignore
Target.create "CudaTestNET50" (fun _ -> testCUDA "net5.0")
Target.create "CudaTestNET48" (fun _ -> testCUDA "net48")
"CudaWinBuild" ==> "CudaTestNET50" ==> "CudaTest"
"CudaWinBuild" =?> ("CudaTestNET48", isWindows) ==> "CudaTest"
"CudaWinBuild" =?> ("CudaTestNET48", Environment.isWindows) ==> "CudaTest"
// --------------------------------------------------------------------------------------
// LINUX PACKAGES
// --------------------------------------------------------------------------------------
Target "MklLinuxPack" DoNothing
Target.create "MklLinuxPack" ignore
Target "MklLinuxZip" (fun _ ->
CreateDir mklSolution.OutputZipDir
Target.create "MklLinuxZip" (fun _ ->
Directory.create mklSolution.OutputZipDir
zip mklLinuxZipPackage mklSolution.OutputZipDir "out/MKL/Linux" (fun f -> f.Contains("MathNet.Numerics.MKL.") || f.Contains("libiomp5.so")))
"MklLinuxZip" ==> "MklLinuxPack"
Target "MklLinuxNuGet" (fun _ ->
CreateDir mklSolution.OutputNuGetDir
Target.create "MklLinuxNuGet" (fun _ ->
Directory.create mklSolution.OutputNuGetDir
nugetPackManually mklSolution [ mklLinuxPack; mklLinux32Pack; mklLinux64Pack ])
"MklLinuxNuGet" ==> "MklLinuxPack"
@ -346,52 +818,49 @@ Target "MklLinuxNuGet" (fun _ ->
// DOCS
Target "CleanDocs" (fun _ -> CleanDirs ["out/docs"])
Target.create "CleanDocs" (fun _ -> Shell.cleanDirs ["out/docs"])
let extraDocs =
[ "LICENSE.md", "License.md"
"CONTRIBUTING.md", "Contributing.md"
"CONTRIBUTORS.md", "Contributors.md" ]
Target "Docs" (fun _ ->
Target.create "Docs" (fun _ ->
provideDocExtraFiles extraDocs releases
dotnet rootDir "fsdocs build --noapidocs --output out/docs")
Target.create "DocsDev" (fun _ ->
provideDocExtraFiles extraDocs releases
generateDocs true false)
Target "DocsDev" (fun _ ->
provideDocExtraFiles extraDocs releases
generateDocs true true)
Target "DocsWatch" (fun _ ->
provideDocExtraFiles extraDocs releases
use watcher = new FileSystemWatcher(DirectoryInfo("docs/content").FullName, "*.*")
watcher.EnableRaisingEvents <- true
watcher.Changed.Add(fun e -> generateDocs false true)
watcher.Created.Add(fun e -> generateDocs false true)
watcher.Renamed.Add(fun e -> generateDocs false true)
watcher.Deleted.Add(fun e -> generateDocs false true)
traceImportant "Waiting for docs edits. Press any key to stop."
System.Console.ReadKey() |> ignore
watcher.EnableRaisingEvents <- false
watcher.Dispose())
dotnet rootDir "fsdocs build --noapidocs --output out/docs")
Target.create "DocsWatch" (fun _ ->
provideDocExtraFiles extraDocs releases
dotnet rootDir "fsdocs build --noapidocs --output out/docs"
dotnet rootDir "fsdocs watch --noapidocs --output out/docs")
"Build" ==> "CleanDocs" ==> "Docs"
"Start"
=?> ("CleanDocs", not (hasBuildParam "incremental"))
=?> ("CleanDocs", not isIncremental)
==> "DocsDev"
==> "DocsWatch"
// API REFERENCE
Target "CleanApi" (fun _ -> CleanDirs ["out/api"])
Target "Api" (fun _ ->
!! "src/Numerics/bin/Release/net461/MathNet.Numerics.dll"
|> Docu (fun p ->
{ p with
ToolPath = "tools/docu/docu.exe"
TemplatesPath = "tools/docu/templates/"
TimeOut = TimeSpan.FromMinutes 10.
OutputPath = "out/api/" }))
Target.create "CleanApi" (fun _ -> Shell.cleanDirs ["out/api"])
Target.create "Api" (fun _ ->
let result =
CreateProcess.fromRawCommandLine
"tools/docu/docu.exe"
([
rootDir </> "src/Numerics/bin/Release/net461/MathNet.Numerics.dll" |> Path.getFullName
"--output=" + (rootDir </> "out/api/" |> Path.getFullName)
"--templates=" + (rootDir </> "tools/docu/templates/" |> Path.getFullName)
] |> String.concat " ")
|> CreateProcess.withWorkingDirectory rootDir
|> CreateProcess.withTimeout (TimeSpan.FromMinutes 10.)
|> Proc.run
if result.ExitCode <> 0 then failwith "Error during API reference generation." )
"Build" ==> "CleanApi" ==> "Api"
@ -401,51 +870,51 @@ Target "Api" (fun _ ->
// Requires permissions; intended only for maintainers
// --------------------------------------------------------------------------------------
Target "PublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics" "" numericsRelease)
Target "MklPublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics MKL Provider" "mkl-" mklRelease)
Target "CudaPublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics CUDA Provider" "cuda-" cudaRelease)
Target "OpenBlasPublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics OpenBLAS Provider" "openblas-" openBlasRelease)
Target.create "PublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics" "" numericsRelease)
Target.create "MklPublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics MKL Provider" "mkl-" mklRelease)
Target.create "CudaPublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics CUDA Provider" "cuda-" cudaRelease)
Target.create "OpenBlasPublishTag" (fun _ -> publishReleaseTag "Math.NET Numerics OpenBLAS Provider" "openblas-" openBlasRelease)
Target "PublishDocs" (fun _ -> publishDocs numericsRelease)
Target "PublishApi" (fun _ -> publishApi numericsRelease)
Target.create "PublishDocs" (fun _ -> publishDocs numericsRelease)
Target.create "PublishApi" (fun _ -> publishApi numericsRelease)
Target "PublishArchive" (fun _ -> publishArchives [numericsSolution])
Target "MklPublishArchive" (fun _ -> publishArchives [mklSolution])
Target "CudaPublishArchive" (fun _ -> publishArchives [cudaSolution])
Target "OpenBlasPublishArchive" (fun _ -> publishArchives [openBlasSolution])
Target.create "PublishArchive" (fun _ -> publishArchives [numericsSolution])
Target.create "MklPublishArchive" (fun _ -> publishArchives [mklSolution])
Target.create "CudaPublishArchive" (fun _ -> publishArchives [cudaSolution])
Target.create "OpenBlasPublishArchive" (fun _ -> publishArchives [openBlasSolution])
Target "PublishNuGet" (fun _ -> publishNuGet [numericsSolution])
Target "MklPublishNuGet" (fun _ -> publishNuGet [mklSolution])
Target "CudaPublishNuGet" (fun _ -> publishNuGet [cudaSolution])
Target "OpenBlasPublishNuGet" (fun _ -> publishNuGet [openBlasSolution])
Target.create "PublishNuGet" (fun _ -> publishNuGet [numericsSolution])
Target.create "MklPublishNuGet" (fun _ -> publishNuGet [mklSolution])
Target.create "CudaPublishNuGet" (fun _ -> publishNuGet [cudaSolution])
Target.create "OpenBlasPublishNuGet" (fun _ -> publishNuGet [openBlasSolution])
Target "Publish" DoNothing
Dependencies "Publish" [ "PublishTag"; "PublishDocs"; "PublishApi"; "PublishArchive"; "PublishNuGet" ]
Target.create "Publish" ignore
"Publish" <== [ "PublishTag"; "PublishDocs"; "PublishApi"; "PublishArchive"; "PublishNuGet" ]
Target "MklPublish" DoNothing
Dependencies "MklPublish" [ "MklPublishTag"; "PublishDocs"; "MklPublishArchive"; "MklPublishNuGet" ]
Target.create "MklPublish" ignore
"MklPublish" <== [ "MklPublishTag"; "PublishDocs"; "MklPublishArchive"; "MklPublishNuGet" ]
Target "CudaPublish" DoNothing
Dependencies "CudaPublish" [ "CudaPublishTag"; "PublishDocs"; "CudaPublishArchive"; "CudaPublishNuGet" ]
Target.create "CudaPublish" ignore
"CudaPublish" <== [ "CudaPublishTag"; "PublishDocs"; "CudaPublishArchive"; "CudaPublishNuGet" ]
Target "OpenBlasPublish" DoNothing
Dependencies "OpenBlasPublish" [ "OpenBlasPublishTag"; "PublishDocs"; "OpenBlasPublishArchive"; "OpenBlasPublishNuGet" ]
Target.create "OpenBlasPublish" ignore
"OpenBlasPublish" <== [ "OpenBlasPublishTag"; "PublishDocs"; "OpenBlasPublishArchive"; "OpenBlasPublishNuGet" ]
// --------------------------------------------------------------------------------------
// Default Targets
// --------------------------------------------------------------------------------------
Target "All" DoNothing
Dependencies "All" [ "Build"; "Docs"; "Api"; "Test" ]
Target.create "All" ignore
"All" <== [ "Build"; "Docs"; "Api"; "Test" ]
Target "MklWinAll" DoNothing
Dependencies "MklWinAll" [ "MklWinBuild"; "MklTest" ]
Target.create "MklWinAll" ignore
"MklWinAll" <== [ "MklWinBuild"; "MklTest" ]
Target "CudaWinAll" DoNothing
Dependencies "CudaWinAll" [ "CudaWinBuild"; "CudaTest" ]
Target.create "CudaWinAll" ignore
"CudaWinAll" <== [ "CudaWinBuild"; "CudaTest" ]
Target "OpenBlasWinAll" DoNothing
Dependencies "OpenBlasWinAll" [ "OpenBlasWinBuild"; "OpenBlasTest" ]
Target.create "OpenBlasWinAll" ignore
"OpenBlasWinAll" <== [ "OpenBlasWinBuild"; "OpenBlasTest" ]
RunTargetOrDefault "Test"
Target.runOrDefaultWithArguments "Test"

31
build.sh

@ -7,33 +7,4 @@ cd "$(dirname "$0")"
dotnet tool restore
dotnet paket restore
FAKE_EXE=packages/build/FAKE/tools/FAKE.exe
FSIARGS=""
FSIARGS2=""
OS=${OS:-"unknown"}
if [[ "$OS" != "Windows_NT" ]]
then
FSIARGS="--fsiargs"
FSIARGS2="-d:MONO"
# Allows NETFramework like net45 to be built using dotnet core tooling with mono
export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/
fi
function run() {
if [[ "$OS" != "Windows_NT" ]]
then
mono "$@"
else
"$@"
fi
}
if [[ "$OS" != "Windows_NT" ]] && [ ! -e ~/.config/.mono/certs ]
then
mozroots --import --sync --quiet
fi
run $FAKE_EXE "$@" $FSIARGS $FSIARGS2 build.fsx
dotnet fake run build.fsx -t "$@"

0
src/MathNet.Numerics.snk → build/MathNet.Numerics.snk

536
build/build-framework.fsx

@ -1,536 +0,0 @@
// __ __ _ _ _ _ ______ _______
// | \/ | | | | | | \ | | ____|__ __|
// | \ / | __ _| |_| |__ | \| | |__ | |
// | |\/| |/ _` | __| '_ \ | . ` | __| | |
// | | | | (_| | |_| | | |_| |\ | |____ | |
// |_| |_|\__,_|\__|_| |_(_)_| \_|______| |_|
//
// Math.NET Numerics - https://numerics.mathdotnet.com
// Copyright (c) Math.NET - Open Source MIT/X11 License
//
// Build Framework using FAKE (http://fsharp.github.io/FAKE)
//
module BuildFramework
#I "../packages/build/FAKE/tools"
#r "../packages/build/FAKE/tools/FakeLib.dll"
open FSharp.Core
open Fake
open Fake.ReleaseNotesHelper
open System
open System.IO
let rootDir = Path.GetFullPath (Path.Combine (__SOURCE_DIRECTORY__ + "/../"))
Environment.CurrentDirectory <- rootDir
trace rootDir
// --------------------------------------------------------------------------------------
// .Net SDK
// --------------------------------------------------------------------------------------
let dotnet workingDir command =
let properties =
[
]
let suffix = properties |> List.map (fun (name, value) -> sprintf """ /p:%s="%s" /nr:false """ name value) |> String.concat ""
DotNetCli.RunCommand
(fun c -> { c with WorkingDir = workingDir})
(command + suffix)
let dotnetWeak workingDir command =
let properties =
[
yield "StrongName", "False"
]
let suffix = properties |> List.map (fun (name, value) -> sprintf """ /p:%s="%s" /nr:false """ name value) |> String.concat ""
DotNetCli.RunCommand
(fun c -> { c with WorkingDir = workingDir })
(command + suffix)
let dotnetStrong workingDir command =
let properties =
[
yield "StrongName", "True"
]
let suffix = properties |> List.map (fun (name, value) -> sprintf """ /p:%s="%s" /nr:false """ name value) |> String.concat ""
DotNetCli.RunCommand
(fun c -> { c with WorkingDir = workingDir})
(command + suffix)
// --------------------------------------------------------------------------------------
// Header
// --------------------------------------------------------------------------------------
let header = ReadFile(__SOURCE_DIRECTORY__ </> __SOURCE_FILE__) |> Seq.take 10 |> Seq.map (fun s -> s.Substring(2)) |> toLines
type Release =
{ RepoKey: string
Title: string
AssemblyVersion: string
PackageVersion: string
ReleaseNotes: string
ReleaseNotesFile: string }
type ZipPackage =
{ Id: string
Release: Release
Title: string }
type NuGetPackage =
{ Id: string
Release: Release }
type VisualStudioProject =
{ AssemblyName: string
ProjectFile: string
OutputDir: string
Release: Release
NuGetPackages: NuGetPackage list }
type NativeVisualStudioProject =
{ BinaryName: string
ProjectFile: string
OutputDir: string
Release: Release
NuGetPackages: NuGetPackage list }
type NativeBashScriptProject =
{ BinaryName: string
BashScriptFile: string
OutputDir: string
Release: Release
NuGetPackages: NuGetPackage list }
type Project =
| VisualStudio of VisualStudioProject
| NativeVisualStudio of NativeVisualStudioProject
| NativeBashScript of NativeBashScriptProject
type Solution =
{ Key: string
SolutionFile: string
Projects: Project list
Release: Release
ZipPackages: ZipPackage list
OutputDir: string
OutputLibDir: string
OutputLibStrongNameDir: string
OutputZipDir: string
OutputNuGetDir: string }
type NuGetSpecification =
{ NuGet: NuGetPackage
NuSpecFile: string
Title: string }
let release repoKey title releaseNotesFile : Release =
let info = LoadReleaseNotes releaseNotesFile
let buildPart = "0"
let assemblyVersion = info.AssemblyVersion + "." + buildPart
let packageVersion = info.NugetVersion
let notes = info.Notes |> List.map (fun l -> l.Replace("*","").Replace("`","")) |> toLines
{ Release.RepoKey = repoKey
Title = title
AssemblyVersion = assemblyVersion
PackageVersion = packageVersion
ReleaseNotes = notes
ReleaseNotesFile = releaseNotesFile }
let zipPackage packageId title release =
{ ZipPackage.Id = packageId
Title = title
Release = release }
let nugetPackage packageId release =
{ NuGetPackage.Id = packageId
Release = release }
let project assemblyName projectFile nuGetPackages =
{ VisualStudioProject.AssemblyName = assemblyName
ProjectFile = projectFile
OutputDir = (Path.GetDirectoryName projectFile) </> "bin" </> "Release"
NuGetPackages = nuGetPackages
Release = nuGetPackages |> List.map (fun p -> p.Release) |> List.distinct |> List.exactlyOne }
|> Project.VisualStudio
let nativeProject binaryName projectFile nuGetPackages =
{ NativeVisualStudioProject.BinaryName = binaryName
ProjectFile = projectFile
OutputDir = (Path.GetDirectoryName projectFile) </> "bin" </> "Release"
NuGetPackages = nuGetPackages
Release = nuGetPackages |> List.map (fun p -> p.Release) |> List.distinct |> List.exactlyOne }
|> Project.NativeVisualStudio
let nativeBashScriptProject binaryName bashScriptFile nuGetPackages =
{ NativeBashScriptProject.BinaryName = binaryName
BashScriptFile = bashScriptFile
OutputDir = (Path.GetDirectoryName bashScriptFile) </> "bin" </> "Release"
NuGetPackages = nuGetPackages
Release = nuGetPackages |> List.map (fun p -> p.Release) |> List.distinct |> List.exactlyOne }
|> Project.NativeBashScript
let projectOutputDir = function
| VisualStudio p -> p.OutputDir
| NativeVisualStudio p -> p.OutputDir
| NativeBashScript p -> p.OutputDir
let projectRelease = function
| VisualStudio p -> p.Release
| NativeVisualStudio p -> p.Release
| NativeBashScript p -> p.Release
let projectNuGetPackages = function
| VisualStudio p -> p.NuGetPackages
| NativeVisualStudio p -> p.NuGetPackages
| NativeBashScript p -> p.NuGetPackages
let solution key solutionFile projects zipPackages =
{ Solution.Key = key
SolutionFile = solutionFile
Projects = projects
ZipPackages = zipPackages
Release = List.concat [ projects |> List.map projectRelease; zipPackages |> List.map (fun p -> p.Release) ] |> List.distinct |> List.exactlyOne
OutputDir = "out" </> key
OutputLibDir = "out" </> key </> "Lib"
OutputLibStrongNameDir = "out" </> key </> "Lib-StrongName"
OutputZipDir = "out" </> key </> "Zip"
OutputNuGetDir = "out" </> key </> "NuGet" }
let traceHeader (releases:Release list) =
trace header
let titleLength = releases |> List.map (fun r -> r.Title.Length) |> List.max
for release in releases do
trace ([ " "; release.Title.PadRight titleLength; " v"; release.PackageVersion ] |> String.concat "")
trace ""
dotnet rootDir "--info"
trace ""
// --------------------------------------------------------------------------------------
// PREPARE
// --------------------------------------------------------------------------------------
let patchVersionInAssemblyInfo path (release:Release) =
BulkReplaceAssemblyInfoVersions path (fun f ->
{ f with
AssemblyVersion = release.AssemblyVersion
AssemblyFileVersion = release.AssemblyVersion
AssemblyInformationalVersion = release.PackageVersion })
let private regexes_sl = new System.Collections.Generic.Dictionary<string, System.Text.RegularExpressions.Regex>()
let private getRegexSingleLine pattern =
match regexes_sl.TryGetValue pattern with
| true, regex -> regex
| _ -> (new System.Text.RegularExpressions.Regex(pattern, System.Text.RegularExpressions.RegexOptions.Singleline))
let regex_replace_singleline pattern (replacement : string) text = (getRegexSingleLine pattern).Replace(text, replacement)
let patchVersionInResource path (release:Release) =
ReplaceInFile
(regex_replace @"\d+\.\d+\.\d+\.\d+" release.AssemblyVersion
>> regex_replace @"\d+,\d+,\d+,\d+" (replace "." "," release.AssemblyVersion))
path
let patchVersionInProjectFile (project:Project) =
match project with
| VisualStudio p ->
let semverSplit = p.Release.PackageVersion.IndexOf('-')
let prefix = if semverSplit <= 0 then p.Release.PackageVersion else p.Release.PackageVersion.Substring(0, semverSplit)
let suffix = if semverSplit <= 0 then "" else p.Release.PackageVersion.Substring(semverSplit+1)
ReplaceInFile
(regex_replace """\<PackageVersion\>.*\</PackageVersion\>""" (sprintf """<PackageVersion>%s</PackageVersion>""" p.Release.PackageVersion)
>> regex_replace """\<Version\>.*\</Version\>""" (sprintf """<Version>%s</Version>""" p.Release.PackageVersion)
>> regex_replace """\<AssemblyVersion\>.*\</AssemblyVersion\>""" (sprintf """<AssemblyVersion>%s</AssemblyVersion>""" p.Release.AssemblyVersion)
>> regex_replace """\<FileVersion\>.*\</FileVersion\>""" (sprintf """<FileVersion>%s</FileVersion>""" p.Release.AssemblyVersion)
>> regex_replace """\<VersionPrefix\>.*\</VersionPrefix\>""" (sprintf """<VersionPrefix>%s</VersionPrefix>""" prefix)
>> regex_replace """\<VersionSuffix\>.*\</VersionSuffix\>""" (sprintf """<VersionSuffix>%s</VersionSuffix>""" suffix)
>> regex_replace_singleline """\<PackageReleaseNotes\>.*\</PackageReleaseNotes\>""" (sprintf """<PackageReleaseNotes>%s</PackageReleaseNotes>""" (p.Release.ReleaseNotes.Replace("<","&lt;").Replace(">","&gt;"))))
p.ProjectFile
| NativeVisualStudio _ -> ()
| NativeBashScript _ -> ()
// --------------------------------------------------------------------------------------
// BUILD
// --------------------------------------------------------------------------------------
let clean (solution:Solution) = dotnet rootDir (sprintf "clean %s --configuration Release --verbosity minimal" solution.SolutionFile)
let restoreWeak (solution:Solution) = dotnetWeak rootDir (sprintf "restore %s --verbosity minimal" solution.SolutionFile)
let restoreStrong (solution:Solution) = dotnetStrong rootDir (sprintf "restore %s --verbosity minimal" solution.SolutionFile)
let buildWeak (solution:Solution) = dotnetWeak rootDir (sprintf "build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
let buildStrong (solution:Solution) = dotnetStrong rootDir (sprintf "build %s --configuration Release --no-incremental --no-restore --verbosity minimal" solution.SolutionFile)
let packWeak (solution:Solution) = dotnetWeak rootDir (sprintf "pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
let packStrong (solution:Solution) = dotnetStrong rootDir (sprintf "pack %s --configuration Release --no-restore --verbosity minimal" solution.SolutionFile)
let packProjectWeak = function
| VisualStudio p -> dotnetWeak rootDir (sprintf "pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
| _ -> failwith "Project type not supported"
let packProjectStrong = function
| VisualStudio p -> dotnetStrong rootDir (sprintf "pack %s --configuration Release --no-restore --no-build" p.ProjectFile)
| _ -> failwith "Project type not supported"
//let buildConfig config subject = MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [ "Configuration", config ] subject |> ignore
//let build subject = buildConfig "Release" subject
//let buildSigned subject = buildConfig "Release-Signed" subject
let buildConfig32 config subject = MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [("Configuration", config); ("Platform","Win32")] subject |> ignore
let buildConfig64 config subject = MSBuild "" (if hasBuildParam "incremental" then "Build" else "Rebuild") [("Configuration", config); ("Platform","x64")] subject |> ignore
// --------------------------------------------------------------------------------------
// COLLECT
// --------------------------------------------------------------------------------------
let collectBinaries (solution:Solution) =
solution.Projects |> List.iter (function
| VisualStudio project -> CopyDir solution.OutputLibDir project.OutputDir (fun n -> n.Contains(project.AssemblyName + ".dll") || n.Contains(project.AssemblyName + ".pdb") || n.Contains(project.AssemblyName + ".xml"))
| _ -> failwith "Project type not supported")
let collectBinariesSN (solution:Solution) =
solution.Projects |> List.iter (function
| VisualStudio project -> CopyDir solution.OutputLibStrongNameDir project.OutputDir (fun n -> n.Contains(project.AssemblyName + ".dll") || n.Contains(project.AssemblyName + ".pdb") || n.Contains(project.AssemblyName + ".xml"))
| _ -> failwith "Project type not supported")
let collectNuGetPackages (solution:Solution) =
solution.Projects |> List.iter (function
| VisualStudio project -> CopyDir solution.OutputNuGetDir project.OutputDir (fun n -> n.EndsWith(".nupkg"))
| _ -> failwith "Project type not supported")
// --------------------------------------------------------------------------------------
// TEST
// --------------------------------------------------------------------------------------
let test testsDir testsProj framework =
dotnet testsDir (sprintf "run -p %s --configuration Release --framework %s --no-restore --no-build" testsProj framework)
// --------------------------------------------------------------------------------------
// PACKAGES
// --------------------------------------------------------------------------------------
let provideLicense path =
ReadFileAsString "LICENSE.md"
|> ConvertTextToWindowsLineBreaks
|> ReplaceFile (path </> "license.txt")
let provideReadme title (release:Release) path =
String.concat Environment.NewLine [header; " " + title; ""; ReadFileAsString release.ReleaseNotesFile]
|> ConvertTextToWindowsLineBreaks
|> ReplaceFile (path </> "readme.txt")
// SIGN
let sign fingerprint timeserver (solution: Solution) =
let files = solution.Projects |> Seq.collect (function
| VisualStudio project -> !! (project.OutputDir + "/**/" + project.AssemblyName + ".dll")
| _ -> failwith "Project type not supported")
let fileArgs = files |> Seq.map (sprintf "\"%s\"") |> String.concat " "
let optionsArgs = sprintf """/v /fd sha256 /sha1 "%s" /tr "%s" /td sha256""" fingerprint timeserver
let arguments = sprintf """sign %s %s""" optionsArgs fileArgs
let result =
ExecProcess (fun info ->
info.FileName <- findToolInSubPath "signtool.exe" """C:\Program Files (x86)\Windows Kits\10\bin\x64"""
info.Arguments <- arguments) TimeSpan.MaxValue
if result <> 0 then
failwithf "Error during SignTool call "
let signNuGet fingerprint timeserver (solutions: Solution list) =
CleanDir "obj/NuGet"
solutions
|> Seq.collect (fun solution -> !! (solution.OutputNuGetDir </> "*.nupkg"))
|> Seq.distinct
|> Seq.iter (fun file ->
let args = sprintf """sign "%s" -HashAlgorithm SHA256 -TimestampHashAlgorithm SHA256 -CertificateFingerprint "%s" -Timestamper "%s""" (FullName file) fingerprint timeserver
let result =
ExecProcess (fun info ->
info.FileName <- "packages/build/NuGet.CommandLine/tools/NuGet.exe"
info.WorkingDirectory <- FullName "obj/NuGet"
info.Arguments <- args) (TimeSpan.FromMinutes 10.)
if result <> 0 then failwith "Error during NuGet sign.")
DeleteDir "obj/NuGet"
// ZIP
let zip (package:ZipPackage) zipDir filesDir filesFilter =
CleanDir "obj/Zip"
let workPath = "obj/Zip/" + package.Id
CopyDir workPath filesDir filesFilter
provideLicense workPath
provideReadme (sprintf "%s v%s" package.Title package.Release.PackageVersion) package.Release workPath
Zip "obj/Zip/" (zipDir </> sprintf "%s-%s.zip" package.Id package.Release.PackageVersion) !! (workPath + "/**/*.*")
DeleteDir "obj/Zip"
// NUGET
let updateNuspec (nuget:NuGetPackage) outPath spec =
{ spec with ToolPath = "packages/build/NuGet.CommandLine/tools/NuGet.exe"
OutputPath = outPath
WorkingDir = "obj/NuGet"
Version = nuget.Release.PackageVersion
ReleaseNotes = nuget.Release.ReleaseNotes
Publish = false }
let nugetPackManually (solution:Solution) (packages:NuGetSpecification list) =
CleanDir "obj/NuGet"
for pack in packages do
provideLicense "obj/NuGet"
provideReadme (sprintf "%s v%s" pack.Title pack.NuGet.Release.PackageVersion) pack.NuGet.Release "obj/NuGet"
NuGet (updateNuspec pack.NuGet solution.OutputNuGetDir) pack.NuSpecFile
CleanDir "obj/NuGet"
DeleteDir "obj/NuGet"
// --------------------------------------------------------------------------------------
// Documentation
// --------------------------------------------------------------------------------------
let provideDocExtraFiles extraDocs (releases:Release list) =
for (fileName, docName) in extraDocs do CopyFile ("docs/content" </> docName) fileName
let menu = releases |> List.map (fun r -> sprintf "[%s](%s)" r.Title (r.ReleaseNotesFile |> replace "RELEASENOTES" "ReleaseNotes" |> replace ".md" ".html")) |> String.concat " | "
for release in releases do
String.concat Environment.NewLine
[ "# " + release.Title + " Release Notes"
menu
""
ReadFileAsString release.ReleaseNotesFile ]
|> ReplaceFile ("docs/content" </> (release.ReleaseNotesFile |> replace "RELEASENOTES" "ReleaseNotes"))
let buildDocumentationTarget fsiargs target =
trace (sprintf "Building documentation (%s), this could take some time, please wait..." target)
let fakePath = "packages" </> "build" </> "FAKE" </> "tools" </> "FAKE.exe"
let fakeStartInfo script workingDirectory args fsiargs environmentVars =
(fun (info: System.Diagnostics.ProcessStartInfo) ->
info.FileName <- System.IO.Path.GetFullPath fakePath
info.Arguments <- sprintf "%s --fsiargs -d:FAKE %s \"%s\"" args fsiargs script
info.WorkingDirectory <- workingDirectory
let setVar k v =
info.EnvironmentVariables.[k] <- v
for (k, v) in environmentVars do
setVar k v
setVar "MSBuild" msBuildExe
setVar "GIT" Git.CommandHelper.gitPath
setVar "FSI" fsiPath)
let executeFAKEWithOutput workingDirectory script fsiargs envArgs =
let exitCode =
ExecProcessWithLambdas
(fakeStartInfo script workingDirectory "" fsiargs envArgs)
TimeSpan.MaxValue false ignore ignore
System.Threading.Thread.Sleep 1000
exitCode
let exit = executeFAKEWithOutput "docs/tools" "build-docs.fsx" fsiargs ["target", target]
if exit <> 0 then
failwith "Generating documentation failed"
()
let generateDocs fail local =
let args = if local then "" else "--define:RELEASE"
try
buildDocumentationTarget args "Default"
traceImportant "Documentation generated"
with
| e when not fail ->
failwith "Generating documentation failed"
// --------------------------------------------------------------------------------------
// Publishing
// Requires permissions; intended only for maintainers
// --------------------------------------------------------------------------------------
let publishReleaseTag title prefix (release:Release) =
// inspired by Deedle/tpetricek
let tagName = prefix + "v" + release.PackageVersion
let tagMessage = String.concat Environment.NewLine [title + " v" + release.PackageVersion; ""; release.ReleaseNotes ]
let cmd = sprintf """tag -a %s -m "%s" """ tagName tagMessage
Git.CommandHelper.runSimpleGitCommand "." cmd |> printfn "%s"
let _, remotes, _ = Git.CommandHelper.runGitCommand "." "remote -v"
let main = remotes |> Seq.find (fun s -> s.Contains("(push)") && s.Contains("mathnet/mathnet-" + release.RepoKey))
let remoteName = main.Split('\t').[0]
Git.Branches.pushTag "." remoteName tagName
let publishNuGet (solutions: Solution list) =
CleanDir "obj/NuGet"
let rec impl trials (file:string) =
trace ("NuGet Push: " + System.IO.Path.GetFileName(file) + ".")
try
let args = sprintf """push "%s" -Source https://api.nuget.org/v3/index.json -T 900""" (FullName file)
let result =
ExecProcess (fun info ->
info.FileName <- "packages/build/NuGet.CommandLine/tools/NuGet.exe"
info.WorkingDirectory <- FullName "obj/NuGet"
info.Arguments <- args) (TimeSpan.FromMinutes 10.)
if result <> 0 then failwith "Error during NuGet push."
with exn ->
if trials > 0 then impl (trials-1) file
else ()
solutions
|> Seq.collect (fun solution -> !! (solution.OutputNuGetDir </> "*.nupkg"))
|> Seq.distinct
|> Seq.iter (impl 3)
DeleteDir "obj/NuGet"
let publishDocs (release:Release) =
let repo = "../web-mathnet-" + release.RepoKey
Git.Branches.pull repo "origin" "gh-pages"
CopyRecursive "out/docs" repo true |> printfn "%A"
Git.Staging.StageAll repo
Git.Commit.Commit repo (sprintf "%s: %s docs update" release.Title release.PackageVersion)
Git.Branches.pushBranch repo "origin" "gh-pages"
let publishApi (release:Release) =
let repo = "../web-mathnet-" + release.RepoKey
Git.Branches.pull repo "origin" "gh-pages"
CleanDir (repo + "/api")
CopyRecursive "out/api" (repo + "/api") true |> printfn "%A"
Git.Staging.StageAll repo
Git.Commit.Commit repo (sprintf "%s: %s api update" release.Title release.PackageVersion)
Git.Branches.pushBranch repo "origin" "gh-pages"
let publishNuGetToArchive (package:NuGetPackage) archivePath nupkgFile =
let tempDir = Path.GetTempPath() </> Path.GetRandomFileName()
let archiveDir = archivePath </> package.Id </> package.Release.PackageVersion
CleanDirs [tempDir; archiveDir]
nupkgFile |> CopyFile archiveDir
use sha512 = System.Security.Cryptography.SHA512.Create()
let hash = File.ReadAllBytes nupkgFile |> sha512.ComputeHash |> Convert.ToBase64String
File.WriteAllText ((archiveDir </> (Path.GetFileName(nupkgFile) + ".sha512")), hash)
ZipHelper.Unzip tempDir nupkgFile
!! (tempDir </> "*.nuspec") |> Copy archiveDir
DeleteDir tempDir
let publishArchiveManual title zipOutPath nugetOutPath (zipPackages:ZipPackage list) (nugetPackages:NuGetPackage list) =
let archivePath = (environVarOrFail "MathNetReleaseArchive") </> title
if directoryExists archivePath |> not then failwith "Release archive directory does not exists. Safety Check failed."
for zipPackage in zipPackages do
let zipFile = zipOutPath </> sprintf "%s-%s.zip" zipPackage.Id zipPackage.Release.PackageVersion
if FileSystemHelper.fileExists zipFile then
zipFile |> CopyFile (archivePath </> "Zip")
for nugetPackage in nugetPackages do
let nupkgFile = nugetOutPath </> sprintf "%s.%s.nupkg" nugetPackage.Id nugetPackage.Release.PackageVersion
if FileSystemHelper.fileExists nupkgFile then
trace nupkgFile
publishNuGetToArchive nugetPackage (archivePath </> "NuGet") nupkgFile
let symbolsFile = nugetOutPath </> sprintf "%s.%s.symbols.nupkg" nugetPackage.Id nugetPackage.Release.PackageVersion
if FileSystemHelper.fileExists symbolsFile then
symbolsFile |> CopyFile (archivePath </> "Symbols")
let publishArchive (solution:Solution) =
let zipOutPath = solution.OutputZipDir
let nugetOutPath = solution.OutputNuGetDir
let zipPackages = solution.ZipPackages
let nugetPackages = solution.Projects |> List.collect projectNuGetPackages |> List.distinct
publishArchiveManual solution.Release.Title zipOutPath nugetOutPath zipPackages nugetPackages
let publishArchives (solutions: Solution list) = solutions |> List.iter publishArchive

0
src/icon.png → build/icon.png

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
docs/content/Build.md → docs/Build.md

0
docs/content/CSV.md → docs/CSV.md

0
docs/content/Compatibility.md → docs/Compatibility.md

0
docs/content/Constants.md → docs/Constants.md

0
docs/content/DescriptiveStatistics.md → docs/DescriptiveStatistics.md

22
docs/content/Distance.md → docs/Distance.md

@ -17,7 +17,7 @@ Math.NET Numerics provides the following distance functions on vectors and array
Sum of Absolute Difference (SAD)
--------------------------------
<img src="img/DistanceSAD.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceSAD.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The sum of absolute difference is equivalent to the $L_1$-norm of the difference, also known as Manhattan- or Taxicab-norm.
The `abs` function makes this metric a bit complicated to deal with analytically, but it is more robust than SSD.
@ -32,7 +32,7 @@ d_{\mathbf{SAD}} : (x, y) \mapsto \|x-y\|_1 = \sum_{i=1}^{n} |x_i-y_i|
Sum of Squared Difference (SSD)
-------------------------------
<img src="img/DistanceSSD.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceSSD.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The sum of squared difference is equivalent to the squared $L_2$-norm, also known as Euclidean norm.
It is therefore also known as Squared Euclidean distance.
@ -50,7 +50,7 @@ d_{\mathbf{SSD}} : (x, y) \mapsto \|x-y\|_2^2 = \langle x-y, x-y\rangle = \sum_{
Mean-Absolute Error (MAE)
-------------------------
<img src="img/DistanceMAE.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceMAE.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The mean absolute error is a normalized version of the sum of absolute difference.
@ -64,7 +64,7 @@ d_{\mathbf{MAE}} : (x, y) \mapsto \frac{d_{\mathbf{SAD}}}{n} = \frac{\|x-y\|_1}{
Mean-Squared Error (MSE)
------------------------
<img src="img/DistanceMSE.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceMSE.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The mean squared error is a normalized version of the sum of squared difference.
@ -78,7 +78,7 @@ d_{\mathbf{MSE}} : (x, y) \mapsto \frac{d_{\mathbf{SSD}}}{n} = \frac{\|x-y\|_2^2
Euclidean Distance
------------------
<img src="img/DistanceEuclidean.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceEuclidean.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The euclidean distance is the $L_2$-norm of the difference, a special case of the Minkowski distance with p=2.
It is the natural distance in a geometric interpretation.
@ -93,7 +93,7 @@ d_{\mathbf{2}} : (x, y) \mapsto \|x-y\|_2 = \sqrt{d_{\mathbf{SSD}}} = \sqrt{\sum
Manhattan Distance
------------------
<img src="img/DistanceManhattan.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceManhattan.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The Manhattan distance is the $L_1$-norm of the difference, a special case of the Minkowski distance with p=1
and equivalent to the sum of absolute difference.
@ -108,7 +108,7 @@ d_{\mathbf{1}} \equiv d_{\mathbf{SAD}} : (x, y) \mapsto \|x-y\|_1 = \sum_{i=1}^{
Chebyshev Distance
------------------
<img src="img/DistanceChebyshev.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceChebyshev.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The Chebyshev distance is the $L_\infty$-norm of the difference, a special case of the Minkowski distance
where p goes to infinity. It is also known as Chessboard distance.
@ -123,7 +123,7 @@ d_{\mathbf{\infty}} : (x, y) \mapsto \|x-y\|_\infty = \lim_{p \rightarrow \infty
Minkowski Distance
------------------
<img src="img/DistanceMinkowski3.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceMinkowski3.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The Minkowski distance is the generalized $L_p$-norm of the difference.
The contour plot on the left demonstrates the case of p=3.
@ -138,7 +138,7 @@ d_{\mathbf{p}} : (x, y) \mapsto \|x-y\|_p = \bigg(\sum_{i=1}^{n} |x_i-y_i|^p\big
Canberra Distance
-----------------
<img src="img/DistanceCanberra.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceCanberra.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The Canberra distance is a weighted version of the Manhattan distance, introduced and refined 1967 by Lance, Williams and Adkins.
It is often used for data scattered around an origin, as it is biased for measures around the origin and very sensitive for values close to zero.
@ -153,7 +153,7 @@ d_{\mathbf{CAD}} : (x, y) \mapsto \sum_{i=1}^{n} \frac{|x_i-y_i|}{|x_i|+|y_i|}
Cosine Distance
---------------
<img src="img/DistanceCosine.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistanceCosine.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The cosine distance contains the dot product scaled by the product of the Euclidean distances from the origin.
It represents the angular distance of two vectors while ignoring their scale.
@ -168,7 +168,7 @@ d_{\mathbf{cos}} : (x, y) \mapsto 1-\frac{\langle x, y\rangle}{\|x\|_2\|y\|_2} =
Pearson's Distance
------------------
<img src="img/DistancePearson.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
<img src="DistancePearson.png" style="width:87px; height:87px; float:left; margin:10px 10px 10px 0;" />
The Pearson distance is a correlation distance based on Pearson's product-momentum correlation coefficient
of the two sample vectors. Since the correlation coefficient falls between [-1, 1], the Pearson distance

0
docs/files/img/DistanceCanberra.png → docs/DistanceCanberra.png

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
docs/files/img/DistanceChebyshev.png → docs/DistanceChebyshev.png

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

0
docs/files/img/DistanceCosine.png → docs/DistanceCosine.png

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

0
docs/files/img/DistanceEuclidean.png → docs/DistanceEuclidean.png

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
docs/files/img/DistanceMAE.png → docs/DistanceMAE.png

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
docs/files/img/DistanceMSE.png → docs/DistanceMSE.png

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
docs/files/img/DistanceManhattan.png → docs/DistanceManhattan.png

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
docs/files/img/DistanceMinkowski3.png → docs/DistanceMinkowski3.png

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

0
docs/files/img/DistancePearson.png → docs/DistancePearson.png

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
docs/files/img/DistanceSAD.png → docs/DistanceSAD.png

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

0
docs/files/img/DistanceSSD.png → docs/DistanceSSD.png

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
docs/content/Euclid.md → docs/Euclid.md

0
docs/content/Functions.md → docs/Functions.md

0
docs/content/Generate.md → docs/Generate.md

0
docs/content/IFsharpNotebook.md → docs/IFsharpNotebook.md

0
docs/files/img/IfSharp-GenerateIS.png → docs/IfSharp-GenerateIS.png

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

0
docs/files/img/IfSharp-MatrixVector.png → docs/IfSharp-MatrixVector.png

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

0
docs/content/IntegralTransforms.md → docs/IntegralTransforms.md

0
docs/content/Integration.md → docs/Integration.md

0
docs/content/Interpolation.md → docs/Interpolation.md

0
docs/content/LinearEquations.md → docs/LinearEquations.md

0
docs/content/MKL.md → docs/MKL.md

0
docs/content/MatlabFiles.md → docs/MatlabFiles.md

0
docs/content/Matrix.md → docs/Matrix.md

0
docs/content/MatrixMarket.md → docs/MatrixMarket.md

0
docs/content/Packages.md → docs/Packages.md

0
docs/content/Probability.md → docs/Probability.md

0
docs/content/Random.md → docs/Random.md

0
docs/content/Regression.md → docs/Regression.md

0
docs/content/Users.md → docs/Users.md

133
docs/_template.html

@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{fsdocs-page-title}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="{{fsdocs-authors}}">
<link rel="stylesheet" id="theme_link" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.6.0/materia/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link type="text/css" rel="stylesheet" href="{{root}}content/navbar-{{fsdocs-navbar-position}}.css" />
<link type="text/css" rel="stylesheet" href="{{root}}content/fsdocs-{{fsdocs-theme}}.css" />
<link type="text/css" rel="stylesheet" href="{{root}}content/fsdocs-custom.css" />
<script type="text/javascript" src="{{root}}content/fsdocs-tips.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.css" />
<!-- END SEARCH BOX: this adds support for the search box -->
{{fsdocs-watch-script}}
</head>
<body>
<nav class="navbar navbar-expand-md navbar-light bg-secondary {{fsdocs-navbar-position}}" id="fsdocs-nav">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse navbar-nav-scroll" id="navbarsExampleDefault">
<a href="{{fsdocs-logo-link}}"><img id="fsdocs-logo" src="{{fsdocs-logo-src}}" /></a>
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
<div id="header">
<div class="searchbox" id="fsdocs-searchbox">
<label for="search-by">
<i class="fas fa-search"></i>
</label>
<input data-search-input="" id="search-by" type="search" placeholder="Search..." />
<span data-search-clear="">
<i class="fas fa-times"></i>
</span>
</div>
</div>
<!-- END SEARCH BOX: this adds support for the search box -->
<ul class="navbar-nav">
<li class="nav-header">Math.NET Numerics</li>
<li class="nav-item"><a class="nav-link" href="Packages.html">NuGet & Binaries</a></li>
<li class="nav-item"><a class="nav-link" href="ReleaseNotes.html">Release Notes</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/mathnet/mathnet-numerics/blob/master/LICENSE.md">MIT License</a></li>
<li class="nav-item"><a class="nav-link" href="Compatibility.html">Platform Support</a></li>
<li class="nav-item"><a class="nav-link" href="https://numerics.mathdotnet.com/api/">Class Reference</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/mathnet/mathnet-numerics/issues">Issues & Bugs</a></li>
<li class="nav-item"><a class="nav-link" href="Users.html">Who is using Math.NET?</a></li>
<li class="nav-header">Contributing</li>
<li class="nav-item"><a class="nav-link" href="Contributors.html">Contributors</a></li>
<li class="nav-item"><a class="nav-link" href="Contributing.html">Contributing</a></li>
<li class="nav-item"><a class="nav-link" href="Build.html">Build & Tools</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/mathnet/mathnet-numerics/discussions/categories/ideas">Your Ideas</a></li>
<li class="nav-header">Getting Help</li>
<li class="nav-item"><a class="nav-link" href="https://discuss.mathdotnet.com/c/numerics">Discuss</a></li>
<li class="nav-item"><a class="nav-link" href="https://stackoverflow.com/questions/tagged/mathdotnet">Stack Overflow</a></li>
<li class="nav-header">Getting Started</li>
<l class="nav-item"i><a class="nav-link" href="/">Getting started</a></li>
<li class="nav-item"><a class="nav-link" href="Constants.html">Constants</a></li>
<li class="nav-item"><a class="nav-link" href="Matrix.html">Matrices and Vectors</a></li>
<li class="nav-item"><a class="nav-link" href="Euclid.html">Euclid & Number Theory</a></li>
<li class="nav-item">Combinatorics</li>
<li class="nav-header">Evaluation</li>
<li class="nav-item"><a class="nav-link" href="Functions.html">Special Functions</a></li>
<li class="nav-item"><a class="nav-link" href="Integration.html">Integration</a></li>
<li class="nav-header">Statistics/Probability</li>
<li class="nav-item"><a class="nav-link" href="DescriptiveStatistics.html">Descriptive Statistics</a></li>
<li class="nav-item"><a class="nav-link" href="Probability.html">Probability Distributions</a></li>
<li class="nav-header">Generation</li>
<li class="nav-item"><a class="nav-link" href="Generate.html">Generating Data</a></li>
<li class="nav-item"><a class="nav-link" href="Random.html">Random Numbers</a></li>
<li class="nav-header">Solving Equations</li>
<li class="nav-item"><a class="nav-link" href="LinearEquations.html">Linear Equation Systems</a></li>
<li class="nav-header">Optimization</li>
<li class="nav-item"><a class="nav-link" href="Distance.html">Distance Metrics</a></li>
<li class="nav-header">Curve Fitting</li>
<li class="nav-item"><a class="nav-link" href="Regression.html">Regression</a></li>
<li class="nav-header">Native Providers</li>
<li class="nav-item"><a class="nav-link" href="MKL.html">Intel MKL</a></li>
<li class="nav-header">Working Together</li>
<li class="nav-item"><a class="nav-link" href="CSV.html">Delimited Text Files (CSV)</a></li>
<li class="nav-item"><a class="nav-link" href="MatrixMarket.html">NIST MatrixMarket</a></li>
<li class="nav-item"><a class="nav-link" href="MatlabFiles.html">MATLAB</a></li>
<li class="nav-item"><a class="nav-link" href="IFSharpNotebook.html">IF# Notebook</a></li>
</ul>
</div>
</nav>
<div class="container">
<div class="masthead">
<h3 class="muted">
<a href="https://numerics.mathdotnet.com">Math.NET Numerics</a> |
<a href="https://www.mathdotnet.com">Math.NET Project</a> |
<a href="https://github.com/mathnet/mathnet-numerics">GitHub</a>
</h3>
</div>
<hr />
<div class="container" id="fsdocs-content">
{{fsdocs-content}}
{{fsdocs-tooltips}}
</div>
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.css" />
<script type="text/javascript">var fsdocs_search_baseurl = '{{root}}';</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.8/lunr.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/JavaScript-autoComplete/1.0.4/auto-complete.min.js"></script>
<script type="text/javascript" src="{{root}}content/fsdocs-search.js"></script>
<!-- END SEARCH BOX: this adds support for the search box -->
</div>
</body>
</html>

16
docs/content/fsdocs-custom.css

@ -0,0 +1,16 @@
.navbar-nav .nav-link {
padding-top: 0.1rem;
padding-bottom: 0.1rem;
}
#fsdocs-content li {
margin: 0px 0px 10px 0px;
}
.masthead h3 {
margin-top: 15px;
margin-bottom: 5px;
font-size: 130%;
text-align: right;
color: #999999;
}

BIN
docs/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

0
docs/content/index.md → docs/index.md

0
docs/files/img/logo.png → docs/logo.png

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

95
docs/tools/build-docs.fsx

@ -1,95 +0,0 @@
// --------------------------------------------------------------------------------------
// Builds the documentation from `.fsx` and `.md` files in the 'docs/content' directory
// (the generated documentation is stored in the 'docs/output' directory)
// --------------------------------------------------------------------------------------
// Binaries that have XML documentation (in a corresponding generated XML file)
let referenceBinaries = [ "MathNet.Numerics.dll"; "MathNet.Numerics.FSharp.dll" ]
// Web site location for the generated documentation
let website = "https://numerics.mathdotnet.com"
let githubLink = "https://github.com/mathnet/mathnet-numerics"
// Specify more information about your project
let info =
[ "project-name", "Math.NET Numerics"
"project-author", "Christoph Ruegg, Marcus Cuda, Jurgen Van Gael"
"project-summary", "Math.NET Numerics, providing methods and algorithms for numerical computations in science, engineering and every day use. .Net 4, .Net 3.5, SL5, Win8, WP8, PCL 47 and 136, Mono, Xamarin Android/iOS."
"project-github", githubLink
"project-nuget", "https://nuget.org/packages/MathNet.Numerics" ]
// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------
#load "../../packages/build/FSharp.Formatting/FSharp.Formatting.fsx"
#r "../../packages/build/FAKE/tools/NuGet.Core.dll"
#r "../../packages/build/FAKE/tools/FakeLib.dll"
open Fake
open System
open System.IO
open Fake.FileHelper
open FSharp.Literate
open FSharp.MetadataFormat
// When called from 'build.fsx', use the public project URL as <root>
// otherwise, use the current 'output' directory.
#if RELEASE
let root = website
#else
let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../../out/docs")
#endif
// Paths with template/source/output locations
let top = __SOURCE_DIRECTORY__ @@ "../../"
let bin = __SOURCE_DIRECTORY__ @@ "../../out/lib/Net40"
let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../../out/docs"
let files = __SOURCE_DIRECTORY__ @@ "../files"
let templates = __SOURCE_DIRECTORY__ @@ "templates"
let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/"
let docTemplate = formatting @@ "templates/docpage.cshtml"
// Where to look for *.csproj templates (in this order)
let layoutRoots =
[ templates
formatting @@ "templates"
formatting @@ "templates/reference" ]
// Copy static files and CSS + JS from F# Formatting
let copyFiles() =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "
// Build API reference from XML comments
let buildReference () =
CleanDir (output @@ "reference")
let binaries =
referenceBinaries
|> List.map (fun lib-> bin @@ lib)
MetadataFormat.Generate
( binaries, output @@ "reference", layoutRoots,
parameters = ("root", root)::info,
sourceRepo = githubLink @@ "tree/master",
sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..",
publicOnly = true, libDirs = [bin] )
// Build documentation from `fsx` and `md` files in `docs/content`
let buildDocumentation() =
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
for dir in Seq.append [content] subdirs do
let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
Literate.ProcessDirectory
( dir, docTemplate, output @@ sub, replacements = ("root", root)::info,
layoutRoots = layoutRoots,
references = false,
lineNumbers = true,
generateAnchors = true )
// Generate
copyFiles()
buildDocumentation()

5
docs/tools/paket.references

@ -1,5 +0,0 @@
group Build
FSharp.Formatting
Microsoft.AspNet.Razor
RazorEngine
FSharp.Compiler.Service

142
docs/tools/templates/template.cshtml

@ -1,142 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>@Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="@Description"/>
<meta name="author" content="@Properties["project-author"]"/>
<script src="https://code.jquery.com/jquery-1.8.0.js"></script>
<script src="https://code.jquery.com/ui/1.8.23/jquery-ui.js"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js"></script>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"/>
<link type="text/css" rel="stylesheet" href="@Root/content/style.css" />
<style>
#main table:not(.pre) {
border: 1px solid #dddddd;
max-width: 100%;
border-style: solid;
border-width: 1px;
border-color: gray;
border-collapse: collapse;
border-right-width: 1px;
border-bottom-width: 1px;
margin-top: 15px;
margin-bottom: 25px;
}
#main table:not(.pre) th, #main table:not(.pre) td {
border: 1px solid #dddddd;
padding: 6px;
}
#main table:not(.pre) th p, #main table:not(.pre) td p {
margin-bottom: 5px;
}
</style>
<script type="text/javascript" src="@Root/content/tips.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>
<div class="container">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><a href="https://www.mathdotnet.com">Math.NET Project</a></li>
<li><a href="https://numerics.mathdotnet.com">Math.NET Numerics</a></li>
<li><a href="https://github.com/mathnet/mathnet-numerics">GitHub</a></li>
</ul>
<h3 class="muted">Math.NET Numerics</h3>
</div>
<hr />
<div class="row">
<div class="span9" id="main">
@RenderBody()
</div>
<div class="span3">
<ul class="nav nav-list" id="menu">
<li class="nav-header">Math.NET Numerics</li>
<li><a href="@Root/Packages.html">NuGet & Binaries</a></li>
<li><a href="@Root/ReleaseNotes.html">Release Notes</a></li>
<li><a href="@Root/License.html">MIT License</a></li>
<li><a href="@Root/Compatibility.html">Platform Support</a></li>
<li><a href="https://numerics.mathdotnet.com/api/">Class Reference</a></li>
<li><a href="https://github.com/mathnet/mathnet-numerics/issues">Issues & Bugs</a></li>
<li><a href="@Root/Users.html">Who is using Math.NET?</a></li>
<li class="nav-header">Contributing</li>
<li><a href="@Root/Contributors.html">Contributors</a></li>
<li><a href="@Root/Contributing.html">Contributing</a></li>
<li><a href="@Root/Build.html">Build & Tools</a></li>
<li><a href="http://feedback.mathdotnet.com/forums/2060-math-net-numerics">Your Ideas</a></li>
<li class="nav-header">Getting Help</li>
<li><a href="https://discuss.mathdotnet.com/c/numerics">Discuss</a></li>
<li><a href="https://stackoverflow.com/questions/tagged/mathdotnet">Stack Overflow</a></li>
<li class="nav-header">Getting Started</li>
<li><a href="@Root/">Getting started</a></li>
<li><a href="@Root/Constants.html">Constants</a></li>
<li>Floating-Point Numbers</li>
<li>Arbitrary Precision Numbers</li>
<li>Complex Numbers</li>
<li><a href="@Root/Matrix.html">Matrices and Vectors</a></li>
<li><a href="@Root/Euclid.html">Euclid & Number Theory</a></li>
<li>Combinatorics</li>
<li class="nav-header">Evaluation</li>
<li><a href="@Root/Functions.html">Special Functions</a></li>
<li>Differentiation</li>
<li><a href="@Root/Integration.html">Integration</a></li>
<li class="nav-header">Statistics/Probability</li>
<li><a href="@Root/DescriptiveStatistics.html">Descriptive Statistics</a></li>
<li><a href="@Root/Probability.html">Probability Distributions</a></li>
<li class="nav-header">Generation</li>
<li><a href="@Root/Generate.html">Generating Data</a></li>
<li><a href="@Root/Random.html">Random Numbers</a></li>
<li class="nav-header">Transformation</li>
<li>Fourier Transform (FFT)</li>
<li>Filtering & DSP</li>
<li>Window Functions</li>
<li class="nav-header">Solving Equations</li>
<li><a href="@Root/LinearEquations.html">Linear Equation Systems</a></li>
<li>Nonlinear Root Finding</li>
<li class="nav-header">Optimization</li>
<li>Linear Least Squares</li>
<li>Nonlinear Optimization</li>
<li><a href="@Root/Distance.html">Distance Metrics</a></li>
<li class="nav-header">Curve Fitting</li>
<li><a href="@Root/Regression.html">Regression</a></li>
<li>Interpolation</li>
<li>Fourier Approximation</li>
<li class="nav-header">Native Providers</li>
<li><a href="@Root/MKL.html">Intel MKL</a></li>
<li class="nav-header">Working Together</li>
<li><a href="@Root/CSV.html">Delimited Text Files (CSV)</a></li>
<li><a href="@Root/MatrixMarket.html">NIST MatrixMarket</a></li>
<li><a href="@Root/MatlabFiles.html">MATLAB</a></li>
<li><a href="@Root/IFSharpNotebook.html">IF# Notebook</a></li>
<li>FsLab & Deedle</li>
<li>Microsoft Excel</li>
<li>numl.net machine learning</li>
<li>R-project</li>
</ul>
</div>
</div>
</div>
</body>
</html>

3
paket.dependencies

@ -6,7 +6,4 @@ framework: net5.0,net48,net461,netstandard2.0
group Build
source https://api.nuget.org/v3/index.json
storage: packages
nuget FAKE ~> 4.1
nuget NUnit.ConsoleRunner
nuget FSharp.Formatting !~> 2.4
nuget NuGet.CommandLine

8
paket.lock

@ -5,12 +5,4 @@ GROUP Build
STORAGE: PACKAGES
NUGET
remote: https://api.nuget.org/v3/index.json
FAKE (4.64.18)
FSharp.Compiler.Service (2.0.0.6)
FSharp.Formatting (2.14.4)
FSharp.Compiler.Service (2.0.0.6)
FSharpVSPowerTools.Core (>= 2.3 < 2.4)
FSharpVSPowerTools.Core (2.3)
FSharp.Compiler.Service (>= 2.0.0.3)
NuGet.CommandLine (5.9.1)
NUnit.ConsoleRunner (3.12)

3
src/Benchmark/Benchmark.csproj

@ -3,10 +3,11 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net5.0;net48</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>Benchmark</AssemblyName>
<RootNamespace>Benchmark</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>

1
src/Data.Matlab/Data.Matlab.csproj

@ -37,7 +37,6 @@ Control.Describe now includes CPU architecture and family identifier if know</Pa
<RepositoryType>git</RepositoryType>
<NeutralLanguage>en</NeutralLanguage>
<NoPackageAnalysis>false</NoPackageAnalysis>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>

3
src/Data.Tests/Data.Tests.csproj

@ -4,10 +4,11 @@
<OutputType>Exe</OutputType>
<GenerateProgramFile>false</GenerateProgramFile>
<TargetFrameworks>net5.0;net48</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Data.Tests</AssemblyName>
<RootNamespace>MathNet.Numerics.Data.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45'">

17
src/Data.Tests/Properties/AssemblyInfo.cs

@ -1,19 +1,4 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("NUnitTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NUnitTests")]
[assembly: AssemblyCopyright("Copyright (c) Math.NET Project")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
[assembly: Guid("bb41bee6-eb4c-48c9-8edd-7a5ae2422567")]
[assembly: AssemblyVersion("5.0.0.0")]
[assembly: AssemblyFileVersion("5.0.0.0")]
[assembly: AssemblyInformationalVersion("5.0.0-alpha02")]

1
src/Data.Text/Data.Text.csproj

@ -37,7 +37,6 @@ Control.Describe now includes CPU architecture and family identifier if know</Pa
<RepositoryType>git</RepositoryType>
<NeutralLanguage>en</NeutralLanguage>
<NoPackageAnalysis>false</NoPackageAnalysis>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>

12
src/FSharp.Tests/AssemblyInfo.fs

@ -1,19 +1,7 @@
namespace MathNet.Numerics
open System.Reflection
open System.Resources;
open System.Runtime.CompilerServices
open System.Runtime.InteropServices
[<assembly: AssemblyTitle("Math.NET Numerics for F# Unit Tests")>]
[<assembly: AssemblyCompany("Math.NET Project")>]
[<assembly: AssemblyProduct("Math.NET Numerics")>]
[<assembly: AssemblyCopyright("Copyright (c) Math.NET Project")>]
[<assembly: AssemblyVersion("5.0.0.0")>]
[<assembly: AssemblyFileVersion("5.0.0.0")>]
[<assembly: AssemblyInformationalVersion("5.0.0-alpha02")>]
[<assembly: ComVisible(false)>]
[<assembly: Guid("C9AA6156-F799-42E4-B50D-2E88AD7D1750")>]

3
src/FSharp.Tests/FSharp.Tests.fsproj

@ -4,10 +4,11 @@
<OutputType>Exe</OutputType>
<GenerateProgramFile>false</GenerateProgramFile>
<TargetFrameworks>net5.0;net48</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.FSharp.Tests</AssemblyName>
<RootNamespace>MathNet.Numerics.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
<NoWarn>44;2003</NoWarn>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>

17
src/FSharp/AssemblyInfo.fs

@ -29,25 +29,8 @@
namespace MathNet.Numerics
open System.Reflection
open System.Resources;
open System.Runtime.CompilerServices
open System.Runtime.InteropServices
[<assembly: AssemblyTitle("Math.NET Numerics for F#")>]
[<assembly: AssemblyDescription("F# Modules for Math.NET Numerics, providing methods and algorithms for numerical computations in science, engineering and every day use.")>]
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("Math.NET Project")>]
[<assembly: AssemblyProduct("Math.NET Numerics")>]
[<assembly: AssemblyCopyright("Copyright (c) Math.NET Project")>]
[<assembly: AssemblyTrademark("")>]
[<assembly: AssemblyCulture("")>]
[<assembly: NeutralResourcesLanguage("en")>]
[<assembly: AssemblyVersion("5.0.0.0")>]
[<assembly: AssemblyFileVersion("5.0.0.0")>]
[<assembly: AssemblyInformationalVersion("5.0.0-alpha02")>]
[<assembly: ComVisible(false)>]
[<assembly: Guid("048BC4EB-CE2B-4040-9967-4784F5405B0F")>]

1
src/FSharp/FSharp.fsproj

@ -32,7 +32,6 @@ Lots of internal cleanup, leveraging newer language features
Data: now released always together with Numerics (no longer separate versioning)
Control.Describe now includes CPU architecture and family identifier if know</PackageReleaseNotes>
<PackageTags>fsharp F# math numeric statistics probability integration interpolation regression solve fit linear algebra matrix fft</PackageTags>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>

2
src/NativeProviders/Windows/MKL/MKLWrapper.vcxproj.filters

@ -63,7 +63,7 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)icon.png">
<None Include="$(MSBuildThisFileDirectory)build/icon.png">
<Filter>Source Files\Resource Files</Filter>
</None>
</ItemGroup>

3
src/Numerics.Tests/Numerics.Tests.CUDA.csproj

@ -4,10 +4,11 @@
<OutputType>Exe</OutputType>
<GenerateProgramFile>false</GenerateProgramFile>
<TargetFrameworks>net5.0;net48</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests.CUDA</AssemblyName>
<RootNamespace>MathNet.Numerics.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
<DefineConstants>NATIVE;CUDA;$(CommonConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net461'">

3
src/Numerics.Tests/Numerics.Tests.MKL.csproj

@ -4,10 +4,11 @@
<OutputType>Exe</OutputType>
<GenerateProgramFile>false</GenerateProgramFile>
<TargetFrameworks>net5.0;net48</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests.MKL</AssemblyName>
<RootNamespace>MathNet.Numerics.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
<DefineConstants>NATIVE;MKL;$(CommonConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net461'">

3
src/Numerics.Tests/Numerics.Tests.OpenBLAS.csproj

@ -4,10 +4,11 @@
<OutputType>Exe</OutputType>
<GenerateProgramFile>false</GenerateProgramFile>
<TargetFrameworks>net5.0;net48</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests.OpenBLAS</AssemblyName>
<RootNamespace>MathNet.Numerics.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
<DefineConstants>NATIVE;OPENBLAS;$(CommonConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net461'">

3
src/Numerics.Tests/Numerics.Tests.csproj

@ -4,10 +4,11 @@
<OutputType>Exe</OutputType>
<GenerateProgramFile>false</GenerateProgramFile>
<TargetFrameworks>net5.0;net48</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.Tests</AssemblyName>
<RootNamespace>MathNet.Numerics.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net461'">

11
src/Numerics.Tests/Properties/AssemblyInfo.cs

@ -1,16 +1,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices;
using MathNet.Numerics.UnitTests;
[assembly: AssemblyTitle("Math.NET Numerics Unit Tests")]
[assembly: AssemblyCompany("Math.NET Project")]
[assembly: AssemblyProduct("Math.NET Numerics")]
[assembly: AssemblyCopyright("Copyright (c) Math.NET Project")]
[assembly: ComVisible(false)]
[assembly: Guid("04157581-63f3-447b-a277-83c6e69126a4")]
[assembly: AssemblyVersion("5.0.0.0")]
[assembly: AssemblyFileVersion("5.0.0.0")]
[assembly: AssemblyInformationalVersion("5.0.0-alpha02")]
[assembly: UseLinearAlgebraProvider]

1
src/Numerics/Numerics.csproj

@ -32,7 +32,6 @@ Lots of internal cleanup, leveraging newer language features
Data: now released always together with Numerics (no longer separate versioning)
Control.Describe now includes CPU architecture and family identifier if know</PackageReleaseNotes>
<PackageTags>math numeric statistics probability integration interpolation regression solve fit linear algebra matrix fft</PackageTags>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>

1
src/Providers.CUDA/Providers.CUDA.csproj

@ -31,7 +31,6 @@ Better support for System.Text.Json: Polynomial, DescriptiveStatistics ~Joseph P
Lots of internal cleanup, leveraging newer language features
Data: now released always together with Numerics (no longer separate versioning)
Control.Describe now includes CPU architecture and family identifier if know</PackageReleaseNotes>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>

1
src/Providers.MKL/Providers.MKL.csproj

@ -31,7 +31,6 @@ Better support for System.Text.Json: Polynomial, DescriptiveStatistics ~Joseph P
Lots of internal cleanup, leveraging newer language features
Data: now released always together with Numerics (no longer separate versioning)
Control.Describe now includes CPU architecture and family identifier if know</PackageReleaseNotes>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>

1
src/Providers.OpenBLAS/Providers.OpenBLAS.csproj

@ -31,7 +31,6 @@ Better support for System.Text.Json: Polynomial, DescriptiveStatistics ~Joseph P
Lots of internal cleanup, leveraging newer language features
Data: now released always together with Numerics (no longer separate versioning)
Control.Describe now includes CPU architecture and family identifier if know</PackageReleaseNotes>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>

16
src/TestData/Properties/AssemblyInfo.cs

@ -1,18 +1,4 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Math.NET Numerics Test Data")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Math.NET Project")]
[assembly: AssemblyProduct("Math.NET Numerics")]
[assembly: AssemblyCopyright("Copyright (c) Math.NET Project")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
[assembly: Guid("a4a6a08e-5265-4608-a43d-e4f2e210ba2d")]
[assembly: AssemblyVersion("5.0.0.0")]
[assembly: AssemblyFileVersion("5.0.0.0")]

3
src/TestData/TestData.csproj

@ -3,10 +3,11 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net5.0;net461;net48;netstandard2.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>MathNet.Numerics.TestData</AssemblyName>
<RootNamespace>MathNet.Numerics.TestData</RootNamespace>
<IsPackable>false</IsPackable>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionSuffix>alpha02</VersionSuffix>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net40'">
<Reference Include="System" />

Loading…
Cancel
Save