rarray

template<class T>
class rarray : public xt::rcontainer<rarray<T>>, public xcontainer_semantic<rarray<T>>

Multidimensional container providing the xtensor container semantics to an R array.

rarray is similar to the xarray container in that it has a dynamic dimensionality. Reshapes of a rarray container are reflected in the underlying R array.

See also

rtensor

Template Parameters:

T – The type of the element stored in the rarray.

Constructors

inline rarray(const shape_type &shape)

Allocates an uninitialized rarray with the specified shape.

Parameters:

shape – the shape of the rarray

inline rarray(const shape_type &shape, const_reference value)

Allocates a rarray with the specified shape.

Elements are initialized to the specified value.

Parameters:
  • shape – the shape of the rarray

  • value – the value of the elements

inline rarray(const value_type &t)

Allocates a rarray with nested initializer lists.

template<class S>
inline rarray<T> from_shape(S &&shape)

Allocates and returns an rarray with the specified shape.

Parameters:

shape – the shape of the rarray

Extended copy semantic

template<class E>
inline rarray(const xexpression<E> &e)

The extended copy constructor.

template<class E>
inline auto operator=(const xexpression<E> &e) -> self_type&

The extended assignment operator.

Copy semantic

inline rarray(const self_type &rhs)

The copy constructor.

inline self_type &operator=(const self_type &rhs)

The assignment operator.