![]() |
RobWorkProject
23.9.11-
|
Representation of a N-dimensional Mathematica array with fixed depth. More...
#include <RawArray.hpp>
Inherits Mathematica::Array< T >.
Public Types | |
| typedef rw::core::Ptr< RawArray< T, Dim > > | Ptr |
| Smart pointer type. | |
| typedef boost::multi_array< T, Dim > | ArrayType |
| The underlying array 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< Expression > | Ptr |
| Smart pointer type. | |
| typedef enum rwlibs::mathematica::Mathematica::Expression::Type | Type |
| Type of expression. | |
Public Member Functions | |
| RawArray (const ArrayType &array) | |
| Construct new array. More... | |
| RawArray (boost::array< typename ArrayType::index, Dim > shape) | |
| Construct new array with specific shape. More... | |
| RawArray (const std::vector< std::size_t > shape) | |
| Construct new array with specific shape. More... | |
| RawArray (const T *const data, const int *const shape) | |
| Construct RawArray from native Mathematica array. More... | |
| virtual | ~RawArray () |
| Destructor. | |
| const ArrayType & | getArray () const |
| Get the underlying array. More... | |
| void | set (std::vector< std::size_t > indexes, T value) |
| Set a value. More... | |
| std::vector< std::size_t > | getSize () const |
| Get the shape. More... | |
| virtual void | out (std::ostream &stream) const |
| Print to output stream. More... | |
| virtual Mathematica::Expression::Ptr | clone () const |
| Make a copy of the expression. More... | |
| virtual const int * | size () const |
| Get the shape as a list of integers. More... | |
| virtual const T * | data () const |
| Get the raw data. More... | |
| virtual 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... | |
Static Public Member Functions | |
| static RawArray< T, Dim >::Ptr | fromExpression (const Mathematica::FunctionBase &exp) |
| Construct a new array from an expression. More... | |
| static void | setValues (ArrayType &array, rw::core::Ptr< const List > list, std::size_t level, boost::array< typename ArrayType::index, Dim > cur, const std::vector< std::size_t > &size) |
| Set the values of an array recursively. More... | |
| static List::Ptr | createList (const ArrayType &array, std::size_t level, boost::array< typename ArrayType::index, Dim > cur, const std::vector< std::size_t > &size) |
| Create a List expression from an array. 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... | |
Representation of a N-dimensional Mathematica array with fixed depth.
|
inline |
Construct new array with specific shape.
| shape | [in] the shape. |
|
inline |
Construct new array with specific shape.
| shape | [in] the shape. |
|
inline |
Construct RawArray from native Mathematica array.
| data | [in] the data. |
| shape | [in] the shape. |
|
inlinevirtual |
|
inlinestatic |
Create a List expression from an array.
| array | [in] the array. |
| level | [in] the current level. |
| cur | [in] the current indices. |
| size | [in] the shape of the array. |
|
inlinevirtual |
|
inlinevirtual |
|
inlinestatic |
Construct a new array from an expression.
| exp | [in] the expression to parse. |
|
inline |
Get the underlying array.
|
inline |
Get the shape.
|
inlinevirtual |
Print to output stream.
| stream | [in/out] the stream to print to. |
Implements Mathematica::Expression.
|
inline |
Set a value.
| indexes | [in] the indices. |
| value | [in] the value to set. |
|
inlinestatic |
Set the values of an array recursively.
| array | [in/out] the array. |
| list | [in] the list at the current level. |
| level | [in] the current level. |
| cur | [in] the current indices. |
| size | [in] the shape of the array. |
|
inlinevirtual |
Get the shape as a list of integers.
Implements Mathematica::Array< T >.