1 #ifndef MATIOCPP_CELLARRAY_H
2 #define MATIOCPP_CELLARRAY_H
CellArray is a particular type of Variable specialized for cell arrays.
matioCpp::Variable operator[](const std::vector< index_type > &el)
Access specified element.
index_type rawIndexFromIndices(const std::vector< index_type > &el) const
Get the linear index corresponding to the provided indices.
bool fromVectorOfVariables(const std::vector< index_type > &dimensions, std::vector< Variable > &elements)
Set from a vector of Variables.
bool setElement(const std::vector< index_type > &el, const Variable &newValue)
Set the element at the specified position.
index_type numberOfElements() const
Get the total number of elements in the array.
matioCpp::Variable operator()(const std::vector< index_type > &el)
Access specified element.
bool setName(const std::string &newName)
Change the name of the Variable.
CellArray & operator=(const CellArray &other)
Assignement operator (copy) from another CellArray.
CellArray()
The type used for indices.
void clear()
Clear the cell array.
bool indicesFromRawIndex(size_t rawIndex, std::vector< index_type > &el) const
Get the indices given the raw index.
void resize(const std::vector< index_type > &newDimensions)
Resize the cell array.
The matioCpp::Variable class is the equivalent of matvar_t in matio.
std::string name() const
Get the name of the Variable.
matioCpp::Span< const size_t > dimensions() const
Get the dimensions of this object.
matioCpp::VariableType variableType() const
Get the VariableType.
matioCpp::ValueType valueType() const
Get the ValueType.
VariableType
Define the type of variable.
ValueType
The list of types for an element of a certain variable type.