BoB robotics
The Brains on Board robotics library
pybind11::detail::unchecked_mutable_reference< T, Dims > Class Template Reference
Inheritance diagram for pybind11::detail::unchecked_mutable_reference< T, Dims >:
pybind11::detail::unchecked_reference< T, Dims >

Public Member Functions

template<typename... Ix>
T & operator() (Ix... index)
 Mutable, unchecked access to data at the given indices.
 
template<ssize_t D = Dims, typename = enable_if_t<D == 1 || Dynamic>>
T & operator[] (ssize_t index)
 
template<typename... Ix>
T * mutable_data (Ix... ix)
 Mutable pointer access to the data at the given indices.
 
- Public Member Functions inherited from pybind11::detail::unchecked_reference< T, Dims >
template<typename... Ix>
const T & operator() (Ix... index) const
 
template<ssize_t D = Dims, typename = enable_if_t<D == 1 || Dynamic>>
const T & operator[] (ssize_t index) const
 
template<typename... Ix>
const T * data (Ix... ix) const
 Pointer access to the data at the given indices.
 
ssize_t shape (ssize_t dim) const
 Returns the shape (i.e. size) of dimension dim
 
ssize_t ndim () const
 Returns the number of dimensions of the array.
 
template<bool Dyn = Dynamic>
enable_if_t<!Dyn, ssize_t > size () const
 Returns the total number of elements in the referenced array, i.e. the product of the shapes.
 
template<bool Dyn = Dynamic>
enable_if_t< Dyn, ssize_t > size () const
 
ssize_t nbytes () const
 

Friends

class pybind11::array
 

Additional Inherited Members

- Static Public Member Functions inherited from pybind11::detail::unchecked_reference< T, Dims >
static constexpr ssize_t itemsize ()
 Returns the item size, i.e. sizeof(T)
 
- Protected Member Functions inherited from pybind11::detail::unchecked_reference< T, Dims >
template<bool Dyn = Dynamic>
 unchecked_reference (const void *data, const ssize_t *shape, const ssize_t *strides, enable_if_t<!Dyn, ssize_t >)
 
template<bool Dyn = Dynamic>
 unchecked_reference (const void *data, const ssize_t *shape, const ssize_t *strides, enable_if_t< Dyn, ssize_t > dims)
 
- Protected Attributes inherited from pybind11::detail::unchecked_reference< T, Dims >
const unsigned char * data_
 
conditional_t< Dynamic, const ssize_t *, std::array< ssize_t,(size_t) Dims > > shape_
 
conditional_t< Dynamic, const ssize_t *, std::array< ssize_t,(size_t) Dims > > strides_
 
const ssize_t dims_
 
- Static Protected Attributes inherited from pybind11::detail::unchecked_reference< T, Dims >
static constexpr bool Dynamic = Dims < 0
 

Member Function Documentation

◆ operator[]()

template<typename T , ssize_t Dims>
template<ssize_t D = Dims, typename = enable_if_t<D == 1 || Dynamic>>
T & pybind11::detail::unchecked_mutable_reference< T, Dims >::operator[] ( ssize_t  index)
inline

Mutable, unchecked access data at the given index; this operator only participates if the reference is to a 1-dimensional array (or has runtime dimensions). When present, this is exactly equivalent to obj(index).


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