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

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

#include <matrix_ushort.hpp>

Collaboration diagram for gsl::matrix_ushort:
Collaboration graph

Classes

class  const_iterator_t
 A class template for the const iterators. More...
 
class  iterator_base
 We create a suitable class for iterator types here. More...
 
class  iterator_t
 A class template for the two non-const iterators. More...
 
struct  vector_ushort_ptr
 This is a pointer-like type for iterator return values. More...
 

Public Types

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 size_t size_type
 A container must have a size_type. More...
 

Public Member Functions

 matrix_ushort ()
 The default constructor is only really useful for assigning to. More...
 
 matrix_ushort (size_t const n1, size_t const n2)
 This constructor creates a new matrix_ushort with n1 rows and n2 columns. More...
 
 matrix_ushort (gsl_matrix_ushort *v)
 Could construct from a gsl_matrix_ushort. More...
 
 matrix_ushort (std::initializer_list< std::initializer_list< unsigned short > > initializer_list)
 Could construct from a std::initializer_list in C++11. More...
 
 matrix_ushort (matrix_ushort const &v)
 The copy constructor. More...
 
matrix_ushortoperator= (matrix_ushort const &v)
 The assignment operator. More...
 
matrix_ushort clone () const
 The clone function. More...
 
 ~matrix_ushort ()
 The destructor only deletes the pointers if count reaches zero. More...
 
void wrap_gsl_matrix_ushort_without_ownership (gsl_matrix_ushort *v)
 This function is intended mainly for internal use. More...
 
void reset ()
 Stop sharing ownership of the shared pointer. More...
 
 matrix_ushort (matrix_ushort &&v)
 Move constructor. More...
 
matrix_ushortoperator= (matrix_ushort &&v)
 Move operator. More...
 
iterator begin ()
 Get iterator pointing to first vector_ushort element. More...
 
const_iterator begin () const
 Get iterator pointing to first vector_ushort element. More...
 
iterator end ()
 Get iterator pointing beyond last vector_ushort element. More...
 
const_iterator end () const
 Get iterator pointing beyond last vector_ushort element. More...
 
reverse_iterator rbegin ()
 Get iterator pointing to first vector_ushort element. More...
 
const_reverse_iterator rbegin () const
 Get iterator pointing to first vector_ushort element. More...
 
reverse_iterator rend ()
 Get iterator pointing beyond last vector_ushort element. More...
 
const_reverse_iterator rend () const
 Get iterator pointing beyond last vector_ushort element. More...
 
size_t size1 () const
 The number of rows of the matrix_ushort. More...
 
size_t size2 () const
 The number of columns of the matrix_ushort. More...
 
unsigned short * data ()
 Give access to the data block_ushort. More...
 
unsigned short const * data () const
 Give access to the data block_ushort. More...
 
void swap (matrix_ushort &m)
 Swap two matrix_ushort objects. More...
 
void tricpy (CBLAS_UPLO_t Uplo, CBLAS_DIAG_t Diag, matrix_ushort const &src)
 Copy the upper or lower triangular part of matrix src to this. More...
 
void transpose_tricpy (CBLAS_UPLO_t Uplo, CBLAS_DIAG_t Diag, matrix_ushort const &src)
 Copy the upper or lower triangular part of matrix src to this. More...
 
matrix_ushort submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_ushort_submatrix(). More...
 
vector_ushort row (size_t const i)
 C++ version of gsl_matrix_ushort_row(). More...
 
vector_ushort column (size_t const j)
 C++ version of gsl_matrix_ushort_column(). More...
 
vector_ushort diagonal ()
 C++ version of gsl_matrix_ushort_diagonal(). More...
 
vector_ushort subdiagonal (size_t const k)
 C++ version of gsl_matrix_ushort_subdiagonal(). More...
 
vector_ushort superdiagonal (size_t const k)
 C++ version of gsl_matrix_ushort_superdiagonal(). More...
 
vector_ushort subrow (size_t const i, size_t const offset, size_t const n)
 C++ version of gsl_matrix_ushort_subrow(). More...
 
vector_ushort subcolumn (size_t const j, size_t const offset, size_t const n)
 C++ version of gsl_matrix_ushort_subcolumn(). More...
 
matrix_ushort const const_submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2) const
 C++ version of gsl_matrix_ushort_const_submatrix(). More...
 
vector_ushort const const_row (size_t const i) const
 C++ version of gsl_matrix_ushort_const_row(). More...
 
vector_ushort const const_column (size_t const j) const
 C++ version of gsl_matrix_ushort_const_column(). More...
 
vector_ushort const const_diagonal () const
 C++ version of gsl_matrix_ushort_const_diagonal(). More...
 
vector_ushort const const_subdiagonal (size_t const k) const
 C++ version of gsl_matrix_ushort_const_subdiagonal(). More...
 
vector_ushort const const_superdiagonal (size_t const k) const
 C++ version of gsl_matrix_ushort_const_superdiagonal(). More...
 
vector_ushort const const_subrow (size_t const i, size_t const offset, size_t const n) const
 C++ version of gsl_matrix_ushort_const_subrow(). More...
 
vector_ushort const const_subcolumn (size_t const j, size_t const offset, size_t const n) const
 C++ version of gsl_matrix_ushort_const_subcolumn(). More...
 
matrix_ushort const submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2) const
 Another C++ version of gsl_matrix_ushort_const_submatrix(). More...
 
vector_ushort const row (size_t const i) const
 Another C++ version of gsl_matrix_ushort_const_row(). More...
 
vector_ushort const column (size_t const j) const
 Another C++ version of gsl_matrix_ushort_const_column(). More...
 
vector_ushort const diagonal () const
 Another C++ version of gsl_matrix_ushort_const_diagonal(). More...
 
vector_ushort const subdiagonal (size_t const k) const
 Another C++ version of gsl_matrix_ushort_const_subdiagonal(). More...
 
vector_ushort const superdiagonal (size_t const k) const
 Another C++ version of gsl_matrix_ushort_const_superdiagonal(). More...
 
vector_ushort const subrow (size_t const i, size_t const offset, size_t const n) const
 Another C++ version of gsl_matrix_ushort_const_subrow(). More...
 
vector_ushort const subcolumn (size_t const j, size_t const offset, size_t const n) const
 Another C++ version of gsl_matrix_ushort_const_subcolumn(). More...
 
gsl_matrix_ushort * get ()
 Get the gsl_matrix_ushort. More...
 
gsl_matrix_ushort const * get () const
 Get the gsl_matrix_ushort. More...
 
bool unique () const
 Find if this is the only object sharing the gsl_matrix_ushort. More...
 
size_t use_count () const
 Find how many matrix_ushort objects share this pointer. More...
 
 operator bool () const
 Allow conversion to bool. More...
 
void set_zero ()
 C++ version of gsl_matrix_ushort_set_zero(). More...
 
void set_all (unsigned short x)
 C++ version of gsl_matrix_ushort_set_all(). More...
 
int memcpy (matrix_ushort const &src)
 C++ version of gsl_matrix_ushort_memcpy(). More...
 
unsigned short max () const
 C++ version of gsl_matrix_ushort_max(). More...
 
unsigned short min () const
 C++ version of gsl_matrix_ushort_min(). More...
 
void minmax (unsigned short *min_out, unsigned short *max_out) const
 C++ version of gsl_matrix_ushort_minmax(). More...
 
void minmax (unsigned short &min_out, unsigned short &max_out) const
 C++ version of gsl_matrix_ushort_minmax(). More...
 
int add (matrix_ushort const &b)
 C++ version of gsl_matrix_ushort_add(). More...
 
int sub (matrix_ushort const &b)
 C++ version of gsl_matrix_ushort_sub(). More...
 
int scale (unsigned short const x)
 C++ version of gsl_matrix_ushort_scale(). More...
 
int add_constant (unsigned short const x)
 C++ version of gsl_matrix_ushort_add_constant(). More...
 
int isnull () const
 C++ version of gsl_matrix_ushort_isnull(). More...
 
int ispos () const
 C++ version of gsl_matrix_ushort_ispos(). More...
 
int isneg () const
 C++ version of gsl_matrix_ushort_isneg(). More...
 
int isnonneg () const
 C++ version of gsl_matrix_ushort_isnonneg(). More...
 
unsigned short get (size_t const i, size_t const j) const
 C++ version of gsl_matrix_ushort_get(). More...
 
void set (size_t const i, size_t const j, unsigned short x)
 C++ version of gsl_matrix_ushort_set(). More...
 
unsigned short * ptr (size_t const i, size_t const j)
 C++ version of gsl_matrix_ushort_ptr(). More...
 
unsigned short const * const_ptr (size_t const i, size_t const j) const
 C++ version of gsl_matrix_ushort_const_ptr(). More...
 
int fread (FILE *stream)
 C++ version of gsl_matrix_ushort_fread(). More...
 
int fwrite (FILE *stream) const
 C++ version of gsl_matrix_ushort_fwrite(). More...
 
int fscanf (FILE *stream)
 C++ version of gsl_matrix_ushort_fscanf(). More...
 
int fprintf (FILE *stream, char const *format) const
 C++ version of gsl_matrix_ushort_fprintf(). More...
 
 matrix_ushort (block_ushort &b, size_t const offset, size_t const n1, size_t const n2, size_t const d2)
 C++ version of gsl_matrix_ushort_alloc_from_block(). More...
 
 matrix_ushort (matrix_ushort &m, size_t const k1, size_t const k2, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_ushort_alloc_from_matrix(). More...
 
void set_identity ()
 C++ version of gsl_matrix_ushort_set_identity(). More...
 
int swap_rows (size_t const i, size_t const j)
 C++ version of gsl_matrix_ushort_swap_rows(). More...
 
int swap_columns (size_t const i, size_t const j)
 C++ version of gsl_matrix_ushort_swap_columns(). More...
 
int swap_rowcol (size_t const i, size_t const j)
 C++ version of gsl_matrix_ushort_swap_rowcol(). More...
 
int transpose ()
 C++ version of gsl_matrix_ushort_transpose(). More...
 
int transpose_memcpy (matrix_ushort const &src)
 C++ version of gsl_matrix_ushort_transpose_memcpy(). More...
 
void max_index (size_t &imax, size_t &jmax) const
 C++ version of gsl_matrix_ushort_max_index(). More...
 
void min_index (size_t &imin, size_t &jmin) const
 C++ version of gsl_matrix_ushort_min_index(). More...
 
void minmax_index (size_t &imin, size_t &jmin, size_t &imax, size_t &jmax) const
 C++ version of gsl_matrix_ushort_minmax_index(). More...
 
int mul_elements (matrix_ushort const &b)
 C++ version of gsl_matrix_ushort_mul_elements(). More...
 
int div_elements (matrix_ushort const &b)
 C++ version of gsl_matrix_ushort_div_elements(). More...
 
unsigned short norm1 () const
 C++ version of gsl_matrix_ushort_norm1(). More...
 
int scale_rows (vector_ushort const &x)
 C++ version of gsl_matrix_ushort_scale_rows(). More...
 
int scale_columns (vector_ushort const &x)
 C++ version of gsl_matrix_ushort_scale_columns(). More...
 
int add_diagonal (unsigned short const x)
 C++ version of gsl_matrix_ushort_add_diagonal(). More...
 
int get_row (vector_ushort &v, size_t const i) const
 C++ version of gsl_matrix_ushort_get_row(). More...
 
int get_col (vector_ushort &v, size_t const j) const
 C++ version of gsl_matrix_ushort_get_col(). More...
 
int set_row (size_t const i, vector_ushort const &v)
 C++ version of gsl_matrix_ushort_set_row(). More...
 
int set_col (size_t const j, vector_ushort const &v)
 C++ version of gsl_matrix_ushort_set_col(). More...
 
vector_ushort operator[] (size_t const i)
 This function allows us to use a matrix_ushort like an array. More...
 
vector_ushort const operator[] (size_t const i) const
 This function allows us to use a matrix_ushort like an array. More...
 
int permute (permutation &p)
 Permute the columns of this by permutation p. More...
 

Static Public Member Functions

static matrix_ushort view_array (unsigned short *base, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_ushort_view_array(). More...
 
static matrix_ushort view_array_with_tda (unsigned short *base, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_ushort_view_array_with_tda(). More...
 
static matrix_ushort view_vector (vector_ushort &v, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_ushort_view_vector(). More...
 
static matrix_ushort view_vector_with_tda (vector_ushort &v, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_ushort_view_vector_with_tda(). More...
 
static matrix_ushort const const_view_array (unsigned short const *base, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_ushort_const_view_array(). More...
 
static matrix_ushort const const_view_array_with_tda (unsigned short const *base, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_ushort_const_view_array_with_tda(). More...
 
static matrix_ushort const const_view_vector (vector_ushort const &v, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_ushort_const_view_vector(). More...
 
static matrix_ushort const const_view_vector_with_tda (vector_ushort const &v, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_ushort_const_view_vector_with_tda(). More...
 
static matrix_ushort const view_array (unsigned short const *base, size_t const n1, size_t const n2)
 Another C++ version of gsl_matrix_ushort_const_view_array(). More...
 
static matrix_ushort const view_array_with_tda (unsigned short const *base, size_t const n1, size_t const n2, size_t const tda)
 Another C++ version of gsl_matrix_ushort_const_view_array_with_tda(). More...
 
static matrix_ushort const view_vector (vector_ushort const &v, size_t const n1, size_t const n2)
 Another C++ version of gsl_matrix_ushort_const_view_vector(). More...
 
static matrix_ushort const view_vector_with_tda (vector_ushort const &v, size_t const n1, size_t const n2, size_t const tda)
 Another C++ version of gsl_matrix_ushort_const_view_vector_with_tda(). More...
 
static matrix_ushort calloc (size_t const n1, size_t const n2)
 C++ version of gsl_matrix_ushort_calloc(). More...
 

Private Attributes

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

Detailed Description

This class handles matrix_ushort objects as shared handles.

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

Note that matrix_ushort_views are implemented as matrix_ushort objects here.

Note that in C++11 it is possible to iterate over the rows of a matrix_ushort using

for( auto row : matrix_ushort ){ ... }
This class handles matrix_ushort objects as shared handles.
vector_ushort row(size_t const i)
C++ version of gsl_matrix_ushort_row().

Otherwise,

...
}
A class template for the two non-const iterators.
iterator begin()
Get iterator pointing to first vector_ushort element.
iterator end()
Get iterator pointing beyond last vector_ushort element.
This class handles vector_ushort objects as shared handles.

will achieve the same effect. But if the element pointed to by i is used more than once, do not use

i-> ...

because each call of operator->() creates a new and different vector_ushort.

Definition at line 57 of file matrix_ushort.hpp.

Member Typedef Documentation

◆ const_iterator

The const_iterator type.

Definition at line 607 of file matrix_ushort.hpp.

◆ const_reverse_iterator

The const_reverse_t type.

Definition at line 615 of file matrix_ushort.hpp.

◆ iterator

The iterator type.

Definition at line 611 of file matrix_ushort.hpp.

◆ reverse_iterator

The reverse_iterator type.

Definition at line 619 of file matrix_ushort.hpp.

◆ size_type

A container must have a size_type.

Definition at line 623 of file matrix_ushort.hpp.

Constructor & Destructor Documentation

◆ matrix_ushort() [1/8]

gsl::matrix_ushort::matrix_ushort ( )
inline

◆ matrix_ushort() [2/8]

gsl::matrix_ushort::matrix_ushort ( size_t const  n1,
size_t const  n2 
)
inlineexplicit

This constructor creates a new matrix_ushort with n1 rows and n2 columns.

Parameters
n1The number of rows in the matrix_ushort
n2The number of columns in the matrix_ushort

Definition at line 74 of file matrix_ushort.hpp.

References ccgsl_pointer, and count.

◆ matrix_ushort() [3/8]

gsl::matrix_ushort::matrix_ushort ( gsl_matrix_ushort *  v)
inlineexplicit

Could construct from a gsl_matrix_ushort.

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

Parameters
vThe matrix_ushort

Definition at line 92 of file matrix_ushort.hpp.

References ccgsl_pointer, and count.

◆ matrix_ushort() [4/8]

gsl::matrix_ushort::matrix_ushort ( std::initializer_list< std::initializer_list< unsigned short > >  initializer_list)
inline

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

Parameters
initializer_listThe initializer_list.

Definition at line 103 of file matrix_ushort.hpp.

References ccgsl_pointer, count, gsl::exception::GSL_EBADLEN, row(), and set().

◆ matrix_ushort() [5/8]

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

The copy constructor.

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

Parameters
vThe matrix_ushort to copy.

Definition at line 136 of file matrix_ushort.hpp.

References count.

◆ ~matrix_ushort()

gsl::matrix_ushort::~matrix_ushort ( )
inline

The destructor only deletes the pointers if count reaches zero.

Definition at line 176 of file matrix_ushort.hpp.

References ccgsl_pointer, count, and owns_data.

◆ matrix_ushort() [6/8]

gsl::matrix_ushort::matrix_ushort ( matrix_ushort &&  v)
inline

Move constructor.

Parameters
vThe matrix_ushort to move.

Definition at line 218 of file matrix_ushort.hpp.

References count.

◆ matrix_ushort() [7/8]

gsl::matrix_ushort::matrix_ushort ( block_ushort b,
size_t const  offset,
size_t const  n1,
size_t const  n2,
size_t const  d2 
)
inline

C++ version of gsl_matrix_ushort_alloc_from_block().

Parameters
bThe block_ushort
offsetThe offset within the block_ushort
n1The number of rows in the matrix_ushort
n2The number of columns in the matrix_ushort
d2undocumented

Definition at line 1369 of file matrix_ushort.hpp.

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

◆ matrix_ushort() [8/8]

gsl::matrix_ushort::matrix_ushort ( matrix_ushort m,
size_t const  k1,
size_t const  k2,
size_t const  n1,
size_t const  n2 
)
inline

C++ version of gsl_matrix_ushort_alloc_from_matrix().

Parameters
mThe matrix_ushort
k1the row of m to take as row zero
k2the column of m to take as column zero
n1The number of rows in the matrix_ushort
n2The number of columns in the matrix_ushort

Definition at line 1387 of file matrix_ushort.hpp.

References ccgsl_pointer, count, and get().

Member Function Documentation

◆ add()

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

C++ version of gsl_matrix_ushort_add().

Parameters
bmatrix_ushort to add to this
Returns
error code on failure

Definition at line 1267 of file matrix_ushort.hpp.

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

◆ add_constant()

int gsl::matrix_ushort::add_constant ( unsigned short const  x)
inline

C++ version of gsl_matrix_ushort_add_constant().

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

Definition at line 1285 of file matrix_ushort.hpp.

References get().

◆ add_diagonal()

int gsl::matrix_ushort::add_diagonal ( unsigned short const  x)
inline

C++ version of gsl_matrix_ushort_add_diagonal().

Parameters
xA constant
Returns
error code on failure

Definition at line 1525 of file matrix_ushort.hpp.

References get().

◆ begin() [1/2]

iterator gsl::matrix_ushort::begin ( )
inline

Get iterator pointing to first vector_ushort element.

Returns
iterator pointing to first vector_ushort element

Definition at line 629 of file matrix_ushort.hpp.

◆ begin() [2/2]

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

Get iterator pointing to first vector_ushort element.

Returns
iterator pointing to first vector_ushort element

Definition at line 636 of file matrix_ushort.hpp.

◆ calloc()

static matrix_ushort gsl::matrix_ushort::calloc ( size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_ushort_calloc().

This constructs a matrix_ushort object with entries initialised to zero.

Parameters
n1The number of rows in the matrix_ushort
n2The number of columns in the matrix_ushort
Returns
A matrix_ushort initialised to zero

Definition at line 1222 of file matrix_ushort.hpp.

References matrix_ushort().

◆ clone()

matrix_ushort gsl::matrix_ushort::clone ( ) const
inline

The clone function.

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

Returns
a new copy of this.

Definition at line 165 of file matrix_ushort.hpp.

References get(), size1(), and size2().

◆ column() [1/2]

vector_ushort gsl::matrix_ushort::column ( size_t const  j)
inline

C++ version of gsl_matrix_ushort_column().

Parameters
jA column index
Returns
A column as a vector_ushort

Definition at line 784 of file matrix_ushort.hpp.

References get().

◆ column() [2/2]

vector_ushort const gsl::matrix_ushort::column ( size_t const  j) const
inline

Another C++ version of gsl_matrix_ushort_const_column().

Parameters
jA column index
Returns
A column as a vector_ushort

Definition at line 1007 of file matrix_ushort.hpp.

References get().

◆ const_column()

vector_ushort const gsl::matrix_ushort::const_column ( size_t const  j) const
inline

C++ version of gsl_matrix_ushort_const_column().

Parameters
jA column index
Returns
A column as a vector_ushort

Definition at line 921 of file matrix_ushort.hpp.

References get().

◆ const_diagonal()

vector_ushort const gsl::matrix_ushort::const_diagonal ( ) const
inline

C++ version of gsl_matrix_ushort_const_diagonal().

Returns
The principal diagonal as a vector_ushort

Definition at line 930 of file matrix_ushort.hpp.

References get().

◆ const_ptr()

unsigned short const * gsl::matrix_ushort::const_ptr ( size_t const  i,
size_t const  j 
) const
inline

C++ version of gsl_matrix_ushort_const_ptr().

Parameters
iindex of row
jindex of column
Returns
pointer to element

Definition at line 1333 of file matrix_ushort.hpp.

References get().

◆ const_row()

vector_ushort const gsl::matrix_ushort::const_row ( size_t const  i) const
inline

C++ version of gsl_matrix_ushort_const_row().

Parameters
iA row index
Returns
A row as a vector_ushort

Definition at line 911 of file matrix_ushort.hpp.

References get().

◆ const_subcolumn()

vector_ushort const gsl::matrix_ushort::const_subcolumn ( size_t const  j,
size_t const  offset,
size_t const  n 
) const
inline

C++ version of gsl_matrix_ushort_const_subcolumn().

Parameters
jA column index
offsetA row offset
nThe number of elements
Returns
A subcolumn as a vector_ushort

Definition at line 974 of file matrix_ushort.hpp.

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

◆ const_subdiagonal()

vector_ushort const gsl::matrix_ushort::const_subdiagonal ( size_t const  k) const
inline

C++ version of gsl_matrix_ushort_const_subdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_ushort

Definition at line 940 of file matrix_ushort.hpp.

References get().

◆ const_submatrix()

matrix_ushort const gsl::matrix_ushort::const_submatrix ( size_t const  i,
size_t const  j,
size_t const  n1,
size_t const  n2 
) const
inline

C++ version of gsl_matrix_ushort_const_submatrix().

Parameters
iIndex in this of first row of submatrix
jIndex in this of first column of submatrix
n1Number of rows of submatrix
n2Number of columns of submatrix
Returns
The submatrix

Definition at line 901 of file matrix_ushort.hpp.

References get(), and matrix_ushort().

◆ const_subrow()

vector_ushort const gsl::matrix_ushort::const_subrow ( size_t const  i,
size_t const  offset,
size_t const  n 
) const
inline

C++ version of gsl_matrix_ushort_const_subrow().

Parameters
iA row index
offsetA column offset
nThe number of elements
Returns
A subrow as a vector_ushort

Definition at line 962 of file matrix_ushort.hpp.

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

◆ const_superdiagonal()

vector_ushort const gsl::matrix_ushort::const_superdiagonal ( size_t const  k) const
inline

C++ version of gsl_matrix_ushort_const_superdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_ushort

Definition at line 950 of file matrix_ushort.hpp.

References get().

◆ const_view_array()

static matrix_ushort const gsl::matrix_ushort::const_view_array ( unsigned short const *  base,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_ushort_const_view_array().

Parameters
baseAn array of type unsigned short
n1The number of rows
n2The number of columns
Returns
A matrix_ushort

Definition at line 1072 of file matrix_ushort.hpp.

References matrix_ushort().

◆ const_view_array_with_tda()

static matrix_ushort const gsl::matrix_ushort::const_view_array_with_tda ( unsigned short const *  base,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_ushort_const_view_array_with_tda().

Parameters
baseAn array of type unsigned short
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_ushort

Definition at line 1086 of file matrix_ushort.hpp.

References matrix_ushort().

◆ const_view_vector()

static matrix_ushort const gsl::matrix_ushort::const_view_vector ( vector_ushort const &  v,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_ushort_const_view_vector().

Parameters
vA vector_ushort
n1The number of rows
n2The number of columns
Returns
A matrix_ushort

Definition at line 1098 of file matrix_ushort.hpp.

References gsl::vector_ushort::get(), and matrix_ushort().

◆ const_view_vector_with_tda()

static matrix_ushort const gsl::matrix_ushort::const_view_vector_with_tda ( vector_ushort const &  v,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_ushort_const_view_vector_with_tda().

Parameters
vA vector_ushort
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_ushort

Definition at line 1112 of file matrix_ushort.hpp.

References gsl::vector_ushort::get(), and matrix_ushort().

◆ data() [1/2]

unsigned short * gsl::matrix_ushort::data ( )
inline

Give access to the data block_ushort.

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 matrix_ushort size2 and tda are not equal. However, new matrix_ushort objects are always initialised to have tda and size2 equal.

Returns
The data block_ushort.

Definition at line 707 of file matrix_ushort.hpp.

References ccgsl_pointer.

◆ data() [2/2]

unsigned short const * gsl::matrix_ushort::data ( ) const
inline

Give access to the data block_ushort.

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 matrix_ushort size1 and tda are not equal. However, new matrix_ushort objects are always initialised to have tda and size2 equal.

Returns
The data block_ushort.

Definition at line 721 of file matrix_ushort.hpp.

References ccgsl_pointer.

◆ diagonal() [1/2]

vector_ushort gsl::matrix_ushort::diagonal ( )
inline

C++ version of gsl_matrix_ushort_diagonal().

Returns
The principal diagonal as a vector_ushort

Definition at line 794 of file matrix_ushort.hpp.

References get().

◆ diagonal() [2/2]

vector_ushort const gsl::matrix_ushort::diagonal ( ) const
inline

Another C++ version of gsl_matrix_ushort_const_diagonal().

Returns
The principal diagonal as a vector_ushort

Definition at line 1016 of file matrix_ushort.hpp.

References get().

◆ div_elements()

int gsl::matrix_ushort::div_elements ( matrix_ushort const &  b)
inline

C++ version of gsl_matrix_ushort_div_elements().

Divide each element of this by the corrsponding element of b

Parameters
bAnother matrix_ushort
Returns
error code on failure

Definition at line 1498 of file matrix_ushort.hpp.

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

◆ end() [1/2]

iterator gsl::matrix_ushort::end ( )
inline

Get iterator pointing beyond last vector_ushort element.

Returns
iterator pointing beyond last vector_ushort element

Definition at line 644 of file matrix_ushort.hpp.

References ccgsl_pointer, and size1().

◆ end() [2/2]

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

Get iterator pointing beyond last vector_ushort element.

Returns
iterator pointing beyond last vector_ushort element

Definition at line 652 of file matrix_ushort.hpp.

References ccgsl_pointer, and size1().

◆ fprintf()

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

C++ version of gsl_matrix_ushort_fprintf().

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

Definition at line 1359 of file matrix_ushort.hpp.

References get().

◆ fread()

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

C++ version of gsl_matrix_ushort_fread().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1340 of file matrix_ushort.hpp.

References get().

◆ fscanf()

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

C++ version of gsl_matrix_ushort_fscanf().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1352 of file matrix_ushort.hpp.

References get().

◆ fwrite()

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

C++ version of gsl_matrix_ushort_fwrite().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1346 of file matrix_ushort.hpp.

References get().

◆ get() [1/3]

◆ get() [2/3]

gsl_matrix_ushort const * gsl::matrix_ushort::get ( ) const
inline

Get the gsl_matrix_ushort.

Returns
the gsl_matrix_ushort

Definition at line 1193 of file matrix_ushort.hpp.

References ccgsl_pointer.

◆ get() [3/3]

unsigned short gsl::matrix_ushort::get ( size_t const  i,
size_t const  j 
) const
inline

C++ version of gsl_matrix_ushort_get().

Parameters
iindex of row
jindex of column
Returns
value of element

Definition at line 1312 of file matrix_ushort.hpp.

References get().

Referenced by get().

◆ get_col()

int gsl::matrix_ushort::get_col ( vector_ushort v,
size_t const  j 
) const
inline

C++ version of gsl_matrix_ushort_get_col().

Parameters
vA vector_ushort
jThe index of the column
Returns
error code on failure

Definition at line 1541 of file matrix_ushort.hpp.

References get(), and gsl::vector_ushort::get().

◆ get_row()

int gsl::matrix_ushort::get_row ( vector_ushort v,
size_t const  i 
) const
inline

C++ version of gsl_matrix_ushort_get_row().

Parameters
vA vector_ushort
iThe index of the row
Returns
error code on failure

Definition at line 1533 of file matrix_ushort.hpp.

References get(), and gsl::vector_ushort::get().

◆ isneg()

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

C++ version of gsl_matrix_ushort_isneg().

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

Definition at line 1300 of file matrix_ushort.hpp.

References get().

◆ isnonneg()

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

C++ version of gsl_matrix_ushort_isnonneg().

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

Definition at line 1305 of file matrix_ushort.hpp.

References get().

◆ isnull()

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

C++ version of gsl_matrix_ushort_isnull().

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

Definition at line 1290 of file matrix_ushort.hpp.

References get().

◆ ispos()

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

C++ version of gsl_matrix_ushort_ispos().

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

Definition at line 1295 of file matrix_ushort.hpp.

References get().

◆ max()

unsigned short gsl::matrix_ushort::max ( ) const
inline

C++ version of gsl_matrix_ushort_max().

Returns
maximum element of matrix_ushort

Definition at line 1242 of file matrix_ushort.hpp.

References get().

◆ max_index()

void gsl::matrix_ushort::max_index ( size_t &  imax,
size_t &  jmax 
) const
inline

C++ version of gsl_matrix_ushort_max_index().

Parameters
imaxrow index of the first maximum element in the matrix_ushort
jmaxcolumn index of the first maximum element in the matrix_ushort

Definition at line 1466 of file matrix_ushort.hpp.

References get().

◆ memcpy()

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

C++ version of gsl_matrix_ushort_memcpy().

Parameters
srcsource matrix_ushort
Returns
error code on failure

Definition at line 1237 of file matrix_ushort.hpp.

References get().

◆ min()

unsigned short gsl::matrix_ushort::min ( ) const
inline

C++ version of gsl_matrix_ushort_min().

Returns
minimum element of matrix_ushort

Definition at line 1247 of file matrix_ushort.hpp.

References get().

◆ min_index()

void gsl::matrix_ushort::min_index ( size_t &  imin,
size_t &  jmin 
) const
inline

C++ version of gsl_matrix_ushort_min_index().

Parameters
iminrow index of the first minimum element in the matrix_ushort
jmincolumn index of the first minimum element in the matrix_ushort

Definition at line 1473 of file matrix_ushort.hpp.

References get().

◆ minmax() [1/2]

void gsl::matrix_ushort::minmax ( unsigned short &  min_out,
unsigned short &  max_out 
) const
inline

C++ version of gsl_matrix_ushort_minmax().

Parameters
min_outminimum element of matrix_ushort
max_outmaximum element of matrix_ushort

Definition at line 1260 of file matrix_ushort.hpp.

References get().

◆ minmax() [2/2]

void gsl::matrix_ushort::minmax ( unsigned short *  min_out,
unsigned short *  max_out 
) const
inline

C++ version of gsl_matrix_ushort_minmax().

Parameters
min_outminimum element of matrix_ushort
max_outmaximum element of matrix_ushort

Definition at line 1253 of file matrix_ushort.hpp.

References get().

◆ minmax_index()

void gsl::matrix_ushort::minmax_index ( size_t &  imin,
size_t &  jmin,
size_t &  imax,
size_t &  jmax 
) const
inline

C++ version of gsl_matrix_ushort_minmax_index().

Parameters
iminrow index of the first minimum element in the matrix_ushort
jmincolumn index of the first minimum element in the matrix_ushort
imaxrow index of the first maximum element in the matrix_ushort
jmaxcolumn index of the first maximum element in the matrix_ushort

Definition at line 1482 of file matrix_ushort.hpp.

References get().

◆ mul_elements()

int gsl::matrix_ushort::mul_elements ( matrix_ushort const &  b)
inline

C++ version of gsl_matrix_ushort_mul_elements().

Multiply matrices elementwise.

Parameters
bAnother matrix_ushort
Returns
error code on failure

Definition at line 1490 of file matrix_ushort.hpp.

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

◆ norm1()

unsigned short gsl::matrix_ushort::norm1 ( ) const
inline

C++ version of gsl_matrix_ushort_norm1().

Returns
1-norm of matrix

Definition at line 1504 of file matrix_ushort.hpp.

References get().

◆ operator bool()

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

Allow conversion to bool.

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

Definition at line 1213 of file matrix_ushort.hpp.

References ccgsl_pointer.

◆ operator=() [1/2]

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

Move operator.

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

Definition at line 227 of file matrix_ushort.hpp.

References matrix_ushort().

◆ operator=() [2/2]

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

The assignment operator.

This makes a shared copy.

Parameters
vThe matrix_ushort to copy

Definition at line 145 of file matrix_ushort.hpp.

References ccgsl_pointer, count, and owns_data.

◆ operator[]() [1/2]

vector_ushort gsl::matrix_ushort::operator[] ( size_t const  i)
inline

This function allows us to use a matrix_ushort like an array.

Use with caution. Although matrix_ushort[i][j] is possible, it is less efficient than matrix_ushort::set(). The effect is the same as row().

Parameters
iThe index of the row
Returns
A vector_ushort representing a row

Definition at line 1567 of file matrix_ushort.hpp.

References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, size1(), and gsl::vector_ushort::wrap_gsl_vector_ushort_without_ownership().

◆ operator[]() [2/2]

vector_ushort const gsl::matrix_ushort::operator[] ( size_t const  i) const
inline

This function allows us to use a matrix_ushort like an array.

Use with caution. Although matrix_ushort[i][j] is possible, it is much less efficient than matrix_ushort::set(). The effect is the same as row()

Parameters
iThe index of the row
Returns
A vector_ushort representing a row

Definition at line 1601 of file matrix_ushort.hpp.

References ccgsl_pointer, gsl::exception::GSL_EFAULT, and gsl::vector_ushort::wrap_gsl_vector_ushort_without_ownership().

◆ permute()

int gsl::matrix_ushort::permute ( permutation p)
inline

Permute the columns of this by permutation p.

Parameters
pThe permutation
Returns
Error code on failure

Definition at line 1618 of file matrix_ushort.hpp.

References get(), and gsl::permutation::get().

◆ ptr()

unsigned short * gsl::matrix_ushort::ptr ( size_t const  i,
size_t const  j 
)
inline

C++ version of gsl_matrix_ushort_ptr().

Parameters
iindex of row
jindex of column
Returns
pointer to element

Definition at line 1326 of file matrix_ushort.hpp.

References get().

Referenced by gsl::matrix_ushort::iterator_base< container, content, reverse_t >::operator->().

◆ rbegin() [1/2]

reverse_iterator gsl::matrix_ushort::rbegin ( )
inline

Get iterator pointing to first vector_ushort element.

Returns
iterator pointing to first vector_ushort element

Definition at line 661 of file matrix_ushort.hpp.

References ccgsl_pointer, and size1().

◆ rbegin() [2/2]

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

Get iterator pointing to first vector_ushort element.

Returns
iterator pointing to first vector_ushort element

Definition at line 669 of file matrix_ushort.hpp.

References ccgsl_pointer, and size1().

◆ rend() [1/2]

reverse_iterator gsl::matrix_ushort::rend ( )
inline

Get iterator pointing beyond last vector_ushort element.

Returns
iterator pointing beyond last vector_ushort element

Definition at line 678 of file matrix_ushort.hpp.

◆ rend() [2/2]

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

Get iterator pointing beyond last vector_ushort element.

Returns
iterator pointing beyond last vector_ushort element

Definition at line 685 of file matrix_ushort.hpp.

◆ reset()

void gsl::matrix_ushort::reset ( )
inline

Stop sharing ownership of the shared pointer.

Definition at line 212 of file matrix_ushort.hpp.

References matrix_ushort().

◆ row() [1/2]

vector_ushort gsl::matrix_ushort::row ( size_t const  i)
inline

C++ version of gsl_matrix_ushort_row().

Parameters
iA row index
Returns
A row as a vector_ushort

Definition at line 774 of file matrix_ushort.hpp.

References get().

Referenced by matrix_ushort().

◆ row() [2/2]

vector_ushort const gsl::matrix_ushort::row ( size_t const  i) const
inline

Another C++ version of gsl_matrix_ushort_const_row().

Parameters
iA row index
Returns
A row as a vector_ushort

Definition at line 997 of file matrix_ushort.hpp.

References get().

◆ scale()

int gsl::matrix_ushort::scale ( unsigned short const  x)
inline

C++ version of gsl_matrix_ushort_scale().

Parameters
xconstant to multiply this by
Returns
error code on failure

Definition at line 1279 of file matrix_ushort.hpp.

References get().

◆ scale_columns()

int gsl::matrix_ushort::scale_columns ( vector_ushort const &  x)
inline

C++ version of gsl_matrix_ushort_scale_columns().

Parameters
xA scalar
Returns
Error code on failure

Definition at line 1518 of file matrix_ushort.hpp.

References get(), and gsl::vector_ushort::get().

◆ scale_rows()

int gsl::matrix_ushort::scale_rows ( vector_ushort const &  x)
inline

C++ version of gsl_matrix_ushort_scale_rows().

Parameters
xA scalar
Returns
Error code on failure

Definition at line 1511 of file matrix_ushort.hpp.

References get(), and gsl::vector_ushort::get().

◆ set()

void gsl::matrix_ushort::set ( size_t const  i,
size_t const  j,
unsigned short  x 
)
inline

C++ version of gsl_matrix_ushort_set().

Parameters
iindex of row
jindex of column
xnew value for element

Definition at line 1319 of file matrix_ushort.hpp.

References get().

Referenced by matrix_ushort().

◆ set_all()

void gsl::matrix_ushort::set_all ( unsigned short  x)
inline

C++ version of gsl_matrix_ushort_set_all().

Parameters
xThe value to which all elements are set

Definition at line 1231 of file matrix_ushort.hpp.

References get().

◆ set_col()

int gsl::matrix_ushort::set_col ( size_t const  j,
vector_ushort const &  v 
)
inline

C++ version of gsl_matrix_ushort_set_col().

Parameters
jThe index of the column
vA vector_ushort
Returns
error code on failure

Definition at line 1557 of file matrix_ushort.hpp.

References get(), and gsl::vector_ushort::get().

◆ set_identity()

void gsl::matrix_ushort::set_identity ( )
inline

C++ version of gsl_matrix_ushort_set_identity().

Definition at line 1401 of file matrix_ushort.hpp.

References get().

◆ set_row()

int gsl::matrix_ushort::set_row ( size_t const  i,
vector_ushort const &  v 
)
inline

C++ version of gsl_matrix_ushort_set_row().

Parameters
iThe index of the row
vA vector_ushort
Returns
error code on failure

Definition at line 1549 of file matrix_ushort.hpp.

References get(), and gsl::vector_ushort::get().

◆ set_zero()

void gsl::matrix_ushort::set_zero ( )
inline

C++ version of gsl_matrix_ushort_set_zero().

Definition at line 1226 of file matrix_ushort.hpp.

References get().

◆ size1()

size_t gsl::matrix_ushort::size1 ( ) const
inline

◆ size2()

size_t gsl::matrix_ushort::size2 ( ) const
inline

The number of columns of the matrix_ushort.

Returns
The number of columns of the matrix_ushort

Definition at line 699 of file matrix_ushort.hpp.

References ccgsl_pointer.

Referenced by clone().

◆ sub()

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

C++ version of gsl_matrix_ushort_sub().

Parameters
bmatrix_ushort to subtract from this
Returns
error code on failure

Definition at line 1273 of file matrix_ushort.hpp.

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

◆ subcolumn() [1/2]

vector_ushort gsl::matrix_ushort::subcolumn ( size_t const  j,
size_t const  offset,
size_t const  n 
)
inline

C++ version of gsl_matrix_ushort_subcolumn().

Parameters
jA column index
offsetA row offset
nThe number of elements
Returns
A subcolumn as a vector_ushort

Definition at line 837 of file matrix_ushort.hpp.

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

◆ subcolumn() [2/2]

vector_ushort const gsl::matrix_ushort::subcolumn ( size_t const  j,
size_t const  offset,
size_t const  n 
) const
inline

Another C++ version of gsl_matrix_ushort_const_subcolumn().

Parameters
jA column index
offsetA row offset
nThe number of elements
Returns
A subcolumn as a vector_ushort

Definition at line 1060 of file matrix_ushort.hpp.

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

◆ subdiagonal() [1/2]

vector_ushort gsl::matrix_ushort::subdiagonal ( size_t const  k)
inline

C++ version of gsl_matrix_ushort_subdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_ushort

Definition at line 803 of file matrix_ushort.hpp.

References get().

◆ subdiagonal() [2/2]

vector_ushort const gsl::matrix_ushort::subdiagonal ( size_t const  k) const
inline

Another C++ version of gsl_matrix_ushort_const_subdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_ushort

Definition at line 1026 of file matrix_ushort.hpp.

References get().

◆ submatrix() [1/2]

matrix_ushort gsl::matrix_ushort::submatrix ( size_t const  i,
size_t const  j,
size_t const  n1,
size_t const  n2 
)
inline

C++ version of gsl_matrix_ushort_submatrix().

Parameters
iIndex in this of first row of submatrix
jIndex in this of first column of submatrix
n1Number of rows of submatrix
n2Number of columns of submatrix
Returns
The submatrix

Definition at line 764 of file matrix_ushort.hpp.

References get(), and matrix_ushort().

◆ submatrix() [2/2]

matrix_ushort const gsl::matrix_ushort::submatrix ( size_t const  i,
size_t const  j,
size_t const  n1,
size_t const  n2 
) const
inline

Another C++ version of gsl_matrix_ushort_const_submatrix().

Parameters
iIndex in this of first row of submatrix
jIndex in this of first column of submatrix
n1Number of rows of submatrix
n2Number of columns of submatrix
Returns
The submatrix

Definition at line 987 of file matrix_ushort.hpp.

References get(), and matrix_ushort().

◆ subrow() [1/2]

vector_ushort gsl::matrix_ushort::subrow ( size_t const  i,
size_t const  offset,
size_t const  n 
)
inline

C++ version of gsl_matrix_ushort_subrow().

Parameters
iA row index
offsetA column offset
nThe number of elements
Returns
A subrow as a vector_ushort

Definition at line 825 of file matrix_ushort.hpp.

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

◆ subrow() [2/2]

vector_ushort const gsl::matrix_ushort::subrow ( size_t const  i,
size_t const  offset,
size_t const  n 
) const
inline

Another C++ version of gsl_matrix_ushort_const_subrow().

Parameters
iA row index
offsetA column offset
nThe number of elements
Returns
A subrow as a vector_ushort

Definition at line 1048 of file matrix_ushort.hpp.

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

◆ superdiagonal() [1/2]

vector_ushort gsl::matrix_ushort::superdiagonal ( size_t const  k)
inline

C++ version of gsl_matrix_ushort_superdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_ushort

Definition at line 813 of file matrix_ushort.hpp.

References get().

◆ superdiagonal() [2/2]

vector_ushort const gsl::matrix_ushort::superdiagonal ( size_t const  k) const
inline

Another C++ version of gsl_matrix_ushort_const_superdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_ushort

Definition at line 1036 of file matrix_ushort.hpp.

References get().

◆ swap()

void gsl::matrix_ushort::swap ( matrix_ushort m)
inline

Swap two matrix_ushort objects.

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

Parameters
mThe matrix_ushort to swap with this.

Definition at line 733 of file matrix_ushort.hpp.

References ccgsl_pointer, and count.

◆ swap_columns()

int gsl::matrix_ushort::swap_columns ( size_t const  i,
size_t const  j 
)
inline

C++ version of gsl_matrix_ushort_swap_columns().

Parameters
iIndex of first column
jIndex of second column
Returns
error code on failure

Definition at line 1415 of file matrix_ushort.hpp.

References get().

◆ swap_rowcol()

int gsl::matrix_ushort::swap_rowcol ( size_t const  i,
size_t const  j 
)
inline

C++ version of gsl_matrix_ushort_swap_rowcol().

Swap row and column in place. Matrix must be square.

Parameters
iindex of row
jindex of column
Returns
error code on failure

Definition at line 1423 of file matrix_ushort.hpp.

References get().

◆ swap_rows()

int gsl::matrix_ushort::swap_rows ( size_t const  i,
size_t const  j 
)
inline

C++ version of gsl_matrix_ushort_swap_rows().

Parameters
iIndex of first row
jIndex of second row
Returns
error code on failure

Definition at line 1408 of file matrix_ushort.hpp.

References get().

◆ transpose()

int gsl::matrix_ushort::transpose ( )
inline

C++ version of gsl_matrix_ushort_transpose().

Returns
error code on failure.

Definition at line 1428 of file matrix_ushort.hpp.

References get().

◆ transpose_memcpy()

int gsl::matrix_ushort::transpose_memcpy ( matrix_ushort const &  src)
inline

C++ version of gsl_matrix_ushort_transpose_memcpy().

Parameters
srcmatrix_ushort whose transpose it to be copied to this
Returns
error code on failure

Definition at line 1434 of file matrix_ushort.hpp.

References get().

◆ transpose_tricpy()

void gsl::matrix_ushort::transpose_tricpy ( CBLAS_UPLO_t  Uplo,
CBLAS_DIAG_t  Diag,
matrix_ushort const &  src 
)
inline

Copy the upper or lower triangular part of matrix src to this.

Parameters
UploUpper or lower triangle: CblasUpper or CBlasLower
DiagDiagonal type
srcThe matrix to copy from

Definition at line 752 of file matrix_ushort.hpp.

References get().

◆ tricpy()

void gsl::matrix_ushort::tricpy ( CBLAS_UPLO_t  Uplo,
CBLAS_DIAG_t  Diag,
matrix_ushort const &  src 
)
inline

Copy the upper or lower triangular part of matrix src to this.

Parameters
UploUpper or lower triangle: CblasUpper or CBlasLower
DiagDiagonal type
srcThe matrix to copy from

Definition at line 743 of file matrix_ushort.hpp.

References get().

◆ unique()

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

Find if this is the only object sharing the gsl_matrix_ushort.

Returns
true or falses according as this is the only matrix_ushort object sharing the gsl_matrix_ushort

Definition at line 1199 of file matrix_ushort.hpp.

References count.

◆ use_count()

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

Find how many matrix_ushort objects share this pointer.

Returns
the number of matrix_ushort objects that share this pointer

Definition at line 1204 of file matrix_ushort.hpp.

References count.

◆ view_array() [1/2]

static matrix_ushort gsl::matrix_ushort::view_array ( unsigned short *  base,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_ushort_view_array().

Parameters
baseAn array of type unsigned short
n1The number of rows
n2The number of columns
Returns
A matrix_ushort

Definition at line 849 of file matrix_ushort.hpp.

References matrix_ushort().

◆ view_array() [2/2]

static matrix_ushort const gsl::matrix_ushort::view_array ( unsigned short const *  base,
size_t const  n1,
size_t const  n2 
)
inlinestatic

Another C++ version of gsl_matrix_ushort_const_view_array().

Parameters
baseAn array of type unsigned short
n1The number of rows
n2The number of columns
Returns
A matrix_ushort

Definition at line 1124 of file matrix_ushort.hpp.

References matrix_ushort().

◆ view_array_with_tda() [1/2]

static matrix_ushort gsl::matrix_ushort::view_array_with_tda ( unsigned short *  base,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_ushort_view_array_with_tda().

Parameters
baseAn array of type unsigned short
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_ushort

Definition at line 862 of file matrix_ushort.hpp.

References matrix_ushort().

◆ view_array_with_tda() [2/2]

static matrix_ushort const gsl::matrix_ushort::view_array_with_tda ( unsigned short const *  base,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

Another C++ version of gsl_matrix_ushort_const_view_array_with_tda().

Parameters
baseAn array of type unsigned short
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_ushort

Definition at line 1138 of file matrix_ushort.hpp.

References matrix_ushort().

◆ view_vector() [1/2]

static matrix_ushort gsl::matrix_ushort::view_vector ( vector_ushort v,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_ushort_view_vector().

Parameters
vA vector_ushort
n1The number of rows
n2The number of columns
Returns
A matrix_ushort

Definition at line 874 of file matrix_ushort.hpp.

References gsl::vector_ushort::get(), and matrix_ushort().

◆ view_vector() [2/2]

static matrix_ushort const gsl::matrix_ushort::view_vector ( vector_ushort const &  v,
size_t const  n1,
size_t const  n2 
)
inlinestatic

Another C++ version of gsl_matrix_ushort_const_view_vector().

Parameters
vA vector_ushort
n1The number of rows
n2The number of columns
Returns
A matrix_ushort

Definition at line 1150 of file matrix_ushort.hpp.

References gsl::vector_ushort::get(), and matrix_ushort().

◆ view_vector_with_tda() [1/2]

static matrix_ushort gsl::matrix_ushort::view_vector_with_tda ( vector_ushort v,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_ushort_view_vector_with_tda().

Parameters
vA vector_ushort
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_ushort

Definition at line 887 of file matrix_ushort.hpp.

References gsl::vector_ushort::get(), and matrix_ushort().

◆ view_vector_with_tda() [2/2]

static matrix_ushort const gsl::matrix_ushort::view_vector_with_tda ( vector_ushort const &  v,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

Another C++ version of gsl_matrix_ushort_const_view_vector_with_tda().

Parameters
vA vector_ushort
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_ushort

Definition at line 1164 of file matrix_ushort.hpp.

References gsl::vector_ushort::get(), and matrix_ushort().

◆ wrap_gsl_matrix_ushort_without_ownership()

void gsl::matrix_ushort::wrap_gsl_matrix_ushort_without_ownership ( gsl_matrix_ushort *  v)
inline

This function is intended mainly for internal use.

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

Parameters
vThe gsl_matrix_ushort

Definition at line 196 of file matrix_ushort.hpp.

References ccgsl_pointer, count, and owns_data.

Member Data Documentation

◆ ccgsl_pointer

gsl_matrix_ushort* gsl::matrix_ushort::ccgsl_pointer
private

◆ count

size_t* gsl::matrix_ushort::count
private

The shared reference count.

Definition at line 1181 of file matrix_ushort.hpp.

Referenced by matrix_ushort(), operator=(), swap(), unique(), use_count(), wrap_gsl_matrix_ushort_without_ownership(), and ~matrix_ushort().

◆ owns_data

bool gsl::matrix_ushort::owns_data
private

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

Definition at line 1173 of file matrix_ushort.hpp.

Referenced by matrix_ushort(), operator=(), wrap_gsl_matrix_ushort_without_ownership(), and ~matrix_ushort().


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