diff --git a/src/Numerics/LinearAlgebra/Complex/DenseVector.cs b/src/Numerics/LinearAlgebra/Complex/DenseVector.cs index 9616250b..3c7575e1 100644 --- a/src/Numerics/LinearAlgebra/Complex/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Complex/DenseVector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -281,21 +285,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex /// If or is . public static Vector operator +(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.Add(rightSide); } @@ -366,21 +360,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex /// If or is . public static Vector operator -(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.Subtract(rightSide); } @@ -476,21 +460,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex /// If or is . public static Complex operator *(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Complex/SparseVector.cs b/src/Numerics/LinearAlgebra/Complex/SparseVector.cs index 2c532191..0da08e7b 100644 --- a/src/Numerics/LinearAlgebra/Complex/SparseVector.cs +++ b/src/Numerics/LinearAlgebra/Complex/SparseVector.cs @@ -378,21 +378,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex /// If or is . public static SparseVector operator +(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Add(rightSide); } @@ -525,21 +515,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex /// If or is . public static SparseVector operator -(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Subtract(rightSide); } @@ -674,21 +654,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex /// If or is . public static Complex operator *(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Complex/Vector.cs b/src/Numerics/LinearAlgebra/Complex/Vector.cs index ac4b07c2..7e585b1b 100644 --- a/src/Numerics/LinearAlgebra/Complex/Vector.cs +++ b/src/Numerics/LinearAlgebra/Complex/Vector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -28,9 +32,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex { using System; using System.Numerics; - using Distributions; using Generic; - using Properties; using Storage; using Threading; diff --git a/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs b/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs index 86719122..605169c0 100644 --- a/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -281,21 +285,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 /// If or is . public static DenseVector operator +(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (DenseVector)leftSide.Add(rightSide); } @@ -366,21 +360,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 /// If or is . public static DenseVector operator -(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (DenseVector)leftSide.Subtract(rightSide); } @@ -476,21 +460,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 /// If or is . public static Complex32 operator *(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Complex32/SparseVector.cs b/src/Numerics/LinearAlgebra/Complex32/SparseVector.cs index 203d5ff6..5dacdd32 100644 --- a/src/Numerics/LinearAlgebra/Complex32/SparseVector.cs +++ b/src/Numerics/LinearAlgebra/Complex32/SparseVector.cs @@ -378,21 +378,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 /// If or is . public static SparseVector operator +(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Add(rightSide); } @@ -525,21 +515,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 /// If or is . public static SparseVector operator -(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Subtract(rightSide); } @@ -674,21 +654,11 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 /// If or is . public static Complex32 operator *(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Complex32/Vector.cs b/src/Numerics/LinearAlgebra/Complex32/Vector.cs index 64133ede..3c2dcc3f 100644 --- a/src/Numerics/LinearAlgebra/Complex32/Vector.cs +++ b/src/Numerics/LinearAlgebra/Complex32/Vector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -27,9 +31,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 { using System; - using Distributions; using Generic; - using Properties; using Storage; using Threading; using Complex32 = Numerics.Complex32; diff --git a/src/Numerics/LinearAlgebra/Double/DenseVector.cs b/src/Numerics/LinearAlgebra/Double/DenseVector.cs index 98d324bc..18a89561 100644 --- a/src/Numerics/LinearAlgebra/Double/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Double/DenseVector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -366,21 +370,11 @@ namespace MathNet.Numerics.LinearAlgebra.Double /// If or is . public static DenseVector operator -(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (DenseVector)leftSide.Subtract(rightSide); } @@ -476,21 +470,11 @@ namespace MathNet.Numerics.LinearAlgebra.Double /// If or is . public static double operator *(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Double/SparseVector.cs b/src/Numerics/LinearAlgebra/Double/SparseVector.cs index 90169a7b..fea9f87b 100644 --- a/src/Numerics/LinearAlgebra/Double/SparseVector.cs +++ b/src/Numerics/LinearAlgebra/Double/SparseVector.cs @@ -346,21 +346,11 @@ namespace MathNet.Numerics.LinearAlgebra.Double /// If or is . public static SparseVector operator +(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Add(rightSide); } @@ -493,21 +483,11 @@ namespace MathNet.Numerics.LinearAlgebra.Double /// If or is . public static SparseVector operator -(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Subtract(rightSide); } @@ -642,21 +622,11 @@ namespace MathNet.Numerics.LinearAlgebra.Double /// If or is . public static double operator *(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Double/Vector.cs b/src/Numerics/LinearAlgebra/Double/Vector.cs index fe04fa58..211ae5b6 100644 --- a/src/Numerics/LinearAlgebra/Double/Vector.cs +++ b/src/Numerics/LinearAlgebra/Double/Vector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -27,9 +31,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double { using System; - using Distributions; using Generic; - using Properties; using Storage; using Threading; diff --git a/src/Numerics/LinearAlgebra/Single/DenseVector.cs b/src/Numerics/LinearAlgebra/Single/DenseVector.cs index 82d65168..8789c17a 100644 --- a/src/Numerics/LinearAlgebra/Single/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Single/DenseVector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -281,21 +285,11 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// If or is . public static DenseVector operator +(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (DenseVector)leftSide.Add(rightSide); } @@ -366,21 +360,11 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// If or is . public static DenseVector operator -(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (DenseVector)leftSide.Subtract(rightSide); } @@ -476,21 +460,11 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// If or is . public static float operator *(DenseVector leftSide, DenseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Single/SparseVector.cs b/src/Numerics/LinearAlgebra/Single/SparseVector.cs index 440d7e60..16a8fb2c 100644 --- a/src/Numerics/LinearAlgebra/Single/SparseVector.cs +++ b/src/Numerics/LinearAlgebra/Single/SparseVector.cs @@ -347,21 +347,11 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// If or is . public static SparseVector operator +(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Add(rightSide); } @@ -494,21 +484,11 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// If or is . public static SparseVector operator -(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return (SparseVector)leftSide.Subtract(rightSide); } @@ -643,21 +623,11 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// If or is . public static float operator *(SparseVector leftSide, SparseVector rightSide) { - if (rightSide == null) - { - throw new ArgumentNullException("rightSide"); - } - if (leftSide == null) { throw new ArgumentNullException("leftSide"); } - if (leftSide.Count != rightSide.Count) - { - throw new ArgumentException(Resources.ArgumentVectorsSameLength, "rightSide"); - } - return leftSide.DotProduct(rightSide); } diff --git a/src/Numerics/LinearAlgebra/Single/Vector.cs b/src/Numerics/LinearAlgebra/Single/Vector.cs index 3e5c4473..1f1e4679 100644 --- a/src/Numerics/LinearAlgebra/Single/Vector.cs +++ b/src/Numerics/LinearAlgebra/Single/Vector.cs @@ -3,7 +3,9 @@ // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com -// Copyright (c) 2009-2010 Math.NET +// +// Copyright (c) 2009-2013 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 @@ -12,8 +14,10 @@ // 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 @@ -27,9 +31,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single { using System; - using Distributions; using Generic; - using Properties; using Storage; using Threading;