Sorry to do this twice in one day; I was on a roll.
Summary of changes
Added the lin/queries.hpp and lin/math.hpp modules.
Essentially, I've added element wise operations for these operators: ==, <, <=, >, >=, !=, !, &&, etc. In addition many functions from cmath can be used on tensor objects like the following: lin::sin, lin::cos, lin::tan, lin::acos, lin::asin, lin::atan, lin::atan2, lin::isfinite, ... (see lin/math/operations.hpp for the full list).
Most useful out of this will be better nan checking. We can now do something like this:
#include <lin/core.hpp>
#include <lin/math.hpp>
#include <lin/queries.hpp>
lin::Vector4d a = { ... };
if (!lin::all(lin::isfinite(a))) { ... }
Update the
lin
Library SubmoduleSorry to do this twice in one day; I was on a roll.
Summary of changes
lin/queries.hpp
andlin/math.hpp
modules.Essentially, I've added element wise operations for these operators:
==
,<
,<=
,>
,>=
,!=
,!
,&&
, etc. In addition many functions from cmath can be used on tensor objects like the following:lin::sin
,lin::cos
,lin::tan
,lin::acos
,lin::asin
,lin::atan
,lin::atan2
,lin::isfinite
, ... (seelin/math/operations.hpp
for the full list).Most useful out of this will be better
nan
checking. We can now do something like this:Ptest Effects
NA
Testing
Existing unit tests should be sufficient.
Constants
NA
Documentation Evidence
Same as the last PR.