[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

NumpyArray< N, T, Stride > Class Template Reference

#include <vigra/numpy_array.hxx>

Inheritance diagram for NumpyArray< N, T, Stride >:
MultiArrayView< N, T, StrideTag > NumpyAnyArray

Public Types

typedef view_type::const_iterator const_iterator
 
typedef view_type::const_pointer const_pointer
 
typedef view_type::const_reference const_reference
 
typedef view_type::const_traverser const_traverser
 
typedef view_type::difference_type difference_type
 
typedef view_type::difference_type_1 difference_type_1
 
typedef view_type::iterator iterator
 
typedef NumpyAnyArray::difference_type permutation_type
 
typedef view_type::pointer pointer
 
typedef view_type::reference reference
 
typedef view_type::size_type size_type
 
typedef view_type::traverser traverser
 
typedef view_type::value_type value_type
 
typedef MultiArrayView< N, typename ArrayTraits::value_type, Stride > view_type
 
- Public Types inherited from MultiArrayView< N, T, StrideTag >
enum  ActualDimension
 
typedef StridedScanOrderIterator< actual_dimension, T, T const &, T const * > const_iterator
 
typedef const value_typeconst_pointer
 
typedef const value_typeconst_reference
 
typedef vigra::detail::MultiIteratorChooser< StrideTag >::template Traverser< actual_dimension, T, Tconst &, Tconst * >::type const_traverser
 
typedef MultiArrayShape< actual_dimension >::type difference_type
 
typedef MultiArrayIndex difference_type_1
 
typedef StridedScanOrderIterator< actual_dimension, T, T &, T * > iterator
 
typedef difference_type key_type
 
typedef MultiArray< N, T > matrix_type
 
typedef value_typepointer
 
typedef value_typereference
 
typedef difference_type size_type
 
typedef vigra::detail::MultiIteratorChooser< StrideTag >::template Traverser< actual_dimension, T, T &, T * >::type traverser
 
typedefvalue_type
 
typedef MultiArrayView< N, T, StrideTag > view_type
 
- Public Types inherited from NumpyAnyArray
typedef ArrayVector< npy_intpdifference_type
 difference type
 

Public Member Functions

bool hasData () const
 
template<class U >
MultiArrayViewinit (const U &init)
 
void makeCopy (PyObject *obj, bool strict=false)
 
bool makeReference (const NumpyAnyArray &array, bool strict=false)
 
bool makeReference (PyObject *obj, bool=false)
 
void makeReferenceUnchecked (PyObject *obj)
 
void makeUnsafeReference (const view_type &multiArrayView)
 
template<class U , class S >
 NumpyArray (const MultiArrayView< N, U, S > &other)
 
 NumpyArray (const NumpyAnyArray &other, bool createCopy=false)
 
 NumpyArray (const NumpyArray &other, bool createCopy=false)
 
 NumpyArray (difference_type const &shape, std::string const &order="")
 
 NumpyArray (PyObject *obj=0, bool createCopy=false)
 
 NumpyArray (TaggedShape const &tagged_shape)
 
template<class U , class S >
NumpyArrayoperator= (const MultiArrayView< N, U, S > &other)
 
NumpyArrayoperator= (const NumpyAnyArray &other)
 
NumpyArrayoperator= (const NumpyArray &other)
 
template<class U , class S >
NumpyArrayoperator= (const NumpyArray< N, U, S > &other)
 
template<int K>
TinyVector< npy_intp, KpermuteLikewise () const
 
template<class U >
ArrayVector< UpermuteLikewise (ArrayVector< U > const &data) const
 
template<class U , int K>
TinyVector< U, KpermuteLikewise (TinyVector< U, K > const &data) const
 
void reshape (difference_type const &shape)
 
void reshapeIfEmpty (difference_type const &shape, std::string message="")
 
void reshapeIfEmpty (TaggedShape tagged_shape, std::string message="")
 
const difference_typeshape () const
 
difference_type_1 shape (difference_type_1 n) const
 
difference_type strideOrdering () const
 
- Public Member Functions inherited from MultiArrayView< N, T, StrideTag >
bool all () const
 
bool any () const
 
iterator begin ()
 
const_iterator begin () const
 
template<unsigned int M>
MultiArrayView< N-1, T, typename vigra::detail::MaybeStrided< StrideTag, M >::type > bind (difference_type_1 d) const
 
MultiArrayView< N-1, T, StridedArrayTagbindAt (difference_type_1 m, difference_type_1 d) const
 
MultiArrayView< N, typename ExpandElementResult< T >::type, StridedArrayTagbindElementChannel (difference_type_1 i) const
 
template<int M, class Index >
MultiArrayView< N-M, T, StridedArrayTagbindInner (const TinyVector< Index, M > &d) const
 
MultiArrayView< N-1, T, StridedArrayTagbindInner (difference_type_1 d) const
 
template<int M, class Index >
MultiArrayView< N-M, T, StrideTag > bindOuter (const TinyVector< Index, M > &d) const
 
MultiArrayView< N-1, T, StrideTag > bindOuter (difference_type_1 d) const
 
difference_type_1 coordinateToScanOrderIndex (const difference_type &d) const
 
void copy (const MultiArrayView &rhs)
 
template<class U , class CN >
void copy (const MultiArrayView< N, U, CN > &rhs)
 
pointer data () const
 
MultiArrayView< 1, T, StridedArrayTagdiagonal () const
 
difference_type_1 elementCount () const
 
iterator end ()
 
const_iterator end () const
 
MultiArrayView< N+1, typename ExpandElementResult< T >::type, StridedArrayTagexpandElements (difference_type_1 d) const
 
bool hasData () const
 
difference_type_1 height () const
 
template<class U >
MultiArrayViewinit (const U &init)
 
MultiArrayView< N+1, T, StrideTag > insertSingletonDimension (difference_type_1 i) const
 
bool isInside (difference_type const &p) const
 
bool isOutside (difference_type const &p) const
 
bool isUnstrided (unsigned int dimension=N-1) const
 
template<class U >
void meanVariance (U *mean, U *variance) const
 
void minmax (T *minimum, T *maximum) const
 
 MultiArrayView ()
 
template<class ALLOC >
 MultiArrayView (BasicImage< T, ALLOC > const &image)
 
 MultiArrayView (const difference_type &shape, const difference_type &stride, const_pointer ptr)
 
 MultiArrayView (const difference_type &shape, const_pointer ptr)
 
template<class Stride >
 MultiArrayView (const MultiArrayView< N, T, Stride > &other)
 
 MultiArrayView (MultiArrayView const &rhs)=default
 
MultiArrayView< N, Multiband< value_type >, StrideTag > multiband () const
 
NormTraits< MultiArrayView >::NormType norm (int type=2, bool useSquaredNorm=true) const
 
 operator MultiArrayView< N, T, StridedArrayTag > () const
 
template<class U , class C1 >
bool operator!= (MultiArrayView< N, U, C1 > const &rhs) const
 
reference operator() (difference_type_1 x)
 
const_reference operator() (difference_type_1 x) const
 
reference operator() (difference_type_1 x, difference_type_1 y)
 
const_reference operator() (difference_type_1 x, difference_type_1 y) const
 
reference operator() (difference_type_1 x, difference_type_1 y, difference_type_1 z)
 
const_reference operator() (difference_type_1 x, difference_type_1 y, difference_type_1 z) const
 
reference operator() (difference_type_1 x, difference_type_1 y, difference_type_1 z, difference_type_1 u)
 
const_reference operator() (difference_type_1 x, difference_type_1 y, difference_type_1 z, difference_type_1 u) const
 
reference operator() (difference_type_1 x, difference_type_1 y, difference_type_1 z, difference_type_1 u, difference_type_1 v)
 
const_reference operator() (difference_type_1 x, difference_type_1 y, difference_type_1 z, difference_type_1 u, difference_type_1 v) const
 
template<class Expression >
MultiArrayViewoperator*= (multi_math::MultiMathOperand< Expression > const &rhs)
 
template<class U , class C1 >
MultiArrayViewoperator*= (MultiArrayView< N, U, C1 > const &rhs)
 
MultiArrayViewoperator*= (T const &rhs)
 
template<class Expression >
MultiArrayViewoperator+= (multi_math::MultiMathOperand< Expression > const &rhs)
 
template<class U , class C1 >
MultiArrayViewoperator+= (MultiArrayView< N, U, C1 > const &rhs)
 
MultiArrayViewoperator+= (T const &rhs)
 
template<class Expression >
MultiArrayViewoperator-= (multi_math::MultiMathOperand< Expression > const &rhs)
 
template<class U , class C1 >
MultiArrayViewoperator-= (MultiArrayView< N, U, C1 > const &rhs)
 
MultiArrayViewoperator-= (T const &rhs)
 
template<class Expression >
MultiArrayViewoperator/= (multi_math::MultiMathOperand< Expression > const &rhs)
 
template<class U , class C1 >
MultiArrayViewoperator/= (MultiArrayView< N, U, C1 > const &rhs)
 
MultiArrayViewoperator/= (T const &rhs)
 
template<class Expression >
MultiArrayViewoperator= (multi_math::MultiMathOperand< Expression > const &rhs)
 
template<class U , class C1 >
MultiArrayViewoperator= (MultiArrayView< N, U, C1 > const &rhs)
 
MultiArrayViewoperator= (value_type const &v)
 
template<class U , class C1 >
bool operator== (MultiArrayView< N, U, C1 > const &rhs) const
 
reference operator[] (const difference_type &d)
 
const_reference operator[] (const difference_type &d) const
 
template<int M>
MultiArrayView< N-M, T, StridedArrayTagoperator[] (const TinyVector< MultiArrayIndex, M > &d) const
 
reference operator[] (difference_type_1 d)
 
const_reference operator[] (difference_type_1 d) const
 
MultiArrayView< N, T, StridedArrayTagpermuteStridesAscending () const
 
MultiArrayView< N, T, StridedArrayTagpermuteStridesDescending () const
 
template<class U >
U product () const
 
void reset ()
 
difference_type scanOrderIndexToCoordinate (difference_type_1 d) const
 
const difference_typeshape () const
 
difference_type_1 shape (difference_type_1 n) const
 
difference_type_1 size () const
 
difference_type_1 size (difference_type_1 n) const
 
NormTraits< MultiArrayView >::SquaredNormType squaredNorm () const
 
const difference_typestride () const
 
difference_type_1 stride (int n) const
 
MultiArrayView< N, T, StridedArrayTagstridearray (const difference_type &s) const
 
difference_type strideOrdering () const
 
MultiArrayView subarray (difference_type p, difference_type q) const
 
template<class U >
U sum () const
 
template<class U , class S >
void sum (MultiArrayView< N, U, S > sums) const
 
void swap (MultiArrayView &other)
 
void swapData (MultiArrayView rhs)
 
template<class T2 , class C2 >
void swapData (MultiArrayView< N, T2, C2 > rhs)
 
MultiArrayView< N, T, StridedArrayTagtranspose () const
 
MultiArrayView< N, T, StridedArrayTagtranspose (const difference_type &permutation) const
 
traverser traverser_begin ()
 
const_traverser traverser_begin () const
 
traverser traverser_end ()
 
const_traverser traverser_end () const
 
difference_type_1 width () const
 
- Public Member Functions inherited from NumpyAnyArray
python_ptr axistags () const
 
int dtype () const
 
template<class Shape >
NumpyAnyArray getitem (Shape start, Shape stop) const
 
bool hasData () const
 
void makeCopy (PyObject *obj, PyTypeObject *type=0)
 
bool makeReference (PyObject *obj, PyTypeObject *type=0)
 
MultiArrayIndex ndim () const
 
 NumpyAnyArray (NumpyAnyArray const &other, bool createCopy=false, PyTypeObject *type=0)
 
 NumpyAnyArray (PyObject *obj=0, bool createCopy=false, PyTypeObject *type=0)
 
NumpyAnyArrayoperator= (NumpyAnyArray const &other)
 
PyArrayObjectpyArray () const
 
PyObjectpyObject () const
 
difference_type shape () const
 
MultiArrayIndex spatialDimensions () const
 
difference_type strideOrdering () const
 

Static Public Member Functions

static bool isCopyCompatible (PyObject *obj)
 
static bool isReferenceCompatible (PyObject *obj)
 
static bool isStrictlyCompatible (PyObject *obj)
 
static difference_type standardStrideOrdering ()
 
static difference_type strideOrdering (difference_type strides)
 
- Static Public Member Functions inherited from MultiArrayView< N, T, StrideTag >
static difference_type strideOrdering (difference_type strides)
 

Additional Inherited Members

- Protected Attributes inherited from MultiArrayView< N, T, StrideTag >
pointer m_ptr
 
difference_type m_shape
 
difference_type m_stride
 

Detailed Description

template<unsigned int N, class T, class Stride = StridedArrayTag>
class vigra::NumpyArray< N, T, Stride >

Provide the MultiArrayView interface for a Python array.

This class inherits from both vigra::MultiArrayView and vigra::NumpyAnyArray in order to support easy and safe application of VIGRA functions to Python arrays.

#include <vigra/numpy_array.hxx>
Namespace: vigra

Member Typedef Documentation

◆ view_type

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef MultiArrayView<N, typename ArrayTraits::value_type, Stride> view_type

the view type associated with this array.

◆ value_type

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::value_type value_type

the array's value type

◆ pointer

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::pointer pointer

pointer type

◆ const_pointer

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::const_pointer const_pointer

const pointer type

◆ reference

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::reference reference

reference type (result of operator[])

◆ const_reference

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::const_reference const_reference

const reference type (result of operator[] const)

◆ size_type

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::size_type size_type

size type

◆ difference_type

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::difference_type difference_type

difference type (used for multi-dimensional offsets and indices)

◆ difference_type_1

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::difference_type_1 difference_type_1

difference and index type for a single dimension

◆ permutation_type

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef NumpyAnyArray::difference_type permutation_type

type of an array specifying an axis permutation

◆ traverser

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::traverser traverser

traverser type

◆ const_traverser

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::const_traverser const_traverser

traverser type to const data

◆ iterator

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::iterator iterator

sequential (random access) iterator type

◆ const_iterator

template<unsigned int N, class T , class Stride = StridedArrayTag>
typedef view_type::const_iterator const_iterator

sequential (random access) const iterator type

Constructor & Destructor Documentation

◆ NumpyArray() [1/6]

template<unsigned int N, class T , class Stride = StridedArrayTag>
NumpyArray ( PyObject obj = 0,
bool  createCopy = false 
)
explicit

Construct from a given PyObject pointer. When the given python object is NULL, the internal python array will be NULL and hasData() will return false.

Otherwise, the function attempts to create a new reference to the given Python object, unless copying is forced by setting createCopy to true. If either of this fails, the function throws an exception. This will not happen if isReferenceCompatible(obj) (in case of creating a new reference) or isCopyCompatible(obj) (in case of copying) have returned true beforehand.

◆ NumpyArray() [2/6]

template<unsigned int N, class T , class Stride = StridedArrayTag>
NumpyArray ( const NumpyArray< N, T, Stride > &  other,
bool  createCopy = false 
)

Copy constructor; does not copy the memory, but creates a new reference to the same underlying python object, unless a copy is forced by setting createCopy to true. (If the source object has no data, this one will have no data, too.)

◆ NumpyArray() [3/6]

template<unsigned int N, class T , class Stride = StridedArrayTag>
template<class U , class S >
NumpyArray ( const MultiArrayView< N, U, S > &  other)
explicit

Allocate new memory and copy data from a MultiArrayView.

◆ NumpyArray() [4/6]

template<unsigned int N, class T , class Stride = StridedArrayTag>
NumpyArray ( difference_type const shape,
std::string const order = "" 
)
explicit

Construct a new array object, allocating an internal python ndarray of the given shape in the given order (default: VIGRA order), initialized with zeros.

An exception is thrown when construction fails.

◆ NumpyArray() [5/6]

template<unsigned int N, class T , class Stride = StridedArrayTag>
NumpyArray ( TaggedShape const tagged_shape)
explicit

Construct a new array object, allocating an internal python ndarray according to the given tagged shape, initialized with zeros.

An exception is thrown when construction fails.

◆ NumpyArray() [6/6]

template<unsigned int N, class T , class Stride = StridedArrayTag>
NumpyArray ( const NumpyAnyArray other,
bool  createCopy = false 
)
explicit

Constructor from NumpyAnyArray. Equivalent to NumpyArray(other.pyObject())

Member Function Documentation

◆ operator=() [1/4]

template<unsigned int N, class T , class Stride = StridedArrayTag>
NumpyArray & operator= ( const NumpyArray< N, T, Stride > &  other)

Assignment operator. If this is already a view with data (i.e. hasData() is true) and the shapes match, the RHS array contents are copied. If this is an empty view, assignment is identical to makeReferenceUnchecked(other.pyObject()). See MultiArrayView::operator= for further information on semantics.

◆ operator=() [2/4]

template<unsigned int N, class T , class Stride = StridedArrayTag>
template<class U , class S >
NumpyArray & operator= ( const NumpyArray< N, U, S > &  other)

Assignment operator. If this is already a view with data (i.e. hasData() is true) and the shapes match, the RHS array contents are copied. If this is an empty view, assignment is identical to makeReferenceUnchecked(other.pyObject()). See MultiArrayView::operator= for further information on semantics.

◆ operator=() [3/4]

template<unsigned int N, class T , class Stride = StridedArrayTag>
template<class U , class S >
NumpyArray & operator= ( const MultiArrayView< N, U, S > &  other)

Assignment operator. If this is already a view with data (i.e. hasData() is true) and the shapes match, the RHS array contents are copied. If this is an empty view, a new buffer with the RHS shape is allocated before copying.

◆ operator=() [4/4]

template<unsigned int N, class T , class Stride = StridedArrayTag>
NumpyArray & operator= ( const NumpyAnyArray other)

Assignment operator. If this is already a view with data (i.e. hasData() is true) and the shapes match, the RHS array contents are copied. If this is an empty view, assignment is identical to makeReference(other.pyObject()). Otherwise, an exception is thrown.

◆ permuteLikewise() [1/3]

template<unsigned int N, class T , class Stride = StridedArrayTag>
template<class U >
ArrayVector< U > permuteLikewise ( ArrayVector< U > const data) const

Permute the entries of the given array data exactly like the axes of this NumpyArray were permuted upon conversion from numpy.

◆ permuteLikewise() [2/3]

template<unsigned int N, class T , class Stride = StridedArrayTag>
template<class U , int K>
TinyVector< U, K > permuteLikewise ( TinyVector< U, K > const data) const

Permute the entries of the given array data exactly like the axes of this NumpyArray were permuted upon conversion from numpy.

◆ permuteLikewise() [3/3]

template<unsigned int N, class T , class Stride = StridedArrayTag>
template<int K>
TinyVector< npy_intp, K > permuteLikewise ( ) const

Get the permutation of the axes of this NumpyArray that was performed upon conversion from numpy.

◆ isCopyCompatible()

template<unsigned int N, class T , class Stride = StridedArrayTag>
static bool isCopyCompatible ( PyObject obj)
static

Test whether a given python object is a numpy array that can be converted (copied) into an array compatible to this NumpyArray type. This means that the array's shape conforms to the requirements of makeCopy().

◆ isReferenceCompatible()

template<unsigned int N, class T , class Stride = StridedArrayTag>
static bool isReferenceCompatible ( PyObject obj)
static

Test whether a given python object is a numpy array with a compatible dtype and the correct shape and strides, so that it can be referenced as a view by this NumpyArray type (i.e. it conforms to the requirements of makeReference()).

◆ isStrictlyCompatible()

template<unsigned int N, class T , class Stride = StridedArrayTag>
static bool isStrictlyCompatible ( PyObject obj)
static

Deprecated, use isReferenceCompatible(obj) instead.

◆ standardStrideOrdering()

template<unsigned int N, class T , class Stride = StridedArrayTag>
static difference_type standardStrideOrdering ( )
static

Create a vector representing the standard stride ordering of a NumpyArray. That is, we get a vector representing the range [0,...,N-1], which denotes the stride ordering for Fortran order.

◆ makeReferenceUnchecked()

template<unsigned int N, class T , class Stride = StridedArrayTag>
void makeReferenceUnchecked ( PyObject obj)

Set up a view to the given object without checking compatibility. This function must not be used unless isReferenceCompatible(obj) returned true on the given object (otherwise, a crash is likely).

◆ makeReference() [1/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
bool makeReference ( PyObject obj,
bool  = false 
)

Try to set up a view referencing the given PyObject. Returns false if the python object is not a compatible numpy array (see isReferenceCompatible()).

The second parameter ('strict') is deprecated and will be ignored.

◆ makeReference() [2/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
bool makeReference ( const NumpyAnyArray array,
bool  strict = false 
)

Try to set up a view referencing the same data as the given NumpyAnyArray. This overloaded variant simply calls makeReference() on array.pyObject(). The parameter strict is deprecated and will be ignored.

◆ makeUnsafeReference()

template<unsigned int N, class T , class Stride = StridedArrayTag>
void makeUnsafeReference ( const view_type multiArrayView)

Set up an unsafe reference to the given MultiArrayView. ATTENTION: This creates a numpy.ndarray that points to the same data, but does not own it, so it must be ensured by other means that the memory does not get freed before the end of the ndarray's lifetime! (One elegant way would be to set the 'base' attribute of the resulting ndarray to a python object which directly or indirectly holds the memory of the given MultiArrayView.)

◆ makeCopy()

template<unsigned int N, class T , class Stride = StridedArrayTag>
void makeCopy ( PyObject obj,
bool  strict = false 
)

Try to create a copy of the given PyObject. Raises an exception when obj is not a compatible array (see isCopyCompatible() or isReferenceCompatible(), according to the parameter strict) or the Python constructor call failed.

◆ reshape()

template<unsigned int N, class T , class Stride = StridedArrayTag>
void reshape ( difference_type const shape)

Allocate new memory with the given shape and initialize with zeros.
If a stride ordering is given, the resulting array will have this stride ordering, when it is compatible with the array's memory layout (unstrided arrays only permit the standard ascending stride ordering).

Note: this operation invalidates dependent objects (MultiArrayViews and iterators)

◆ reshapeIfEmpty() [1/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
void reshapeIfEmpty ( difference_type const shape,
std::string  message = "" 
)

When this array has no data, allocate new memory with the given shape and initialize with zeros. Otherwise, check if the new shape matches the old shape and throw a precondition exception with the given message if not.

◆ reshapeIfEmpty() [2/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
void reshapeIfEmpty ( TaggedShape  tagged_shape,
std::string  message = "" 
)

When this array has no data, allocate new memory with the given shape and initialize with zeros. Otherwise, check if the new shape matches the old shape and throw a precondition exception with the given message if not.

◆ shape() [1/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
const difference_type & shape ( ) const

return the array's shape.

◆ shape() [2/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
difference_type_1 shape ( difference_type_1  n) const

return the array's shape at a certain dimension (same as size(n)).

◆ hasData()

template<unsigned int N, class T , class Stride = StridedArrayTag>
bool hasData ( ) const

returns true iff this view refers to valid data, i.e. data() is not a NULL pointer. (this is false after default construction.)

◆ strideOrdering() [1/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
difference_type strideOrdering ( ) const

Compute the ordering of the strides in this array. The result is describes the current permutation of the axes relative to the standard ascending stride order.

◆ strideOrdering() [2/2]

template<unsigned int N, class T , class Stride = StridedArrayTag>
MultiArrayView< N, T, StrideTag >::difference_type strideOrdering ( difference_type  strides)
static

Compute the ordering of the given strides. The result is describes the current permutation of the axes relative to the standard ascending stride order.

◆ init()

template<unsigned int N, class T , class Stride = StridedArrayTag>
template<class U >
MultiArrayView & init ( const U init)

Init with a constant.


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

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.12.2