ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::vector Class Reference

This class handles vector objects as shared handles. More...

#include <vector.hpp>

Inheritance diagram for gsl::vector:
Inheritance graph
Collaboration diagram for gsl::vector:
Collaboration graph

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_typereference
 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_typepointer
 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...
 
vectoroperator= (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...
 
vectoroperator= (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
 

Detailed Description

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.

Member Typedef Documentation

◆ const_iterator

The const_iterator type.

Definition at line 1109 of file vector.hpp.

◆ const_pointer

A container must have a constant pointer type.

Definition at line 441 of file vector.hpp.

◆ const_reference

A container must have a constant reference type.

Definition at line 431 of file vector.hpp.

◆ const_reverse_iterator

The const_reverse_t type.

Definition at line 1117 of file vector.hpp.

◆ difference_type

A container must have a difference_type.

Definition at line 1126 of file vector.hpp.

◆ iterator

The iterator type.

Definition at line 1113 of file vector.hpp.

◆ pointer

A container must have a pointer type.

Definition at line 436 of file vector.hpp.

◆ reference

A container must have a reference type.

Definition at line 426 of file vector.hpp.

◆ reverse_iterator

The reverse_iterator type.

Definition at line 1121 of file vector.hpp.

◆ size_type

typedef size_t gsl::vector::size_type

A container must have a size_type.

Definition at line 1131 of file vector.hpp.

◆ value_type

typedef double gsl::vector::value_type

A container must have a value_type.

Definition at line 421 of file vector.hpp.

Constructor & Destructor Documentation

◆ vector() [1/10]

◆ vector() [2/10]

gsl::vector::vector ( size_t const  n)
inlineexplicit

The default constructor creates a new vector with n elements.

Parameters
nThe number of elements in the vector

Definition at line 98 of file vector.hpp.

References ccgsl_pointer, count, and gsl::rstat::n().

◆ vector() [3/10]

gsl::vector::vector ( gsl_vector *  v)
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.

Parameters
vThe vector

Definition at line 138 of file vector.hpp.

References ccgsl_pointer, and count.

◆ vector() [4/10]

gsl::vector::vector ( std::initializer_list< double >  initializer_list)
inline

Could construct from a std::initializer_list in C++11.

Parameters
initializer_listThe initializer_list.

Definition at line 150 of file vector.hpp.

References begin(), ccgsl_pointer, count, and gsl::rstat::n().

◆ vector() [5/10]

gsl::vector::vector ( vector const &  v)
inline

The copy constructor.

This shares the vector. Use clone() if you want a full copy.

Parameters
vThe vector to copy.

Definition at line 172 of file vector.hpp.

References count.

◆ vector() [6/10]

gsl::vector::vector ( vector v)
inline

The copy constructor.

This shares the vector. Use clone() if you want a full copy.

Parameters
vThe vector to copy.

Definition at line 180 of file vector.hpp.

References count.

◆ vector() [7/10]

template<typename V >
gsl::vector::vector ( V &  v,
size_t const  stride = 1 
)
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.

Parameters
vThe object that you want this to share data with.
strideThe stride.

Definition at line 217 of file vector.hpp.

References ccgsl_pointer, count, and gsl::rstat::n().

◆ ~vector()

gsl::vector::~vector ( )
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.

◆ vector() [8/10]

gsl::vector::vector ( vector &&  v)
inline

Move constructor.

Parameters
vThe vector to move.

Definition at line 313 of file vector.hpp.

References count.

◆ vector() [9/10]

gsl::vector::vector ( block b,
size_t const  offset,
size_t const  n,
size_t const  stride = 1 
)
inline

C++ version of gsl_vector_alloc_from_block().

Parameters
bThe block
offsetThe offset within the block
nThe number of elements
strideThe stride

Definition at line 1560 of file vector.hpp.

References gsl::sf::mathieu::b(), ccgsl_pointer, count, and gsl::rstat::n().

◆ vector() [10/10]

gsl::vector::vector ( vector v,
size_t const  offset,
size_t const  n,
size_t const  stride = 1 
)
inline

C++ version of gsl_vector_alloc_from_vector().

Parameters
vThe vector
offsetThe offset
nThe number of elements
strideThe stride

Definition at line 1577 of file vector.hpp.

References ccgsl_pointer, count, get(), and gsl::rstat::n().

Member Function Documentation

◆ add()

int gsl::vector::add ( vector const &  b)
inline

C++ version of gsl_vector_add().

Parameters
bvector to add to this
Returns
error code on failure

Definition at line 1435 of file vector.hpp.

References gsl::sf::mathieu::b(), and get().

◆ add_constant()

int gsl::vector::add_constant ( double const  x)
inline

C++ version of gsl_vector_add_constant().

Parameters
xconstant to add to each element of this
Returns
error code on failure

Definition at line 1465 of file vector.hpp.

References get().

◆ alloc_col_from_matrix()

static vector gsl::vector::alloc_col_from_matrix ( matrix m,
size_t const  j 
)
static

C++ version of gsl_vector_alloc_col_from_matrix().

Parameters
mA matrix
jA column
Returns
A vector

◆ alloc_row_from_matrix()

static vector gsl::vector::alloc_row_from_matrix ( matrix m,
size_t const  i 
)
static

C++ version of gsl_vector_alloc_row_from_matrix().

Parameters
mA matrix
iA row
Returns
A vector

◆ axpby()

int gsl::vector::axpby ( double const  alpha,
vector const &  x,
double const  beta 
)
inline

C++ version of gsl_vector_axpby().

Parameters
alphaconstant to multiply x by
xanother vector
betaconstant to multiply this by
Returns
alpha * x + beta * this

Definition at line 1473 of file vector.hpp.

References gsl::ran::beta(), and get().

◆ begin() [1/2]

iterator gsl::vector::begin ( )
inline

Get iterator pointing to first vector element.

Returns
iterator pointing to first vector element

Definition at line 1137 of file vector.hpp.

Referenced by vector().

◆ begin() [2/2]

const_iterator gsl::vector::begin ( ) const
inline

Get iterator pointing to first vector element.

Returns
iterator pointing to first vector element

Definition at line 1144 of file vector.hpp.

◆ calloc()

static vector gsl::vector::calloc ( size_t const  n)
inlinestatic

C++ version of gsl_vector_calloc().

This constructs a vector object with entries initialised to zero.

Parameters
nThe size of the vector
Returns
A vector initialised to zero

Definition at line 1354 of file vector.hpp.

References gsl::rstat::n(), and vector().

◆ clone()

vector gsl::vector::clone ( ) const
inline

The clone function.

Use this if you want a copy of the block that does not share the underlying data.

Returns
a new copy of this.

Definition at line 241 of file vector.hpp.

References get(), and size().

◆ const_ptr()

double const * gsl::vector::const_ptr ( size_t const  i) const
inline

C++ version of gsl_vector_const_ptr().

Parameters
iindex of element to get
Returns
pointer to element

Definition at line 1526 of file vector.hpp.

References get().

◆ const_subvector()

vector const gsl::vector::const_subvector ( size_t  i,
size_t  n 
) const
inline

C++ version of gsl_vector_const_subvector().

Parameters
iThe offset
nThe size
Returns
A subvector

Definition at line 1703 of file vector.hpp.

References get(), gsl::rstat::n(), and vector().

◆ const_subvector_with_stride()

vector const gsl::vector::const_subvector_with_stride ( size_t  i,
size_t  stride,
size_t  n 
) const
inline

C++ version of gsl_vector_const_subvector_with_stride().

Parameters
iThe offset
strideThe stride
nThe size
Returns
A subvector

Definition at line 1717 of file vector.hpp.

References get(), gsl::rstat::n(), and vector().

◆ const_view_array() [1/2]

template<typename ARRAY >
static vector const gsl::vector::const_view_array ( ARRAY const &  v,
size_t  n = 0 
)
inlinestatic

C++ version of gsl_vector _const_view_array().

Parameters
vAn array of type double
nThe size of the vector: the default gives access to the whole array
Returns
A vector

Definition at line 1799 of file vector.hpp.

References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().

◆ const_view_array() [2/2]

static vector const gsl::vector::const_view_array ( double const *  v,
size_t  n 
)
inlinestatic

C++ version of gsl_vector _const_view_array().

Parameters
vAn array of type double
nThe size of the vector
Returns
A vector

Definition at line 1619 of file vector.hpp.

References gsl::rstat::n(), and vector().

◆ const_view_array_with_stride() [1/2]

template<typename ARRAY >
static vector const gsl::vector::const_view_array_with_stride ( ARRAY const &  base,
size_t  stride,
size_t  n = 0 
)
inlinestatic

C++ version of gsl_vector_const_view_array_with_stride().

Parameters
baseAn array of type double
strideThe stride
nThe size of the vector: the default gives access to the whole array
Returns
A vector

Definition at line 1818 of file vector.hpp.

References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().

◆ const_view_array_with_stride() [2/2]

static vector const gsl::vector::const_view_array_with_stride ( double const *  base,
size_t  stride,
size_t  n 
)
inlinestatic

C++ version of gsl_vector_const_view_array_with_stride().

Parameters
baseAn array of type double
strideThe stride
nThe size of the vector
Returns
A 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().

◆ data() [1/2]

double * gsl::vector::data ( )
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.

Returns
The data block.

Definition at line 1177 of file vector.hpp.

References ccgsl_pointer.

Referenced by gsl::fft::halfcomplex::unpack(), and gsl::fft::real::unpack().

◆ data() [2/2]

double const * gsl::vector::data ( ) const
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.

Returns
The data block.

Definition at line 1191 of file vector.hpp.

References ccgsl_pointer.

◆ div()

int gsl::vector::div ( vector const &  b)
inline

C++ version of gsl_vector_div().

Parameters
bvector to dividev this by elementwise
Returns
error code on failure

Definition at line 1453 of file vector.hpp.

References gsl::sf::mathieu::b(), and get().

◆ empty()

bool gsl::vector::empty ( ) const
inline

Find if the vector is empty.

Returns
true if has size zero; otherwise false

Definition at line 1210 of file vector.hpp.

References ccgsl_pointer.

◆ end() [1/2]

iterator gsl::vector::end ( )
inline

Get iterator pointing beyond last vector element.

Returns
iterator pointing beyond last vector element

Definition at line 1152 of file vector.hpp.

References ccgsl_pointer, and size().

◆ end() [2/2]

const_iterator gsl::vector::end ( ) const
inline

Get iterator pointing beyond last vector element.

Returns
iterator pointing beyond last vector element

Definition at line 1160 of file vector.hpp.

References ccgsl_pointer, and size().

◆ fprintf()

int gsl::vector::fprintf ( FILE *  stream,
char const *  format 
) const
inline

C++ version of gsl_vector_fprintf().

Parameters
streamA C file stream
formatd, e, f or g
Returns
error code on failure

Definition at line 1551 of file vector.hpp.

References get().

◆ fread()

int gsl::vector::fread ( FILE *  stream)
inline

C++ version of gsl_vector_fread().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1532 of file vector.hpp.

References get().

◆ fscanf()

int gsl::vector::fscanf ( FILE *  stream)
inline

C++ version of gsl_vector_fscanf().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1544 of file vector.hpp.

References get().

◆ fwrite()

int gsl::vector::fwrite ( FILE *  stream) const
inline

C++ version of gsl_vector_fwrite().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1538 of file vector.hpp.

References get().

◆ get() [1/4]

gsl_vector * gsl::vector::get ( )
inline

Get the gsl_vector.

Returns
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().

◆ get() [2/4]

gsl_vector const * gsl::vector::get ( ) const
inline

Get the gsl_vector.

Returns
the gsl_vector

Definition at line 1325 of file vector.hpp.

References ccgsl_pointer.

◆ get() [3/4]

static double gsl::vector::get ( gsl_vector const *  v,
size_t const  i 
)
inlinestatic

C++ version of get().

Use this if you have a gsl_vector* and want to get the ith element.

Parameters
vA gsl_vector*
ithe index of an entry of v
Returns
the ith entry of v

Definition at line 1890 of file vector.hpp.

◆ get() [4/4]

double gsl::vector::get ( size_t const  i) const
inline

C++ version of gsl_vector_get().

Parameters
iindex of element to get
Returns
value of element

Definition at line 1508 of file vector.hpp.

References get().

Referenced by get().

◆ isneg()

int gsl::vector::isneg ( ) const
inline

C++ version of gsl_vector_isneg().

Returns
+1 or 0 according as elements are all negative or not

Definition at line 1497 of file vector.hpp.

References get().

◆ isnonneg()

int gsl::vector::isnonneg ( ) const
inline

C++ version of gsl_vector_isnonneg().

Returns
+1 or 0 according as elements are all nonnegative or not

Definition at line 1502 of file vector.hpp.

References get().

◆ isnull()

int gsl::vector::isnull ( ) const
inline

C++ version of gsl_vector_isnull().

Returns
+1 or 0 according as elements are all zero or not

Definition at line 1487 of file vector.hpp.

References get().

◆ ispos()

int gsl::vector::ispos ( ) const
inline

C++ version of gsl_vector_ispos().

Returns
+1 or 0 according as elements are all positive or not

Definition at line 1492 of file vector.hpp.

References get().

◆ max()

double gsl::vector::max ( ) const
inline

C++ version of gsl_vector_max().

Returns
maximum element of vector

Definition at line 1393 of file vector.hpp.

References get().

◆ max_index()

size_t gsl::vector::max_index ( ) const
inline

C++ version of gsl_vector_max_index().

Returns
index of maximum value of vector

Definition at line 1410 of file vector.hpp.

References get().

◆ max_size()

size_type gsl::vector::max_size ( ) const
inline

The max size (number of elements) of the vector.

Identical to size but required for a container.

Returns
The size of the vector

Definition at line 1204 of file vector.hpp.

References ccgsl_pointer.

◆ memcpy()

int gsl::vector::memcpy ( vector const &  src)
inline

C++ version of gsl_vector_memcpy().

Parameters
srcsource vector
Returns
error code on failure

Definition at line 1375 of file vector.hpp.

References get().

◆ min()

double gsl::vector::min ( ) const
inline

C++ version of gsl_vector_min().

Returns
minimum element of vector

Definition at line 1398 of file vector.hpp.

References get().

Referenced by operator<(), and operator>().

◆ min_index()

size_t gsl::vector::min_index ( ) const
inline

C++ version of gsl_vector_min_index().

Returns
index of minimum value of vector

Definition at line 1415 of file vector.hpp.

References get().

◆ minmax()

void gsl::vector::minmax ( double *  min_out,
double *  max_out 
) const
inline

C++ version of gsl_vector_minmax().

Parameters
min_outminimum element of vector
max_outmaximum element of vector

Definition at line 1404 of file vector.hpp.

References get().

◆ minmax_index() [1/2]

void gsl::vector::minmax_index ( size_t &  imin,
size_t &  imax 
) const
inline

C++ version of gsl_vector_minmax_index().

Parameters
iminindex of minimum value of vector
imaxindex of maximum value of vector

Definition at line 1428 of file vector.hpp.

References get().

◆ minmax_index() [2/2]

void gsl::vector::minmax_index ( size_t *  imin,
size_t *  imax 
) const
inline

C++ version of gsl_vector_minmax_index().

Parameters
iminindex of minimum value of vector
imaxindex of maximum value of vector

Definition at line 1421 of file vector.hpp.

References get().

◆ mul()

int gsl::vector::mul ( vector const &  b)
inline

C++ version of gsl_vector_mul().

Parameters
bvector to multiply elementwise with this
Returns
error code on failure

Definition at line 1447 of file vector.hpp.

References gsl::sf::mathieu::b(), and get().

◆ operator bool()

gsl::vector::operator bool ( ) const
inlineexplicit

Allow conversion to bool.

Returns
true or false according as this contains a pointer to a gsl_vector

Definition at line 1345 of file vector.hpp.

References ccgsl_pointer.

◆ operator!=()

bool gsl::vector::operator!= ( vector const &  v) const
inline

Two vector objects are different equal if their elements are not identical.

Parameters
vThe vector to be compared with this
Returns
false or true according as this and v have identical elements or not

Definition at line 335 of file vector.hpp.

References operator==().

◆ operator<()

bool gsl::vector::operator< ( vector const &  v) const
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.

Parameters
vThe vector to be compared with this
Returns
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<=().

◆ operator<=()

bool gsl::vector::operator<= ( vector const &  v) const
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.

Parameters
vThe vector to be compared with this
Returns
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==().

◆ operator=() [1/2]

vector & gsl::vector::operator= ( vector &&  v)
inline

Move operator.

Parameters
vThe vector to move.
Returns
A reference to this.

Definition at line 323 of file vector.hpp.

References vector().

◆ operator=() [2/2]

vector & gsl::vector::operator= ( vector const &  v)
inline

The assignment operator.

This makes a shared copy.

Parameters
vThe vector to copy

Definition at line 190 of file vector.hpp.

References ccgsl_pointer, count, and owns_data.

◆ operator==()

bool gsl::vector::operator== ( vector const &  v) const
inline

Two vector objects are identically equal if their elements are identical.

Parameters
vThe vector to be compared with this
Returns
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>=().

◆ operator>()

bool gsl::vector::operator> ( vector const &  v) const
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.

Parameters
vThe vector to be compared with this
Returns
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>=().

◆ operator>=()

bool gsl::vector::operator>= ( vector const &  v) const
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.

Parameters
vThe vector to be compared with this
Returns
false or true according as this is no less than v lexicographically

Definition at line 413 of file vector.hpp.

References operator==(), and operator>().

◆ operator[]() [1/2]

double & gsl::vector::operator[] ( size_t const  n)
inline

Get element at position n by reference ([] operator).

Parameters
nThe position of the element
Returns
a reference to a double

Definition at line 1260 of file vector.hpp.

References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, gsl::rstat::n(), and size().

◆ operator[]() [2/2]

double const & gsl::vector::operator[] ( size_t const  n) const
inline

Get element at position n by reference ([] operator).

Parameters
nThe position of the element
Returns
a reference to a double

Definition at line 1283 of file vector.hpp.

References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, gsl::rstat::n(), and size().

◆ ptr()

double * gsl::vector::ptr ( size_t const  i)
inline

C++ version of gsl_vector_ptr().

Parameters
iindex of element to get
Returns
pointer to element

Definition at line 1520 of file vector.hpp.

References get().

◆ rbegin() [1/2]

reverse_iterator gsl::vector::rbegin ( )
inline

Get iterator pointing to first vector element.

Returns
iterator pointing to first vector element

Definition at line 1227 of file vector.hpp.

References ccgsl_pointer, and size().

◆ rbegin() [2/2]

const_reverse_iterator gsl::vector::rbegin ( ) const
inline

Get iterator pointing to first vector element.

Returns
iterator pointing to first vector element

Definition at line 1235 of file vector.hpp.

References ccgsl_pointer, and size().

◆ rend() [1/2]

reverse_iterator gsl::vector::rend ( )
inline

Get iterator pointing beyond last vector element.

Returns
iterator pointing beyond last vector element

Definition at line 1244 of file vector.hpp.

◆ rend() [2/2]

const_reverse_iterator gsl::vector::rend ( ) const
inline

Get iterator pointing beyond last vector element.

Returns
iterator pointing beyond last vector element

Definition at line 1251 of file vector.hpp.

◆ reset()

void gsl::vector::reset ( )
inline

Stop sharing ownership of the shared pointer.

Definition at line 307 of file vector.hpp.

References vector().

◆ reverse()

int gsl::vector::reverse ( )
inline

C++ version of gsl_vector_reverse().

Returns
error code on failure

Definition at line 1380 of file vector.hpp.

References get().

◆ scale()

int gsl::vector::scale ( double const  x)
inline

C++ version of gsl_vector_scale().

Parameters
xconstant to multiply this by
Returns
error code on failure

Definition at line 1459 of file vector.hpp.

References get().

◆ set()

void gsl::vector::set ( size_t const  i,
double  x 
)
inline

C++ version of gsl_vector_set().

Parameters
iindex to set
xnew value for element

Definition at line 1514 of file vector.hpp.

References get().

◆ set_all()

void gsl::vector::set_all ( double  x)
inline

C++ version of gsl_vector_set_all().

Parameters
xThe value to which all elements are set

Definition at line 1363 of file vector.hpp.

References get().

◆ set_basis()

int gsl::vector::set_basis ( size_t  i)
inline

C++ version of gsl_vector_set_basis().

Creates a basis vector with one nonzero element.

Parameters
iThe element to be set to 1.
Returns
error code on failure

Definition at line 1369 of file vector.hpp.

References get().

◆ set_zero()

void gsl::vector::set_zero ( )
inline

C++ version of gsl_vector_set_zero().

Definition at line 1358 of file vector.hpp.

References get().

◆ size()

size_type gsl::vector::size ( ) const
inline

The size (number of elements) of the vector.

Returns
The size 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().

◆ sub()

int gsl::vector::sub ( vector const &  b)
inline

C++ version of gsl_vector_sub().

Parameters
bvector to subtract from this
Returns
error code on failure

Definition at line 1441 of file vector.hpp.

References gsl::sf::mathieu::b(), and get().

◆ subvector()

vector gsl::vector::subvector ( size_t  i,
size_t  n 
)
inline

C++ version of gsl_vector_subvector().

Parameters
iThe offset
nThe size
Returns
A subvector

Definition at line 1676 of file vector.hpp.

References get(), gsl::rstat::n(), and vector().

◆ subvector_with_stride()

vector gsl::vector::subvector_with_stride ( size_t  i,
size_t  stride,
size_t  n 
)
inline

C++ version of gsl_vector_subvectorwith_stride().

Parameters
iThe offset
strideThe stride
nThe size
Returns
A subvector

Definition at line 1690 of file vector.hpp.

References get(), gsl::rstat::n(), and vector().

◆ sum()

double gsl::vector::sum ( vector const &  a) const
inline

C++ version of gsl_vector_sum().

Parameters
aThe vector
Returns
The sum of the elements

Definition at line 1482 of file vector.hpp.

References gsl::sf::mathieu::a().

◆ swap()

void gsl::vector::swap ( vector v)
inline

Swap two vector objects.

This works even if the vector objects have different sizes because it swaps pointers.

Parameters
vThe vector to swap with this.

Definition at line 1217 of file vector.hpp.

References ccgsl_pointer, and count.

◆ swap_elements()

int gsl::vector::swap_elements ( size_t const  i,
size_t const  j 
)
inline

C++ version of gsl_vector_swap_elements().

Parameters
ifirst element
jsecond element
Returns
error code on failure

Definition at line 1387 of file vector.hpp.

References get().

◆ unique()

bool gsl::vector::unique ( ) const
inline

Find if this is the only object sharing the gsl_vector.

Returns
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.

◆ use_count()

size_t gsl::vector::use_count ( ) const
inline

Find how many vector objects share this pointer.

Returns
the number of vector objects that share this pointer

Definition at line 1336 of file vector.hpp.

References count.

◆ view_array() [1/2]

template<typename ARRAY >
static vector gsl::vector::view_array ( ARRAY &  v,
size_t  n = 0 
)
inlinestatic

C++ version of gsl_vector_view_array().

Parameters
vAn array of double
nThe size of the vector: the default gives access to the whole array
Returns
A vector

Definition at line 1762 of file vector.hpp.

References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().

◆ view_array() [2/2]

static vector gsl::vector::view_array ( double *  v,
size_t  n 
)
inlinestatic

C++ version of gsl_vector_view_array().

Parameters
vAn array of type double
nThe size of the vector
Returns
A vector

Definition at line 1593 of file vector.hpp.

References gsl::rstat::n(), and vector().

◆ view_array_with_stride() [1/2]

template<typename ARRAY >
static vector gsl::vector::view_array_with_stride ( ARRAY &  base,
size_t  stride,
size_t  n = 0 
)
inlinestatic

C++ version of gsl_vector_view_array_with_stride().

Parameters
baseAn array of type double
strideThe stride
nThe size of the vector: the default gives access to the whole array
Returns
A vector

Definition at line 1781 of file vector.hpp.

References gsl::exception::GSL_EBADLEN, gsl::rstat::n(), and vector().

◆ view_array_with_stride() [2/2]

static vector gsl::vector::view_array_with_stride ( double *  base,
size_t  stride,
size_t  n 
)
inlinestatic

C++ version of gsl_vector_view_array_with_stride().

Parameters
baseAn array of type double
strideThe stride
nThe size of the vector
Returns
A 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().

◆ wrap_gsl_vector_without_ownership()

void gsl::vector::wrap_gsl_vector_without_ownership ( gsl_vector *  v)
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.

Parameters
vThe 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().

Friends And Related Function Documentation

◆ multifit::function

friend class multifit::function
friend

Definition at line 77 of file vector.hpp.

◆ multifit::function_fdf

friend class multifit::function_fdf
friend

Definition at line 78 of file vector.hpp.

◆ multifit::nlinear::function_fdf

friend class multifit::nlinear::function_fdf
friend

Definition at line 81 of file vector.hpp.

◆ multilarge::nlinear::function_fdf

friend class multilarge::nlinear::function_fdf
friend

Definition at line 82 of file vector.hpp.

◆ multimin::function

friend class multimin::function
friend

Definition at line 75 of file vector.hpp.

◆ multimin::function_fdf

friend class multimin::function_fdf
friend

Definition at line 76 of file vector.hpp.

◆ multiroot::function

friend class multiroot::function
friend

Definition at line 79 of file vector.hpp.

◆ multiroot::function_fdf

friend class multiroot::function_fdf
friend

Definition at line 80 of file vector.hpp.

Member Data Documentation

◆ ccgsl_pointer

gsl_vector* gsl::vector::ccgsl_pointer
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().

◆ count

size_t* gsl::vector::count
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().

◆ owns_data

bool gsl::vector::owns_data
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().


The documentation for this class was generated from the following file: