|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
This class handles matrix objects as shared handles. More...
#include <matrix.hpp>

Classes | |
| class | const_iterator_t |
| A class template for the const iterators. More... | |
| class | iterator_base |
| We create a suitable class for iterator types here. More... | |
| class | iterator_t |
| A class template for the two non-const iterators. More... | |
| struct | vector_ptr |
| This is a pointer-like type for iterator return values. More... | |
Public Types | |
| typedef const_iterator_t< false > | const_iterator |
| The const_iterator type. More... | |
| typedef iterator_t< false > | iterator |
| The iterator type. More... | |
| typedef const_iterator_t< true > | const_reverse_iterator |
| The const_reverse_t type. More... | |
| typedef iterator_t< true > | reverse_iterator |
| The reverse_iterator type. More... | |
| typedef size_t | size_type |
| A container must have a size_type. More... | |
Public Member Functions | |
| matrix () | |
| The default constructor is only really useful for assigning to. More... | |
| matrix (size_t const n1, size_t const n2) | |
| This constructor creates a new matrix with n1 rows and n2 columns. More... | |
| matrix (gsl_matrix *v) | |
| Could construct from a gsl_matrix. More... | |
| matrix (std::initializer_list< std::initializer_list< double > > initializer_list) | |
| Could construct from a std::initializer_list in C++11. More... | |
| matrix (matrix const &v) | |
| The copy constructor. More... | |
| matrix & | operator= (matrix const &v) |
| The assignment operator. More... | |
| matrix | clone () const |
| The clone function. More... | |
| ~matrix () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| void | wrap_gsl_matrix_without_ownership (gsl_matrix *v) |
| This function is intended mainly for internal use. More... | |
| void | reset () |
| Stop sharing ownership of the shared pointer. More... | |
| matrix (matrix &&v) | |
| Move constructor. More... | |
| matrix & | operator= (matrix &&v) |
| Move operator. More... | |
| iterator | begin () |
| Get iterator pointing to first vector element. More... | |
| const_iterator | begin () const |
| Get iterator pointing to first vector element. More... | |
| iterator | end () |
| Get iterator pointing beyond last vector element. More... | |
| const_iterator | end () const |
| Get iterator pointing beyond last vector element. More... | |
| reverse_iterator | rbegin () |
| Get iterator pointing to first vector element. More... | |
| const_reverse_iterator | rbegin () const |
| Get iterator pointing to first vector element. More... | |
| reverse_iterator | rend () |
| Get iterator pointing beyond last vector element. More... | |
| const_reverse_iterator | rend () const |
| Get iterator pointing beyond last vector element. More... | |
| size_t | size1 () const |
| The number of rows of the matrix. More... | |
| size_t | size2 () const |
| The number of columns of the matrix. More... | |
| double * | data () |
| Give access to the data block. More... | |
| double const * | data () const |
| Give access to the data block. More... | |
| void | swap (matrix &m) |
| Swap two matrix objects. More... | |
| void | tricpy (CBLAS_UPLO_t Uplo, CBLAS_DIAG_t Diag, matrix const &src) |
Copy the upper or lower triangular part of matrix src to this. More... | |
| void | transpose_tricpy (CBLAS_UPLO_t Uplo, CBLAS_DIAG_t Diag, matrix const &src) |
Copy the upper or lower triangular part of matrix src to this. More... | |
| matrix | submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_submatrix(). More... | |
| vector | row (size_t const i) |
| C++ version of gsl_matrix_row(). More... | |
| vector | column (size_t const j) |
| C++ version of gsl_matrix_column(). More... | |
| vector | diagonal () |
| C++ version of gsl_matrix_diagonal(). More... | |
| vector | subdiagonal (size_t const k) |
| C++ version of gsl_matrix_subdiagonal(). More... | |
| vector | superdiagonal (size_t const k) |
| C++ version of gsl_matrix_superdiagonal(). More... | |
| vector | subrow (size_t const i, size_t const offset, size_t const n) |
| C++ version of gsl_matrix_subrow(). More... | |
| vector | subcolumn (size_t const j, size_t const offset, size_t const n) |
| C++ version of gsl_matrix_subcolumn(). More... | |
| matrix const | const_submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2) const |
| C++ version of gsl_matrix_const_submatrix(). More... | |
| vector const | const_row (size_t const i) const |
| C++ version of gsl_matrix_const_row(). More... | |
| vector const | const_column (size_t const j) const |
| C++ version of gsl_matrix_const_column(). More... | |
| vector const | const_diagonal () const |
| C++ version of gsl_matrix_const_diagonal(). More... | |
| vector const | const_subdiagonal (size_t const k) const |
| C++ version of gsl_matrix_const_subdiagonal(). More... | |
| vector const | const_superdiagonal (size_t const k) const |
| C++ version of gsl_matrix_const_superdiagonal(). More... | |
| vector const | const_subrow (size_t const i, size_t const offset, size_t const n) const |
| C++ version of gsl_matrix_const_subrow(). More... | |
| vector const | const_subcolumn (size_t const j, size_t const offset, size_t const n) const |
| C++ version of gsl_matrix_const_subcolumn(). More... | |
| matrix const | submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2) const |
| Another C++ version of gsl_matrix_const_submatrix(). More... | |
| vector const | row (size_t const i) const |
| Another C++ version of gsl_matrix_const_row(). More... | |
| vector const | column (size_t const j) const |
| Another C++ version of gsl_matrix_const_column(). More... | |
| vector const | diagonal () const |
| Another C++ version of gsl_matrix_const_diagonal(). More... | |
| vector const | subdiagonal (size_t const k) const |
| Another C++ version of gsl_matrix_const_subdiagonal(). More... | |
| vector const | superdiagonal (size_t const k) const |
| Another C++ version of gsl_matrix_const_superdiagonal(). More... | |
| vector const | subrow (size_t const i, size_t const offset, size_t const n) const |
| Another C++ version of gsl_matrix_const_subrow(). More... | |
| vector const | subcolumn (size_t const j, size_t const offset, size_t const n) const |
| Another C++ version of gsl_matrix_const_subcolumn(). More... | |
| gsl_matrix * | get () |
| Get the gsl_matrix. More... | |
| gsl_matrix const * | get () const |
| Get the gsl_matrix. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_matrix. More... | |
| size_t | use_count () const |
| Find how many matrix objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| void | set_zero () |
| C++ version of gsl_matrix_set_zero(). More... | |
| void | set_all (double x) |
| C++ version of gsl_matrix_set_all(). More... | |
| int | memcpy (matrix const &src) |
| C++ version of gsl_matrix_memcpy(). More... | |
| double | max () const |
| C++ version of gsl_matrix_max(). More... | |
| double | min () const |
| C++ version of gsl_matrix_min(). More... | |
| void | minmax (double *min_out, double *max_out) const |
| C++ version of gsl_matrix_minmax(). More... | |
| void | minmax (double &min_out, double &max_out) const |
| C++ version of gsl_matrix_minmax(). More... | |
| int | add (matrix const &b) |
| C++ version of gsl_matrix_add(). More... | |
| int | sub (matrix const &b) |
| C++ version of gsl_matrix_sub(). More... | |
| int | scale (double const x) |
| C++ version of gsl_matrix_scale(). More... | |
| int | add_constant (double const x) |
| C++ version of gsl_matrix_add_constant(). More... | |
| int | isnull () const |
| C++ version of gsl_matrix_isnull(). More... | |
| int | ispos () const |
| C++ version of gsl_matrix_ispos(). More... | |
| int | isneg () const |
| C++ version of gsl_matrix_isneg(). More... | |
| int | isnonneg () const |
| C++ version of gsl_matrix_isnonneg(). More... | |
| double | get (size_t const i, size_t const j) const |
| C++ version of gsl_matrix_get(). More... | |
| void | set (size_t const i, size_t const j, double x) |
| C++ version of gsl_matrix_set(). More... | |
| double * | ptr (size_t const i, size_t const j) |
| C++ version of gsl_matrix_ptr(). More... | |
| double const * | const_ptr (size_t const i, size_t const j) const |
| C++ version of gsl_matrix_const_ptr(). More... | |
| int | fread (FILE *stream) |
| C++ version of gsl_matrix_fread(). More... | |
| int | fwrite (FILE *stream) const |
| C++ version of gsl_matrix_fwrite(). More... | |
| int | fscanf (FILE *stream) |
| C++ version of gsl_matrix_fscanf(). More... | |
| int | fprintf (FILE *stream, char const *format) const |
| C++ version of gsl_matrix_fprintf(). More... | |
| matrix (block &b, size_t const offset, size_t const n1, size_t const n2, size_t const d2) | |
| C++ version of gsl_matrix_alloc_from_block(). More... | |
| matrix (matrix &m, size_t const k1, size_t const k2, size_t const n1, size_t const n2) | |
| C++ version of gsl_matrix_alloc_from_matrix(). More... | |
| void | set_identity () |
| C++ version of gsl_matrix_set_identity(). More... | |
| int | swap_rows (size_t const i, size_t const j) |
| C++ version of gsl_matrix_swap_rows(). More... | |
| int | swap_columns (size_t const i, size_t const j) |
| C++ version of gsl_matrix_swap_columns(). More... | |
| int | swap_rowcol (size_t const i, size_t const j) |
| C++ version of gsl_matrix_swap_rowcol(). More... | |
| int | transpose () |
| C++ version of gsl_matrix_transpose(). More... | |
| int | transpose_memcpy (matrix const &src) |
| C++ version of gsl_matrix_transpose_memcpy(). More... | |
| void | max_index (size_t &imax, size_t &jmax) const |
| C++ version of gsl_matrix_max_index(). More... | |
| void | min_index (size_t &imin, size_t &jmin) const |
| C++ version of gsl_matrix_min_index(). More... | |
| void | minmax_index (size_t &imin, size_t &jmin, size_t &imax, size_t &jmax) const |
| C++ version of gsl_matrix_minmax_index(). More... | |
| int | mul_elements (matrix const &b) |
| C++ version of gsl_matrix_mul_elements(). More... | |
| int | div_elements (matrix const &b) |
| C++ version of gsl_matrix_div_elements(). More... | |
| double | norm1 () const |
| C++ version of gsl_matrix_norm1(). More... | |
| int | scale_rows (vector const &x) |
| C++ version of gsl_matrix_scale_rows(). More... | |
| int | scale_columns (vector const &x) |
| C++ version of gsl_matrix_scale_columns(). More... | |
| int | add_diagonal (double const x) |
| C++ version of gsl_matrix_add_diagonal(). More... | |
| int | get_row (vector &v, size_t const i) const |
| C++ version of gsl_matrix_get_row(). More... | |
| int | get_col (vector &v, size_t const j) const |
| C++ version of gsl_matrix_get_col(). More... | |
| int | set_row (size_t const i, vector const &v) |
| C++ version of gsl_matrix_set_row(). More... | |
| int | set_col (size_t const j, vector const &v) |
| C++ version of gsl_matrix_set_col(). More... | |
| vector | operator[] (size_t const i) |
| This function allows us to use a matrix like an array. More... | |
| vector const | operator[] (size_t const i) const |
| This function allows us to use a matrix like an array. More... | |
| int | permute (permutation &p) |
Permute the columns of this by permutation p. More... | |
Static Public Member Functions | |
| static matrix | view_array (double *base, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_view_array(). More... | |
| static matrix | view_array_with_tda (double *base, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_view_array_with_tda(). More... | |
| static matrix | view_vector (vector &v, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_view_vector(). More... | |
| static matrix | view_vector_with_tda (vector &v, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_view_vector_with_tda(). More... | |
| static matrix const | const_view_array (double const *base, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_const_view_array(). More... | |
| static matrix const | const_view_array_with_tda (double const *base, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_const_view_array_with_tda(). More... | |
| static matrix const | const_view_vector (vector const &v, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_const_view_vector(). More... | |
| static matrix const | const_view_vector_with_tda (vector const &v, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_const_view_vector_with_tda(). More... | |
| static matrix const | view_array (double const *base, size_t const n1, size_t const n2) |
| Another C++ version of gsl_matrix_const_view_array(). More... | |
| static matrix const | view_array_with_tda (double const *base, size_t const n1, size_t const n2, size_t const tda) |
| Another C++ version of gsl_matrix_const_view_array_with_tda(). More... | |
| static matrix const | view_vector (vector const &v, size_t const n1, size_t const n2) |
| Another C++ version of gsl_matrix_const_view_vector(). More... | |
| static matrix const | view_vector_with_tda (vector const &v, size_t const n1, size_t const n2, size_t const tda) |
| Another C++ version of gsl_matrix_const_view_vector_with_tda(). More... | |
| static matrix | calloc (size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_calloc(). More... | |
Private Attributes | |
| bool | owns_data |
| Used to allow a vector that does not own its data. More... | |
| gsl_matrix * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Friends | |
| class | multiroot::function_fdf |
| class | multifit::nlinear::function_fdf |
| class | multilarge::nlinear::function_fdf |
This class handles matrix objects as shared handles.
It models a random access container so that STL functions work with matrix.
Note that matrix_views are implemented as matrix objects here.
Note that in C++11 it is possible to iterate over the rows of a matrix using
Otherwise,
will achieve the same effect. But if the element pointed to by i is used more than once, do not use
because each call of operator->() creates a new and different vector.
Definition at line 72 of file matrix.hpp.
| typedef const_iterator_t<false> gsl::matrix::const_iterator |
The const_iterator type.
Definition at line 626 of file matrix.hpp.
| typedef const_iterator_t<true> gsl::matrix::const_reverse_iterator |
The const_reverse_t type.
Definition at line 634 of file matrix.hpp.
| typedef iterator_t<false> gsl::matrix::iterator |
The iterator type.
Definition at line 630 of file matrix.hpp.
| typedef iterator_t<true> gsl::matrix::reverse_iterator |
The reverse_iterator type.
Definition at line 638 of file matrix.hpp.
| typedef size_t gsl::matrix::size_type |
A container must have a size_type.
Definition at line 642 of file matrix.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 80 of file matrix.hpp.
References ccgsl_pointer, count, and owns_data.
Referenced by calloc(), const_submatrix(), const_view_array(), const_view_array_with_tda(), const_view_vector(), const_view_vector_with_tda(), operator=(), reset(), submatrix(), view_array(), view_array_with_tda(), view_vector(), and view_vector_with_tda().
|
inlineexplicit |
This constructor creates a new matrix with n1 rows and n2 columns.
| n1 | The number of rows in the matrix |
| n2 | The number of columns in the matrix |
Definition at line 92 of file matrix.hpp.
References ccgsl_pointer, and count.
|
inlineexplicit |
Could construct from a gsl_matrix.
This is not usually a good idea. In this case you should not use gsl_matrix_free() to deallocate the memory.
| v | The matrix |
Definition at line 110 of file matrix.hpp.
References ccgsl_pointer, and count.
|
inline |
Could construct from a std::initializer_list in C++11.
| initializer_list | The initializer_list. |
Definition at line 121 of file matrix.hpp.
References ccgsl_pointer, count, gsl::exception::GSL_EBADLEN, row(), and set().
|
inline |
The copy constructor.
This shares the matrix. Use clone() if you want a full copy.
| v | The matrix to copy. |
Definition at line 154 of file matrix.hpp.
References count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 194 of file matrix.hpp.
References ccgsl_pointer, count, and owns_data.
|
inline |
Move constructor.
| v | The matrix to move. |
Definition at line 236 of file matrix.hpp.
References count.
|
inline |
C++ version of gsl_matrix_alloc_from_block().
| b | The block |
| offset | The offset within the block |
| n1 | The number of rows in the matrix |
| n2 | The number of columns in the matrix |
| d2 | undocumented |
Definition at line 1388 of file matrix.hpp.
References gsl::sf::mathieu::b(), ccgsl_pointer, and count.
|
inline |
C++ version of gsl_matrix_alloc_from_matrix().
| m | The matrix |
| k1 | the row of m to take as row zero |
| k2 | the column of m to take as column zero |
| n1 | The number of rows in the matrix |
| n2 | The number of columns in the matrix |
Definition at line 1406 of file matrix.hpp.
References ccgsl_pointer, count, and get().
|
inline |
C++ version of gsl_matrix_add().
| b | matrix to add to this |
Definition at line 1286 of file matrix.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_matrix_add_constant().
| x | constant to add to each element of this |
Definition at line 1304 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_add_diagonal().
| x | A constant |
Definition at line 1544 of file matrix.hpp.
References get().
|
inline |
Get iterator pointing to first vector element.
Definition at line 648 of file matrix.hpp.
|
inline |
Get iterator pointing to first vector element.
Definition at line 655 of file matrix.hpp.
|
inlinestatic |
C++ version of gsl_matrix_calloc().
This constructs a matrix object with entries initialised to zero.
| n1 | The number of rows in the matrix |
| n2 | The number of columns in the matrix |
Definition at line 1241 of file matrix.hpp.
References matrix().
|
inline |
The clone function.
Use this if you want a copy of the block that does not share the underlying data.
Definition at line 183 of file matrix.hpp.
|
inline |
C++ version of gsl_matrix_column().
| j | A column index |
Definition at line 803 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
Another C++ version of gsl_matrix_const_column().
| j | A column index |
Definition at line 1026 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_const_column().
| j | A column index |
Definition at line 940 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_const_diagonal().
Definition at line 949 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_const_ptr().
| i | index of row |
| j | index of column |
Definition at line 1352 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_const_row().
| i | A row index |
Definition at line 930 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_const_subcolumn().
| j | A column index |
| offset | A row offset |
| n | The number of elements |
Definition at line 993 of file matrix.hpp.
References get(), gsl::rstat::n(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_const_subdiagonal().
| k | An index |
k as a vector Definition at line 959 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_const_submatrix().
| i | Index in this of first row of submatrix |
| j | Index in this of first column of submatrix |
| n1 | Number of rows of submatrix |
| n2 | Number of columns of submatrix |
Definition at line 920 of file matrix.hpp.
|
inline |
C++ version of gsl_matrix_const_subrow().
| i | A row index |
| offset | A column offset |
| n | The number of elements |
Definition at line 981 of file matrix.hpp.
References get(), gsl::rstat::n(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_const_superdiagonal().
| k | An index |
k as a vector Definition at line 969 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inlinestatic |
C++ version of gsl_matrix_const_view_array().
| base | An array of type double |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1091 of file matrix.hpp.
References matrix().
|
inlinestatic |
C++ version of gsl_matrix_const_view_array_with_tda().
| base | An array of type double |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1105 of file matrix.hpp.
References matrix().
|
inlinestatic |
C++ version of gsl_matrix_const_view_vector().
| v | A vector |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1117 of file matrix.hpp.
References gsl::vector::get(), and matrix().
|
inlinestatic |
C++ version of gsl_matrix_const_view_vector_with_tda().
| v | A vector |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1131 of file matrix.hpp.
References gsl::vector::get(), and matrix().
|
inline |
Give access to the data block.
The data() and size() functions mimic the functions of std::array<T> and std::vector<T>. This function can throw an exception or produce a GSL error if the matrix size2 and tda are not equal. However, new matrix objects are always initialised to have tda and size2 equal.
Definition at line 726 of file matrix.hpp.
References ccgsl_pointer.
|
inline |
Give access to the data block.
The data() and size() functions mimic the functions of std::array<T> and std::vector<T>. This function can throw an exception or produce a GSL error if the matrix size1 and tda are not equal. However, new matrix objects are always initialised to have tda and size2 equal.
Definition at line 740 of file matrix.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_matrix_diagonal().
Definition at line 813 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
Another C++ version of gsl_matrix_const_diagonal().
Definition at line 1035 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_div_elements().
Divide each element of this by the corrsponding element of b
| b | Another matrix |
Definition at line 1517 of file matrix.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 663 of file matrix.hpp.
References ccgsl_pointer, and size1().
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 671 of file matrix.hpp.
References ccgsl_pointer, and size1().
|
inline |
C++ version of gsl_matrix_fprintf().
| stream | A C file stream |
| format | d, e, f or g |
Definition at line 1378 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_fread().
| stream | A C file stream |
Definition at line 1359 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_fscanf().
| stream | A C file stream |
Definition at line 1371 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_fwrite().
| stream | A C file stream |
Definition at line 1365 of file matrix.hpp.
References get().
|
inline |
Get the gsl_matrix.
Definition at line 1207 of file matrix.hpp.
References ccgsl_pointer.
Referenced by gsl::multilarge::linear::accumulate(), add(), add_constant(), add_diagonal(), gsl::linalg::balance_accum(), gsl::linalg::balance_columns(), gsl::linalg::balance_matrix(), gsl::linalg::bidiag_decomp(), gsl::linalg::bidiag_unpack(), gsl::linalg::bidiag_unpack2(), gsl::linalg::bidiag_unpack_B(), gsl::linalg::cholesky_band_decomp(), gsl::linalg::cholesky_band_invert(), gsl::linalg::cholesky_band_rcond(), gsl::linalg::cholesky_band_solve(), gsl::linalg::cholesky_band_svx(), gsl::linalg::cholesky_band_unpack(), gsl::linalg::cholesky_decomp(), gsl::linalg::cholesky_decomp1(), gsl::linalg::cholesky_decomp2(), gsl::linalg::cholesky_decomp_unit(), gsl::linalg::cholesky_invert(), gsl::linalg::cholesky_rcond(), gsl::linalg::cholesky_scale(), gsl::linalg::cholesky_scale_apply(), gsl::linalg::cholesky_solve(), gsl::linalg::cholesky_solve2(), gsl::linalg::cholesky_solve_mat(), gsl::linalg::cholesky_svx(), gsl::linalg::cholesky_svx2(), gsl::linalg::cholesky_svx_mat(), clone(), gsl::linalg::COD_decomp(), gsl::linalg::COD_decomp_e(), gsl::linalg::COD_lssolve(), gsl::linalg::COD_lssolve2(), gsl::linalg::COD_matZ(), gsl::linalg::COD_unpack(), column(), const_column(), const_diagonal(), const_ptr(), const_row(), const_subcolumn(), const_subdiagonal(), const_submatrix(), const_subrow(), const_superdiagonal(), gsl::multifit::nlinear::covar(), gsl::spmatrix::d2sp(), gsl::bspline::deriv_eval(), gsl::bspline::deriv_eval_nonzero(), gsl::multilarge::nlinear::df(), gsl::multifit::nlinear::df(), gsl::blas::dgemm(), gsl::blas::dgemv(), gsl::blas::dger(), diagonal(), div_elements(), gsl::blas::dsymm(), gsl::blas::dsymv(), gsl::blas::dsyr(), gsl::blas::dsyr2(), gsl::blas::dsyr2k(), gsl::blas::dsyrk(), gsl::blas::dtrmm(), gsl::blas::dtrmv(), gsl::blas::dtrsm(), gsl::blas::dtrsv(), gsl::multilarge::nlinear::eval_df(), gsl::multifit::nlinear::eval_fvv(), gsl::multifit::nlinear::fdfvv(), gsl::multilarge::nlinear::fdfvv(), gsl::multiroot::fdjacobian(), fprintf(), fread(), fscanf(), fwrite(), gsl::eigen::gen(), gsl::eigen::gen_QZ(), gsl::multilarge::linear::genform2(), gsl::eigen::gensymm(), gsl::eigen::gensymmv(), gsl::eigen::gensymmv_sort(), gsl::eigen::genv(), gsl::eigen::genv_QZ(), get_col(), get_row(), gsl::linalg::hessenberg_decomp(), gsl::linalg::hessenberg_set_zero(), gsl::linalg::hessenberg_submatrix(), gsl::linalg::hessenberg_unpack(), gsl::linalg::hessenberg_unpack_accum(), gsl::linalg::hesstri_decomp(), gsl::linalg::HH_solve(), gsl::linalg::HH_svx(), gsl::linalg::householder_hm(), gsl::linalg::householder_hm1(), gsl::linalg::householder_left(), gsl::linalg::householder_mh(), gsl::linalg::householder_right(), isneg(), isnonneg(), isnull(), ispos(), gsl::multilarge::linear::L_decomp(), gsl::linalg::L_solve_T(), gsl::linalg::ldlt_band_decomp(), gsl::linalg::ldlt_band_rcond(), gsl::linalg::ldlt_band_solve(), gsl::linalg::ldlt_band_svx(), gsl::linalg::ldlt_band_unpack(), gsl::linalg::ldlt_decomp(), gsl::linalg::ldlt_rcond(), gsl::linalg::ldlt_solve(), gsl::linalg::ldlt_svx(), gsl::multifit::linear(), gsl::multifit::linear_applyW(), gsl::multifit::linear_bsvd(), gsl::multifit::linear_est(), gsl::multifit::linear_genform2(), gsl::multifit::linear_L_decomp(), gsl::multifit::linear_Lk(), gsl::multifit::linear_Lsobolev(), gsl::multifit::linear_residuals(), gsl::multifit::linear_solve(), gsl::multifit::linear_stdform1(), gsl::multifit::linear_stdform2(), gsl::multifit::linear_svd(), gsl::multifit::linear_wgenform2(), gsl::multifit::linear_wstdform1(), gsl::multifit::linear_wstdform2(), gsl::linalg::LQ_decomp(), gsl::linalg::LQ_LQsolve(), gsl::linalg::LQ_Lsolve_T(), gsl::linalg::LQ_lssolve(), gsl::linalg::LQ_lssolve_T(), gsl::linalg::LQ_Lsvx_T(), gsl::linalg::LQ_QTvec(), gsl::linalg::LQ_solve_T(), gsl::linalg::LQ_svx_T(), gsl::linalg::LQ_unpack(), gsl::linalg::LQ_update(), gsl::linalg::LQ_vecQ(), gsl::linalg::LQ_vecQT(), gsl::linalg::LU_band_decomp(), gsl::linalg::LU_band_solve(), gsl::linalg::LU_band_svx(), gsl::linalg::LU_band_unpack(), gsl::linalg::LU_decomp(), gsl::linalg::LU_det(), gsl::linalg::LU_invert(), gsl::linalg::LU_invx(), gsl::linalg::LU_lndet(), gsl::linalg::LU_refine(), gsl::linalg::LU_sgndet(), gsl::linalg::LU_solve(), gsl::linalg::LU_svx(), matrix(), max(), max_index(), gsl::linalg::mcholesky_decomp(), gsl::linalg::mcholesky_invert(), gsl::linalg::mcholesky_rcond(), gsl::linalg::mcholesky_solve(), gsl::linalg::mcholesky_svx(), memcpy(), min(), min_index(), minmax(), minmax_index(), mul_elements(), gsl::eigen::nonsymm(), gsl::eigen::nonsymm_Z(), gsl::eigen::nonsymmv(), gsl::eigen::nonsymmv_Z(), norm1(), gsl::linalg::pcholesky_decomp(), gsl::linalg::pcholesky_decomp2(), gsl::linalg::pcholesky_invert(), gsl::linalg::pcholesky_rcond(), gsl::linalg::pcholesky_solve(), gsl::linalg::pcholesky_solve2(), gsl::linalg::pcholesky_svx(), gsl::linalg::pcholesky_svx2(), permute(), gsl::linalg::PTLQ_decomp(), gsl::linalg::PTLQ_decomp2(), gsl::linalg::PTLQ_LQsolve_T(), gsl::linalg::PTLQ_Lsolve_T(), gsl::linalg::PTLQ_Lsvx_T(), gsl::linalg::PTLQ_solve_T(), gsl::linalg::PTLQ_svx_T(), gsl::linalg::PTLQ_update(), ptr(), gsl::linalg::QL_decomp(), gsl::linalg::QL_unpack(), gsl::linalg::QR_band_decomp_L2(), gsl::linalg::QR_band_unpack_L2(), gsl::linalg::QR_decomp(), gsl::linalg::QR_decomp_old(), gsl::linalg::QR_lssolve(), gsl::linalg::QR_matQ(), gsl::linalg::QR_QRsolve(), gsl::linalg::QR_QTmat(), gsl::linalg::QR_QTmat_r(), gsl::linalg::QR_QTvec(), gsl::linalg::QR_Qvec(), gsl::linalg::QR_rcond(), gsl::linalg::QR_Rsolve(), gsl::linalg::QR_Rsvx(), gsl::linalg::QR_solve(), gsl::linalg::QR_svx(), gsl::linalg::QR_UD_decomp(), gsl::linalg::QR_UD_lssolve(), gsl::linalg::QR_unpack(), gsl::linalg::QR_unpack_r(), gsl::linalg::QR_update(), gsl::linalg::QR_UR_decomp(), gsl::linalg::QR_UU_decomp(), gsl::linalg::QR_UU_lssolve(), gsl::linalg::QR_UU_QTvec(), gsl::linalg::QR_UZ_decomp(), gsl::linalg::QRPT_decomp(), gsl::linalg::QRPT_decomp2(), gsl::linalg::QRPT_lssolve(), gsl::linalg::QRPT_lssolve2(), gsl::linalg::QRPT_QRsolve(), gsl::linalg::QRPT_rank(), gsl::linalg::QRPT_rcond(), gsl::linalg::QRPT_Rsolve(), gsl::linalg::QRPT_Rsvx(), gsl::linalg::QRPT_solve(), gsl::linalg::QRPT_svx(), gsl::linalg::QRPT_update(), gsl::linalg::R_solve(), gsl::linalg::R_svx(), gsl::multifit::robust(), gsl::multifit::robust_est(), gsl::multifit::robust_residuals(), row(), scale(), scale_columns(), scale_rows(), set(), set_all(), set_col(), set_identity(), set_row(), set_zero(), gsl::spmatrix::sp2d(), gsl::multilarge::linear::stdform1(), gsl::multilarge::linear::stdform2(), sub(), subcolumn(), subdiagonal(), submatrix(), subrow(), superdiagonal(), gsl::linalg::SV_decomp(), gsl::linalg::SV_decomp_jacobi(), gsl::linalg::SV_decomp_mod(), gsl::linalg::SV_leverage(), gsl::linalg::SV_solve(), swap_columns(), swap_rowcol(), swap_rows(), gsl::eigen::symm(), gsl::linalg::symmtd_decomp(), gsl::linalg::symmtd_unpack(), gsl::linalg::symmtd_unpack_T(), gsl::eigen::symmv(), gsl::eigen::symmv_sort(), transpose(), transpose_memcpy(), transpose_tricpy(), gsl::linalg::tri_invert(), gsl::linalg::tri_lower_invert(), gsl::linalg::tri_lower_rcond(), gsl::linalg::tri_lower_unit_invert(), gsl::linalg::tri_LTL(), gsl::linalg::tri_rcond(), gsl::linalg::tri_UL(), gsl::linalg::tri_upper_invert(), gsl::linalg::tri_upper_rcond(), gsl::linalg::tri_upper_unit_invert(), tricpy(), gsl::multifit::wlinear(), gsl::multifit::wlinear_svd(), gsl::multifit::wlinear_tsvd(), gsl::multifit::wlinear_usvd(), gsl::multilarge::linear::wstdform1(), and gsl::multilarge::linear::wstdform2().
|
inline |
Get the gsl_matrix.
Definition at line 1212 of file matrix.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_matrix_get().
| i | index of row |
| j | index of column |
Definition at line 1331 of file matrix.hpp.
References get().
Referenced by get().
|
inline |
C++ version of gsl_matrix_get_col().
| v | A vector |
| j | The index of the column |
Definition at line 1560 of file matrix.hpp.
References get(), and gsl::vector::get().
|
inline |
C++ version of gsl_matrix_get_row().
| v | A vector |
| i | The index of the row |
Definition at line 1552 of file matrix.hpp.
References get(), and gsl::vector::get().
|
inline |
C++ version of gsl_matrix_isneg().
+1 or 0 according as elements are all negative or not Definition at line 1319 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_isnonneg().
+1 or 0 according as elements are all nonnegative or not Definition at line 1324 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_isnull().
+1 or 0 according as elements are all zero or not Definition at line 1309 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_ispos().
+1 or 0 according as elements are all positive or not Definition at line 1314 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_max().
Definition at line 1261 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_max_index().
| imax | row index of the first maximum element in the matrix |
| jmax | column index of the first maximum element in the matrix |
Definition at line 1485 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_memcpy().
| src | source matrix |
Definition at line 1256 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_min().
Definition at line 1266 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_min_index().
| imin | row index of the first minimum element in the matrix |
| jmin | column index of the first minimum element in the matrix |
Definition at line 1492 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_minmax().
| min_out | minimum element of matrix |
| max_out | maximum element of matrix |
Definition at line 1279 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_minmax().
| min_out | minimum element of matrix |
| max_out | maximum element of matrix |
Definition at line 1272 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_minmax_index().
| imin | row index of the first minimum element in the matrix |
| jmin | column index of the first minimum element in the matrix |
| imax | row index of the first maximum element in the matrix |
| jmax | column index of the first maximum element in the matrix |
Definition at line 1501 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_mul_elements().
Multiply matrices elementwise.
| b | Another matrix |
Definition at line 1509 of file matrix.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_matrix_norm1().
Definition at line 1523 of file matrix.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_matrix Definition at line 1232 of file matrix.hpp.
References ccgsl_pointer.
Move operator.
| v | The matrix to move. |
Definition at line 246 of file matrix.hpp.
References matrix().
The assignment operator.
This makes a shared copy.
| v | The matrix to copy |
Definition at line 163 of file matrix.hpp.
References ccgsl_pointer, count, and owns_data.
|
inline |
This function allows us to use a matrix like an array.
Use with caution. Although matrix[i][j] is possible, it is less efficient than matrix::set(). The effect is the same as row().
| i | The index of the row |
Definition at line 1586 of file matrix.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, size1(), and gsl::vector::wrap_gsl_vector_without_ownership().
|
inline |
This function allows us to use a matrix like an array.
Use with caution. Although matrix[i][j] is possible, it is much less efficient than matrix::set(). The effect is the same as row()
| i | The index of the row |
Definition at line 1620 of file matrix.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, and gsl::vector::wrap_gsl_vector_without_ownership().
|
inline |
Permute the columns of this by permutation p.
| p | The permutation |
Definition at line 1637 of file matrix.hpp.
References get(), and gsl::permutation::get().
|
inline |
C++ version of gsl_matrix_ptr().
| i | index of row |
| j | index of column |
Definition at line 1345 of file matrix.hpp.
References get().
Referenced by gsl::matrix::iterator_base< container, content, reverse_t >::operator->().
|
inline |
Get iterator pointing to first vector element.
Definition at line 680 of file matrix.hpp.
References ccgsl_pointer, and size1().
|
inline |
Get iterator pointing to first vector element.
Definition at line 688 of file matrix.hpp.
References ccgsl_pointer, and size1().
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 697 of file matrix.hpp.
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 704 of file matrix.hpp.
|
inline |
Stop sharing ownership of the shared pointer.
Definition at line 230 of file matrix.hpp.
References matrix().
|
inline |
C++ version of gsl_matrix_row().
| i | A row index |
Definition at line 793 of file matrix.hpp.
References get(), and gsl::vector::vector().
Referenced by matrix().
|
inline |
Another C++ version of gsl_matrix_const_row().
| i | A row index |
Definition at line 1016 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_scale().
| x | constant to multiply this by |
Definition at line 1298 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_scale_columns().
| x | A scalar |
Definition at line 1537 of file matrix.hpp.
References get(), and gsl::vector::get().
|
inline |
C++ version of gsl_matrix_scale_rows().
| x | A scalar |
Definition at line 1530 of file matrix.hpp.
References get(), and gsl::vector::get().
|
inline |
C++ version of gsl_matrix_set().
| i | index of row |
| j | index of column |
| x | new value for element |
Definition at line 1338 of file matrix.hpp.
References get().
Referenced by matrix().
|
inline |
C++ version of gsl_matrix_set_all().
| x | The value to which all elements are set |
Definition at line 1250 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_set_col().
| j | The index of the column |
| v | A vector |
Definition at line 1576 of file matrix.hpp.
References get(), and gsl::vector::get().
|
inline |
C++ version of gsl_matrix_set_identity().
Definition at line 1420 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_set_row().
| i | The index of the row |
| v | A vector |
Definition at line 1568 of file matrix.hpp.
References get(), and gsl::vector::get().
|
inline |
|
inline |
The number of rows of the matrix.
Definition at line 713 of file matrix.hpp.
References ccgsl_pointer.
Referenced by clone(), gsl::matrix::iterator_base< container, content, reverse_t >::decrement(), end(), gsl::matrix::iterator_base< container, content, reverse_t >::increment(), operator[](), and rbegin().
|
inline |
The number of columns of the matrix.
Definition at line 718 of file matrix.hpp.
References ccgsl_pointer.
Referenced by clone().
|
inline |
C++ version of gsl_matrix_sub().
| b | matrix to subtract from this |
Definition at line 1292 of file matrix.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_matrix_subcolumn().
| j | A column index |
| offset | A row offset |
| n | The number of elements |
Definition at line 856 of file matrix.hpp.
References get(), gsl::rstat::n(), and gsl::vector::vector().
|
inline |
Another C++ version of gsl_matrix_const_subcolumn().
| j | A column index |
| offset | A row offset |
| n | The number of elements |
Definition at line 1079 of file matrix.hpp.
References get(), gsl::rstat::n(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_subdiagonal().
| k | An index |
k as a vector Definition at line 822 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
Another C++ version of gsl_matrix_const_subdiagonal().
| k | An index |
k as a vector Definition at line 1045 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_submatrix().
| i | Index in this of first row of submatrix |
| j | Index in this of first column of submatrix |
| n1 | Number of rows of submatrix |
| n2 | Number of columns of submatrix |
Definition at line 783 of file matrix.hpp.
|
inline |
Another C++ version of gsl_matrix_const_submatrix().
| i | Index in this of first row of submatrix |
| j | Index in this of first column of submatrix |
| n1 | Number of rows of submatrix |
| n2 | Number of columns of submatrix |
Definition at line 1006 of file matrix.hpp.
|
inline |
C++ version of gsl_matrix_subrow().
| i | A row index |
| offset | A column offset |
| n | The number of elements |
Definition at line 844 of file matrix.hpp.
References get(), gsl::rstat::n(), and gsl::vector::vector().
|
inline |
Another C++ version of gsl_matrix_const_subrow().
| i | A row index |
| offset | A column offset |
| n | The number of elements |
Definition at line 1067 of file matrix.hpp.
References get(), gsl::rstat::n(), and gsl::vector::vector().
|
inline |
C++ version of gsl_matrix_superdiagonal().
| k | An index |
k as a vector Definition at line 832 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
Another C++ version of gsl_matrix_const_superdiagonal().
| k | An index |
k as a vector Definition at line 1055 of file matrix.hpp.
References get(), and gsl::vector::vector().
|
inline |
Swap two matrix objects.
This works even if the matrix objects have different sizes because it swaps pointers.
| m | The matrix to swap with this. |
Definition at line 752 of file matrix.hpp.
References ccgsl_pointer, and count.
|
inline |
C++ version of gsl_matrix_swap_columns().
| i | Index of first column |
| j | Index of second column |
Definition at line 1434 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_swap_rowcol().
Swap row and column in place. Matrix must be square.
| i | index of row |
| j | index of column |
Definition at line 1442 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_swap_rows().
| i | Index of first row |
| j | Index of second row |
Definition at line 1427 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_transpose().
Definition at line 1447 of file matrix.hpp.
References get().
|
inline |
C++ version of gsl_matrix_transpose_memcpy().
| src | matrix whose transpose it to be copied to this |
Definition at line 1453 of file matrix.hpp.
References get().
|
inline |
Copy the upper or lower triangular part of matrix src to this.
| Uplo | Upper or lower triangle: CblasUpper or CBlasLower |
| Diag | Diagonal type |
| src | The matrix to copy from |
Definition at line 771 of file matrix.hpp.
References get().
|
inline |
Copy the upper or lower triangular part of matrix src to this.
| Uplo | Upper or lower triangle: CblasUpper or CBlasLower |
| Diag | Diagonal type |
| src | The matrix to copy from |
Definition at line 762 of file matrix.hpp.
References get().
|
inline |
Find if this is the only object sharing the gsl_matrix.
true or falses according as this is the only matrix object sharing the gsl_matrix Definition at line 1218 of file matrix.hpp.
References count.
|
inline |
Find how many matrix objects share this pointer.
Definition at line 1223 of file matrix.hpp.
References count.
|
inlinestatic |
C++ version of gsl_matrix_view_array().
| base | An array of type double |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 868 of file matrix.hpp.
References matrix().
|
inlinestatic |
Another C++ version of gsl_matrix_const_view_array().
| base | An array of type double |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1143 of file matrix.hpp.
References matrix().
|
inlinestatic |
C++ version of gsl_matrix_view_array_with_tda().
| base | An array of type double |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 881 of file matrix.hpp.
References matrix().
|
inlinestatic |
Another C++ version of gsl_matrix_const_view_array_with_tda().
| base | An array of type double |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1157 of file matrix.hpp.
References matrix().
|
inlinestatic |
C++ version of gsl_matrix_view_vector().
| v | A vector |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 893 of file matrix.hpp.
References gsl::vector::get(), and matrix().
|
inlinestatic |
Another C++ version of gsl_matrix_const_view_vector().
| v | A vector |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1169 of file matrix.hpp.
References gsl::vector::get(), and matrix().
|
inlinestatic |
C++ version of gsl_matrix_view_vector_with_tda().
| v | A vector |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 906 of file matrix.hpp.
References gsl::vector::get(), and matrix().
|
inlinestatic |
Another C++ version of gsl_matrix_const_view_vector_with_tda().
| v | A vector |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1183 of file matrix.hpp.
References gsl::vector::get(), and matrix().
|
inline |
This function is intended mainly for internal use.
It allows this to point to a gsl_matrix without the possibility deleting it when this is no longer in scope. It is the responsibility of the programmer to delete v. The function is used internally for converting a function that takes a gsl::matrix* argument to one that takes a gsl_matrix* argument.
| v | The gsl_matrix |
Definition at line 214 of file matrix.hpp.
References ccgsl_pointer, count, and owns_data.
|
friend |
Definition at line 74 of file matrix.hpp.
|
friend |
Definition at line 75 of file matrix.hpp.
|
friend |
Definition at line 73 of file matrix.hpp.
|
private |
The shared pointer.
Definition at line 1196 of file matrix.hpp.
Referenced by data(), end(), get(), matrix(), operator bool(), operator=(), operator[](), rbegin(), size1(), size2(), swap(), wrap_gsl_matrix_without_ownership(), and ~matrix().
|
private |
The shared reference count.
Definition at line 1200 of file matrix.hpp.
Referenced by matrix(), operator=(), swap(), unique(), use_count(), wrap_gsl_matrix_without_ownership(), and ~matrix().
|
private |
Used to allow a vector that does not own its data.
Definition at line 1192 of file matrix.hpp.
Referenced by matrix(), operator=(), wrap_gsl_matrix_without_ownership(), and ~matrix().