287 lines
13 KiB
Groff
287 lines
13 KiB
Groff
|
|
.TH "serif::dimensions::PartialDerivative< OutputQuantity, InputQuantity >" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
||
|
|
.ad l
|
||
|
|
.nh
|
||
|
|
.SH NAME
|
||
|
|
serif::dimensions::PartialDerivative< OutputQuantity, InputQuantity > \- Class to represent a compile time derivative relation between two quantities\&. Note that this class does not, in fact cannot, compute any derivatives itself\&. Rather, this is a way for the compiler to understand higher level mathematical relations\&. Unless you are really in the weeds of the development team you will likely not need to interact with this directly\&. Further note that this class does include (unlike the more basic dimension system) some basic dimensional analysis\&. Specifically, there are some overloaded operators that allow for certain specializations of \fBPartialDerivative\fP to operate on one and other conditioned on what their input and output types are\&. This does not do any thing like convert area to length^2\&. However, it will do more basic things like ensure that you can only add two partials which agree on their dimensions exactly\&. Or that while you can multiple a partial by any scalar, you cannot multiply arbitrary partials\&.
|
||
|
|
|
||
|
|
.SH SYNOPSIS
|
||
|
|
.br
|
||
|
|
.PP
|
||
|
|
.PP
|
||
|
|
\fR#include <partial\&.hpp>\fP
|
||
|
|
.SS "Public Member Functions"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr \fBPartialDerivative\fP (const double \fBvalue\fP) noexcept"
|
||
|
|
.br
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr double \fBvalue\fP () const noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Get the underlying value as a compile time constant if possible\&. This allows the compiler, where the constructor may be determined at compile time, to fully optimize \fBPartialDerivative\fP operations as if they were doubles\&. "
|
||
|
|
.in -1c
|
||
|
|
.SS "Private Attributes"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "double \fBm_value\fP"
|
||
|
|
.br
|
||
|
|
.RI "Numeric value associated with the partial\&. If this is known at compile time then the compiler can optimize operations with partial\&.value() to be equivalent to compile time double operations\&. "
|
||
|
|
.in -1c
|
||
|
|
.SS "Friends"
|
||
|
|
|
||
|
|
.in +1c
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr \fBPartialDerivative\fP< OutputQuantity, InputQuantity > \fBoperator+\fP (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Overload the + operator between two partials which share the exact same input and output types\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr \fBPartialDerivative\fP< OutputQuantity, InputQuantity > \fBoperator\-\fP (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Overload the - operator between two partials which share the exact same input and output types\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<utils::misc::concepts::IsNumeric Scalar> constexpr \fBPartialDerivative\fP< OutputQuantity, InputQuantity > \fBoperator*\fP (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &lhs, const Scalar &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Overload of the * operator for a left partial and a right scalar and output types\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<utils::misc::concepts::IsNumeric Scalar> constexpr \fBPartialDerivative\fP< OutputQuantity, InputQuantity > \fBoperator*\fP (const Scalar &lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Overload of the * operator for a right partial and a left scalar and output types\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<utils::misc::concepts::IsNumeric Scalar> constexpr \fBPartialDerivative\fP< OutputQuantity, InputQuantity > \fBoperator/\fP (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &lhs, const Scalar &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Overload of the / operator for a left partial and a right scalar and output types\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<utils::misc::concepts::IsNumeric Scalar> constexpr std::partial_ordering \fBoperator<=>\fP (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &lhs, Scalar rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Partial ordering overload to compare a left partial and a right scalar\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "template<utils::misc::concepts::IsNumeric Scalar> constexpr std::partial_ordering \fBoperator<=>\fP (Scalar lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Partial ordering overload to compare a right partial and a left scalar\&. "
|
||
|
|
.ti -1c
|
||
|
|
.RI "constexpr std::partial_ordering \fBoperator<=>\fP (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > &rhs) noexcept"
|
||
|
|
.br
|
||
|
|
.RI "Partial ordering comparing two partials with exactly the same input and output types\&. "
|
||
|
|
.in -1c
|
||
|
|
.SH "Detailed Description"
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity>
|
||
|
|
.br
|
||
|
|
class serif::dimensions::PartialDerivative< OutputQuantity, InputQuantity >"Class to represent a compile time derivative relation between two quantities\&. Note that this class does not, in fact cannot, compute any derivatives itself\&. Rather, this is a way for the compiler to understand higher level mathematical relations\&. Unless you are really in the weeds of the development team you will likely not need to interact with this directly\&. Further note that this class does include (unlike the more basic dimension system) some basic dimensional analysis\&. Specifically, there are some overloaded operators that allow for certain specializations of \fBPartialDerivative\fP to operate on one and other conditioned on what their input and output types are\&. This does not do any thing like convert area to length^2\&. However, it will do more basic things like ensure that you can only add two partials which agree on their dimensions exactly\&. Or that while you can multiple a partial by any scalar, you cannot multiply arbitrary partials\&.
|
||
|
|
|
||
|
|
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIOutputQuantity\fP
|
||
|
|
.br
|
||
|
|
\fIInputQuantity\fP
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Constructor & Destructor Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> \fBserif::dimensions::PartialDerivative\fP< OutputQuantity, InputQuantity >::PartialDerivative (const double value)\fR [inline]\fP, \fR [explicit]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP"
|
||
|
|
|
||
|
|
.SH "Member Function Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> double \fBserif::dimensions::PartialDerivative\fP< OutputQuantity, InputQuantity >::value () const\fR [inline]\fP, \fR [nodiscard]\fP, \fR [constexpr]\fP, \fR [noexcept]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Get the underlying value as a compile time constant if possible\&. This allows the compiler, where the constructor may be determined at compile time, to fully optimize \fBPartialDerivative\fP operations as if they were doubles\&.
|
||
|
|
.PP
|
||
|
|
\fBNote\fP
|
||
|
|
.RS 4
|
||
|
|
calling value gets the underlying numeric value directly thereby bypassing the limitations on what a valid operation are (e\&.g\&. what the operator overloads enforce)\&.
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
m_value: This is whatever was passed at constructor time since there is no way to modify this value after construction without some truly horrific C++ tricks
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Friends And Related Symbol Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> template<utils::misc::concepts::IsNumeric Scalar> \fBPartialDerivative\fP< OutputQuantity, InputQuantity > operator* (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & lhs, const Scalar & rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Overload of the * operator for a left partial and a right scalar and output types\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP Any value satisfying the \fBIsNumeric\fP concept (integral types and float types)
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP Partial with some input and some output type
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Some numeric quantity
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
A new partial with the same input and output types where m_value = lhs\&.m_value * rhs
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> template<utils::misc::concepts::IsNumeric Scalar> \fBPartialDerivative\fP< OutputQuantity, InputQuantity > operator* (const Scalar & lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Overload of the * operator for a right partial and a left scalar and output types\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP Any value satisfying the \fBIsNumeric\fP concept (integral types and float types)
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP Some numeric quantity
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Partial with some input and some output type
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
A new partial with the same input and output types where m_value = lhs * rhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> \fBPartialDerivative\fP< OutputQuantity, InputQuantity > operator+ (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Overload the + operator between two partials which share the exact same input and output types\&.
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP One partial
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Other Partial
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
A new partial with the same input and output types where m_value = lhs\&.m_value + rhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> \fBPartialDerivative\fP< OutputQuantity, InputQuantity > operator\- (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Overload the - operator between two partials which share the exact same input and output types\&.
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP One partial
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Other Partial
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
A new partial with the same input and output types where m_value = lhs\&.m_value - rhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> template<utils::misc::concepts::IsNumeric Scalar> \fBPartialDerivative\fP< OutputQuantity, InputQuantity > operator/ (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & lhs, const Scalar & rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Overload of the / operator for a left partial and a right scalar and output types\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP Any value satisfying the \fBIsNumeric\fP concept (integral types and float types)
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP Partial with some input and some output type
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Some numeric quantity
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
A new partial with the same input and output types where m_value = lhs\&.m_value / rhs
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> std::partial_ordering operator<=> (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Partial ordering comparing two partials with exactly the same input and output types\&.
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP Some Partial
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Other Partial
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
Partial ordering comparing lhs\&.m_value to rhs\&.m_value
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> template<utils::misc::concepts::IsNumeric Scalar> std::partial_ordering operator<=> (const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & lhs, Scalar rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Partial ordering overload to compare a left partial and a right scalar\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP Any value satisfying the \fBIsNumeric\fP concept (integral types and float types)
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP Some numeric quantity
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Some partial with an input and output type
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
partial ordering comparing rhs\&.m_value to lhs
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> template<utils::misc::concepts::IsNumeric Scalar> std::partial_ordering operator<=> (Scalar lhs, const \fBPartialDerivative\fP< OutputQuantity, InputQuantity > & rhs)\fR [friend]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Partial ordering overload to compare a right partial and a left scalar\&.
|
||
|
|
.PP
|
||
|
|
\fBTemplate Parameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIScalar\fP Any value satisfying the \fBIsNumeric\fP concept (integral types and float types)
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBParameters\fP
|
||
|
|
.RS 4
|
||
|
|
\fIlhs\fP Some numeric quantity
|
||
|
|
.br
|
||
|
|
\fIrhs\fP Some partial with an input and output type
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
\fBReturns\fP
|
||
|
|
.RS 4
|
||
|
|
partial ordering comparing rhs\&.m_value to lhs
|
||
|
|
.RE
|
||
|
|
.PP
|
||
|
|
|
||
|
|
.SH "Member Data Documentation"
|
||
|
|
.PP
|
||
|
|
.SS "template<ThermodynamicQuantityType OutputQuantity, ThermodynamicQuantityType InputQuantity> double \fBserif::dimensions::PartialDerivative\fP< OutputQuantity, InputQuantity >::m_value\fR [private]\fP"
|
||
|
|
|
||
|
|
.PP
|
||
|
|
Numeric value associated with the partial\&. If this is known at compile time then the compiler can optimize operations with partial\&.value() to be equivalent to compile time double operations\&.
|
||
|
|
|
||
|
|
.SH "Author"
|
||
|
|
.PP
|
||
|
|
Generated automatically by Doxygen for SERiF from the source code\&.
|