|
LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
A fixed-size 1D array class. More...
#include <Vector.h>
Public Types | |
| typedef T | Element |
| typedef T | Value |
| typedef T & | Reference |
| typedef T const & | ConstReference |
| typedef T * | Iterator |
| typedef T const * | ConstIterator |
| typedef Value | value_type |
| typedef Iterator | iterator |
| typedef ConstIterator | const_iterator |
| typedef Reference | reference |
| typedef ConstReference | const_reference |
| typedef boost::reverse_iterator< T * > | reverse_iterator |
| typedef boost::reverse_iterator< const T * > | const_reverse_iterator |
| typedef T * | pointer |
| typedef int | difference_type |
| typedef int | size_type |
| typedef boost::mpl::int_< N > | ND |
Public Member Functions | |
| size_type | size () const |
| Return the size of the Vector. More... | |
| size_type | max_size () const |
| Return the size of the Vector. More... | |
| bool | empty () const |
| Return true if size() == 0. More... | |
| iterator | begin () |
| Return an iterator to the beginning of the Vector. More... | |
| const_iterator | begin () const |
| Return a const_iterator to the beginning of the Vector. More... | |
| iterator | end () |
| Return an iterator to the end of the Vector. More... | |
| const_iterator | end () const |
| Return a const_iterator to the end of the Vector. More... | |
| reverse_iterator | rbegin () |
| Return a reverse_iterator to the beginning of the reversed Vector. More... | |
| const_reverse_iterator | rbegin () const |
| Return a const_reverse_iterator to the beginning of the reversed Vector. More... | |
| reverse_iterator | rend () |
| Return a reverse_iterator to the end of the reversed Vector. More... | |
| const_reverse_iterator | rend () const |
| Return a const_reverse_iterator to the end of the reversed Vector. More... | |
| reference | front () |
| Return a reference to the first element. More... | |
| reference | back () |
| Return a reference to the last element. More... | |
| const_reference | front () const |
| Return a const_reference to the first element. More... | |
| const_reference | back () const |
| Return a const_reference to the last element. More... | |
| reference | operator[] (int i) |
| Return a reference to the element with the given index. More... | |
| const_reference | operator[] (int i) const |
| Return a const_reference to the element with the given index. More... | |
| template<int Start, int Stop> | |
| Vector< T, Stop-Start > | getRange () const |
| Create a new Vector that is a subset of this. More... | |
| template<int M> | |
| Vector< T, M > | first () const |
| Create a new Vector from the first M elements of this. More... | |
| template<int M> | |
| Vector< T, M > | last () const |
| Create a new Vector from the last M elements of this. More... | |
| Vector () | |
| Default constructor. More... | |
| template<typename U > | |
| Vector (U scalar) | |
| Construct with copies of a scalar. More... | |
| template<typename U > | |
| Vector (Vector< U, N > const &other) | |
| Converting copy constructor. More... | |
| bool | operator== (Vector const &other) const |
| Return true if elements of other are equal to the elements of this. More... | |
| bool | operator!= (Vector const &other) const |
| Return false if any elements of other are not equal to the elements of this. More... | |
| T | sum () const |
| Return the sum of all elements. More... | |
| T | product () const |
| Return the product of all elements. More... | |
| Vector | reverse () const |
| Return a Vector with the elements reversed. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator= (Vector< U, N > const &other) |
| Augmented = assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator= (U scalar) |
| Augmented = assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator+= (Vector< U, N > const &other) |
| Augmented += assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator+= (U scalar) |
| Augmented += assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator-= (Vector< U, N > const &other) |
| Augmented -= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator-= (U scalar) |
| Augmented -= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator*= (Vector< U, N > const &other) |
| Augmented *= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator*= (U scalar) |
| Augmented *= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator/= (Vector< U, N > const &other) |
| Augmented /= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator/= (U scalar) |
| Augmented /= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator%= (Vector< U, N > const &other) |
| Augmented %= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator%= (U scalar) |
| Augmented %= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator&= (Vector< U, N > const &other) |
| Augmented &= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator&= (U scalar) |
| Augmented &= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator^= (Vector< U, N > const &other) |
| Augmented ^= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator^= (U scalar) |
| Augmented ^= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator|= (Vector< U, N > const &other) |
| Augmented |= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator|= (U scalar) |
| Augmented |= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator<<= (Vector< U, N > const &other) |
| Augmented <<= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator<<= (U scalar) |
| Augmented <<= assignment from a scalar. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator>>= (Vector< U, N > const &other) |
| Augmented >>= assignment from another vector. More... | |
| template<typename U > | |
| boost::enable_if < boost::is_convertible< U, T > , Vector & >::type | operator>>= (U scalar) |
| Augmented >>= assignment from a scalar. More... | |
Public Attributes | |
| T | elems [N] |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Vector< T, N > const &obj) |
| Stream output. More... | |
A fixed-size 1D array class.
Vector (with T==int) is primarily used as the data type for the shape and strides attributes of Array.
Vector is implemented almost exactly as a non-aggregate boost::array, but with the addition of mathematical operators and a few other utility functions.
| typedef ConstIterator ndarray::Vector< T, N >::const_iterator |
| typedef ConstReference ndarray::Vector< T, N >::const_reference |
| typedef boost::reverse_iterator<const T*> ndarray::Vector< T, N >::const_reverse_iterator |
| typedef T const* ndarray::Vector< T, N >::ConstIterator |
| typedef T const& ndarray::Vector< T, N >::ConstReference |
| typedef int ndarray::Vector< T, N >::difference_type |
| typedef T ndarray::Vector< T, N >::Element |
| typedef T* ndarray::Vector< T, N >::Iterator |
| typedef Iterator ndarray::Vector< T, N >::iterator |
| typedef boost::mpl::int_<N> ndarray::Vector< T, N >::ND |
| typedef T* ndarray::Vector< T, N >::pointer |
| typedef T& ndarray::Vector< T, N >::Reference |
| typedef Reference ndarray::Vector< T, N >::reference |
| typedef boost::reverse_iterator<T*> ndarray::Vector< T, N >::reverse_iterator |
| typedef int ndarray::Vector< T, N >::size_type |
| typedef T ndarray::Vector< T, N >::Value |
| typedef Value ndarray::Vector< T, N >::value_type |
|
inline |
Default constructor.
Initializes the elements to zero.
Definition at line 184 of file Vector.h.
|
inlineexplicit |
Construct with copies of a scalar.
Definition at line 188 of file Vector.h.
|
inlineexplicit |
Converting copy constructor.
Definition at line 194 of file Vector.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Create a new Vector from the first M elements of this.
Definition at line 159 of file Vector.h.
|
inline |
|
inline |
|
inline |
Create a new Vector that is a subset of this.
Definition at line 152 of file Vector.h.
|
inline |
Create a new Vector from the last M elements of this.
Definition at line 166 of file Vector.h.
|
inline |
|
inline |
|
inline |
Augmented %= assignment from another vector.
Definition at line 313 of file Vector.h.
|
inline |
Augmented %= assignment from a scalar.
Definition at line 321 of file Vector.h.
|
inline |
Augmented &= assignment from another vector.
Definition at line 329 of file Vector.h.
|
inline |
Augmented &= assignment from a scalar.
Definition at line 337 of file Vector.h.
|
inline |
Augmented *= assignment from another vector.
Definition at line 281 of file Vector.h.
|
inline |
Augmented *= assignment from a scalar.
Definition at line 289 of file Vector.h.
|
inline |
Augmented += assignment from another vector.
Definition at line 249 of file Vector.h.
|
inline |
Augmented += assignment from a scalar.
Definition at line 257 of file Vector.h.
|
inline |
Augmented -= assignment from another vector.
Definition at line 265 of file Vector.h.
|
inline |
Augmented -= assignment from a scalar.
Definition at line 273 of file Vector.h.
|
inline |
Augmented /= assignment from another vector.
Definition at line 297 of file Vector.h.
|
inline |
Augmented /= assignment from a scalar.
Definition at line 305 of file Vector.h.
|
inline |
Augmented <<= assignment from another vector.
Definition at line 377 of file Vector.h.
|
inline |
Augmented <<= assignment from a scalar.
Definition at line 385 of file Vector.h.
|
inline |
Augmented = assignment from another vector.
Definition at line 233 of file Vector.h.
|
inline |
Augmented = assignment from a scalar.
Definition at line 241 of file Vector.h.
|
inline |
Return true if elements of other are equal to the elements of this.
Definition at line 199 of file Vector.h.
|
inline |
Augmented >>= assignment from another vector.
Definition at line 393 of file Vector.h.
|
inline |
Augmented >>= assignment from a scalar.
Definition at line 401 of file Vector.h.
|
inline |
|
inline |
|
inline |
Augmented ^= assignment from another vector.
Definition at line 345 of file Vector.h.
|
inline |
Augmented ^= assignment from a scalar.
Definition at line 353 of file Vector.h.
|
inline |
Augmented |= assignment from another vector.
Definition at line 361 of file Vector.h.
|
inline |
Augmented |= assignment from a scalar.
Definition at line 369 of file Vector.h.
|
inline |
Return the product of all elements.
Definition at line 216 of file Vector.h.
|
inline |
Return a reverse_iterator to the beginning of the reversed Vector.
Definition at line 128 of file Vector.h.
|
inline |
Return a const_reverse_iterator to the beginning of the reversed Vector.
Definition at line 130 of file Vector.h.
|
inline |
Return a reverse_iterator to the end of the reversed Vector.
Definition at line 132 of file Vector.h.
|
inline |
Return a const_reverse_iterator to the end of the reversed Vector.
Definition at line 134 of file Vector.h.
|
inline |
Return a Vector with the elements reversed.
Definition at line 223 of file Vector.h.
|
inline |
|
inline |
Return the sum of all elements.
Definition at line 209 of file Vector.h.
|
friend |
Stream output.
Definition at line 173 of file Vector.h.
| T ndarray::Vector< T, N >::elems[N] |
1.8.5