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

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

#include <matrix_int.hpp>

Collaboration diagram for gsl::matrix_int:
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_int_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_int ()
 The default constructor is only really useful for assigning to. More...
 
 matrix_int (size_t const n1, size_t const n2)
 This constructor creates a new matrix_int with n1 rows and n2 columns. More...
 
 matrix_int (gsl_matrix_int *v)
 Could construct from a gsl_matrix_int. More...
 
 matrix_int (std::initializer_list< std::initializer_list< int > > initializer_list)
 Could construct from a std::initializer_list in C++11. More...
 
 matrix_int (matrix_int const &v)
 The copy constructor. More...
 
matrix_intoperator= (matrix_int const &v)
 The assignment operator. More...
 
matrix_int clone () const
 The clone function. More...
 
 ~matrix_int ()
 The destructor only deletes the pointers if count reaches zero. More...
 
void wrap_gsl_matrix_int_without_ownership (gsl_matrix_int *v)
 This function is intended mainly for internal use. More...
 
void reset ()
 Stop sharing ownership of the shared pointer. More...
 
 matrix_int (matrix_int &&v)
 Move constructor. More...
 
matrix_intoperator= (matrix_int &&v)
 Move operator. More...
 
iterator begin ()
 Get iterator pointing to first vector_int element. More...
 
const_iterator begin () const
 Get iterator pointing to first vector_int element. More...
 
iterator end ()
 Get iterator pointing beyond last vector_int element. More...
 
const_iterator end () const
 Get iterator pointing beyond last vector_int element. More...
 
reverse_iterator rbegin ()
 Get iterator pointing to first vector_int element. More...
 
const_reverse_iterator rbegin () const
 Get iterator pointing to first vector_int element. More...
 
reverse_iterator rend ()
 Get iterator pointing beyond last vector_int element. More...
 
const_reverse_iterator rend () const
 Get iterator pointing beyond last vector_int element. More...
 
size_t size1 () const
 The number of rows of the matrix_int. More...
 
size_t size2 () const
 The number of columns of the matrix_int. More...
 
int * data ()
 Give access to the data block_int. More...
 
int const * data () const
 Give access to the data block_int. More...
 
void swap (matrix_int &m)
 Swap two matrix_int objects. More...
 
void tricpy (CBLAS_UPLO_t Uplo, CBLAS_DIAG_t Diag, matrix_int 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_int const &src)
 Copy the upper or lower triangular part of matrix src to this. More...
 
matrix_int submatrix (size_t const i, size_t const j, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_int_submatrix(). More...
 
vector_int row (size_t const i)
 C++ version of gsl_matrix_int_row(). More...
 
vector_int column (size_t const j)
 C++ version of gsl_matrix_int_column(). More...
 
vector_int diagonal ()
 C++ version of gsl_matrix_int_diagonal(). More...
 
vector_int subdiagonal (size_t const k)
 C++ version of gsl_matrix_int_subdiagonal(). More...
 
vector_int superdiagonal (size_t const k)
 C++ version of gsl_matrix_int_superdiagonal(). More...
 
vector_int subrow (size_t const i, size_t const offset, size_t const n)
 C++ version of gsl_matrix_int_subrow(). More...
 
vector_int subcolumn (size_t const j, size_t const offset, size_t const n)
 C++ version of gsl_matrix_int_subcolumn(). More...
 
matrix_int 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_int_const_submatrix(). More...
 
vector_int const const_row (size_t const i) const
 C++ version of gsl_matrix_int_const_row(). More...
 
vector_int const const_column (size_t const j) const
 C++ version of gsl_matrix_int_const_column(). More...
 
vector_int const const_diagonal () const
 C++ version of gsl_matrix_int_const_diagonal(). More...
 
vector_int const const_subdiagonal (size_t const k) const
 C++ version of gsl_matrix_int_const_subdiagonal(). More...
 
vector_int const const_superdiagonal (size_t const k) const
 C++ version of gsl_matrix_int_const_superdiagonal(). More...
 
vector_int const const_subrow (size_t const i, size_t const offset, size_t const n) const
 C++ version of gsl_matrix_int_const_subrow(). More...
 
vector_int const const_subcolumn (size_t const j, size_t const offset, size_t const n) const
 C++ version of gsl_matrix_int_const_subcolumn(). More...
 
matrix_int 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_int_const_submatrix(). More...
 
vector_int const row (size_t const i) const
 Another C++ version of gsl_matrix_int_const_row(). More...
 
vector_int const column (size_t const j) const
 Another C++ version of gsl_matrix_int_const_column(). More...
 
vector_int const diagonal () const
 Another C++ version of gsl_matrix_int_const_diagonal(). More...
 
vector_int const subdiagonal (size_t const k) const
 Another C++ version of gsl_matrix_int_const_subdiagonal(). More...
 
vector_int const superdiagonal (size_t const k) const
 Another C++ version of gsl_matrix_int_const_superdiagonal(). More...
 
vector_int const subrow (size_t const i, size_t const offset, size_t const n) const
 Another C++ version of gsl_matrix_int_const_subrow(). More...
 
vector_int const subcolumn (size_t const j, size_t const offset, size_t const n) const
 Another C++ version of gsl_matrix_int_const_subcolumn(). More...
 
gsl_matrix_int * get ()
 Get the gsl_matrix_int. More...
 
gsl_matrix_int const * get () const
 Get the gsl_matrix_int. More...
 
bool unique () const
 Find if this is the only object sharing the gsl_matrix_int. More...
 
size_t use_count () const
 Find how many matrix_int objects share this pointer. More...
 
 operator bool () const
 Allow conversion to bool. More...
 
void set_zero ()
 C++ version of gsl_matrix_int_set_zero(). More...
 
void set_all (int x)
 C++ version of gsl_matrix_int_set_all(). More...
 
int memcpy (matrix_int const &src)
 C++ version of gsl_matrix_int_memcpy(). More...
 
int max () const
 C++ version of gsl_matrix_int_max(). More...
 
int min () const
 C++ version of gsl_matrix_int_min(). More...
 
void minmax (int *min_out, int *max_out) const
 C++ version of gsl_matrix_int_minmax(). More...
 
void minmax (int &min_out, int &max_out) const
 C++ version of gsl_matrix_int_minmax(). More...
 
int add (matrix_int const &b)
 C++ version of gsl_matrix_int_add(). More...
 
int sub (matrix_int const &b)
 C++ version of gsl_matrix_int_sub(). More...
 
int scale (int const x)
 C++ version of gsl_matrix_int_scale(). More...
 
int add_constant (int const x)
 C++ version of gsl_matrix_int_add_constant(). More...
 
int isnull () const
 C++ version of gsl_matrix_int_isnull(). More...
 
int ispos () const
 C++ version of gsl_matrix_int_ispos(). More...
 
int isneg () const
 C++ version of gsl_matrix_int_isneg(). More...
 
int isnonneg () const
 C++ version of gsl_matrix_int_isnonneg(). More...
 
int get (size_t const i, size_t const j) const
 C++ version of gsl_matrix_int_get(). More...
 
void set (size_t const i, size_t const j, int x)
 C++ version of gsl_matrix_int_set(). More...
 
int * ptr (size_t const i, size_t const j)
 C++ version of gsl_matrix_int_ptr(). More...
 
int const * const_ptr (size_t const i, size_t const j) const
 C++ version of gsl_matrix_int_const_ptr(). More...
 
int fread (FILE *stream)
 C++ version of gsl_matrix_int_fread(). More...
 
int fwrite (FILE *stream) const
 C++ version of gsl_matrix_int_fwrite(). More...
 
int fscanf (FILE *stream)
 C++ version of gsl_matrix_int_fscanf(). More...
 
int fprintf (FILE *stream, char const *format) const
 C++ version of gsl_matrix_int_fprintf(). More...
 
 matrix_int (block_int &b, size_t const offset, size_t const n1, size_t const n2, size_t const d2)
 C++ version of gsl_matrix_int_alloc_from_block(). More...
 
 matrix_int (matrix_int &m, size_t const k1, size_t const k2, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_int_alloc_from_matrix(). More...
 
void set_identity ()
 C++ version of gsl_matrix_int_set_identity(). More...
 
int swap_rows (size_t const i, size_t const j)
 C++ version of gsl_matrix_int_swap_rows(). More...
 
int swap_columns (size_t const i, size_t const j)
 C++ version of gsl_matrix_int_swap_columns(). More...
 
int swap_rowcol (size_t const i, size_t const j)
 C++ version of gsl_matrix_int_swap_rowcol(). More...
 
int transpose ()
 C++ version of gsl_matrix_int_transpose(). More...
 
int transpose_memcpy (matrix_int const &src)
 C++ version of gsl_matrix_int_transpose_memcpy(). More...
 
void max_index (size_t &imax, size_t &jmax) const
 C++ version of gsl_matrix_int_max_index(). More...
 
void min_index (size_t &imin, size_t &jmin) const
 C++ version of gsl_matrix_int_min_index(). More...
 
void minmax_index (size_t &imin, size_t &jmin, size_t &imax, size_t &jmax) const
 C++ version of gsl_matrix_int_minmax_index(). More...
 
int mul_elements (matrix_int const &b)
 C++ version of gsl_matrix_int_mul_elements(). More...
 
int div_elements (matrix_int const &b)
 C++ version of gsl_matrix_int_div_elements(). More...
 
int norm1 () const
 C++ version of gsl_matrix_int_norm1(). More...
 
int scale_rows (vector_int const &x)
 C++ version of gsl_matrix_int_scale_rows(). More...
 
int scale_columns (vector_int const &x)
 C++ version of gsl_matrix_int_scale_columns(). More...
 
int add_diagonal (int const x)
 C++ version of gsl_matrix_int_add_diagonal(). More...
 
int get_row (vector_int &v, size_t const i) const
 C++ version of gsl_matrix_int_get_row(). More...
 
int get_col (vector_int &v, size_t const j) const
 C++ version of gsl_matrix_int_get_col(). More...
 
int set_row (size_t const i, vector_int const &v)
 C++ version of gsl_matrix_int_set_row(). More...
 
int set_col (size_t const j, vector_int const &v)
 C++ version of gsl_matrix_int_set_col(). More...
 
vector_int operator[] (size_t const i)
 This function allows us to use a matrix_int like an array. More...
 
vector_int const operator[] (size_t const i) const
 This function allows us to use a matrix_int like an array. More...
 
int permute (permutation &p)
 Permute the columns of this by permutation p. More...
 

Static Public Member Functions

static matrix_int view_array (int *base, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_int_view_array(). More...
 
static matrix_int view_array_with_tda (int *base, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_int_view_array_with_tda(). More...
 
static matrix_int view_vector (vector_int &v, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_int_view_vector(). More...
 
static matrix_int view_vector_with_tda (vector_int &v, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_int_view_vector_with_tda(). More...
 
static matrix_int const const_view_array (int const *base, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_int_const_view_array(). More...
 
static matrix_int const const_view_array_with_tda (int const *base, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_int_const_view_array_with_tda(). More...
 
static matrix_int const const_view_vector (vector_int const &v, size_t const n1, size_t const n2)
 C++ version of gsl_matrix_int_const_view_vector(). More...
 
static matrix_int const const_view_vector_with_tda (vector_int const &v, size_t const n1, size_t const n2, size_t const tda)
 C++ version of gsl_matrix_int_const_view_vector_with_tda(). More...
 
static matrix_int const view_array (int const *base, size_t const n1, size_t const n2)
 Another C++ version of gsl_matrix_int_const_view_array(). More...
 
static matrix_int const view_array_with_tda (int const *base, size_t const n1, size_t const n2, size_t const tda)
 Another C++ version of gsl_matrix_int_const_view_array_with_tda(). More...
 
static matrix_int const view_vector (vector_int const &v, size_t const n1, size_t const n2)
 Another C++ version of gsl_matrix_int_const_view_vector(). More...
 
static matrix_int const view_vector_with_tda (vector_int const &v, size_t const n1, size_t const n2, size_t const tda)
 Another C++ version of gsl_matrix_int_const_view_vector_with_tda(). More...
 
static matrix_int calloc (size_t const n1, size_t const n2)
 C++ version of gsl_matrix_int_calloc(). More...
 

Private Attributes

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

Detailed Description

This class handles matrix_int objects as shared handles.

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

Note that matrix_int_views are implemented as matrix_int objects here.

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

for( auto row : matrix_int ){ ... }
This class handles matrix_int objects as shared handles.
Definition: matrix_int.hpp:57
vector_int row(size_t const i)
C++ version of gsl_matrix_int_row().
Definition: matrix_int.hpp:775

Otherwise,

...
}
A class template for the two non-const iterators.
Definition: matrix_int.hpp:408
iterator begin()
Get iterator pointing to first vector_int element.
Definition: matrix_int.hpp:630
iterator end()
Get iterator pointing beyond last vector_int element.
Definition: matrix_int.hpp:645
This class handles vector_int objects as shared handles.
Definition: vector_int.hpp:45

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

Definition at line 57 of file matrix_int.hpp.

Member Typedef Documentation

◆ const_iterator

The const_iterator type.

Definition at line 608 of file matrix_int.hpp.

◆ const_reverse_iterator

The const_reverse_t type.

Definition at line 616 of file matrix_int.hpp.

◆ iterator

The iterator type.

Definition at line 612 of file matrix_int.hpp.

◆ reverse_iterator

The reverse_iterator type.

Definition at line 620 of file matrix_int.hpp.

◆ size_type

A container must have a size_type.

Definition at line 624 of file matrix_int.hpp.

Constructor & Destructor Documentation

◆ matrix_int() [1/8]

gsl::matrix_int::matrix_int ( )
inline

◆ matrix_int() [2/8]

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

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

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

Definition at line 74 of file matrix_int.hpp.

References ccgsl_pointer, and count.

◆ matrix_int() [3/8]

gsl::matrix_int::matrix_int ( gsl_matrix_int *  v)
inlineexplicit

Could construct from a gsl_matrix_int.

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

Parameters
vThe matrix_int

Definition at line 92 of file matrix_int.hpp.

References ccgsl_pointer, and count.

◆ matrix_int() [4/8]

gsl::matrix_int::matrix_int ( std::initializer_list< std::initializer_list< int > >  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_int.hpp.

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

◆ matrix_int() [5/8]

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

The copy constructor.

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

Parameters
vThe matrix_int to copy.

Definition at line 136 of file matrix_int.hpp.

References count.

◆ ~matrix_int()

gsl::matrix_int::~matrix_int ( )
inline

The destructor only deletes the pointers if count reaches zero.

Definition at line 176 of file matrix_int.hpp.

References ccgsl_pointer, count, and owns_data.

◆ matrix_int() [6/8]

gsl::matrix_int::matrix_int ( matrix_int &&  v)
inline

Move constructor.

Parameters
vThe matrix_int to move.

Definition at line 218 of file matrix_int.hpp.

References count.

◆ matrix_int() [7/8]

gsl::matrix_int::matrix_int ( block_int b,
size_t const  offset,
size_t const  n1,
size_t const  n2,
size_t const  d2 
)
inline

C++ version of gsl_matrix_int_alloc_from_block().

Parameters
bThe block_int
offsetThe offset within the block_int
n1The number of rows in the matrix_int
n2The number of columns in the matrix_int
d2undocumented

Definition at line 1370 of file matrix_int.hpp.

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

◆ matrix_int() [8/8]

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

C++ version of gsl_matrix_int_alloc_from_matrix().

Parameters
mThe matrix_int
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_int
n2The number of columns in the matrix_int

Definition at line 1388 of file matrix_int.hpp.

References ccgsl_pointer, count, and get().

Member Function Documentation

◆ add()

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

C++ version of gsl_matrix_int_add().

Parameters
bmatrix_int to add to this
Returns
error code on failure

Definition at line 1268 of file matrix_int.hpp.

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

◆ add_constant()

int gsl::matrix_int::add_constant ( int const  x)
inline

C++ version of gsl_matrix_int_add_constant().

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

Definition at line 1286 of file matrix_int.hpp.

References get().

◆ add_diagonal()

int gsl::matrix_int::add_diagonal ( int const  x)
inline

C++ version of gsl_matrix_int_add_diagonal().

Parameters
xA constant
Returns
error code on failure

Definition at line 1526 of file matrix_int.hpp.

References get().

◆ begin() [1/2]

iterator gsl::matrix_int::begin ( )
inline

Get iterator pointing to first vector_int element.

Returns
iterator pointing to first vector_int element

Definition at line 630 of file matrix_int.hpp.

◆ begin() [2/2]

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

Get iterator pointing to first vector_int element.

Returns
iterator pointing to first vector_int element

Definition at line 637 of file matrix_int.hpp.

◆ calloc()

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

C++ version of gsl_matrix_int_calloc().

This constructs a matrix_int object with entries initialised to zero.

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

Definition at line 1223 of file matrix_int.hpp.

References matrix_int().

◆ clone()

matrix_int gsl::matrix_int::clone ( ) const
inline

The clone function.

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

Returns
a new copy of this.

Definition at line 165 of file matrix_int.hpp.

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

◆ column() [1/2]

vector_int gsl::matrix_int::column ( size_t const  j)
inline

C++ version of gsl_matrix_int_column().

Parameters
jA column index
Returns
A column as a vector_int

Definition at line 785 of file matrix_int.hpp.

References get().

◆ column() [2/2]

vector_int const gsl::matrix_int::column ( size_t const  j) const
inline

Another C++ version of gsl_matrix_int_const_column().

Parameters
jA column index
Returns
A column as a vector_int

Definition at line 1008 of file matrix_int.hpp.

References get().

◆ const_column()

vector_int const gsl::matrix_int::const_column ( size_t const  j) const
inline

C++ version of gsl_matrix_int_const_column().

Parameters
jA column index
Returns
A column as a vector_int

Definition at line 922 of file matrix_int.hpp.

References get().

◆ const_diagonal()

vector_int const gsl::matrix_int::const_diagonal ( ) const
inline

C++ version of gsl_matrix_int_const_diagonal().

Returns
The principal diagonal as a vector_int

Definition at line 931 of file matrix_int.hpp.

References get().

◆ const_ptr()

int const * gsl::matrix_int::const_ptr ( size_t const  i,
size_t const  j 
) const
inline

C++ version of gsl_matrix_int_const_ptr().

Parameters
iindex of row
jindex of column
Returns
pointer to element

Definition at line 1334 of file matrix_int.hpp.

References get().

◆ const_row()

vector_int const gsl::matrix_int::const_row ( size_t const  i) const
inline

C++ version of gsl_matrix_int_const_row().

Parameters
iA row index
Returns
A row as a vector_int

Definition at line 912 of file matrix_int.hpp.

References get().

◆ const_subcolumn()

vector_int const gsl::matrix_int::const_subcolumn ( size_t const  j,
size_t const  offset,
size_t const  n 
) const
inline

C++ version of gsl_matrix_int_const_subcolumn().

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

Definition at line 975 of file matrix_int.hpp.

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

◆ const_subdiagonal()

vector_int const gsl::matrix_int::const_subdiagonal ( size_t const  k) const
inline

C++ version of gsl_matrix_int_const_subdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_int

Definition at line 941 of file matrix_int.hpp.

References get().

◆ const_submatrix()

matrix_int const gsl::matrix_int::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_int_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 902 of file matrix_int.hpp.

References get(), and matrix_int().

◆ const_subrow()

vector_int const gsl::matrix_int::const_subrow ( size_t const  i,
size_t const  offset,
size_t const  n 
) const
inline

C++ version of gsl_matrix_int_const_subrow().

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

Definition at line 963 of file matrix_int.hpp.

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

◆ const_superdiagonal()

vector_int const gsl::matrix_int::const_superdiagonal ( size_t const  k) const
inline

C++ version of gsl_matrix_int_const_superdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_int

Definition at line 951 of file matrix_int.hpp.

References get().

◆ const_view_array()

static matrix_int const gsl::matrix_int::const_view_array ( int const *  base,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_int_const_view_array().

Parameters
baseAn array of type int
n1The number of rows
n2The number of columns
Returns
A matrix_int

Definition at line 1073 of file matrix_int.hpp.

References matrix_int().

◆ const_view_array_with_tda()

static matrix_int const gsl::matrix_int::const_view_array_with_tda ( int const *  base,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_int_const_view_array_with_tda().

Parameters
baseAn array of type int
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_int

Definition at line 1087 of file matrix_int.hpp.

References matrix_int().

◆ const_view_vector()

static matrix_int const gsl::matrix_int::const_view_vector ( vector_int const &  v,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_int_const_view_vector().

Parameters
vA vector_int
n1The number of rows
n2The number of columns
Returns
A matrix_int

Definition at line 1099 of file matrix_int.hpp.

References gsl::vector_int::get(), and matrix_int().

◆ const_view_vector_with_tda()

static matrix_int const gsl::matrix_int::const_view_vector_with_tda ( vector_int const &  v,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_int_const_view_vector_with_tda().

Parameters
vA vector_int
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_int

Definition at line 1113 of file matrix_int.hpp.

References gsl::vector_int::get(), and matrix_int().

◆ data() [1/2]

int * gsl::matrix_int::data ( )
inline

Give access to the data block_int.

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

Returns
The data block_int.

Definition at line 708 of file matrix_int.hpp.

References ccgsl_pointer.

◆ data() [2/2]

int const * gsl::matrix_int::data ( ) const
inline

Give access to the data block_int.

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

Returns
The data block_int.

Definition at line 722 of file matrix_int.hpp.

References ccgsl_pointer.

◆ diagonal() [1/2]

vector_int gsl::matrix_int::diagonal ( )
inline

C++ version of gsl_matrix_int_diagonal().

Returns
The principal diagonal as a vector_int

Definition at line 795 of file matrix_int.hpp.

References get().

◆ diagonal() [2/2]

vector_int const gsl::matrix_int::diagonal ( ) const
inline

Another C++ version of gsl_matrix_int_const_diagonal().

Returns
The principal diagonal as a vector_int

Definition at line 1017 of file matrix_int.hpp.

References get().

◆ div_elements()

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

C++ version of gsl_matrix_int_div_elements().

Divide each element of this by the corrsponding element of b

Parameters
bAnother matrix_int
Returns
error code on failure

Definition at line 1499 of file matrix_int.hpp.

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

◆ end() [1/2]

iterator gsl::matrix_int::end ( )
inline

Get iterator pointing beyond last vector_int element.

Returns
iterator pointing beyond last vector_int element

Definition at line 645 of file matrix_int.hpp.

References ccgsl_pointer, and size1().

◆ end() [2/2]

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

Get iterator pointing beyond last vector_int element.

Returns
iterator pointing beyond last vector_int element

Definition at line 653 of file matrix_int.hpp.

References ccgsl_pointer, and size1().

◆ fprintf()

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

C++ version of gsl_matrix_int_fprintf().

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

Definition at line 1360 of file matrix_int.hpp.

References get().

◆ fread()

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

C++ version of gsl_matrix_int_fread().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1341 of file matrix_int.hpp.

References get().

◆ fscanf()

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

C++ version of gsl_matrix_int_fscanf().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1353 of file matrix_int.hpp.

References get().

◆ fwrite()

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

C++ version of gsl_matrix_int_fwrite().

Parameters
streamA C file stream
Returns
error code on failure

Definition at line 1347 of file matrix_int.hpp.

References get().

◆ get() [1/3]

◆ get() [2/3]

gsl_matrix_int const * gsl::matrix_int::get ( ) const
inline

Get the gsl_matrix_int.

Returns
the gsl_matrix_int

Definition at line 1194 of file matrix_int.hpp.

References ccgsl_pointer.

◆ get() [3/3]

int gsl::matrix_int::get ( size_t const  i,
size_t const  j 
) const
inline

C++ version of gsl_matrix_int_get().

Parameters
iindex of row
jindex of column
Returns
value of element

Definition at line 1313 of file matrix_int.hpp.

References get().

Referenced by get().

◆ get_col()

int gsl::matrix_int::get_col ( vector_int v,
size_t const  j 
) const
inline

C++ version of gsl_matrix_int_get_col().

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

Definition at line 1542 of file matrix_int.hpp.

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

◆ get_row()

int gsl::matrix_int::get_row ( vector_int v,
size_t const  i 
) const
inline

C++ version of gsl_matrix_int_get_row().

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

Definition at line 1534 of file matrix_int.hpp.

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

◆ isneg()

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

C++ version of gsl_matrix_int_isneg().

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

Definition at line 1301 of file matrix_int.hpp.

References get().

◆ isnonneg()

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

C++ version of gsl_matrix_int_isnonneg().

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

Definition at line 1306 of file matrix_int.hpp.

References get().

◆ isnull()

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

C++ version of gsl_matrix_int_isnull().

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

Definition at line 1291 of file matrix_int.hpp.

References get().

◆ ispos()

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

C++ version of gsl_matrix_int_ispos().

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

Definition at line 1296 of file matrix_int.hpp.

References get().

◆ max()

int gsl::matrix_int::max ( ) const
inline

C++ version of gsl_matrix_int_max().

Returns
maximum element of matrix_int

Definition at line 1243 of file matrix_int.hpp.

References get().

◆ max_index()

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

C++ version of gsl_matrix_int_max_index().

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

Definition at line 1467 of file matrix_int.hpp.

References get().

◆ memcpy()

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

C++ version of gsl_matrix_int_memcpy().

Parameters
srcsource matrix_int
Returns
error code on failure

Definition at line 1238 of file matrix_int.hpp.

References get().

◆ min()

int gsl::matrix_int::min ( ) const
inline

C++ version of gsl_matrix_int_min().

Returns
minimum element of matrix_int

Definition at line 1248 of file matrix_int.hpp.

References get().

◆ min_index()

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

C++ version of gsl_matrix_int_min_index().

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

Definition at line 1474 of file matrix_int.hpp.

References get().

◆ minmax() [1/2]

void gsl::matrix_int::minmax ( int &  min_out,
int &  max_out 
) const
inline

C++ version of gsl_matrix_int_minmax().

Parameters
min_outminimum element of matrix_int
max_outmaximum element of matrix_int

Definition at line 1261 of file matrix_int.hpp.

References get().

◆ minmax() [2/2]

void gsl::matrix_int::minmax ( int *  min_out,
int *  max_out 
) const
inline

C++ version of gsl_matrix_int_minmax().

Parameters
min_outminimum element of matrix_int
max_outmaximum element of matrix_int

Definition at line 1254 of file matrix_int.hpp.

References get().

◆ minmax_index()

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

C++ version of gsl_matrix_int_minmax_index().

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

Definition at line 1483 of file matrix_int.hpp.

References get().

◆ mul_elements()

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

C++ version of gsl_matrix_int_mul_elements().

Multiply matrices elementwise.

Parameters
bAnother matrix_int
Returns
error code on failure

Definition at line 1491 of file matrix_int.hpp.

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

◆ norm1()

int gsl::matrix_int::norm1 ( ) const
inline

C++ version of gsl_matrix_int_norm1().

Returns
1-norm of matrix

Definition at line 1505 of file matrix_int.hpp.

References get().

◆ operator bool()

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

Allow conversion to bool.

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

Definition at line 1214 of file matrix_int.hpp.

References ccgsl_pointer.

◆ operator=() [1/2]

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

Move operator.

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

Definition at line 228 of file matrix_int.hpp.

References matrix_int().

◆ operator=() [2/2]

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

The assignment operator.

This makes a shared copy.

Parameters
vThe matrix_int to copy

Definition at line 145 of file matrix_int.hpp.

References ccgsl_pointer, count, and owns_data.

◆ operator[]() [1/2]

vector_int gsl::matrix_int::operator[] ( size_t const  i)
inline

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

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

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

Definition at line 1568 of file matrix_int.hpp.

References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, size1(), and gsl::vector_int::wrap_gsl_vector_int_without_ownership().

◆ operator[]() [2/2]

vector_int const gsl::matrix_int::operator[] ( size_t const  i) const
inline

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

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

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

Definition at line 1602 of file matrix_int.hpp.

References ccgsl_pointer, gsl::exception::GSL_EFAULT, and gsl::vector_int::wrap_gsl_vector_int_without_ownership().

◆ permute()

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

Permute the columns of this by permutation p.

Parameters
pThe permutation
Returns
Error code on failure

Definition at line 1619 of file matrix_int.hpp.

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

◆ ptr()

int * gsl::matrix_int::ptr ( size_t const  i,
size_t const  j 
)
inline

C++ version of gsl_matrix_int_ptr().

Parameters
iindex of row
jindex of column
Returns
pointer to element

Definition at line 1327 of file matrix_int.hpp.

References get().

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

◆ rbegin() [1/2]

reverse_iterator gsl::matrix_int::rbegin ( )
inline

Get iterator pointing to first vector_int element.

Returns
iterator pointing to first vector_int element

Definition at line 662 of file matrix_int.hpp.

References ccgsl_pointer, and size1().

◆ rbegin() [2/2]

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

Get iterator pointing to first vector_int element.

Returns
iterator pointing to first vector_int element

Definition at line 670 of file matrix_int.hpp.

References ccgsl_pointer, and size1().

◆ rend() [1/2]

reverse_iterator gsl::matrix_int::rend ( )
inline

Get iterator pointing beyond last vector_int element.

Returns
iterator pointing beyond last vector_int element

Definition at line 679 of file matrix_int.hpp.

◆ rend() [2/2]

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

Get iterator pointing beyond last vector_int element.

Returns
iterator pointing beyond last vector_int element

Definition at line 686 of file matrix_int.hpp.

◆ reset()

void gsl::matrix_int::reset ( )
inline

Stop sharing ownership of the shared pointer.

Definition at line 212 of file matrix_int.hpp.

References matrix_int().

◆ row() [1/2]

vector_int gsl::matrix_int::row ( size_t const  i)
inline

C++ version of gsl_matrix_int_row().

Parameters
iA row index
Returns
A row as a vector_int

Definition at line 775 of file matrix_int.hpp.

References get().

Referenced by matrix_int().

◆ row() [2/2]

vector_int const gsl::matrix_int::row ( size_t const  i) const
inline

Another C++ version of gsl_matrix_int_const_row().

Parameters
iA row index
Returns
A row as a vector_int

Definition at line 998 of file matrix_int.hpp.

References get().

◆ scale()

int gsl::matrix_int::scale ( int const  x)
inline

C++ version of gsl_matrix_int_scale().

Parameters
xconstant to multiply this by
Returns
error code on failure

Definition at line 1280 of file matrix_int.hpp.

References get().

◆ scale_columns()

int gsl::matrix_int::scale_columns ( vector_int const &  x)
inline

C++ version of gsl_matrix_int_scale_columns().

Parameters
xA scalar
Returns
Error code on failure

Definition at line 1519 of file matrix_int.hpp.

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

◆ scale_rows()

int gsl::matrix_int::scale_rows ( vector_int const &  x)
inline

C++ version of gsl_matrix_int_scale_rows().

Parameters
xA scalar
Returns
Error code on failure

Definition at line 1512 of file matrix_int.hpp.

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

◆ set()

void gsl::matrix_int::set ( size_t const  i,
size_t const  j,
int  x 
)
inline

C++ version of gsl_matrix_int_set().

Parameters
iindex of row
jindex of column
xnew value for element

Definition at line 1320 of file matrix_int.hpp.

References get().

Referenced by matrix_int().

◆ set_all()

void gsl::matrix_int::set_all ( int  x)
inline

C++ version of gsl_matrix_int_set_all().

Parameters
xThe value to which all elements are set

Definition at line 1232 of file matrix_int.hpp.

References get().

◆ set_col()

int gsl::matrix_int::set_col ( size_t const  j,
vector_int const &  v 
)
inline

C++ version of gsl_matrix_int_set_col().

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

Definition at line 1558 of file matrix_int.hpp.

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

◆ set_identity()

void gsl::matrix_int::set_identity ( )
inline

C++ version of gsl_matrix_int_set_identity().

Definition at line 1402 of file matrix_int.hpp.

References get().

◆ set_row()

int gsl::matrix_int::set_row ( size_t const  i,
vector_int const &  v 
)
inline

C++ version of gsl_matrix_int_set_row().

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

Definition at line 1550 of file matrix_int.hpp.

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

◆ set_zero()

void gsl::matrix_int::set_zero ( )
inline

C++ version of gsl_matrix_int_set_zero().

Definition at line 1227 of file matrix_int.hpp.

References get().

◆ size1()

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

◆ size2()

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

The number of columns of the matrix_int.

Returns
The number of columns of the matrix_int

Definition at line 700 of file matrix_int.hpp.

References ccgsl_pointer.

Referenced by clone().

◆ sub()

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

C++ version of gsl_matrix_int_sub().

Parameters
bmatrix_int to subtract from this
Returns
error code on failure

Definition at line 1274 of file matrix_int.hpp.

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

◆ subcolumn() [1/2]

vector_int gsl::matrix_int::subcolumn ( size_t const  j,
size_t const  offset,
size_t const  n 
)
inline

C++ version of gsl_matrix_int_subcolumn().

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

Definition at line 838 of file matrix_int.hpp.

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

◆ subcolumn() [2/2]

vector_int const gsl::matrix_int::subcolumn ( size_t const  j,
size_t const  offset,
size_t const  n 
) const
inline

Another C++ version of gsl_matrix_int_const_subcolumn().

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

Definition at line 1061 of file matrix_int.hpp.

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

◆ subdiagonal() [1/2]

vector_int gsl::matrix_int::subdiagonal ( size_t const  k)
inline

C++ version of gsl_matrix_int_subdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_int

Definition at line 804 of file matrix_int.hpp.

References get().

◆ subdiagonal() [2/2]

vector_int const gsl::matrix_int::subdiagonal ( size_t const  k) const
inline

Another C++ version of gsl_matrix_int_const_subdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_int

Definition at line 1027 of file matrix_int.hpp.

References get().

◆ submatrix() [1/2]

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

C++ version of gsl_matrix_int_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 765 of file matrix_int.hpp.

References get(), and matrix_int().

◆ submatrix() [2/2]

matrix_int const gsl::matrix_int::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_int_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 988 of file matrix_int.hpp.

References get(), and matrix_int().

◆ subrow() [1/2]

vector_int gsl::matrix_int::subrow ( size_t const  i,
size_t const  offset,
size_t const  n 
)
inline

C++ version of gsl_matrix_int_subrow().

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

Definition at line 826 of file matrix_int.hpp.

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

◆ subrow() [2/2]

vector_int const gsl::matrix_int::subrow ( size_t const  i,
size_t const  offset,
size_t const  n 
) const
inline

Another C++ version of gsl_matrix_int_const_subrow().

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

Definition at line 1049 of file matrix_int.hpp.

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

◆ superdiagonal() [1/2]

vector_int gsl::matrix_int::superdiagonal ( size_t const  k)
inline

C++ version of gsl_matrix_int_superdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_int

Definition at line 814 of file matrix_int.hpp.

References get().

◆ superdiagonal() [2/2]

vector_int const gsl::matrix_int::superdiagonal ( size_t const  k) const
inline

Another C++ version of gsl_matrix_int_const_superdiagonal().

Parameters
kAn index
Returns
Subdiagonal k as a vector_int

Definition at line 1037 of file matrix_int.hpp.

References get().

◆ swap()

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

Swap two matrix_int objects.

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

Parameters
mThe matrix_int to swap with this.

Definition at line 734 of file matrix_int.hpp.

References ccgsl_pointer, and count.

◆ swap_columns()

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

C++ version of gsl_matrix_int_swap_columns().

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

Definition at line 1416 of file matrix_int.hpp.

References get().

◆ swap_rowcol()

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

C++ version of gsl_matrix_int_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 1424 of file matrix_int.hpp.

References get().

◆ swap_rows()

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

C++ version of gsl_matrix_int_swap_rows().

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

Definition at line 1409 of file matrix_int.hpp.

References get().

◆ transpose()

int gsl::matrix_int::transpose ( )
inline

C++ version of gsl_matrix_int_transpose().

Returns
error code on failure.

Definition at line 1429 of file matrix_int.hpp.

References get().

◆ transpose_memcpy()

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

C++ version of gsl_matrix_int_transpose_memcpy().

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

Definition at line 1435 of file matrix_int.hpp.

References get().

◆ transpose_tricpy()

void gsl::matrix_int::transpose_tricpy ( CBLAS_UPLO_t  Uplo,
CBLAS_DIAG_t  Diag,
matrix_int 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 753 of file matrix_int.hpp.

References get().

◆ tricpy()

void gsl::matrix_int::tricpy ( CBLAS_UPLO_t  Uplo,
CBLAS_DIAG_t  Diag,
matrix_int 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 744 of file matrix_int.hpp.

References get().

◆ unique()

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

Find if this is the only object sharing the gsl_matrix_int.

Returns
true or falses according as this is the only matrix_int object sharing the gsl_matrix_int

Definition at line 1200 of file matrix_int.hpp.

References count.

◆ use_count()

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

Find how many matrix_int objects share this pointer.

Returns
the number of matrix_int objects that share this pointer

Definition at line 1205 of file matrix_int.hpp.

References count.

◆ view_array() [1/2]

static matrix_int gsl::matrix_int::view_array ( int *  base,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_int_view_array().

Parameters
baseAn array of type int
n1The number of rows
n2The number of columns
Returns
A matrix_int

Definition at line 850 of file matrix_int.hpp.

References matrix_int().

◆ view_array() [2/2]

static matrix_int const gsl::matrix_int::view_array ( int const *  base,
size_t const  n1,
size_t const  n2 
)
inlinestatic

Another C++ version of gsl_matrix_int_const_view_array().

Parameters
baseAn array of type int
n1The number of rows
n2The number of columns
Returns
A matrix_int

Definition at line 1125 of file matrix_int.hpp.

References matrix_int().

◆ view_array_with_tda() [1/2]

static matrix_int gsl::matrix_int::view_array_with_tda ( int *  base,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_int_view_array_with_tda().

Parameters
baseAn array of type int
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_int

Definition at line 863 of file matrix_int.hpp.

References matrix_int().

◆ view_array_with_tda() [2/2]

static matrix_int const gsl::matrix_int::view_array_with_tda ( int const *  base,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

Another C++ version of gsl_matrix_int_const_view_array_with_tda().

Parameters
baseAn array of type int
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_int

Definition at line 1139 of file matrix_int.hpp.

References matrix_int().

◆ view_vector() [1/2]

static matrix_int gsl::matrix_int::view_vector ( vector_int v,
size_t const  n1,
size_t const  n2 
)
inlinestatic

C++ version of gsl_matrix_int_view_vector().

Parameters
vA vector_int
n1The number of rows
n2The number of columns
Returns
A matrix_int

Definition at line 875 of file matrix_int.hpp.

References gsl::vector_int::get(), and matrix_int().

◆ view_vector() [2/2]

static matrix_int const gsl::matrix_int::view_vector ( vector_int const &  v,
size_t const  n1,
size_t const  n2 
)
inlinestatic

Another C++ version of gsl_matrix_int_const_view_vector().

Parameters
vA vector_int
n1The number of rows
n2The number of columns
Returns
A matrix_int

Definition at line 1151 of file matrix_int.hpp.

References gsl::vector_int::get(), and matrix_int().

◆ view_vector_with_tda() [1/2]

static matrix_int gsl::matrix_int::view_vector_with_tda ( vector_int v,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

C++ version of gsl_matrix_int_view_vector_with_tda().

Parameters
vA vector_int
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_int

Definition at line 888 of file matrix_int.hpp.

References gsl::vector_int::get(), and matrix_int().

◆ view_vector_with_tda() [2/2]

static matrix_int const gsl::matrix_int::view_vector_with_tda ( vector_int const &  v,
size_t const  n1,
size_t const  n2,
size_t const  tda 
)
inlinestatic

Another C++ version of gsl_matrix_int_const_view_vector_with_tda().

Parameters
vA vector_int
n1The number of rows
n2The number of columns
tdaThe number of columns in memory
Returns
A matrix_int

Definition at line 1165 of file matrix_int.hpp.

References gsl::vector_int::get(), and matrix_int().

◆ wrap_gsl_matrix_int_without_ownership()

void gsl::matrix_int::wrap_gsl_matrix_int_without_ownership ( gsl_matrix_int *  v)
inline

This function is intended mainly for internal use.

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

Parameters
vThe gsl_matrix_int

Definition at line 196 of file matrix_int.hpp.

References ccgsl_pointer, count, and owns_data.

Member Data Documentation

◆ ccgsl_pointer

gsl_matrix_int* gsl::matrix_int::ccgsl_pointer
private

◆ count

size_t* gsl::matrix_int::count
private

The shared reference count.

Definition at line 1182 of file matrix_int.hpp.

Referenced by matrix_int(), operator=(), swap(), unique(), use_count(), wrap_gsl_matrix_int_without_ownership(), and ~matrix_int().

◆ owns_data

bool gsl::matrix_int::owns_data
private

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

Definition at line 1174 of file matrix_int.hpp.

Referenced by matrix_int(), operator=(), wrap_gsl_matrix_int_without_ownership(), and ~matrix_int().


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