Template Class LDVec

Inheritance Relationships

Base Types

Class Documentation

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

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

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

Public Functions

LDVec(const Direct &lat = Direct())
template<typename ...Args>
LDVec(const Direct &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>
LDVec(const LDVec<R> &other)
Direct get_lattice() const
template<class R>
bool samelattice(const LDVec<R> *vec) const
template<class R>
bool samelattice(const LQVec<R>*) const
template<class R>
bool starlattice(const LDVec<R>*) const
template<class R>
bool starlattice(const LQVec<R> *vec) const
template<class R>
bool samelattice(const LDVec<R> &vec) const
template<class R>
bool samelattice(const LQVec<R>&) const
template<class R>
bool starlattice(const LDVec<R>&) const
template<class R>
bool starlattice(const LQVec<R> &vec) const
template<typename ...A>
LDVec<T> view(A... args) const

Return a non-copying view into the LDVec.

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

Return a copied subset of the LDVec.

bArray<T> get_hkl() const

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

bArray<double> get_xyz() const

Extract the coordinates in an orthonormal frame.

LQVec<double> star() const

Return the vector(s) expressed in units of the Reciprocal 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.

LDVec<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 LDVec<R> &b) const
template<class R>
void binary_operation_check(const LQVec<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 LDVec<R> &that)

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

LDVec<int> round() const

Round all elements using std::round.

LDVec<int> floor() const

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

LDVec<int> ceil() const

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

LDVec<T> decouple()

Protected Functions

void check_array()