NEST
2.6.0,not_revisioned_source_dir@0
|
#include <position.h>
Public Member Functions | |
Position () | |
Default constructor, initializing all coordinates to zero. More... | |
Position (const T &, const T &) | |
2D Constructor. More... | |
Position (const T &, const T &, const T &) | |
3D Constructor. More... | |
Position (const T *const y) | |
Constructor initializing a Position from an array. More... | |
Position (const std::vector< T > &y) | |
Constructor initializing a Position from a std::vector. More... | |
Position (const Position &other) | |
Copy constructor. More... | |
template<class U > | |
Position (const Position< D, U > &other) | |
operator std::vector< T > () const | |
T & | operator[] (int i) |
const T & | operator[] (int i) const |
Token | getToken () const |
Moves Position variables into an array. More... | |
template<class OT > | |
Position | operator+ (const Position< D, OT > &other) const |
Elementwise addition. More... | |
template<class OT > | |
Position | operator- (const Position< D, OT > &other) const |
Elementwise subtraction. More... | |
Position | operator- () const |
Unary minus. More... | |
template<class OT > | |
Position | operator* (const Position< D, OT > &other) const |
Elementwise multiplication. More... | |
template<class OT > | |
Position | operator/ (const Position< D, OT > &other) const |
Elementwise division. More... | |
Position | operator+ (const T &) const |
Elementwise addition with scalar. More... | |
Position | operator- (const T &) const |
Elementwise subtraction with scalar. More... | |
Position | operator* (const T &) const |
Multiplication with scalar. More... | |
Position | operator/ (const T &) const |
Division with scalar. More... | |
template<class OT > | |
Position & | operator+= (const Position< D, OT > &) |
In-place elementwise addition. More... | |
template<class OT > | |
Position & | operator-= (const Position< D, OT > &) |
In-place elementwise subtraction. More... | |
template<class OT > | |
Position & | operator*= (const Position< D, OT > &) |
In-place elementwise multiplication. More... | |
template<class OT > | |
Position & | operator/= (const Position< D, OT > &) |
In-place elementwise division. More... | |
Position & | operator+= (const T &) |
In-place elementwise addition with scalar. More... | |
Position & | operator-= (const T &) |
In-place elementwise subtraction with scalar. More... | |
Position & | operator*= (const T &) |
In-place multiplication by scalar. More... | |
Position & | operator/= (const T &) |
In-place elementwise division. More... | |
bool | operator== (const Position &y) const |
bool | operator!= (const Position &y) const |
bool | operator< (const Position &y) const |
bool | operator> (const Position &y) const |
bool | operator<= (const Position &y) const |
bool | operator>= (const Position &y) const |
T | length () const |
Length of Position vector. More... | |
operator std::string () const | |
void | print (std::ostream &out, char sep= ' ') const |
Print position to output stream. More... | |
template<class OT > | |
Position< D, T > | operator+ (const Position< D, OT > &other) const |
template<class OT > | |
Position< D, T > | operator- (const Position< D, OT > &other) const |
template<class OT > | |
Position< D, T > | operator* (const Position< D, OT > &other) const |
template<class OT > | |
Position< D, T > | operator/ (const Position< D, OT > &other) const |
template<class OT > | |
Position< D, T > & | operator+= (const Position< D, OT > &other) |
template<class OT > | |
Position< D, T > & | operator-= (const Position< D, OT > &other) |
template<class OT > | |
Position< D, T > & | operator*= (const Position< D, OT > &other) |
template<class OT > | |
Position< D, T > & | operator/= (const Position< D, OT > &other) |
Protected Attributes | |
T | x_ [D] |
Friends | |
template<int OD, class OT > | |
class | Position |
std::ostream & | operator<< (std::ostream &os, const Position< D, T > &pos) |
Output the Position to an ostream. More... | |
|
inline |
Default constructor, initializing all coordinates to zero.
|
inline |
2D Constructor.
References assert(), nest::names::x, and nest::names::y.
|
inline |
3D Constructor.
References assert(), nest::names::x, and nest::names::y.
|
inline |
Constructor initializing a Position from an array.
|
inline |
Constructor initializing a Position from a std::vector.
|
inline |
Copy constructor.
References nest::Position< D, T >::x_.
|
inline |
References nest::Position< D, T >::x_.
Token nest::Position< D, T >::getToken | ( | ) | const |
Moves Position variables into an array.
T nest::Position< D, T >::length | ( | ) | const |
Length of Position vector.
Referenced by nest::RadialParameter::raw_value().
nest::Position< D, T >::operator std::string | ( | ) | const |
nest::Position< D, T >::operator std::vector< T > | ( | ) | const |
|
inline |
References nest::Position< D, T >::x_.
Position nest::Position< D, T >::operator* | ( | const Position< D, OT > & | other | ) | const |
Elementwise multiplication.
|
inline |
Multiplication with scalar.
References nest::names::a, and nest::names::p.
|
inline |
References nest::names::other, and nest::names::p.
Position& nest::Position< D, T >::operator*= | ( | const Position< D, OT > & | ) |
|
inline |
In-place multiplication by scalar.
|
inline |
References nest::Position< D, T >::x_.
Position nest::Position< D, T >::operator+ | ( | const Position< D, OT > & | other | ) | const |
Elementwise addition.
|
inline |
Elementwise addition with scalar.
References nest::names::a, and nest::names::p.
|
inline |
References nest::names::other, and nest::names::p.
Position& nest::Position< D, T >::operator+= | ( | const Position< D, OT > & | ) |
|
inline |
In-place elementwise addition with scalar.
|
inline |
References nest::Position< D, T >::x_.
Position nest::Position< D, T >::operator- | ( | const Position< D, OT > & | other | ) | const |
Elementwise subtraction.
|
inline |
|
inline |
Elementwise subtraction with scalar.
References nest::names::a, and nest::names::p.
|
inline |
References nest::names::other, and nest::names::p.
Position& nest::Position< D, T >::operator-= | ( | const Position< D, OT > & | ) |
|
inline |
In-place elementwise subtraction with scalar.
|
inline |
References nest::Position< D, T >::x_.
Position nest::Position< D, T >::operator/ | ( | const Position< D, OT > & | other | ) | const |
Elementwise division.
|
inline |
Division with scalar.
References nest::names::a, and nest::names::p.
|
inline |
References nest::names::other, and nest::names::p.
Position& nest::Position< D, T >::operator/= | ( | const Position< D, OT > & | ) |
|
inline |
In-place elementwise division.
|
inline |
References nest::Position< D, T >::x_.
|
inline |
References nest::Position< D, T >::x_.
|
inline |
References nest::Position< D, T >::x_.
|
inline |
References nest::Position< D, T >::x_.
|
inline |
References nest::Position< D, T >::x_.
|
inline |
References nest::Position< D, T >::x_.
|
inline |
|
inline |
void nest::Position< D, T >::print | ( | std::ostream & | out, |
char | sep = ' ' |
||
) | const |
Print position to output stream.
Format: Only as many coordinates as dimensions, separated by spaces [default], no trailing space.
out | output stream |
sep | separator character |
|
friend |
Output the Position to an ostream.
|
protected |
Referenced by nest::Position< D, T >::operator!=(), nest::Position< D, T >::operator*=(), nest::Position< D, T >::operator+=(), nest::Position< D, T >::operator-=(), nest::Position< D, T >::operator/=(), nest::Position< D, T >::operator<(), nest::Position< D, T >::operator<=(), nest::Position< D, T >::operator==(), nest::Position< D, T >::operator>(), nest::Position< D, T >::operator>=(), and nest::Position< D, T >::Position().