RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
RawArray< T, Dynamic > Class Template Reference

Representation of a N-dimensional Mathematica array with dynamic depth. More...

#include <RawArray.hpp>

Inherits Mathematica::Array< T >.

Public Types

typedef rw::core::Ptr< RawArray< T, Dynamic > > Ptr
 Smart pointer type.
 
- Public Types inherited from Mathematica::Array< T >
typedef rw::core::Ptr< Array< T > > Ptr
 Smart pointer type.
 
- Public Types inherited from Mathematica::Expression
enum  Type {
  String , Integer , Real , Symbol ,
  Function , Array
}
 Type of expression. More...
 
typedef rw::core::Ptr< ExpressionPtr
 Smart pointer type.
 
typedef enum rwlibs::mathematica::Mathematica::Expression::Type Type
 Type of expression.
 

Public Member Functions

 RawArray (const T *const data, const int *const dims, const int depth)
 Construct new array with a dynamic dimensionality. More...
 
virtual ~RawArray ()
 Destructor.
 
void out (std::ostream &stream) const
 Print to output stream. More...
 
Mathematica::Expression::Ptr clone () const
 Make a copy of the expression. More...
 
const int * size () const
 Get the shape as a list of integers. More...
 
const T * data () const
 Get the raw data. More...
 
int dimensions () const
 Get the dimensions. More...
 
- Public Member Functions inherited from Mathematica::Array< T >
virtual ~Array ()
 Destructor.
 
Type getType () const
 Get the type of expression. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Mathematica::Expression
template<typename Type >
static void toList (std::list< rw::core::Ptr< Type >> &)
 Helper function for extracting a list of arguments when given as a variable number of arguments. More...
 
template<typename Type , typename Exp , typename... T>
static void toList (std::list< rw::core::Ptr< Type >> &list, const Exp &r, T... t)
 Helper function for extracting a list of arguments when given as a variable number of arguments. More...
 

Detailed Description

template<typename T>
class rwlibs::mathematica::RawArray< T, Dynamic >

Representation of a N-dimensional Mathematica array with dynamic depth.

Constructor & Destructor Documentation

◆ RawArray()

RawArray ( const T *const  data,
const int *const  dims,
const int  depth 
)
inline

Construct new array with a dynamic dimensionality.

Parameters
data[in] the data.
dims[in] the size of each dimension.
depth[in] the number of dimensions.

Member Function Documentation

◆ clone()

Mathematica::Expression::Ptr clone ( ) const
inlinevirtual

Make a copy of the expression.

Returns
a new copy.

Implements Mathematica::Expression.

◆ data()

const T* data ( ) const
inlinevirtual

Get the raw data.

Returns
a pointer to the first element.

Implements Mathematica::Array< T >.

◆ dimensions()

int dimensions ( ) const
inlinevirtual

Get the dimensions.

Returns
the number of dimensions.

Implements Mathematica::Array< T >.

◆ out()

void out ( std::ostream &  stream) const
inlinevirtual

Print to output stream.

Parameters
stream[in/out] the stream to print to.

Implements Mathematica::Expression.

◆ size()

const int* size ( ) const
inlinevirtual

Get the shape as a list of integers.

Returns
list of same length as dimensions()

Implements Mathematica::Array< T >.


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