SIRIUS 7.5.0
Electronic structure library and applications
Classes | Namespaces | Functions
r3.hpp File Reference

Simple classes and functions to work with vectors and matrices of the R^3 space. More...

Go to the source code of this file.

Classes

class  sirius::r3::vector< T >
 Simple implementation of 3d vector. More...
 
class  sirius::r3::matrix< T >
 Handling of a 3x3 matrix of numerical data types. More...
 

Namespaces

module  sirius
 Namespace of the SIRIUS library.
 
namespace  sirius::r3
 Work with 3D vectors and matrices.
 

Functions

template<typename T , typename U >
vector< decltype(T{}+U{})> sirius::r3::operator+ (vector< T > const &a, vector< U > const &b)
 
template<typename T , typename U >
vector< decltype(T{} - U{})> sirius::r3::operator- (vector< T > const &a, vector< U > const &b)
 
template<typename T , typename U >
std::enable_if_t< std::is_scalar< U >::value, vector< decltype(T{} *U{})> > sirius::r3::operator* (vector< T > const &vec, U p)
 
template<typename T , typename U >
std::enable_if_t< std::is_scalar< U >::value, vector< decltype(T{} *U{})> > sirius::r3::operator* (U p, vector< T > const &vec)
 
template<typename T , typename U >
std::enable_if_t< std::is_scalar< U >::value, vector< decltype(T{} *U{})> > sirius::r3::operator/ (vector< T > const &vec, U p)
 
template<typename T , typename U >
auto sirius::r3::dot (vector< T > const a, vector< U > const b) -> decltype(T{} *U{})
 
template<typename T >
auto sirius::r3::cross (vector< T > const a, vector< T > const b)
 
template<typename T >
std::ostream & sirius::r3::operator<< (std::ostream &out, r3::vector< T > const &v)
 
template<typename T , typename U >
std::enable_if_t< std::is_scalar< U >::value, matrix< decltype(T{} *U{})> > sirius::r3::operator* (matrix< T > const &a__, U p__)
 Multiply matrix by a scalar number. More...
 
template<typename T , typename U >
std::enable_if_t< std::is_scalar< U >::value, matrix< decltype(T{} *U{})> > sirius::r3::operator* (U p__, matrix< T > const &a__)
 
bool sirius::r3::operator== (matrix< int > const &a__, matrix< int > const &b__)
 
template<typename T , typename U >
auto sirius::r3::dot (matrix< T > const &a__, matrix< U > const &b__)
 Multiply two matrices. More...
 
template<typename T , typename U >
auto sirius::r3::dot (matrix< T > const &m__, vector< U > const &b__)
 Matrix-vector multiplication. More...
 
template<typename T , typename U >
auto sirius::r3::dot (vector< U > const &b__, matrix< T > const &m__)
 Vector-matrix multiplication. More...
 
template<typename T >
auto sirius::r3::transpose (matrix< T > src)
 Return transpose of the matrix. More...
 
template<typename T >
auto sirius::r3::inverse_aux (matrix< T > src)
 
auto sirius::r3::inverse (matrix< int > src)
 Return inverse of the integer matrix. More...
 
template<typename T >
auto sirius::r3::inverse (matrix< T > src)
 Return inverse of the matrix. More...
 
template<typename T >
std::ostream & sirius::r3::operator<< (std::ostream &out, matrix< T > const &v)
 
auto sirius::r3::reduce_coordinates (vector< double > coord__)
 Reduce the coordinates to the first unit cell. More...
 
auto sirius::r3::find_translations (double radius__, matrix< double > const &lattice_vectors__)
 Find supercell that circumscribes the sphere with a given radius. More...
 
auto sirius::r3::spherical_coordinates (vector< double > vc)
 Transform Cartesian coordinates [x,y,z] to spherical coordinates [r,theta,phi]. More...
 

Detailed Description

Simple classes and functions to work with vectors and matrices of the R^3 space.

Definition in file r3.hpp.