|
__cuda_callable__ constexpr | StaticVector ()=default |
| Default constructor.
|
|
template<typename T1 , typename T2 , typename Operation > |
constexpr | StaticVector (const Expressions::StaticBinaryExpressionTemplate< T1, T2, Operation > &expr) |
| Constructor from binary vector expression. More...
|
|
template<typename T , typename Operation > |
constexpr | StaticVector (const Expressions::StaticUnaryExpressionTemplate< T, Operation > &expr) |
| Constructor from unary expression. More...
|
|
__cuda_callable__ constexpr | StaticVector (const StaticVector &)=default |
| Default copy constructor.
|
|
template<typename OtherReal > |
__cuda_callable__ constexpr | operator StaticVector< Size, OtherReal > () const |
| Cast operator for changing of the Value type. More...
|
|
template<typename VectorExpression > |
constexpr StaticVector & | operator%= (const VectorExpression &expression) |
| Elementwise modulo by a vector expression. More...
|
|
template<typename VectorExpression > |
constexpr StaticVector< Size, Real > & | operator%= (const VectorExpression &expression) |
|
template<typename VectorExpression > |
constexpr StaticVector & | operator*= (const VectorExpression &expression) |
| Elementwise multiplication by a vector expression. More...
|
|
template<typename VectorExpression > |
constexpr StaticVector< Size, Real > & | operator*= (const VectorExpression &expression) |
|
template<typename VectorExpression > |
constexpr StaticVector & | operator+= (const VectorExpression &expression) |
| Addition operator with a vector expression. More...
|
|
template<typename VectorExpression > |
constexpr StaticVector< Size, Real > & | operator+= (const VectorExpression &expression) |
|
template<typename VectorExpression > |
constexpr StaticVector & | operator-= (const VectorExpression &expression) |
| Subtraction operator with a vector expression. More...
|
|
template<typename VectorExpression > |
constexpr StaticVector< Size, Real > & | operator-= (const VectorExpression &expression) |
|
template<typename VectorExpression > |
constexpr StaticVector & | operator/= (const VectorExpression &expression) |
| Elementwise division by a vector expression. More...
|
|
template<typename VectorExpression > |
constexpr StaticVector< Size, Real > & | operator/= (const VectorExpression &expression) |
|
constexpr StaticVector & | operator= (const StaticVector &)=default |
| Default copy-assignment operator.
|
|
template<typename VectorExpression > |
constexpr StaticVector & | operator= (const VectorExpression &expression) |
| Assignment operator with a vector expression. More...
|
|
template<typename VectorExpression > |
constexpr StaticVector< Size, Real > & | operator= (const VectorExpression &expression) |
|
constexpr StaticVector & | operator= (StaticVector &&) noexcept=default |
| Default move-assignment operator.
|
|
__cuda_callable__ constexpr | StaticArray ()=default |
| Default constructor.
|
|
__cuda_callable__ constexpr | StaticArray (const StaticArray &v) |
| Copy constructor. More...
|
|
__cuda_callable__ constexpr | StaticArray (const std::initializer_list< Value > &elems) |
| Constructor which initializes the array by copying elements from std::initializer_list, e.g. {...} . More...
|
|
__cuda_callable__ constexpr | StaticArray (const Value &v) |
| Constructor that sets all array components to value v. More...
|
|
template<typename _unused = void> |
__cuda_callable__ constexpr | StaticArray (const Value v[Size]) |
| Constructor from static array. More...
|
|
template<typename _unused > |
constexpr | StaticArray (const Value v[Size]) |
|
constexpr | StaticArray (StaticArray &&) noexcept=default |
| Move constructor.
|
|
template<typename... Values, std::enable_if_t<(Size > 1) &&sizeof...(Values)==Size, bool > = true> |
__cuda_callable__ constexpr | StaticArray (Values &&... values) |
| Constructor which initializes the array element-by-element using the supplied values. More...
|
|
constexpr Value * | getData () |
| Gets pointer to data of this static array.
|
|
constexpr const Value * | getData () const |
| Gets constant pointer to data of this static array.
|
|
bool | load (File &file) |
| Loads data from the file to this static array. More...
|
|
template<typename OtherValue > |
__cuda_callable__ constexpr | operator StaticArray< Size, OtherValue > () const |
| Cast operator for changing of the Value type. More...
|
|
template<typename Array > |
constexpr bool | operator!= (const Array &array) const |
| This function checks whether this static array is not equal to another array. More...
|
|
constexpr Value & | operator() (int i) |
| Accesses specified element at the position i and returns a reference to its value. More...
|
|
constexpr const Value & | operator() (int i) const |
| Accesses specified element at the position i and returns a constant reference to its value. More...
|
|
constexpr StaticArray & | operator= (const StaticArray &v) |
| Copy-assignment operator.
|
|
template<typename T > |
constexpr StaticArray< Size, Value > & | operator= (const T &v) |
| Assigns an object v of type T. More...
|
|
constexpr StaticArray & | operator= (StaticArray &&) noexcept=default |
| Move-assignment operator.
|
|
template<typename Array > |
constexpr bool | operator== (const Array &array) const |
| This function checks whether this static array is equal to another array. More...
|
|
constexpr Value & | operator[] (int i) |
| Accesses specified element at the position i and returns a reference to its value. More...
|
|
constexpr const Value & | operator[] (int i) const |
| Accesses specified element at the position i and returns a constant reference to its value. More...
|
|
bool | save (File &file) const |
| Saves this static array into the file. More...
|
|
constexpr void | setValue (const ValueType &val) |
| Sets all values of this static array to val.
|
|
constexpr void | sort () |
| Sorts the elements in this static array in ascending order.
|
|
std::ostream & | write (std::ostream &str, const char *separator=" ") const |
| Writes the array values into stream str with specified separator. More...
|
|
constexpr Value & | x () |
| Returns reference to the first coordinate.
|
|
constexpr const Value & | x () const |
| Returns constant reference to the first coordinate.
|
|
constexpr Value & | y () |
| Returns reference to the second coordinate for arrays with Size >= 2.
|
|
constexpr const Value & | y () const |
| Returns constant reference to the second coordinate for arrays with Size >= 2.
|
|
constexpr Value & | z () |
| Returns reference to the third coordinate for arrays with Size >= 3.
|
|
constexpr const Value & | z () const |
| Returns constant reference to the third coordinate for arrays with Size >= 3.
|
|
template<int Size, typename
Real = double>
class TNL::Containers::StaticVector< Size, Real >
Vector with constant size.
- Parameters
-
Size | Size of static vector. Number of its elements. |
Real | Type of the values in the static vector. |