Rosetta
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
numeric::sphericalVector< T > Class Template Reference

sphericalVector: Fast spherical-coordinate numeric vector More...

#include <sphericalVector.hh>

Public Types

typedef T Value
 
typedef TReference
 
typedef T const & ConstReference
 
typedef TPointer
 
typedef T const * ConstPointer
 
typedef T value_type
 
typedef Treference
 
typedef T const & const_reference
 
typedef Tpointer
 
typedef T const * const_pointer
 
typedef void iterator_category
 
typedef void difference_type
 

Public Member Functions

 sphericalVector ()
 Default constructor. More...
 
 sphericalVector (sphericalVector const &v)
 Copy constructor. More...
 
template<typename U >
 sphericalVector (sphericalVector< U > const &v)
 Copy constructor. More...
 
 sphericalVector (Value const &phi_a, Value const &theta_a, Value const &radius_a)
 Triple value constructor. More...
 
template<typename U >
 sphericalVector (U const *p)
 Pointer to contiguous values constructor. More...
 
 ~sphericalVector ()
 Destructor. More...
 
sphericalVectoroperator= (sphericalVector const &v)
 Copy assignment. More...
 
template<typename U >
sphericalVectoroperator= (sphericalVector< U > const &v)
 Copy assignment. More...
 
template<typename U >
sphericalVectoroperator= (U const *p)
 Assignment from pointer to contiguous values. More...
 
template<typename U >
sphericalVectoroperator+= (sphericalVector< U > const &v)
 += xyzVector More...
 
template<typename U >
sphericalVectoroperator-= (sphericalVector< U > const &v)
 -= xyzVector More...
 
template<typename U >
sphericalVectorscaled_assign (Value const &t, sphericalVector< U > const &v)
 Assign Value * xyzVector. More...
 
template<typename U >
sphericalVectorscaled_add (Value const &t, sphericalVector< U > const &v)
 Add Value * xyzVector. More...
 
template<typename U >
sphericalVectorscaled_sub (Value const &t, sphericalVector< U > const &v)
 Subtract Value * xyzVector. More...
 
sphericalVectoroperator= (Value const &t)
 = Value More...
 
sphericalVectoroperator+= (Value const &t)
 += Value More...
 
sphericalVectoroperator-= (Value const &t)
 -= Value More...
 
sphericalVectoroperator*= (Value const &t)
 *= Value More...
 
sphericalVectoroperator/= (Value const &t)
 /= Value More...
 
sphericalVectorassign (Value const &phi_a, Value const &theta_a, Value const &radius_a)
 Triple value assignment. More...
 
sphericalVectorclear ()
 Clear. More...
 
sphericalVectorzero ()
 Zero. More...
 
sphericalVectormin (sphericalVector const &v)
 Set minimum coordinates wrt another xyzVector. More...
 
sphericalVectormax (sphericalVector const &v)
 Set maximum coordinates wrt another xyzVector. More...
 
Value const & phi () const
 Value x const. More...
 
Valuephi ()
 Value x. More...
 
Value const & theta () const
 Value y const. More...
 
Valuetheta ()
 Value y. More...
 
Value const & radius () const
 Value z const. More...
 
Valueradius ()
 Value z. More...
 
void phi (Value const &phi_a)
 x assignment More...
 
void theta (Value const &theta_a)
 y assignment More...
 
void radius (Value const &radius_a)
 z assignment More...
 

Private Attributes

Value phi_
 Coordinates of the 3 coordinate vector. More...
 
Value theta_
 
Value radius_
 

Friends

sphericalVector operator+ (sphericalVector const &a, sphericalVector const &b)
 sphericalVector + sphericalVector More...
 
sphericalVector operator+ (sphericalVector const &v, Value const &t)
 sphericalVector + Value More...
 
sphericalVector operator+ (Value const &t, sphericalVector const &v)
 Value + sphericalVector. More...
 
sphericalVector operator- (sphericalVector const &a, sphericalVector const &b)
 sphericalVector - sphericalVector More...
 
sphericalVector operator- (sphericalVector const &v, Value const &t)
 sphericalVector - Value More...
 
sphericalVector operator- (Value const &t, sphericalVector const &v)
 Value - sphericalVector. More...
 
sphericalVector operator* (sphericalVector const &v, Value const &t)
 sphericalVector * Value More...
 
sphericalVector operator* (Value const &t, sphericalVector const &v)
 Value * xyzVector. More...
 
sphericalVector operator/ (sphericalVector const &v, Value const &t)
 xyzVector / Value More...
 
void add (sphericalVector const &a, sphericalVector const &b, sphericalVector &r)
 Add: xyzVector + xyzVector. More...
 
void add (sphericalVector const &v, Value const &t, sphericalVector &r)
 Add: xyzVector + Value. More...
 
void add (Value const &t, sphericalVector const &v, sphericalVector &r)
 Add: Value + xyzVector. More...
 
void subtract (sphericalVector const &a, sphericalVector const &b, sphericalVector &r)
 Subtract: xyzVector - xyzVector. More...
 
void subtract (sphericalVector const &v, Value const &t, sphericalVector &r)
 Subtract: xyzVector - Value. More...
 
void subtract (Value const &t, sphericalVector const &v, sphericalVector &r)
 Subtract: Value - sphericalVector. More...
 
void multiply (sphericalVector const &v, Value const &t, sphericalVector &r)
 Multiply: xyzVector * Value. More...
 
void multiply (Value const &t, sphericalVector const &v, sphericalVector &r)
 Multiply: Value * xyzVector. More...
 
void divide (sphericalVector const &v, Value const &t, sphericalVector &r)
 Divide: xyzVector / Value. More...
 
sphericalVector min (sphericalVector const &a, sphericalVector const &b)
 xyzVector with min coordinates of two xyzVectors More...
 
sphericalVector max (sphericalVector const &a, sphericalVector const &b)
 sphericalVector with max coordinates of two sphericalVector More...
 
bool operator== (sphericalVector const &a, sphericalVector const &b)
 sphericalVector == sphericalVector More...
 
bool operator!= (sphericalVector const &a, sphericalVector const &b)
 sphericalVector != sphericalVector More...
 

Detailed Description

template<typename T>
class numeric::sphericalVector< T >

sphericalVector: Fast spherical-coordinate numeric vector

Member Typedef Documentation

◆ const_pointer

template<typename T >
typedef T const* numeric::sphericalVector< T >::const_pointer

◆ const_reference

template<typename T >
typedef T const& numeric::sphericalVector< T >::const_reference

◆ ConstPointer

template<typename T >
typedef T const* numeric::sphericalVector< T >::ConstPointer

◆ ConstReference

template<typename T >
typedef T const& numeric::sphericalVector< T >::ConstReference

◆ difference_type

template<typename T >
typedef void numeric::sphericalVector< T >::difference_type

◆ iterator_category

template<typename T >
typedef void numeric::sphericalVector< T >::iterator_category

◆ Pointer

template<typename T >
typedef T* numeric::sphericalVector< T >::Pointer

◆ pointer

template<typename T >
typedef T* numeric::sphericalVector< T >::pointer

◆ Reference

template<typename T >
typedef T& numeric::sphericalVector< T >::Reference

◆ reference

template<typename T >
typedef T& numeric::sphericalVector< T >::reference

◆ Value

template<typename T >
typedef T numeric::sphericalVector< T >::Value

◆ value_type

template<typename T >
typedef T numeric::sphericalVector< T >::value_type

Constructor & Destructor Documentation

◆ sphericalVector() [1/5]

template<typename T >
numeric::sphericalVector< T >::sphericalVector ( )
inline

Default constructor.

Note
Values are uninitialized for efficiency

◆ sphericalVector() [2/5]

template<typename T >
numeric::sphericalVector< T >::sphericalVector ( sphericalVector< T > const &  v)
inline

Copy constructor.

◆ sphericalVector() [3/5]

template<typename T >
template<typename U >
numeric::sphericalVector< T >::sphericalVector ( sphericalVector< U > const &  v)
inline

Copy constructor.

◆ sphericalVector() [4/5]

template<typename T >
numeric::sphericalVector< T >::sphericalVector ( Value const &  phi_a,
Value const &  theta_a,
Value const &  radius_a 
)
inline

Triple value constructor.

◆ sphericalVector() [5/5]

template<typename T >
template<typename U >
numeric::sphericalVector< T >::sphericalVector ( U const *  p)
inlineexplicit

Pointer to contiguous values constructor.

Note
U must be assignable to a Value
Warning
No way to check that argument points to three values
Argument missing an & operator will quietly call the uniform value constructor

◆ ~sphericalVector()

template<typename T >
numeric::sphericalVector< T >::~sphericalVector ( )
inline

Destructor.

Member Function Documentation

◆ assign()

template<typename T >
sphericalVector& numeric::sphericalVector< T >::assign ( Value const &  phi_a,
Value const &  theta_a,
Value const &  radius_a 
)
inline

◆ clear()

template<typename T >
sphericalVector& numeric::sphericalVector< T >::clear ( )
inline

◆ max()

template<typename T >
sphericalVector& numeric::sphericalVector< T >::max ( sphericalVector< T > const &  v)
inline

◆ min()

template<typename T >
sphericalVector& numeric::sphericalVector< T >::min ( sphericalVector< T > const &  v)
inline

◆ operator*=()

template<typename T >
sphericalVector& numeric::sphericalVector< T >::operator*= ( Value const &  t)
inline

◆ operator+=() [1/2]

template<typename T >
template<typename U >
sphericalVector& numeric::sphericalVector< T >::operator+= ( sphericalVector< U > const &  v)
inline

◆ operator+=() [2/2]

template<typename T >
sphericalVector& numeric::sphericalVector< T >::operator+= ( Value const &  t)
inline

◆ operator-=() [1/2]

template<typename T >
template<typename U >
sphericalVector& numeric::sphericalVector< T >::operator-= ( sphericalVector< U > const &  v)
inline

◆ operator-=() [2/2]

template<typename T >
sphericalVector& numeric::sphericalVector< T >::operator-= ( Value const &  t)
inline

◆ operator/=()

template<typename T >
sphericalVector& numeric::sphericalVector< T >::operator/= ( Value const &  t)
inline

◆ operator=() [1/4]

template<typename T >
sphericalVector& numeric::sphericalVector< T >::operator= ( sphericalVector< T > const &  v)
inline

◆ operator=() [2/4]

template<typename T >
template<typename U >
sphericalVector& numeric::sphericalVector< T >::operator= ( sphericalVector< U > const &  v)
inline

◆ operator=() [3/4]

template<typename T >
template<typename U >
sphericalVector& numeric::sphericalVector< T >::operator= ( U const *  p)
inline

Assignment from pointer to contiguous values.

Warning
No way to check that argument points to three values

References kmeans_adaptive_kernel_density_bb_dependent_rotlib::p, numeric::sphericalVector< T >::phi_, numeric::sphericalVector< T >::radius_, and numeric::sphericalVector< T >::theta_.

◆ operator=() [4/4]

template<typename T >
sphericalVector& numeric::sphericalVector< T >::operator= ( Value const &  t)
inline

◆ phi() [1/3]

template<typename T >
Value& numeric::sphericalVector< T >::phi ( )
inline

◆ phi() [2/3]

template<typename T >
Value const& numeric::sphericalVector< T >::phi ( ) const
inline

◆ phi() [3/3]

template<typename T >
void numeric::sphericalVector< T >::phi ( Value const &  phi_a)
inline

x assignment

References numeric::sphericalVector< T >::phi_.

◆ radius() [1/3]

template<typename T >
Value& numeric::sphericalVector< T >::radius ( )
inline

◆ radius() [2/3]

template<typename T >
Value const& numeric::sphericalVector< T >::radius ( ) const
inline

◆ radius() [3/3]

template<typename T >
void numeric::sphericalVector< T >::radius ( Value const &  radius_a)
inline

◆ scaled_add()

template<typename T >
template<typename U >
sphericalVector& numeric::sphericalVector< T >::scaled_add ( Value const &  t,
sphericalVector< U > const &  v 
)
inline

◆ scaled_assign()

template<typename T >
template<typename U >
sphericalVector& numeric::sphericalVector< T >::scaled_assign ( Value const &  t,
sphericalVector< U > const &  v 
)
inline

◆ scaled_sub()

template<typename T >
template<typename U >
sphericalVector& numeric::sphericalVector< T >::scaled_sub ( Value const &  t,
sphericalVector< U > const &  v 
)
inline

◆ theta() [1/3]

template<typename T >
Value& numeric::sphericalVector< T >::theta ( )
inline

◆ theta() [2/3]

template<typename T >
Value const& numeric::sphericalVector< T >::theta ( ) const
inline

◆ theta() [3/3]

template<typename T >
void numeric::sphericalVector< T >::theta ( Value const &  theta_a)
inline

y assignment

References numeric::sphericalVector< T >::theta_.

◆ zero()

template<typename T >
sphericalVector& numeric::sphericalVector< T >::zero ( )
inline

Friends And Related Function Documentation

◆ add [1/3]

template<typename T >
void add ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b,
sphericalVector< T > &  r 
)
friend

◆ add [2/3]

template<typename T >
void add ( sphericalVector< T > const &  v,
Value const &  t,
sphericalVector< T > &  r 
)
friend

◆ add [3/3]

template<typename T >
void add ( Value const &  t,
sphericalVector< T > const &  v,
sphericalVector< T > &  r 
)
friend

◆ divide

template<typename T >
void divide ( sphericalVector< T > const &  v,
Value const &  t,
sphericalVector< T > &  r 
)
friend

Divide: xyzVector / Value.

◆ max

template<typename T >
sphericalVector max ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b 
)
friend

sphericalVector with max coordinates of two sphericalVector

◆ min

template<typename T >
sphericalVector min ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b 
)
friend

xyzVector with min coordinates of two xyzVectors

◆ multiply [1/2]

template<typename T >
void multiply ( sphericalVector< T > const &  v,
Value const &  t,
sphericalVector< T > &  r 
)
friend

Multiply: xyzVector * Value.

◆ multiply [2/2]

template<typename T >
void multiply ( Value const &  t,
sphericalVector< T > const &  v,
sphericalVector< T > &  r 
)
friend

Multiply: Value * xyzVector.

◆ operator!=

template<typename T >
bool operator!= ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b 
)
friend

◆ operator* [1/2]

template<typename T >
sphericalVector operator* ( sphericalVector< T > const &  v,
Value const &  t 
)
friend

sphericalVector * Value

◆ operator* [2/2]

template<typename T >
sphericalVector operator* ( Value const &  t,
sphericalVector< T > const &  v 
)
friend

Value * xyzVector.

◆ operator+ [1/3]

template<typename T >
sphericalVector operator+ ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b 
)
friend

◆ operator+ [2/3]

template<typename T >
sphericalVector operator+ ( sphericalVector< T > const &  v,
Value const &  t 
)
friend

sphericalVector + Value

◆ operator+ [3/3]

template<typename T >
sphericalVector operator+ ( Value const &  t,
sphericalVector< T > const &  v 
)
friend

Value + sphericalVector.

◆ operator- [1/3]

template<typename T >
sphericalVector operator- ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b 
)
friend

◆ operator- [2/3]

template<typename T >
sphericalVector operator- ( sphericalVector< T > const &  v,
Value const &  t 
)
friend

sphericalVector - Value

◆ operator- [3/3]

template<typename T >
sphericalVector operator- ( Value const &  t,
sphericalVector< T > const &  v 
)
friend

Value - sphericalVector.

◆ operator/

template<typename T >
sphericalVector operator/ ( sphericalVector< T > const &  v,
Value const &  t 
)
friend

xyzVector / Value

◆ operator==

template<typename T >
bool operator== ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b 
)
friend

◆ subtract [1/3]

template<typename T >
void subtract ( sphericalVector< T > const &  a,
sphericalVector< T > const &  b,
sphericalVector< T > &  r 
)
friend

Subtract: xyzVector - xyzVector.

◆ subtract [2/3]

template<typename T >
void subtract ( sphericalVector< T > const &  v,
Value const &  t,
sphericalVector< T > &  r 
)
friend

Subtract: xyzVector - Value.

◆ subtract [3/3]

template<typename T >
void subtract ( Value const &  t,
sphericalVector< T > const &  v,
sphericalVector< T > &  r 
)
friend

Subtract: Value - sphericalVector.

Member Data Documentation

◆ phi_

template<typename T >
Value numeric::sphericalVector< T >::phi_
private

◆ radius_

template<typename T >
Value numeric::sphericalVector< T >::radius_
private

◆ theta_

template<typename T >
Value numeric::sphericalVector< T >::theta_
private

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