Public Member Functions | Private Attributes | List of all members
gnsstk::ConstVectorSlice< T > Class Template Reference

Detailed Description

template<class T>
class gnsstk::ConstVectorSlice< T >

A Vector<T> slice that doesn't allow modification.

Definition at line 448 of file Vector.hpp.

#include <Vector.hpp>

Inheritance diagram for gnsstk::ConstVectorSlice< T >:
Inheritance graph
[legend]

Public Member Functions

 ConstVectorSlice ()
 default constructor More...
 
 ConstVectorSlice (const Vector< T > &vv)
 Makes a slice of the whole vector. More...
 
 ConstVectorSlice (const Vector< T > &vv, const std::slice &ss)
 Uses the given slice and vector. More...
 
operator() (size_t i) const
 Returns a const version of the i'th slice element. More...
 
operator[] (size_t i) const
 Returns a const version of the i'th slice element. More...
 
size_t size () const
 returns the number of elements in the slice More...
 
size_t start () const
 returns the index in the vector of the first element. More...
 
size_t stride () const
 
- Public Member Functions inherited from gnsstk::ConstVectorSliceBase< T, ConstVectorSlice< T > >
 ConstVectorSliceBase ()
 
- Public Member Functions inherited from gnsstk::VectorSliceBase< ConstVectorSlice< T > >
size_t size () const
 the number of elements in the slice. More...
 
size_t start () const
 the start index in the BaseClass vector for this slice. More...
 
size_t stride () const
 
 VectorSliceBase ()
 constructor More...
 
- Public Member Functions inherited from gnsstk::ConstVectorBase< T, ConstVectorSlice< T > >
 ConstVectorBase ()
 Constructor. More...
 
operator() (size_t i) const
 returns the element at index i More...
 
operator[] (size_t i) const
 returns the element at index i More...
 
size_t size () const
 Returns the size of the base class. More...
 

Private Attributes

std::slice s
 the slice specification. More...
 
const Vector< T > * v
 Vectortor used as a source for this slice. More...
 

Additional Inherited Members

- Protected Member Functions inherited from gnsstk::VectorSliceBase< ConstVectorSlice< T > >
void vecSliceCheck (size_t sourceSize) const
 
- Protected Member Functions inherited from gnsstk::ConstVectorBase< T, ConstVectorSlice< T > >
constVectorRef (size_t i) const
 

Constructor & Destructor Documentation

◆ ConstVectorSlice() [1/3]

template<class T >
gnsstk::ConstVectorSlice< T >::ConstVectorSlice ( )
inline

default constructor

Definition at line 452 of file Vector.hpp.

◆ ConstVectorSlice() [2/3]

template<class T >
gnsstk::ConstVectorSlice< T >::ConstVectorSlice ( const Vector< T > &  vv)
inline

Makes a slice of the whole vector.

Definition at line 457 of file Vector.hpp.

◆ ConstVectorSlice() [3/3]

template<class T >
gnsstk::ConstVectorSlice< T >::ConstVectorSlice ( const Vector< T > &  vv,
const std::slice &  ss 
)
inline

Uses the given slice and vector.

Definition at line 462 of file Vector.hpp.

Member Function Documentation

◆ operator()()

template<class T >
T gnsstk::ConstVectorSlice< T >::operator() ( size_t  i) const
inline

Returns a const version of the i'th slice element.

Definition at line 470 of file Vector.hpp.

◆ operator[]()

template<class T >
T gnsstk::ConstVectorSlice< T >::operator[] ( size_t  i) const
inline

Returns a const version of the i'th slice element.

Definition at line 467 of file Vector.hpp.

◆ size()

template<class T >
size_t gnsstk::ConstVectorSlice< T >::size ( ) const
inline

returns the number of elements in the slice

Definition at line 474 of file Vector.hpp.

◆ start()

template<class T >
size_t gnsstk::ConstVectorSlice< T >::start ( ) const
inline

returns the index in the vector of the first element.

Definition at line 476 of file Vector.hpp.

◆ stride()

template<class T >
size_t gnsstk::ConstVectorSlice< T >::stride ( ) const
inline

returns the number of elements to skip between (*this)[i] and (*this)[i+1]

Definition at line 479 of file Vector.hpp.

Member Data Documentation

◆ s

template<class T >
std::slice gnsstk::ConstVectorSlice< T >::s
private

the slice specification.

Definition at line 485 of file Vector.hpp.

◆ v

template<class T >
const Vector<T>* gnsstk::ConstVectorSlice< T >::v
private

Vectortor used as a source for this slice.

Definition at line 483 of file Vector.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:44