units
Use physical dimensions at compile-time or run-time.
Classes | Namespaces | Typedefs | Functions | Variables
dimval.hpp File Reference

Definition of vnix::units::dimval, descendants, and typedefs. More...

#include <cmath>
#include <vnix/units/dim.hpp>
#include <vnix/units/dyndim-base.hpp>
#include <vnix/units/number.hpp>
#include <vnix/units/statdim-base.hpp>
Include dependency graph for dimval.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vnix::units::dimval< T, B >
 Model of a physically dimensioned quantity. More...
 
class  vnix::units::basic_dyndim< T >
 Model of a dynamically dimensioned physical quantity. More...
 
class  vnix::units::basic_statdim< D, T >
 Model of a statically dimensioned physical quantity. More...
 
class  vnix::units::dimval< T, B >
 Model of a physically dimensioned quantity. More...
 
class  vnix::units::basic_dyndim< T >
 Model of a dynamically dimensioned physical quantity. More...
 
class  vnix::units::basic_statdim< D, T >
 Model of a statically dimensioned physical quantity. More...
 
class  vnix::units::basic_statdim< nul_code, T >
 Specialization of basic_statdim for dimensionless quantity. More...
 

Namespaces

 vnix
 Thomas E. Vaughan's public software.
 
 vnix::units
 Classes and functions supporting a model of physically dimensioned quantities.
 

Typedefs

template<typename OT >
using vnix::units::otest = typename number< OT >::test
 Integer typedef defined by number<OT> only if OT be an acceptable scalar-type. More...
 

Functions

template<typename T >
constexpr auto vnix::units::invert (T v)
 Return the reciprocal of an instance of type T. More...
 
template<typename S , int R, int C, int OPT, int MR, int MC>
constexpr auto vnix::units::invert (Eigen::Matrix< S, R, C, OPT, MR, MC > const &m)
 Specialization of invert() for Eigen::Matrix. More...
 
template<typename OT , typename T , typename B , otest< OT > = 0>
constexpr auto vnix::units::operator/ (OT const &d, dimval< T, B > const &v)
 Invert dimensioned value by dividing it into number. More...
 
template<typename T , typename B , otest< T > = 0>
constexpr auto vnix::units::sqrt (dimval< T, B > const &v)
 Take the squre root of a dimensioned quantity. More...
 
template<int64_t PN, int64_t PD = 1, typename T , typename B >
constexpr auto vnix::units::pow (dimval< T, B > const &v)
 Raise dimensioned value to rational power. More...
 
template<typename T , typename B >
constexpr auto vnix::units::pow (dimval< T, B > const &v, dim::rat p)
 Raise dimensioned value to rational power. More...
 

Variables

constexpr auto vnix::units::nul_code = nul_dim.encode()
 

Detailed Description

Definition of vnix::units::dimval, descendants, and typedefs.

License: BSD Three-Clause; see LICENSE.

Definition in file dimval.hpp.