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

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

#include <vector_complex_long_double.hpp>

Inheritance diagram for gsl::vector_complex_long_double:
Inheritance graph
Collaboration diagram for gsl::vector_complex_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 complex_long_double value_type
 A container must have a value_type. More...
 
typedef complex_long_double_ref reference
 A container must have a reference type. More...
 
typedef reference const const_reference
 A container must have a constant reference type. More...
 
typedef complex_long_double_ptr pointer
 A container must have a pointer type. More...
 
typedef complex_long_double_ptr 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_complex_long_double ()
 The default constructor is only really useful for assigning to. More...
 
 vector_complex_long_double (size_t const n)
 The default constructor creates a new vector_complex_long_double with n elements. More...
 
 vector_complex_long_double (gsl_vector_complex_long_double *v)
 Could construct from a gsl_vector_complex_long_double. More...
 
 vector_complex_long_double (std::initializer_list< std::complex< long double > > initializer_list)
 Could construct from a std::initializer_list in C++11. More...
 
 vector_complex_long_double (vector_complex_long_double const &v)
 The copy constructor. More...
 
vector_complex_long_doubleoperator= (vector_complex_long_double const &v)
 The assignment operator. More...
 
vector_complex_long_double clone () const
 The clone function. More...
 
 ~vector_complex_long_double ()
 The destructor only deletes the pointers if count reaches zero. More...
 
void wrap_gsl_vector_complex_long_double_without_ownership (gsl_vector_complex_long_double *v)
 This function is intended mainly for internal use. More...
 
bool operator== (vector_complex_long_double const &v) const
 Two vector_complex_long_double objects are identically equal if their elements are identical. More...
 
void reset ()
 Stop sharing ownership of the shared pointer. More...
 
 vector_complex_long_double (vector_complex_long_double &&v)
 Move constructor. More...
 
vector_complex_long_doubleoperator= (vector_complex_long_double &&v)
 Move operator. More...
 
bool operator!= (vector_complex_long_double const &v) const
 Two vector_complex_long_double objects are different equal if their elements are not identical. More...
 
bool operator< (vector_complex_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator> (vector_complex_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator<= (vector_complex_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
bool operator>= (vector_complex_long_double const &v) const
 A container needs to define an ordering for sorting. More...
 
iterator begin ()
 Get iterator pointing to first vector_complex_long_double element. More...
 
const_iterator begin () const
 Get iterator pointing to first vector_complex_long_double element. More...
 
iterator end ()
 Get iterator pointing beyond last vector_complex_long_double element. More...
 
const_iterator end () const
 Get iterator pointing beyond last vector_complex_long_double element. More...
 
size_type size () const
 The size (number of elements) of the vector_complex_long_double. More...
 
long double * data ()
 Give access to the data block. More...
 
long 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_complex_long_double. More...
 
bool empty () const
 Find if the vector_complex_long_double is empty. More...
 
void swap (vector_complex_long_double &v)
 Swap two vector_complex_long_double objects. More...
 
reverse_iterator rbegin ()
 Get iterator pointing to first vector_complex_long_double element. More...
 
const_reverse_iterator rbegin () const
 Get iterator pointing to first vector_complex_long_double element. More...
 
reverse_iterator rend ()
 Get iterator pointing beyond last vector_complex_long_double element. More...
 
const_reverse_iterator rend () const
 Get iterator pointing beyond last vector_complex_long_double element. More...
 
complex_long_double_ref operator[] (size_t const n)
 Get element at position n by reference ([] operator). More...
 
complex_long_double_ref const operator[] (size_t const n) const
 Get element at position n by reference ([] operator). More...
 
gsl_vector_complex_long_double * get ()
 Get the gsl_vector_complex_long_double. More...
 
gsl_vector_complex_long_double const * get () const
 Get the gsl_vector_complex_long_double. More...
 
bool unique () const
 Find if this is the only object sharing the gsl_vector_complex_long_double. More...
 
size_t use_count () const
 Find how many vector_complex_long_double objects share this pointer. More...
 
 operator bool () const
 Allow conversion to bool. More...
 
void set_zero ()
 C++ version of gsl_vector_complex_long_double_set_zero(). More...
 
void set_all (complex_long_double x)
 C++ version of gsl_vector_complex_long_double_set_all(). More...
 
int set_basis (size_t i)
 C++ version of gsl_vector_complex_long_double_set_basis(). More...
 
int memcpy (vector_complex_long_double const &src)
 C++ version of gsl_vector_complex_long_double_memcpy(). More...
 
int reverse ()
 C++ version of gsl_vector_complex_long_double_reverse(). More...
 
int swap_elements (size_t const i, size_t const j)
 C++ version of gsl_vector_complex_long_double_swap_elements(). More...
 
int add (vector_complex_long_double const &b)
 C++ version of gsl_vector_complex_long_double_add(). More...
 
int sub (vector_complex_long_double const &b)
 C++ version of gsl_vector_complex_long_double_sub(). More...
 
int mul (vector_complex_long_double const &b)
 C++ version of gsl_vector_complex_long_double_mul(). More...
 
int div (vector_complex_long_double const &b)
 C++ version of gsl_vector_complex_long_double_div(). More...
 
int scale (complex_long_double const x)
 C++ version of gsl_vector_complex_long_double_scale(). More...
 
int add_constant (complex_long_double const x)
 C++ version of gsl_vector_complex_long_double_add_constant(). More...
 
int axpby (complex_long_double const alpha, vector_complex_long_double const &x, complex_long_double const beta)
 C++ version of gsl_vector_complex_long_double_axpby(). More...
 
int isnull () const
 C++ version of gsl_vector_complex_long_double_isnull(). More...
 
int ispos () const
 C++ version of gsl_vector_complex_long_double_ispos(). More...
 
int isneg () const
 C++ version of gsl_vector_complex_long_double_isneg(). More...
 
int isnonneg () const
 C++ version of gsl_vector_complex_long_double_isnonneg(). More...
 
complex_long_double get (size_t const i) const
 C++ version of gsl_vector_complex_long_double_get(). More...
 
void set (size_t const i, complex_long_double x)
 C++ version of gsl_vector_complex_long_double_set(). More...
 
complex_long_double_ptr ptr (size_t const i)
 C++ version of gsl_vector_complex_long_double_ptr(). More...
 
complex_long_double_ptr const const_ptr (size_t const i)
 C++ version of gsl_vector_complex_long_double_const_ptr(). More...
 
int fread (FILE *stream)
 C++ version of gsl_vector_complex_long_double_fread(). More...
 
int fwrite (FILE *stream) const
 C++ version of gsl_vector_complex_long_double_fwrite(). More...
 
int fscanf (FILE *stream)
 C++ version of gsl_vector_complex_long_double_fscanf(). More...
 
int fprintf (FILE *stream, char const *format) const
 C++ version of gsl_vector_complex_long_double_fprintf(). More...
 
 vector_complex_long_double (block_complex_long_double &b, size_t const offset, size_t const n, size_t const stride=1)
 C++ version of gsl_vector_complex_long_double_alloc_from_block(). More...
 
 vector_complex_long_double (vector_complex_long_double &v, size_t const offset, size_t const n, size_t const stride=1)
 C++ version of gsl_vector_complex_long_double_alloc_from_vector(). More...
 
gsl::vector_long_double real ()
 C++ version of gsl_vector_complex_real(). More...
 
gsl::vector_long_double const const_real () const
 C++ version of gsl_vector_complex_const_real(). More...
 
gsl::vector_long_double const real () const
 Another C++ version of gsl_vector_complex_const_real(). More...
 
gsl::vector_long_double imag ()
 C++ version of gsl_vector_complex_imag(). More...
 
gsl::vector_long_double const const_imag () const
 C++ version of gsl_vector_complex_const_imag(). More...
 
gsl::vector_long_double const imag () const
 Another C++ version of gsl_vector_complex_const_imag(). More...
 
vector_complex_long_double subvector (size_t i, size_t n)
 C++ version of gsl_vector_complex_long_double_subvector(). More...
 
vector_complex_long_double subvector_with_stride (size_t i, size_t stride, size_t n)
 C++ version of gsl_vector_complex_long_double_subvector_with_stride(). More...
 
vector_complex_long_double const const_subvector (size_t i, size_t n) const
 C++ version of gsl_vector_complex_long_double_const_subvector(). More...
 
vector_complex_long_double const const_subvector_with_stride (size_t i, size_t stride, size_t n) const
 C++ version of gsl_vector_complex_long_double_const_subvector_with_stride(). More...
 

Static Public Member Functions

static vector_complex_long_double calloc (size_t const n)
 C++ version of gsl_vector_complex_long_double_calloc(). More...
 
static vector_complex_long_double view_array (long double *v, size_t n)
 C++ version of gsl_vector_complex_long_double_view_array(). More...
 
static vector_complex_long_double view_array_with_stride (long double *base, size_t stride, size_t n)
 C++ version of gsl_vector_complex_long_double_view_array_with_stride(). More...
 
static vector_complex_long_double const const_view_array (long double const *v, size_t n)
 C++ version of gsl_vector_complex_long_double _const_view_array(). More...
 
static vector_complex_long_double const const_view_array_with_stride (long double const *base, size_t stride, size_t n)
 C++ version of gsl_vector_complex_long_double_const_view_array_with_stride(). More...
 
template<typename ARRAY >
static vector_complex_long_double view_array (ARRAY &v, size_t n=0)
 C++ version of gsl_vector_complex_long_double_view_array(). More...
 
template<typename ARRAY >
static vector_complex_long_double view_array_with_stride (ARRAY &base, size_t stride, size_t n=0)
 C++ version of gsl_vector_complex_long_double_view_array_with_stride(). More...
 
template<typename ARRAY >
static vector_complex_long_double const const_view_array (ARRAY const &v, size_t n=0)
 C++ version of gsl_vector_complex_long_double _const_view_array(). More...
 
template<typename ARRAY >
static vector_complex_long_double const const_view_array_with_stride (ARRAY const &base, size_t stride, size_t n=0)
 C++ version of gsl_vector_complex_long_double_const_view_array_with_stride(). More...
 
static vector_complex_long_double alloc_row_from_matrix (matrix_complex_long_double &m, size_t const i)
 C++ version of gsl_vector_complex_long_double_alloc_row_from_matrix(). More...
 
static vector_complex_long_double alloc_col_from_matrix (matrix_complex_long_double &m, size_t const j)
 C++ version of gsl_vector_complex_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_complex_long_double * ccgsl_pointer
 The shared pointer. More...
 
size_t * count
 The shared reference count. More...
 

Detailed Description

This class handles vector_complex_long_double objects as shared handles.

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

Note that vector_complex_long_double_views are implemented as vector_complex_long_double objects here.

Definition at line 46 of file vector_complex_long_double.hpp.

Member Typedef Documentation

◆ const_iterator

The const_iterator type.

Definition at line 1035 of file vector_complex_long_double.hpp.

◆ const_pointer

A container must have a constant pointer type.

Definition at line 370 of file vector_complex_long_double.hpp.

◆ const_reference

A container must have a constant reference type.

Definition at line 360 of file vector_complex_long_double.hpp.

◆ const_reverse_iterator

The const_reverse_t type.

Definition at line 1043 of file vector_complex_long_double.hpp.

◆ difference_type

A container must have a difference_type.

Definition at line 1052 of file vector_complex_long_double.hpp.

◆ iterator

The iterator type.

Definition at line 1039 of file vector_complex_long_double.hpp.

◆ pointer

A container must have a pointer type.

Definition at line 365 of file vector_complex_long_double.hpp.

◆ reference

A container must have a reference type.

Definition at line 355 of file vector_complex_long_double.hpp.

◆ reverse_iterator

The reverse_iterator type.

Definition at line 1047 of file vector_complex_long_double.hpp.

◆ size_type

A container must have a size_type.

Definition at line 1057 of file vector_complex_long_double.hpp.

◆ value_type

A container must have a value_type.

Definition at line 350 of file vector_complex_long_double.hpp.

Constructor & Destructor Documentation

◆ vector_complex_long_double() [1/8]

gsl::vector_complex_long_double::vector_complex_long_double ( )
inline

◆ vector_complex_long_double() [2/8]

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

The default constructor creates a new vector_complex_long_double with n elements.

Parameters
nThe number of elements in the vector_complex_long_double

Definition at line 62 of file vector_complex_long_double.hpp.

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

◆ vector_complex_long_double() [3/8]

gsl::vector_complex_long_double::vector_complex_long_double ( gsl_vector_complex_long_double *  v)
inlineexplicit

Could construct from a gsl_vector_complex_long_double.

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

Parameters
vThe vector_complex_long_double

Definition at line 103 of file vector_complex_long_double.hpp.

References ccgsl_pointer, and count.

◆ vector_complex_long_double() [4/8]

gsl::vector_complex_long_double::vector_complex_long_double ( std::initializer_list< std::complex< long double > >  initializer_list)
inline

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

Parameters
initializer_listThe initializer_list.

Definition at line 116 of file vector_complex_long_double.hpp.

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

◆ vector_complex_long_double() [5/8]

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

The copy constructor.

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

Parameters
vThe vector_complex_long_double to copy.

Definition at line 140 of file vector_complex_long_double.hpp.

References count.

◆ ~vector_complex_long_double()

gsl::vector_complex_long_double::~vector_complex_long_double ( )
inline

The destructor only deletes the pointers if count reaches zero.

Definition at line 182 of file vector_complex_long_double.hpp.

References ccgsl_pointer, count, and owns_data.

◆ vector_complex_long_double() [6/8]

gsl::vector_complex_long_double::vector_complex_long_double ( vector_complex_long_double &&  v)
inline

Move constructor.

Parameters
vThe vector_complex_long_double to move.

Definition at line 241 of file vector_complex_long_double.hpp.

References count.

◆ vector_complex_long_double() [7/8]

gsl::vector_complex_long_double::vector_complex_long_double ( block_complex_long_double b,
size_t const  offset,
size_t const  n,
size_t const  stride = 1 
)
inline

C++ version of gsl_vector_complex_long_double_alloc_from_block().

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

Definition at line 1441 of file vector_complex_long_double.hpp.

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

◆ vector_complex_long_double() [8/8]

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

C++ version of gsl_vector_complex_long_double_alloc_from_vector().

Parameters
vThe vector_complex_long_double
offsetThe offset
nThe number of elements
strideThe stride

Definition at line 1458 of file vector_complex_long_double.hpp.

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

Member Function Documentation

◆ add()

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

C++ version of gsl_vector_complex_long_double_add().

Parameters
bvector_complex_long_double to add to this
Returns
error code on failure

Definition at line 1316 of file vector_complex_long_double.hpp.

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

◆ add_constant()

int gsl::vector_complex_long_double::add_constant ( complex_long_double const  x)
inline

C++ version of gsl_vector_complex_long_double_add_constant().

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

Definition at line 1346 of file vector_complex_long_double.hpp.

References get().

◆ alloc_col_from_matrix()

static vector_complex_long_double gsl::vector_complex_long_double::alloc_col_from_matrix ( matrix_complex_long_double m,
size_t const  j 
)
static

C++ version of gsl_vector_complex_long_double_alloc_col_from_matrix().

Parameters
mA matrix
jA column
Returns
A vector_complex_long_double

◆ alloc_row_from_matrix()

static vector_complex_long_double gsl::vector_complex_long_double::alloc_row_from_matrix ( matrix_complex_long_double m,
size_t const  i 
)
static

C++ version of gsl_vector_complex_long_double_alloc_row_from_matrix().

Parameters
mA matrix_complex_long_double
iA row
Returns
A vector_complex_long_double

◆ axpby()

int gsl::vector_complex_long_double::axpby ( complex_long_double const  alpha,
vector_complex_long_double const &  x,
complex_long_double const  beta 
)
inline

C++ version of gsl_vector_complex_long_double_axpby().

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

Definition at line 1354 of file vector_complex_long_double.hpp.

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

◆ begin() [1/2]

iterator gsl::vector_complex_long_double::begin ( )
inline

Get iterator pointing to first vector_complex_long_double element.

Returns
iterator pointing to first vector_complex_long_double element

Definition at line 1063 of file vector_complex_long_double.hpp.

Referenced by vector_complex_long_double().

◆ begin() [2/2]

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

Get iterator pointing to first vector_complex_long_double element.

Returns
iterator pointing to first vector_complex_long_double element

Definition at line 1070 of file vector_complex_long_double.hpp.

◆ calloc()

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

C++ version of gsl_vector_complex_long_double_calloc().

This constructs a vector_complex_long_double object with entries initialised to zero.

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

Definition at line 1276 of file vector_complex_long_double.hpp.

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

◆ clone()

vector_complex_long_double gsl::vector_complex_long_double::clone ( ) const
inline

The clone function.

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

Returns
a new copy of this.

Definition at line 171 of file vector_complex_long_double.hpp.

References get(), and size().

◆ const_imag()

gsl::vector_long_double const gsl::vector_complex_long_double::const_imag ( ) const
inline

C++ version of gsl_vector_complex_const_imag().

Note that this is a view: if the complex_vector from which the return value is constructed is deleted then the return value should not be used.

Returns
The imaginary parts of each element

Definition at line 1506 of file vector_complex_long_double.hpp.

References CCGSL_MTY, gsl::vector_long_double::const_view_array_with_stride(), data(), and size().

◆ const_ptr()

complex_long_double_ptr const gsl::vector_complex_long_double::const_ptr ( size_t const  i)
inline

C++ version of gsl_vector_complex_long_double_const_ptr().

Parameters
iindex of element to get
Returns
pointer to element

Definition at line 1404 of file vector_complex_long_double.hpp.

References CCGSL_MTY, ccgsl_pointer, and gsl::exception::GSL_EINVAL.

◆ const_real()

gsl::vector_long_double const gsl::vector_complex_long_double::const_real ( ) const
inline

C++ version of gsl_vector_complex_const_real().

Note that this is a view: if the complex_vector from which the return value is constructed is deleted then the return value should not be used.

Returns
The real parts of each element

Definition at line 1482 of file vector_complex_long_double.hpp.

References CCGSL_MTY, gsl::vector_long_double::const_view_array_with_stride(), data(), and size().

◆ const_subvector()

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

C++ version of gsl_vector_complex_long_double_const_subvector().

Parameters
iThe offset
nThe size
Returns
A subvector

Definition at line 1634 of file vector_complex_long_double.hpp.

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

◆ const_subvector_with_stride()

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

C++ version of gsl_vector_complex_long_double_const_subvector_with_stride().

Parameters
iThe offset
strideThe stride
nThe size
Returns
A subvector

Definition at line 1648 of file vector_complex_long_double.hpp.

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

◆ const_view_array() [1/2]

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

C++ version of gsl_vector_complex_long_double _const_view_array().

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

Definition at line 1730 of file vector_complex_long_double.hpp.

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

◆ const_view_array() [2/2]

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

C++ version of gsl_vector_complex_long_double _const_view_array().

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

Definition at line 1549 of file vector_complex_long_double.hpp.

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

◆ const_view_array_with_stride() [1/2]

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

C++ version of gsl_vector_complex_long_double_const_view_array_with_stride().

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

Definition at line 1749 of file vector_complex_long_double.hpp.

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

◆ const_view_array_with_stride() [2/2]

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

C++ version of gsl_vector_complex_long_double_const_view_array_with_stride().

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

Definition at line 1563 of file vector_complex_long_double.hpp.

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

◆ data() [1/2]

long double * gsl::vector_complex_long_double::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 1103 of file vector_complex_long_double.hpp.

References ccgsl_pointer.

Referenced by const_imag(), const_real(), imag(), and real().

◆ data() [2/2]

long double const * gsl::vector_complex_long_double::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 1117 of file vector_complex_long_double.hpp.

References ccgsl_pointer.

◆ div()

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

C++ version of gsl_vector_complex_long_double_div().

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

Definition at line 1334 of file vector_complex_long_double.hpp.

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

◆ empty()

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

Find if the vector_complex_long_double is empty.

Returns
true if has size zero; otherwise false

Definition at line 1136 of file vector_complex_long_double.hpp.

References ccgsl_pointer.

◆ end() [1/2]

iterator gsl::vector_complex_long_double::end ( )
inline

Get iterator pointing beyond last vector_complex_long_double element.

Returns
iterator pointing beyond last vector_complex_long_double element

Definition at line 1078 of file vector_complex_long_double.hpp.

References ccgsl_pointer, and size().

◆ end() [2/2]

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

Get iterator pointing beyond last vector_complex_long_double element.

Returns
iterator pointing beyond last vector_complex_long_double element

Definition at line 1086 of file vector_complex_long_double.hpp.

References ccgsl_pointer, and size().

◆ fprintf()

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

C++ version of gsl_vector_complex_long_double_fprintf().

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

Definition at line 1432 of file vector_complex_long_double.hpp.

References get().

◆ fread()

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

C++ version of gsl_vector_complex_long_double_fread().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1413 of file vector_complex_long_double.hpp.

References get().

◆ fscanf()

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

C++ version of gsl_vector_complex_long_double_fscanf().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1425 of file vector_complex_long_double.hpp.

References get().

◆ fwrite()

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

C++ version of gsl_vector_complex_long_double_fwrite().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1419 of file vector_complex_long_double.hpp.

References get().

◆ get() [1/3]

◆ get() [2/3]

gsl_vector_complex_long_double const * gsl::vector_complex_long_double::get ( ) const
inline

Get the gsl_vector_complex_long_double.

Returns
the gsl_vector_complex_long_double

Definition at line 1247 of file vector_complex_long_double.hpp.

References ccgsl_pointer.

◆ get() [3/3]

complex_long_double gsl::vector_complex_long_double::get ( size_t const  i) const
inline

C++ version of gsl_vector_complex_long_double_get().

Parameters
iindex of element to get
Returns
value of element

Definition at line 1383 of file vector_complex_long_double.hpp.

References get().

Referenced by get().

◆ imag() [1/2]

gsl::vector_long_double gsl::vector_complex_long_double::imag ( )
inline

C++ version of gsl_vector_complex_imag().

Note that this is a view: if the complex_vector from which the return value is constructed is deleted then the return value should not be used.

Returns
The imaginary parts of each element

Definition at line 1498 of file vector_complex_long_double.hpp.

References CCGSL_MTY, data(), size(), and gsl::vector_long_double::view_array_with_stride().

◆ imag() [2/2]

gsl::vector_long_double const gsl::vector_complex_long_double::imag ( ) const
inline

Another C++ version of gsl_vector_complex_const_imag().

Note that this is a view: if the complex_vector from which the return value is constructed is deleted then the return value should not be used.

Returns
The imaginary parts of each element

Definition at line 1514 of file vector_complex_long_double.hpp.

References CCGSL_MTY, gsl::vector_long_double::const_view_array_with_stride(), data(), and size().

◆ isneg()

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

C++ version of gsl_vector_complex_long_double_isneg().

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

Definition at line 1372 of file vector_complex_long_double.hpp.

References get().

◆ isnonneg()

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

C++ version of gsl_vector_complex_long_double_isnonneg().

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

Definition at line 1377 of file vector_complex_long_double.hpp.

References get().

◆ isnull()

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

C++ version of gsl_vector_complex_long_double_isnull().

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

Definition at line 1362 of file vector_complex_long_double.hpp.

References get().

◆ ispos()

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

C++ version of gsl_vector_complex_long_double_ispos().

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

Definition at line 1367 of file vector_complex_long_double.hpp.

References get().

◆ max_size()

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

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

Identical to size but required for a container.

Returns
The size of the vector_complex_long_double

Definition at line 1130 of file vector_complex_long_double.hpp.

References ccgsl_pointer.

◆ memcpy()

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

C++ version of gsl_vector_complex_long_double_memcpy().

Parameters
srcsource vector_complex_long_double
Returns
error code on failure

Definition at line 1297 of file vector_complex_long_double.hpp.

References get().

◆ mul()

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

C++ version of gsl_vector_complex_long_double_mul().

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

Definition at line 1328 of file vector_complex_long_double.hpp.

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

◆ operator bool()

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

Allow conversion to bool.

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

Definition at line 1267 of file vector_complex_long_double.hpp.

References ccgsl_pointer.

◆ operator!=()

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

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

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

Definition at line 264 of file vector_complex_long_double.hpp.

References operator==().

◆ operator<()

bool gsl::vector_complex_long_double::operator< ( vector_complex_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_complex_long_double is nonnegative.

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

Definition at line 276 of file vector_complex_long_double.hpp.

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

Referenced by operator<=().

◆ operator<=()

bool gsl::vector_complex_long_double::operator<= ( vector_complex_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_complex_long_double is nonnegative.

Parameters
vThe vector_complex_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 330 of file vector_complex_long_double.hpp.

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

◆ operator=() [1/2]

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

Move operator.

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

Definition at line 252 of file vector_complex_long_double.hpp.

References vector_complex_long_double().

◆ operator=() [2/2]

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

The assignment operator.

This makes a shared copy.

Parameters
vThe vector_complex_long_double to copy

Definition at line 150 of file vector_complex_long_double.hpp.

References ccgsl_pointer, count, and owns_data.

◆ operator==()

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

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

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

Definition at line 219 of file vector_complex_long_double.hpp.

References CCGSL_MTY, and ccgsl_pointer.

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

◆ operator>()

bool gsl::vector_complex_long_double::operator> ( vector_complex_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_complex_long_double is nonnegative.

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

Definition at line 303 of file vector_complex_long_double.hpp.

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

Referenced by operator>=().

◆ operator>=()

bool gsl::vector_complex_long_double::operator>= ( vector_complex_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_complex_long_double is nonnegative.

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

Definition at line 342 of file vector_complex_long_double.hpp.

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

◆ operator[]() [1/2]

complex_long_double_ref gsl::vector_complex_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 complex_long_double

Definition at line 1186 of file vector_complex_long_double.hpp.

References CCGSL_MTY, ccgsl_pointer, gsl::exception::GSL_EFAILED, gsl::rstat::n(), and size().

◆ operator[]() [2/2]

complex_long_double_ref const gsl::vector_complex_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 complex_long_double

Definition at line 1207 of file vector_complex_long_double.hpp.

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

◆ ptr()

complex_long_double_ptr gsl::vector_complex_long_double::ptr ( size_t const  i)
inline

C++ version of gsl_vector_complex_long_double_ptr().

Parameters
iindex of element to get
Returns
pointer to element

Definition at line 1395 of file vector_complex_long_double.hpp.

References CCGSL_MTY, ccgsl_pointer, and gsl::exception::GSL_EINVAL.

◆ rbegin() [1/2]

reverse_iterator gsl::vector_complex_long_double::rbegin ( )
inline

Get iterator pointing to first vector_complex_long_double element.

Returns
iterator pointing to first vector_complex_long_double element

Definition at line 1153 of file vector_complex_long_double.hpp.

References ccgsl_pointer, and size().

◆ rbegin() [2/2]

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

Get iterator pointing to first vector_complex_long_double element.

Returns
iterator pointing to first vector_complex_long_double element

Definition at line 1161 of file vector_complex_long_double.hpp.

References ccgsl_pointer, and size().

◆ real() [1/2]

gsl::vector_long_double gsl::vector_complex_long_double::real ( )
inline

C++ version of gsl_vector_complex_real().

Note that this is a view: if the complex_vector from which the return value is constructed is deleted then the return value should not be used.

Returns
The real parts of each element

Definition at line 1474 of file vector_complex_long_double.hpp.

References CCGSL_MTY, data(), size(), and gsl::vector_long_double::view_array_with_stride().

◆ real() [2/2]

gsl::vector_long_double const gsl::vector_complex_long_double::real ( ) const
inline

Another C++ version of gsl_vector_complex_const_real().

Note that this is a view: if the complex_vector from which the return value is constructed is deleted then the return value should not be used.

Returns
The real parts of each element

Definition at line 1490 of file vector_complex_long_double.hpp.

References CCGSL_MTY, gsl::vector_long_double::const_view_array_with_stride(), data(), and size().

◆ rend() [1/2]

reverse_iterator gsl::vector_complex_long_double::rend ( )
inline

Get iterator pointing beyond last vector_complex_long_double element.

Returns
iterator pointing beyond last vector_complex_long_double element

Definition at line 1170 of file vector_complex_long_double.hpp.

◆ rend() [2/2]

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

Get iterator pointing beyond last vector_complex_long_double element.

Returns
iterator pointing beyond last vector_complex_long_double element

Definition at line 1177 of file vector_complex_long_double.hpp.

◆ reset()

void gsl::vector_complex_long_double::reset ( )
inline

Stop sharing ownership of the shared pointer.

Definition at line 235 of file vector_complex_long_double.hpp.

References vector_complex_long_double().

◆ reverse()

int gsl::vector_complex_long_double::reverse ( )
inline

C++ version of gsl_vector_complex_long_double_reverse().

Returns
error code on failure

Definition at line 1302 of file vector_complex_long_double.hpp.

References get().

◆ scale()

int gsl::vector_complex_long_double::scale ( complex_long_double const  x)
inline

C++ version of gsl_vector_complex_long_double_scale().

Parameters
xconstant to multiply this by
Returns
error code on failure

Definition at line 1340 of file vector_complex_long_double.hpp.

References get().

◆ set()

void gsl::vector_complex_long_double::set ( size_t const  i,
complex_long_double  x 
)
inline

C++ version of gsl_vector_complex_long_double_set().

Parameters
iindex to set
xnew value for element

Definition at line 1389 of file vector_complex_long_double.hpp.

References get().

◆ set_all()

void gsl::vector_complex_long_double::set_all ( complex_long_double  x)
inline

C++ version of gsl_vector_complex_long_double_set_all().

Parameters
xThe value to which all elements are set

Definition at line 1285 of file vector_complex_long_double.hpp.

References get().

◆ set_basis()

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

C++ version of gsl_vector_complex_long_double_set_basis().

Creates a basis vector_complex_long_double with one nonzero element.

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

Definition at line 1291 of file vector_complex_long_double.hpp.

References get().

◆ set_zero()

void gsl::vector_complex_long_double::set_zero ( )
inline

C++ version of gsl_vector_complex_long_double_set_zero().

Definition at line 1280 of file vector_complex_long_double.hpp.

References get().

◆ size()

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

The size (number of elements) of the vector_complex_long_double.

Returns
The size of the vector_complex_long_double

Definition at line 1095 of file vector_complex_long_double.hpp.

References ccgsl_pointer.

Referenced by clone(), const_imag(), const_real(), end(), imag(), operator<(), operator>(), operator[](), rbegin(), and real().

◆ sub()

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

C++ version of gsl_vector_complex_long_double_sub().

Parameters
bvector_complex_long_double to subtract from this
Returns
error code on failure

Definition at line 1322 of file vector_complex_long_double.hpp.

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

◆ subvector()

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

C++ version of gsl_vector_complex_long_double_subvector().

Parameters
iThe offset
nThe size
Returns
A subvector

Definition at line 1607 of file vector_complex_long_double.hpp.

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

◆ subvector_with_stride()

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

C++ version of gsl_vector_complex_long_double_subvector_with_stride().

Parameters
iThe offset
strideThe stride
nThe size
Returns
A subvector

Definition at line 1621 of file vector_complex_long_double.hpp.

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

◆ swap()

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

Swap two vector_complex_long_double objects.

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

Parameters
vThe vector_complex_long_double to swap with this.

Definition at line 1143 of file vector_complex_long_double.hpp.

References ccgsl_pointer, and count.

◆ swap_elements()

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

C++ version of gsl_vector_complex_long_double_swap_elements().

Parameters
ifirst element
jsecond element
Returns
error code on failure

Definition at line 1309 of file vector_complex_long_double.hpp.

References get().

◆ unique()

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

Find if this is the only object sharing the gsl_vector_complex_long_double.

Returns
true or falses according as this is the only vector_complex_long_double object sharing the gsl_vector_complex_long_double

Definition at line 1253 of file vector_complex_long_double.hpp.

References count.

◆ use_count()

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

Find how many vector_complex_long_double objects share this pointer.

Returns
the number of vector_complex_long_double objects that share this pointer

Definition at line 1258 of file vector_complex_long_double.hpp.

References count.

◆ view_array() [1/2]

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

C++ version of gsl_vector_complex_long_double_view_array().

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

Definition at line 1693 of file vector_complex_long_double.hpp.

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

◆ view_array() [2/2]

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

C++ version of gsl_vector_complex_long_double_view_array().

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

Definition at line 1522 of file vector_complex_long_double.hpp.

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

◆ view_array_with_stride() [1/2]

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

C++ version of gsl_vector_complex_long_double_view_array_with_stride().

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

Definition at line 1712 of file vector_complex_long_double.hpp.

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

◆ view_array_with_stride() [2/2]

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

C++ version of gsl_vector_complex_long_double_view_array_with_stride().

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

Definition at line 1536 of file vector_complex_long_double.hpp.

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

◆ wrap_gsl_vector_complex_long_double_without_ownership()

void gsl::vector_complex_long_double::wrap_gsl_vector_complex_long_double_without_ownership ( gsl_vector_complex_long_double *  v)
inline

This function is intended mainly for internal use.

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

Parameters
vThe gsl_vector_complex_long_double

Definition at line 199 of file vector_complex_long_double.hpp.

References ccgsl_pointer, count, and owns_data.

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

Member Data Documentation

◆ ccgsl_pointer

◆ count

size_t* gsl::vector_complex_long_double::count
private

◆ owns_data

bool gsl::vector_complex_long_double::owns_data
private

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

Definition at line 1227 of file vector_complex_long_double.hpp.

Referenced by operator=(), vector_complex_long_double(), wrap_gsl_vector_complex_long_double_without_ownership(), and ~vector_complex_long_double().


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