From 03c56bcc83c8984165208a3826fb06f68109d1ac Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 7 Aug 2025 13:39:54 +0200 Subject: Added subtraction --- modules/codec/c++/data_math.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules/codec/c++/data_math.hpp') diff --git a/modules/codec/c++/data_math.hpp b/modules/codec/c++/data_math.hpp index b5491eb..5791f00 100644 --- a/modules/codec/c++/data_math.hpp +++ b/modules/codec/c++/data_math.hpp @@ -104,6 +104,17 @@ public: return c; } + + data, encode::Native> operator-(const data, encode::Native>& rhs) { + data, encode::Native> c; + + rank_iterator::in_fixed_bounds([&](const data, encode::Native>& index) -> error_or{ + c.at(index) = at(index) - rhs.at(index); + return make_void(); + }); + + return c; + } }; } -- cgit v1.2.3