35 changed files with 998 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<configuration> |
|||
<startup> |
|||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> |
|||
</startup> |
|||
</configuration> |
|||
@ -0,0 +1,29 @@ |
|||
using System; |
|||
using System.Diagnostics; |
|||
using System.Numerics; |
|||
|
|||
using MathNet.Numerics; |
|||
using MathNet.Numerics.IntegralTransforms; |
|||
using MathNet.Numerics.LinearAlgebra; |
|||
|
|||
namespace Integration |
|||
{ |
|||
class Program |
|||
{ |
|||
static void Main(string[] args) |
|||
{ |
|||
// Code touching all providers
|
|||
Control.UseNativeMKL(); |
|||
Matrix<Complex> matrix = CreateMatrix.Random<Complex>(10, 10, 100); |
|||
Vector<Complex> vector = matrix.Svd().S; |
|||
Fourier.Forward(vector.AsArray()); |
|||
Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); |
|||
Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); |
|||
|
|||
if (Debugger.IsAttached) |
|||
{ |
|||
Console.ReadKey(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyTitle("net45-console-csharp")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("net45-console-csharp")] |
|||
[assembly: AssemblyCopyright("Copyright © 2018")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|||
[assembly: Guid("3d42354c-ceb7-4b35-856c-4a60e84f33e5")] |
|||
|
|||
// Version information for an assembly consists of the following four values:
|
|||
//
|
|||
// Major Version
|
|||
// Minor Version
|
|||
// Build Number
|
|||
// Revision
|
|||
//
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
|||
// by using the '*' as shown below:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,59 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{3D42354C-CEB7-4B35-856C-4A60E84F33E5}</ProjectGuid> |
|||
<OutputType>Exe</OutputType> |
|||
<RootNamespace>Integration</RootNamespace> |
|||
<AssemblyName>net45-console-csharp</AssemblyName> |
|||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="App.config" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<PackageReference Include="MathNet.Numerics"> |
|||
<Version>4.0.0-beta05</Version> |
|||
</PackageReference> |
|||
<PackageReference Include="MathNet.Numerics.MKL.Win"> |
|||
<Version>2.2.0</Version> |
|||
</PackageReference> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net45-console-csharp", "net45-console-csharp.csproj", "{3D42354C-CEB7-4B35-856C-4A60E84F33E5}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{3D42354C-CEB7-4B35-856C-4A60E84F33E5}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {90333CC7-17E3-4F3A-B74A-58A80FBA599C} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<configuration> |
|||
<startup> |
|||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> |
|||
</startup> |
|||
</configuration> |
|||
@ -0,0 +1,41 @@ |
|||
namespace net45_console_fsharp_nuget.AssemblyInfo |
|||
|
|||
open System.Reflection |
|||
open System.Runtime.CompilerServices |
|||
open System.Runtime.InteropServices |
|||
|
|||
// General Information about an assembly is controlled through the following |
|||
// set of attributes. Change these attribute values to modify the information |
|||
// associated with an assembly. |
|||
[<assembly: AssemblyTitle("net45-console-fsharp")>] |
|||
[<assembly: AssemblyDescription("")>] |
|||
[<assembly: AssemblyConfiguration("")>] |
|||
[<assembly: AssemblyCompany("")>] |
|||
[<assembly: AssemblyProduct("net45-console-fsharp")>] |
|||
[<assembly: AssemblyCopyright("Copyright © 2018")>] |
|||
[<assembly: AssemblyTrademark("")>] |
|||
[<assembly: AssemblyCulture("")>] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible |
|||
// to COM components. If you need to access a type in this assembly from |
|||
// COM, set the ComVisible attribute to true on that type. |
|||
[<assembly: ComVisible(false)>] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM |
|||
[<assembly: Guid("57ae8a51-a267-4336-a0e0-2b19fb69d7bd")>] |
|||
|
|||
// Version information for an assembly consists of the following four values: |
|||
// |
|||
// Major Version |
|||
// Minor Version |
|||
// Build Number |
|||
// Revision |
|||
// |
|||
// You can specify all the values or you can default the Build and Revision Numbers |
|||
// by using the '*' as shown below: |
|||
// [<assembly: AssemblyVersion("1.0.*")>] |
|||
[<assembly: AssemblyVersion("1.0.0.0")>] |
|||
[<assembly: AssemblyFileVersion("1.0.0.0")>] |
|||
|
|||
do |
|||
() |
|||
@ -0,0 +1,24 @@ |
|||
open System |
|||
open System.Diagnostics |
|||
|
|||
open MathNet.Numerics |
|||
open MathNet.Numerics.IntegralTransforms |
|||
open MathNet.Numerics.LinearAlgebra |
|||
|
|||
type Complex = System.Numerics.Complex |
|||
|
|||
[<EntryPoint>] |
|||
let main argv = |
|||
|
|||
// Code touching all providers |
|||
Control.UseNativeMKL() |
|||
let matrix : Matrix<Complex> = DenseMatrix.randomSeed 10 10 100 |
|||
let vector = (matrix |> Matrix.svd).S |
|||
vector.AsArray() |> Fourier.Forward |
|||
printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider |
|||
printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude |
|||
|
|||
if Debugger.IsAttached then |
|||
Console.ReadKey() |> ignore |
|||
|
|||
0 |
|||
@ -0,0 +1,99 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>57ae8a51-a267-4336-a0e0-2b19fb69d7bd</ProjectGuid> |
|||
<OutputType>Exe</OutputType> |
|||
<RootNamespace>net45_console_fsharp_nuget</RootNamespace> |
|||
<AssemblyName>net45_console_fsharp_nuget</AssemblyName> |
|||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|||
<UseStandardResourceNames>true</UseStandardResourceNames> |
|||
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion> |
|||
<Name>net45-console-fsharp</Name> |
|||
<NuGetPackageImportStamp> |
|||
</NuGetPackageImportStamp> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<Tailcalls>false</Tailcalls> |
|||
<OutputPath>bin\$(Configuration)\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile> |
|||
<Prefer32Bit>true</Prefer32Bit> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<Tailcalls>true</Tailcalls> |
|||
<OutputPath>bin\$(Configuration)\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile> |
|||
<Prefer32Bit>true</Prefer32Bit> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion> |
|||
</PropertyGroup> |
|||
<Choose> |
|||
<When Condition="'$(VisualStudioVersion)' == '11.0'"> |
|||
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') "> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
</When> |
|||
<Otherwise> |
|||
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') "> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
</Otherwise> |
|||
</Choose> |
|||
<Import Project="$(FSharpTargetsPath)" /> |
|||
<ItemGroup> |
|||
<Compile Include="AssemblyInfo.fs" /> |
|||
<Compile Include="Program.fs" /> |
|||
<None Include="App.config" /> |
|||
<Content Include="packages.config" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Reference Include="FSharp.Core"> |
|||
<HintPath>packages\FSharp.Core.4.2.3\lib\net45\FSharp.Core.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="MathNet.Numerics"> |
|||
<HintPath>packages\MathNet.Numerics.4.0.0-beta05\lib\net40\MathNet.Numerics.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="MathNet.Numerics.FSharp"> |
|||
<HintPath>packages\MathNet.Numerics.FSharp.4.0.0-beta05\lib\net45\MathNet.Numerics.FSharp.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="mscorlib" /> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Numerics" /> |
|||
<Reference Include="System.Runtime.Serialization" /> |
|||
<Reference Include="System.ValueTuple"> |
|||
<HintPath>packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath> |
|||
<Private>True</Private> |
|||
</Reference> |
|||
</ItemGroup> |
|||
<Import Project="packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets" Condition="Exists('packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets')" /> |
|||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
|||
<PropertyGroup> |
|||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
|||
</PropertyGroup> |
|||
<Error Condition="!Exists('packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets'))" /> |
|||
</Target> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "net45-console-fsharp", "net45-console-fsharp.fsproj", "{57AE8A51-A267-4336-A0E0-2B19FB69D7BD}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{57AE8A51-A267-4336-A0E0-2B19FB69D7BD}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {AD34F735-19E3-4492-BA8C-5288DE2DE3F2} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<packages> |
|||
<package id="FSharp.Core" version="4.2.3" targetFramework="net45" /> |
|||
<package id="MathNet.Numerics" version="4.0.0-beta05" targetFramework="net45" /> |
|||
<package id="MathNet.Numerics.FSharp" version="4.0.0-beta05" targetFramework="net45" /> |
|||
<package id="MathNet.Numerics.MKL.Win" version="2.2.0" targetFramework="net45" /> |
|||
<package id="System.ValueTuple" version="4.3.1" targetFramework="net45" /> |
|||
</packages> |
|||
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<configuration> |
|||
<startup> |
|||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" /> |
|||
</startup> |
|||
</configuration> |
|||
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Diagnostics; |
|||
using System.Numerics; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
using MathNet.Numerics; |
|||
using MathNet.Numerics.IntegralTransforms; |
|||
using MathNet.Numerics.LinearAlgebra; |
|||
|
|||
namespace Integration |
|||
{ |
|||
class Program |
|||
{ |
|||
static void Main(string[] args) |
|||
{ |
|||
// Code touching all providers
|
|||
Control.UseNativeMKL(); |
|||
Matrix<Complex> matrix = CreateMatrix.Random<Complex>(10, 10, 100); |
|||
Vector<Complex> vector = matrix.Svd().S; |
|||
Fourier.Forward(vector.AsArray()); |
|||
Console.WriteLine($"Framework={RuntimeInformation.FrameworkDescription}; OS={RuntimeInformation.OSDescription}"); |
|||
Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); |
|||
Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); |
|||
|
|||
if (Debugger.IsAttached) |
|||
{ |
|||
Console.ReadKey(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyTitle("net471-console-csharp")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("net471-console-csharp")] |
|||
[assembly: AssemblyCopyright("Copyright © 2018")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible(false)] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|||
[assembly: Guid("00241648-632e-4250-aff4-d61fe68d6dd4")] |
|||
|
|||
// Version information for an assembly consists of the following four values:
|
|||
//
|
|||
// Major Version
|
|||
// Minor Version
|
|||
// Build Number
|
|||
// Revision
|
|||
//
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
|||
// by using the '*' as shown below:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion("1.0.0.0")] |
|||
[assembly: AssemblyFileVersion("1.0.0.0")] |
|||
@ -0,0 +1,60 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{00241648-632E-4250-AFF4-D61FE68D6DD4}</ProjectGuid> |
|||
<OutputType>Exe</OutputType> |
|||
<RootNamespace>Integration</RootNamespace> |
|||
<AssemblyName>net471-console-csharp</AssemblyName> |
|||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Net.Http" /> |
|||
<Reference Include="System.Xml" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<None Include="App.config" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<PackageReference Include="MathNet.Numerics"> |
|||
<Version>4.0.0-beta05</Version> |
|||
</PackageReference> |
|||
<PackageReference Include="MathNet.Numerics.MKL.Win"> |
|||
<Version>2.2.0</Version> |
|||
</PackageReference> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "net471-console-csharp", "net471-console-csharp.csproj", "{00241648-632E-4250-AFF4-D61FE68D6DD4}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{00241648-632E-4250-AFF4-D61FE68D6DD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{00241648-632E-4250-AFF4-D61FE68D6DD4}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{00241648-632E-4250-AFF4-D61FE68D6DD4}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{00241648-632E-4250-AFF4-D61FE68D6DD4}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {340791EB-C2C6-4604-9830-82AE33132081} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<configuration> |
|||
<startup> |
|||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" /> |
|||
</startup> |
|||
</configuration> |
|||
@ -0,0 +1,41 @@ |
|||
namespace net471_console_fsharp_nuget.AssemblyInfo |
|||
|
|||
open System.Reflection |
|||
open System.Runtime.CompilerServices |
|||
open System.Runtime.InteropServices |
|||
|
|||
// General Information about an assembly is controlled through the following |
|||
// set of attributes. Change these attribute values to modify the information |
|||
// associated with an assembly. |
|||
[<assembly: AssemblyTitle("net471-console-fsharp")>] |
|||
[<assembly: AssemblyDescription("")>] |
|||
[<assembly: AssemblyConfiguration("")>] |
|||
[<assembly: AssemblyCompany("")>] |
|||
[<assembly: AssemblyProduct("net471-console-fsharp")>] |
|||
[<assembly: AssemblyCopyright("Copyright © 2018")>] |
|||
[<assembly: AssemblyTrademark("")>] |
|||
[<assembly: AssemblyCulture("")>] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible |
|||
// to COM components. If you need to access a type in this assembly from |
|||
// COM, set the ComVisible attribute to true on that type. |
|||
[<assembly: ComVisible(false)>] |
|||
|
|||
// The following GUID is for the ID of the typelib if this project is exposed to COM |
|||
[<assembly: Guid("d1c0c7ca-6fcf-4c1f-a171-13ac06cc9708")>] |
|||
|
|||
// Version information for an assembly consists of the following four values: |
|||
// |
|||
// Major Version |
|||
// Minor Version |
|||
// Build Number |
|||
// Revision |
|||
// |
|||
// You can specify all the values or you can default the Build and Revision Numbers |
|||
// by using the '*' as shown below: |
|||
// [<assembly: AssemblyVersion("1.0.*")>] |
|||
[<assembly: AssemblyVersion("1.0.0.0")>] |
|||
[<assembly: AssemblyFileVersion("1.0.0.0")>] |
|||
|
|||
do |
|||
() |
|||
@ -0,0 +1,26 @@ |
|||
open System |
|||
open System.Diagnostics |
|||
open System.Runtime.InteropServices |
|||
|
|||
open MathNet.Numerics |
|||
open MathNet.Numerics.IntegralTransforms |
|||
open MathNet.Numerics.LinearAlgebra |
|||
|
|||
type Complex = System.Numerics.Complex |
|||
|
|||
[<EntryPoint>] |
|||
let main argv = |
|||
|
|||
// Code touching all providers |
|||
Control.UseNativeMKL() |
|||
let matrix : Matrix<Complex> = DenseMatrix.randomSeed 10 10 100 |
|||
let vector = (matrix |> Matrix.svd).S |
|||
vector.AsArray() |> Fourier.Forward |
|||
printfn "Framework=%s; OS=%s" RuntimeInformation.FrameworkDescription RuntimeInformation.OSDescription |
|||
printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider |
|||
printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude |
|||
|
|||
if Debugger.IsAttached then |
|||
Console.ReadKey() |> ignore |
|||
|
|||
0 |
|||
@ -0,0 +1,98 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>d1c0c7ca-6fcf-4c1f-a171-13ac06cc9708</ProjectGuid> |
|||
<OutputType>Exe</OutputType> |
|||
<RootNamespace>net471_console_fsharp_nuget</RootNamespace> |
|||
<AssemblyName>net471_console_fsharp_nuget</AssemblyName> |
|||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion> |
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
|||
<UseStandardResourceNames>true</UseStandardResourceNames> |
|||
<TargetFSharpCoreVersion>4.4.1.0</TargetFSharpCoreVersion> |
|||
<Name>net471-console-fsharp</Name> |
|||
<NuGetPackageImportStamp> |
|||
</NuGetPackageImportStamp> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<Tailcalls>false</Tailcalls> |
|||
<OutputPath>bin\$(Configuration)\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile> |
|||
<Prefer32Bit>true</Prefer32Bit> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<Tailcalls>true</Tailcalls> |
|||
<OutputPath>bin\$(Configuration)\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile> |
|||
<Prefer32Bit>true</Prefer32Bit> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion> |
|||
</PropertyGroup> |
|||
<Choose> |
|||
<When Condition="'$(VisualStudioVersion)' == '11.0'"> |
|||
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets') "> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
</When> |
|||
<Otherwise> |
|||
<PropertyGroup Condition=" '$(FSharpTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets') "> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
</Otherwise> |
|||
</Choose> |
|||
<Import Project="$(FSharpTargetsPath)" /> |
|||
<ItemGroup> |
|||
<Compile Include="AssemblyInfo.fs" /> |
|||
<Compile Include="Program.fs" /> |
|||
<None Include="App.config" /> |
|||
<Content Include="packages.config" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Reference Include="FSharp.Core"> |
|||
<HintPath>packages\FSharp.Core.4.2.3\lib\net45\FSharp.Core.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="MathNet.Numerics"> |
|||
<HintPath>packages\MathNet.Numerics.4.0.0-beta05\lib\net40\MathNet.Numerics.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="MathNet.Numerics.FSharp"> |
|||
<HintPath>packages\MathNet.Numerics.FSharp.4.0.0-beta05\lib\net45\MathNet.Numerics.FSharp.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="mscorlib" /> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Numerics" /> |
|||
<Reference Include="System.Runtime.Serialization" /> |
|||
<Reference Include="System.ValueTuple"> |
|||
<Private>True</Private> |
|||
</Reference> |
|||
</ItemGroup> |
|||
<Import Project="packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets" Condition="Exists('packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets')" /> |
|||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
|||
<PropertyGroup> |
|||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
|||
</PropertyGroup> |
|||
<Error Condition="!Exists('packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\MathNet.Numerics.MKL.Win.2.2.0\build\MathNet.Numerics.MKL.Win.targets'))" /> |
|||
</Target> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "net471-console-fsharp", "net471-console-fsharp.fsproj", "{D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{D1C0C7CA-6FCF-4C1F-A171-13AC06CC9708}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {FCBC8B65-5683-4390-A0E2-39BE8B288555} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<packages> |
|||
<package id="FSharp.Core" version="4.2.3" targetFramework="net471" /> |
|||
<package id="MathNet.Numerics" version="4.0.0-beta05" targetFramework="net471" /> |
|||
<package id="MathNet.Numerics.FSharp" version="4.0.0-beta05" targetFramework="net471" /> |
|||
<package id="MathNet.Numerics.MKL.Win" version="2.2.0" targetFramework="net471" /> |
|||
<package id="System.ValueTuple" version="4.3.1" targetFramework="net471" /> |
|||
</packages> |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Diagnostics; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
using MathNet.Numerics; |
|||
using MathNet.Numerics.IntegralTransforms; |
|||
using MathNet.Numerics.LinearAlgebra; |
|||
|
|||
using Complex = System.Numerics.Complex; |
|||
|
|||
namespace Integration |
|||
{ |
|||
class Program |
|||
{ |
|||
static void Main(string[] args) |
|||
{ |
|||
// Code touching all providers
|
|||
Control.UseManaged(); |
|||
Matrix<Complex> matrix = CreateMatrix.Random<Complex>(10, 10, 100); |
|||
Vector<Complex> vector = matrix.Svd().S; |
|||
Fourier.Forward(vector.AsArray()); |
|||
Console.WriteLine($"Framework={RuntimeInformation.FrameworkDescription}; OS={RuntimeInformation.OSDescription}"); |
|||
Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); |
|||
Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); |
|||
|
|||
if (Debugger.IsAttached) |
|||
{ |
|||
Console.ReadKey(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>netcoreapp1.1</TargetFramework> |
|||
<RootNamespace>Integration</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="MathNet.Numerics" Version="4.0.0-beta05" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "netcore11-console-csharp", "netcore11-console-csharp.csproj", "{108E9AB0-757E-4A6F-AF7D-012129F34EF0}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{108E9AB0-757E-4A6F-AF7D-012129F34EF0}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {09849DBB-34DE-4146-A8DC-0DCB096103BE} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,25 @@ |
|||
open System |
|||
open System.Diagnostics |
|||
open System.Runtime.InteropServices |
|||
|
|||
open MathNet.Numerics |
|||
open MathNet.Numerics.IntegralTransforms |
|||
open MathNet.Numerics.LinearAlgebra |
|||
|
|||
type Complex = System.Numerics.Complex |
|||
|
|||
[<EntryPoint>] |
|||
let main argv = |
|||
|
|||
// Code touching all providers |
|||
let matrix : Matrix<Complex> = DenseMatrix.randomSeed 10 10 100 |
|||
let vector = (matrix |> Matrix.svd).S |
|||
vector.AsArray() |> Fourier.Forward |
|||
printfn "Framework=%s; OS=%s" RuntimeInformation.FrameworkDescription RuntimeInformation.OSDescription |
|||
printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider |
|||
printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude |
|||
|
|||
if Debugger.IsAttached then |
|||
Console.ReadKey() |> ignore |
|||
|
|||
0 |
|||
@ -0,0 +1,17 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>netcoreapp1.1</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Include="Program.fs" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="MathNet.Numerics" Version="4.0.0-beta05" /> |
|||
<PackageReference Include="MathNet.Numerics.FSharp" Version="4.0.0-beta05" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "netcore11-console-fsharp", "netcore11-console-fsharp.fsproj", "{7F0FCBE3-106E-477C-8198-50EDE1729F69}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{7F0FCBE3-106E-477C-8198-50EDE1729F69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{7F0FCBE3-106E-477C-8198-50EDE1729F69}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{7F0FCBE3-106E-477C-8198-50EDE1729F69}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{7F0FCBE3-106E-477C-8198-50EDE1729F69}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {831812CF-1BE1-414F-9074-90A785F0013F} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Diagnostics; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
using MathNet.Numerics; |
|||
using MathNet.Numerics.IntegralTransforms; |
|||
using MathNet.Numerics.LinearAlgebra; |
|||
|
|||
using Complex = System.Numerics.Complex; |
|||
|
|||
namespace Integration |
|||
{ |
|||
class Program |
|||
{ |
|||
static void Main(string[] args) |
|||
{ |
|||
// Code touching all providers
|
|||
Control.UseNativeMKL(); |
|||
Matrix<Complex> matrix = CreateMatrix.Random<Complex>(10, 10, 100); |
|||
Vector<Complex> vector = matrix.Svd().S; |
|||
Fourier.Forward(vector.AsArray()); |
|||
Console.WriteLine($"Framework={RuntimeInformation.FrameworkDescription}; OS={RuntimeInformation.OSDescription}"); |
|||
Console.WriteLine($"LinearAlgebra={Control.LinearAlgebraProvider}; FFT={Control.FourierTransformProvider}"); |
|||
Console.WriteLine($"DC={vector[0].Magnitude}; Low={vector[1].Magnitude}; Hight={vector[5].Magnitude}"); |
|||
|
|||
if (Debugger.IsAttached) |
|||
{ |
|||
Console.ReadKey(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>netcoreapp2.0</TargetFramework> |
|||
<RootNamespace>Integration</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="MathNet.Numerics" Version="4.0.0-beta05" /> |
|||
<PackageReference Include="MathNet.Numerics.MKL.Win" Version="2.2.0" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "netcore20-console-csharp", "netcore20-console-csharp.csproj", "{B0146BC4-789E-4EC1-9FA8-F93378928B11}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{B0146BC4-789E-4EC1-9FA8-F93378928B11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{B0146BC4-789E-4EC1-9FA8-F93378928B11}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{B0146BC4-789E-4EC1-9FA8-F93378928B11}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{B0146BC4-789E-4EC1-9FA8-F93378928B11}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {370FB300-76E3-40CC-9399-A1A9DB2F7F9E} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,26 @@ |
|||
open System |
|||
open System.Diagnostics |
|||
open System.Runtime.InteropServices |
|||
|
|||
open MathNet.Numerics |
|||
open MathNet.Numerics.IntegralTransforms |
|||
open MathNet.Numerics.LinearAlgebra |
|||
|
|||
type Complex = System.Numerics.Complex |
|||
|
|||
[<EntryPoint>] |
|||
let main argv = |
|||
|
|||
// Code touching all providers |
|||
Control.UseNativeMKL() |
|||
let matrix : Matrix<Complex> = DenseMatrix.randomSeed 10 10 100 |
|||
let vector = (matrix |> Matrix.svd).S |
|||
vector.AsArray() |> Fourier.Forward |
|||
printfn "Framework=%s; OS=%s" RuntimeInformation.FrameworkDescription RuntimeInformation.OSDescription |
|||
printfn "LinearAlgebra=%O; FFT=%O" Control.LinearAlgebraProvider Control.FourierTransformProvider |
|||
printfn "DC=%f; Low=%f; Hight=%f" vector.[0].Magnitude vector.[1].Magnitude vector.[5].Magnitude |
|||
|
|||
if Debugger.IsAttached then |
|||
Console.ReadKey() |> ignore |
|||
|
|||
0 |
|||
@ -0,0 +1,18 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>netcoreapp2.0</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Include="Program.fs" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="MathNet.Numerics" Version="4.0.0-beta05" /> |
|||
<PackageReference Include="MathNet.Numerics.FSharp" Version="4.0.0-beta05" /> |
|||
<PackageReference Include="MathNet.Numerics.MKL.Win" Version="2.2.0" /> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio 15 |
|||
VisualStudioVersion = 15.0.27130.2026 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "netcore20-console-fsharp", "netcore20-console-fsharp.fsproj", "{5B271DEE-042F-4F7E-B7F8-BA60FB466236}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{5B271DEE-042F-4F7E-B7F8-BA60FB466236}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {41F46975-2B6E-4B46-9E01-A17675D97BC8} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1 @@ |
|||
# this folder shall not be in scope of the parent Paket resolution |
|||
Loading…
Reference in new issue