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


Classes | |
| class | const_iterator_t |
| A class template for the const iterators. More... | |
| class | iterator_base |
| The container must have iterator types. More... | |
| class | iterator_t |
| A class template for the two non-const iterators. More... | |
Public Types | |
| typedef double | value_type |
| A container must have a value_type. More... | |
| typedef value_type & | reference |
| A container must have a reference type. More... | |
| typedef value_type const & | const_reference |
| A container must have a constant reference type. More... | |
| typedef value_type * | pointer |
| A container must have a pointer type. More... | |
| typedef value_type const * | const_pointer |
| A container must have a constant pointer type. More... | |
| 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 const_iterator::difference_type | difference_type |
| A container must have a difference_type. More... | |
| typedef size_t | size_type |
| A container must have a size_type. More... | |
Public Member Functions | |
| vector () | |
| The default constructor is only really useful for assigning to. More... | |
| vector (size_t const n) | |
| The default constructor creates a new vector with n elements. More... | |
| vector (gsl_vector *v) | |
| Could construct from a gsl_vector. More... | |
| vector (std::initializer_list< double > initializer_list) | |
| Could construct from a std::initializer_list in C++11. More... | |
| vector (vector const &v) | |
| The copy constructor. More... | |
| vector (vector &v) | |
| The copy constructor. More... | |
| vector & | operator= (vector const &v) |
| The assignment operator. More... | |
| template<typename V > | |
| vector (V &v, size_t const stride=1) | |
| Construct from an object that implements data() and size(). More... | |
| vector | clone () const |
| The clone function. More... | |
| ~vector () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| void | wrap_gsl_vector_without_ownership (gsl_vector *v) |
| This function is intended mainly for internal use. More... | |
| bool | operator== (vector const &v) const |
| Two vector objects are identically equal if their elements are identical. More... | |
| void | reset () |
| Stop sharing ownership of the shared pointer. More... | |
| vector (vector &&v) | |
| Move constructor. More... | |
| vector & | operator= (vector &&v) |
| Move operator. More... | |
| bool | operator!= (vector const &v) const |
| Two vector objects are different equal if their elements are not identical. More... | |
| bool | operator< (vector const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (vector const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (vector const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (vector const &v) const |
| A container needs to define an ordering for sorting. 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... | |
| size_type | size () const |
| The size (number of elements) of the vector. More... | |
| double * | data () |
| Give access to the data block. More... | |
| double const * | data () const |
| Give access to the data block. More... | |
| size_type | max_size () const |
| The max size (number of elements) of the vector. More... | |
| bool | empty () const |
| Find if the vector is empty. More... | |
| void | swap (vector &v) |
| Swap two vector objects. 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... | |
| double & | operator[] (size_t const n) |
Get element at position n by reference ([] operator). More... | |
| double const & | operator[] (size_t const n) const |
Get element at position n by reference ([] operator). More... | |
| gsl_vector * | get () |
| Get the gsl_vector. More... | |
| gsl_vector const * | get () const |
| Get the gsl_vector. More... | |
| bool | unique () const |
Find if this is the only object sharing the gsl_vector. More... | |
| size_t | use_count () const |
| Find how many vector objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| void | set_zero () |
| C++ version of gsl_vector_set_zero(). More... | |
| void | set_all (double x) |
| C++ version of gsl_vector_set_all(). More... | |
| int | set_basis (size_t i) |
| C++ version of gsl_vector_set_basis(). More... | |
| int | memcpy (vector const &src) |
| C++ version of gsl_vector_memcpy(). More... | |
| int | reverse () |
| C++ version of gsl_vector_reverse(). More... | |
| int | swap_elements (size_t const i, size_t const j) |
| C++ version of gsl_vector_swap_elements(). More... | |
| double | max () const |
| C++ version of gsl_vector_max(). More... | |
| double | min () const |
| C++ version of gsl_vector_min(). More... | |
| void | minmax (double *min_out, double *max_out) const |
| C++ version of gsl_vector_minmax(). More... | |
| size_t | max_index () const |
| C++ version of gsl_vector_max_index(). More... | |
| size_t | min_index () const |
| C++ version of gsl_vector_min_index(). More... | |
| void | minmax_index (size_t *imin, size_t *imax) const |
| C++ version of gsl_vector_minmax_index(). More... | |
| void | minmax_index (size_t &imin, size_t &imax) const |
| C++ version of gsl_vector_minmax_index(). More... | |
| int | add (vector const &b) |
| C++ version of gsl_vector_add(). More... | |
| int | sub (vector const &b) |
| C++ version of gsl_vector_sub(). More... | |
| int | mul (vector const &b) |
| C++ version of gsl_vector_mul(). More... | |
| int | div (vector const &b) |
| C++ version of gsl_vector_div(). More... | |
| int | scale (double const x) |
| C++ version of gsl_vector_scale(). More... | |
| int | add_constant (double const x) |
| C++ version of gsl_vector_add_constant(). More... | |
| int | axpby (double const alpha, vector const &x, double const beta) |
| C++ version of gsl_vector_axpby(). More... | |
| double | sum (vector const &a) const |
| C++ version of gsl_vector_sum(). More... | |
| int | isnull () const |
| C++ version of gsl_vector_isnull(). More... | |
| int | ispos () const |
| C++ version of gsl_vector_ispos(). More... | |
| int | isneg () const |
| C++ version of gsl_vector_isneg(). More... | |
| int | isnonneg () const |
| C++ version of gsl_vector_isnonneg(). More... | |
| double | get (size_t const i) const |
| C++ version of gsl_vector_get(). More... | |
| void | set (size_t const i, double x) |
| C++ version of gsl_vector_set(). More... | |
| double * | ptr (size_t const i) |
| C++ version of gsl_vector_ptr(). More... | |
| double const * | const_ptr (size_t const i) const |
| C++ version of gsl_vector_const_ptr(). More... | |
| int | fread (FILE *stream) |
| C++ version of gsl_vector_fread(). More... | |
| int | fwrite (FILE *stream) const |
| C++ version of gsl_vector_fwrite(). More... | |
| int | fscanf (FILE *stream) |
| C++ version of gsl_vector_fscanf(). More... | |
| int | fprintf (FILE *stream, char const *format) const |
| C++ version of gsl_vector_fprintf(). More... | |
| vector (block &b, size_t const offset, size_t const n, size_t const stride=1) | |
| C++ version of gsl_vector_alloc_from_block(). More... | |
| vector (vector &v, size_t const offset, size_t const n, size_t const stride=1) | |
| C++ version of gsl_vector_alloc_from_vector(). More... | |
| vector | subvector (size_t i, size_t n) |
| C++ version of gsl_vector_subvector(). More... | |
| vector | subvector_with_stride (size_t i, size_t stride, size_t n) |
| C++ version of gsl_vector_subvectorwith_stride(). More... | |
| vector const | const_subvector (size_t i, size_t n) const |
| C++ version of gsl_vector_const_subvector(). More... | |
| vector const | const_subvector_with_stride (size_t i, size_t stride, size_t n) const |
| C++ version of gsl_vector_const_subvector_with_stride(). More... | |
Static Public Member Functions | |
| static vector | calloc (size_t const n) |
| C++ version of gsl_vector_calloc(). More... | |
| static vector | view_array (double *v, size_t n) |
| C++ version of gsl_vector_view_array(). More... | |
| static vector | view_array_with_stride (double *base, size_t stride, size_t n) |
| C++ version of gsl_vector_view_array_with_stride(). More... | |
| static vector const | const_view_array (double const *v, size_t n) |
| C++ version of gsl_vector _const_view_array(). More... | |
| static vector const | const_view_array_with_stride (double const *base, size_t stride, size_t n) |
| C++ version of gsl_vector_const_view_array_with_stride(). More... | |
| template<typename ARRAY > | |
| static vector | view_array (ARRAY &v, size_t n=0) |
| C++ version of gsl_vector_view_array(). More... | |
| template<typename ARRAY > | |
| static vector | view_array_with_stride (ARRAY &base, size_t stride, size_t n=0) |
| C++ version of gsl_vector_view_array_with_stride(). More... | |
| template<typename ARRAY > | |
| static vector const | const_view_array (ARRAY const &v, size_t n=0) |
| C++ version of gsl_vector _const_view_array(). More... | |
| template<typename ARRAY > | |
| static vector const | const_view_array_with_stride (ARRAY const &base, size_t stride, size_t n=0) |
| C++ version of gsl_vector_const_view_array_with_stride(). More... | |
| static vector | alloc_row_from_matrix (matrix &m, size_t const i) |
| C++ version of gsl_vector_alloc_row_from_matrix(). More... | |
| static vector | alloc_col_from_matrix (matrix &m, size_t const j) |
| C++ version of gsl_vector_alloc_col_from_matrix(). More... | |
| static double | get (gsl_vector const *v, size_t const i) |
| C++ version of get(). More... | |
Private Attributes | |
| bool | owns_data |
| Used to allow a vector that does not own its data. More... | |
| gsl_vector * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Friends | |
| class | multimin::function |
| class | multimin::function_fdf |
| class | multifit::function |
| class | multifit::function_fdf |
| class | multiroot::function |
| class | multiroot::function_fdf |
| class | multifit::nlinear::function_fdf |
| class | multilarge::nlinear::function_fdf |
This class handles vector objects as shared handles.
It models a random access container so that STL functions work with vector.
Note that vector_views are implemented as vector objects here.
If you want to use a std::vector<double> or similar object as if it were a gsl::vector object, use the constructor that takes a stride argument. But use it with caution. Changing the size of the original object does not change the size of the gsl::vector object; so it may be safer to create gsl::vector objects in this way as needed.
Definition at line 74 of file vector.hpp.
| typedef const_iterator_t<false> gsl::vector::const_iterator |
The const_iterator type.
Definition at line 1109 of file vector.hpp.
| typedef value_type const* gsl::vector::const_pointer |
A container must have a constant pointer type.
Definition at line 441 of file vector.hpp.
| typedef value_type const& gsl::vector::const_reference |
A container must have a constant reference type.
Definition at line 431 of file vector.hpp.
| typedef const_iterator_t<true> gsl::vector::const_reverse_iterator |
The const_reverse_t type.
Definition at line 1117 of file vector.hpp.
A container must have a difference_type.
Definition at line 1126 of file vector.hpp.
| typedef iterator_t<false> gsl::vector::iterator |
The iterator type.
Definition at line 1113 of file vector.hpp.
| typedef value_type* gsl::vector::pointer |
A container must have a pointer type.
Definition at line 436 of file vector.hpp.
| typedef value_type& gsl::vector::reference |
A container must have a reference type.
Definition at line 426 of file vector.hpp.
| typedef iterator_t<true> gsl::vector::reverse_iterator |
The reverse_iterator type.
Definition at line 1121 of file vector.hpp.
| typedef size_t gsl::vector::size_type |
A container must have a size_type.
Definition at line 1131 of file vector.hpp.
| typedef double gsl::vector::value_type |
A container must have a value_type.
Definition at line 421 of file vector.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 87 of file vector.hpp.
References ccgsl_pointer, count, and owns_data.
Referenced by calloc(), gsl::matrix::column(), gsl::matrix::const_column(), gsl::matrix::const_diagonal(), gsl::matrix::const_row(), gsl::matrix::const_subcolumn(), gsl::matrix::const_subdiagonal(), gsl::matrix::const_subrow(), const_subvector(), const_subvector_with_stride(), gsl::matrix::const_superdiagonal(), const_view_array(), const_view_array_with_stride(), gsl::matrix::diagonal(), operator=(), reset(), gsl::matrix::row(), gsl::matrix::subcolumn(), gsl::matrix::subdiagonal(), gsl::matrix::subrow(), subvector(), subvector_with_stride(), gsl::matrix::superdiagonal(), view_array(), and view_array_with_stride().
|
inlineexplicit |
The default constructor creates a new vector with n elements.
| n | The number of elements in the vector |
Definition at line 98 of file vector.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_vector.
This is not usually a good idea. In this case we should not use gsl_vector_free() to deallocate the memory.
| v | The vector |
Definition at line 138 of file vector.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 150 of file vector.hpp.
References begin(), ccgsl_pointer, count, and gsl::rstat::n().
|
inline |
The copy constructor.
This shares the vector. Use clone() if you want a full copy.
| v | The vector to copy. |
Definition at line 172 of file vector.hpp.
References count.
|
inline |
The copy constructor.
This shares the vector. Use clone() if you want a full copy.
| v | The vector to copy. |
Definition at line 180 of file vector.hpp.
References count.
|
inline |
Construct from an object that implements data() and size().
This is primarily intended to allow you to construct from a std::vector<double> or std::array<double,size_t> object. But it could be used to construct a subvector. This constructor shares the data with the original object. But the price of efficiency is safety. If you change the size of v the size of the gsl::vector does not change. Stride is normally set to 1 and allows us to define a constructor. But it can be set to another value to indicate, for example, that you only wish every second element to be included in this.
| v | The object that you want this to share data with. |
| stride | The stride. |
Definition at line 217 of file vector.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 252 of file vector.hpp.
References ccgsl_pointer, count, and owns_data.
|
inline |
Move constructor.
| v | The vector to move. |
Definition at line 313 of file vector.hpp.
References count.
|
inline |
C++ version of gsl_vector_alloc_from_block().
| b | The block |
| offset | The offset within the block |
| n | The number of elements |
| stride | The stride |
Definition at line 1560 of file vector.hpp.
References gsl::sf::mathieu::b(), ccgsl_pointer, count, and gsl::rstat::n().
|
inline |
C++ version of gsl_vector_alloc_from_vector().
| v | The vector |
| offset | The offset |
| n | The number of elements |
| stride | The stride |
Definition at line 1577 of file vector.hpp.
References ccgsl_pointer, count, get(), and gsl::rstat::n().
|
inline |
C++ version of gsl_vector_add().
| b | vector to add to this |
Definition at line 1435 of file vector.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_vector_add_constant().
| x | constant to add to each element of this |
Definition at line 1465 of file vector.hpp.
References get().
C++ version of gsl_vector_alloc_col_from_matrix().
| m | A matrix |
| j | A column |
C++ version of gsl_vector_alloc_row_from_matrix().
| m | A matrix |
| i | A row |
|
inline |
C++ version of gsl_vector_axpby().
| alpha | constant to multiply x by |
| x | another vector |
| beta | constant to multiply this by |
this Definition at line 1473 of file vector.hpp.
References gsl::ran::beta(), and get().
|
inline |
Get iterator pointing to first vector element.
Definition at line 1137 of file vector.hpp.
Referenced by vector().
|
inline |
Get iterator pointing to first vector element.
Definition at line 1144 of file vector.hpp.
|
inlinestatic |
C++ version of gsl_vector_calloc().
This constructs a vector object with entries initialised to zero.
| n | The size of the vector |
Definition at line 1354 of file vector.hpp.
References gsl::rstat::n(), and vector().
|
inline |
The clone function.
Use this if you want a copy of the block that does not share the underlying data.
this. Definition at line 241 of file vector.hpp.
|
inline |
C++ version of gsl_vector_const_ptr().
| i | index of element to get |
Definition at line 1526 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_const_subvector().
| i | The offset |
| n | The size |
Definition at line 1703 of file vector.hpp.
References get(), gsl::rstat::n(), and vector().
|
inline |
C++ version of gsl_vector_const_subvector_with_stride().
| i | The offset |
| stride | The stride |
| n | The size |
Definition at line 1717 of file vector.hpp.
References get(), gsl::rstat::n(), and vector().
|
inlinestatic |
C++ version of gsl_vector _const_view_array().
| v | An array of type double |
| n | The size of the vector: the default gives access to the whole array |
Definition at line 1799 of file vector.hpp.
References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().
|
inlinestatic |
C++ version of gsl_vector _const_view_array().
| v | An array of type double |
| n | The size of the vector |
Definition at line 1619 of file vector.hpp.
References gsl::rstat::n(), and vector().
|
inlinestatic |
C++ version of gsl_vector_const_view_array_with_stride().
| base | An array of type double |
| stride | The stride |
| n | The size of the vector: the default gives access to the whole array |
Definition at line 1818 of file vector.hpp.
References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().
|
inlinestatic |
C++ version of gsl_vector_const_view_array_with_stride().
| base | An array of type double |
| stride | The stride |
| n | The size of the vector |
Definition at line 1632 of file vector.hpp.
References gsl::rstat::n(), and vector().
Referenced by gsl::vector_complex::const_imag(), gsl::vector_complex::const_real(), gsl::vector_complex::imag(), and gsl::vector_complex::real().
|
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 vector stride is not 1. However, new vector objects are always initialised to have a stride of 1.
Definition at line 1177 of file vector.hpp.
References ccgsl_pointer.
Referenced by gsl::fft::halfcomplex::unpack(), and gsl::fft::real::unpack().
|
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 vector stride is not 1. However, new vector objects are always initialised to have a stride of 1.
Definition at line 1191 of file vector.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_vector_div().
| b | vector to dividev this by elementwise |
Definition at line 1453 of file vector.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
Find if the vector is empty.
true if has size zero; otherwise false Definition at line 1210 of file vector.hpp.
References ccgsl_pointer.
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 1152 of file vector.hpp.
References ccgsl_pointer, and size().
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 1160 of file vector.hpp.
References ccgsl_pointer, and size().
|
inline |
C++ version of gsl_vector_fprintf().
| stream | A C file stream |
| format | d, e, f or g |
Definition at line 1551 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_fread().
| stream | A C file stream |
Definition at line 1532 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_fscanf().
| stream | A C file stream |
Definition at line 1544 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_fwrite().
| stream | A C file stream |
Definition at line 1538 of file vector.hpp.
References get().
|
inline |
Get the gsl_vector.
Definition at line 1320 of file vector.hpp.
References ccgsl_pointer.
Referenced by gsl::multilarge::linear::accumulate(), add(), add_constant(), gsl::movstat::workspace::apply(), gsl::movstat::apply(), axpby(), gsl::linalg::bidiag_decomp(), gsl::linalg::bidiag_unpack(), gsl::linalg::bidiag_unpack2(), gsl::linalg::bidiag_unpack_B(), gsl::linalg::cholesky_band_rcond(), gsl::linalg::cholesky_band_solve(), gsl::linalg::cholesky_band_svx(), gsl::linalg::cholesky_decomp2(), gsl::linalg::cholesky_rcond(), gsl::linalg::cholesky_scale(), gsl::linalg::cholesky_scale_apply(), gsl::linalg::cholesky_solve(), gsl::linalg::cholesky_solve2(), gsl::linalg::cholesky_svx(), gsl::linalg::cholesky_svx2(), 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(), gsl::linalg::complex_LU_refine(), gsl::linalg::complex_QR_lssolve(), const_ptr(), const_subvector(), const_subvector_with_stride(), gsl::matrix::const_view_vector(), gsl::matrix::const_view_vector_with_tda(), gsl::blas::dasum(), gsl::blas::daxpy(), gsl::blas::dcopy(), gsl::multiroot::test::delta(), gsl::multilarge::nlinear::df(), gsl::multifit::nlinear::df(), gsl::spblas::dgemv(), gsl::blas::dgemv(), gsl::blas::dger(), gsl::multimin::diff(), div(), gsl::blas::dnrm2(), gsl::blas::drot(), gsl::blas::drotm(), gsl::blas::dscal(), gsl::blas::dswap(), gsl::blas::dsymv(), gsl::blas::dsyr(), gsl::blas::dsyr2(), gsl::blas::dtrmv(), gsl::blas::dtrsv(), gsl::bspline::eval(), gsl::multilarge::nlinear::eval_df(), gsl::multifit::nlinear::eval_df(), gsl::multifit::nlinear::eval_f(), gsl::multilarge::nlinear::eval_f(), gsl::multifit::nlinear::eval_fvv(), gsl::multilarge::nlinear::eval_fvv(), gsl::bspline::eval_nonzero(), gsl::multifit::nlinear::fdfvv(), gsl::multilarge::nlinear::fdfvv(), gsl::multiroot::fdjacobian(), gsl::movstat::fill(), fprintf(), fread(), fscanf(), fwrite(), gsl::filter::gaussian(), gsl::filter::gaussian_kernel(), gsl::multilarge::linear::genform1(), gsl::multilarge::linear::genform2(), gsl::matrix::get_col(), gsl::matrix::get_row(), gsl::linalg::givens_gv(), gsl::multimin::test::gradient(), gsl::linalg::hermtd_unpack(), gsl::linalg::hermtd_unpack_T(), gsl::linalg::hessenberg_decomp(), 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_hv(), gsl::linalg::householder_left(), gsl::linalg::householder_mh(), gsl::linalg::householder_right(), gsl::linalg::householder_transform(), gsl::linalg::householder_transform2(), gsl::blas::idamax(), gsl::filter::impulse(), gsl::multifit::nlinear::init(), gsl::multilarge::nlinear::workspace::init(), gsl::multilarge::nlinear::init(), isneg(), isnonneg(), isnull(), ispos(), gsl::splinalg::itersolve::itersolve_iterate(), gsl::bspline::knots(), gsl::multilarge::linear::L_decomp(), gsl::linalg::L_solve_T(), gsl::multilarge::linear::lcurve(), gsl::linalg::ldlt_band_rcond(), gsl::linalg::ldlt_band_solve(), gsl::linalg::ldlt_band_svx(), gsl::linalg::ldlt_rcond(), gsl::linalg::ldlt_solve(), gsl::linalg::ldlt_svx(), gsl::multifit::linear(), gsl::multifit::linear_applyW(), gsl::multifit::linear_est(), gsl::multifit::linear_gcv(), gsl::multifit::linear_gcv_calc(), gsl::multifit::linear_gcv_curve(), gsl::multifit::linear_gcv_init(), gsl::multifit::linear_gcv_min(), gsl::multifit::linear_genform1(), gsl::multifit::linear_genform2(), gsl::multifit::linear_L_decomp(), gsl::multifit::linear_lcorner(), gsl::multifit::linear_lcorner2(), gsl::multifit::linear_lcurvature(), gsl::multifit::linear_lcurve(), gsl::multifit::linear_Lsobolev(), gsl::multifit::linear_residuals(), gsl::multifit::linear_solve(), gsl::multifit::linear_stdform1(), gsl::multifit::linear_stdform2(), 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_solve(), gsl::linalg::LU_band_svx(), gsl::linalg::LU_refine(), gsl::linalg::LU_solve(), gsl::linalg::LU_svx(), gsl::movstat::workspace::mad(), gsl::movstat::mad(), gsl::movstat::workspace::mad0(), gsl::movstat::mad0(), max(), gsl::movstat::workspace::max(), gsl::movstat::max(), max_index(), gsl::linalg::mcholesky_rcond(), gsl::linalg::mcholesky_solve(), gsl::linalg::mcholesky_svx(), gsl::movstat::workspace::mean(), gsl::movstat::mean(), gsl::movstat::workspace::median(), gsl::filter::median(), gsl::movstat::median(), memcpy(), min(), gsl::movstat::workspace::min(), gsl::movstat::min(), min_index(), minmax(), gsl::movstat::workspace::minmax(), gsl::movstat::minmax(), minmax_index(), mul(), gsl::linalg::pcholesky_decomp2(), gsl::linalg::pcholesky_rcond(), gsl::linalg::pcholesky_solve(), gsl::linalg::pcholesky_solve2(), gsl::linalg::pcholesky_svx(), gsl::linalg::pcholesky_svx2(), 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::movstat::workspace::Qn(), gsl::movstat::Qn(), gsl::movstat::workspace::qqr(), gsl::movstat::qqr(), 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_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_lssolve(), gsl::linalg::QR_unpack(), gsl::linalg::QR_update(), gsl::linalg::QR_UU_lssolve(), gsl::linalg::QR_UU_QTvec(), gsl::linalg::QRPT_decomp(), gsl::linalg::QRPT_decomp2(), gsl::linalg::QRPT_lssolve(), gsl::linalg::QRPT_lssolve2(), gsl::linalg::QRPT_QRsolve(), 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::multiroot::test::residual(), reverse(), gsl::filter::rmedian(), gsl::multifit::robust(), gsl::multifit::robust_est(), gsl::multifit::robust_residuals(), gsl::multifit::robust_weights(), scale(), gsl::spmatrix::scale_columns(), gsl::matrix::scale_columns(), gsl::spmatrix::scale_rows(), gsl::matrix::scale_rows(), gsl::movstat::workspace::sd(), gsl::movstat::sd(), gsl::multimin::fdfminimizer::set(), gsl::multimin::fminimizer::set(), set(), set_all(), set_basis(), gsl::matrix::set_col(), gsl::matrix::set_row(), set_zero(), gsl::movstat::workspace::Sn(), gsl::movstat::Sn(), gsl::multilarge::linear::solve(), gsl::linalg::solve_cyc_tridiag(), gsl::linalg::solve_symm_cyc_tridiag(), gsl::linalg::solve_symm_tridiag(), gsl::linalg::solve_tridiag(), gsl::multilarge::linear::stdform1(), gsl::multilarge::linear::stdform2(), sub(), subvector(), subvector_with_stride(), gsl::movstat::workspace::sum(), gsl::movstat::sum(), gsl::linalg::SV_decomp(), gsl::linalg::SV_decomp_jacobi(), gsl::linalg::SV_decomp_mod(), gsl::linalg::SV_leverage(), gsl::linalg::SV_solve(), swap_elements(), gsl::linalg::symmtd_decomp(), gsl::linalg::symmtd_unpack(), gsl::linalg::symmtd_unpack_T(), gsl::linalg::tri_lower_rcond(), gsl::linalg::tri_rcond(), gsl::linalg::tri_upper_rcond(), gsl::movstat::workspace::variance(), gsl::movstat::variance(), vector(), gsl::permute::vector_forward(), gsl::permute::vector_inverse(), gsl::matrix::view_vector(), gsl::matrix::view_vector_with_tda(), gsl::multifit::nlinear::winit(), gsl::multilarge::nlinear::workspace::winit(), gsl::multilarge::nlinear::winit(), 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_vector.
Definition at line 1325 of file vector.hpp.
References ccgsl_pointer.
|
inlinestatic |
C++ version of get().
Use this if you have a gsl_vector* and want to get the ith element.
| v | A gsl_vector* |
| i | the index of an entry of v |
Definition at line 1890 of file vector.hpp.
|
inline |
C++ version of gsl_vector_get().
| i | index of element to get |
Definition at line 1508 of file vector.hpp.
References get().
Referenced by get().
|
inline |
C++ version of gsl_vector_isneg().
+1 or 0 according as elements are all negative or not Definition at line 1497 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_isnonneg().
+1 or 0 according as elements are all nonnegative or not Definition at line 1502 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_isnull().
+1 or 0 according as elements are all zero or not Definition at line 1487 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_ispos().
+1 or 0 according as elements are all positive or not Definition at line 1492 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_max().
Definition at line 1393 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_max_index().
Definition at line 1410 of file vector.hpp.
References get().
|
inline |
The max size (number of elements) of the vector.
Identical to size but required for a container.
Definition at line 1204 of file vector.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_vector_memcpy().
| src | source vector |
Definition at line 1375 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_min().
Definition at line 1398 of file vector.hpp.
References get().
Referenced by operator<(), and operator>().
|
inline |
C++ version of gsl_vector_min_index().
Definition at line 1415 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_minmax().
| min_out | minimum element of vector |
| max_out | maximum element of vector |
Definition at line 1404 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_minmax_index().
| imin | index of minimum value of vector |
| imax | index of maximum value of vector |
Definition at line 1428 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_minmax_index().
| imin | index of minimum value of vector |
| imax | index of maximum value of vector |
Definition at line 1421 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_mul().
| b | vector to multiply elementwise with this |
Definition at line 1447 of file vector.hpp.
References gsl::sf::mathieu::b(), and get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_vector Definition at line 1345 of file vector.hpp.
References ccgsl_pointer.
|
inline |
Two vector objects are different equal if their elements are not identical.
| v | The vector to be compared with this |
false or true according as this and v have identical elements or not Definition at line 335 of file vector.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 vector is nonnegative.
| v | The vector to be compared with this |
false or true according as this is less than v lexicographically Definition at line 347 of file vector.hpp.
References ccgsl_pointer, min(), and size().
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 vector is nonnegative.
| v | The vector to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 401 of file vector.hpp.
References operator<(), and operator==().
Move operator.
| v | The vector to move. |
Definition at line 323 of file vector.hpp.
References vector().
The assignment operator.
This makes a shared copy.
| v | The vector to copy |
Definition at line 190 of file vector.hpp.
References ccgsl_pointer, count, and owns_data.
|
inline |
Two vector objects are identically equal if their elements are identical.
| v | The vector to be compared with this |
true or false according as this and v have identical elements or not Definition at line 292 of file vector.hpp.
References ccgsl_pointer.
Referenced by operator!=(), operator<=(), and 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 vector is nonnegative.
| v | The vector to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 374 of file vector.hpp.
References ccgsl_pointer, min(), and size().
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 vector is nonnegative.
| v | The vector to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 413 of file vector.hpp.
References operator==(), and operator>().
|
inline |
Get element at position n by reference ([] operator).
| n | The position of the element |
Definition at line 1260 of file vector.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, gsl::rstat::n(), and size().
|
inline |
Get element at position n by reference ([] operator).
| n | The position of the element |
Definition at line 1283 of file vector.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, gsl::rstat::n(), and size().
|
inline |
C++ version of gsl_vector_ptr().
| i | index of element to get |
Definition at line 1520 of file vector.hpp.
References get().
|
inline |
Get iterator pointing to first vector element.
Definition at line 1227 of file vector.hpp.
References ccgsl_pointer, and size().
|
inline |
Get iterator pointing to first vector element.
Definition at line 1235 of file vector.hpp.
References ccgsl_pointer, and size().
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 1244 of file vector.hpp.
|
inline |
Get iterator pointing beyond last vector element.
Definition at line 1251 of file vector.hpp.
|
inline |
Stop sharing ownership of the shared pointer.
Definition at line 307 of file vector.hpp.
References vector().
|
inline |
C++ version of gsl_vector_reverse().
Definition at line 1380 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_scale().
| x | constant to multiply this by |
Definition at line 1459 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_set().
| i | index to set |
| x | new value for element |
Definition at line 1514 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_set_all().
| x | The value to which all elements are set |
Definition at line 1363 of file vector.hpp.
References get().
|
inline |
C++ version of gsl_vector_set_basis().
Creates a basis vector with one nonzero element.
| i | The element to be set to 1. |
Definition at line 1369 of file vector.hpp.
References get().
|
inline |
|
inline |
The size (number of elements) of the vector.
Definition at line 1169 of file vector.hpp.
References ccgsl_pointer.
Referenced by clone(), end(), gsl::movstat::fill(), operator<(), operator>(), operator[](), rbegin(), gsl::fft::halfcomplex::unpack(), and gsl::fft::real::unpack().
|
inline |
C++ version of gsl_vector_sub().
| b | vector to subtract from this |
Definition at line 1441 of file vector.hpp.
References gsl::sf::mathieu::b(), and get().
|
inline |
C++ version of gsl_vector_subvector().
| i | The offset |
| n | The size |
Definition at line 1676 of file vector.hpp.
References get(), gsl::rstat::n(), and vector().
|
inline |
C++ version of gsl_vector_subvectorwith_stride().
| i | The offset |
| stride | The stride |
| n | The size |
Definition at line 1690 of file vector.hpp.
References get(), gsl::rstat::n(), and vector().
|
inline |
C++ version of gsl_vector_sum().
| a | The vector |
Definition at line 1482 of file vector.hpp.
References gsl::sf::mathieu::a().
|
inline |
Swap two vector objects.
This works even if the vector objects have different sizes because it swaps pointers.
| v | The vector to swap with this. |
Definition at line 1217 of file vector.hpp.
References ccgsl_pointer, and count.
|
inline |
C++ version of gsl_vector_swap_elements().
| i | first element |
| j | second element |
Definition at line 1387 of file vector.hpp.
References get().
|
inline |
Find if this is the only object sharing the gsl_vector.
true or falses according as this is the only vector object sharing the gsl_vector Definition at line 1331 of file vector.hpp.
References count.
|
inline |
Find how many vector objects share this pointer.
Definition at line 1336 of file vector.hpp.
References count.
|
inlinestatic |
C++ version of gsl_vector_view_array().
| v | An array of double |
| n | The size of the vector: the default gives access to the whole array |
Definition at line 1762 of file vector.hpp.
References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().
|
inlinestatic |
C++ version of gsl_vector_view_array().
| v | An array of type double |
| n | The size of the vector |
Definition at line 1593 of file vector.hpp.
References gsl::rstat::n(), and vector().
|
inlinestatic |
C++ version of gsl_vector_view_array_with_stride().
| base | An array of type double |
| stride | The stride |
| n | The size of the vector: the default gives access to the whole array |
Definition at line 1781 of file vector.hpp.
References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().
|
inlinestatic |
C++ version of gsl_vector_view_array_with_stride().
| base | An array of type double |
| stride | The stride |
| n | The size of the vector |
Definition at line 1606 of file vector.hpp.
References gsl::rstat::n(), and vector().
Referenced by gsl::vector_complex::imag(), and gsl::vector_complex::real().
|
inline |
This function is intended mainly for internal use.
It allows this to point to a gsl_vector 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::vector* argument to one that takes a gsl_vector* argument.
| v | The gsl_vector |
Definition at line 272 of file vector.hpp.
References ccgsl_pointer, count, and owns_data.
Referenced by gsl::multimin::fdfminimizer::dx(), gsl::multimin::fdfminimizer::gradient(), gsl::bspline::workspace::knots(), gsl::matrix::operator[](), gsl::multimin::fdfminimizer::x(), and gsl::multimin::fminimizer::x().
|
friend |
Definition at line 77 of file vector.hpp.
|
friend |
Definition at line 78 of file vector.hpp.
|
friend |
Definition at line 81 of file vector.hpp.
|
friend |
Definition at line 82 of file vector.hpp.
|
friend |
Definition at line 75 of file vector.hpp.
|
friend |
Definition at line 76 of file vector.hpp.
|
friend |
Definition at line 79 of file vector.hpp.
|
friend |
Definition at line 80 of file vector.hpp.
|
private |
The shared pointer.
Definition at line 1309 of file vector.hpp.
Referenced by data(), empty(), end(), get(), max_size(), operator bool(), gsl::vector_char::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_int::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_long::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_long_double::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_short::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_uchar::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_uint::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator*(), gsl::vector_ushort::iterator_base< container, content, reverse_t >::operator*(), gsl::vector::iterator_t< reverse_t >::operator-(), gsl::vector::const_iterator_t< reverse_t >::operator-(), gsl::vector_char::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_int::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_long::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_long_double::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_short::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_uchar::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_uint::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator->(), gsl::vector_ushort::iterator_base< container, content, reverse_t >::operator->(), gsl::vector::iterator_t< reverse_t >::operator<(), gsl::vector::const_iterator_t< reverse_t >::operator<(), operator<(), operator=(), operator==(), operator>(), operator[](), rbegin(), size(), swap(), vector(), wrap_gsl_vector_without_ownership(), and ~vector().
|
private |
The shared reference count.
Definition at line 1313 of file vector.hpp.
Referenced by operator=(), swap(), unique(), use_count(), vector(), wrap_gsl_vector_without_ownership(), and ~vector().
|
private |
Used to allow a vector that does not own its data.
Definition at line 1305 of file vector.hpp.
Referenced by operator=(), vector(), wrap_gsl_vector_without_ownership(), and ~vector().