linbox
1
|
Functions | |
template<class Blackbox , class Vector > | |
ReturnStatus | solve (const Blackbox &A, Vector &x, const Vector &b, Vector &u) |
template<class Blackbox , class Vector > | |
ReturnStatus | solveNonsingular (const Blackbox &A, Vector &x, const Vector &b, bool useRandIter=false) |
template<class Blackbox , class Vector > | |
ReturnStatus | solveSingular (const Blackbox &A, Vector &x, const Vector &b, Vector &u, unsigned long r) |
template<class Blackbox , class Vector , class Prec1 , class Prec2 > | |
ReturnStatus | findRandomSolution (const Blackbox &A, Vector &x, const Vector &b, size_t r, const Prec1 *P, const Prec2 *Q) |
template<class Blackbox , class Vector > | |
ReturnStatus | findNullspaceElement (Vector &x, const Blackbox &A) |
template<class Blackbox , class Vector > | |
bool | certifyInconsistency (Vector &u, const Blackbox &A, const Vector &b) |
ReturnStatus solve | ( | const Blackbox & | A, |
Vector & | x, | ||
const Vector & | b, | ||
Vector & | u | ||
) |
Solve a system Ax=b, giving a random solution if the system is singular and consistent, and a certificate of inconsistency (if specified in traits parameter at construction time) otherwise.
A | Black box of linear system |
x | Vector in which to store solution |
b | Right-hand side of system |
u | Vector in which to store certificate of inconsistency |
ReturnStatus solveNonsingular | ( | const Blackbox & | A, |
Vector & | x, | ||
const Vector & | b, | ||
bool | useRandIter = false |
||
) |
Solve a nonsingular system Ax=b.
This is a "Las Vegas" method, which makes use of randomization. It attempts to certify that the system solution is correct. It will only make one attempt to solve the system before giving up.
A | Black box of linear system |
x | Vector in which to store solution |
b | Right-hand side of system |
useRandIter | true if solveNonsingular should use a random iterator for the Krylov sequence computation; false if it should use the right-hand side |
ReturnStatus solveSingular | ( | const Blackbox & | A, |
Vector & | x, | ||
const Vector & | b, | ||
Vector & | u, | ||
unsigned long | r | ||
) |
Solve a general singular linear system.
A | Black box of linear system |
x | Vector in which to store solution |
b | Right-hand side of system |
u | Vector into which certificate of inconsistency will be stored |
r | Rank of A |
ReturnStatus findRandomSolution | ( | const Blackbox & | A, |
Vector & | x, | ||
const Vector & | b, | ||
size_t | r, | ||
const Prec1 * | P, | ||
const Prec2 * | Q | ||
) |
Get a random solution to a singular system Ax=b of rank r with generic rank profile.
A | Black box of linear system |
x | Vector in which to store solution |
b | Right-hand side of system |
r | Rank of A |
P | Left preconditioner (NULL if none needed) |
Q | Right preconditioner (NULL if none needed) |
ReturnStatus findNullspaceElement | ( | Vector & | x, |
const Blackbox & | A | ||
) |
Get a random element of the right nullspace of A.
x | Vector in which to store nullspace element |
A | Black box of which to find nullspace element |
bool certifyInconsistency | ( | Vector & | u, |
const Blackbox & | A, | ||
const Vector & | b | ||
) |
Get a certificate u that the given system Ax=b is inconsistent, if one can be found.
u | Vector in which to store certificate |
A | Black box for the linear system |
b | Right-hand side for the linear system |
r | Rank of A |
P | Left preconditioner, if applicable |