Class documentation of Concepts

Loading...
Searching...
No Matches
concepts::UnitNd< dim > Class Template Reference

#include <vectorsMatrices.hh>

Inheritance diagram for concepts::UnitNd< dim >:
concepts::Point< Real, dim >

Public Member Functions

 UnitNd ()
 Constructor. Initializes all elements to 0.
 
 UnitNd (const Point< Real, dim > &u)
 Constructor for a point.
 
 UnitNd (Real x, Real y, Real z)
 Constructor for at most 3D.
 
Real length () const
 Length of the initially given vector.
 
const Realoperator[] (const uint i) const
 Index operator.
 
Realoperator[] (const uint i)
 Index operator.
 
 operator Real * ()
 Returns a pointer to the data.
 
 operator const Real * () const
 Returns a pointer to the data.
 
Point< Real, dim > & operator+= (const Point< Real, dim > &p)
 Addition operator.
 
Point< Real, dim > operator+ (const Point< Real, dim > &p) const
 Addition operator.
 
Point< Real, dim > & operator-= (const Point< Real, dim > &p)
 Subtraction operator.
 
Point< Real, dim > operator- (const Point< Real, dim > &p) const
 Subtraction operator.
 
Real operator* (const Point< Real, dim > &b) const
 Inner product.
 
Real operator* (const UnitNd< dim > &b) const
 
Point< Cmplx, dim > operator* (const Cmplx n) const
 Scaling operator with a complex number.
 
Point< Real, dim > operator* (const Real n) const
 Scaling operator with a real number.
 
Real dot (const Point< Real, dim > &b) const
 Inner product, i.e. for complex arguments: this * conjugate(b)
 
Point< Real, dim > & operator*= (const G n)
 Scaling operator.
 
Point< Real, dim > & operator/= (const G n)
 Unscaling operator.
 
Point< Cmplx, dim > operator/ (const Cmplx n) const
 Unscaling operator with a complex number.
 
Point< Real, dim > operator/ (const Real n) const
 Unscaling operator with a real number.
 
Point< Real, dim > & scale (const Point< Real, dim > &n)
 Scaling.
 
Point< Real, 3 > operator^ (const Point< Real, 3 > &b) const
 Outer product (for 3D)
 
Real operator^ (const Point< Real, 2 > &b) const
 Outer product (for 2D)
 
Real l2 () const
 Returns the Euclidian norm of the vector.
 
Real l2_2 () const
 Returns the square of the Euclidian norm of the vector.
 
Real linfty () const
 Returns the Maximum norm of the vector.
 
void lincomb (const Point< Real, dim > &a, const Point< Real, dim > &b, const Real ca=1.0, const Real cb=1.0)
 Assign the vector the linear combination of a and b.
 
void max (const Point< Real, dim > &a, const Point< Real, dim > &b)
 Sets the vector to the elementwise maximum of a and b.
 
void min (const Point< Real, dim > &a, const Point< Real, dim > &b)
 Sets the vector to the elementwise minimum of a and b.
 
Point< Real, dim > & ortho (const Point< Real, dim > &a)
 
Point< Real, dim > & ortho ()
 Rotates the vector by 90 degrees (clockwise) (only 2D)
 
Point< Real, dim > ortho () const
 Returns a by 90 degrees (clockwise) rotated vector (only 2D)
 
std::ostream & info (std::ostream &os) const
 

Detailed Description

template<uint dim>
class concepts::UnitNd< dim >

A vector of dimension dim and length 1.

Author
Gregor Schmidlin, 2002

Definition at line 276 of file vectorsMatrices.hh.

Constructor & Destructor Documentation

◆ UnitNd() [1/3]

template<uint dim>
concepts::UnitNd< dim >::UnitNd ( )
inline

Constructor. Initializes all elements to 0.

Definition at line 281 of file vectorsMatrices.hh.

◆ UnitNd() [2/3]

template<uint dim>
concepts::UnitNd< dim >::UnitNd ( const Point< Real, dim > &  u)
inline

Constructor for a point.

Definition at line 292 of file vectorsMatrices.hh.

◆ UnitNd() [3/3]

template<uint dim>
concepts::UnitNd< dim >::UnitNd ( Real  x,
Real  y,
Real  z 
)
inline

Constructor for at most 3D.

Definition at line 298 of file vectorsMatrices.hh.

Member Function Documentation

◆ l2()

Real concepts::Point< Real , dim >::l2 ( ) const
inlineinherited

Returns the Euclidian norm of the vector.

Definition at line 182 of file vectorsMatrices.hh.

◆ length()

template<uint dim>
Real concepts::UnitNd< dim >::length ( ) const
inline

Length of the initially given vector.

Definition at line 288 of file vectorsMatrices.hh.

◆ operator const Real *()

concepts::Point< Real , dim >::operator const Real * ( ) const
inlineinherited

Returns a pointer to the data.

Definition at line 101 of file vectorsMatrices.hh.

◆ operator Real *()

concepts::Point< Real , dim >::operator Real * ( )
inlineinherited

Returns a pointer to the data.

Definition at line 99 of file vectorsMatrices.hh.

◆ operator*() [1/2]

Point< Cmplx, dim > concepts::Point< Real , dim >::operator* ( const Cmplx  n) const
inlineinherited

Scaling operator with a complex number.

Definition at line 148 of file vectorsMatrices.hh.

◆ operator*() [2/2]

Point< Real , dim > concepts::Point< Real , dim >::operator* ( const Real  n) const
inlineinherited

Scaling operator with a real number.

Definition at line 153 of file vectorsMatrices.hh.

◆ operator*=()

Point< Real , dim > & concepts::Point< Real , dim >::operator*= ( const G  n)
inlineinherited

Scaling operator.

Definition at line 134 of file vectorsMatrices.hh.

◆ operator+()

Point< Real , dim > concepts::Point< Real , dim >::operator+ ( const Point< Real , dim > &  p) const
inlineinherited

Addition operator.

Definition at line 110 of file vectorsMatrices.hh.

◆ operator+=()

Point< Real , dim > & concepts::Point< Real , dim >::operator+= ( const Point< Real , dim > &  p)
inlineinherited

Addition operator.

Definition at line 104 of file vectorsMatrices.hh.

◆ operator-()

Point< Real , dim > concepts::Point< Real , dim >::operator- ( const Point< Real , dim > &  p) const
inlineinherited

Subtraction operator.

Definition at line 121 of file vectorsMatrices.hh.

◆ operator-=()

Point< Real , dim > & concepts::Point< Real , dim >::operator-= ( const Point< Real , dim > &  p)
inlineinherited

Subtraction operator.

Definition at line 115 of file vectorsMatrices.hh.

◆ operator/() [1/2]

Point< Cmplx, dim > concepts::Point< Real , dim >::operator/ ( const Cmplx  n) const
inlineinherited

Unscaling operator with a complex number.

Definition at line 159 of file vectorsMatrices.hh.

◆ operator/() [2/2]

Point< Real , dim > concepts::Point< Real , dim >::operator/ ( const Real  n) const
inlineinherited

Unscaling operator with a real number.

Definition at line 164 of file vectorsMatrices.hh.

◆ operator/=()

Point< Real , dim > & concepts::Point< Real , dim >::operator/= ( const G  n)
inlineinherited

Unscaling operator.

Definition at line 142 of file vectorsMatrices.hh.

◆ operator[]() [1/2]

Real & concepts::Point< Real , dim >::operator[] ( const uint  i)
inlineinherited

Index operator.

Definition at line 94 of file vectorsMatrices.hh.

◆ operator[]() [2/2]

const Real & concepts::Point< Real , dim >::operator[] ( const uint  i) const
inlineinherited

Index operator.

Definition at line 90 of file vectorsMatrices.hh.

◆ ortho()

Point< Real , dim > & concepts::Point< Real , dim >::ortho ( const Point< Real , dim > &  a)
inherited

Change vector to the by 90 degrees (clockwise) rotated vector a (only 2D)

◆ scale()

Point< Real , dim > & concepts::Point< Real , dim >::scale ( const Point< Real , dim > &  n)
inlineinherited

Scaling.

Definition at line 170 of file vectorsMatrices.hh.


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