20 changed files with 479 additions and 186 deletions
@ -0,0 +1,60 @@ |
|||
// <copyright file="Compatibility.fs" company="Math.NET"> |
|||
// Math.NET Numerics, part of the Math.NET Project |
|||
// http://numerics.mathdotnet.com |
|||
// http://github.com/mathnet/mathnet-numerics |
|||
// http://mathnetnumerics.codeplex.com |
|||
// |
|||
// Copyright (c) 2009-2014 Math.NET |
|||
// |
|||
// Permission is hereby granted, free of charge, to any person |
|||
// obtaining a copy of this software and associated documentation |
|||
// files (the "Software"), to deal in the Software without |
|||
// restriction, including without limitation the rights to use, |
|||
// copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
// copies of the Software, and to permit persons to whom the |
|||
// Software is furnished to do so, subject to the following |
|||
// conditions: |
|||
// |
|||
// The above copyright notice and this permission notice shall be |
|||
// included in all copies or substantial portions of the Software. |
|||
// |
|||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|||
// OTHER DEALINGS IN THE SOFTWARE. |
|||
// </copyright> |
|||
|
|||
namespace MathNet.Numerics |
|||
|
|||
[<AutoOpen>] |
|||
module internal Compatibility = |
|||
|
|||
#if NET35 |
|||
|
|||
let inline internal properTuple2 (tuple: MathNet.Numerics.Tuple<'a,'b>) = tuple.Item1, tuple.Item2 |
|||
let inline internal properTuple3 (tuple: MathNet.Numerics.Tuple<'a,'b,'c>) = tuple.Item1, tuple.Item2, tuple.Item3 |
|||
let inline internal internalTuple2 ((a,b): ('a * 'b)) = MathNet.Numerics.Tuple<'a,'b>(a, b) |
|||
let inline internal internalTuple3 ((a,b,c): ('a * 'b * 'c)) = MathNet.Numerics.Tuple<'a,'b,'c>(a, b, c) |
|||
|
|||
let inline internal properTuple2Seq x = x |> Seq.map properTuple2 |
|||
let inline internal properTuple3Seq x = x |> Seq.map properTuple3 |
|||
let inline internal internalTuple2Seq x = x |> Seq.map internalTuple2 |
|||
let inline internal internalTuple3Seq x = x |> Seq.map internalTuple3 |
|||
|
|||
#else |
|||
|
|||
let inline internal properTuple2 x = x |
|||
let inline internal properTuple3 x = x |
|||
let inline internal internalTuple2 x = x |
|||
let inline internal internalTuple3 x = x |
|||
|
|||
let inline internal properTuple2Seq x = x |
|||
let inline internal properTuple3Seq x = x |
|||
let inline internal internalTuple2Seq x = x |
|||
let inline internal internalTuple3Seq x = x |
|||
|
|||
#endif |
|||
@ -0,0 +1,94 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{d5dbcec0-9d9d-4a62-9ee0-f78e1895d4f4}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<RootNamespace>MathNet.Numerics</RootNamespace> |
|||
<AssemblyName>MathNet.Numerics.FSharp</AssemblyName> |
|||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> |
|||
<Name>FSharp</Name> |
|||
<TargetFSharpCoreVersion>4.3.0.0</TargetFSharpCoreVersion> |
|||
<!-- Conditional Strong Name --> |
|||
<AssemblyOriginatorKeyFile>..\MathNet.Numerics.snk</AssemblyOriginatorKeyFile> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<Tailcalls>true</Tailcalls> |
|||
<OutputPath>..\..\out\lib\Net35\</OutputPath> |
|||
<IntermediateOutputPath>..\..\obj\lib\Net35\</IntermediateOutputPath> |
|||
<BaseIntermediateOutputPath>..\..\obj\lib\Net35\</BaseIntermediateOutputPath> |
|||
<DocumentationFile>..\..\out\lib\Net35\MathNet.Numerics.FSharp.xml</DocumentationFile> |
|||
<DefineConstants>TRACE;NET35;NOSYSNUMERICS</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<!-- Conditional Strong Name: NO --> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<Tailcalls>false</Tailcalls> |
|||
<OutputPath>..\..\out\lib-debug\Net35\</OutputPath> |
|||
<IntermediateOutputPath>..\..\obj\lib-debug\Net35\</IntermediateOutputPath> |
|||
<BaseIntermediateOutputPath>..\..\obj\lib-debug\Net35\</BaseIntermediateOutputPath> |
|||
<DefineConstants>TRACE;DEBUG;NET35;NOSYSNUMERICS</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<!-- Conditional Strong Name: NO --> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Signed|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<Tailcalls>true</Tailcalls> |
|||
<DefineConstants>TRACE;NET35;NOSYSNUMERICS;STRONGNAME</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<OutputPath>..\..\out\lib-signed\Net35\</OutputPath> |
|||
<IntermediateOutputPath>..\..\obj\lib-signed\Net35\</IntermediateOutputPath> |
|||
<BaseIntermediateOutputPath>..\..\obj\lib-signed\Net35\</BaseIntermediateOutputPath> |
|||
<DocumentationFile>..\..\out\lib-signed\Net35\MathNet.Numerics.FSharp.xml</DocumentationFile> |
|||
<!-- Conditional Strong Name: YES --> |
|||
<SignAssembly>true</SignAssembly> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0' Or $(OS) != 'Windows_NT'"> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
<Import Project="$(FSharpTargetsPath)" Condition="Exists('$(FSharpTargetsPath)')" /> |
|||
<ItemGroup> |
|||
<Compile Include="AssemblyInfo.fs" /> |
|||
<Compile Include="Compatibility.fs" /> |
|||
<Compile Include="Statistics.fs" /> |
|||
<Compile Include="Random.fs" /> |
|||
<Compile Include="Distributions.fs" /> |
|||
<Compile Include="Generate.fs" /> |
|||
<Compile Include="LinearAlgebra.Vector.fs" /> |
|||
<Compile Include="LinearAlgebra.Matrix.fs" /> |
|||
<Compile Include="Complex.fs" /> |
|||
<Compile Include="BigIntegerExtensions.fs" /> |
|||
<Compile Include="BigRational.fsi" /> |
|||
<Compile Include="BigRational.fs" /> |
|||
<Compile Include="Fit.fs" /> |
|||
<Compile Include="FindRoots.fs" /> |
|||
<Compile Include="RandomVariable.fs" /> |
|||
<None Include="MathNet.Numerics.fsx" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Reference Include="FSharp.Core, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<Private>False</Private> |
|||
</Reference> |
|||
<Reference Include="mscorlib" /> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Core" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\Numerics\Numerics-Net35.csproj"> |
|||
<Name>Numerics-Net35</Name> |
|||
<Project>{e54e712d-eb6b-4fbf-b29a-6bb95e719bac}</Project> |
|||
<Private>True</Private> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -0,0 +1,103 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProjectGuid>{8c96f2e9-681b-4201-8bdd-0aa901203725}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<RootNamespace>FSharpUnitTests</RootNamespace> |
|||
<AssemblyName>MathNet.Numerics.FSharp.UnitTests</AssemblyName> |
|||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> |
|||
<Name>FSharpUnitTests</Name> |
|||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion> |
|||
<TargetFSharpCoreVersion>4.3.0.0</TargetFSharpCoreVersion> |
|||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> |
|||
<RestorePackages>true</RestorePackages> |
|||
<TargetFrameworkProfile /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<Tailcalls>true</Tailcalls> |
|||
<OutputPath>..\..\out\test\Net40\</OutputPath> |
|||
<IntermediateOutputPath>..\..\obj\test\Net40\</IntermediateOutputPath> |
|||
<BaseIntermediateOutputPath>..\..\obj\test\Net40\</BaseIntermediateOutputPath> |
|||
<DefineConstants>TRACE;NET35;NOSYSNUMERICS</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<Tailcalls>false</Tailcalls> |
|||
<OutputPath>..\..\out\test-debug\Net40\</OutputPath> |
|||
<IntermediateOutputPath>..\..\obj\test-debug\Net40\</IntermediateOutputPath> |
|||
<BaseIntermediateOutputPath>..\..\obj\test-debug\Net40\</BaseIntermediateOutputPath> |
|||
<DefineConstants>DEBUG;TRACE;NET35;NOSYSNUMERICS</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Signed|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<Tailcalls>true</Tailcalls> |
|||
<DefineConstants>TRACE;NET35;NOSYSNUMERICS</DefineConstants> |
|||
<WarningLevel>3</WarningLevel> |
|||
<OutputPath>..\..\out\test-signed\Net40\</OutputPath> |
|||
<IntermediateOutputPath>..\..\obj\test-signed\Net40\</IntermediateOutputPath> |
|||
<BaseIntermediateOutputPath>..\..\obj\test-signed\Net40\</BaseIntermediateOutputPath> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<!-- Workaround - remove once no longer needed! --> |
|||
<DefineConstants>$(DefineConstants);NOFSSLICESET1D</DefineConstants> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="FSharp.Core, Version=2.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
|||
<Private>False</Private> |
|||
</Reference> |
|||
<Reference Include="mscorlib" /> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="nunit.framework"> |
|||
<HintPath>..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="FsUnit.NUnit"> |
|||
<HintPath>..\..\packages\FsUnit.1.2.1.0\Lib\Net20\FsUnit.NUnit.dll</HintPath> |
|||
</Reference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="AssemblyInfo.fs" /> |
|||
<Compile Include="VectorTests.fs" /> |
|||
<Compile Include="SparseVectorTests.fs" /> |
|||
<Compile Include="DenseVectorTests.fs" /> |
|||
<Compile Include="MatrixTests.fs" /> |
|||
<Compile Include="SparseMatrixTests.fs" /> |
|||
<Compile Include="DenseMatrixTests.fs" /> |
|||
<Compile Include="Utilities.fs" /> |
|||
<Compile Include="BigRationalTests.fs" /> |
|||
<Compile Include="RandomVariableTests.fs" /> |
|||
<Compile Include="PokerTests.fs" /> |
|||
<Compile Include="FitTests.fs" /> |
|||
<Compile Include="FindRootsTests.fs" /> |
|||
<None Include="packages.config" /> |
|||
<None Include="App.config" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\FSharp\FSharp-Net35.fsproj"> |
|||
<Name>FSharp-Net35</Name> |
|||
<Project>{d5dbcec0-9d9d-4a62-9ee0-f78e1895d4f4}</Project> |
|||
<Private>True</Private> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\Numerics\Numerics-Net35.csproj"> |
|||
<Name>Numerics-Net35</Name> |
|||
<Project>{e54e712d-eb6b-4fbf-b29a-6bb95e719bac}</Project> |
|||
<Private>True</Private> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<PropertyGroup> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0' Or $(OS) != 'Windows_NT'"> |
|||
<FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath> |
|||
</PropertyGroup> |
|||
<Import Project="$(FSharpTargetsPath)" Condition="Exists('$(FSharpTargetsPath)')" /> |
|||
</Project> |
|||
Loading…
Reference in new issue