Template Class FixedStorage#
Defined in File storage.hpp
Class Documentation#
-
template<typename Scalar_, size_t... Size_>
class FixedStorage# Public Types
-
using SizeType = size_t#
-
using DifferenceType = ptrdiff_t#
-
using ConstReverseIterator = std::reverse_iterator<ConstIterator>#
Public Functions
-
FixedStorage()#
Default constructor.
-
explicit FixedStorage(const Scalar &value)#
Create a FixedStorage object filled with
value
- Parameters
value – Value to fill the FixedStorage object with
-
FixedStorage(const FixedStorage &other)#
Create a FixedStorage object from another FixedStorage object
- Parameters
other – FixedStorage object to copy
-
FixedStorage(FixedStorage &&other) noexcept#
Move constructor for a FixedStorage object
- Parameters
other – FixedStorage object to move
-
explicit FixedStorage(const std::initializer_list<Scalar> &list)#
Create a FixedStorage object from a std::initializer_list
- Template Parameters
V – Type of the elements in the initializer list
- Parameters
list – Initializer list to copy
-
explicit FixedStorage(const std::vector<Scalar> &vec)#
Create a FixedStorage object from a std::vector
- Template Parameters
V – Type of the elements in the vector
- Parameters
vec – Vector to copy
-
FixedStorage &operator=(const FixedStorage &other) noexcept#
Assignment operator for a FixedStorage object
- Parameters
other – FixedStorage object to copy
- Returns
*this
-
FixedStorage &operator=(FixedStorage &&other) noexcept = default#
Move assignment operator for a FixedStorage object
- Parameters
other – FixedStorage object to move
- Returns
*this
-
~FixedStorage() = default#
Free a FixedStorage object.
-
void resize(SizeType newSize)#
Resize a Storage object to
size
elements. Existing elements are preserved.- Parameters
size – New size of the Storage object
-
void resize(SizeType newSize, int)#
Resize a Storage object to
size
elements. Existing elements are not preserved- Parameters
size – New size of the Storage object
-
SizeType size() const noexcept#
Return the number of elements in the FixedStorage object
- Returns
Number of elements in the FixedStorage object
-
FixedStorage copy() const#
Create a copy of the FixedStorage object.
- Returns
Copy of the FixedStorage object
-
ConstReference operator[](SizeType index) const#
Const access to the element at index
index
- Parameters
index – Index of the element to access
- Returns
Const reference to the element at index
index
-
Reference operator[](SizeType index)#
Access to the element at index
index
- Parameters
index – Index of the element to access
- Returns
Reference to the element at index
index
-
ConstIterator begin() const noexcept#
-
ConstIterator end() const noexcept#
-
ConstIterator cbegin() const noexcept#
-
ConstIterator cend() const noexcept#
-
ReverseIterator rbegin() noexcept#
-
ReverseIterator rend() noexcept#
-
ConstReverseIterator rbegin() const noexcept#
-
ConstReverseIterator rend() const noexcept#
-
ConstReverseIterator crbegin() const noexcept#
-
ConstReverseIterator crend() const noexcept#
Public Static Functions
-
template<typename ShapeType>
static ShapeType defaultShape()
-
using SizeType = size_t#