VM2D 1.14
Vortex methods for 2D flows simulation
Loading...
Searching...
No Matches
fmm::Vector3< T > Class Template Reference

#include <utils.h>

Inheritance diagram for fmm::Vector3< T >:
Collaboration diagram for fmm::Vector3< T >:

Public Member Functions

constexpr Vector3 ()=default
 
constexpr Vector3 (const Vector3< T > &other)=default
 
constexpr Vector3 (Vector3< T > &&other)=default
 
constexpr Vector3< T > & operator= (const Vector3< T > &other)=default
 
constexpr Vector3< T > & operator= (Vector3< T > &&other)=default
 
constexpr Vector3 (T x, T y, T z)
 
constexpr Vector3< T > operator+ (const Vector3< T > &rhs) const
 
constexpr Vector3< T > operator- (const Vector3< T > &rhs) const
 
constexpr Vector3< T > operator* (const double &x) const
 
constexpr Vector3< T > operator/ (const double &x) const
 
constexpr void operator+= (const Vector3< T > &rhs)
 
constexpr void operator-= (const Vector3< T > &rhs)
 
constexpr void operator*= (const double &x)
 
constexpr void operator/= (const double &x)
 
constexpr bool operator== (const Vector3< T > &rhs) const
 
constexpr bool operator!= (const Vector3< T > &rhs) const
 

Public Attributes

elements
 STL member.
 

Detailed Description

template<typename T>
class fmm::Vector3< T >

Definition at line 38 of file utils.h.

Constructor & Destructor Documentation

◆ Vector3() [1/4]

template<typename T >
constexpr fmm::Vector3< T >::Vector3 ( )
constexprdefault

◆ Vector3() [2/4]

template<typename T >
constexpr fmm::Vector3< T >::Vector3 ( const Vector3< T > &  other)
constexprdefault

◆ Vector3() [3/4]

template<typename T >
constexpr fmm::Vector3< T >::Vector3 ( Vector3< T > &&  other)
constexprdefault

◆ Vector3() [4/4]

template<typename T >
constexpr fmm::Vector3< T >::Vector3 ( x,
y,
z 
)
inlineconstexpr

Definition at line 47 of file utils.h.

47: std::array<T, 3> {x, y, z} {};

Member Function Documentation

◆ operator!=()

template<typename T >
constexpr bool fmm::Vector3< T >::operator!= ( const Vector3< T > &  rhs) const
inlineconstexpr

Definition at line 60 of file utils.h.

60{ return !(*this == rhs); }

◆ operator*()

template<typename T >
constexpr Vector3< T > fmm::Vector3< T >::operator* ( const double &  x) const
inlineconstexpr

Definition at line 51 of file utils.h.

51{return Vector3<T>(std::array<T, 3>::operator[](0)*x, std::array<T, 3>::operator[](1)*x, std::array<T, 3>::operator[](2)*x);}

◆ operator*=()

template<typename T >
constexpr void fmm::Vector3< T >::operator*= ( const double &  x)
inlineconstexpr

Definition at line 56 of file utils.h.

56{ std::array<T, 3>::operator[](0)*=x; std::array<T, 3>::operator[](1)*=x; std::array<T, 3>::operator[](2)*=x;}

◆ operator+()

template<typename T >
constexpr Vector3< T > fmm::Vector3< T >::operator+ ( const Vector3< T > &  rhs) const
inlineconstexpr

Definition at line 49 of file utils.h.

49{return Vector3<T>(std::array<T, 3>::operator[](0)+rhs[0], std::array<T, 3>::operator[](1)+rhs[1], std::array<T, 3>::operator[](2)+rhs[2]);}

◆ operator+=()

template<typename T >
constexpr void fmm::Vector3< T >::operator+= ( const Vector3< T > &  rhs)
inlineconstexpr

Definition at line 54 of file utils.h.

54{ std::array<T, 3>::operator[](0)+=rhs[0]; std::array<T, 3>::operator[](1)+=rhs[1]; std::array<T, 3>::operator[](2)+=rhs[2];}

◆ operator-()

template<typename T >
constexpr Vector3< T > fmm::Vector3< T >::operator- ( const Vector3< T > &  rhs) const
inlineconstexpr

Definition at line 50 of file utils.h.

50{return Vector3<T>(std::array<T, 3>::operator[](0)-rhs[0], std::array<T, 3>::operator[](1)-rhs[1], std::array<T, 3>::operator[](2)-rhs[2]);}

◆ operator-=()

template<typename T >
constexpr void fmm::Vector3< T >::operator-= ( const Vector3< T > &  rhs)
inlineconstexpr

Definition at line 55 of file utils.h.

55{ std::array<T, 3>::operator[](0)-=rhs[0]; std::array<T, 3>::operator[](1)-=rhs[1]; std::array<T, 3>::operator[](2)-=rhs[2];}

◆ operator/()

template<typename T >
constexpr Vector3< T > fmm::Vector3< T >::operator/ ( const double &  x) const
inlineconstexpr

Definition at line 52 of file utils.h.

52{return Vector3<T>(std::array<T, 3>::operator[](0)/x, std::array<T, 3>::operator[](1)/x, std::array<T, 3>::operator[](2)/x);}

◆ operator/=()

template<typename T >
constexpr void fmm::Vector3< T >::operator/= ( const double &  x)
inlineconstexpr

Definition at line 57 of file utils.h.

57{ std::array<T, 3>::operator[](0)/=x; std::array<T, 3>::operator[](1)/=x; std::array<T, 3>::operator[](2)/=x;}

◆ operator=() [1/2]

template<typename T >
constexpr Vector3< T > & fmm::Vector3< T >::operator= ( const Vector3< T > &  other)
constexprdefault

◆ operator=() [2/2]

template<typename T >
constexpr Vector3< T > & fmm::Vector3< T >::operator= ( Vector3< T > &&  other)
constexprdefault

◆ operator==()

template<typename T >
constexpr bool fmm::Vector3< T >::operator== ( const Vector3< T > &  rhs) const
inlineconstexpr

Definition at line 59 of file utils.h.

59{ return std::array<T, 3>::operator[](0) == rhs[0] && std::array<T, 3>::operator[](1) == rhs[1] && std::array<T, 3>::operator[](2) == rhs[2]; }

Member Data Documentation

◆ elements

T std::array< T >::elements
inherited

STL member.


The documentation for this class was generated from the following file: