|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
1-D array used in linear algebra. More...
#include <array.hpp>
Collaboration diagram for Array:Public Member Functions | |
Constructors, destructor, and assignment | |
| Array () | |
| creates the array with size 0 More... | |
| Array (Size size) | |
| creates the array with the given dimension More... | |
| Array (Size size, Real value) | |
creates the array and fills it with value More... | |
| Array (Size size, Real value, Real increment) | |
| creates the array and fills it according to \( a_{0} = value, a_{i}=a_{i-1}+increment \) More... | |
| Array (const Array &) | |
| Array (Array &&) noexcept | |
| Array (std::initializer_list< Real >) | |
| template<typename T , typename = std::enable_if_t<std::is_convertible_v<T, Real>>> | |
| Array (std::initializer_list< T > init) | |
| template<class ForwardIterator > | |
| Array (ForwardIterator begin, ForwardIterator end) | |
| creates the array from an iterable sequence More... | |
| ~Array ()=default | |
| Array & | operator= (const Array &) |
| Array & | operator= (Array &&) noexcept |
| bool | operator== (const Array &) const |
| bool | operator!= (const Array &) const |
Vector algebra | |
| |
| const Array & | operator+= (const Array &) |
| const Array & | operator+= (Real) |
| const Array & | operator-= (const Array &) |
| const Array & | operator-= (Real) |
| const Array & | operator*= (const Array &) |
| const Array & | operator*= (Real) |
| const Array & | operator/= (const Array &) |
| const Array & | operator/= (Real) |
Element access | |
| Real | operator[] (Size) const |
| read-only More... | |
| Real | at (Size) const |
| Real | front () const |
| Real | back () const |
| Real & | operator[] (Size) |
| read-write More... | |
| Real & | at (Size) |
| Real & | front () |
| Real & | back () |
Iterator access | |
| const_iterator | begin () const |
| iterator | begin () |
| const_iterator | end () const |
| iterator | end () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rend () const |
| reverse_iterator | rend () |
Inspectors | |
| typedef Size | size_type |
| typedef Real | value_type |
| typedef Real * | iterator |
| typedef const Real * | const_iterator |
| typedef std::reverse_iterator< iterator > | reverse_iterator |
| typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
| Size | size () const |
| dimension of the array More... | |
| bool | empty () const |
| whether the array is empty More... | |
Utilities | |
| std::unique_ptr< Real[]> | data_ |
| Size | n_ |
| void | resize (Size n) |
| void | swap (Array &) noexcept |
1-D array used in linear algebra.
This class implements the concept of vector as used in linear algebra. As such, it is not meant to be used as a container - std::vector should be used instead.
| typedef Real value_type |
| typedef const Real* const_iterator |
| typedef std::reverse_iterator<iterator> reverse_iterator |
| typedef std::reverse_iterator<const_iterator> const_reverse_iterator |
| Array | ( | ForwardIterator | begin, |
| ForwardIterator | end | ||
| ) |
|
default |
| Real front | ( | ) | const |
| Real back | ( | ) | const |
| Size size | ( | ) | const |
dimension of the array
Definition at line 483 of file array.hpp.
Here is the caller graph for this function:| bool empty | ( | ) | const |
whether the array is empty
Definition at line 487 of file array.hpp.
Here is the caller graph for this function:| Array::const_iterator begin | ( | ) | const |
| Array::iterator begin | ( | ) |
| Array::const_iterator end | ( | ) | const |
| Array::iterator end | ( | ) |
| Array::const_reverse_iterator rbegin | ( | ) | const |
| Array::reverse_iterator rbegin | ( | ) |
| Array::const_reverse_iterator rend | ( | ) | const |
| Array::reverse_iterator rend | ( | ) |
| void resize | ( | Size | n | ) |
|
noexcept |
|
related |