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

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

#include <vector_long_double.hpp>

Inheritance diagram for gsl::vector_long_double:
Inheritance graph
Collaboration diagram for gsl::vector_long_double:
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 long 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_long_double ()
 The default constructor is only really useful for assigning to. More...
 
 vector_long_double (size_t const n)
 The default constructor creates a new vector_long_double with n elements. More...
 
 vector_long_double (gsl_vector_long_double *v)
 Could construct from a gsl_vector_long_double. More...
 
 vector_long_double (std::initializer_list< long double > initializer_list)
 Could construct from a std::initializer_list in C++11. More...
 
 vector_long_double (vector_long_double const &v)
 The copy constructor. More...
 
 vector_long_double (vector_long_double &v)
 The copy constructor. More...
 
vector_long_doubleoperator= (vector_long_double const &v)
 The assignment operator. More...
 
template<typename V >
 vector_long_double (V &v, size_t const stride=1)
 Construct from an object that implements data() and size(). More...
 
vector_long_double clone () const
 The clone function. More...
 
 ~vector_long_double ()
 The destructor only deletes the pointers if count reaches zero. More...
 
void wrap_gsl_vector_long_double_without_ownership (gsl_vector_long_double *v)
 This function is intended mainly for internal use. More...
 
bool operator== (vector_long_double const &v) const
 Two vector_long_double objects are identically equal if their elements are identical. More...
 
void reset ()
 Stop sharing ownership of the shared pointer. More...
 
 vector_long_double (vector_long_double &&v)
 Move constructor. More...
 
vector_long_doubleoperator= (vector_long_double &&v)
 Move operator. More...
 
bool operator!= (vector_long_double const &v) const
 Two vector_long_double objects are different equal if their elements are not identical. More...
 
bool operator< (vector_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator> (vector_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator<= (vector_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator>= (vector_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
iterator begin ()
 Get iterator pointing to first vector_long_double element. More...
 
const_iterator begin () const
 Get iterator pointing to first vector_long_double element. More...
 
iterator end ()
 Get iterator pointing beyond last vector_long_double element. More...
 
const_iterator end () const
 Get iterator pointing beyond last vector_long_double element. More...
 
size_type size () const
 The size (number of elements) of the vector_long_double. More...
 
long double * data ()
 Give access to the data block_long_double. More...
 
long double const * data () const
 Give access to the data block_long_double. More...
 
size_type max_size () const
 The max size (number of elements) of the vector_long_double. More...
 
bool empty () const
 Find if the vector_long_double is empty. More...
 
void swap (vector_long_double &v)
 Swap two vector_long_double objects. More...
 
reverse_iterator rbegin ()
 Get iterator pointing to first vector_long_double element. More...
 
const_reverse_iterator rbegin () const
 Get iterator pointing to first vector_long_double element. More...
 
reverse_iterator rend ()
 Get iterator pointing beyond last vector_long_double element. More...
 
const_reverse_iterator rend () const
 Get iterator pointing beyond last vector_long_double element. More...
 
long double & operator[] (size_t const n)
 Get element at position n by reference ([] operator). More...
 
long double const & operator[] (size_t const n) const
 Get element at position n by reference ([] operator). More...
 
gsl_vector_long_double * get ()
 Get the gsl_vector_long_double. More...
 
gsl_vector_long_double const * get () const
 Get the gsl_vector_long_double. More...
 
bool unique () const
 Find if this is the only object sharing the gsl_vector_long_double. More...
 
size_t use_count () const
 Find how many vector_long_double objects share this pointer. More...
 
 operator bool () const
 Allow conversion to bool. More...
 
void set_zero ()
 C++ version of gsl_vector_long_double_set_zero(). More...
 
void set_all (long double x)
 C++ version of gsl_vector_long_double_set_all(). More...
 
int set_basis (size_t i)
 C++ version of gsl_vector_long_double_set_basis(). More...
 
int memcpy (vector_long_double const &src)
 C++ version of gsl_vector_long_double_memcpy(). More...
 
int reverse ()
 C++ version of gsl_vector_long_double_reverse(). More...
 
int swap_elements (size_t const i, size_t const j)
 C++ version of gsl_vector_long_double_swap_elements(). More...
 
long double max () const
 C++ version of gsl_vector_long_double_max(). More...
 
long double min () const
 C++ version of gsl_vector_long_double_min(). More...
 
void minmax (long double *min_out, long double *max_out) const
 C++ version of gsl_vector_long_double_minmax(). More...
 
void minmax (long double &min_out, long double &max_out) const
 C++ version of gsl_vector_long_double_minmax(). More...
 
size_t max_index () const
 C++ version of gsl_vector_long_double_max_index(). More...
 
size_t min_index () const
 C++ version of gsl_vector_long_double_min_index(). More...
 
void minmax_index (size_t *imin, size_t *imax) const
 C++ version of gsl_vector_long_double_minmax_index(). More...
 
int add (vector_long_double const &b)
 C++ version of gsl_vector_long_double_add(). More...
 
int sub (vector_long_double const &b)
 C++ version of gsl_vector_long_double_sub(). More...
 
int mul (vector_long_double const &b)
 C++ version of gsl_vector_long_double_mul(). More...
 
int div (vector_long_double const &b)
 C++ version of gsl_vector_long_double_div(). More...
 
int scale (long double const x)
 C++ version of gsl_vector_long_double_scale(). More...
 
int add_constant (long double const x)
 C++ version of gsl_vector_long_double_add_constant(). More...
 
int axpby (long double const alpha, vector_long_double const &x, long double const beta)
 C++ version of gsl_vector_long_double_axpby(). More...
 
long double sum (vector_long_double const &a) const
 C++ version of gsl_vector_long_double_sum(). More...
 
int isnull () const
 C++ version of gsl_vector_long_double_isnull(). More...
 
int ispos () const
 C++ version of gsl_vector_long_double_ispos(). More...
 
int isneg () const
 C++ version of gsl_vector_long_double_isneg(). More...
 
int isnonneg () const
 C++ version of gsl_vector_long_double_isnonneg(). More...
 
long double get (size_t const i) const
 C++ version of gsl_vector_long_double_get(). More...
 
void set (size_t const i, long double x)
 C++ version of gsl_vector_long_double_set(). More...
 
long double * ptr (size_t const i)
 C++ version of gsl_vector_long_double_ptr(). More...
 
long double const * const_ptr (size_t const i) const
 C++ version of gsl_vector_long_double_const_ptr(). More...
 
int fread (FILE *stream)
 C++ version of gsl_vector_long_double_fread(). More...
 
int fwrite (FILE *stream) const
 C++ version of gsl_vector_long_double_fwrite(). More...
 
int fscanf (FILE *stream)
 C++ version of gsl_vector_long_double_fscanf(). More...
 
int fprintf (FILE *stream, char const *format) const
 C++ version of gsl_vector_long_double_fprintf(). More...
 
 vector_long_double (block_long_double &b, size_t const offset, size_t const n, size_t const stride=1)
 C++ version of gsl_vector_long_double_alloc_from_block(). More...
 
 vector_long_double (vector_long_double &v, size_t const offset, size_t const n, size_t const stride=1)
 C++ version of gsl_vector_long_double_alloc_from_vector(). More...
 
vector_long_double subvector (size_t i, size_t n)
 C++ version of gsl_vector_long_double_subvector(). More...
 
vector_long_double subvector_with_stride (size_t i, size_t stride, size_t n)
 C++ version of gsl_vector_long_double_subvector_with_stride(). More...
 
vector_long_double const const_subvector (size_t i, size_t n) const
 C++ version of gsl_vector_long_double_const_subvector(). More...
 
vector_long_double const const_subvector_with_stride (size_t i, size_t stride, size_t n) const
 C++ version of gsl_vector_long_double_const_subvector_with_stride(). More...
 

Static Public Member Functions

static vector_long_double calloc (size_t const n)
 C++ version of gsl_vector_long_double_calloc(). More...
 
static vector_long_double view_array (long double *v, size_t n)
 C++ version of gsl_vector_long_double_view_array(). More...
 
static vector_long_double view_array_with_stride (long double *base, size_t stride, size_t n)
 C++ version of gsl_vector_long_double_view_array_with_stride(). More...
 
static vector_long_double const const_view_array (long double const *v, size_t n)
 C++ version of gsl_vector_long_double _const_view_array(). More...
 
static vector_long_double const const_view_array_with_stride (long double const *base, size_t stride, size_t n)
 C++ version of gsl_vector_long_double_const_view_array_with_stride(). More...
 
template<typename ARRAY >
static vector_long_double view_array (ARRAY &v, size_t n=0)
 C++ version of gsl_vector_long_double_view_array(). More...
 
template<typename ARRAY >
static vector_long_double view_array_with_stride (ARRAY &base, size_t stride, size_t n=0)
 C++ version of gsl_vector_long_double_view_array_with_stride(). More...
 
template<typename ARRAY >
static vector_long_double const const_view_array (ARRAY const &v, size_t n=0)
 C++ version of gsl_vector_long_double _const_view_array(). More...
 
template<typename ARRAY >
static vector_long_double const const_view_array_with_stride (ARRAY const &base, size_t stride, size_t n=0)
 C++ version of gsl_vector_long_double_const_view_array_with_stride(). More...
 
static vector_long_double alloc_row_from_matrix (matrix_long_double &m, size_t const i)
 C++ version of gsl_vector_long_double_alloc_row_from_matrix(). More...
 
static vector_long_double alloc_col_from_matrix (matrix_long_double &m, size_t const j)
 C++ version of gsl_vector_long_double_alloc_col_from_matrix(). More...
 

Private Attributes

bool owns_data
 Used to allow a vector that does not own its data. More...
 
gsl_vector_long_double * ccgsl_pointer
 The shared pointer. More...
 
size_t * count
 The shared reference count. More...
 

Detailed Description

This class handles vector_long_double objects as shared handles.

It models a random access container so that STL functions work with vector_long_double.

Note that vector_long_double_views are implemented as vector_long_double objects here.

If you want to use a std::vector<long double> or similar object as if it were a gsl::vector_long_double 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_long_double object; so it may be safer to create gsl::vector_long_double objects in this way as needed.

Definition at line 45 of file vector_long_double.hpp.

Member Typedef Documentation

◆ const_iterator

The const_iterator type.

Definition at line 1064 of file vector_long_double.hpp.

◆ const_pointer

A container must have a constant pointer type.

Definition at line 396 of file vector_long_double.hpp.

◆ const_reference

A container must have a constant reference type.

Definition at line 386 of file vector_long_double.hpp.

◆ const_reverse_iterator

The const_reverse_t type.

Definition at line 1072 of file vector_long_double.hpp.

◆ difference_type

A container must have a difference_type.

Definition at line 1081 of file vector_long_double.hpp.

◆ iterator

The iterator type.

Definition at line 1068 of file vector_long_double.hpp.

◆ pointer

A container must have a pointer type.

Definition at line 391 of file vector_long_double.hpp.

◆ reference

A container must have a reference type.

Definition at line 381 of file vector_long_double.hpp.

◆ reverse_iterator

The reverse_iterator type.

Definition at line 1076 of file vector_long_double.hpp.

◆ size_type

A container must have a size_type.

Definition at line 1086 of file vector_long_double.hpp.

◆ value_type

A container must have a value_type.

Definition at line 376 of file vector_long_double.hpp.

Constructor & Destructor Documentation

◆ vector_long_double() [1/10]

gsl::vector_long_double::vector_long_double ( )
inline

The default constructor is only really useful for assigning to.

Definition at line 50 of file vector_long_double.hpp.

References ccgsl_pointer, count, and owns_data.

◆ vector_long_double() [2/10]

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

The default constructor creates a new vector_long_double with n elements.

Parameters
nThe number of elements in the vector_long_double

Definition at line 61 of file vector_long_double.hpp.

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

◆ vector_long_double() [3/10]

gsl::vector_long_double::vector_long_double ( gsl_vector_long_double *  v)
inlineexplicit

Could construct from a gsl_vector_long_double.

This is not usually a good idea. In this case we should not use gsl_vector_long_double_free() to deallocate the memory.

Parameters
vThe vector_long_double

Definition at line 99 of file vector_long_double.hpp.

◆ vector_long_double() [4/10]

gsl::vector_long_double::vector_long_double ( std::initializer_list< long double >  initializer_list)
inline

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

Parameters
initializer_listThe initializer_list.

Definition at line 110 of file vector_long_double.hpp.

References gsl::rstat::n().

◆ vector_long_double() [5/10]

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

The copy constructor.

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

Parameters
vThe vector_long_double to copy.

Definition at line 131 of file vector_long_double.hpp.

◆ vector_long_double() [6/10]

gsl::vector_long_double::vector_long_double ( vector_long_double v)
inline

The copy constructor.

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

Parameters
vThe vector_long_double to copy.

Definition at line 139 of file vector_long_double.hpp.

◆ vector_long_double() [7/10]

template<typename V >
gsl::vector_long_double::vector_long_double ( 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<long double> or std::array<long 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_long_double 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 175 of file vector_long_double.hpp.

References gsl::rstat::n().

◆ ~vector_long_double()

gsl::vector_long_double::~vector_long_double ( )
inline

The destructor only deletes the pointers if count reaches zero.

Definition at line 209 of file vector_long_double.hpp.

◆ vector_long_double() [8/10]

gsl::vector_long_double::vector_long_double ( vector_long_double &&  v)
inline

Move constructor.

Parameters
vThe vector_long_double to move.

Definition at line 268 of file vector_long_double.hpp.

◆ vector_long_double() [9/10]

gsl::vector_long_double::vector_long_double ( block_long_double b,
size_t const  offset,
size_t const  n,
size_t const  stride = 1 
)
inline

C++ version of gsl_vector_long_double_alloc_from_block().

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

Definition at line 1515 of file vector_long_double.hpp.

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

◆ vector_long_double() [10/10]

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

C++ version of gsl_vector_long_double_alloc_from_vector().

Parameters
vThe vector_long_double
offsetThe offset
nThe number of elements
strideThe stride

Definition at line 1532 of file vector_long_double.hpp.

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

Member Function Documentation

◆ add()

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

C++ version of gsl_vector_long_double_add().

Parameters
bvector_long_double to add to this
Returns
error code on failure

Definition at line 1390 of file vector_long_double.hpp.

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

◆ add_constant()

int gsl::vector_long_double::add_constant ( long double const  x)
inline

C++ version of gsl_vector_long_double_add_constant().

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

Definition at line 1420 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ alloc_col_from_matrix()

static vector_long_double gsl::vector_long_double::alloc_col_from_matrix ( matrix_long_double m,
size_t const  j 
)
static

C++ version of gsl_vector_long_double_alloc_col_from_matrix().

Parameters
mA matrix_long_double
jA column
Returns
A vector_long_double

◆ alloc_row_from_matrix()

static vector_long_double gsl::vector_long_double::alloc_row_from_matrix ( matrix_long_double m,
size_t const  i 
)
static

C++ version of gsl_vector_long_double_alloc_row_from_matrix().

Parameters
mA matrix_long_double
iA row
Returns
A vector_long_double

◆ axpby()

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

C++ version of gsl_vector_long_double_axpby().

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

Definition at line 1428 of file vector_long_double.hpp.

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

◆ begin() [1/2]

iterator gsl::vector_long_double::begin ( )
inline

Get iterator pointing to first vector_long_double element.

Returns
iterator pointing to first vector_long_double element

Definition at line 1092 of file vector_long_double.hpp.

◆ begin() [2/2]

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

Get iterator pointing to first vector_long_double element.

Returns
iterator pointing to first vector_long_double element

Definition at line 1099 of file vector_long_double.hpp.

◆ calloc()

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

C++ version of gsl_vector_long_double_calloc().

This constructs a vector_long_double object with entries initialised to zero.

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

Definition at line 1309 of file vector_long_double.hpp.

References gsl::rstat::n().

◆ clone()

vector_long_double gsl::vector_long_double::clone ( ) const
inline

The clone function.

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

Returns
a new copy of this.

Definition at line 198 of file vector_long_double.hpp.

References get(), gsl::rstat::quantile::get(), and gsl::cheb::size().

◆ const_ptr()

long double const * gsl::vector_long_double::const_ptr ( size_t const  i) const
inline

C++ version of gsl_vector_long_double_const_ptr().

Parameters
iindex of element to get
Returns
pointer to element

Definition at line 1481 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ const_subvector()

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

C++ version of gsl_vector_long_double_const_subvector().

Parameters
iThe offset
nThe size
Returns
A subvector

Definition at line 1660 of file vector_long_double.hpp.

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

◆ const_subvector_with_stride()

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

C++ version of gsl_vector_long_double_const_subvector_with_stride().

Parameters
iThe offset
strideThe stride
nThe size
Returns
A subvector

Definition at line 1674 of file vector_long_double.hpp.

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

◆ const_view_array() [1/2]

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

C++ version of gsl_vector_long_double _const_view_array().

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

Definition at line 1756 of file vector_long_double.hpp.

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

◆ const_view_array() [2/2]

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

C++ version of gsl_vector_long_double _const_view_array().

Parameters
vAn array of type long double
nThe size of the vector_long_double
Returns
A vector_long_double

Definition at line 1575 of file vector_long_double.hpp.

References gsl::rstat::n().

◆ const_view_array_with_stride() [1/2]

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

C++ version of gsl_vector_long_double_const_view_array_with_stride().

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

Definition at line 1775 of file vector_long_double.hpp.

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

◆ const_view_array_with_stride() [2/2]

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

C++ version of gsl_vector_long_double_const_view_array_with_stride().

Parameters
baseAn array of type long double
strideThe stride
nThe size of the vector_long_double
Returns
A vector_long_double

Definition at line 1589 of file vector_long_double.hpp.

References gsl::rstat::n().

Referenced by gsl::vector_complex_long_double::const_imag(), gsl::vector_complex_long_double::const_real(), gsl::vector_complex_long_double::imag(), and gsl::vector_complex_long_double::real().

◆ data() [1/2]

long double * gsl::vector_long_double::data ( )
inline

Give access to the data block_long_double.

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_long_double stride is not 1. However, new vector_long_double objects are always initialised to have a stride of 1.

Returns
The data block_long_double.

Definition at line 1132 of file vector_long_double.hpp.

◆ data() [2/2]

long double const * gsl::vector_long_double::data ( ) const
inline

Give access to the data block_long_double.

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_long_double stride is not 1. However, new vector_long_double objects are always initialised to have a stride of 1.

Returns
The data block_long_double.

Definition at line 1146 of file vector_long_double.hpp.

◆ div()

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

C++ version of gsl_vector_long_double_div().

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

Definition at line 1408 of file vector_long_double.hpp.

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

◆ empty()

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

Find if the vector_long_double is empty.

Returns
true if has size zero; otherwise false

Definition at line 1165 of file vector_long_double.hpp.

◆ end() [1/2]

iterator gsl::vector_long_double::end ( )
inline

Get iterator pointing beyond last vector_long_double element.

Returns
iterator pointing beyond last vector_long_double element

Definition at line 1107 of file vector_long_double.hpp.

References gsl::cheb::size().

◆ end() [2/2]

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

Get iterator pointing beyond last vector_long_double element.

Returns
iterator pointing beyond last vector_long_double element

Definition at line 1115 of file vector_long_double.hpp.

References gsl::cheb::size().

◆ fprintf()

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

C++ version of gsl_vector_long_double_fprintf().

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

Definition at line 1506 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ fread()

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

C++ version of gsl_vector_long_double_fread().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1487 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ fscanf()

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

C++ version of gsl_vector_long_double_fscanf().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1499 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ fwrite()

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

C++ version of gsl_vector_long_double_fwrite().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1493 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ get() [1/3]

◆ get() [2/3]

gsl_vector_long_double const * gsl::vector_long_double::get ( ) const
inline

Get the gsl_vector_long_double.

Returns
the gsl_vector_long_double

Definition at line 1280 of file vector_long_double.hpp.

◆ get() [3/3]

long double gsl::vector_long_double::get ( size_t const  i) const
inline

C++ version of gsl_vector_long_double_get().

Parameters
iindex of element to get
Returns
value of element

Definition at line 1463 of file vector_long_double.hpp.

References get().

Referenced by get().

◆ isneg()

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

C++ version of gsl_vector_long_double_isneg().

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

Definition at line 1452 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ isnonneg()

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

C++ version of gsl_vector_long_double_isnonneg().

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

Definition at line 1457 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ isnull()

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

C++ version of gsl_vector_long_double_isnull().

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

Definition at line 1442 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ ispos()

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

C++ version of gsl_vector_long_double_ispos().

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

Definition at line 1447 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ max()

long double gsl::vector_long_double::max ( ) const
inline

C++ version of gsl_vector_long_double_max().

Returns
maximum element of vector_long_double

Definition at line 1348 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ max_index()

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

C++ version of gsl_vector_long_double_max_index().

Returns
index of maximum value of vector_long_double

Definition at line 1372 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ max_size()

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

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

Identical to size but required for a container.

Returns
The size of the vector_long_double

Definition at line 1159 of file vector_long_double.hpp.

◆ memcpy()

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

C++ version of gsl_vector_long_double_memcpy().

Parameters
srcsource vector_long_double
Returns
error code on failure

Definition at line 1330 of file vector_long_double.hpp.

References get(), and gsl::rstat::quantile::get().

◆ min()

long double gsl::vector_long_double::min ( ) const
inline

C++ version of gsl_vector_long_double_min().

Returns
minimum element of vector_long_double

Definition at line 1353 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ min_index()

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

C++ version of gsl_vector_long_double_min_index().

Returns
index of minimum value of vector_long_double

Definition at line 1377 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ minmax() [1/2]

void gsl::vector_long_double::minmax ( long double &  min_out,
long double &  max_out 
) const
inline

C++ version of gsl_vector_long_double_minmax().

Parameters
min_outminimum element of vector_long_double
max_outmaximum element of vector_long_double

Definition at line 1366 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ minmax() [2/2]

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

C++ version of gsl_vector_long_double_minmax().

Parameters
min_outminimum element of vector_long_double
max_outmaximum element of vector_long_double

Definition at line 1359 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ minmax_index()

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

C++ version of gsl_vector_long_double_minmax_index().

Parameters
iminindex of minimum value of vector_long_double
imaxindex of maximum value of vector_long_double

Definition at line 1383 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ mul()

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

C++ version of gsl_vector_long_double_mul().

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

Definition at line 1402 of file vector_long_double.hpp.

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

◆ operator bool()

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

Allow conversion to bool.

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

Definition at line 1300 of file vector_long_double.hpp.

◆ operator!=()

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

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

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

Definition at line 290 of file vector_long_double.hpp.

◆ operator<()

bool gsl::vector_long_double::operator< ( vector_long_double 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_long_double is nonnegative.

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

Definition at line 302 of file vector_long_double.hpp.

References ccgsl_pointer, gsl::movstat::min(), and gsl::cheb::size().

◆ operator<=()

bool gsl::vector_long_double::operator<= ( vector_long_double 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_long_double is nonnegative.

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

Definition at line 356 of file vector_long_double.hpp.

◆ operator=() [1/2]

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

Move operator.

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

Definition at line 278 of file vector_long_double.hpp.

References swap().

◆ operator=() [2/2]

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

The assignment operator.

This makes a shared copy.

Parameters
vThe vector_long_double to copy

Definition at line 148 of file vector_long_double.hpp.

References ccgsl_pointer, count, and owns_data.

◆ operator==()

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

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

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

Definition at line 247 of file vector_long_double.hpp.

References ccgsl_pointer.

◆ operator>()

bool gsl::vector_long_double::operator> ( vector_long_double 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_long_double is nonnegative.

Parameters
vThe vector_long_double to be compared with this
Returns
false or true according as this is greater than v lexicographically

Definition at line 329 of file vector_long_double.hpp.

References ccgsl_pointer, gsl::movstat::min(), and gsl::cheb::size().

◆ operator>=()

bool gsl::vector_long_double::operator>= ( vector_long_double 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_long_double is nonnegative.

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

Definition at line 368 of file vector_long_double.hpp.

◆ operator[]() [1/2]

long double & gsl::vector_long_double::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 long double

Definition at line 1215 of file vector_long_double.hpp.

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

◆ operator[]() [2/2]

long double const & gsl::vector_long_double::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 long double

Definition at line 1238 of file vector_long_double.hpp.

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

◆ ptr()

long double * gsl::vector_long_double::ptr ( size_t const  i)
inline

C++ version of gsl_vector_long_double_ptr().

Parameters
iindex of element to get
Returns
pointer to element

Definition at line 1475 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ rbegin() [1/2]

reverse_iterator gsl::vector_long_double::rbegin ( )
inline

Get iterator pointing to first vector_long_double element.

Returns
iterator pointing to first vector_long_double element

Definition at line 1182 of file vector_long_double.hpp.

References gsl::cheb::size().

◆ rbegin() [2/2]

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

Get iterator pointing to first vector_long_double element.

Returns
iterator pointing to first vector_long_double element

Definition at line 1190 of file vector_long_double.hpp.

References gsl::cheb::size().

◆ rend() [1/2]

reverse_iterator gsl::vector_long_double::rend ( )
inline

Get iterator pointing beyond last vector_long_double element.

Returns
iterator pointing beyond last vector_long_double element

Definition at line 1199 of file vector_long_double.hpp.

◆ rend() [2/2]

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

Get iterator pointing beyond last vector_long_double element.

Returns
iterator pointing beyond last vector_long_double element

Definition at line 1206 of file vector_long_double.hpp.

◆ reset()

void gsl::vector_long_double::reset ( )
inline

Stop sharing ownership of the shared pointer.

Definition at line 262 of file vector_long_double.hpp.

References swap().

◆ reverse()

int gsl::vector_long_double::reverse ( )
inline

C++ version of gsl_vector_long_double_reverse().

Returns
error code on failure

Definition at line 1335 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ scale()

int gsl::vector_long_double::scale ( long double const  x)
inline

C++ version of gsl_vector_long_double_scale().

Parameters
xconstant to multiply this by
Returns
error code on failure

Definition at line 1414 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ set()

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

C++ version of gsl_vector_long_double_set().

Parameters
iindex to set
xnew value for element

Definition at line 1469 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ set_all()

void gsl::vector_long_double::set_all ( long double  x)
inline

C++ version of gsl_vector_long_double_set_all().

Parameters
xThe value to which all elements are set

Definition at line 1318 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ set_basis()

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

C++ version of gsl_vector_long_double_set_basis().

Creates a basis vector_long_double with one nonzero element.

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

Definition at line 1324 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ set_zero()

void gsl::vector_long_double::set_zero ( )
inline

C++ version of gsl_vector_long_double_set_zero().

Definition at line 1313 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ size()

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

The size (number of elements) of the vector_long_double.

Returns
The size of the vector_long_double

Definition at line 1124 of file vector_long_double.hpp.

◆ sub()

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

C++ version of gsl_vector_long_double_sub().

Parameters
bvector_long_double to subtract from this
Returns
error code on failure

Definition at line 1396 of file vector_long_double.hpp.

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

◆ subvector()

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

C++ version of gsl_vector_long_double_subvector().

Parameters
iThe offset
nThe size
Returns
A subvector

Definition at line 1633 of file vector_long_double.hpp.

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

◆ subvector_with_stride()

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

C++ version of gsl_vector_long_double_subvector_with_stride().

Parameters
iThe offset
strideThe stride
nThe size
Returns
A subvector

Definition at line 1647 of file vector_long_double.hpp.

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

◆ sum()

long double gsl::vector_long_double::sum ( vector_long_double const &  a) const
inline

C++ version of gsl_vector_long_double_sum().

Parameters
aThe vector
Returns
The sum of the elements

Definition at line 1437 of file vector_long_double.hpp.

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

◆ swap()

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

Swap two vector_long_double objects.

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

Parameters
vThe vector_long_double to swap with this.

Definition at line 1172 of file vector_long_double.hpp.

References ccgsl_pointer, and count.

Referenced by operator=(), and reset().

◆ swap_elements()

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

C++ version of gsl_vector_long_double_swap_elements().

Parameters
ifirst element
jsecond element
Returns
error code on failure

Definition at line 1342 of file vector_long_double.hpp.

References gsl::rstat::quantile::get().

◆ unique()

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

Find if this is the only object sharing the gsl_vector_long_double.

Returns
true or falses according as this is the only vector_long_double object sharing the gsl_vector_long_double

Definition at line 1286 of file vector_long_double.hpp.

◆ use_count()

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

Find how many vector_long_double objects share this pointer.

Returns
the number of vector_long_double objects that share this pointer

Definition at line 1291 of file vector_long_double.hpp.

◆ view_array() [1/2]

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

C++ version of gsl_vector_long_double_view_array().

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

Definition at line 1719 of file vector_long_double.hpp.

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

◆ view_array() [2/2]

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

C++ version of gsl_vector_long_double_view_array().

Parameters
vAn array of type long double
nThe size of the vector_long_double
Returns
A vector_long_double

Definition at line 1548 of file vector_long_double.hpp.

References gsl::rstat::n().

◆ view_array_with_stride() [1/2]

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

C++ version of gsl_vector_long_double_view_array_with_stride().

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

Definition at line 1738 of file vector_long_double.hpp.

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

◆ view_array_with_stride() [2/2]

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

C++ version of gsl_vector_long_double_view_array_with_stride().

Parameters
baseAn array of type long double
strideThe stride
nThe size of the vector_long_double
Returns
A vector_long_double

Definition at line 1562 of file vector_long_double.hpp.

References gsl::rstat::n().

Referenced by gsl::vector_complex_long_double::imag(), and gsl::vector_complex_long_double::real().

◆ wrap_gsl_vector_long_double_without_ownership()

void gsl::vector_long_double::wrap_gsl_vector_long_double_without_ownership ( gsl_vector_long_double *  v)
inline

This function is intended mainly for internal use.

It allows this to point to a gsl_vector_long_double 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_long_double* argument to one that takes a gsl_vector_long_double* argument.

Parameters
vThe gsl_vector_long_double

Definition at line 228 of file vector_long_double.hpp.

Referenced by gsl::matrix_long_double::operator[]().

Member Data Documentation

◆ ccgsl_pointer

◆ count

size_t* gsl::vector_long_double::count
private

The shared reference count.

Definition at line 1268 of file vector_long_double.hpp.

Referenced by operator=(), swap(), and vector_long_double().

◆ owns_data

bool gsl::vector_long_double::owns_data
private

Used to allow a vector that does not own its data.

Definition at line 1260 of file vector_long_double.hpp.

Referenced by operator=(), and vector_long_double().


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