public final class LinearSolver extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LinearSolver.SystemInfo
Info about linear system
|
Modifier and Type | Method and Description |
---|---|
static int |
rowEchelonForm(IntegersZp64 ring,
long[][] matrix)
Gives the row‐reduced form of the matrix
|
static int |
rowEchelonForm(IntegersZp64 ring,
long[][] lhs,
long[] rhs)
Gives the row‐reduced form of the linear system
lhs.x = rhs . |
static <E> int |
rowEchelonForm(Ring<E> ring,
E[][] matrix)
Gives the row‐reduced form of the matrix
|
static <E> int |
rowEchelonForm(Ring<E> ring,
E[][] lhs,
E[] rhs)
Gives the row‐reduced form of the linear system
lhs.x = rhs . |
static LinearSolver.SystemInfo |
solve(IntegersZp64 ring,
ArrayList<long[]> lhs,
gnu.trove.list.array.TLongArrayList rhs,
long[] result)
Solves linear system
lhs.x = rhs and stores the result in result (which should be of the enough
length). |
static long[] |
solve(IntegersZp64 ring,
long[][] lhs,
long[] rhs)
Solves linear system
lhs.x = rhs and reduces the lhs to row echelon form. |
static LinearSolver.SystemInfo |
solve(IntegersZp64 ring,
long[][] lhs,
long[] rhs,
long[] result)
Solves linear system
lhs.x = rhs and reduces the lhs to row echelon form. |
static <E> LinearSolver.SystemInfo |
solve(Ring<E> ring,
ArrayList<E[]> lhs,
ArrayList<E> rhs,
E[] result)
Solves linear system
lhs.x = rhs and stores the result in result (which should be of the enough
length). |
static <E> E[] |
solve(Ring<E> ring,
E[][] lhs,
E[] rhs)
Solves linear system
lhs.x = rhs and reduces lhs to row echelon form. |
static <E> LinearSolver.SystemInfo |
solve(Ring<E> ring,
E[][] lhs,
E[] rhs,
E[] result)
Solves linear system
lhs.x = rhs and reduces the lhs to row echelon form. |
static long[] |
solveVandermonde(IntegersZp64 ring,
long[] row,
long[] rhs)
Solves Vandermonde linear system (that is with i-th equation of the form {@code row[i]^0 * x0 + row[i]^1 * x1 +
...
|
static LinearSolver.SystemInfo |
solveVandermonde(IntegersZp64 ring,
long[] row,
long[] rhs,
long[] result)
Solves Vandermonde linear system (that is with i-th equation of the form {@code row[i]^0 * x0 + row[i]^1 * x1 +
...
|
static <E> E[] |
solveVandermonde(Ring<E> ring,
E[] row,
E[] rhs)
Solves Vandermonde linear system (that is with i-th equation of the form {@code row[i]^0 * x0 + row[i]^1 * x1 +
...
|
static <E> LinearSolver.SystemInfo |
solveVandermonde(Ring<E> ring,
E[] row,
E[] rhs,
E[] result)
Solves Vandermonde linear system (that is with i-th equation of the form {@code row[i]^0 * x0 + row[i]^1 * x1 +
...
|
static long[] |
solveVandermondeT(IntegersZp64 ring,
long[] row,
long[] rhs)
Solves transposed Vandermonde linear system (that is with i-th equation of the form {@code row[0]^i * x0 +
row[1]^i * x1 + ...
|
static LinearSolver.SystemInfo |
solveVandermondeT(IntegersZp64 ring,
long[] row,
long[] rhs,
long[] result)
Solves transposed Vandermonde linear system (that is with i-th equation of the form {@code row[0]^i * x0 +
row[1]^i * x1 + ...
|
static <E> E[] |
solveVandermondeT(Ring<E> ring,
E[] row,
E[] rhs)
Solves transposed Vandermonde linear system (that is with i-th equation of the form {@code row[0]^i * x0 +
row[1]^i * x1 + ...
|
static <E> LinearSolver.SystemInfo |
solveVandermondeT(Ring<E> ring,
E[] row,
E[] rhs,
E[] result)
Solves transposed Vandermonde linear system (that is with i-th equation of the form {@code row[0]^i * x0 +
row[1]^i * x1 + ...
|
static void |
transposeSquare(long[][] matrix)
Transpose square matrix
|
static void |
transposeSquare(Object[][] matrix)
Transpose square matrix
|
public static void transposeSquare(Object[][] matrix)
public static void transposeSquare(long[][] matrix)
public static <E> int rowEchelonForm(Ring<E> ring, E[][] matrix)
ring
- the ringmatrix
- the matrixpublic static <E> int rowEchelonForm(Ring<E> ring, E[][] lhs, E[] rhs)
lhs.x = rhs
.ring
- the ringlhs
- the lhs of the systemrhs
- the rhs of the systempublic static <E> E[] solve(Ring<E> ring, E[][] lhs, E[] rhs)
lhs.x = rhs
and reduces lhs to row echelon form.ring
- the ringlhs
- the lhs of the system (will be reduced to row echelon form)rhs
- the rhs of the systemArithmeticException
- if the system is inconsistent or under-determinedpublic static <E> LinearSolver.SystemInfo solve(Ring<E> ring, E[][] lhs, E[] rhs, E[] result)
lhs.x = rhs
and reduces the lhs to row echelon form. The result is stored in result
(which should be of the enough length).ring
- the ringlhs
- the lhs of the system (will be reduced to row echelon form)rhs
- the rhs of the systemresult
- where to place the resultpublic static <E> LinearSolver.SystemInfo solve(Ring<E> ring, ArrayList<E[]> lhs, ArrayList<E> rhs, E[] result)
lhs.x = rhs
and stores the result in result
(which should be of the enough
length).ring
- the ringlhs
- the lhs of the systemrhs
- the rhs of the systemresult
- where to place the resultpublic static <E> E[] solveVandermonde(Ring<E> ring, E[] row, E[] rhs)
row[i]^0 * x0 + row[i]^1 * x1 +
... row[i]^N * xN = rhs[i]
).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemArithmeticException
- if the system is inconsistent or under-determinedpublic static <E> E[] solveVandermondeT(Ring<E> ring, E[] row, E[] rhs)
row[0]^i * x0 +
row[1]^i * x1 + ... row[N]^i * xN = rhs[i]
).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemArithmeticException
- if the system is inconsistent or under-determinedpublic static <E> LinearSolver.SystemInfo solveVandermonde(Ring<E> ring, E[] row, E[] rhs, E[] result)
row[i]^0 * x0 + row[i]^1 * x1 +
... row[i]^N * xN = rhs[i]
) and stores the result in result
(which should be of the enough length).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemresult
- where to place the resultpublic static <E> LinearSolver.SystemInfo solveVandermondeT(Ring<E> ring, E[] row, E[] rhs, E[] result)
row[0]^i * x0 +
row[1]^i * x1 + ... row[N]^i * xN = rhs[i]
) and stores the result in result
(which should be of the
enough length).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemresult
- where to place the resultpublic static int rowEchelonForm(IntegersZp64 ring, long[][] matrix)
ring
- the ringmatrix
- the matrixpublic static int rowEchelonForm(IntegersZp64 ring, long[][] lhs, long[] rhs)
lhs.x = rhs
.ring
- the ringlhs
- the lhs of the systemrhs
- the rhs of the systempublic static long[] solve(IntegersZp64 ring, long[][] lhs, long[] rhs)
lhs.x = rhs
and reduces the lhs to row echelon form.ring
- the ringlhs
- the lhs of the system (will be reduced to row echelon form)rhs
- the rhs of the systemArithmeticException
- if the system is inconsistent or under-determinedpublic static LinearSolver.SystemInfo solve(IntegersZp64 ring, long[][] lhs, long[] rhs, long[] result)
lhs.x = rhs
and reduces the lhs to row echelon form. The result is stored in result
(which should be of the enough length).ring
- the ringlhs
- the lhs of the system (will be reduced to row echelon form)rhs
- the rhs of the systemresult
- where to place the resultpublic static LinearSolver.SystemInfo solve(IntegersZp64 ring, ArrayList<long[]> lhs, gnu.trove.list.array.TLongArrayList rhs, long[] result)
lhs.x = rhs
and stores the result in result
(which should be of the enough
length).ring
- the ringlhs
- the lhs of the systemrhs
- the rhs of the systemresult
- where to place the resultpublic static long[] solveVandermonde(IntegersZp64 ring, long[] row, long[] rhs)
row[i]^0 * x0 + row[i]^1 * x1 +
... row[i]^N * xN = rhs[i]
).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemArithmeticException
- if the system is inconsistent or under-determinedpublic static long[] solveVandermondeT(IntegersZp64 ring, long[] row, long[] rhs)
row[0]^i * x0 +
row[1]^i * x1 + ... row[N]^i * xN = rhs[i]
).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemArithmeticException
- if the system is inconsistent or under-determinedpublic static LinearSolver.SystemInfo solveVandermonde(IntegersZp64 ring, long[] row, long[] rhs, long[] result)
row[i]^0 * x0 + row[i]^1 * x1 +
... row[i]^N * xN = rhs[i]
) and stores the result in result
(which should be of the enough length).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemresult
- where to place the resultpublic static LinearSolver.SystemInfo solveVandermondeT(IntegersZp64 ring, long[] row, long[] rhs, long[] result)
row[0]^i * x0 +
row[1]^i * x1 + ... row[N]^i * xN = rhs[i]
) and stores the result in result
(which should be of the
enough length).ring
- the ringrow
- the Vandermonde coefficientsrhs
- the rhs of the systemresult
- where to place the resultCopyright © 2017. All rights reserved.