Two dimensional Vector. More...
#include <PseudoJet.hh>
Public Member Functions | |
Constructor | |
| constexpr | Vector2 () |
| Default constructor. More... | |
| constexpr | Vector2 (Value_ x, Value_ y) |
| Constructor from two scalars. More... | |
| Vector2 (Value_ value, Dim2 dim) | |
| Constructor one scalar and its direction. More... | |
| template<typename Value_2 > | |
| constexpr | Vector2 (Vector2< Value_2 > const &vector) |
| Constructor from a two-vector. More... | |
| constexpr | Vector2 (TVector2 const &vector) |
| Constructor accepting a root::TVector2. More... | |
Setter | |
| void | SetUniform (Value_ value) |
| Set both both entries according to the value. More... | |
| void | SetMagPhi (Value_ magnitude, Angle const &phi) |
| Setter for the magnitude and angle. More... | |
| void | SetMag (Value_ mag) |
| Set the magnitude keeping \(\phi\) constant. More... | |
| void | SetPhi (boca::Angle const &phi) |
| Set azimuth \(\phi\) keeping the magnitue constant. More... | |
Accessors and Getters | |
| constexpr Value_ const & | X () const |
| Getter for X. More... | |
| constexpr Value_ const & | Y () const |
| Getter for Y. More... | |
| Value_ & | X () |
| Accessor for X. More... | |
| Value_ & | Y () |
| Accessor for Y. More... | |
Magnitudes | |
| constexpr auto | Mag2 () const |
| Square of the magnitude \(x^2 + y^2\). More... | |
| constexpr Value_ | Mag () const |
| Magnitude \(\sqrt{x^2 + y^2}\). More... | |
Angles | |
| Angle | Phi () const |
| The azimuth \(\phi\) defined in \([-\pi, \pi]\). More... | |
| template<typename Value_2 > | |
| Angle | DeltaPhiTo (Vector2< Value_2 > const &vector) const |
| Difference of azimuth \(\Delta\phi\) defined in \([-\pi, \pi]\). More... | |
Vectors | |
| constexpr auto | Unit () const |
| Unit vector in the direction of this vector. More... | |
| template<typename Value_2 > | |
| constexpr auto | Project (Vector2< Value_2 > const &vector) const |
| Projection onto the direction of vector. More... | |
| template<typename Value_2 > | |
| constexpr Vector2 | Norm (Vector2< Value_2 > const &vector) const |
| Component normal to the vector. More... | |
| Vector2 & | Rotate (Angle const &phi) |
| Rotate this vector by \(\phi\). More... | |
| Vector2 | Rotate (Angle const &phi) const |
| Rotate this vector by \(\phi\). More... | |
Products | |
| template<typename Value_2 > | |
| constexpr ValueProduct< Value_2 > | Dot (Vector2< Value_2 > const &vector) const |
| Dot product between two vectors. More... | |
| template<typename Value_2 > | |
| Vector2< ValueProduct< Value_2 > > | Scale (Value_2 const &scalar) const |
| Scale this vector with a scalar. More... | |
| template<typename Value_2 > | |
| constexpr ValueProduct< Value_2 > | SignedArea (Vector2< Value_2 > const &vector) const |
| Signed area. More... | |
Operators | |
| template<typename Value_2 > | |
| Vector2 & | operator= (Vector2< Value_2 > const &vector) |
| Assignment operator including casting. More... | |
| template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>> | |
| Vector2 & | operator+= (Vector2< Value_2 > const &vector) |
| Sum of two vectors. More... | |
| template<typename Value_2 , typename = OnlyIfNotOrSameQuantity<Value_2>> | |
| Vector2 & | operator-= (Vector2< Value_2 > const &vector) |
| Difference of two vectors. More... | |
| template<typename Value_2 , typename = OnlyIfNotQuantity<Value_2>> | |
| Vector2 & | operator*= (Value_2 scalar) |
| Product with scalar. More... | |
| template<typename Value_2 , typename = OnlyIfNotQuantity<Value_2>> | |
| Vector2 & | operator/= (Value_2 scalar) |
| Division by scalar. More... | |
| constexpr Vector2 | operator- () const |
| Unary minus. More... | |
| constexpr bool | operator< (Vector2 const &vector) const |
| Less than comparison. More... | |
| constexpr bool | operator== (Vector2 const &vector) const |
| Equal comparison. More... | |
| Value_ const & | operator[] (Dim2 dim_2) const |
| Components by index. More... | |
| Value_ & | operator[] (Dim2 dim_2) |
| Components by index. More... | |
| template<typename Value_2 > | |
| constexpr friend ValueProduct< Value_2 > | operator^ (Vector2 const &vector_1, Vector2< Value_2 > const &vector_2) |
| Coefficient of wedge product. More... | |
| template<typename Value_2 > | |
| constexpr friend auto | operator/ (Vector2 const &vector, Value_2 const &scalar) |
| Division by scalar. More... | |
| auto & | operator<< (std::ostream &stream, Vector2< Value_ > const &vector) |
| Output stream operator. More... | |
Iterators | |
| using | Dimension = Dim2 |
| Const begin. More... | |
| constexpr ConstIterator< boca::Vector2, Value_ > | begin () const |
| Const begin. More... | |
| constexpr ConstIterator< boca::Vector2, Value_ > | end () const |
| Const end. More... | |
| Iterator< boca::Vector2, Value_ > | begin () |
| Begin. More... | |
| Iterator< boca::Vector2, Value_ > | end () |
| End. More... | |
Detailed Description
template<typename Value_>
class boca::Vector2< Value_ >
Two dimensional Vector.
Member Typedef Documentation
| using boca::Vector2< Value_ >::Dimension = Dim2 |
Const begin.
Constructor & Destructor Documentation
|
inline |
Default constructor.
|
inline |
Constructor from two scalars.
|
inline |
Constructor one scalar and its direction.
|
inline |
Constructor from a two-vector.
|
inline |
Constructor accepting a root::TVector2.
Member Function Documentation
|
inline |
Const begin.
|
inline |
Begin.
|
inline |
Difference of azimuth \(\Delta\phi\) defined in \([-\pi, \pi]\).
|
inline |
Dot product between two vectors.
|
inline |
Const end.
|
inline |
End.
|
inline |
Magnitude \(\sqrt{x^2 + y^2}\).
|
inline |
Square of the magnitude \(x^2 + y^2\).
|
inline |
Component normal to the vector.
|
inline |
Product with scalar.
|
inline |
Sum of two vectors.
|
inline |
Unary minus.
|
inline |
Difference of two vectors.
|
inline |
Division by scalar.
|
inline |
Less than comparison.
|
inline |
Assignment operator including casting.
|
inline |
Equal comparison.
|
inline |
Components by index.
|
inline |
Components by index.
|
inline |
The azimuth \(\phi\) defined in \([-\pi, \pi]\).
|
inline |
Projection onto the direction of vector.
|
inline |
Rotate this vector by \(\phi\).
|
inline |
Rotate this vector by \(\phi\).
|
inline |
Scale this vector with a scalar.
|
inline |
Set the magnitude keeping \(\phi\) constant.
|
inline |
Setter for the magnitude and angle.
|
inline |
Set azimuth \(\phi\) keeping the magnitue constant.
|
inline |
Set both both entries according to the value.
|
inline |
Signed area.
|
inline |
Unit vector in the direction of this vector.
|
inline |
Getter for X.
|
inline |
Accessor for X.
|
inline |
Getter for Y.
|
inline |
Accessor for Y.
Friends And Related Function Documentation
|
friend |
Division by scalar.
|
friend |
Output stream operator.
|
friend |
Coefficient of wedge product.
The documentation for this class was generated from the following files:
- boca/fastjet/PseudoJet.hh
- boca/math/Vector2.hh
