Go to the documentation of this file.
7 #ifndef INCLUDE_JET_POINT_H_
8 #define INCLUDE_JET_POINT_H_
12 #include <type_traits>
22 template <
typename T,
size_t N>
26 N > 0,
"Size of static-sized point should be greater than zero.");
28 std::is_arithmetic<T>::value,
29 "Point only can be instantiated with arithmetic types");
35 template <
typename... Params>
36 explicit Point(Params... params);
40 explicit Point(
const std::initializer_list<U>& lst);
47 void set(
const std::initializer_list<U>& lst);
66 std::array<T, N> _elements;
68 template <
typename... Params>
69 void setAt(
size_t i, T v, Params... params);
71 void setAt(
size_t i, T v);
76 #include "detail/point-inl.h"
78 #endif // INCLUDE_JET_POINT_H_
void set(const Point &other)
Set point instance with other point.
Point & operator=(const Point &other)
Set point instance with other point.
Point(const Point &other)
Copy constructor.
Definition: advection_solver2.h:18
const T & operator[](size_t i) const
Returns the const reference to the i -th element.
Point()
Constructs a point with zeros.
Point(Params... params)
Constructs point instance with parameters.
void set(const std::initializer_list< U > &lst)
Set point instance with initializer list.
Generic N-D point class.
Definition: point.h:23
Point & operator=(const std::initializer_list< U > &lst)
Set point instance with initializer list.
T & operator[](size_t)
Returns the reference to the i -th element.
Point(const std::initializer_list< U > &lst)
Constructs point instance with initiazer list.