DryChem 1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
Loading...
Searching...
No Matches
basicMath.hpp File Reference
#include <cmath>
#include "cpp-units/types/physicalQuantity.hpp"

Go to the source code of this file.

Classes

struct  CppUnits::Math::details::PowImpl< Power, L, M, T, I, Th, N, J >
 
struct  CppUnits::Math::details::PowImpl< 0, L, M, T, I, Th, N, J >
 
struct  CppUnits::Math::details::InversePowImpl< Power, L, M, T, I, Th, N, J >
 

Namespaces

namespace  CppUnits
 
namespace  CppUnits::Math
 
namespace  CppUnits::Math::details
 Basic operations.
 

Macros

#define DECLARE_CMATH_FUNCTION(NAME)
 
#define DECLARE_DIMENSIONLESS_CMATH_FUNCTION(NAME)
 

Functions

template<int Power, int L, int M, int T, int I, int Th, int N, int J>
constexpr auto CppUnits::Math::pow (const PhysicalQuantity< Dimensionality< L, M, T, I, Th, N, J > > &physicalQuantity) noexcept
 
template<int L, int M, int T, int I, int Th, int N, int J, typename = std::enable_if_t<(L % 2 == 0) && (M % 2 == 0) && (T % 2 == 0) && (I % 2 == 0) && (Th % 2 == 0) && (N % 2 == 0) && (J % 2 == 0)>>
constexpr auto CppUnits::Math::sqrt (const PhysicalQuantity< Dimensionality< L, M, T, I, Th, N, J > > &physicalQuantity) noexcept
 
template<int L, int M, int T, int I, int Th, int N, int J, typename = std::enable_if_t<(L % 3 == 0) && (M % 3 == 0) && (T % 3 == 0) && (I % 3 == 0) && (Th % 3 == 0) && (N % 3 == 0) && (J % 3 == 0)>>
constexpr auto CppUnits::Math::cbrt (const PhysicalQuantity< Dimensionality< L, M, T, I, Th, N, J > > &physicalQuantity) noexcept
 

Macro Definition Documentation

◆ DECLARE_CMATH_FUNCTION

#define DECLARE_CMATH_FUNCTION ( NAME)
Value:
template<int L, int M, int T, int I, int Th, int N, int J> \
constexpr auto NAME(const PhysicalQuantity<Dimensionality<L, M, T, I, Th, N, J>>& physicalQuantity) noexcept \
{ \
return PhysicalQuantity<Dimensionality<L, M, T, I, Th, N, J>>(std::NAME(physicalQuantity.getMagnitude())); \
}

◆ DECLARE_DIMENSIONLESS_CMATH_FUNCTION

#define DECLARE_DIMENSIONLESS_CMATH_FUNCTION ( NAME)
Value:
template<int L, int M, int T, int I, int Th, int N, int J> \
constexpr auto NAME(const PhysicalQuantity<Dimensionality<L, M, T, I, Th, N, J>>& physicalQuantity) noexcept \
{ \
return PhysicalQuantity<Dimensionality<>>(std::NAME(physicalQuantity.getMagnitude())); \
}