258 lines
8.3 KiB
Groff
258 lines
8.3 KiB
Groff
|
|
.TH "serif::dimensions::QuantityValue< Quantity >" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
||
|
|
.ad l
|
||
|
|
.nh
|
||
|
|
.SH NAME
|
||
|
|
serif::dimensions::QuantityValue< Quantity > \- This is the non derivative equivalent to \fBPartialDerivative\fP\&. This associates a dimension with a value and, if that value can be determined at compile time, can be decomposed to a transparent double through \&.\fBvalue()\fP
|
||
|
|
|
||
|
|
.SH SYNOPSIS
|
||
|
|
.br
|
||
|
|
.PP
|
||
|
|
.PP
|
||
|
|
\fR#include <quantities\&.hpp>\fP
|
||
|
|
.SS "Public Member Functions"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr \fBQuantityValue\fP (const double \fBvalue\fP) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr double \fBvalue\fP () const noexcept"
|
||
|
|
.br
|
||
|
|
.in -1c
|
||
|
|
.SS "Private Attributes"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "double \fBm_value\fP"
|
||
|
|
.br
|
||
|
|
.RI "Numeric value associated with the dimension of \fBQuantityValue\fP\&. "
|
||
|
|
.in -1c
|
||
|
|
.SS "Friends"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr bool \fBoperator==\fP (const \fBQuantityValue\fP &, const \fBQuantityValue\fP &) noexcept=default"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr \fBQuantityValue\fP \fBoperator+\fP (const \fBQuantityValue\fP &lhs, const \fBQuantityValue\fP &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr \fBQuantityValue\fP \fBoperator\-\fP (const \fBQuantityValue\fP &lhs, const \fBQuantityValue\fP &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<IsNumeric Scalar> constexpr \fBQuantityValue\fP \fBoperator*\fP (const \fBQuantityValue\fP &lhs, const Scalar rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<IsNumeric Scalar> constexpr \fBQuantityValue\fP \fBoperator*\fP (const Scalar lhs, const \fBQuantityValue\fP &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<IsNumeric Scalar> constexpr \fBQuantityValue\fP \fBoperator/\fP (const \fBQuantityValue\fP &lhs, const Scalar rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<IsNumeric Scalar> constexpr std::partial_ordering \fBoperator<=>\fP (const \fBQuantityValue\fP &lhs, const Scalar rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<IsNumeric Scalar> constexpr std::partial_ordering \fBoperator<=>\fP (const Scalar lhs, const \fBQuantityValue\fP &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr std::partial_ordering \fBoperator<=>\fP (const \fBQuantityValue\fP &lhs, const \fBQuantityValue\fP &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.in -1c
|
||
|
|
.SH "Detailed Description"
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity>
|
||
|
|
.br
|
||
|
|
class serif::dimensions::QuantityValue< Quantity >"This is the non derivative equivalent to \fBPartialDerivative\fP\&. This associates a dimension with a value and, if that value can be determined at compile time, can be decomposed to a transparent double through \&.\fBvalue()\fP
|
||
|
|
|
||
|
|
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIQuantity\fP Some valid \fBPhysicalQuantityType\fP\&. Note all the dimensions in \fBdimensions\&.hpp\fP are of type \fBPhysicalQuantity\fP\&. There should be no other dimensions in the code\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Constructor & Destructor Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> \fBserif::dimensions::QuantityValue\fP< Quantity >::QuantityValue (const double value)\fR [inline]\fP, \fR [explicit]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP"
|
||
|
|
|
||
|
|
.SH "Member Function Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> double \fBserif::dimensions::QuantityValue\fP< Quantity >::value () const\fR [inline]\fP, \fR [nodiscard]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP"
|
||
|
|
|
||
|
|
.SH "Friends And Related Symbol Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> template<IsNumeric Scalar> \fBQuantityValue\fP operator* (const \fBQuantityValue\fP< Quantity > & lhs, const Scalar rhs)\fR [friend]\fP"
|
||
|
|
@breif Overload of the * operator for a left quantity and some right numeric, scalar, value\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP A value satisfying \fBIsNumeric\fP
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP some quantity value
|
||
|
|
.br
|
||
|
|
\fIrhs\fP some scalar value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
some quantity value with the same type as lhs but with value = lhs\&.m_value * scalar
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> template<IsNumeric Scalar> \fBQuantityValue\fP operator* (const Scalar lhs, const \fBQuantityValue\fP< Quantity > & rhs)\fR [friend]\fP"
|
||
|
|
@breif Overload of the * operator for a right quantity and some left numeric, scalar, value\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP A value satisfying \fBIsNumeric\fP
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP some scalar value
|
||
|
|
.br
|
||
|
|
\fIrhs\fP some quantity value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
some quantity value with the same type as lhs but with value = scalar * lhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> \fBQuantityValue\fP operator+ (const \fBQuantityValue\fP< Quantity > & lhs, const \fBQuantityValue\fP< Quantity > & rhs)\fR [friend]\fP"
|
||
|
|
@breif overload of + operator for two quantities with the same \fBPhysicalQuantityType\fP
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP One Quantity
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Other Quantity
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
a new quantity with the same \fBPhysicalQuantityType\fP but with a value = lhs\&.m_value + rhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> \fBQuantityValue\fP operator\- (const \fBQuantityValue\fP< Quantity > & lhs, const \fBQuantityValue\fP< Quantity > & rhs)\fR [friend]\fP"
|
||
|
|
@breif overload of - operator for two quantities with the same \fBPhysicalQuantityType\fP
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP One Quantity
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Other Quantity
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
a new quantity with the same \fBPhysicalQuantityType\fP but with a value = lhs\&.m_value - rhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> template<IsNumeric Scalar> \fBQuantityValue\fP operator/ (const \fBQuantityValue\fP< Quantity > & lhs, const Scalar rhs)\fR [friend]\fP"
|
||
|
|
@breif Overload of the / operator for a left quantity and some right numeric, scalar, value\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP A value satisfying \fBIsNumeric\fP
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP some quantity value
|
||
|
|
.br
|
||
|
|
\fIrhs\fP some scalar value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
some quantity value with the same type as lhs but with value = lhs\&.m_value / scalar
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> std::partial_ordering operator<=> (const \fBQuantityValue\fP< Quantity > & lhs, const \fBQuantityValue\fP< Quantity > & rhs)\fR [friend]\fP"
|
||
|
|
@breif partial ordering overload to compare two quantity values of the same type
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP Some quantity value
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Other quantity value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
the partial ordering of lhs\&.m_value <=> rhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> template<IsNumeric Scalar> std::partial_ordering operator<=> (const \fBQuantityValue\fP< Quantity > & lhs, const Scalar rhs)\fR [friend]\fP"
|
||
|
|
@breif Partial ordering overload for some left quantity and right scalar
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP A value satisfying \fBIsNumeric\fP
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP some quantity value
|
||
|
|
.br
|
||
|
|
\fIrhs\fP some scalar value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
The partial ordering comparing lhs\&.m_value to scalar
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> template<IsNumeric Scalar> std::partial_ordering operator<=> (const Scalar lhs, const \fBQuantityValue\fP< Quantity > & rhs)\fR [friend]\fP"
|
||
|
|
@breif Partial ordering overload for some right quantity and left scalar
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP A value satisfying \fBIsNumeric\fP
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP some scalar value
|
||
|
|
.br
|
||
|
|
\fIrhs\fP some quantity value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
The partial ordering comparing scalar to lhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> bool operator== (const \fBQuantityValue\fP< Quantity > & , const \fBQuantityValue\fP< Quantity > & )\fR [friend]\fP"
|
||
|
|
@breif Default comparison operator for two QuantityValues\&. Note that there is an implicit requirement these be of the same specialization\&. E\&.g\&. each have the same \fBPhysicalQuantityType\fP Quantity type parameter\&. Because this is the default and this class has only one trivially comparable member this just checks if m_value == m_value\&.
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
true if the values in both are equal\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Member Data Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<PhysicalQuantityType Quantity> double \fBserif::dimensions::QuantityValue\fP< Quantity >::m_value\fR [private]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Numeric value associated with the dimension of \fBQuantityValue\fP\&.
|
||
|
|
|
||
|
|
.SH "Author"
|
||
|
|
.PP
|
||
|
|
Generated automatically by Doxygen for SERiF from the source code\&.
|