|
T & | tran () |
|
constexpr const T & | tran () const |
|
T & | vert () |
|
constexpr const T & | vert () const |
|
T & | rad_r () |
|
constexpr const T & | rad_r () const |
|
T & | rad_z () |
|
constexpr const T & | rad_z () const |
|
T & | se_y () |
|
constexpr const T & | se_y () const |
|
T & | se_z () |
|
constexpr const T & | se_z () const |
|
T & | zup_y () |
|
constexpr const T & | z_up_y () const |
|
T & | zup_z () |
|
constexpr const T & | z_up_z () const |
|
T & | ee_x () |
|
constexpr const T & | ee_x () const |
|
T & | ee_y () |
|
constexpr const T & | ee_y () const |
|
T & | yup_x () |
|
constexpr const T & | y_up_x () const |
|
T & | yup_y () |
|
constexpr const T & | y_up_y () const |
|
| Vec () |
| Construct uninitialized vector.
|
|
template<typename OtherT > |
constexpr | Vec (const Vec< 2, OtherT > &p) |
| Copy constructor from all other 2D vectors.
|
|
constexpr | Vec (const T &c0__tran, const T &c1__up) |
| Construct vector with given components.
|
|
template<typename T0 , typename T1 > |
constexpr | Vec (const std::pair< T0, T1 > &comp) |
| Construct vector components given in std::pair.
|
|
iterator | begin () |
| Get begin iterator over components.
|
|
const_iterator | begin () const |
| Get begin const iterator over components.
|
|
iterator | end () |
| Get end iterator over components.
|
|
const_iterator | end () const |
| Get end const iterator over components.
|
|
template<typename OtherT > |
constexpr bool | operator== (const Vec< 2, OtherT > &p) const |
| Compare two vectors, this and p .
|
|
template<typename OtherT , typename SuprType > |
constexpr bool | equals (const Vec< 2, OtherT > &p, const SuprType &abs_supremum) const |
| Check if two vectors, this and p are almost equal.
|
|
template<typename OtherT > |
constexpr bool | equals (const Vec< 2, OtherT > &p) const |
| Check if two vectors, this and p are almost equal.
|
|
template<typename OtherT > |
constexpr bool | operator!= (const Vec< 2, OtherT > &p) const |
| Compare two vectors, this and p .
|
|
T & | operator[] (size_t i) |
| Get i-th component WARNING This function does not check if it is valid (for efficiency reasons)
|
|
const T & | operator[] (size_t i) const |
| Get i-th component WARNING This function does not check if it is valid (for efficiency reasons)
|
|
template<typename OtherT > |
constexpr auto | operator+ (const Vec< 2, OtherT > &other) const -> Vec< 2, decltype(c0+other.c0)> |
| Calculate sum of two vectors, this and other .
|
|
Vec< 2, T > & | operator+= (const Vec< 2, T > &other) |
| Increase coordinates of this vector by coordinates of other vector other .
|
|
template<typename OtherT > |
constexpr auto | operator- (const Vec< 2, OtherT > &other) const -> Vec< 2, decltype(c0 - other.c0)> |
| Calculate difference of two vectors, this and other .
|
|
Vec< 2, T > & | operator-= (const Vec< 2, T > &other) |
| Decrease coordinates of this vector by coordinates of other vector other .
|
|
template<typename OtherT > |
constexpr auto | operator* (const OtherT scale) const -> Vec< 2, decltype(c0 *scale)> |
| Calculate this vector multiplied by scalar scale .
|
|
Vec< 2, T > & | operator*= (const T scalar) |
| Multiple coordinates of this vector by scalar .
|
|
template<typename OtherT > |
constexpr auto | operator/ (const OtherT scale) const -> Vec< 2, decltype(c0/scale)> |
| Calculate this vector divided by scalar scale .
|
|
Vec< 2, T > & | operator/= (const T scalar) |
| Divide coordinates of this vector by scalar .
|
|
constexpr Vec< 2, T > | operator- () const |
| Calculate vector opposite to this.
|
|
Vec< 2, T > | sqr () const |
| Square each component of tensor.
|
|
Vec< 2, T > & | sqr_inplace () |
| Square each component of tensor in place.
|
|
Vec< 2, T > | sqrt () const |
| Square root of each component of tensor.
|
|
Vec< 2, T > & | sqrt_inplace () |
| Square root of each component of tensor in place.
|
|
template<typename OtherT > |
Vec< 2, T > | pow (OtherT a) const |
| Power of each component of tensor.
|
|
void | flip (size_t i) |
| Change i-th coordinate to oposite.
|
|
Vec< 2, T > | flipped (size_t i) |
| Get vector similar to this but with changed i-th component to oposite.
|
|
template<class OT > |
bool | operator< (Vec< 2, OT > const &v) const |
| A lexical comparison of two vectors, allow to use vector in std::set and std::map as key type.
|
|
template<
typename T>
struct plask::Vec< 2, T >
Vector in 2D space.
Definition at line 38 of file 2d.hpp.