|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Workspace for sparse iterative solvers. More...
#include <splinalg.hpp>

Public Member Functions | |
| itersolve () | |
| The default constructor is only really useful for assigning to. More... | |
| itersolve (gsl_splinalg_itersolve_type const *T, size_t const n, size_t const m=0) | |
| The default constructor creates a new itersolve with n elements. More... | |
| itersolve (gsl_splinalg_itersolve *v) | |
| Could construct from a gsl_splinalg_itersolve_itersolve. More... | |
| itersolve (itersolve const &v) | |
| The copy constructor. More... | |
| itersolve & | operator= (itersolve const &v) |
| The assignment operator. More... | |
| ~itersolve () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| itersolve (itersolve &&v) | |
| Move constructor. More... | |
| itersolve & | operator= (itersolve &&v) |
| Move operator. More... | |
| bool | operator== (itersolve const &v) const |
| Two itersolve are identically equal if their elements are identical. More... | |
| bool | operator!= (itersolve const &v) const |
| Two itersolve are different if their elements are not identical. More... | |
| bool | operator< (itersolve const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (itersolve const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (itersolve const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (itersolve const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the itersolve is empty. More... | |
| void | swap (itersolve &v) |
| Swap two itersolve objects. More... | |
| gsl_splinalg_itersolve * | get () const |
| Get the gsl_splinalg_itersolve_itersolve. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_splinalg_itersolve_itersolve. More... | |
| size_t | use_count () const |
| Find how many itersolve objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| char const * | itersolve_name () const |
| C++ version of gsl_splinalg_itersolve_name(). More... | |
| int | itersolve_iterate (spmatrix const &A, vector const &b, double const tol, vector &x) |
| C++ version of gsl_splinalg_itersolve_iterate(). More... | |
| double | itersolve_normr () const |
| C++ version of gsl_splinalg_itersolve_normr(). More... | |
Public Attributes | |
| gsl_splinalg_itersolve_type const *& | gmres = gsl_splinalg_itersolve_gmres |
| This is a type that can be passed to itersolve() More... | |
Private Attributes | |
| gsl_splinalg_itersolve * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Workspace for sparse iterative solvers.
Definition at line 36 of file splinalg.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 45 of file splinalg.hpp.
References ccgsl_pointer, and count.
Referenced by operator=().
|
inlineexplicit |
The default constructor creates a new itersolve with n elements.
| T | A constant pointer of type gsl_splinalg_itersolve_type |
| n | We solve n by n sparse systems |
| m | The size of the solution candidate subspace [default = 0] |
Definition at line 57 of file splinalg.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_splinalg_itersolve_itersolve.
This is not usually a good idea. In this case we should not use gsl_splinalg_itersolve_free() to deallocate the memory.
| v | The itersolve |
Definition at line 74 of file splinalg.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The itersolve to copy. |
Definition at line 85 of file splinalg.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 105 of file splinalg.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The itersolve to move. |
Definition at line 117 of file splinalg.hpp.
References count.
|
inline |
Find if the itersolve is empty.
true if has size zero; otherwise false Definition at line 194 of file splinalg.hpp.
References ccgsl_pointer.
|
inline |
Get the gsl_splinalg_itersolve_itersolve.
Definition at line 220 of file splinalg.hpp.
References ccgsl_pointer.
Referenced by itersolve_iterate(), itersolve_name(), and itersolve_normr().
|
inline |
C++ version of gsl_splinalg_itersolve_iterate().
| A | A sparse matrix |
| b | A vector |
| tol | the relative tolerance between the residual norm and norm of b in order to check for convergence |
| x | Initial guess for the solution |
Definition at line 256 of file splinalg.hpp.
References gsl::sf::mathieu::b(), gsl::vector::get(), get(), and gsl::spmatrix::get().
|
inline |
C++ version of gsl_splinalg_itersolve_name().
Definition at line 246 of file splinalg.hpp.
References get().
|
inline |
C++ version of gsl_splinalg_itersolve_normr().
Definition at line 262 of file splinalg.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_splinalg_itersolve_itersolve. Definition at line 240 of file splinalg.hpp.
References ccgsl_pointer.
|
inline |
Two itersolve are different if their elements are not identical.
| v | The itersolve to be compared with this |
false or true according as this and v have identical elements or not Definition at line 147 of file splinalg.hpp.
References operator==().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a itersolve is nonnegative.
| v | The itersolve to be compared with this |
false or true according as this is less than v lexicographically Definition at line 159 of file splinalg.hpp.
References ccgsl_pointer.
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a itersolve is nonnegative.
| v | The itersolve to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 179 of file splinalg.hpp.
References ccgsl_pointer.
Move operator.
| v | The itersolve to move. |
Definition at line 126 of file splinalg.hpp.
References itersolve().
The assignment operator.
This copies elementwise.
| v | The itersolve to copy |
Definition at line 92 of file splinalg.hpp.
References ccgsl_pointer, and count.
|
inline |
Two itersolve are identically equal if their elements are identical.
| v | The itersolve to be compared with this |
true or false according as this and v have identical elements or not Definition at line 139 of file splinalg.hpp.
References ccgsl_pointer.
Referenced by operator!=().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a itersolve is nonnegative.
| v | The itersolve to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 169 of file splinalg.hpp.
References ccgsl_pointer.
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a itersolve is nonnegative.
| v | The itersolve to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 189 of file splinalg.hpp.
References ccgsl_pointer.
|
inline |
Swap two itersolve objects.
This works even if the itersolve have different sizes because it swaps pointers.
| v | The itersolve to swap with this. |
Definition at line 201 of file splinalg.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_splinalg_itersolve_itersolve.
true or falses according as this is the only itersolve object sharing the gsl_splinalg_itersolve_itersolve. Definition at line 226 of file splinalg.hpp.
References count.
|
inline |
Find how many itersolve objects share this pointer.
Definition at line 231 of file splinalg.hpp.
References count.
|
private |
The shared pointer.
Definition at line 209 of file splinalg.hpp.
Referenced by empty(), get(), itersolve(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), swap(), and ~itersolve().
|
private |
The shared reference count.
Definition at line 213 of file splinalg.hpp.
Referenced by itersolve(), operator=(), swap(), unique(), use_count(), and ~itersolve().
| gsl_splinalg_itersolve_type const*& gsl::splinalg::itersolve::gmres = gsl_splinalg_itersolve_gmres |
This is a type that can be passed to itersolve()
Definition at line 41 of file splinalg.hpp.