Rechercher une page de manuel
std::gslice
Langue: en
Version: 321924 (ubuntu - 08/07/09)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
std::gslice - Class defining multi-dimensional subset of an array.SYNOPSIS
Public Member Functions
gslice (const gslice &)
gslice (size_t, const valarray< size_t > &, const valarray< size_t > &)
gslice ()
gslice & operator= (const gslice &)
valarray< size_t > size () const
size_t start () const
valarray< size_t > stride () const
~gslice ()
Friends
class valarray
Detailed Description
The slice class represents a multi-dimensional subset of an array, specified by three parameter sets: start offset, size array, and stride array. The start offset is the index of the first element of the array that is part of the subset. The size and stride array describe each dimension of the slice. Size is the number of elements in that dimension, and stride is the distance in the array between successive elements in that dimension. Each dimension's size and stride is taken to begin at an array element described by the previous dimension. The size array and stride array must be the same size.
For example, if you have offset==3, stride[0]==11, size[1]==3, stride[1]==3, then slice[0,0]==array[3], slice[0,1]==array[6], slice[0,2]==array[9], slice[1,0]==array[14], slice[1,1]==array[17], slice[1,2]==array[20].
Definition at line 63 of file gslice.h.
Constructor & Destructor Documentation
std::gslice::gslice () [inline]
Construct an empty slice.
Definition at line 139 of file gslice.h.
std::gslice::gslice (size_t __o, const valarray< size_t > & __l, const valarray< size_t > & __s) [inline]
Construct a slice.
Constructs a slice with as many dimensions as the length of the l and s arrays.
Parameters:
- o Offset in array of first element.
l Array of dimension lengths.
s Array of dimension strides between array elements.
Definition at line 142 of file gslice.h.
std::gslice::gslice (const gslice & __g) [inline]
Copy constructor.
Definition at line 147 of file gslice.h.
std::gslice::~gslice () [inline]
Destructor.
Definition at line 151 of file gslice.h.
Member Function Documentation
gslice & std::gslice::operator= (const gslice & __g) [inline]
Assignment operator.
Definition at line 158 of file gslice.h.
References _M_index.
valarray< size_t > std::gslice::size () const [inline]
Return array of sizes of slice dimensions.
Definition at line 132 of file gslice.h.
size_t std::gslice::start () const [inline]
Return array offset of first slice element.
Definition at line 128 of file gslice.h.
valarray< size_t > std::gslice::stride () const [inline]
Return array of array strides for each dimension.
Definition at line 136 of file gslice.h.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre