19#include "wuzp/core/internal/powers.hpp"
41template <AnyValuesWrapper ValuesT_, AnyUnitMatrix UnitsT_>
46 using ValueT =
typename ValuesT::ValueT;
55 template <
typename T0,
typename... Ts>
70 template <
int RowIdV_,
int ColIdV_>
89 auto get(
const int id)
const
92 return get(internal::vectorElementRowId<ThisT>(
id), internal::vectorElementColId<ThisT>(
id));
95 template <
typename ValueT_,
typename UnitT_>
102 template <
int RowIdV_,
int ColIdV_,
typename ValueT_,
typename UnitT_>
104 static_assert(std::is_same<typename Element<UnitsT, RowIdV_, ColIdV_>::type, UnitT_>::value,
"Units do not match.");
110 template <
int IdV_,
typename ValueT_,
typename UnitT_>
117 template <
typename ValueT_,
typename UnitT_>
120 static_assert(std::is_same<typename Element<UnitsT, 0, 0>::type, UnitT_>::value,
"Units do not match.");
121 values_.set(rowId, colId, quantity.
getValue());
126 template <
typename ValueT_,
typename UnitT_>
130 set(internal::vectorElementRowId<ThisT>(
id), internal::vectorElementColId<ThisT>(
id), quantity);
139 template <
typename ValuesOtherT_>
147 template <
typename ValueOtherT_>
170 template <
typename ValuesOtherT_,
typename UnitsOtherT_>
173 static_assert(std::is_same<UnitsT, UnitsOtherT_>::value,
"Units do not match.");
174 return values_.isApprox(other.
getValues(), precision);
179 template <
int BlockRowIdV_,
int BlockColIdV_,
int BlockRowsV_,
int BlockColsV_>
182 values_.template getBlock<BlockRowIdV_, BlockColIdV_, BlockRowsV_, BlockColsV_>());
187 template <
typename ValuesOtherT_,
typename UnitsOtherT_>
190 values_.innerProduct(other.
getValues())};
193 template <
typename ValuesOtherT_,
typename UnitsOtherT_>
196 values_.outerProduct(other.
getValues())};
199 template <
typename ValuesOtherT_,
typename UnitsOtherT_>
205 template <
typename ValuesOtherT_,
typename UnitsOtherT_>
208 values_.crossProduct(other.
getValues())};
233 constexpr int shape =
static_cast<int>(rows < cols) -
static_cast<int>(rows > cols);
234 return internal::PseudoInverse<shape>::value(*
this);
256 template <
typename ValuesOtherT_,
typename UnitsOtherT_>
267 template <
typename... QuantityValueT_,
typename... QuantityUnitsT_>
270 static_assert(std::is_same<std::tuple<QuantityUnitsT_...>,
typename GetTypes<UnitsT>::type>::value,
"Units do not match.");
273 template <
typename... Ts>
279template <
typename ValuesT_,
typename UnitsT_,
typename ValuesOtherT_,
typename UnitsOtherT_>
283 static constexpr bool UnitsMatchV = std::is_same_v<UnitsT_, UnitsOtherT_>;
287template <
typename ValuesT_,
typename UnitsT_,
typename... Ts>
290 template <
typename T>
291 struct IsQuantity : std::false_type {};
292 template <
typename ValueT_,
typename UnitT_>
293 struct IsQuantity<
Quantity<ValueT_, UnitT_>> : std::true_type {};
294 using first = std::decay_t<std::tuple_element_t<0, std::tuple<Ts...>>>;
306template <
typename ValuesT_,
typename UnitsT_>
311template <
typename ValuesT_,
typename UnitsT_>
317template <
typename ValuesT_,
typename UnitsT_>
322template <
typename ValuesT_,
typename UnitsT_>
327template <
typename ValuesT_,
typename UnitsT_>
332template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
337template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
342template <
typename ValuesT_,
typename UnitsT_>
347template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
352template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
357template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
362template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
367template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
372template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValueRhsT_,
typename UnitRhsT_>
378template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
384template <
typename ValuesT_,
typename UnitsT_,
typename ExponentT_>
389template <
typename ValuesT_,
typename UnitsT_>
394template <
typename ValuesT_,
typename UnitsT_,
int ElementRowIdV_,
int ElementColIdV_>
399template <
typename ValuesT_,
typename UnitsT_>
406template <
typename ValuesT_,
typename UnitsT_>
411template <
typename ValuesT_,
typename UnitsT_>
416template <
typename ValuesT_,
typename UnitsT_,
int BlockRowIdV_,
int BlockColIdV_,
int BlockRowsV_,
int BlockColsV_>
417struct Block<
Quantities<ValuesT_, UnitsT_>, BlockRowIdV_, BlockColIdV_, BlockRowsV_, BlockColsV_> {
422template <
typename ValuesT_,
typename UnitsT_>
435template <
typename ValuesT_, ArithmeticValue ScalarT_>
436auto toDimensionlessQuantity(
const ScalarT_ scalar) {
437 using ValueT =
typename ValuesT_::ValueT;
439 "The common type of the scalar and the value type is not the value type, e.g. a double scalar with int values.");
441 static_cast<ValueT
>(scalar));
446template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
451template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
453 return sum(lhs, rhs);
456template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
461template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
466template <
typename ValuesT_,
typename UnitsT_>
470template <
typename ValuesT_,
typename UnitsT_>
475template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValueRhsT_>
478 return product(lhs, internal::toDimensionlessQuantity<ValuesLhsT_>(rhs));
480template <
typename ValueLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
484template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename MatrixSizeRhsT_,
typename ValueRhsT_,
typename ImplementationRhsT_>
490template <
typename MatrixSizeLhsT_,
typename ValueLhsT_,
typename ImplementationLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
497template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
502template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValueRhsT_>
506template <
typename ValueLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
510template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename MatrixSizeRhsT_,
typename ValueRhsT_,
typename ImplementationRhsT_>
514template <
typename MatrixSizeLhsT_,
typename ValueLhsT_,
typename ImplementationLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
518template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
523template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
528template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
537struct PseudoInverse<1> {
538 template <
typename QuantitiesT_>
539 static auto value(
const QuantitiesT_& matrix) {
540 const auto transpose = matrix.transpose();
547struct PseudoInverse<-1> {
548 template <
typename QuantitiesT_>
549 static auto value(
const QuantitiesT_& matrix) {
550 const auto transpose = matrix.transpose();
557struct PseudoInverse<0> {
558 template <
typename QuantitiesT_>
559 static auto value(
const QuantitiesT_& matrix) {
560 return matrix.inverse();
566template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValueRhsT_>
569 return division(lhs, internal::toDimensionlessQuantity<ValuesLhsT_>(rhs));
571template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename MatrixSizeRhsT_,
typename ValueRhsT_,
typename ImplementationRhsT_>
576template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValueRhsT_,
typename UnitRhsT_>
583template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
588template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValueRhsT_>
592template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename MatrixSizeRhsT_,
typename ValueRhsT_,
typename ImplementationRhsT_>
596template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValueRhsT_,
typename UnitRhsT_>
601template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
603 static_assert(std::is_same<UnitsLhsT_, UnitsRhsT_>::value,
"Units do not match.");
607template <
typename ValuesLhsT_,
typename UnitsLhsT_,
typename ValuesRhsT_,
typename UnitsRhsT_>
609 return !(lhs == rhs);
612template <
typename ValuesT_,
typename UnitsT_>
629template <
typename ResultUnitsT_,
typename ValuesT_,
typename UnitsT_,
typename FunctionT_>
630auto applyCwise(
const Quantities<ValuesT_, UnitsT_>& quantities,
const FunctionT_& function) {
631 using ValueT =
typename ValuesT_::ValueT;
632 return Quantities<typename Evaluate<ValuesT_>::type, ResultUnitsT_>(
633 quantities.getValues().cwiseFunction([&function](
const ValueT value) {
return static_cast<ValueT
>(function(value)); }));
639template <
typename ValueT_>
640struct RequireFloatingPoint {
641 static_assert(std::is_floating_point_v<ValueT_>,
642 "sin, cos, tan, asin, acos, atan, atan2, exp and log need floating-point values: their results are not integers in "
644 static constexpr bool value =
true;
650template <
typename ValuesT_,
typename UnitsT_,
typename FunctionT_>
651auto dimensionlessFunction(
const Quantities<ValuesT_, UnitsT_>& quantities,
const FunctionT_& function) {
652 using ValueT =
typename ValuesT_::ValueT;
653 using DimensionlessT =
654 TypeMatrix<Rows<UnitsT_>::value, Cols<UnitsT_>::value,
typename AccessUnits<AccessImplementation<ValueT>>::Dimensionless>;
655 static_assert(std::is_same_v<UnitsT_, DimensionlessT>,
656 "sin, cos, tan, asin, acos, atan, exp and log need dimensionless quantities, e.g. angles or ratios of lengths.");
657 static_assert(RequireFloatingPoint<ValueT>::value);
658 return applyCwise<UnitsT_>(quantities, function);
665template <
typename ResultUnitT_,
typename ValuesLhsT_,
typename UnitLhsT_,
typename ValuesRhsT_,
typename UnitRhsT_,
typename FunctionT_>
668 static_assert(std::is_same_v<UnitLhsT_, UnitRhsT_>,
"atan2, hypot, min and max need quantities with the same unit.");
669 static_assert(std::is_same_v<ValuesT, typename Evaluate<ValuesRhsT_>::type>,
670 "atan2, hypot, min and max need quantities with the same value type and value matrix backend.");
676 template <
typename ValueT_>
677 ValueT_ operator()(
const ValueT_ lhs,
const ValueT_ rhs)
const {
678 return std::min(lhs, rhs);
682 template <
typename ValueT_>
683 ValueT_ operator()(
const ValueT_ lhs,
const ValueT_ rhs)
const {
684 return std::max(lhs, rhs);
704template <
typename ExponentT_,
typename ValuesT_,
typename UnitsT_>
706 return internal::applyCwise<typename Power<UnitsT_, ExponentT_>::type>(
707 quantities, [](
const auto value) {
return internal::realPower<ExponentT_>(value); });
711template <
int ExponentV_,
typename ValuesT_,
typename UnitsT_>
717template <
int ExponentDiv
idendV_,
int ExponentDivisorV_,
typename ValuesT_,
typename UnitsT_>
726template <
typename ValuesT_,
typename UnitsT_>
734template <
typename ValuesT_,
typename UnitsT_>
742template <
typename ValuesT_,
typename UnitsT_>
744 using ValueT =
typename ValuesT_::ValueT;
745 return internal::applyCwise<UnitsT_>(quantities, [](
const ValueT value) {
746 if constexpr (std::is_unsigned_v<ValueT>) {
749 return std::abs(value);
756template <
typename ValuesT_,
typename UnitsT_>
758 return internal::dimensionlessFunction(angles, [](
const auto value) {
return std::sin(value); });
762template <
typename ValuesT_,
typename UnitsT_>
764 return internal::dimensionlessFunction(angles, [](
const auto value) {
return std::cos(value); });
768template <
typename ValuesT_,
typename UnitsT_>
770 return internal::dimensionlessFunction(angles, [](
const auto value) {
return std::tan(value); });
776template <
typename ValuesT_,
typename UnitsT_>
778 return internal::dimensionlessFunction(quantities, [](
const auto value) {
return std::asin(value); });
783template <
typename ValuesT_,
typename UnitsT_>
785 return internal::dimensionlessFunction(quantities, [](
const auto value) {
return std::acos(value); });
790template <
typename ValuesT_,
typename UnitsT_>
792 return internal::dimensionlessFunction(quantities, [](
const auto value) {
return std::atan(value); });
797template <
typename ValuesT_,
typename UnitsT_>
799 return internal::dimensionlessFunction(quantities, [](
const auto value) {
return std::exp(value); });
804template <
typename ValuesT_,
typename UnitsT_>
806 return internal::dimensionlessFunction(quantities, [](
const auto value) {
return std::log(value); });
815template <
typename ValuesYT_,
typename UnitYT_,
typename ValuesXT_,
typename UnitXT_>
817 using ValueT =
typename ValuesYT_::ValueT;
818 static_assert(internal::RequireFloatingPoint<ValueT>::value);
819 return internal::binaryFunction<typename AccessUnits<AccessImplementation<ValueT>>::Angle>(
820 y, x, [](
const auto yValue,
const auto xValue) {
return std::atan2(yValue, xValue); });
827template <
typename ValuesXT_,
typename UnitXT_,
typename ValuesYT_,
typename UnitYT_>
829 return internal::binaryFunction<UnitXT_>(x, y, [](
const auto xValue,
const auto yValue) {
return internal::realHypot(xValue, yValue); });
834template <
typename ValuesLhsT_,
typename UnitLhsT_,
typename ValuesRhsT_,
typename UnitRhsT_>
836 return internal::binaryFunction<UnitLhsT_>(lhs, rhs, internal::Min{});
840template <
typename ValuesT_,
typename UnitT_>
842 return internal::binaryFunction<UnitT_>(lhs, rhs, internal::Min{});
847template <
typename ValuesLhsT_,
typename UnitLhsT_,
typename ValuesRhsT_,
typename UnitRhsT_>
849 return internal::binaryFunction<UnitLhsT_>(lhs, rhs, internal::Max{});
852template <
typename ValuesT_,
typename UnitT_>
854 return internal::binaryFunction<UnitT_>(lhs, rhs, internal::Max{});
Container to store quantities.
auto get() const
The quantity with the single index IdV_ of quantities of dimension 0 or 1: the row of a column,...
ValuesT getValues() &&
The values of a temporary are moved out of it, which avoids a copy and does not refer to the destroye...
auto cwiseInverse() const
The elementwise reciprocal, whose units are the reciprocals of the units.
auto determinant() const
Get the determinant of a square matrix, including a 1x1 matrix, whose units must describe a linear ma...
void set(const Quantity< ValueT_, UnitT_ > &quantity)
void set(const int rowId, const int colId, const Quantity< ValueT_, UnitT_ > &quantity)
bool isApprox(const Quantities< ValuesOtherT_, UnitsOtherT_ > &other, const ValueT precision=Precision< ValueT >::value()) const
const ValuesT & getValues() const &
Get the values of the quantities.
void set(const int id, const Quantity< ValueT_, UnitT_ > &quantity)
Sets the quantity with the single index id of quantities of dimension 0 or 1, like set<IdV_>(),...
void setValues(const ValuesOtherT_ &values)
Set the values of the quantities.
auto innerProduct(const Quantities< ValuesOtherT_, UnitsOtherT_ > &other) const
auto outerProduct(const Quantities< ValuesOtherT_, UnitsOtherT_ > &other) const
auto pseudoInverse() const
The Moore-Penrose pseudo-inverse A^+ of a matrix A of full rank: A^T (A A^T)^-1 if it has fewer rows ...
auto crossProduct(const Quantities< ValuesOtherT_, UnitsOtherT_ > &other) const
auto get(const int rowId, const int colId) const
void set(const Quantity< ValueT_, UnitT_ > &quantity)
void set(const Quantity< ValueT_, UnitT_ > &quantity)
Sets the quantity with the single index IdV_ of quantities of dimension 0 or 1 (see get<IdV_>()),...
void setValue(ValueOtherT_ value)
Sets the value of a quantity.
Quantities< ValuesT, UnitsT > ThisT
auto get(const int id) const
The quantity with the single index id of quantities of dimension 0 or 1, like get<IdV_>(),...
typename ValuesT::ValueT ValueT
auto inverse() const
The matrix inverse of a square matrix, whose units must describe a linear map, M_ij = a_i / b_j: the ...
auto dotProduct(const Quantities< ValuesOtherT_, UnitsOtherT_ > &other) const
Wrapper for the actual implementation of a value container.
Any quantity matrix: a specialization of Quantities, including Quantity.
Whether constructing a Class from the arguments copies or moves it, i.e. whether they are a single Cl...
auto operator*(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const ValueRhsT_ rhs)
auto log(const Quantities< ValuesT_, UnitsT_ > &quantities)
The natural logarithm of dimensionless quantities, elementwise, like std::log (https://en....
auto product(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const ValueRhsT_ rhs)
Tag< FromImplementationLabel > FromImplementation
auto abs(const Quantities< ValuesT_, UnitsT_ > &quantities)
The absolute value, elementwise, of the same unit, like std::abs (https://en.cppreference....
auto negation(const Quantities< ValuesT_, UnitsT_ > &rhs)
auto min(const Quantity< ValuesLhsT_, UnitLhsT_ > &lhs, const Quantity< ValuesRhsT_, UnitRhsT_ > &rhs)
The smaller of two quantities with the same unit, like std::min (https://en.cppreference....
auto cos(const Quantities< ValuesT_, UnitsT_ > &angles)
The cosine of angles in radians, elementwise, like std::cos (https://en.cppreference....
Quantities< ValueT_, TypeMatrixImpl< MatrixSize< 1, 1 >, std::tuple< UnitT_ > > > Quantity
Container to store a single quantity.
auto asin(const Quantities< ValuesT_, UnitsT_ > &quantities)
The arc sine of dimensionless quantities, elementwise, like std::asin (https://en....
auto outerProduct(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
auto operator+(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
bool operator!=(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
auto exp(const Quantities< ValuesT_, UnitsT_ > &quantities)
The exponential function e^x of dimensionless quantities, elementwise, like std::exp (https://en....
std::ostream & operator<<(std::ostream &lhs, const Quantities< ValuesT_, UnitsT_ > &rhs)
constexpr bool isConvertedToValueType
Whether an arithmetic scalar of the type ScalarT_ is converted into the value type ValueT_: if their ...
auto hypot(const Quantity< ValuesXT_, UnitXT_ > &x, const Quantity< ValuesYT_, UnitYT_ > &y)
The length sqrt(x^2 + y^2) of two quantities with the same unit, e.g. the components of a vector,...
auto operator-(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
auto innerProduct(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
auto cbrt(const Quantities< ValuesT_, UnitsT_ > &quantities)
The cube root, elementwise: pow<1, 3>(), computed with std::cbrt (https://en.cppreference....
auto sqrt(const Quantities< ValuesT_, UnitsT_ > &quantities)
The square root, elementwise: pow<1, 2>(), computed with std::sqrt (https://en.cppreference....
auto acos(const Quantities< ValuesT_, UnitsT_ > &quantities)
The arc cosine of dimensionless quantities, elementwise, like std::acos (https://en....
Tag< FromImplementationArgsLabel > FromImplementationArgs
auto tan(const Quantities< ValuesT_, UnitsT_ > &angles)
The tangent of angles in radians, elementwise, like std::tan (https://en.cppreference....
bool operator==(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
auto atan(const Quantities< ValuesT_, UnitsT_ > &quantities)
The arc tangent of dimensionless quantities, elementwise, like std::atan (https://en....
Tag< FromSimilarLabel > FromSimilar
typename CreateTypeMatrix< RowsV_, ColsV_, Types... >::type TypeMatrix
A matrix storing types at compile-time.
auto atan2(const Quantity< ValuesYT_, UnitYT_ > &y, const Quantity< ValuesXT_, UnitXT_ > &x)
The angle of the point (x, y) from the positive x axis, in [-pi, pi] in radians, of two quantities wi...
auto pow(const Quantities< ValuesT_, UnitsT_ > &quantities)
The quantities raised to a rational power P/Q, elementwise, e.g. pow<Rational<1, 2>>(area) is a lengt...
auto division(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const ValueRhsT_ rhs)
auto difference(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
auto sum(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const Quantities< ValuesRhsT_, UnitsRhsT_ > &rhs)
Rational< ValueV_, 1 > Integer
auto operator/(const Quantities< ValuesLhsT_, UnitsLhsT_ > &lhs, const ValueRhsT_ rhs)
auto sin(const Quantities< ValuesT_, UnitsT_ > &angles)
The sine of angles in radians, elementwise, like std::sin (https://en.cppreference....
auto max(const Quantity< ValuesLhsT_, UnitLhsT_ > &lhs, const Quantity< ValuesRhsT_, UnitRhsT_ > &rhs)
The larger of two quantities with the same unit, like std::max (https://en.cppreference....
Type wrapper which is used to access traits partially specialized in the implementation header files.
The units for values of the arithmetic type ValueT_, e.g. double, specialized for AccessImplementatio...
Quantities< typename Block< ValuesT_, BlockRowIdV_, BlockColIdV_, BlockRowsV_, BlockColsV_ >::type, typename Block< UnitsT_, BlockRowIdV_, BlockColIdV_, BlockRowsV_, BlockColsV_ >::type > type
static constexpr int value
Quantities< typename CrossProduct< ValuesLhsT_, ValuesRhsT_ >::type, typename CrossProduct< UnitsLhsT_, UnitsRhsT_ >::type > type
Quantities< typename CwiseInverse< ValuesT_ >::type, typename CwiseInverse< UnitsT_ >::type > type
The elementwise reciprocal of a matrix, like Eigen's ArrayBase::inverse() or cwiseInverse().
Quantity< ScalarValues< ValuesT_, typename ValuesT_::ValueT >, typename Determinant< UnitsT_ >::type > type
Quantities< typename Difference< ValuesLhsT_, ValuesRhsT_ >::type, typename Difference< UnitsLhsT_, UnitsRhsT_ >::type > type
static constexpr int value
static constexpr int value
Quantities< typename Division< ValuesLhsT_, ValuesRhsT_ >::type, typename Division< UnitsLhsT_, UnitsRhsT_ >::type > type
Quantities< typename Division< ValuesLhsT_, typename ValueRhsT_::ValueT >::type, typename Division< UnitsLhsT_, UnitRhsT_ >::type > type
Quantities< typename DotProduct< ValuesLhsT_, ValuesRhsT_ >::type, typename DotProduct< UnitsLhsT_, UnitsRhsT_ >::type > type
Quantity< ScalarValues< ValuesT_, typename ValuesT_::ValueT >, typename Element< UnitsT_, ElementRowIdV_, ElementColIdV_ >::type > type
Quantities< typename Evaluate< ValuesT_ >::type, UnitsT_ > type
typename IfThenElse< sizeof...(Ts)==1, typename IfThenElse< AnyQuantities< first >, FromSimilar, typename IfThenElse<(IsQuantity< std::decay_t< Ts > >::value &&...), FromImplementation, FromImplementationArgs >::type >::type, typename IfThenElse<(IsQuantity< std::decay_t< Ts > >::value &&...), FromImplementation, FromImplementationArgs >::type >::type type
Quantity< ScalarValues< ValuesT_, typename ValuesT_::ValueT >, typename GetType< UnitsT_ >::type > type
Trait to select one type or another depending on a boolean. Note that both types must be defined even...
Quantities< typename InnerProduct< ValuesLhsT_, ValuesRhsT_ >::type, typename InnerProduct< UnitsLhsT_, UnitsRhsT_ >::type > type
Quantities< typename Inverse< ValuesT_ >::type, UnitsT > type
typename Inverse< UnitsT_ >::type UnitsT
The inverse: the matrix inverse of a matrix, like Eigen's MatrixBase::inverse(), and the reciprocal o...
static constexpr bool value
static constexpr bool value
Whether T is a specialization of Template.
static constexpr bool UnitsMatchV
static constexpr bool value
Whether converting a From into a To passes the checks of the converting constructor of To,...
Quantities< typename Negation< ValuesT_ >::type, UnitsT_ > type
The negation is performed elementwise.
Quantities< typename OuterProduct< ValuesLhsT_, ValuesRhsT_ >::type, typename OuterProduct< UnitsLhsT_, UnitsRhsT_ >::type > type
Quantities< ValuesT_, typename Power< UnitsT_, ExponentT_ >::type > type
static constexpr ValueT_ value()
Quantities< typename Product< ValuesLhsT_, ValuesRhsT_ >::type, typename Product< UnitsLhsT_, UnitsRhsT_ >::type > type
static constexpr int value
Quantities< typename Sum< ValuesLhsT_, ValuesRhsT_ >::type, typename Sum< UnitsLhsT_, UnitsRhsT_ >::type > type
Quantities< typename Transpose< ValuesT_ >::type, typename Transpose< UnitsT_ >::type > type