Browse Source

Build: handle a few warnings, allow running all test targets manually

build
Christoph Ruegg 9 years ago
parent
commit
52171f9492
  1. 16
      build.fsx
  2. 2
      src/FSharp/FSharp.fsproj
  3. 1
      src/FSharpUnitTests/FSharpUnitTests.fsproj
  4. 5
      src/Numerics/LinearAlgebra/Matrix.Arithmetic.cs
  5. 11
      src/Numerics/LinearAlgebra/Vector.Arithmetic.cs

16
build.fsx

@ -374,7 +374,7 @@ let dotnetBuild configuration solution = DotNetCli.Build (fun p ->
AdditionalArgs = defaultArgs})
Target "BuildMain" (fun _ -> dotnetBuild "Release" "MathNet.Numerics.sln")
Target "BuildSigned" (fun _ -> dotnetBuild "Release-StrongName" "MathNet.Numerics.sln")
//Target "BuildSigned" (fun _ -> dotnetBuild "Release-StrongName" "MathNet.Numerics.sln")
Target "Build" DoNothing
"Prepare"
@ -435,16 +435,16 @@ Target "TestF#NET46" (fun _ -> testLibraryFsharp "net46")
Target "TestF#NET47" (fun _ -> testLibraryFsharp "net47")
"Build" ==> "TestF#Core1.1" ==> "TestF#"
//"Build" ==> "TestF#Core2.0" ==> "TestF#"
"Build" ==> "TestF#Core2.0" //==> "TestF#"
"Build" ==> "TestF#NET45" ==> "TestF#"
//"Build" ==> "TestF#NET46" ==> "TestF#"
//"Build" ==> "TestF#NET47" ==> "TestF#"
"Build" ==> "TestF#NET46" //==> "TestF#"
"Build" ==> "TestF#NET47" //==> "TestF#"
"Build" ==> "TestC#Core1.1" ==> "TestC#"
//"Build" ==> "TestC#Core2.0" ==> "TestC#"
//"Build" ==> "TestC#NET40" ==> "TestC#"
"Build" ==> "TestC#Core2.0" //==> "TestC#"
"Build" ==> "TestC#NET40" //==> "TestC#"
"Build" ==> "TestC#NET45" ==> "TestC#"
//"Build" ==> "TestC#NET46" ==> "TestC#"
//"Build" ==> "TestC#NET47" ==> "TestC#"
"Build" ==> "TestC#NET46" //==> "TestC#"
"Build" ==> "TestC#NET47" //==> "TestC#"
"TestC#" ==> "Test"
"TestF#" ==> "Test"

2
src/FSharp/FSharp.fsproj

@ -38,7 +38,7 @@ BUG: Matrix.GetHashCode for wide matrices ~mjmckp</PackageReleaseNotes>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<NoWarn>1701;1702;1705;1591</NoWarn>
<NoWarn>FS2003</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<DefineConstants>NETSTANDARD</DefineConstants>

1
src/FSharpUnitTests/FSharpUnitTests.fsproj

@ -6,6 +6,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<NoWarn>FS0044;FS2003</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('netcoreapp')) OR $(TargetFramework.Contains('netstandard'))">
<DefineConstants>NETSTANDARD</DefineConstants>

5
src/Numerics/LinearAlgebra/Matrix.Arithmetic.cs

@ -1568,7 +1568,7 @@ namespace MathNet.Numerics.LinearAlgebra
/// <param name="f">Function which takes two matrices, modifies the second in place and returns void</param>
/// <param name="other">The other matrix to be passed to the function as argument. It is not modified</param>
/// <returns>The resulting matrix</returns>
/// <exception cref="ArgumentException">If this amtrix and <paramref name="result"/> are not the same dimension.</exception>
/// <exception cref="ArgumentException">If this amtrix and <paramref name="other"/> are not the same dimension.</exception>
protected Matrix<T> PointwiseBinary(Action<Matrix<T>, Matrix<T>> f, Matrix<T> other)
{
if (ColumnCount != other.ColumnCount || RowCount != other.RowCount)
@ -1587,8 +1587,9 @@ namespace MathNet.Numerics.LinearAlgebra
/// </summary>
/// <param name="f">Function which takes two matrices, modifies the second in place and returns void</param>
/// <param name="other">The other matrix to be passed to the function as argument. It is not modified</param>
/// <param name="result">The matrix to store the result.</param>
/// <returns>The resulting matrix</returns>
/// <exception cref="ArgumentException">If this matrix and <paramref name="result"/> are not the same dimension.</exception>
/// <exception cref="ArgumentException">If this matrix and <paramref name="other"/> are not the same dimension.</exception>
protected void PointwiseBinary(Action<Matrix<T>,Matrix<T>> f, Matrix<T> other, Matrix<T> result)
{
if (ColumnCount != result.ColumnCount || RowCount != result.RowCount || ColumnCount != other.ColumnCount || RowCount != other.RowCount)

11
src/Numerics/LinearAlgebra/Vector.Arithmetic.cs

@ -1013,7 +1013,7 @@ namespace MathNet.Numerics.LinearAlgebra
/// the scalar argument. The copy is then returned as the result
/// </summary>
/// <param name="f">Function which takes a scalar and a vector, modifies the vector in place and returns void</param>
/// <param name="x">The scalar to be passed to the function</param>
/// <param name="other">The scalar to be passed to the function</param>
/// <returns>The resulting vector</returns>
protected Vector<T> PointwiseBinary(Action<T, Vector<T>> f, T other)
{
@ -1048,7 +1048,7 @@ namespace MathNet.Numerics.LinearAlgebra
/// <param name="f">Function which takes two vectors, modifies the second in place and returns void</param>
/// <param name="other">The other vector to be passed to the function as argument. It is not modified</param>
/// <returns>The resulting vector</returns>
/// <exception cref="ArgumentException">If this vector and <paramref name="result"/> are not the same size.</exception>
/// <exception cref="ArgumentException">If this vector and <paramref name="other"/> are not the same size.</exception>
protected Vector<T> PointwiseBinary(Action<Vector<T>, Vector<T>> f, Vector<T> other)
{
if (Count != other.Count)
@ -1067,8 +1067,8 @@ namespace MathNet.Numerics.LinearAlgebra
/// </summary>
/// <param name="f">Function which takes two vectors, modifies the second in place and returns void</param>
/// <param name="other">The other vector to be passed to the function as argument. It is not modified</param>
/// <returns>The resulting vector</returns>
/// <exception cref="ArgumentException">If this vector and <paramref name="result"/> are not the same size.</exception>
/// <param name="result">The resulting vector</param>
/// <exception cref="ArgumentException">If this vector and <paramref name="other"/> are not the same size.</exception>
protected void PointwiseBinary(Action<Vector<T>, Vector<T>> f, Vector<T> other, Vector<T> result)
{
if (Count != other.Count)
@ -1193,7 +1193,6 @@ namespace MathNet.Numerics.LinearAlgebra
/// 'this' vector being the 'y'
/// </summary>
/// <param name="other"></param>
/// <returns></returns>
public Vector<T> PointwiseAtan2(Vector<T> other)
{
return PointwiseBinary(DoPointwiseAtan2, other);
@ -1205,7 +1204,7 @@ namespace MathNet.Numerics.LinearAlgebra
/// 'this' vector being the 'y'
/// </summary>
/// <param name="other"></param>
/// <returns></returns>
/// <param name="result">The vector to store the result</param>
public void PointwiseAtan2(Vector<T> other, Vector<T> result)
{
PointwiseBinary(DoPointwiseAtan2, other, result);

Loading…
Cancel
Save