gsl::Vector Class Reference

`#include <mia/core/gsl_vector.hh>`

Inheritance diagram for gsl::Vector:
[legend]

## Public Types

typedef const_vector_iterator | const_iterator
typedef const double & | const_reference
typedef vector_iterator | iterator
typedef double & | reference
typedef size_t | size_type
typedef double | value_type
typedef const gsl_vector * | vector_const_pointer_type
typedef gsl_vector * | vector_pointer_type
typedef gsl_vector | vector_type

## Public Member Functions

iterator | begin ()
const_iterator | begin () const
iterator | end ()
const_iterator | end () const
bool | is_valid () const
bool | is_writable () const
| operator Vector::vector_const_pointer_type () const
| vector const pointer type operator to enable transparent calls to the GSL APL
| operator Vector::vector_pointer_type ()
| vector pointer type operator to enable transparent calls to the GSL APL
gsl_vector * | operator-> ()
const gsl_vector * | operator-> () const
Vector & | operator= (const Vector &other)
Vector & | operator= (Vector &&other)
reference | operator[] (size_t i)
value_type | operator[] (size_t i) const
void | print (std::ostream &os) const
size_type | size () const
| Vector ()
| Vector (const gsl_vector *holder)
| Vector (const Vector &other)
| Vector (gsl_vector *holder)
| Vector (size_type size, bool clear)
| Vector (size_type size, const double *init)
| Vector (Vector &&other)
| ~Vector ()
| Destructor.

## Protected Member Functions

void | reset_holder (const gsl_vector *holder)
void | reset_holder (gsl_vector *holder)

## Detailed Description

This is a wrapper class around the GSL vector type. It provides a compatibility layer to make it possible to use STL algorithms and constructs.

Definition at line 38 of file gsl_vector.hh.

## Member Typedef Documentation

## const_iterator

typedef const_vector_iterator gsl::Vector::const_iterator

Definition at line 43 of file gsl_vector.hh.

## const_reference

typedef const double& gsl::Vector::const_reference

Definition at line 47 of file gsl_vector.hh.

## iterator

typedef vector_iterator gsl::Vector::iterator

Definition at line 42 of file gsl_vector.hh.

## reference

typedef double& gsl::Vector::reference

Definition at line 46 of file gsl_vector.hh.

## size_type

typedef size_t gsl::Vector::size_type

Definition at line 44 of file gsl_vector.hh.

## value_type

typedef double gsl::Vector::value_type

Definition at line 45 of file gsl_vector.hh.

## vector_const_pointer_type

typedef const gsl_vector* gsl::Vector::vector_const_pointer_type

Definition at line 50 of file gsl_vector.hh.

## vector_pointer_type

typedef gsl_vector* gsl::Vector::vector_pointer_type

Definition at line 49 of file gsl_vector.hh.

## vector_type

typedef gsl_vector gsl::Vector::vector_type

Definition at line 48 of file gsl_vector.hh.

## Constructor & Destructor Documentation

## Vector() [1/7]

gsl::Vector::Vector | ( |  | ) |

Construct an empty vector without allocating the GSL data structures

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

## Vector() [2/7]

gsl::Vector::Vector | ( | size_type | size,
|  | bool | clear )

Construct a vector of given size

Parameters

  size |
  clear | if set to true set all values to zero at allocation

References size().

## Vector() [3/7]

gsl::Vector::Vector | ( | size_type | size,
|  | const double * | init )

Construct a vector of given size and initialize it with the given data

Parameters

  size |
  init | double array that must be at least of size size

References size().

## Vector() [4/7]

gsl::Vector::Vector | ( | gsl_vector * | holder | ) |

Wrap a pre-constructed GSL vector. The passed GSL-vector will not be destroyed when the destructor is called. The values of the GSL vector can be changed

Parameters

  holder | the already allocated GSL vector

## Vector() [5/7]

gsl::Vector::Vector | ( | const gsl_vector * | holder | ) |

Wrap a pre-constructed GSL vector. The passed GSL-vector will not be destroyed when the destructor is called. The values of the GSL vector can not be changed

Parameters

  holder | the already allocated GSL vector

## Vector() [6/7]

gsl::Vector::Vector | ( | const Vector & | other | ) |

Copy constructor, does a deep copy of the internal data structures.

References Vector().

## Vector() [7/7]

gsl::Vector::Vector | ( | Vector && | other | ) |

Move constructor, does move the internal data structure to the new object.

References Vector().

## ~Vector()

gsl::Vector::~Vector | ( |  | ) |

Destructor.

## Member Function Documentation

## begin() [1/2]

iterator gsl::Vector::begin | ( |  | ) |

Returns
  an STL compatible read-write iterator to the vector data pointing to the beginning

## begin() [2/2]

const_iterator gsl::Vector::begin | ( |  | ) | const

Returns
  an STL compatible read-only iterator to the vector data pointing to the beginning

## end() [1/2]

iterator gsl::Vector::end | ( |  | ) |

Returns
  an STL compatible read-write iterator to the vector data pointing to the past end

## end() [2/2]

const_iterator gsl::Vector::end | ( |  | ) | const

Returns
  an STL compatible read-only iterator to the vector data pointing to the past end

## is_valid()

bool gsl::Vector::is_valid | ( |  | ) | const

## is_writable()

bool gsl::Vector::is_writable | ( |  | ) | const

## operator Vector::vector_const_pointer_type()

gsl::Vector::operator Vector::vector_const_pointer_type | ( |  | ) | const

vector const pointer type operator to enable transparent calls to the GSL APL

## operator Vector::vector_pointer_type()

gsl::Vector::operator Vector::vector_pointer_type | ( |  | ) |

vector pointer type operator to enable transparent calls to the GSL APL

## operator->() [1/2]

gsl_vector * gsl::Vector::operator-> | ( |  | ) |

Returns
  transparent read-write access to underlying gsl_vector structure

## operator->() [2/2]

const gsl_vector * gsl::Vector::operator-> | ( |  | ) | const

Returns
  transparent read-only access to underlying gsl_vector structure

## operator=() [1/2]

Vector & gsl::Vector::operator= | ( | const Vector & | other | ) |

Copy operator, does a deep copy of the internal data structures.

References Vector().

## operator=() [2/2]

Vector & gsl::Vector::operator= | ( | Vector && | other | ) |

Move operator, does move the internal data structure to the new object.

References Vector().

## operator[]() [1/2]

reference gsl::Vector::operator[] | ( | size_t | i | ) |

inline

Element read only access operator

Parameters

  i |

Returns
  reference to value

Definition at line 154 of file gsl_vector.hh.

## operator[]() [2/2]

value_type gsl::Vector::operator[] | ( | size_t | i | ) | const

inline

Element read only access operator

Parameters

  i |

Returns
  value

Definition at line 143 of file gsl_vector.hh.

## print()

void gsl::Vector::print | ( | std::ostream & | os | ) | const

Write the vector to a stream

Parameters

  os | the output stream

Referenced by gsl::operator<<().

## reset_holder() [1/2]

void gsl::Vector::reset_holder | ( | const gsl_vector * | holder | ) |

inline protected

Definition at line 189 of file gsl_vector.hh.

## reset_holder() [2/2]

void gsl::Vector::reset_holder | ( | gsl_vector * | holder | ) |

inline protected

Definition at line 183 of file gsl_vector.hh.

Referenced by gsl::VectorView::VectorView().

## size()

size_type gsl::Vector::size | ( |  | ) | const

Returns
  number of elements in the vector

Referenced by Vector(), and Vector().

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

- gsl_vector.hh