|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
This class handles matrix_short objects as shared handles. More...
#include <matrix_short.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_short_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_short () | |
| The default constructor is only really useful for assigning to. More... | |
| matrix_short (size_t const n1, size_t const n2) | |
| This constructor creates a new matrix_short with n1 rows and n2 columns. More... | |
| matrix_short (gsl_matrix_short *v) | |
| Could construct from a gsl_matrix_short. More... | |
| matrix_short (std::initializer_list< std::initializer_list< short > > initializer_list) | |
| Could construct from a std::initializer_list in C++11. More... | |
| matrix_short (matrix_short const &v) | |
| The copy constructor. More... | |
| matrix_short & | operator= (matrix_short const &v) |
| The assignment operator. More... | |
| matrix_short | clone () const |
| The clone function. More... | |
| ~matrix_short () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| void | wrap_gsl_matrix_short_without_ownership (gsl_matrix_short *v) |
| This function is intended mainly for internal use. More... | |
| void | reset () |
| Stop sharing ownership of the shared pointer. More... | |
| matrix_short (matrix_short &&v) | |
| Move constructor. More... | |
| matrix_short & | operator= (matrix_short &&v) |
| Move operator. More... | |
| iterator | begin () |
| Get iterator pointing to first vector_short element. More... | |
| const_iterator | begin () const |
| Get iterator pointing to first vector_short element. More... | |
| iterator | end () |
| Get iterator pointing beyond last vector_short element. More... | |
| const_iterator | end () const |
| Get iterator pointing beyond last vector_short element. More... | |
| reverse_iterator | rbegin () |
| Get iterator pointing to first vector_short element. More... | |
| const_reverse_iterator | rbegin () const |
| Get iterator pointing to first vector_short element. More... | |
| reverse_iterator | rend () |
| Get iterator pointing beyond last vector_short element. More... | |
| const_reverse_iterator | rend () const |
| Get iterator pointing beyond last vector_short element. More... | |
| size_t | size1 () const |
| The number of rows of the matrix_short. More... | |
| size_t | size2 () const |
| The number of columns of the matrix_short. More... | |
| short * | data () |
| Give access to the data block_short. More... | |
| short const * | data () const |
| Give access to the data block_short. More... | |
| void | swap (matrix_short &m) |
| Swap two matrix_short objects. More... | |
| void | tricpy (CBLAS_UPLO_t Uplo, CBLAS_DIAG_t Diag, matrix_short 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_short const &src) |
Copy the upper or lower triangular part of matrix src to this. More... | |
| matrix_short | submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_short_submatrix(). More... | |
| vector_short | row (size_t const i) |
| C++ version of gsl_matrix_short_row(). More... | |
| vector_short | column (size_t const j) |
| C++ version of gsl_matrix_short_column(). More... | |
| vector_short | diagonal () |
| C++ version of gsl_matrix_short_diagonal(). More... | |
| vector_short | subdiagonal (size_t const k) |
| C++ version of gsl_matrix_short_subdiagonal(). More... | |
| vector_short | superdiagonal (size_t const k) |
| C++ version of gsl_matrix_short_superdiagonal(). More... | |
| vector_short | subrow (size_t const i, size_t const offset, size_t const n) |
| C++ version of gsl_matrix_short_subrow(). More... | |
| vector_short | subcolumn (size_t const j, size_t const offset, size_t const n) |
| C++ version of gsl_matrix_short_subcolumn(). More... | |
| matrix_short 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_short_const_submatrix(). More... | |
| vector_short const | const_row (size_t const i) const |
| C++ version of gsl_matrix_short_const_row(). More... | |
| vector_short const | const_column (size_t const j) const |
| C++ version of gsl_matrix_short_const_column(). More... | |
| vector_short const | const_diagonal () const |
| C++ version of gsl_matrix_short_const_diagonal(). More... | |
| vector_short const | const_subdiagonal (size_t const k) const |
| C++ version of gsl_matrix_short_const_subdiagonal(). More... | |
| vector_short const | const_superdiagonal (size_t const k) const |
| C++ version of gsl_matrix_short_const_superdiagonal(). More... | |
| vector_short const | const_subrow (size_t const i, size_t const offset, size_t const n) const |
| C++ version of gsl_matrix_short_const_subrow(). More... | |
| vector_short const | const_subcolumn (size_t const j, size_t const offset, size_t const n) const |
| C++ version of gsl_matrix_short_const_subcolumn(). More... | |
| matrix_short 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_short_const_submatrix(). More... | |
| vector_short const | row (size_t const i) const |
| Another C++ version of gsl_matrix_short_const_row(). More... | |
| vector_short const | column (size_t const j) const |
| Another C++ version of gsl_matrix_short_const_column(). More... | |
| vector_short const | diagonal () const |
| Another C++ version of gsl_matrix_short_const_diagonal(). More... | |
| vector_short const | subdiagonal (size_t const k) const |
| Another C++ version of gsl_matrix_short_const_subdiagonal(). More... | |
| vector_short const | superdiagonal (size_t const k) const |
| Another C++ version of gsl_matrix_short_const_superdiagonal(). More... | |
| vector_short const | subrow (size_t const i, size_t const offset, size_t const n) const |
| Another C++ version of gsl_matrix_short_const_subrow(). More... | |
| vector_short const | subcolumn (size_t const j, size_t const offset, size_t const n) const |
| Another C++ version of gsl_matrix_short_const_subcolumn(). More... | |
| gsl_matrix_short * | get () |
| Get the gsl_matrix_short. More... | |
| gsl_matrix_short const * | get () const |
| Get the gsl_matrix_short. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_matrix_short. More... | |
| size_t | use_count () const |
| Find how many matrix_short objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| void | set_zero () |
| C++ version of gsl_matrix_short_set_zero(). More... | |
| void | set_all (short x) |
| C++ version of gsl_matrix_short_set_all(). More... | |
| int | memcpy (matrix_short const &src) |
| C++ version of gsl_matrix_short_memcpy(). More... | |
| short | max () const |
| C++ version of gsl_matrix_short_max(). More... | |
| short | min () const |
| C++ version of gsl_matrix_short_min(). More... | |
| void | minmax (short *min_out, short *max_out) const |
| C++ version of gsl_matrix_short_minmax(). More... | |
| void | minmax (short &min_out, short &max_out) const |
| C++ version of gsl_matrix_short_minmax(). More... | |
| int | add (matrix_short const &b) |
| C++ version of gsl_matrix_short_add(). More... | |
| int | sub (matrix_short const &b) |
| C++ version of gsl_matrix_short_sub(). More... | |
| int | scale (short const x) |
| C++ version of gsl_matrix_short_scale(). More... | |
| int | add_constant (short const x) |
| C++ version of gsl_matrix_short_add_constant(). More... | |
| int | isnull () const |
| C++ version of gsl_matrix_short_isnull(). More... | |
| int | ispos () const |
| C++ version of gsl_matrix_short_ispos(). More... | |
| int | isneg () const |
| C++ version of gsl_matrix_short_isneg(). More... | |
| int | isnonneg () const |
| C++ version of gsl_matrix_short_isnonneg(). More... | |
| short | get (size_t const i, size_t const j) const |
| C++ version of gsl_matrix_short_get(). More... | |
| void | set (size_t const i, size_t const j, short x) |
| C++ version of gsl_matrix_short_set(). More... | |
| short * | ptr (size_t const i, size_t const j) |
| C++ version of gsl_matrix_short_ptr(). More... | |
| short const * | const_ptr (size_t const i, size_t const j) const |
| C++ version of gsl_matrix_short_const_ptr(). More... | |
| int | fread (FILE *stream) |
| C++ version of gsl_matrix_short_fread(). More... | |
| int | fwrite (FILE *stream) const |
| C++ version of gsl_matrix_short_fwrite(). More... | |
| int | fscanf (FILE *stream) |
| C++ version of gsl_matrix_short_fscanf(). More... | |
| int | fprintf (FILE *stream, char const *format) const |
| C++ version of gsl_matrix_short_fprintf(). More... | |
| matrix_short (block_short &b, size_t const offset, size_t const n1, size_t const n2, size_t const d2) | |
| C++ version of gsl_matrix_short_alloc_from_block(). More... | |
| matrix_short (matrix_short &m, size_t const k1, size_t const k2, size_t const n1, size_t const n2) | |
| C++ version of gsl_matrix_short_alloc_from_matrix(). More... | |
| void | set_identity () |
| C++ version of gsl_matrix_short_set_identity(). More... | |
| int | swap_rows (size_t const i, size_t const j) |
| C++ version of gsl_matrix_short_swap_rows(). More... | |
| int | swap_columns (size_t const i, size_t const j) |
| C++ version of gsl_matrix_short_swap_columns(). More... | |
| int | swap_rowcol (size_t const i, size_t const j) |
| C++ version of gsl_matrix_short_swap_rowcol(). More... | |
| int | transpose () |
| C++ version of gsl_matrix_short_transpose(). More... | |
| int | transpose_memcpy (matrix_short const &src) |
| C++ version of gsl_matrix_short_transpose_memcpy(). More... | |
| void | max_index (size_t &imax, size_t &jmax) const |
| C++ version of gsl_matrix_short_max_index(). More... | |
| void | min_index (size_t &imin, size_t &jmin) const |
| C++ version of gsl_matrix_short_min_index(). More... | |
| void | minmax_index (size_t &imin, size_t &jmin, size_t &imax, size_t &jmax) const |
| C++ version of gsl_matrix_short_minmax_index(). More... | |
| int | mul_elements (matrix_short const &b) |
| C++ version of gsl_matrix_short_mul_elements(). More... | |
| int | div_elements (matrix_short const &b) |
| C++ version of gsl_matrix_short_div_elements(). More... | |
| short | norm1 () const |
| C++ version of gsl_matrix_short_norm1(). More... | |
| int | scale_rows (vector_short const &x) |
| C++ version of gsl_matrix_short_scale_rows(). More... | |
| int | scale_columns (vector_short const &x) |
| C++ version of gsl_matrix_short_scale_columns(). More... | |
| int | add_diagonal (short const x) |
| C++ version of gsl_matrix_short_add_diagonal(). More... | |
| int | get_row (vector_short &v, size_t const i) const |
| C++ version of gsl_matrix_short_get_row(). More... | |
| int | get_col (vector_short &v, size_t const j) const |
| C++ version of gsl_matrix_short_get_col(). More... | |
| int | set_row (size_t const i, vector_short const &v) |
| C++ version of gsl_matrix_short_set_row(). More... | |
| int | set_col (size_t const j, vector_short const &v) |
| C++ version of gsl_matrix_short_set_col(). More... | |
| vector_short | operator[] (size_t const i) |
| This function allows us to use a matrix_short like an array. More... | |
| vector_short const | operator[] (size_t const i) const |
| This function allows us to use a matrix_short like an array. More... | |
| int | permute (permutation &p) |
Permute the columns of this by permutation p. More... | |
Static Public Member Functions | |
| static matrix_short | view_array (short *base, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_short_view_array(). More... | |
| static matrix_short | view_array_with_tda (short *base, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_short_view_array_with_tda(). More... | |
| static matrix_short | view_vector (vector_short &v, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_short_view_vector(). More... | |
| static matrix_short | view_vector_with_tda (vector_short &v, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_short_view_vector_with_tda(). More... | |
| static matrix_short const | const_view_array (short const *base, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_short_const_view_array(). More... | |
| static matrix_short const | const_view_array_with_tda (short const *base, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_short_const_view_array_with_tda(). More... | |
| static matrix_short const | const_view_vector (vector_short const &v, size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_short_const_view_vector(). More... | |
| static matrix_short const | const_view_vector_with_tda (vector_short const &v, size_t const n1, size_t const n2, size_t const tda) |
| C++ version of gsl_matrix_short_const_view_vector_with_tda(). More... | |
| static matrix_short const | view_array (short const *base, size_t const n1, size_t const n2) |
| Another C++ version of gsl_matrix_short_const_view_array(). More... | |
| static matrix_short const | view_array_with_tda (short const *base, size_t const n1, size_t const n2, size_t const tda) |
| Another C++ version of gsl_matrix_short_const_view_array_with_tda(). More... | |
| static matrix_short const | view_vector (vector_short const &v, size_t const n1, size_t const n2) |
| Another C++ version of gsl_matrix_short_const_view_vector(). More... | |
| static matrix_short const | view_vector_with_tda (vector_short const &v, size_t const n1, size_t const n2, size_t const tda) |
| Another C++ version of gsl_matrix_short_const_view_vector_with_tda(). More... | |
| static matrix_short | calloc (size_t const n1, size_t const n2) |
| C++ version of gsl_matrix_short_calloc(). More... | |
Private Attributes | |
| bool | owns_data |
| Used to allow a vector that does not own its data. More... | |
| gsl_matrix_short * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
This class handles matrix_short objects as shared handles.
It models a random access container so that STL functions work with matrix_short.
Note that matrix_short_views are implemented as matrix_short objects here.
Note that in C++11 it is possible to iterate over the rows of a matrix_short 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_short.
Definition at line 57 of file matrix_short.hpp.
| typedef const_iterator_t<false> gsl::matrix_short::const_iterator |
The const_iterator type.
Definition at line 608 of file matrix_short.hpp.
| typedef const_iterator_t<true> gsl::matrix_short::const_reverse_iterator |
The const_reverse_t type.
Definition at line 616 of file matrix_short.hpp.
| typedef iterator_t<false> gsl::matrix_short::iterator |
The iterator type.
Definition at line 612 of file matrix_short.hpp.
| typedef iterator_t<true> gsl::matrix_short::reverse_iterator |
The reverse_iterator type.
Definition at line 620 of file matrix_short.hpp.
| typedef size_t gsl::matrix_short::size_type |
A container must have a size_type.
Definition at line 624 of file matrix_short.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 62 of file matrix_short.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_short with n1 rows and n2 columns.
| n1 | The number of rows in the matrix_short |
| n2 | The number of columns in the matrix_short |
Definition at line 74 of file matrix_short.hpp.
References ccgsl_pointer, and count.
|
inlineexplicit |
Could construct from a gsl_matrix_short.
This is not usually a good idea. In this case you should not use gsl_matrix_short_free() to deallocate the memory.
| v | The matrix_short |
Definition at line 92 of file matrix_short.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 103 of file matrix_short.hpp.
References ccgsl_pointer, count, gsl::exception::GSL_EBADLEN, row(), and set().
|
inline |
The copy constructor.
This shares the matrix_short. Use clone() if you want a full copy.
| v | The matrix_short to copy. |
Definition at line 136 of file matrix_short.hpp.
References count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 176 of file matrix_short.hpp.
References ccgsl_pointer, count, and owns_data.
|
inline |
Move constructor.
| v | The matrix_short to move. |
Definition at line 218 of file matrix_short.hpp.
References count.
|
inline |
C++ version of gsl_matrix_short_alloc_from_block().
| b | The block_short |
| offset | The offset within the block_short |
| n1 | The number of rows in the matrix_short |
| n2 | The number of columns in the matrix_short |
| d2 | undocumented |
Definition at line 1370 of file matrix_short.hpp.
References gsl::sf::mathieu::b(), ccgsl_pointer, and count.
|
inline |
C++ version of gsl_matrix_short_alloc_from_matrix().
| m | The matrix_short |
| 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_short |
| n2 | The number of columns in the matrix_short |
Definition at line 1388 of file matrix_short.hpp.
References ccgsl_pointer, count, and get().
|
inline |
C++ version of gsl_matrix_short_add().
| b | matrix_short to add to this |
Definition at line 1268 of file matrix_short.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_matrix_short_add_constant().
| x | constant to add to each element of this |
Definition at line 1286 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_add_diagonal().
| x | A constant |
Definition at line 1517 of file matrix_short.hpp.
References get().
|
inline |
Get iterator pointing to first vector_short element.
Definition at line 630 of file matrix_short.hpp.
|
inline |
Get iterator pointing to first vector_short element.
Definition at line 637 of file matrix_short.hpp.
|
inlinestatic |
C++ version of gsl_matrix_short_calloc().
This constructs a matrix_short object with entries initialised to zero.
| n1 | The number of rows in the matrix_short |
| n2 | The number of columns in the matrix_short |
Definition at line 1223 of file matrix_short.hpp.
References matrix_short().
|
inline |
The clone function.
Use this if you want a copy of the block_short that does not share the underlying data.
Definition at line 165 of file matrix_short.hpp.
|
inline |
C++ version of gsl_matrix_short_column().
| j | A column index |
Definition at line 785 of file matrix_short.hpp.
References get().
|
inline |
Another C++ version of gsl_matrix_short_const_column().
| j | A column index |
Definition at line 1008 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_const_column().
| j | A column index |
Definition at line 922 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_const_diagonal().
Definition at line 931 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_const_ptr().
| i | index of row |
| j | index of column |
Definition at line 1334 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_const_row().
| i | A row index |
Definition at line 912 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_const_subcolumn().
| j | A column index |
| offset | A row offset |
| n | The number of elements |
Definition at line 975 of file matrix_short.hpp.
References get(), and gsl::rstat::n().
|
inline |
C++ version of gsl_matrix_short_const_subdiagonal().
| k | An index |
k as a vector_short Definition at line 941 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_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 902 of file matrix_short.hpp.
References get(), and matrix_short().
|
inline |
C++ version of gsl_matrix_short_const_subrow().
| i | A row index |
| offset | A column offset |
| n | The number of elements |
Definition at line 963 of file matrix_short.hpp.
References get(), and gsl::rstat::n().
|
inline |
C++ version of gsl_matrix_short_const_superdiagonal().
| k | An index |
k as a vector_short Definition at line 951 of file matrix_short.hpp.
References get().
|
inlinestatic |
C++ version of gsl_matrix_short_const_view_array().
| base | An array of type short |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1073 of file matrix_short.hpp.
References matrix_short().
|
inlinestatic |
C++ version of gsl_matrix_short_const_view_array_with_tda().
| base | An array of type short |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1087 of file matrix_short.hpp.
References matrix_short().
|
inlinestatic |
C++ version of gsl_matrix_short_const_view_vector().
| v | A vector_short |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1099 of file matrix_short.hpp.
References gsl::vector_short::get(), and matrix_short().
|
inlinestatic |
C++ version of gsl_matrix_short_const_view_vector_with_tda().
| v | A vector_short |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1113 of file matrix_short.hpp.
References gsl::vector_short::get(), and matrix_short().
|
inline |
Give access to the data block_short.
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_short size2 and tda are not equal. However, new matrix_short objects are always initialised to have tda and size2 equal.
Definition at line 708 of file matrix_short.hpp.
References ccgsl_pointer.
|
inline |
Give access to the data block_short.
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_short size1 and tda are not equal. However, new matrix_short objects are always initialised to have tda and size2 equal.
Definition at line 722 of file matrix_short.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_matrix_short_diagonal().
Definition at line 795 of file matrix_short.hpp.
References get().
|
inline |
Another C++ version of gsl_matrix_short_const_diagonal().
Definition at line 1017 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_div_elements().
Divide each element of this by the corrsponding element of b
| b | Another matrix_short |
Definition at line 1490 of file matrix_short.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
Get iterator pointing beyond last vector_short element.
Definition at line 645 of file matrix_short.hpp.
References ccgsl_pointer, and size1().
|
inline |
Get iterator pointing beyond last vector_short element.
Definition at line 653 of file matrix_short.hpp.
References ccgsl_pointer, and size1().
|
inline |
C++ version of gsl_matrix_short_fprintf().
| stream | A C file stream |
| format | d, e, f or g |
Definition at line 1360 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_fread().
| stream | A C file stream |
Definition at line 1341 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_fscanf().
| stream | A C file stream |
Definition at line 1353 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_fwrite().
| stream | A C file stream |
Definition at line 1347 of file matrix_short.hpp.
References get().
|
inline |
Get the gsl_matrix_short.
Definition at line 1189 of file matrix_short.hpp.
References ccgsl_pointer.
Referenced by add(), add_constant(), add_diagonal(), clone(), column(), const_column(), const_diagonal(), const_ptr(), const_row(), const_subcolumn(), const_subdiagonal(), const_submatrix(), const_subrow(), const_superdiagonal(), gsl::spmatrix_short::d2sp(), diagonal(), div_elements(), fprintf(), fread(), fscanf(), fwrite(), get_col(), get_row(), isneg(), isnonneg(), isnull(), ispos(), matrix_short(), max(), max_index(), memcpy(), min(), min_index(), minmax(), minmax_index(), mul_elements(), norm1(), permute(), ptr(), row(), scale(), scale_columns(), scale_rows(), set(), set_all(), set_col(), set_identity(), set_row(), set_zero(), gsl::spmatrix_short::sp2d(), sub(), subcolumn(), subdiagonal(), submatrix(), subrow(), superdiagonal(), swap_columns(), swap_rowcol(), swap_rows(), transpose(), transpose_memcpy(), transpose_tricpy(), and tricpy().
|
inline |
Get the gsl_matrix_short.
Definition at line 1194 of file matrix_short.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_matrix_short_get().
| i | index of row |
| j | index of column |
Definition at line 1313 of file matrix_short.hpp.
References get().
Referenced by get().
|
inline |
C++ version of gsl_matrix_short_get_col().
| v | A vector_short |
| j | The index of the column |
Definition at line 1533 of file matrix_short.hpp.
References get(), and gsl::vector_short::get().
|
inline |
C++ version of gsl_matrix_short_get_row().
| v | A vector_short |
| i | The index of the row |
Definition at line 1525 of file matrix_short.hpp.
References get(), and gsl::vector_short::get().
|
inline |
C++ version of gsl_matrix_short_isneg().
+1 or 0 according as elements are all negative or not Definition at line 1301 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_isnonneg().
+1 or 0 according as elements are all nonnegative or not Definition at line 1306 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_isnull().
+1 or 0 according as elements are all zero or not Definition at line 1291 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_ispos().
+1 or 0 according as elements are all positive or not Definition at line 1296 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_max().
Definition at line 1243 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_max_index().
| imax | row index of the first maximum element in the matrix_short |
| jmax | column index of the first maximum element in the matrix_short |
Definition at line 1458 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_memcpy().
| src | source matrix_short |
Definition at line 1238 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_min().
Definition at line 1248 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_min_index().
| imin | row index of the first minimum element in the matrix_short |
| jmin | column index of the first minimum element in the matrix_short |
Definition at line 1465 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_minmax().
| min_out | minimum element of matrix_short |
| max_out | maximum element of matrix_short |
Definition at line 1261 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_minmax().
| min_out | minimum element of matrix_short |
| max_out | maximum element of matrix_short |
Definition at line 1254 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_minmax_index().
| imin | row index of the first minimum element in the matrix_short |
| jmin | column index of the first minimum element in the matrix_short |
| imax | row index of the first maximum element in the matrix_short |
| jmax | column index of the first maximum element in the matrix_short |
Definition at line 1474 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_mul_elements().
Multiply matrices elementwise.
| b | Another matrix_short |
Definition at line 1482 of file matrix_short.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_matrix_short_norm1().
Definition at line 1496 of file matrix_short.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_matrix_short Definition at line 1214 of file matrix_short.hpp.
References ccgsl_pointer.
|
inline |
Move operator.
| v | The matrix_short to move. |
Definition at line 228 of file matrix_short.hpp.
References matrix_short().
|
inline |
The assignment operator.
This makes a shared copy.
| v | The matrix_short to copy |
Definition at line 145 of file matrix_short.hpp.
References ccgsl_pointer, count, and owns_data.
|
inline |
This function allows us to use a matrix_short like an array.
Use with caution. Although matrix_short[i][j] is possible, it is less efficient than matrix_short::set(). The effect is the same as row().
| i | The index of the row |
Definition at line 1559 of file matrix_short.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, size1(), and gsl::vector_short::wrap_gsl_vector_short_without_ownership().
|
inline |
This function allows us to use a matrix_short like an array.
Use with caution. Although matrix_short[i][j] is possible, it is much less efficient than matrix_short::set(). The effect is the same as row()
| i | The index of the row |
Definition at line 1593 of file matrix_short.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, and gsl::vector_short::wrap_gsl_vector_short_without_ownership().
|
inline |
Permute the columns of this by permutation p.
| p | The permutation |
Definition at line 1610 of file matrix_short.hpp.
References get(), and gsl::permutation::get().
|
inline |
C++ version of gsl_matrix_short_ptr().
| i | index of row |
| j | index of column |
Definition at line 1327 of file matrix_short.hpp.
References get().
Referenced by gsl::matrix_short::iterator_base< container, content, reverse_t >::operator->().
|
inline |
Get iterator pointing to first vector_short element.
Definition at line 662 of file matrix_short.hpp.
References ccgsl_pointer, and size1().
|
inline |
Get iterator pointing to first vector_short element.
Definition at line 670 of file matrix_short.hpp.
References ccgsl_pointer, and size1().
|
inline |
Get iterator pointing beyond last vector_short element.
Definition at line 679 of file matrix_short.hpp.
|
inline |
Get iterator pointing beyond last vector_short element.
Definition at line 686 of file matrix_short.hpp.
|
inline |
Stop sharing ownership of the shared pointer.
Definition at line 212 of file matrix_short.hpp.
References matrix_short().
|
inline |
C++ version of gsl_matrix_short_row().
| i | A row index |
Definition at line 775 of file matrix_short.hpp.
References get().
Referenced by matrix_short().
|
inline |
Another C++ version of gsl_matrix_short_const_row().
| i | A row index |
Definition at line 998 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_scale().
| x | constant to multiply this by |
Definition at line 1280 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_scale_columns().
| x | A scalar |
Definition at line 1510 of file matrix_short.hpp.
References get(), and gsl::vector_short::get().
|
inline |
C++ version of gsl_matrix_short_scale_rows().
| x | A scalar |
Definition at line 1503 of file matrix_short.hpp.
References get(), and gsl::vector_short::get().
|
inline |
C++ version of gsl_matrix_short_set().
| i | index of row |
| j | index of column |
| x | new value for element |
Definition at line 1320 of file matrix_short.hpp.
References get().
Referenced by matrix_short().
|
inline |
C++ version of gsl_matrix_short_set_all().
| x | The value to which all elements are set |
Definition at line 1232 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_set_col().
| j | The index of the column |
| v | A vector_short |
Definition at line 1549 of file matrix_short.hpp.
References get(), and gsl::vector_short::get().
|
inline |
C++ version of gsl_matrix_short_set_identity().
Definition at line 1402 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_set_row().
| i | The index of the row |
| v | A vector_short |
Definition at line 1541 of file matrix_short.hpp.
References get(), and gsl::vector_short::get().
|
inline |
C++ version of gsl_matrix_short_set_zero().
Definition at line 1227 of file matrix_short.hpp.
References get().
|
inline |
The number of rows of the matrix_short.
Definition at line 695 of file matrix_short.hpp.
References ccgsl_pointer.
Referenced by clone(), gsl::matrix_short::iterator_base< container, content, reverse_t >::decrement(), end(), gsl::matrix_short::iterator_base< container, content, reverse_t >::increment(), operator[](), and rbegin().
|
inline |
The number of columns of the matrix_short.
Definition at line 700 of file matrix_short.hpp.
References ccgsl_pointer.
Referenced by clone().
|
inline |
C++ version of gsl_matrix_short_sub().
| b | matrix_short to subtract from this |
Definition at line 1274 of file matrix_short.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_matrix_short_subcolumn().
| j | A column index |
| offset | A row offset |
| n | The number of elements |
Definition at line 838 of file matrix_short.hpp.
References get(), and gsl::rstat::n().
|
inline |
Another C++ version of gsl_matrix_short_const_subcolumn().
| j | A column index |
| offset | A row offset |
| n | The number of elements |
Definition at line 1061 of file matrix_short.hpp.
References get(), and gsl::rstat::n().
|
inline |
C++ version of gsl_matrix_short_subdiagonal().
| k | An index |
k as a vector_short Definition at line 804 of file matrix_short.hpp.
References get().
|
inline |
Another C++ version of gsl_matrix_short_const_subdiagonal().
| k | An index |
k as a vector_short Definition at line 1027 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_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 765 of file matrix_short.hpp.
References get(), and matrix_short().
|
inline |
Another C++ version of gsl_matrix_short_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 988 of file matrix_short.hpp.
References get(), and matrix_short().
|
inline |
C++ version of gsl_matrix_short_subrow().
| i | A row index |
| offset | A column offset |
| n | The number of elements |
Definition at line 826 of file matrix_short.hpp.
References get(), and gsl::rstat::n().
|
inline |
Another C++ version of gsl_matrix_short_const_subrow().
| i | A row index |
| offset | A column offset |
| n | The number of elements |
Definition at line 1049 of file matrix_short.hpp.
References get(), and gsl::rstat::n().
|
inline |
C++ version of gsl_matrix_short_superdiagonal().
| k | An index |
k as a vector_short Definition at line 814 of file matrix_short.hpp.
References get().
|
inline |
Another C++ version of gsl_matrix_short_const_superdiagonal().
| k | An index |
k as a vector_short Definition at line 1037 of file matrix_short.hpp.
References get().
|
inline |
Swap two matrix_short objects.
This works even if the matrix_short objects have different sizes because it swaps pointers.
| m | The matrix_short to swap with this. |
Definition at line 734 of file matrix_short.hpp.
References ccgsl_pointer, and count.
|
inline |
C++ version of gsl_matrix_short_swap_columns().
| i | Index of first column |
| j | Index of second column |
Definition at line 1416 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_swap_rowcol().
Swap row and column in place. Matrix must be square.
| i | index of row |
| j | index of column |
Definition at line 1424 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_swap_rows().
| i | Index of first row |
| j | Index of second row |
Definition at line 1409 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_transpose().
Definition at line 1429 of file matrix_short.hpp.
References get().
|
inline |
C++ version of gsl_matrix_short_transpose_memcpy().
| src | matrix_short whose transpose it to be copied to this |
Definition at line 1435 of file matrix_short.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 753 of file matrix_short.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 744 of file matrix_short.hpp.
References get().
|
inline |
Find if this is the only object sharing the gsl_matrix_short.
true or falses according as this is the only matrix_short object sharing the gsl_matrix_short Definition at line 1200 of file matrix_short.hpp.
References count.
|
inline |
Find how many matrix_short objects share this pointer.
Definition at line 1205 of file matrix_short.hpp.
References count.
|
inlinestatic |
C++ version of gsl_matrix_short_view_array().
| base | An array of type short |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 850 of file matrix_short.hpp.
References matrix_short().
|
inlinestatic |
Another C++ version of gsl_matrix_short_const_view_array().
| base | An array of type short |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1125 of file matrix_short.hpp.
References matrix_short().
|
inlinestatic |
C++ version of gsl_matrix_short_view_array_with_tda().
| base | An array of type short |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 863 of file matrix_short.hpp.
References matrix_short().
|
inlinestatic |
Another C++ version of gsl_matrix_short_const_view_array_with_tda().
| base | An array of type short |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1139 of file matrix_short.hpp.
References matrix_short().
|
inlinestatic |
C++ version of gsl_matrix_short_view_vector().
| v | A vector_short |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 875 of file matrix_short.hpp.
References gsl::vector_short::get(), and matrix_short().
|
inlinestatic |
Another C++ version of gsl_matrix_short_const_view_vector().
| v | A vector_short |
| n1 | The number of rows |
| n2 | The number of columns |
Definition at line 1151 of file matrix_short.hpp.
References gsl::vector_short::get(), and matrix_short().
|
inlinestatic |
C++ version of gsl_matrix_short_view_vector_with_tda().
| v | A vector_short |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 888 of file matrix_short.hpp.
References gsl::vector_short::get(), and matrix_short().
|
inlinestatic |
Another C++ version of gsl_matrix_short_const_view_vector_with_tda().
| v | A vector_short |
| n1 | The number of rows |
| n2 | The number of columns |
| tda | The number of columns in memory |
Definition at line 1165 of file matrix_short.hpp.
References gsl::vector_short::get(), and matrix_short().
|
inline |
This function is intended mainly for internal use.
It allows this to point to a gsl_matrix_short 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_short* argument to one that takes a gsl_matrix_short* argument.
| v | The gsl_matrix_short |
Definition at line 196 of file matrix_short.hpp.
References ccgsl_pointer, count, and owns_data.
|
private |
The shared pointer.
Definition at line 1178 of file matrix_short.hpp.
Referenced by data(), end(), get(), matrix_short(), operator bool(), operator=(), operator[](), rbegin(), size1(), size2(), swap(), wrap_gsl_matrix_short_without_ownership(), and ~matrix_short().
|
private |
The shared reference count.
Definition at line 1182 of file matrix_short.hpp.
Referenced by matrix_short(), operator=(), swap(), unique(), use_count(), wrap_gsl_matrix_short_without_ownership(), and ~matrix_short().
|
private |
Used to allow a vector that does not own its data.
Definition at line 1174 of file matrix_short.hpp.
Referenced by matrix_short(), operator=(), wrap_gsl_matrix_short_without_ownership(), and ~matrix_short().