Phyth v0.1.0
A dimensional safe C++ header-only mechanics and electromagnetics simulation library.
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Variables
Unit.hpp File Reference
#include <ratio>
Include dependency graph for Unit.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Phyth::Unit< DimT, Scale, TagT >
 Physical unit with dimension and scale factor relative to SI base. More...
 
struct  Phyth::is_unit< T >
 Trait: check if a type is a Unit instantiation. More...
 
struct  Phyth::is_unit< Unit< DimT, Scale, TagT > >
 
struct  Phyth::UnitMulBin< U1, U2 >
 
struct  Phyth::UnitDivBin< U1, U2 >
 
struct  Phyth::FoldLeft< F, T >
 
struct  Phyth::FoldLeft< F, T1, T2, Rest... >
 
struct  Phyth::UnitRec< U, Ratio >
 

Namespaces

namespace  Phyth
 

Typedefs

template<template< typename, typename > class F, typename... Ts>
using Phyth::FoldLeftT = typename FoldLeft< F, Ts... >::type
 
template<typename... Us>
using Phyth::UnitMulT = FoldLeftT< UnitMulBin, Us... >
 
template<typename... Us>
using Phyth::UnitDivT = FoldLeftT< UnitDivBin, Us... >
 
template<typename U , typename Ratio = std::ratio<1>>
using Phyth::UnitRecT = typename UnitRec< U, Ratio >::type
 

Variables

template<typename T >
constexpr bool Phyth::is_unit_v = is_unit<T>::value
 

Class Documentation

◆ Phyth::UnitMulBin

struct Phyth::UnitMulBin
template<typename U1, typename U2>
struct Phyth::UnitMulBin< U1, U2 >

Definition at line 82 of file Unit.hpp.

Class Members
typedef Unit< DimMulT< typename DimensionT, typename DimensionT >, typename type > type

◆ Phyth::UnitDivBin

struct Phyth::UnitDivBin
template<typename U1, typename U2>
struct Phyth::UnitDivBin< U1, U2 >

Definition at line 90 of file Unit.hpp.

Class Members
typedef Unit< DimDivT< typename DimensionT, typename DimensionT >, typename type > type

◆ Phyth::FoldLeft< F, T >

struct Phyth::FoldLeft< F, T >
template<template< typename, typename > class F, typename T>
struct Phyth::FoldLeft< F, T >

Definition at line 101 of file Unit.hpp.

Class Members
typedef T type

◆ Phyth::FoldLeft< F, T1, T2, Rest... >

struct Phyth::FoldLeft< F, T1, T2, Rest... >
template<template< typename, typename > class F, typename T1, typename T2, typename... Rest>
struct Phyth::FoldLeft< F, T1, T2, Rest... >

Definition at line 107 of file Unit.hpp.

Class Members
typedef typename type, Rest... >::type type

◆ Phyth::UnitRec

struct Phyth::UnitRec
template<typename U, typename Ratio>
struct Phyth::UnitRec< U, Ratio >

Definition at line 125 of file Unit.hpp.

Class Members
typedef Unit< DimDivT< Dimensionless, typename DimensionT >, ratio_multiply< typename ScaleT, Ratio > > type