BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
BasicVector3D< T > Class Template Reference

Three-dimensional vector template, for use with integer, double, or complex components. More...

Public Member Functions

 BasicVector3D ()
 Constructs the null vector. More...
 
 BasicVector3D (const T x1, const T y1, const T z1)
 Constructs a vector from cartesian components. More...
 
double angle (const BasicVector3D< T > &v) const
 Returns angle with respect to another vector. More...
 
BasicVector3D< complex_tcomplex () const
 Returns this, trivially converted to complex type. More...
 
BasicVector3D< T > conj () const
 Returns complex conjugate vector. More...
 
double cosTheta () const
 Returns cosine of polar angle. More...
 
template<class U >
auto cross (const BasicVector3D< U > &v) const
 Returns cross product of vectors (linear in both arguments). More...
 
template<class U >
auto dot (const BasicVector3D< U > &v) const
 Returns dot product of vectors (antilinear in the first [=self] argument). More...
 
double mag () const
 Returns magnitude of the vector. More...
 
double mag2 () const
 Returns magnitude squared of the vector. More...
 
double magxy () const
 Returns distance from z axis. More...
 
double magxy2 () const
 Returns squared distance from z axis. More...
 
template<class U >
auto operator*= (U a)
 Multiplies this with a scalar, and returns result. More...
 
BasicVector3D< T > & operator+= (const BasicVector3D< T > &v)
 Adds other vector to this, and returns result. More...
 
BasicVector3D< T > & operator-= (const BasicVector3D< T > &v)
 Subtracts other vector from this, and returns result. More...
 
template<class U >
auto operator/= (U a)
 Divides this by a scalar, and returns result. More...
 
T & operator[] (int i)
 Sets components by index. More...
 
operator[] (int i) const
 Returns components by index. More...
 
double phi () const
 Returns azimuth angle. More...
 
BasicVector3D< T > project (const BasicVector3D< T > &v) const
 Returns projection of this onto other vector: (this*v)*v/|v|^2. More...
 
BasicVector3D< double > real () const
 Returns real parts. More...
 
BasicVector3D< T > rotated (double a, const BasicVector3D< T > &v) const
 Returns result of rotation around the axis specified by another vector. More...
 
BasicVector3D< T > rotatedX (double a) const
 Returns result of rotation around x-axis. More...
 
BasicVector3D< T > rotatedY (double a) const
 Returns result of rotation around y-axis. More...
 
BasicVector3D< T > rotatedZ (double a) const
 Returns result of rotation around z-axis. More...
 
void setX (const T &a)
 Sets x-component in cartesian coordinate system. More...
 
void setY (const T &a)
 Sets y-component in cartesian coordinate system. More...
 
void setZ (const T &a)
 Sets z-component in cartesian coordinate system. More...
 
double sin2Theta () const
 Returns squared sine of polar angle. More...
 
double theta () const
 Returns polar angle. More...
 
BasicVector3D< T > unit () const
 Returns unit vector in direction of this. Throws for null vector. More...
 
x () const
 Returns x-component in cartesian coordinate system. More...
 
y () const
 Returns y-component in cartesian coordinate system. More...
 
z () const
 Returns z-component in cartesian coordinate system. More...
 

Private Attributes

v_ [3]
 

Related Functions

(Note that these are not member functions.)

template<class T >
bool operator!= (const BasicVector3D< T > &a, const BasicVector3D< T > &b)
 Comparison of two vectors for inequality. More...
 
template<class T , class U >
auto operator* (const BasicVector3D< T > &v, const U a)
 Multiplication vector by scalar. More...
 
template<class T , class U >
auto operator* (const U a, const BasicVector3D< T > &v)
 Multiplication scalar by vector. More...
 
template<class T >
BasicVector3D< T > operator+ (const BasicVector3D< T > &a, const BasicVector3D< T > &b)
 Addition of two vectors. More...
 
template<class T >
BasicVector3D< T > operator+ (const BasicVector3D< T > &v)
 Unary plus. More...
 
template<class T >
BasicVector3D< T > operator- (const BasicVector3D< T > &a, const BasicVector3D< T > &b)
 Subtraction of two vectors. More...
 
template<class T >
BasicVector3D< T > operator- (const BasicVector3D< T > &v)
 Unary minus. More...
 
template<class T , class U >
BasicVector3D< T > operator/ (const BasicVector3D< T > &v, U a)
 Division vector by scalar. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const BasicVector3D< T > &a)
 Output to stream. More...
 
template<class T >
bool operator== (const BasicVector3D< T > &a, const BasicVector3D< T > &b)
 Comparison of two vectors for equality. More...
 

Detailed Description

template<class T>
class BasicVector3D< T >

Three-dimensional vector template, for use with integer, double, or complex components.

Definition at line 27 of file BasicVector3D.h.

Constructor & Destructor Documentation

◆ BasicVector3D() [1/2]

template<class T >
BasicVector3D< T >::BasicVector3D ( )
inline

Constructs the null vector.

Definition at line 37 of file BasicVector3D.h.

38  {
39  v_[0] = 0.0;
40  v_[1] = 0.0;
41  v_[2] = 0.0;
42  }

References BasicVector3D< T >::v_.

◆ BasicVector3D() [2/2]

template<class T >
BasicVector3D< T >::BasicVector3D ( const T  x1,
const T  y1,
const T  z1 
)
inline

Constructs a vector from cartesian components.

Definition at line 45 of file BasicVector3D.h.

46  {
47  v_[0] = x1;
48  v_[1] = y1;
49  v_[2] = z1;
50  }

References BasicVector3D< T >::v_.

Member Function Documentation

◆ angle()

template<class T >
double BasicVector3D< T >::angle ( const BasicVector3D< T > &  v) const

Returns angle with respect to another vector.

◆ complex()

template<class T >
BasicVector3D<complex_t> BasicVector3D< T >::complex ( ) const

Returns this, trivially converted to complex type.

Referenced by Bin1DCVector::Bin1DCVector(), FormFactorCrystal::evaluate(), and FormFactorCrystal::evaluatePol().

◆ conj()

template<class T >
BasicVector3D<T> BasicVector3D< T >::conj ( ) const

Returns complex conjugate vector.

◆ cosTheta()

template<class T >
double BasicVector3D< T >::cosTheta ( ) const

Returns cosine of polar angle.

◆ cross()

template<class T >
template<class U >
auto BasicVector3D< T >::cross ( const BasicVector3D< U > &  v) const
inline

Returns cross product of vectors (linear in both arguments).

Returns cross product of (complex) vectors.

Definition at line 312 of file BasicVector3D.h.

313 {
314  return BasicVector3D<decltype(this->x() * v.x())>(
315  y() * v.z() - v.y() * z(), z() * v.x() - v.z() * x(), x() * v.y() - v.x() * y());
316 }
Three-dimensional vector template, for use with integer, double, or complex components.
Definition: BasicVector3D.h:27
T z() const
Returns z-component in cartesian coordinate system.
Definition: BasicVector3D.h:67
T y() const
Returns y-component in cartesian coordinate system.
Definition: BasicVector3D.h:65
T x() const
Returns x-component in cartesian coordinate system.
Definition: BasicVector3D.h:63

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Referenced by Lattice3D::computeReciprocalVectors(), PolyhedralFace::edge_sum_ff(), MisesFisherGaussPeakShape::evaluate(), MisesGaussPeakShape::evaluate(), PolyhedralFace::ff_n_core(), RectangularDetector::initUandV(), and Lattice3D::unitCellVolume().

Here is the call graph for this function:

◆ dot()

template<class T >
template<class U >
auto BasicVector3D< T >::dot ( const BasicVector3D< U > &  v) const
inline

Returns dot product of vectors (antilinear in the first [=self] argument).

Returns dot product of (complex) vectors (antilinear in the first [=self] argument).

Definition at line 301 of file BasicVector3D.h.

302 {
303  BasicVector3D<T> left_star = this->conj();
304  return left_star.x() * v.x() + left_star.y() * v.y() + left_star.z() * v.z();
305 }
BasicVector3D< T > conj() const
Returns complex conjugate vector.

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Referenced by PolyhedralFace::PolyhedralFace(), RectangularPixel::calculateSolidAngle(), Lattice3D::computeReciprocalVectors(), PolyhedralEdge::contrib(), PolyhedralFace::decompose_q(), PolyhedralFace::edge_sum_ff(), GaussFisherPeakShape::evaluate(), LorentzFisherPeakShape::evaluate(), MisesFisherGaussPeakShape::evaluate(), MisesGaussPeakShape::evaluate(), PolyhedralFace::ff_2D(), PolyhedralFace::ff_n(), PolyhedralFace::ff_n_core(), Lattice3D::getNearestReciprocalLatticeVectorCoordinates(), FormFactorDecoratorPositionFactor::getPositionFactor(), InterferenceFunctionTwin::iff_without_dw(), InterferenceFunctionFinite3DLattice::iff_without_dw(), RectangularDetector::indexOfSpecular(), RectangularDetector::initUandV(), MisesFisherGaussPeakShape::integrand(), RectangularPixel::integrationFactor(), PolyhedralFace::normalProjectionConj(), BasicVector3D< T >::project(), PolyhedralEdge::qE(), PolyhedralEdge::qR(), and Lattice3D::unitCellVolume().

Here is the call graph for this function:

◆ mag()

template<class T >
double BasicVector3D< T >::mag ( ) const
inline

Returns magnitude of the vector.

Definition at line 131 of file BasicVector3D.h.

131 { return sqrt(mag2()); }
double mag2() const
Returns magnitude squared of the vector.

References BasicVector3D< T >::mag2().

Referenced by MatrixRTCoefficients::MatrixRTCoefficients(), DetectionProperties::analyzerOperator(), FormFactorCrystal::calculateLargestReciprocalDistance(), RectangularPixel::calculateSolidAngle(), SpecularMagneticStrategy_v2::calculateTR(), DetectionProperties::checkAnalyzerProperties(), MatrixRTCoefficients::computeDeltaMatrix(), KzComputation::computeReducedKz(), SpecularMagneticStrategy_v2::computeTR(), DetectorItem::createDetector(), PolyhedralFace::decompose_q(), GaussFisherPeakShape::evaluate(), LorentzFisherPeakShape::evaluate(), MisesFisherGaussPeakShape::evaluate(), MisesGaussPeakShape::evaluate(), Polyhedron::evaluate_centered(), FormFactorCone::evaluate_for_q(), FormFactorHemiEllipsoid::evaluate_for_q(), FormFactorTruncatedSphere::evaluate_for_q(), FormFactorTruncatedSpheroid::evaluate_for_q(), PolyhedralFace::ff(), PolyhedralFace::ff_2D(), PolyhedralFace::ff_n(), InterferenceFunction3DLattice::initRecRadius(), RectangularDetector::initUandV(), RectangularPixel::integrationFactor(), SpecularMagneticStrategy_v2::nullifyBottomReflection(), Slice::polarizedReducedPotential(), Lattice3D::reciprocalLatticeVectorsWithinRadius(), Slice::scalarReducedPotential(), DetectionProperties::setAnalyzerProperties(), Beam::setPolarization(), RectangularDetector::setPosition(), and MatrixRTCoefficients::TransformationMatrix().

Here is the call graph for this function:

◆ mag2()

◆ magxy()

template<class T >
double BasicVector3D< T >::magxy ( ) const
inline

Returns distance from z axis.

Definition at line 137 of file BasicVector3D.h.

137 { return sqrt(magxy2()); }
double magxy2() const
Returns squared distance from z axis.

References BasicVector3D< T >::magxy2().

Referenced by SSCApproximationStrategy::polarizedCalculation(), and SSCApproximationStrategy::scalarCalculation().

Here is the call graph for this function:

◆ magxy2()

template<class T >
double BasicVector3D< T >::magxy2 ( ) const
inline

Returns squared distance from z axis.

Definition at line 134 of file BasicVector3D.h.

134 { return std::norm(v_[0]) + std::norm(v_[1]); }

References BasicVector3D< T >::v_.

Referenced by BasicVector3D< T >::magxy().

◆ operator*=()

template<class T >
template<class U >
auto BasicVector3D< T >::operator*= ( a)
inline

Multiplies this with a scalar, and returns result.

Definition at line 100 of file BasicVector3D.h.

101  {
102  v_[0] *= a;
103  v_[1] *= a;
104  v_[2] *= a;
105  return *this;
106  }

References BasicVector3D< T >::v_.

◆ operator+=()

template<class T >
BasicVector3D<T>& BasicVector3D< T >::operator+= ( const BasicVector3D< T > &  v)
inline

Adds other vector to this, and returns result.

Definition at line 81 of file BasicVector3D.h.

82  {
83  v_[0] += v.v_[0];
84  v_[1] += v.v_[1];
85  v_[2] += v.v_[2];
86  return *this;
87  }

References BasicVector3D< T >::v_.

◆ operator-=()

template<class T >
BasicVector3D<T>& BasicVector3D< T >::operator-= ( const BasicVector3D< T > &  v)
inline

Subtracts other vector from this, and returns result.

Definition at line 90 of file BasicVector3D.h.

91  {
92  v_[0] -= v.v_[0];
93  v_[1] -= v.v_[1];
94  v_[2] -= v.v_[2];
95  return *this;
96  }

References BasicVector3D< T >::v_.

◆ operator/=()

template<class T >
template<class U >
auto BasicVector3D< T >::operator/= ( a)
inline

Divides this by a scalar, and returns result.

Definition at line 111 of file BasicVector3D.h.

112  {
113  v_[0] /= a;
114  v_[1] /= a;
115  v_[2] /= a;
116  return *this;
117  }

References BasicVector3D< T >::v_.

◆ operator[]() [1/2]

template<class T >
T& BasicVector3D< T >::operator[] ( int  i)
inline

Sets components by index.

Definition at line 60 of file BasicVector3D.h.

60 { return v_[i]; }

References BasicVector3D< T >::v_.

◆ operator[]() [2/2]

template<class T >
T BasicVector3D< T >::operator[] ( int  i) const
inline

Returns components by index.

Definition at line 57 of file BasicVector3D.h.

57 { return v_[i]; }

References BasicVector3D< T >::v_.

◆ phi()

template<class T >
double BasicVector3D< T >::phi ( ) const

Returns azimuth angle.

Referenced by RectangularConverter::axisAngle(), and SimulationElement::getPhi().

◆ project()

template<class T >
BasicVector3D<T> BasicVector3D< T >::project ( const BasicVector3D< T > &  v) const
inline

Returns projection of this onto other vector: (this*v)*v/|v|^2.

Definition at line 178 of file BasicVector3D.h.

179  {
180  return dot(v) * v / v.mag2();
181  }
auto dot(const BasicVector3D< U > &v) const
Returns dot product of vectors (antilinear in the first [=self] argument).

References BasicVector3D< T >::dot(), and BasicVector3D< T >::mag2().

Here is the call graph for this function:

◆ real()

template<class T >
BasicVector3D<double> BasicVector3D< T >::real ( ) const

Returns real parts.

Referenced by FormFactorCrystal::evaluate(), and FormFactorCrystal::evaluatePol().

◆ rotated()

template<class T >
BasicVector3D<T> BasicVector3D< T >::rotated ( double  a,
const BasicVector3D< T > &  v 
) const

Returns result of rotation around the axis specified by another vector.

◆ rotatedX()

template<class T >
BasicVector3D<T> BasicVector3D< T >::rotatedX ( double  a) const

Returns result of rotation around x-axis.

◆ rotatedY()

template<class T >
BasicVector3D<T> BasicVector3D< T >::rotatedY ( double  a) const

Returns result of rotation around y-axis.

◆ rotatedZ()

template<class T >
BasicVector3D<T> BasicVector3D< T >::rotatedZ ( double  a) const
inline

Returns result of rotation around z-axis.

Definition at line 192 of file BasicVector3D.h.

193  {
194  return BasicVector3D<T>(cos(a) * x() + sin(a) * y(), -sin(a) * x() + cos(a) * y(), z());
195  }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Referenced by InterferenceFunction2DSuperLattice::interferenceForXi().

Here is the call graph for this function:

◆ setX()

template<class T >
void BasicVector3D< T >::setX ( const T &  a)
inline

Sets x-component in cartesian coordinate system.

Definition at line 70 of file BasicVector3D.h.

70 { v_[0] = a; }

References BasicVector3D< T >::v_.

◆ setY()

template<class T >
void BasicVector3D< T >::setY ( const T &  a)
inline

Sets y-component in cartesian coordinate system.

Definition at line 72 of file BasicVector3D.h.

72 { v_[1] = a; }

References BasicVector3D< T >::v_.

◆ setZ()

template<class T >
void BasicVector3D< T >::setZ ( const T &  a)
inline

◆ sin2Theta()

template<class T >
double BasicVector3D< T >::sin2Theta ( ) const

Returns squared sine of polar angle.

Referenced by MaterialUtils::ScalarReducedPotential().

◆ theta()

template<class T >
double BasicVector3D< T >::theta ( ) const

◆ unit()

◆ x()

template<class T >
T BasicVector3D< T >::x ( ) const
inline

Returns x-component in cartesian coordinate system.

Definition at line 63 of file BasicVector3D.h.

63 { return v_[0]; }

References BasicVector3D< T >::v_.

Referenced by DetectionProperties::analyzerOperator(), RealSpaceBuilderUtils::applyParticleCoreShellTransformations(), RealSpaceBuilderUtils::applyParticleTransformations(), SpecularMagneticStrategy_v2::calculateTR(), MatrixRTCoefficients::computeDeltaMatrix(), SpecularMagneticNCStrategy::computeRoughnessMatrices(), BasicVector3D< T >::cross(), SampleToPython::defineLattices3D(), SampleToPython::defineMaterials(), BasicVector3D< T >::dot(), InterferenceFunction2DSuperLattice::evaluate(), Prism::evaluate_for_q(), FormFactorBox::evaluate_for_q(), FormFactorCylinder::evaluate_for_q(), FormFactorEllipsoidalCylinder::evaluate_for_q(), FormFactorFullSpheroid::evaluate_for_q(), FormFactorHollowSphere::evaluate_for_q(), FormFactorLongBoxGauss::evaluate_for_q(), FormFactorLongBoxLorentz::evaluate_for_q(), IProfileRipple::evaluate_for_q(), FormFactorGaussSphere::evaluate_for_q(), FormFactorSphereGaussianRadius::evaluate_for_q(), ComputeDWBAPol::evaluatePol(), someff::ffSphere(), LayerRoughness::getCorrFun(), Beam::getPolarization(), LayerRoughness::getSpectralFun(), InterferenceFunctionRadialParaCrystal::iff_without_dw(), InterferenceFunction1DLattice::iff_without_dw(), InterferenceFunction2DLattice::iff_without_dw(), InterferenceFunction2DParaCrystal::iff_without_dw(), InterferenceFunction2DSuperLattice::iff_without_dw(), InterferenceFunctionFinite2DLattice::iff_without_dw(), InterferenceFunctionHardDisk::iff_without_dw(), FormFactorCone::Integrand(), FormFactorHemiEllipsoid::Integrand(), FormFactorTruncatedSphere::Integrand(), FormFactorTruncatedSpheroid::Integrand(), SpecularMagneticStrategy_v2::nullifyBottomReflection(), BasicVector3D< T >::operator!=(), BasicVector3D< T >::operator*(), BasicVector3D< T >::operator+(), BasicVector3D< T >::operator-(), BasicVector3D< T >::operator/(), BasicVector3D< T >::operator<<(), BasicVector3D< T >::operator==(), MatrixRTCoefficients::pMatrixHelper(), RealSpaceMesoCrystal::populateMesoCrystal(), pyfmt::printKvector(), BasicVector3D< T >::rotatedZ(), TransformToDomain::setPositionInfo(), VectorItem::setVector(), IParametricComponent::setVectorValue(), MatrixRTCoefficients::TransformationMatrix(), Transform3D::transformed(), and Transform3D::transformedInverse().

◆ y()

template<class T >
T BasicVector3D< T >::y ( ) const
inline

Returns y-component in cartesian coordinate system.

Definition at line 65 of file BasicVector3D.h.

65 { return v_[1]; }

References BasicVector3D< T >::v_.

Referenced by DetectionProperties::analyzerOperator(), RealSpaceBuilderUtils::applyParticleCoreShellTransformations(), RealSpaceBuilderUtils::applyParticleTransformations(), SpecularMagneticStrategy_v2::calculateTR(), MatrixRTCoefficients::computeDeltaMatrix(), BasicVector3D< T >::cross(), SampleToPython::defineLattices3D(), SampleToPython::defineMaterials(), BasicVector3D< T >::dot(), InterferenceFunction2DSuperLattice::evaluate(), Prism::evaluate_for_q(), FormFactorBox::evaluate_for_q(), FormFactorCylinder::evaluate_for_q(), FormFactorEllipsoidalCylinder::evaluate_for_q(), FormFactorFullSpheroid::evaluate_for_q(), FormFactorHollowSphere::evaluate_for_q(), FormFactorLongBoxGauss::evaluate_for_q(), FormFactorLongBoxLorentz::evaluate_for_q(), IProfileRipple::evaluate_for_q(), FormFactorGaussSphere::evaluate_for_q(), FormFactorSphereGaussianRadius::evaluate_for_q(), ComputeDWBAPol::evaluatePol(), someff::ffSphere(), LayerRoughness::getCorrFun(), Beam::getPolarization(), LayerRoughness::getSpectralFun(), InterferenceFunctionRadialParaCrystal::iff_without_dw(), InterferenceFunction1DLattice::iff_without_dw(), InterferenceFunction2DLattice::iff_without_dw(), InterferenceFunction2DParaCrystal::iff_without_dw(), InterferenceFunction2DSuperLattice::iff_without_dw(), InterferenceFunctionFinite2DLattice::iff_without_dw(), InterferenceFunctionHardDisk::iff_without_dw(), FormFactorCone::Integrand(), FormFactorHemiEllipsoid::Integrand(), FormFactorTruncatedSphere::Integrand(), FormFactorTruncatedSpheroid::Integrand(), SpecularMagneticStrategy_v2::nullifyBottomReflection(), BasicVector3D< T >::operator!=(), BasicVector3D< T >::operator*(), BasicVector3D< T >::operator+(), BasicVector3D< T >::operator-(), BasicVector3D< T >::operator/(), BasicVector3D< T >::operator<<(), BasicVector3D< T >::operator==(), MatrixRTCoefficients::pMatrixHelper(), RealSpaceMesoCrystal::populateMesoCrystal(), pyfmt::printKvector(), BasicVector3D< T >::rotatedZ(), TransformToDomain::setPositionInfo(), VectorItem::setVector(), IParametricComponent::setVectorValue(), MatrixRTCoefficients::TransformationMatrix(), Transform3D::transformed(), and Transform3D::transformedInverse().

◆ z()

template<class T >
T BasicVector3D< T >::z ( ) const
inline

Returns z-component in cartesian coordinate system.

Definition at line 67 of file BasicVector3D.h.

67 { return v_[2]; }

References BasicVector3D< T >::v_.

Referenced by DetectionProperties::analyzerOperator(), RealSpaceBuilderUtils::applyParticleCoreShellTransformations(), RealSpaceBuilderUtils::applyParticleTransformations(), FormFactorFullSphere::bottomZ(), FormFactorDecoratorPositionFactor::bottomZ(), SpecularMagneticStrategy_v2::calculateTR(), MatrixRTCoefficients::computeDeltaMatrix(), KzComputation::computeKzFromRefIndices(), KzComputation::computeReducedKz(), IBornFF::computeSlicingEffects(), BasicVector3D< T >::cross(), SampleToPython::defineLattices3D(), SampleToPython::defineMaterials(), BasicVector3D< T >::dot(), ComputeDWBA::evaluate(), Polyhedron::evaluate_for_q(), Prism::evaluate_for_q(), FormFactorBox::evaluate_for_q(), FormFactorCylinder::evaluate_for_q(), FormFactorEllipsoidalCylinder::evaluate_for_q(), FormFactorFullSphere::evaluate_for_q(), FormFactorFullSpheroid::evaluate_for_q(), FormFactorHollowSphere::evaluate_for_q(), FormFactorLongBoxGauss::evaluate_for_q(), FormFactorLongBoxLorentz::evaluate_for_q(), FormFactorTruncatedSphere::evaluate_for_q(), FormFactorTruncatedSpheroid::evaluate_for_q(), IProfileRipple::evaluate_for_q(), FormFactorGaussSphere::evaluate_for_q(), FormFactorSphereGaussianRadius::evaluate_for_q(), someff::ffSphere(), Beam::getPolarization(), ProcessedSample::initBFields(), RectangularDetector::initNormalVector(), FormFactorCone::Integrand(), FormFactorHemiEllipsoid::Integrand(), FormFactorTruncatedSphere::Integrand(), FormFactorTruncatedSpheroid::Integrand(), SpecularMagneticStrategy_v2::nullifyBottomReflection(), BasicVector3D< T >::operator!=(), BasicVector3D< T >::operator*(), BasicVector3D< T >::operator+(), BasicVector3D< T >::operator-(), BasicVector3D< T >::operator/(), BasicVector3D< T >::operator<<(), BasicVector3D< T >::operator==(), MatrixRTCoefficients::pMatrixHelper(), RealSpaceMesoCrystal::populateMesoCrystal(), pyfmt::printKvector(), BasicVector3D< T >::rotatedZ(), TransformToDomain::setPositionInfo(), VectorItem::setVector(), IParametricComponent::setVectorValue(), FormFactorFullSphere::topZ(), FormFactorDecoratorPositionFactor::topZ(), MatrixRTCoefficients::TransformationMatrix(), Transform3D::transformed(), and Transform3D::transformedInverse().

Friends And Related Function Documentation

◆ operator!=()

template<class T >
bool operator!= ( const BasicVector3D< T > &  a,
const BasicVector3D< T > &  b 
)
related

Comparison of two vectors for inequality.

Definition at line 288 of file BasicVector3D.h.

289 {
290  return (a.x() != b.x() || a.y() != b.y() || a.z() != b.z());
291 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator*() [1/2]

template<class T , class U >
auto operator* ( const BasicVector3D< T > &  v,
const U  a 
)
related

Multiplication vector by scalar.

Definition at line 252 of file BasicVector3D.h.

253 {
254  return BasicVector3D<decltype(v.x() * a)>(v.x() * a, v.y() * a, v.z() * a);
255 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator*() [2/2]

template<class T , class U >
auto operator* ( const U  a,
const BasicVector3D< T > &  v 
)
related

Multiplication scalar by vector.

Definition at line 261 of file BasicVector3D.h.

262 {
263  return BasicVector3D<decltype(a * v.x())>(a * v.x(), a * v.y(), a * v.z());
264 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator+() [1/2]

template<class T >
BasicVector3D< T > operator+ ( const BasicVector3D< T > &  a,
const BasicVector3D< T > &  b 
)
related

Addition of two vectors.

Definition at line 236 of file BasicVector3D.h.

237 {
238  return BasicVector3D<T>(a.x() + b.x(), a.y() + b.y(), a.z() + b.z());
239 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator+() [2/2]

template<class T >
BasicVector3D< T > operator+ ( const BasicVector3D< T > &  v)
related

Unary plus.

Definition at line 217 of file BasicVector3D.h.

218 {
219  return v;
220 }

◆ operator-() [1/2]

template<class T >
BasicVector3D< T > operator- ( const BasicVector3D< T > &  a,
const BasicVector3D< T > &  b 
)
related

Subtraction of two vectors.

Definition at line 244 of file BasicVector3D.h.

245 {
246  return BasicVector3D<T>(a.x() - b.x(), a.y() - b.y(), a.z() - b.z());
247 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator-() [2/2]

template<class T >
BasicVector3D< T > operator- ( const BasicVector3D< T > &  v)
related

Unary minus.

Definition at line 224 of file BasicVector3D.h.

225 {
226  return BasicVector3D<T>(-v.x(), -v.y(), -v.z());
227 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator/()

template<class T , class U >
BasicVector3D< T > operator/ ( const BasicVector3D< T > &  v,
a 
)
related

Division vector by scalar.

Definition at line 274 of file BasicVector3D.h.

275 {
276  return BasicVector3D<T>(v.x() / a, v.y() / a, v.z() / a);
277 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator<<()

template<class T >
std::ostream & operator<< ( std::ostream &  os,
const BasicVector3D< T > &  a 
)
related

Output to stream.

Definition at line 206 of file BasicVector3D.h.

207 {
208  return os << "(" << a.x() << "," << a.y() << "," << a.z() << ")";
209 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

◆ operator==()

template<class T >
bool operator== ( const BasicVector3D< T > &  a,
const BasicVector3D< T > &  b 
)
related

Comparison of two vectors for equality.

Definition at line 281 of file BasicVector3D.h.

282 {
283  return (a.x() == b.x() && a.y() == b.y() && a.z() == b.z());
284 }

References BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Here is the call graph for this function:

Member Data Documentation

◆ v_


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