Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Math.Numerics.2017.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Numerics-2017", "src\Numerics\Numerics-2017.csproj", "{4C1F1555-F9C6-45A0-B076-97384CA2BA7F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestData-2017", "src\TestData\TestData-2017.csproj", "{032AE5BB-2D1C-405E-83EF-D4306803C4BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests-2017", "src\UnitTests\UnitTests-2017.csproj", "{9B7A2692-AA86-4A4E-B83B-E2D025FB634F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Release-Signed|Any CPU = Release-Signed|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4C1F1555-F9C6-45A0-B076-97384CA2BA7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C1F1555-F9C6-45A0-B076-97384CA2BA7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C1F1555-F9C6-45A0-B076-97384CA2BA7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C1F1555-F9C6-45A0-B076-97384CA2BA7F}.Release|Any CPU.Build.0 = Release|Any CPU
{4C1F1555-F9C6-45A0-B076-97384CA2BA7F}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU
{4C1F1555-F9C6-45A0-B076-97384CA2BA7F}.Release-Signed|Any CPU.Build.0 = Release|Any CPU
{032AE5BB-2D1C-405E-83EF-D4306803C4BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{032AE5BB-2D1C-405E-83EF-D4306803C4BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{032AE5BB-2D1C-405E-83EF-D4306803C4BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{032AE5BB-2D1C-405E-83EF-D4306803C4BE}.Release|Any CPU.Build.0 = Release|Any CPU
{032AE5BB-2D1C-405E-83EF-D4306803C4BE}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU
{032AE5BB-2D1C-405E-83EF-D4306803C4BE}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU
{9B7A2692-AA86-4A4E-B83B-E2D025FB634F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B7A2692-AA86-4A4E-B83B-E2D025FB634F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B7A2692-AA86-4A4E-B83B-E2D025FB634F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B7A2692-AA86-4A4E-B83B-E2D025FB634F}.Release|Any CPU.Build.0 = Release|Any CPU
{9B7A2692-AA86-4A4E-B83B-E2D025FB634F}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU
{9B7A2692-AA86-4A4E-B83B-E2D025FB634F}.Release-Signed|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
67 changes: 67 additions & 0 deletions src/Examples/Examples-2017.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<TargetFrameworks>net40;netstandard1.6</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release-Signed|AnyCPU'">
<OutputPath>bin\Release-Signed\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\Examples.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Numerics\Numerics-2017.csproj">
<Project>{b7cae5f4-a23f-4438-b5be-41226618b695}</Project>
<Name>Numerics</Name>
</ProjectReference>
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/Numerics/Compatibility.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if PORTABLE
#if PORTABLE || NETSTANDARD1_6
namespace MathNet.Numerics
{
using System;
Expand Down Expand Up @@ -139,7 +139,7 @@ public static void ForEach<TSource, TLocal>(
}
#endif

#if (PORTABLE || NET35)
#if (PORTABLE || NET35 || NETSTANDARD1_6)
namespace MathNet.Numerics
{
using System;
Expand Down
2 changes: 1 addition & 1 deletion src/Numerics/Complex32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ private static float ParsePart(ref LinkedListNode<string> token, out bool imagin
}
}

#if PORTABLE
#if PORTABLE || NETSTANDARD1_6
var value = GlobalizationHelper.ParseSingle(ref token);
#else
var value = GlobalizationHelper.ParseSingle(ref token, format.GetCultureInfo());
Expand Down
4 changes: 2 additions & 2 deletions src/Numerics/ComplexExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace MathNet.Numerics
using System;
using System.Collections.Generic;

#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
using System.Runtime;
#endif

Expand Down Expand Up @@ -607,7 +607,7 @@ private static double ParsePart(ref LinkedListNode<string> token, out bool imagi
}
}

#if PORTABLE
#if PORTABLE || NETSTANDARD1_6
var value = GlobalizationHelper.ParseDouble(ref token);
#else
var value = GlobalizationHelper.ParseDouble(ref token, format.GetCultureInfo());
Expand Down
2 changes: 1 addition & 1 deletion src/Numerics/Euclid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public static long ExtendedGreatestCommonDivisor(long a, long b, out long x, out
while (b != 0)
{
long rem;
#if PORTABLE
#if PORTABLE || NETSTANDARD1_6
rem = a % b;
var quot = a / b;
#else
Expand Down
12 changes: 6 additions & 6 deletions src/Numerics/Exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public NonConvergenceException(string message) : base(message)
public NonConvergenceException(string message, Exception innerException) : base(message, innerException)
{
}
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
protected NonConvergenceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Expand Down Expand Up @@ -48,7 +48,7 @@ public NumericalBreakdownException(string message, Exception innerException)
: base(message, innerException)
{
}
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
protected NumericalBreakdownException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Expand All @@ -75,7 +75,7 @@ protected NativeInterfaceException(string message, Exception innerException)
: base(message, innerException)
{
}
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
protected NativeInterfaceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Expand Down Expand Up @@ -103,7 +103,7 @@ public InvalidParameterException(int parameter, Exception innerException)
: base(string.Format(Resources.InvalidParameterWithNumber, parameter), innerException)
{
}
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
protected InvalidParameterException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Expand All @@ -126,7 +126,7 @@ public MemoryAllocationException(Exception innerException)
: base(Resources.MemoryAllocation, innerException)
{
}
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
protected MemoryAllocationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Expand Down Expand Up @@ -154,7 +154,7 @@ public SingularUMatrixException(int element, Exception innerException)
: base(string.Format(Resources.SingularUMatrixWithElement, element), innerException)
{
}
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
protected SingularUMatrixException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Numerics/GlobalizationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal static void Tokenize(LinkedListNode<string> node, string[] keywords, in
}
}

#if PORTABLE
#if PORTABLE || NETSTANDARD1_6
/// <summary>
/// Globalized Parsing: Parse a double number
/// </summary>
Expand Down
5 changes: 3 additions & 2 deletions src/Numerics/LinearAlgebra/Matrix.BCL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
namespace MathNet.Numerics.LinearAlgebra
{
[DebuggerDisplay("Matrix {RowCount}x{ColumnCount}")]

public abstract partial class Matrix<T>
{
/// <summary>
Expand Down Expand Up @@ -76,14 +77,14 @@ public override int GetHashCode()
return Storage.GetHashCode();
}

#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6

/// <summary>
/// Creates a new object that is a copy of the current instance.
/// </summary>
/// <returns>
/// A new object that is a copy of this instance.
/// </returns>
/// </returns>
object ICloneable.Clone()
{
return Clone();
Expand Down
2 changes: 1 addition & 1 deletion src/Numerics/LinearAlgebra/Matrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace MathNet.Numerics.LinearAlgebra
[Serializable]
public abstract partial class Matrix<T> :
IFormattable, IEquatable<Matrix<T>>
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
, ICloneable
#endif
where T : struct, IEquatable<T>, IFormattable
Expand Down
8 changes: 4 additions & 4 deletions src/Numerics/LinearAlgebra/Solvers/SolverSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static class SolverSetup<T> where T : struct, IEquatable<T>, IFormattable
/// <param name="typesToExclude">The <see cref="IIterativeSolver{T}"/> types that should not be loaded.</param>
public static IEnumerable<IIterativeSolverSetup<T>> LoadFromAssembly(Assembly assembly, bool ignoreFailed = true, params Type[] typesToExclude)
{
#if NET45REFLECTION
#if NET45REFLECTION || NETSTANDARD1_6
TypeInfo setupInterfaceType = typeof(IIterativeSolverSetup<T>).GetTypeInfo();
IEnumerable<Type> candidates = assembly.DefinedTypes
.Where(typeInfo => !typeInfo.IsAbstract && !typeInfo.IsEnum && !typeInfo.IsInterface && typeInfo.IsVisible)
Expand Down Expand Up @@ -73,7 +73,7 @@ public static IEnumerable<IIterativeSolverSetup<T>> LoadFromAssembly(Assembly as
}
}

#if NET45REFLECTION
#if NET45REFLECTION || NETSTANDARD1_6
var excludedTypes = new List<TypeInfo>(typesToExclude.Select(type => type.GetTypeInfo()));
return setups
.Where(s => !excludedTypes.Any(t => t.IsAssignableFrom(s.SolverType.GetTypeInfo()) || t.IsAssignableFrom(s.PreconditionerType.GetTypeInfo())))
Expand All @@ -94,7 +94,7 @@ public static IEnumerable<IIterativeSolverSetup<T>> LoadFromAssembly(Assembly as
/// <param name="typesToExclude">The <see cref="IIterativeSolver{T}"/> types that should not be loaded.</param>
public static IEnumerable<IIterativeSolverSetup<T>> LoadFromAssembly(Type typeInAssembly, bool ignoreFailed = true, params Type[] typesToExclude)
{
#if NET45REFLECTION
#if NET45REFLECTION || NETSTANDARD1_6
return LoadFromAssembly(typeInAssembly.GetTypeInfo().Assembly, ignoreFailed, typesToExclude);
#else
return LoadFromAssembly(typeInAssembly.Assembly, ignoreFailed, typesToExclude);
Expand All @@ -109,7 +109,7 @@ public static IEnumerable<IIterativeSolverSetup<T>> LoadFromAssembly(Type typeIn
/// <param name="typesToExclude">The <see cref="IIterativeSolver{T}"/> types that should not be loaded.</param>
public static IEnumerable<IIterativeSolverSetup<T>> LoadFromAssembly(AssemblyName assemblyName, bool ignoreFailed = true, params Type[] typesToExclude)
{
#if NET45REFLECTION
#if NET45REFLECTION || NETSTANDARD1_6
return LoadFromAssembly(Assembly.Load(assemblyName), ignoreFailed, typesToExclude);
#else
return LoadFromAssembly(Assembly.Load(assemblyName.FullName), ignoreFailed, typesToExclude);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public override void At(int row, int column, T value)
/// </summary>
void RowColumnAtIndex(int index, out int row, out int column)
{
#if PORTABLE
#if PORTABLE || NETSTANDARD1_6
row = index % RowCount;
column = index / RowCount;
#else
Expand Down
2 changes: 1 addition & 1 deletion src/Numerics/LinearAlgebra/Vector.BCL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public sealed override int GetHashCode()
return Storage.GetHashCode();
}

#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6

/// <summary>
/// Creates a new object that is a copy of the current instance.
Expand Down
2 changes: 1 addition & 1 deletion src/Numerics/LinearAlgebra/Vector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace MathNet.Numerics.LinearAlgebra
[Serializable]
public abstract partial class Vector<T> :
IFormattable, IEquatable<Vector<T>>, IList, IList<T>
#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6
, ICloneable
#endif
where T : struct, IEquatable<T>, IFormattable
Expand Down
31 changes: 31 additions & 0 deletions src/Numerics/Numerics-2017.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40;netstandard1.6</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Math.Numerics</PackageId>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<DefineConstants>NOSERIALIZATION</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<OutputPath>..\..\out\test\Net35\</OutputPath>
<IntermediateOutputPath>..\..\obj\test\Net35\</IntermediateOutputPath>
<BaseIntermediateOutputPath>..\..\obj\test\Net35\</BaseIntermediateOutputPath>
<AssemblyName>MathNet.Numerics</AssemblyName>
<RootNamespace>MathNet.Numerics</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.Serialization" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.6'">
<PackageReference Include="System.Runtime">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions src/Numerics/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
[assembly: AssemblyFileVersion("3.20.0.0")]
[assembly: AssemblyInformationalVersion("3.20.0-beta01")]

#if PORTABLE
#if PORTABLE || NETSTANDARD1_6

[assembly: AssemblyTitle("Math.NET Numerics - Portable Edition")]
[assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests")]
Expand Down Expand Up @@ -82,4 +82,3 @@
#endif

#endif

2 changes: 1 addition & 1 deletion src/Numerics/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Numerics/Random/CryptoRandomSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
// </copyright>

#if !PORTABLE
#if !PORTABLE && !NETSTANDARD1_6

using System;
using System.Collections.Generic;
Expand Down
Loading