dakku::Point
point More...
#include <vector.h>
Inherits from dakku::VectorBase< T, S, Point< T, S > >
Public Functions
Name | |
---|---|
Point | operator-() const negation of the point |
template <ArithmeticType V> Point |
operator-(V rhs) const subtraction |
Vector< T, S > | operator-(const Point & rhs) const subtraction |
Point | operator-(const Vector< T, S > & rhs) const subtraction |
Friends
Name | |
---|---|
Point | operator+(const Point & a, const Vector< T, S > & b) point + vector => point |
Additional inherited members
Public Functions inherited from dakku::VectorBase< T, S, Point< T, S > >
Name | |
---|---|
VectorBase() Construct a new Vector Base object all components initialized to zero. |
|
template <ArithmeticType Arg> |
VectorBase(Arg value) Construct a new Vector Base object all components initalized to value |
VectorBase(const sol::table & table) Construct a new Vector Base object all components initalized to table. |
|
template <ArithmeticType Other,typename OtherDerived > |
VectorBase(const VectorBase< Other, S, OtherDerived > & other) Construct a new Vector Base object with given values. |
VectorBase(const VectorBase & other) | |
VectorBase(VectorBase && other) | |
VectorBase & | operator=(const VectorBase & other) |
VectorBase & | operator=(VectorBase && other) |
const D & | derived() const convert to derived type |
D & | derived() convert to derived type |
template <ArithmeticType Arg> void |
set(Arg value) set all components to value |
template <ArithmeticType Arg> void |
set_by_index(size_t index, Arg value) set data[index] to value |
template <ArithmeticType... Args,size_t... Is> void |
set(std::index_sequence< Is... > , Args &&... args) set data to args |
template <ArithmeticType... Args> void |
set(Args &&... args) set data to args |
template <ArithmeticType Other,typename OtherDerived > void |
set(const VectorBase< Other, S, OtherDerived > & rhs) set data by rhs 's data |
const T & | get(size_t i) const get i'th component |
size_t | size() const size of the vector |
std::string | to_string() const convert vector to string |
bool | has_nans() const check whether there are nan components |
D | clone() const get a copy |
const T & | operator[](size_t i) const get i'th value |
T & | operator[](size_t i) get i'th value |
D & | operator+=(const D & rhs) addition |
template <ArithmeticType V> D & |
operator+=(V rhs) addition |
D & | operator-=(const D & rhs) subtraction |
template <ArithmeticType V> D & |
operator-=(V rhs) subtraction |
D & | operator*=(const D & rhs) multiplication |
template <ArithmeticType V> D & |
operator*=(V rhs) multiplication |
D | operator*(const D & rhs) const multiplication |
template <ArithmeticType V> D |
operator*(V rhs) const multiplication |
D & | operator/=(const D & rhs) division |
template <ArithmeticType V> D & |
operator/=(V rhs) division |
D | operator/(const D & rhs) const division |
template <ArithmeticType U> D |
operator/(U rhs) const division |
bool | operator==(const VectorBase & rhs) const |
bool | operator!=(const VectorBase & rhs) const |
decltype(auto) | x() const get the first element |
decltype(auto) | x() get the first element |
decltype(auto) | y() const get the second element |
decltype(auto) | y() get the second element |
decltype(auto) | z() const get the third element |
decltype(auto) | z() get the fourth element |
decltype(auto) | w() const get the fourth element |
decltype(auto) | w() get the third element |
size_t | max_element_index() const get the index of the max element |
decltype(auto) | max_element() const get the max element in the vector |
D | max(const D & rhs) const element wise max |
D | min(const D & rhs) const element wise min |
template <typename OtherDerived > decltype(auto) |
dot(const VectorBase< T, S, OtherDerived > & rhs) const dot product between two vectors |
decltype(auto) | squared_norm() const squared norm |
decltype(auto) | norm() const norm |
decltype(auto) | length() const length |
decltype(auto) | distance(const D & rhs) const the distance |
D | abs() const abs |
D | cross(const D & rhs) const cross product |
bool | is_zero() const check whether all components are zero |
D | sqrt() const element-wise sqrt |
template <ArithmeticType E> D |
pow(E e) const element-wise power |
D | exp() const element-wise exp |
D | floor() const element-wise floor |
D | ceil() const element-wise ceil |
D | lerp(const D & b, T t) const element-wise linear interpolation |
operator std::span< T, S >() | |
operator std::span< const T, S >() const |
Friends inherited from dakku::VectorBase< T, S, Point< T, S > >
Name | |
---|---|
D | operator*(U a, const D & b) multiplication |
D | operator/(U a, const D & b) division |
std::ostream & | operator<<(std::ostream & os, const VectorBase & vec) output the vector |
D | max(const D & v1, const D & v2) element wise max |
D | min(const D & v1, const D & v2) element wise min |
decltype(auto) | distance(const D & a, const D & b) the distance |
D | abs(const D & v) abs |
D | sqrt(const D & v) element-wise sqrt |
D | pow(const D & v, E e) element-wise power |
D | exp(const D & v) element-wise exp |
D | floor(const D & v) element-wise floor |
D | ceil(const D & v) element-wise ceil |
D | lerp(const D & a, const D & b, T t) element-wise linear interpolation |
Detailed Description
point
Template Parameters:
- T type
- S size
Public Functions Documentation
function operator-
negation of the point
Return: \(-v\)
function operator-
subtraction
function operator-
subtraction
function operator-
subtraction
Friends
friend operator+
point + vector => point
Updated on 2022-04-30 at 15:46:11 +0000