matio-cpp  v0.2.5
A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
matioCpp::Vector< T > Class Template Reference

Vector is a particular type of Variable specialized for 1-D arrays of a generic type T. More...

#include <matioCpp/Vector.h>

+ Inheritance diagram for matioCpp::Vector< T >:

Public Types

using type = T
 
using element_type = typename get_type< T >::type
 Defines the type specified in the template. More...
 
using value_type = std::remove_cv_t< element_type >
 Defines the type of an element of the Vector. More...
 
using allocator_type = std::allocator< element_type >
 Defines the type of an element of the Vector without "const". More...
 
using index_type = size_t
 Defines how to allocate T. More...
 
using reference = element_type &
 The type used for indices. More...
 
using pointer = typename std::allocator_traits< std::allocator< element_type > >::pointer
 The reference type. More...
 
using const_pointer = typename std::allocator_traits< std::allocator< element_type > >::const_pointer
 The pointer type. More...
 
using iterator = vector_iterator< Vector< element_type >, false >
 The const pointer type. More...
 
using const_iterator = vector_iterator< Vector< element_type >, true >
 The iterator type. More...
 
using reverse_iterator = std::reverse_iterator< iterator >
 The const iterator type. More...
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 The reverse iterator type. More...
 
using string_input_type = typename std::conditional< matioCpp::is_string16_compatible< T >::value, std::u16string, typename std::conditional< matioCpp::is_string32_compatible< T >::value, std::u32string, std::string >::type >::type
 The const reverse iterator type. More...
 
using string_output_type = typename std::conditional< matioCpp::is_string_compatible< T >::value, std::string, typename std::conditional< matioCpp::is_string16_compatible< T >::value, std::u16string, typename std::conditional< matioCpp::is_string32_compatible< T >::value, std::u32string, void >::type >::type >::type
 The type of string that can be used as initialization. More...
 

Public Member Functions

 Vector ()
 The output type of the conversion to string. More...
 
 Vector (const std::string &name)
 Constructor. More...
 
 Vector (const std::string &name, index_type dimensions)
 Constructor. More...
 
template<typename in = element_type, typename = typename std::enable_if<!std::is_same<element_type, const char>::value && !std::is_same<element_type, const char16_t>::value && !std::is_same<element_type, const char32_t>::value && !std::is_same<value_type, bool>::value>::type>
 Vector (const std::string &name, Span< const element_type > inputVector)
 Constructor. More...
 
 Vector (const std::string &name, const string_input_type &inputString)
 Constructor. More...
 
 Vector (const std::string &name, const std::vector< bool > &inputVector)
 Constructor. More...
 
 Vector (const Vector< T > &other)
 Copy constructor. More...
 
 Vector (Vector< T > &&other)
 Move constructor. More...
 
 Vector (const MatvarHandler &handler)
 Constructor to share the data ownership of another variable. More...
 
 ~Vector ()
 Destructor. More...
 
Vector< T > & operator= (const Vector< T > &other)
 Assignement operator (copy) from another Vector. More...
 
Vector< T > & operator= (Vector< T > &&other)
 Assignement operator (move) from another Vector. More...
 
Vector< element_type > & operator= (const Span< element_type > &other)
 Assignement operator from another Vector. More...
 
Vector< T > & operator= (const string_input_type &other)
 Assignement operator from another string. More...
 
Vector< T > & operator= (const std::vector< bool > &other)
 Assignement operator from a vector of booleans. More...
 
matioCpp::Span< element_typetoSpan ()
 Get this Vector as a Span. More...
 
const matioCpp::Span< const element_typetoSpan () const
 Get this Vector as a Span (const version) More...
 
bool setName (const std::string &newName)
 Change the name of the Variable. More...
 
index_type size () const
 Get the size of the vector. More...
 
void resize (index_type newSize)
 Resize the vector. More...
 
void clear ()
 Clear the vector. More...
 
pointer data ()
 Direct access to the underlying array. More...
 
const_pointer data () const
 Direct access to the underlying array. More...
 
reference operator() (index_type el)
 Access specified element. More...
 
value_type operator() (index_type el) const
 Access specified element. More...
 
string_output_type operator() () const
 Get the Vector as a string. More...
 
reference operator[] (index_type el)
 Access specified element. More...
 
value_type operator[] (index_type el) const
 Access specified element. More...
 
iterator begin ()
 begin Iterator More...
 
iterator end ()
 end Iterator More...
 
const_iterator begin () const
 begin Iterator More...
 
const_iterator end () const
 end Iteratorspan More...
 
const_iterator cbegin () const
 cbegin Iterator More...
 
const_iterator cend () const
 cend Iterator More...
 
reverse_iterator rbegin ()
 rbegin Iterator to the first element of the reversed vector More...
 
reverse_iterator rend ()
 rend Iterator to the element following the last element of the reversed vector. More...
 
const_reverse_iterator rbegin () const
 rbegin Iterator to the first element of the reversed vector More...
 
const_reverse_iterator rend () const
 rend Iterator to the element following the last element of the reversed vector. More...
 
const_reverse_iterator crbegin () const
 crbegin Iterator to the first element of the reversed vector More...
 
const_reverse_iterator crend () const
 crend Iterator to the element following the last element of the reversed vector. More...
 
template<typename T >
 Vector (const std::string &name, matioCpp::Vector< T >::index_type dimensions)
 
template<typename , typename >
 Vector (const std::string &name, Span< const typename matioCpp::Vector< T >::element_type > inputVector)
 
- Public Member Functions inherited from matioCpp::Variable
 Variable ()
 Default constructor. More...
 
 Variable (const matvar_t *inputVar)
 Constructor from an existing matvar_t pointer. More...
 
 Variable (const Variable &other)
 Copy constructor. More...
 
 Variable (Variable &&other)
 Move constructor. More...
 
 Variable (const MatvarHandler &handler)
 Constructor to share the data ownership of another variable. More...
 
 ~Variable ()
 Destructor. More...
 
Variableoperator= (const Variable &other)
 Copy assignement. More...
 
Variableoperator= (Variable &&other)
 Move assignement. More...
 
bool fromMatio (const matvar_t *inputVar)
 Set this variable from an existing matio variable. More...
 
bool fromOther (const Variable &other)
 Set this variable from another variable. More...
 
bool fromOther (Variable &&other)
 Set this variable from another variable. More...
 
const matvar_t * toMatio () const
 Convert this Variable to a matio variable. More...
 
matvar_t * toMatio ()
 Convert this Variable to a matio variable. More...
 
std::string name () const
 Get the name of the Variable. More...
 
matioCpp::VariableType variableType () const
 Get the VariableType. More...
 
matioCpp::ValueType valueType () const
 Get the ValueType. More...
 
bool isComplex () const
 Get if the variable is complex. More...
 
matioCpp::Span< const size_t > dimensions () const
 Get the dimensions of this object. More...
 
bool isValid () const
 Check if the variable is valid. More...
 
template<typename T >
matioCpp::Element< T > asElement ()
 Cast the variable as a Element. More...
 
template<typename T >
const matioCpp::Element< T > asElement () const
 Cast the variable as a const Element. More...
 
template<typename T >
matioCpp::Vector< T > asVector ()
 Cast the variable as a Vector. More...
 
template<typename T >
const matioCpp::Vector< T > asVector () const
 Cast the variable as a const Vector. More...
 
matioCpp::String asString ()
 Cast the variable as a String. More...
 
const matioCpp::String asString () const
 Cast the variable as a const String. More...
 
matioCpp::String16 asString16 ()
 Cast the variable as a String16. More...
 
const matioCpp::String16 asString16 () const
 Cast the variable as a const String16. More...
 
matioCpp::String32 asString32 ()
 Cast the variable as a String32. More...
 
const matioCpp::String32 asString32 () const
 Cast the variable as a const String32. More...
 
template<typename T >
matioCpp::MultiDimensionalArray< T > asMultiDimensionalArray ()
 Cast the variable as a MultiDimensionalArray. More...
 
template<typename T >
const matioCpp::MultiDimensionalArray< T > asMultiDimensionalArray () const
 Cast the variable as a const MultiDimensionalArray. More...
 
matioCpp::CellArray asCellArray ()
 Cast the variable as a CellArray. More...
 
const matioCpp::CellArray asCellArray () const
 Cast the variable as a const CellArray. More...
 
matioCpp::Struct asStruct ()
 Cast the variable as a Struct. More...
 
const matioCpp::Struct asStruct () const
 Cast the variable as a const Struct. More...
 
matioCpp::StructArray asStructArray ()
 Cast the variable as a StructArray. More...
 
const matioCpp::StructArray asStructArray () const
 Cast the variable as a const StructArray. More...
 

Additional Inherited Members

- Protected Member Functions inherited from matioCpp::Variable
bool initializeVariable (const std::string &name, const VariableType &variableType, const ValueType &valueType, matioCpp::Span< const size_t > dimensions, void *data)
 Initialize the variable. More...
 
bool initializeComplexVariable (const std::string &name, const VariableType &variableType, const ValueType &valueType, matioCpp::Span< const size_t > dimensions, void *realData, void *imaginaryData)
 Initialize a complex variable. More...
 
template<typename T >
bool initializeComplexVector (const std::string &name, const Span< T > realInputVector, const Span< T > imaginaryInputVector)
 Initialize a complex vector. More...
 
bool changeName (const std::string &newName)
 Change the name of the variable. More...
 
size_t getArrayNumberOfElements () const
 Get the total number of elements in the array. More...
 
bool setCellElement (size_t linearIndex, const Variable &newValue)
 Set a cell element at a specified linear position. More...
 
Variable getCellElement (size_t linearIndex)
 Get a cell element at a specified linear position. More...
 
const Variable getCellElement (size_t linearIndex) const
 Get a cell element at a specified linear position. More...
 
size_t getStructNumberOfFields () const
 Get the total number of fields in the variable, considered as a struct. More...
 
char *const * getStructFields () const
 Get the list of fields in the variable, considered as a struct. More...
 
size_t getStructFieldIndex (const std::string &field) const
 Get the index of the specified field in the variable, considered as a struct. More...
 
bool setStructField (size_t index, const Variable &newValue, size_t structPositionInArray=0)
 Set the field of the struct at the specified position. More...
 
bool addStructField (const std::string &newField)
 Add a new field to the variable, considered as a struct. More...
 
bool setStructField (const std::string &field, const Variable &newValue, size_t structPositionInArray=0)
 Set the field of the struct given the newValue name. More...
 
Variable getStructField (size_t index, size_t structPositionInArray=0)
 Get the specified field in the variable, considered as a struct. More...
 
const Variable getStructField (size_t index, size_t structPositionInArray=0) const
 Get the specified field in the variable, considered as a struct. More...
 
Struct getStructArrayElement (size_t linearIndex)
 Get an element of the variable, considered as a StructArray. More...
 
const Struct getStructArrayElement (size_t linearIndex) const
 Get an element of the variable, considered as a StructArray. More...
 

Detailed Description

template<typename T>
class matioCpp::Vector< T >

Vector is a particular type of Variable specialized for 1-D arrays of a generic type T.

Definition at line 22 of file Vector.h.

Member Typedef Documentation

◆ allocator_type

template<typename T >
using matioCpp::Vector< T >::allocator_type = std::allocator<element_type>

Defines the type of an element of the Vector without "const".

Useful to use make_span.

Definition at line 32 of file Vector.h.

◆ const_iterator

template<typename T >
using matioCpp::Vector< T >::const_iterator = vector_iterator<Vector<element_type>, true>

The iterator type.

Definition at line 44 of file Vector.h.

◆ const_pointer

The pointer type.

Definition at line 40 of file Vector.h.

◆ const_reverse_iterator

The reverse iterator type.

Definition at line 48 of file Vector.h.

◆ element_type

template<typename T >
using matioCpp::Vector< T >::element_type = typename get_type<T>::type

Defines the type specified in the template.

Definition at line 28 of file Vector.h.

◆ index_type

template<typename T >
using matioCpp::Vector< T >::index_type = size_t

Defines how to allocate T.

Useful to use make_span.

Definition at line 34 of file Vector.h.

◆ iterator

template<typename T >
using matioCpp::Vector< T >::iterator = vector_iterator<Vector<element_type>, false>

The const pointer type.

Definition at line 42 of file Vector.h.

◆ pointer

template<typename T >
using matioCpp::Vector< T >::pointer = typename std::allocator_traits<std::allocator<element_type> >::pointer

The reference type.

Definition at line 38 of file Vector.h.

◆ reference

template<typename T >
using matioCpp::Vector< T >::reference = element_type&

The type used for indices.

Definition at line 36 of file Vector.h.

◆ reverse_iterator

template<typename T >
using matioCpp::Vector< T >::reverse_iterator = std::reverse_iterator<iterator>

The const iterator type.

Definition at line 46 of file Vector.h.

◆ string_input_type

The const reverse iterator type.

Definition at line 50 of file Vector.h.

◆ string_output_type

The type of string that can be used as initialization.

Definition at line 53 of file Vector.h.

◆ type

template<typename T >
using matioCpp::Vector< T >::type = T

Definition at line 26 of file Vector.h.

◆ value_type

template<typename T >
using matioCpp::Vector< T >::value_type = std::remove_cv_t<element_type>

Defines the type of an element of the Vector.

Needed to use the iterator.

Definition at line 30 of file Vector.h.

Constructor & Destructor Documentation

◆ Vector() [1/11]

template<typename T >
matioCpp::Vector< T >::Vector

The output type of the conversion to string.

Default Constructor

Note
The name is set to "unnamed_vector".

Definition at line 52 of file Vector.tpp.

References std::vector< T >::data(), matioCpp::make_span(), and std::vector< T >::push_back().

◆ Vector() [2/11]

template<typename T >
matioCpp::Vector< T >::Vector ( const std::string name)

Constructor.

Parameters
nameThe name of the Vector
Note
If the type is char, the name is also copied in the content.

Definition at line 70 of file Vector.tpp.

References std::vector< T >::data(), matioCpp::make_span(), std::vector< T >::push_back(), and std::string::size().

◆ Vector() [3/11]

template<typename T >
matioCpp::Vector< T >::Vector ( const std::string name,
index_type  dimensions 
)

Constructor.

Parameters
nameThe name of the Vector
dimensionsThe size of the Vector.

◆ Vector() [4/11]

template<typename T >
template<typename in = element_type, typename = typename std::enable_if<!std::is_same<element_type, const char>::value && !std::is_same<element_type, const char16_t>::value && !std::is_same<element_type, const char32_t>::value && !std::is_same<value_type, bool>::value>::type>
matioCpp::Vector< T >::Vector ( const std::string name,
Span< const element_type inputVector 
)

Constructor.

Parameters
nameThe name of the Vector
inputVectorThe input data.

◆ Vector() [5/11]

template<typename T >
matioCpp::Vector< T >::Vector ( const std::string name,
const string_input_type inputString 
)

Constructor.

Parameters
nameThe name of the Vector
inputStringThe input string.

Definition at line 117 of file Vector.tpp.

◆ Vector() [6/11]

template<typename T >
matioCpp::Vector< T >::Vector ( const std::string name,
const std::vector< bool > &  inputVector 
)

Constructor.

Parameters
nameThe name of the Vector
inputVectorThe input vector of boolean.

Definition at line 128 of file Vector.tpp.

References matioCpp::make_span(), and std::vector< T >::size().

◆ Vector() [7/11]

template<typename T >
matioCpp::Vector< T >::Vector ( const Vector< T > &  other)

Copy constructor.

Definition at line 137 of file Vector.tpp.

◆ Vector() [8/11]

template<typename T >
matioCpp::Vector< T >::Vector ( Vector< T > &&  other)

Move constructor.

Definition at line 143 of file Vector.tpp.

References std::forward().

◆ Vector() [9/11]

template<typename T >
matioCpp::Vector< T >::Vector ( const MatvarHandler handler)

Constructor to share the data ownership of another variable.

Parameters
handlerThe MatvarHandler handler to the matvar_t which has to be shared.

Definition at line 149 of file Vector.tpp.

References matioCpp::MatvarHandler::get(), matioCpp::make_span(), matioCpp::MatvarHandler::valueType(), and matioCpp::MatvarHandler::variableType().

◆ ~Vector()

template<typename T >
matioCpp::Vector< T >::~Vector

Destructor.

Definition at line 161 of file Vector.tpp.

◆ Vector() [10/11]

template<typename T >
template<typename T >
matioCpp::Vector< T >::Vector ( const std::string name,
matioCpp::Vector< T >::index_type  dimensions 
)

◆ Vector() [11/11]

template<typename T >
template<typename , typename >
matioCpp::Vector< T >::Vector ( const std::string name,
Span< const typename matioCpp::Vector< T >::element_type inputVector 
)

Definition at line 111 of file Vector.tpp.

Member Function Documentation

◆ begin() [1/2]

template<typename T >
matioCpp::Vector< T >::iterator matioCpp::Vector< T >::begin

begin Iterator

Returns
An iterator to the beginning of the sequence

Definition at line 332 of file Vector.tpp.

◆ begin() [2/2]

template<typename T >
matioCpp::Vector< T >::const_iterator matioCpp::Vector< T >::begin

begin Iterator

Returns
A const iterator to the end of the sequence

Definition at line 344 of file Vector.tpp.

◆ cbegin()

template<typename T >
matioCpp::Vector< T >::const_iterator matioCpp::Vector< T >::cbegin

cbegin Iterator

Returns
A const iterator to the end of the sequence

Definition at line 356 of file Vector.tpp.

◆ cend()

template<typename T >
matioCpp::Vector< T >::const_iterator matioCpp::Vector< T >::cend

cend Iterator

Returns
A const iterator to the end of the sequence
Warning
This element acts as a placeholder; attempting to access it results in undefined behavior.

Definition at line 362 of file Vector.tpp.

◆ clear()

template<typename T >
void matioCpp::Vector< T >::clear

Clear the vector.

Definition at line 280 of file Vector.tpp.

References std::move().

◆ crbegin()

template<typename T >
matioCpp::Vector< T >::const_reverse_iterator matioCpp::Vector< T >::crbegin

crbegin Iterator to the first element of the reversed vector

Returns
Returns a const reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector

Definition at line 392 of file Vector.tpp.

◆ crend()

template<typename T >
matioCpp::Vector< T >::const_reverse_iterator matioCpp::Vector< T >::crend

crend Iterator to the element following the last element of the reversed vector.

Returns
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector.
Warning
This element acts as a placeholder; attempting to access it results in undefined behavior.

Definition at line 398 of file Vector.tpp.

◆ data() [1/2]

template<typename T >
matioCpp::Vector< T >::pointer matioCpp::Vector< T >::data

Direct access to the underlying array.

Returns
A pointer to the internal data.

Definition at line 286 of file Vector.tpp.

◆ data() [2/2]

template<typename T >
matioCpp::Vector< T >::const_pointer matioCpp::Vector< T >::data

Direct access to the underlying array.

Returns
A pointer to the internal data.

Definition at line 292 of file Vector.tpp.

◆ end() [1/2]

template<typename T >
matioCpp::Vector< T >::iterator matioCpp::Vector< T >::end

end Iterator

Returns
An iterator to the end of the sequence
Warning
This element acts as a placeholder; attempting to access it results in undefined behavior.

Definition at line 338 of file Vector.tpp.

◆ end() [2/2]

template<typename T >
matioCpp::Vector< T >::const_iterator matioCpp::Vector< T >::end

end Iteratorspan

Returns
A const iterator to the end of the sequence
Warning
This element acts as a placeholder; attempting to access it results in undefined behavior.

Definition at line 350 of file Vector.tpp.

◆ operator()() [1/3]

template<typename T >
matioCpp::Vector< T >::string_output_type matioCpp::Vector< T >::operator()

Get the Vector as a string.

Returns
A string that copies the internal data.
Note
This is available only if the type is char.

Definition at line 310 of file Vector.tpp.

◆ operator()() [2/3]

template<typename T >
reference matioCpp::Vector< T >::operator() ( index_type  el)

Access specified element.

Parameters
elThe element to be accessed.
Warning
el has to be structly smaller than size.
Returns
A reference to the element.

◆ operator()() [3/3]

template<typename T >
value_type matioCpp::Vector< T >::operator() ( index_type  el) const

Access specified element.

Parameters
elThe element to be accessed.
Warning
el has to be structly smaller than size.
Returns
A copy to the element.

◆ operator=() [1/5]

template<typename T >
Vector<element_type>& matioCpp::Vector< T >::operator= ( const Span< element_type > &  other)

Assignement operator from another Vector.

Parameters
otherThe input span.
Returns
A reference to this Vector.

◆ operator=() [2/5]

template<typename T >
matioCpp::Vector< T > & matioCpp::Vector< T >::operator= ( const std::vector< bool > &  other)

Assignement operator from a vector of booleans.

Parameters
otherThe input vector.
Note
This is available only if the type is Logical.
Returns
A reference to this Vector.

Definition at line 218 of file Vector.tpp.

References matioCpp::make_span(), and std::vector< T >::size().

◆ operator=() [3/5]

template<typename T >
matioCpp::Vector< T > & matioCpp::Vector< T >::operator= ( const string_input_type other)

Assignement operator from another string.

Parameters
otherThe input string.
Note
This is available only if the type is char, char16_t, char32_t, uint8_t, uint16_t or uint32_t.
Returns
A reference to this Vector.

Definition at line 197 of file Vector.tpp.

References matioCpp::Vector.

◆ operator=() [4/5]

template<typename T >
matioCpp::Vector< T > & matioCpp::Vector< T >::operator= ( const Vector< T > &  other)

Assignement operator (copy) from another Vector.

Parameters
otherThe other Vector.
Note
Also the name is copied
Returns
A reference to this Vector.

Definition at line 167 of file Vector.tpp.

◆ operator=() [5/5]

template<typename T >
matioCpp::Vector< T > & matioCpp::Vector< T >::operator= ( matioCpp::Vector< T > &&  other)

Assignement operator (move) from another Vector.

Parameters
otherThe other Vector.
Note
Also the name is copied.
Returns
A reference to this Vector.

Definition at line 174 of file Vector.tpp.

References std::forward().

◆ operator[]() [1/2]

template<typename T >
reference matioCpp::Vector< T >::operator[] ( index_type  el)

Access specified element.

Parameters
elThe element to be accessed.
Warning
el has to be structly smaller than size.
Returns
A reference to the element.

◆ operator[]() [2/2]

template<typename T >
value_type matioCpp::Vector< T >::operator[] ( index_type  el) const

Access specified element.

Parameters
elThe element to be accessed.
Warning
el has to be structly smaller than size.
Returns
A copy to the element.

◆ rbegin() [1/2]

template<typename T >
matioCpp::Vector< T >::reverse_iterator matioCpp::Vector< T >::rbegin

rbegin Iterator to the first element of the reversed vector

Returns
Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector

Definition at line 368 of file Vector.tpp.

◆ rbegin() [2/2]

template<typename T >
matioCpp::Vector< T >::const_reverse_iterator matioCpp::Vector< T >::rbegin

rbegin Iterator to the first element of the reversed vector

Returns
Returns a const reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector

Definition at line 380 of file Vector.tpp.

◆ rend() [1/2]

template<typename T >
matioCpp::Vector< T >::reverse_iterator matioCpp::Vector< T >::rend

rend Iterator to the element following the last element of the reversed vector.

Returns
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector.
Warning
This element acts as a placeholder; attempting to access it results in undefined behavior.

Definition at line 374 of file Vector.tpp.

◆ rend() [2/2]

template<typename T >
matioCpp::Vector< T >::const_reverse_iterator matioCpp::Vector< T >::rend

rend Iterator to the element following the last element of the reversed vector.

Returns
Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector.
Warning
This element acts as a placeholder; attempting to access it results in undefined behavior.

Definition at line 386 of file Vector.tpp.

◆ resize()

template<typename T >
void matioCpp::Vector< T >::resize ( index_type  newSize)

Resize the vector.

Parameters
newSizeThe new size.
Warning
This requires to allocate memory for twice the new size.

Definition at line 269 of file Vector.tpp.

References std::vector< T >::data(), and std::min().

◆ setName()

template<typename T >
bool matioCpp::Vector< T >::setName ( const std::string newName)

Change the name of the Variable.

Parameters
newNameThe new name
Returns
True if successful.

Definition at line 254 of file Vector.tpp.

◆ size()

template<typename T >
matioCpp::Vector< T >::index_type matioCpp::Vector< T >::size

Get the size of the vector.

Returns
The size of the Vector.

Definition at line 260 of file Vector.tpp.

References std::max(), and std::min().

◆ toSpan() [1/2]

template<typename T >
matioCpp::Span< typename matioCpp::Vector< T >::element_type > matioCpp::Vector< T >::toSpan

Get this Vector as a Span.

Definition at line 242 of file Vector.tpp.

References matioCpp::make_span().

◆ toSpan() [2/2]

template<typename T >
const matioCpp::Span< const typename matioCpp::Vector< T >::element_type > matioCpp::Vector< T >::toSpan

Get this Vector as a Span (const version)

Definition at line 248 of file Vector.tpp.

References matioCpp::make_span().


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