/* try.cpp - to try out and experiment with new features.... * scons will create the binary bin/try */ // 09/26 - ways to build a cyclically wrapping number domain // 03/26 - runtime index access and iteration over tuple-likes // 06/25 - provide a concept to accept _tuple-like_ objects // 06/25 - investigate function type detection of std::bind Binders // 12/24 - investigate problem when perfect-forwarding into a binder // 12/24 - investigate overload resolution on a templated function similar to std::get // 11/24 - how to define a bare object location comparison predicate // 11/23 - prototype for grouping from iterator /** @file try.cpp * Investigate techniques for creating a cyclically wrapping numeric domain. * Actually this could be achieved with my `floordiv()` utility, yet the ramifications * were not clear -- so I settled to build a stand-alone solution, based on the naive modulus * technique, attempting to fix the negative offsets. It became clear that this approach would * have to consider the domain boundaries and identify cases that could not be handlet. At that * point, I used Claude to scrutinise and improve my draft, leading to a generic tool that is * now relocated into the \ref util-quant.hpp header * @see lib::par::Scale */ #include "lib/format-cout.hpp" #include "lib/util-quant.hpp" #include "lib/util.hpp" #include template constexpr NUM _MAX = std::numeric_limits::max(); template constexpr NUM _MIN = std::numeric_limits::lowest(); template void showCase (N val, N minVal, N maxVal) { cout << "val:"<"<< util::cyclicWrap (val,minVal,maxVal)< void showFloorDiv (N num, N den) { cout << "FloorDiv:"<"<< util::floordiv(num,den)< void showFloorWrap (N num, N den) { auto fwrap = util::floorwrap (num,den); cout << "FloorWrap:"< q="<