30 changed files with 63 additions and 350 deletions
@ -1,104 +0,0 @@ |
|||||
// <copyright file="IIterativeSolver.cs" 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-2010 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>
|
|
||||
|
|
||||
using MathNet.Numerics.LinearAlgebra.Solvers; |
|
||||
using MathNet.Numerics.LinearAlgebra.Solvers.Status; |
|
||||
|
|
||||
namespace MathNet.Numerics.LinearAlgebra.Complex.Solvers |
|
||||
{ |
|
||||
|
|
||||
#if NOSYSNUMERICS
|
|
||||
using Complex = Numerics.Complex; |
|
||||
#else
|
|
||||
using Complex = System.Numerics.Complex; |
|
||||
#endif
|
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Defines the interface for <see cref="IIterativeSolver"/> classes that solve the matrix equation Ax = b in
|
|
||||
/// an iterative manner.
|
|
||||
/// </summary>
|
|
||||
public interface IIterativeSolver |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Stops the solve process.
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// Note that it may take an indetermined amount of time for the solver to actually stop the process.
|
|
||||
/// </remarks>
|
|
||||
void StopSolve(); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Sets the <see cref="IIterator"/> that will be used to track the iterative process.
|
|
||||
/// </summary>
|
|
||||
/// <param name="iterator">The iterator.</param>
|
|
||||
void SetIterator(IIterator<Complex> iterator); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the status of the iteration once the calculation is finished.
|
|
||||
/// </summary>
|
|
||||
ICalculationStatus IterationResult { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation Ax = b, where A is the coefficient matrix, b is the
|
|
||||
/// solution vector and x is the unknown vector.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="vector">The solution vector, <c>b</c>.</param>
|
|
||||
/// <returns>The result vector, <c>x</c>.</returns>
|
|
||||
Vector<Complex> Solve(Matrix<Complex> matrix, Vector<Complex> vector); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation Ax = b, where A is the coefficient matrix, b is the
|
|
||||
/// solution vector and x is the unknown vector.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution vector, <c>b</c></param>
|
|
||||
/// <param name="result">The result vector, <c>x</c></param>
|
|
||||
void Solve(Matrix<Complex> matrix, Vector<Complex> input, Vector<Complex> result); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation AX = B, where A is the coefficient matrix, B is the
|
|
||||
/// solution matrix and X is the unknown matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution matrix, <c>B</c>.</param>
|
|
||||
/// <returns>The result matrix, <c>X</c>.</returns>
|
|
||||
Matrix<Complex> Solve(Matrix<Complex> matrix, Matrix<Complex> input); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation AX = B, where A is the coefficient matrix, B is the
|
|
||||
/// solution matrix and X is the unknown matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution matrix, <c>B</c>.</param>
|
|
||||
/// <param name="result">The result matrix, <c>X</c></param>
|
|
||||
void Solve(Matrix<Complex> matrix, Matrix<Complex> input, Matrix<Complex> result); |
|
||||
} |
|
||||
} |
|
||||
@ -1,99 +0,0 @@ |
|||||
// <copyright file="IIterativeSolver.cs" 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-2010 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>
|
|
||||
|
|
||||
using MathNet.Numerics.LinearAlgebra.Solvers; |
|
||||
using MathNet.Numerics.LinearAlgebra.Solvers.Status; |
|
||||
|
|
||||
namespace MathNet.Numerics.LinearAlgebra.Complex32.Solvers |
|
||||
{ |
|
||||
using Numerics; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Defines the interface for <see cref="IIterativeSolver"/> classes that solve the matrix equation Ax = b in
|
|
||||
/// an iterative manner.
|
|
||||
/// </summary>
|
|
||||
public interface IIterativeSolver |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Stops the solve process.
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// Note that it may take an indetermined amount of time for the solver to actually stop the process.
|
|
||||
/// </remarks>
|
|
||||
void StopSolve(); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Sets the <see cref="IIterator"/> that will be used to track the iterative process.
|
|
||||
/// </summary>
|
|
||||
/// <param name="iterator">The iterator.</param>
|
|
||||
void SetIterator(IIterator<Complex32> iterator); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the status of the iteration once the calculation is finished.
|
|
||||
/// </summary>
|
|
||||
ICalculationStatus IterationResult { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation Ax = b, where A is the coefficient matrix, b is the
|
|
||||
/// solution vector and x is the unknown vector.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="vector">The solution vector, <c>b</c>.</param>
|
|
||||
/// <returns>The result vector, <c>x</c>.</returns>
|
|
||||
Vector<Complex32> Solve(Matrix<Complex32> matrix, Vector<Complex32> vector); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation Ax = b, where A is the coefficient matrix, b is the
|
|
||||
/// solution vector and x is the unknown vector.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution vector, <c>b</c></param>
|
|
||||
/// <param name="result">The result vector, <c>x</c></param>
|
|
||||
void Solve(Matrix<Complex32> matrix, Vector<Complex32> input, Vector<Complex32> result); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation AX = B, where A is the coefficient matrix, B is the
|
|
||||
/// solution matrix and X is the unknown matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution matrix, <c>B</c>.</param>
|
|
||||
/// <returns>The result matrix, <c>X</c>.</returns>
|
|
||||
Matrix<Complex32> Solve(Matrix<Complex32> matrix, Matrix<Complex32> input); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation AX = B, where A is the coefficient matrix, B is the
|
|
||||
/// solution matrix and X is the unknown matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution matrix, <c>B</c>.</param>
|
|
||||
/// <param name="result">The result matrix, <c>X</c></param>
|
|
||||
void Solve(Matrix<Complex32> matrix, Matrix<Complex32> input, Matrix<Complex32> result); |
|
||||
} |
|
||||
} |
|
||||
@ -1,97 +0,0 @@ |
|||||
// <copyright file="IIterativeSolver.cs" 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-2010 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>
|
|
||||
|
|
||||
using MathNet.Numerics.LinearAlgebra.Solvers; |
|
||||
using MathNet.Numerics.LinearAlgebra.Solvers.Status; |
|
||||
|
|
||||
namespace MathNet.Numerics.LinearAlgebra.Double.Solvers |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Defines the interface for <see cref="IIterativeSolver"/> classes that solve the matrix equation Ax = b in
|
|
||||
/// an iterative manner.
|
|
||||
/// </summary>
|
|
||||
public interface IIterativeSolver |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// Stops the solve process.
|
|
||||
/// </summary>
|
|
||||
/// <remarks>
|
|
||||
/// Note that it may take an indetermined amount of time for the solver to actually stop the process.
|
|
||||
/// </remarks>
|
|
||||
void StopSolve(); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Sets the <see cref="IIterator"/> that will be used to track the iterative process.
|
|
||||
/// </summary>
|
|
||||
/// <param name="iterator">The iterator.</param>
|
|
||||
void SetIterator(IIterator<double> iterator); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Gets the status of the iteration once the calculation is finished.
|
|
||||
/// </summary>
|
|
||||
ICalculationStatus IterationResult { get; } |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation Ax = b, where A is the coefficient matrix, b is the
|
|
||||
/// solution vector and x is the unknown vector.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="vector">The solution vector, <c>b</c>.</param>
|
|
||||
/// <returns>The result vector, <c>x</c>.</returns>
|
|
||||
Vector<double> Solve(Matrix<double> matrix, Vector<double> vector); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation Ax = b, where A is the coefficient matrix, b is the
|
|
||||
/// solution vector and x is the unknown vector.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution vector, <c>b</c></param>
|
|
||||
/// <param name="result">The result vector, <c>x</c></param>
|
|
||||
void Solve(Matrix<double> matrix, Vector<double> input, Vector<double> result); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation AX = B, where A is the coefficient matrix, B is the
|
|
||||
/// solution matrix and X is the unknown matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution matrix, <c>B</c>.</param>
|
|
||||
/// <returns>The result matrix, <c>X</c>.</returns>
|
|
||||
Matrix<double> Solve(Matrix<double> matrix, Matrix<double> input); |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// Solves the matrix equation AX = B, where A is the coefficient matrix, B is the
|
|
||||
/// solution matrix and X is the unknown matrix.
|
|
||||
/// </summary>
|
|
||||
/// <param name="matrix">The coefficient matrix, <c>A</c>.</param>
|
|
||||
/// <param name="input">The solution matrix, <c>B</c>.</param>
|
|
||||
/// <param name="result">The result matrix, <c>X</c></param>
|
|
||||
void Solve(Matrix<double> matrix, Matrix<double> input, Matrix<double> result); |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue