Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PhQ::DimensionlessPlanarVector< NumericType > Class Template Reference

Abstract base class that represents any dimensionless planar vector physical quantity. Such a physical quantity is composed only of a value where the value is a two-dimensional planar vector in the XY plane. Such a physical quantity has no unit of measure and no dimension set. More...

#include "DimensionlessPlanarVector.hpp"

Public Member Functions

constexpr const PhQ::PlanarVector< NumericType > & Value () const noexcept
 Value of this physical quantity. More...
 
std::string Print () const
 Prints this physical quantity as a string. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. More...
 

Static Public Member Functions

static constexpr PhQ::Dimensions Dimensions ()
 Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set. More...
 

Protected Member Functions

 DimensionlessPlanarVector ()=default
 Default constructor. Constructs a dimensionless planar vector physical quantity with an uninitialized value. More...
 
constexpr DimensionlessPlanarVector (const NumericType x, const NumericType y)
 Constructor. Constructs a dimensionless planar vector physical quantity whose value has the given x, y, and z Cartesian components. More...
 
constexpr DimensionlessPlanarVector (const std::array< NumericType, 2 > &x_y)
 Constructor. Constructs a dimensionless planar vector physical quantity from a given array representing its value's x and y Cartesian components. More...
 
constexpr DimensionlessPlanarVector (const PhQ::PlanarVector< NumericType > &value)
 Constructor. Constructs a dimensionless planar vector physical quantity with a given value. More...
 
 ~DimensionlessPlanarVector () noexcept=default
 Destructor. Destroys this dimensionless planar vector physical quantity. More...
 
constexpr DimensionlessPlanarVector (const DimensionlessPlanarVector< NumericType > &other)=default
 Copy constructor. Constructs a dimensionless planar vector physical quantity by copying another one. More...
 
template<typename OtherNumericType >
constexpr DimensionlessPlanarVector (const DimensionlessPlanarVector< OtherNumericType > &other)
 Copy constructor. Constructs a dimensionless planar vector physical quantity by copying another one. More...
 
constexpr DimensionlessPlanarVector (DimensionlessPlanarVector< NumericType > &&other) noexcept=default
 Move constructor. Constructs a dimensionless planar vector physical quantity by moving another one. More...
 
constexpr DimensionlessPlanarVector< NumericType > & operator= (const DimensionlessPlanarVector< NumericType > &other)=default
 Copy assignment operator. Assigns this dimensionless planar vector physical quantity by copying another one. More...
 
template<typename OtherNumericType >
constexpr DimensionlessPlanarVector< NumericType > & operator= (const DimensionlessPlanarVector< OtherNumericType > &other)
 Copy assignment operator. Assigns this dimensionless planar vector physical quantity by copying another one. More...
 
constexpr DimensionlessPlanarVector< NumericType > & operator= (DimensionlessPlanarVector< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this dimensionless planar vector physical quantity by moving another one. More...
 

Protected Attributes

PhQ::PlanarVector< NumericType > value
 Value of this physical quantity. More...
 

Detailed Description

template<typename NumericType = double>
class PhQ::DimensionlessPlanarVector< NumericType >

Abstract base class that represents any dimensionless planar vector physical quantity. Such a physical quantity is composed only of a value where the value is a two-dimensional planar vector in the XY plane. Such a physical quantity has no unit of measure and no dimension set.

Template Parameters
NumericTypeFloating-point numeric type: float, double, or long double. Defaults to double if unspecified.

Definition at line 47 of file DimensionlessPlanarVector.hpp.

Constructor & Destructor Documentation

◆ DimensionlessPlanarVector() [1/7]

template<typename NumericType = double>
PhQ::DimensionlessPlanarVector< NumericType >::DimensionlessPlanarVector ( )
protecteddefault

Default constructor. Constructs a dimensionless planar vector physical quantity with an uninitialized value.

◆ DimensionlessPlanarVector() [2/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessPlanarVector< NumericType >::DimensionlessPlanarVector ( const NumericType  x,
const NumericType  y 
)
inlineconstexprprotected

Constructor. Constructs a dimensionless planar vector physical quantity whose value has the given x, y, and z Cartesian components.

Definition at line 91 of file DimensionlessPlanarVector.hpp.

◆ DimensionlessPlanarVector() [3/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessPlanarVector< NumericType >::DimensionlessPlanarVector ( const std::array< NumericType, 2 > &  x_y)
inlineexplicitconstexprprotected

Constructor. Constructs a dimensionless planar vector physical quantity from a given array representing its value's x and y Cartesian components.

Definition at line 95 of file DimensionlessPlanarVector.hpp.

◆ DimensionlessPlanarVector() [4/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessPlanarVector< NumericType >::DimensionlessPlanarVector ( const PhQ::PlanarVector< NumericType > &  value)
inlineexplicitconstexprprotected

Constructor. Constructs a dimensionless planar vector physical quantity with a given value.

Definition at line 100 of file DimensionlessPlanarVector.hpp.

◆ ~DimensionlessPlanarVector()

template<typename NumericType = double>
PhQ::DimensionlessPlanarVector< NumericType >::~DimensionlessPlanarVector ( )
protecteddefaultnoexcept

Destructor. Destroys this dimensionless planar vector physical quantity.

◆ DimensionlessPlanarVector() [5/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessPlanarVector< NumericType >::DimensionlessPlanarVector ( const DimensionlessPlanarVector< NumericType > &  other)
constexprprotecteddefault

Copy constructor. Constructs a dimensionless planar vector physical quantity by copying another one.

◆ DimensionlessPlanarVector() [6/7]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr PhQ::DimensionlessPlanarVector< NumericType >::DimensionlessPlanarVector ( const DimensionlessPlanarVector< OtherNumericType > &  other)
inlineexplicitconstexprprotected

Copy constructor. Constructs a dimensionless planar vector physical quantity by copying another one.

Template Parameters
OtherNumericTypeFloating-point numeric type of the other physical quantity. Deduced automatically.

Definition at line 116 of file DimensionlessPlanarVector.hpp.

◆ DimensionlessPlanarVector() [7/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessPlanarVector< NumericType >::DimensionlessPlanarVector ( DimensionlessPlanarVector< NumericType > &&  other)
constexprprotecteddefaultnoexcept

Move constructor. Constructs a dimensionless planar vector physical quantity by moving another one.

Member Function Documentation

◆ Dimensions()

template<typename NumericType = double>
static constexpr PhQ::Dimensions PhQ::DimensionlessPlanarVector< NumericType >::Dimensions ( )
inlinestaticconstexpr

Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set.

Definition at line 55 of file DimensionlessPlanarVector.hpp.

References PhQ::Dimensionless.

◆ JSON()

template<typename NumericType = double>
std::string PhQ::DimensionlessPlanarVector< NumericType >::JSON ( ) const
inline

Serializes this physical quantity as a JSON message.

Definition at line 70 of file DimensionlessPlanarVector.hpp.

References PhQ::DimensionlessPlanarVector< NumericType >::value.

◆ operator=() [1/3]

template<typename NumericType = double>
constexpr DimensionlessPlanarVector<NumericType>& PhQ::DimensionlessPlanarVector< NumericType >::operator= ( const DimensionlessPlanarVector< NumericType > &  other)
constexprprotecteddefault

Copy assignment operator. Assigns this dimensionless planar vector physical quantity by copying another one.

◆ operator=() [2/3]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr DimensionlessPlanarVector<NumericType>& PhQ::DimensionlessPlanarVector< NumericType >::operator= ( const DimensionlessPlanarVector< OtherNumericType > &  other)
inlineconstexprprotected

Copy assignment operator. Assigns this dimensionless planar vector physical quantity by copying another one.

Template Parameters
OtherNumericTypeFloating-point numeric type of the other physical quantity. Deduced automatically.

Definition at line 135 of file DimensionlessPlanarVector.hpp.

References PhQ::DimensionlessPlanarVector< NumericType >::Value(), and PhQ::DimensionlessPlanarVector< NumericType >::value.

◆ operator=() [3/3]

template<typename NumericType = double>
constexpr DimensionlessPlanarVector<NumericType>& PhQ::DimensionlessPlanarVector< NumericType >::operator= ( DimensionlessPlanarVector< NumericType > &&  other)
constexprprotecteddefaultnoexcept

Move assignment operator. Assigns this dimensionless planar vector physical quantity by moving another one.

◆ Print()

template<typename NumericType = double>
std::string PhQ::DimensionlessPlanarVector< NumericType >::Print ( ) const
inline

Prints this physical quantity as a string.

Definition at line 65 of file DimensionlessPlanarVector.hpp.

References PhQ::DimensionlessPlanarVector< NumericType >::value.

Referenced by PhQ::operator<<().

◆ Value()

template<typename NumericType = double>
constexpr const PhQ::PlanarVector<NumericType>& PhQ::DimensionlessPlanarVector< NumericType >::Value ( ) const
inlineconstexprnoexcept

◆ XML()

template<typename NumericType = double>
std::string PhQ::DimensionlessPlanarVector< NumericType >::XML ( ) const
inline

Serializes this physical quantity as an XML message.

Definition at line 75 of file DimensionlessPlanarVector.hpp.

References PhQ::DimensionlessPlanarVector< NumericType >::value.

◆ YAML()

template<typename NumericType = double>
std::string PhQ::DimensionlessPlanarVector< NumericType >::YAML ( ) const
inline

Serializes this physical quantity as a YAML message.

Definition at line 80 of file DimensionlessPlanarVector.hpp.

References PhQ::DimensionlessPlanarVector< NumericType >::value.

Member Data Documentation

◆ value

template<typename NumericType = double>
PhQ::PlanarVector<NumericType> PhQ::DimensionlessPlanarVector< NumericType >::value
protected

The documentation for this class was generated from the following file: