Template Class LQVec

Inheritance Relationships

Base Types

Class Documentation

template<class T>
class brille::LQVec : public brille::LatVec, public brille::Array2<T>

3-vector(s) expressed in units of a Reciprocal lattice

By adding a Reciprocal lattice to a 3-element bArray this class represents one or more 3-vector in units of a reciprocal-space-spanning lattice.

Public Functions

LQVec(const Reciprocal &lat = Reciprocal())
template<typename ...Args>
LQVec(const Reciprocal &lat, Args... args)

integer number of three-vector constructor (macroed as templates can’t be distinguished)

Fowarding constructor to let bArray deal with everything else

template<class R>
LQVec(const LQVec<R> &other)
Reciprocal get_lattice() const

Explicit copy constructor: required in gcc 9+ since we define our own operator= below:

Assignment operator reusing data if we can

template<class R>
bool samelattice(const LQVec<R> *vec) const
template<class R>
bool samelattice(const LDVec<R>*) const
template<class R>
bool starlattice(const LQVec<R>*) const
template<class R>
bool starlattice(const LDVec<R> *vec) const
template<class R>
bool samelattice(const LQVec<R> &vec) const
template<class R>
bool samelattice(const LDVec<R>&) const
template<class R>
bool starlattice(const LQVec<R>&) const
template<class R>
bool starlattice(const LDVec<R> &vec) const
template<typename ...A>
LQVec<T> view(A... args) const

Return a non-copying view into the LQVec.

template<typename ...A>
LQVec<T> extract(A... args) const

Return a copied subset of the LQVec.

bArray<T> get_hkl() const

Extract just the coordinates in units of the Reciprocal lattice (strip off the lattice information)

bArray<double> get_xyz() const

Extract the coordinates in an orthonormal frame with its first axis, x, along a*, its second, y, perpendicular with y⋅b*>0 , and it’s third forming the right-handed set z=x×y.

LDVec<double> star() const

Return the vector(s) expressed in units of the Direct lattice.

double dot(const size_t i, const size_t j) const

Determine the scalar product between two vectors in the object.

double norm(const size_t i) const

Determine the absolute length of a vector in the object.

LQVec<double> cross(const size_t i, const size_t j) const

Determine the cross product of two vectors in the object.

template<class R>
void binary_operation_check(const LQVec<R> &b) const
template<class R>
void binary_operation_check(const LDVec<R> &b) const
template<class R, template<class> class A, typename = typename std::enable_if<!std::is_base_of<LatVec, A<R>>::value>::type>
void binary_operation_check(const A<R>&) const
template<class R>
bool is(const LQVec<R> &that) const

Check whether a second LQVec is approximately the same as this object.

LQVec<int> round() const

Round all elements using std::round.

LQVec<int> floor() const

Find the floor of all elements using std::floor.

LQVec<int> ceil() const

Find the ceiling of all elements using std::ceil.

LQVec<T> decouple()

Public Static Functions

LQVec<T> from_invA(const Reciprocal &lat, const bArray<T> &vec, const int = 1)

Protected Functions

void check_array()